/*
Theme Name: Blue Prysm Editorial
Theme URI: https://blueprysm.com
Author: Blue Prysm
Author URI: https://blueprysm.com
Description: Light Editorial theme mirroring the Blue Prysm app — Sapphire & Gold palette, Playfair Display headings, Inter body. Designed for blogs and articles that match blueprysm.com pixel-for-pixel.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blueprysm
Tags: blog, editorial, two-columns, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ============================================================
   DESIGN TOKENS — mirrors src/index.css
   ============================================================ */
:root {
  --bp-bg: hsl(0, 0%, 100%);
  --bp-fg: hsl(225, 25%, 10%);
  --bp-card: hsl(0, 0%, 100%);
  --bp-muted: hsl(220, 14%, 96%);
  --bp-muted-fg: hsl(220, 10%, 45%);
  --bp-border: hsl(220, 15%, 90%);
  --bp-primary: hsl(220, 84%, 48%);          /* Sapphire */
  --bp-primary-glow: hsl(200, 85%, 60%);
  --bp-primary-fg: hsl(0, 0%, 100%);
  --bp-accent-bg: hsl(195, 100%, 95%);
  --bp-accent-fg: hsl(200, 85%, 35%);
  --bp-champagne: hsl(46, 71%, 52%);          /* Gold */
  --bp-champagne-light: hsl(43, 80%, 65%);
  --bp-success: hsl(152, 69%, 40%);
  --bp-warning: hsl(38, 95%, 50%);

  --bp-gradient-primary: linear-gradient(135deg, hsl(220, 84%, 48%) 0%, hsl(200, 85%, 50%) 100%);
  --bp-gradient-hero: linear-gradient(180deg, hsl(225, 30%, 6%) 0%, hsl(225, 25%, 10%) 50%, hsl(220, 20%, 15%) 100%);
  --bp-gradient-mesh:
    radial-gradient(at 40% 20%, hsla(220, 84%, 48%, 0.08) 0%, transparent 50%),
    radial-gradient(at 80% 80%, hsla(200, 85%, 50%, 0.06) 0%, transparent 50%),
    radial-gradient(at 0% 50%, hsla(220, 84%, 48%, 0.05) 0%, transparent 50%);

  --bp-shadow-card: 0 1px 3px hsla(225, 25%, 10%, 0.04), 0 0 0 1px hsla(220, 15%, 90%, 0.8);
  --bp-shadow-card-hover: 0 20px 40px -15px hsla(220, 84%, 48%, 0.2), 0 8px 16px -8px hsla(225, 25%, 10%, 0.1);
  --bp-shadow-lg: 0 10px 15px -3px hsla(225, 25%, 10%, 0.08), 0 4px 6px -4px hsla(225, 25%, 10%, 0.05);

  --bp-radius: 0.625rem;
  --bp-transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  --bp-font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --bp-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bp-font-body: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

  --bp-container: 1200px;
  --bp-container-narrow: 760px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--bp-font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--bp-fg);
  background: var(--bp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "ss01";
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a {
  color: var(--bp-primary);
  text-decoration: none;
  transition: color var(--bp-transition);
}
a:hover { color: hsl(220, 84%, 38%); }

/* ============================================================
   TYPOGRAPHY — Editorial
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bp-font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--bp-fg);
  margin: 1.8em 0 0.6em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p  { margin: 0 0 1.25em; }
blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--bp-champagne);
  background: var(--bp-muted);
  font-family: var(--bp-font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--bp-fg);
  border-radius: 0 var(--bp-radius) var(--bp-radius) 0;
}
code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--bp-muted);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre {
  background: hsl(225, 30%, 6%);
  color: hsl(0, 0%, 95%);
  padding: 1.25rem 1.5rem;
  border-radius: var(--bp-radius);
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: transparent; padding: 0; color: inherit; }
hr {
  border: 0;
  height: 1px;
  background: var(--bp-border);
  margin: 3rem 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.bp-container { max-width: var(--bp-container); margin: 0 auto; padding: 0 1.5rem; }
.bp-narrow    { max-width: var(--bp-container-narrow); margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   HEADER — Editorial nav
   ============================================================ */
.bp-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsla(0, 0%, 100%, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--bp-border);
}
.bp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: var(--bp-container);
  margin: 0 auto;
}
.bp-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--bp-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bp-fg);
}
.bp-brand:hover { color: var(--bp-primary); }
.bp-brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bp-gradient-primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-family: var(--bp-font-serif); font-size: 1rem; font-weight: 700;
  box-shadow: 0 4px 12px hsla(220, 84%, 48%, 0.3);
}
.bp-nav { display: flex; align-items: center; gap: 1.75rem; }
.bp-nav a {
  color: var(--bp-fg);
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
}
.bp-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--bp-champagne);
  transition: width var(--bp-transition);
}
.bp-nav a:hover::after,
.bp-nav .current-menu-item > a::after { width: 100%; }
.bp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }

