/* =============================================================
   THE BEST CHRISTIAN NEWS — Design System Foundations
   Warm monochrome · classic editorial, modern & clean
   Brand ink #1b1b1b · brand cream #eeede9
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  /* ---------------------------------------------------------
     COLOR — a single warm monochrome scale.
     Ink (#1b1b1b) and Cream (#eeede9) are the two fixed brand
     anchors; everything between is a warm-tinted gray ramp.
     --------------------------------------------------------- */
  --bcn-ink:        #1b1b1b; /* brand near-black — primary text & dark surfaces */
  --bcn-ink-soft:   #2e2d2b; /* raised dark surface, hover on ink */
  --bcn-graphite:   #44423f; /* strong secondary text on cream */
  --bcn-slate:      #5c5a56; /* body-secondary, captions */
  --bcn-stone:      #78756f; /* muted text, metadata */
  --bcn-ash:        #9a968f; /* disabled text, faint labels */
  --bcn-mist:       #bdb9b1; /* hairline rules on cream */
  --bcn-fog:        #d8d5cf; /* dividers, borders */
  --bcn-haze:       #e6e4df; /* subtle fills, hover on cream */
  --bcn-cream:      #eeede9; /* brand off-white — primary background */
  --bcn-paper:      #f6f5f2; /* raised card surface above cream */
  --bcn-white:      #ffffff; /* pure white — sparingly, for crisp media frames */

  /* Semantic roles (light/default theme) */
  --color-bg:            var(--bcn-cream);
  --color-surface:       var(--bcn-paper);
  --color-surface-raised:var(--bcn-white);
  --color-ink:           var(--bcn-ink);
  --color-text:          var(--bcn-ink);
  --color-text-secondary:var(--bcn-graphite);
  --color-text-muted:    var(--bcn-stone);
  --color-text-faint:    var(--bcn-ash);
  --color-border:        var(--bcn-fog);
  --color-border-strong: var(--bcn-mist);
  --color-hairline:      var(--bcn-mist);
  --color-fill-subtle:   var(--bcn-haze);
  --color-on-ink:        var(--bcn-cream); /* text/marks on dark surfaces */
  --color-on-ink-muted:  #a8a5a0;

  /* ---------------------------------------------------------
     ACCENT — "Rubric Red"
     The one bright note. Rooted in red-letter scripture and the
     medieval practice of rubrication — sacred text picked out in
     vermilion. Warm enough to belong in the cream/ink family, bright
     enough to flag what matters. USE SPARINGLY: section flags,
     "breaking", links, a single emphasis word, one CTA per view.
     --------------------------------------------------------- */
  --bcn-rubric:      #cc3b2b; /* bright warm scarlet — the accent */
  --bcn-rubric-deep: #9c2c1f; /* darker — accent text/links on cream, hover */
  --bcn-rubric-tint: #f6ddd6; /* faint warm wash — badge & highlight fills */

  --color-accent:         var(--bcn-rubric);
  --color-accent-strong:  var(--bcn-rubric-deep);
  --color-accent-contrast:var(--bcn-cream); /* text/marks on accent fills */
  --color-accent-tint:    var(--bcn-rubric-tint);

  /* ---------------------------------------------------------
     TYPE
     Display: PT Serif — the masthead font, used for every headline.
     Text/UI: Libre Franklin — Franklin-Gothic-lineage editorial
              sans, clean and newsroom-legible.
     --------------------------------------------------------- */
  --font-display: 'PT Serif', 'Times New Roman MT Condensed', 'TimesNewRomanMTStd-Cond', 'Times New Roman', Times, serif;
  --font-sans:    'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    var(--font-sans);

  /* Modular type scale — ~1.25 (major third) for display ramp.
     Tuned for a 1.0rem = 18px article reading base. */
  --text-xs:    0.722rem;  /* 13px — kickers, metadata, captions */
  --text-sm:    0.833rem;  /* 15px — small UI, secondary */
  --text-base:  1rem;      /* 18px — article body */
  --text-md:    1.125rem;  /* 20.25px — lead / standfirst */
  --text-lg:    1.333rem;  /* 24px — subhead */
  --text-xl:    1.777rem;  /* 32px — H4 / card titles */
  --text-2xl:   2.369rem;  /* 43px — H3 */
  --text-3xl:   3.157rem;  /* 57px — H2 / article headline */
  --text-4xl:   4.209rem;  /* 76px — H1 / feature headline */
  --text-5xl:   5.61rem;   /* 101px — hero display */

  --root-font-size: 18px;

  /* Line heights */
  --leading-tight:   1.05;  /* display headlines */
  --leading-snug:    1.2;
  --leading-normal:  1.34;
  --leading-relaxed: 1.62;  /* long-form body */

  /* Letter spacing */
  --tracking-kicker: 0.18em;  /* uppercase kickers / labels */
  --tracking-caps:   0.08em;
  --tracking-tight:  -0.015em; /* large display */
  --tracking-normal: 0;

  /* Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    900;

  /* ---------------------------------------------------------
     SPACE — 4px base unit
     --------------------------------------------------------- */
  --space-0:   0;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   48px;
  --space-9:   72px;
  --space-10:  96px;
  --space-11: 192px;

  /* Layout */
  --measure:        66ch;   /* ideal reading column */
  --content-width:  1200px; /* page max width */
  --gutter:         var(--space-5);

  /* ---------------------------------------------------------
     RADII — restrained. Editorial = mostly square corners.
     --------------------------------------------------------- */
  --radius-none:  0;
  --radius-sm:    0;
  --radius-md:    0;
  --radius-lg:    0;
  --radius-pill:  999px;

  /* ---------------------------------------------------------
     RULES & SHADOWS — hairlines carry the structure;
     shadows are faint and warm, never heavy.
     --------------------------------------------------------- */
  --rule-hairline: 1px solid var(--color-hairline);
  --rule-strong:   2px solid var(--color-ink);
  --rule-thin:     1px solid var(--color-border);

  --shadow-sm:  none;
  --shadow-md:  none;
  --shadow-lg:  none;

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --dur-fast:    140ms; /* @kind other */
  --dur-base:    240ms; /* @kind other */
  --dur-slow:    420ms; /* @kind other */
}