/* ============================================================
   HERO (front page / archive header)
   ============================================================ */
.bp-hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  background: var(--bp-gradient-mesh), white;
  text-align: center;
  border-bottom: 1px solid var(--bp-border);
  overflow: hidden;
}
.bp-hero-eyebrow {
  display: inline-block;
  font-family: var(--bp-font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bp-champagne);
  margin-bottom: 1rem;
}
.bp-hero h1 {
  margin: 0 auto 1rem;
  max-width: 820px;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
}
.bp-hero p.lede {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--bp-muted-fg);
}

/* ============================================================
   POST GRID (archive / home)
   ============================================================ */
.bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}
.bp-card {
  background: var(--bp-card);
  border: 1px solid var(--bp-border);
  border-radius: calc(var(--bp-radius) + 4px);
  overflow: hidden;
  transition: transform var(--bp-transition), box-shadow var(--bp-transition), border-color var(--bp-transition);
  display: flex;
  flex-direction: column;
}
.bp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-card-hover);
  border-color: hsla(220, 84%, 48%, 0.25);
}
.bp-card-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bp-muted) var(--bp-gradient-mesh);
  overflow: hidden;
}
.bp-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.bp-card:hover .bp-card-thumb img { transform: scale(1.04); }
.bp-card-body { padding: 1.5rem 1.5rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.bp-card-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bp-champagne);
  margin-bottom: 0.625rem;
}
.bp-card-title {
  font-family: var(--bp-font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.625rem;
  letter-spacing: -0.02em;
}
.bp-card-title a { color: var(--bp-fg); }
.bp-card-title a:hover { color: var(--bp-primary); }
.bp-card-excerpt {
  color: var(--bp-muted-fg);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.bp-card-foot {
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--bp-muted-fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.bp-article { padding: 4rem 0 6rem; }
.bp-article-header { text-align: center; margin: 0 auto 3rem; max-width: 820px; padding: 0 1.5rem; }
.bp-article-eyebrow {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bp-champagne); margin-bottom: 1rem;
}
.bp-article-header h1 { margin: 0 0 1rem; font-size: clamp(2.25rem, 4.5vw, 3.75rem); }
.bp-article-meta {
  color: var(--bp-muted-fg);
  font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.75rem;
}
.bp-article-feature {
  max-width: var(--bp-container);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}
.bp-article-feature img {
  width: 100%;
  border-radius: calc(var(--bp-radius) + 4px);
  box-shadow: var(--bp-shadow-lg);
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.bp-article-content {
  max-width: var(--bp-container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}
.bp-article-content > p:first-of-type::first-letter {
  font-family: var(--bp-font-serif);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 0.9;
  float: left;
  margin: 0.25rem 0.75rem 0 0;
  color: var(--bp-primary);
}
.bp-article-content img {
  border-radius: var(--bp-radius);
  margin: 2rem auto;
}
.bp-article-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--bp-muted-fg);
  margin-top: 0.5rem;
  font-style: italic;
}
.bp-article-content ul, .bp-article-content ol { padding-left: 1.5rem; margin: 1.25em 0; }
.bp-article-content li { margin-bottom: 0.5em; }

/* Tags */
.bp-tags {
  max-width: var(--bp-container-narrow);
  margin: 3rem auto 0;
  padding: 2rem 1.5rem 0;
  border-top: 1px solid var(--bp-border);
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.bp-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--bp-accent-bg);
  color: var(--bp-accent-fg);
  font-size: 0.8125rem;
  font-weight: 500;
}
.bp-tag:hover { background: var(--bp-primary); color: white; }

/* ============================================================
   BUTTONS
   ============================================================ */
.bp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--bp-radius);
  font-family: var(--bp-font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--bp-transition);
  text-decoration: none;
}
.bp-btn-primary {
  background: var(--bp-gradient-primary);
  color: white;
  box-shadow: 0 4px 12px hsla(220, 84%, 48%, 0.25);
}
.bp-btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px hsla(220, 84%, 48%, 0.35);
}
.bp-btn-ghost {
  background: transparent;
  color: var(--bp-fg);
  border-color: var(--bp-border);
}
.bp-btn-ghost:hover { border-color: var(--bp-primary); color: var(--bp-primary); }

/* ============================================================
   COMMENTS
   ============================================================ */
.bp-comments {
  max-width: var(--bp-container-narrow);
  margin: 4rem auto 0;
  padding: 3rem 1.5rem 0;
  border-top: 1px solid var(--bp-border);
}
.bp-comments h2 { font-size: 1.75rem; margin-top: 0; }
.bp-comments ol { list-style: none; padding: 0; }
.bp-comments .comment {
  padding: 1.5rem;
  background: var(--bp-muted);
  border-radius: var(--bp-radius);
  margin-bottom: 1rem;
}
.bp-comments .comment-author { font-weight: 600; margin-bottom: 0.25rem; }
.bp-comments .comment-meta { font-size: 0.8125rem; color: var(--bp-muted-fg); margin-bottom: 0.75rem; }
.bp-comments textarea, .bp-comments input[type="text"], .bp-comments input[type="email"], .bp-comments input[type="url"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  font-family: inherit;
  font-size: 1rem;
  background: white;
  margin-bottom: 1rem;
  transition: border-color var(--bp-transition), box-shadow var(--bp-transition);
}
.bp-comments textarea:focus, .bp-comments input:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px hsla(220, 84%, 48%, 0.12);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.bp-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
}
.bp-pagination a, .bp-pagination span {
  padding: 0.5rem 0.875rem;
  border-radius: var(--bp-radius);
  border: 1px solid var(--bp-border);
  color: var(--bp-fg);
  font-weight: 500;
  font-size: 0.9375rem;
}
.bp-pagination .current {
  background: var(--bp-gradient-primary);
  color: white;
  border-color: transparent;
}
.bp-pagination a:hover { border-color: var(--bp-primary); color: var(--bp-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.bp-site-footer {
  background: hsl(225, 30%, 6%);
  color: hsl(220, 14%, 70%);
  padding: 4rem 1.5rem 2rem;
  margin-top: 6rem;
}
.bp-footer-inner {
  max-width: var(--bp-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.bp-footer-inner h4 {
  color: white;
  font-family: var(--bp-font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.bp-footer-inner a { color: hsl(220, 14%, 78%); display: block; padding: 0.25rem 0; font-size: 0.9375rem; }
.bp-footer-inner a:hover { color: var(--bp-champagne-light); }
.bp-footer-bottom {
  max-width: var(--bp-container);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid hsla(220, 14%, 70%, 0.15);
  font-size: 0.8125rem;
  color: hsl(220, 14%, 60%);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .bp-nav { display: none; }
  .bp-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .bp-grid { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0; }
  .bp-hero { padding: 3rem 1.25rem 2.5rem; }
  body { font-size: 16px; }
}

/* ============================================================
   WP CORE — alignments, block compatibility
   ============================================================ */
.alignleft  { float: left;  margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption {
  text-align: center; font-size: 0.875rem; color: var(--bp-muted-fg); font-style: italic; margin-top: 0.5rem;
}
.screen-reader-text {
  position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden;
}
.sticky .bp-card { border-color: var(--bp-champagne); }
.sticky .bp-card-meta::before { content: "★ Featured · "; }