/* =============================================================
   BASE ELEMENTS
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: var(--root-font-size); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings — display serif */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); font-weight: var(--weight-black); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); letter-spacing: var(--tracking-normal); }
h4 { font-size: var(--text-xl); letter-spacing: var(--tracking-normal); }

/* Subheads inside running text use sans for contrast */
h5, h6 {
  font-family: var(--font-sans);
  margin: 0 0 var(--space-3);
  color: var(--color-ink);
}
h5 { font-size: var(--text-md); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-normal); }
h6 {
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: var(--tracking-kicker);
  color: var(--color-text-muted);
}

p { margin: 0 0 var(--space-5); text-wrap: pretty; }

a { color: var(--color-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--color-text-muted); }

strong, b { font-weight: var(--weight-semibold); }

em, i { font-style: italic; }

blockquote {
  margin: var(--space-6) 0;
  padding-left: var(--space-5);
  border-left: var(--rule-strong);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--color-graphite, var(--bcn-graphite));
}

hr {
  border: 0;
  border-top: var(--rule-hairline);
  margin: var(--space-7) 0;
}

small { font-size: var(--text-sm); }

::selection { background: var(--bcn-ink); color: var(--bcn-cream); }

/* =============================================================
   UTILITY / EDITORIAL HELPERS
   ============================================================= */

/* Uppercase tracked kicker — the system's signature label */
.bcn-kicker {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-kicker);
  color: var(--color-text-muted);
}

.bcn-display { font-family: var(--font-display); }
.bcn-sans    { font-family: var(--font-sans); }
.bcn-italic  { font-family: var(--font-display); font-style: italic; }

/* Accent text — for an emphasized word, a link, a section flag */
.bcn-accent { color: var(--color-accent-strong); }

/* Accent "flag" — section/breaking label. The accent's signature use. */
.bcn-flag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-accent-strong);
}

/* Solid accent badge — for "breaking" / live tags. Use once per view. */
.bcn-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  padding: 3px 9px;
  border-radius: 0;
}

/* Dark "ink" section — reverses the palette */
.bcn-on-ink {
  background: var(--bcn-ink);
  color: var(--color-on-ink);
}
.bcn-on-ink h1, .bcn-on-ink h2, .bcn-on-ink h3, .bcn-on-ink h4 { color: var(--bcn-cream); }

/* =============================================================
   EDITORIAL LAYOUT — Homepage 2.0
   ============================================================= */

/* Flat masthead */
.bcn-masthead { position: static !important; background: var(--bcn-cream); border-bottom: 1px solid var(--bcn-mist); box-shadow: none !important; backdrop-filter: none !important; }
.bcn-masthead__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 0; }
.bcn-masthead__date { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bcn-stone); }
.bcn-masthead__wordmark { text-align: center; }
.bcn-masthead__actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.bcn-masthead__nav { border-top: 1px solid var(--bcn-mist); padding: 8px 0; text-align: center; }
.bcn-masthead__nav a { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bcn-ink); text-decoration: none; margin: 0 16px; }
.bcn-masthead__nav a:hover { color: var(--bcn-rubric-deep); }

/* Flat buttons */
.bcn-btn, .bcn-btn-primary, .bcn-btn-outline { border-radius: 0 !important; box-shadow: none !important; }
.bcn-btn-primary { background: var(--bcn-ink); color: var(--bcn-cream); padding: 7px 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; border: none; cursor: pointer; }
.bcn-btn-primary:hover { background: var(--bcn-ink-soft); color: var(--bcn-cream); text-decoration: none; }
.bcn-btn-outline { background: transparent; color: var(--bcn-ink); padding: 7px 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; border: 1px solid var(--bcn-ink); text-decoration: none; }
.bcn-btn-outline:hover { background: var(--bcn-ink); color: var(--bcn-cream); text-decoration: none; }

/* Section label */
.section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bcn-stone); border-top: 2px solid var(--bcn-ink); padding-top: 8px; margin-bottom: 0; display: block; }

/* Lead story */
.lead-story { padding: 32px 0 40px; border-bottom: 1px solid var(--bcn-mist); }
.lead-story__inner { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: start; margin-top: 20px; }
.lead-story__headline { font-size: 3.5rem; line-height: 1.04; letter-spacing: -0.02em; font-weight: 700; margin: 8px 0 16px; font-family: var(--font-display); }
.lead-story__headline a { color: var(--bcn-ink); text-decoration: none; }
.lead-story__headline a:hover { color: var(--bcn-graphite); }
.lead-story__deck { font-size: 1.1rem; line-height: 1.5; color: var(--bcn-graphite); margin: 0 0 12px; }
.lead-story__meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bcn-stone); }
.lead-story__image { background: var(--bcn-haze); aspect-ratio: 3/2; border: 1px solid var(--bcn-mist); }

/* Story river */
.story-river { display: grid; grid-template-columns: 1fr 280px; gap: 48px; padding: 32px 0; }
.river-main {}
.river-entry { padding: 20px 0; border-top: 1px solid var(--bcn-mist); }
.river-entry:first-child { border-top: 2px solid var(--bcn-ink); }
.river-entry__headline { font-size: 1.6rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 8px; font-family: var(--font-display); }
.river-entry__headline a { color: var(--bcn-ink); text-decoration: none; }
.river-entry__headline a:hover { color: var(--bcn-graphite); }
.river-entry__deck { font-size: 0.9rem; line-height: 1.5; color: var(--bcn-graphite); margin: 0 0 8px; }
.river-entry__meta { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bcn-stone); }

/* Sidebar */
.river-sidebar { border-left: 1px solid var(--bcn-mist); padding-left: 32px; }
.sidebar-widget { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--bcn-mist); }
.sidebar-widget:last-child { border-bottom: none; }
.sidebar-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bcn-stone); margin-bottom: 14px; border-bottom: 2px solid var(--bcn-ink); padding-bottom: 8px; display: block; }

/* Psalm widget in sidebar */
.psalm-widget__text { font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.5; color: var(--bcn-ink); margin: 0 0 8px; }
.psalm-widget__ref { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bcn-stone); }

/* Most-read list */
.most-read-list { list-style: none; padding: 0; margin: 0; }
.most-read-list li { padding: 10px 0; border-bottom: 1px solid var(--bcn-mist); font-size: 0.875rem; line-height: 1.3; }
.most-read-list li:last-child { border-bottom: none; }
.most-read-list a { color: var(--bcn-ink); text-decoration: none; font-weight: 600; font-family: var(--font-display); }
.most-read-list a:hover { color: var(--bcn-graphite); }

/* Newsletter in sidebar */
.sidebar-newsletter input[type="email"] { width: 100%; padding: 8px 10px; border: 1px solid var(--bcn-mist); border-radius: 0; font-size: 0.875rem; margin-bottom: 8px; background: var(--bcn-cream); box-sizing: border-box; color: var(--bcn-ink); }
.sidebar-newsletter input[type="email"]::placeholder { color: var(--bcn-stone); }
.sidebar-newsletter button { width: 100%; padding: 8px; border-radius: 0; background: var(--bcn-ink); color: var(--bcn-cream); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; border: none; cursor: pointer; }
.sidebar-newsletter button:hover { background: var(--bcn-ink-soft); }
