/* ============================================================================
   FAITH THAT WORKS — A study through the book of James · Project 33 Ministry
   Design system: "Summit & Dawn" (dark) — warm daybreak over dark mountains.
   ----------------------------------------------------------------------------
   1 Tokens · 2 Reset/base · 3 Type · 4 Layout · 5 Nav · 6 Hero · 7 Jump-nav
   8 Reading blocks · 9 Group/thread · 10 Footer · 11 Progress/UI · 12 Reveal
   13 Responsive
   ========================================================================== */

/* -------------------------------------------------- 1. TOKENS ------------ */
:root {
  /* dark slate grounds, warm-leaning */
  --paper:     #14161c;
  --paper-2:   #1a1d25;
  --card:      #1e222b;
  --raised:    #242835;

  /* text */
  --ink:       #ece5d8;
  --ink-soft:  #cdc5b6;
  --ink-faint: #948b7c;
  --ink-ghost: #6f6759;

  /* dawn accents */
  --sun:        #f0a836;
  --sun-bright: #ffc862;
  --ember:      #e57632;
  --ember-deep: #c85a20;
  --peak:       #33475b;
  --peak-deep:  #1d2937;
  --peak-mid:   #405770;

  /* lines */
  --rule:      rgba(236,229,216,0.12);
  --rule-soft: rgba(236,229,216,0.065);
  --rule-warm: rgba(240,168,54,0.34);
  --gold-line: rgba(240,168,54,0.42);

  /* shadow */
  --shadow:    0 22px 55px rgba(0,0,0,0.5);
  --shadow-sm: 0 6px 22px rgba(0,0,0,0.38);
  --ring:      0 0 0 3px rgba(240,168,54,0.45);

  /* type */
  --f-display: 'Montserrat', system-ui, 'Segoe UI', sans-serif;
  --f-read:    'Spectral', Georgia, 'Times New Roman', serif;
  --f-ui:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --maxw:    1180px;
  --measure: 44rem;
  --radius:  10px;
  --radius-lg: 16px;
  --nav-h:   62px;
}

/* -------------------------------------------------- 2. RESET / BASE ------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 58px); }
body {
  margin: 0;
  font-family: var(--f-read);
  font-size: 1.14rem;
  line-height: 1.78;
  color: var(--ink-soft);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 55% at 100% 0%, rgba(240,168,54,0.06), transparent 55%),
    radial-gradient(100% 50% at 0% 6%, rgba(229,118,50,0.045), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
::selection { background: rgba(240,168,54,0.30); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* -------------------------------------------------- 3. TYPOGRAPHY -------- */
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); line-height: 1.14; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3.3vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; color: var(--sun-bright); }
h4 { font-size: 1.02rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sun); }
p { margin: 0 0 1.2em; }
a { color: var(--sun-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule-warm); transition: color .15s; }
a:hover { color: var(--sun); }
strong, b { font-weight: 600; color: var(--ink); }
em, i { font-style: italic; }
.lead { font-size: clamp(1.18rem, 1.9vw, 1.4rem); line-height: 1.62; color: var(--ink); }

/* -------------------------------------------------- 4. LAYOUT ----------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.2rem, 5vw, 3rem); }
.reading { max-width: var(--measure); margin-inline: auto; }
.center { text-align: center; }

.movement { padding-block: clamp(2.4rem, 5vw, 3.6rem); scroll-margin-top: calc(var(--nav-h) + 64px); }
.movement + .movement { border-top: 1px solid var(--rule-soft); }
.passage { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--f-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sun); margin-bottom: 0.7rem; }
.passage::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--ember), var(--sun)); border-radius: 2px; }
.movement h2 { margin-bottom: 0.6rem; }

.drop::first-letter { font-family: var(--f-display); font-weight: 900; font-size: 3.5rem; line-height: 0.74; float: left; margin: 0.06em 0.12em 0 0; color: var(--sun); }

.section-rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); margin: 0 auto; max-width: var(--measure); }

/* -------------------------------------------------- 5. NAV -------------- */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(20,22,28,0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.site-nav .bar { max-width: var(--maxw); margin-inline: auto; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding-inline: clamp(1.2rem, 5vw, 3rem); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand-title { font-family: var(--f-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); letter-spacing: 0.01em; line-height: 1; }
.brand-sub { font-family: var(--f-ui); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.nav-right { font-family: var(--f-ui); font-size: 0.82rem; font-weight: 600; }
.nav-right a { color: var(--ink-soft); text-decoration: none; }
.nav-right a:hover { color: var(--sun); }

/* -------------------------------------------------- 6. HERO ------------- */
.hero { position: relative; overflow: hidden; min-height: clamp(480px, 78vh, 700px); display: flex; align-items: center;
  background: linear-gradient(178deg, #ffdd94 0%, #ffb84d 24%, #ef8a2c 42%, #cf5a22 56%, #7c3f2e 70%, #34435a 86%, #171b23 100%); }
.hero .sun { position: absolute; top: 13%; right: 16%; width: min(30vw, 230px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,247,224,0.95) 0%, rgba(255,220,140,0.7) 38%, rgba(255,190,90,0) 70%); }
.hero .ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; display: block; }
.hero .wrap { position: relative; z-index: 3; padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(8rem, 20vw, 13rem); }

/* promo-style title box (kept light, like the promo) */
.hero-card { display: inline-block; background: #f6efe1; padding: 0.5rem 1.4rem 0.75rem; border-radius: 6px; position: relative; box-shadow: 0 18px 50px rgba(0,0,0,0.4); }
.hero-card::after { content: ""; position: absolute; left: 42px; bottom: -16px; border-width: 16px 14px 0 0; border-style: solid; border-color: #f6efe1 transparent transparent transparent; }
.hero-card h1 { font-family: var(--f-display); font-weight: 900; color: #1a1f28; line-height: 0.92; letter-spacing: -0.02em; margin: 0; font-size: clamp(2.7rem, 9vw, 5.4rem); text-transform: uppercase; }
.hero-sub { margin-top: 1.8rem; max-width: 30rem; font-family: var(--f-read); font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.5; color: #fff; text-shadow: 0 2px 14px rgba(20,12,6,0.6); }
.hero-meta { margin-top: 1.6rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; font-family: var(--f-ui); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; color: #fff; }
.hero-meta .pill { display: inline-flex; align-items: center; gap: 0.45rem; background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.32); padding: 0.35rem 0.85rem; border-radius: 999px; backdrop-filter: blur(4px); }
.hero-brand { position: absolute; left: 0; right: 0; bottom: clamp(1.1rem, 3vw, 2rem); z-index: 3; text-align: center; font-family: var(--f-display); font-weight: 700; font-size: clamp(0.8rem, 2.4vw, 1.1rem); letter-spacing: 0.42em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.hero-brand a { color: inherit; text-decoration: none; }
.hero-brand a:hover { color: #fff; }

/* -------------------------------------------------- 7. JUMP-NAV --------- */
.jump { position: sticky; top: var(--nav-h); z-index: 90; background: rgba(17,20,26,0.96); border-bottom: 1px solid var(--rule); }
.jump .bar { max-width: 1320px; margin-inline: auto; display: flex; gap: 0.15rem; overflow-x: auto; padding: 0.4rem clamp(1rem, 5vw, 2rem); scrollbar-width: thin; scrollbar-color: var(--sun) transparent; }
.jump a { font-family: var(--f-ui); font-size: 0.78rem; font-weight: 600; white-space: nowrap; color: var(--ink-faint); text-decoration: none; padding: 0.4rem 0.8rem; border-radius: 999px; transition: background .15s, color .15s; }
.jump a:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.jump a.active { color: #17130a; background: var(--sun-bright); }

/* -------------------------------------------------- 8. READING BLOCKS --- */
.intro-band { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--rule); padding-block: clamp(2.2rem, 5vw, 3.4rem); }

.scripture { position: relative; margin: 1.8rem 0; padding: 1.2rem 1.5rem 1.2rem 1.7rem; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--ember); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow-sm); }
.scripture p { font-family: var(--f-read); font-size: 1.12rem; font-style: italic; color: var(--ink); margin: 0; line-height: 1.62; }
.scripture .vn { font-family: var(--f-ui); font-style: normal; font-size: 0.6rem; font-weight: 700; color: var(--sun); vertical-align: super; margin: 0 0.15rem 0 0.1rem; }
.scripture cite { display: block; margin-top: 0.7rem; font-style: normal; font-family: var(--f-ui); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--sun); }
.scripture.big p { font-size: clamp(1.2rem, 2.2vw, 1.48rem); }

.pullquote { margin: 2.2rem auto; max-width: 38rem; text-align: center; font-family: var(--f-read); font-style: italic; font-weight: 500; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.34; color: var(--sun-bright); }
.pullquote::before { content: "\201C"; display: block; font-family: var(--f-display); font-weight: 900; font-size: 2.6rem; color: var(--ember); line-height: 0.5; margin-bottom: 0.35rem; }

/* -------------------------------------------------- 9. GROUP / THREAD --- */
.group { margin: 2rem 0; background: linear-gradient(180deg, var(--raised), var(--paper-2)); border: 1px solid var(--gold-line); border-radius: var(--radius-lg); padding: 1.3rem 1.5rem 1.4rem; box-shadow: var(--shadow-sm); }
.group .gh { display: flex; align-items: center; gap: 0.6rem; font-family: var(--f-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sun-bright); margin-bottom: 0.7rem; }
.group .gh svg { width: 18px; height: 18px; flex: none; color: var(--sun); }
.group ol, .group ul { margin: 0; padding-left: 1.2rem; }
.group li { margin-bottom: 0.55rem; color: var(--ink-soft); }
.group li:last-child { margin-bottom: 0; }
.group li::marker { color: var(--sun); }

.thread { margin: 1.6rem 0; padding: 1rem 1.15rem; background: rgba(240,168,54,0.07); border: 1px solid var(--gold-line); border-radius: var(--radius); font-size: 1rem; line-height: 1.62; color: var(--ink-soft); }
.thread .tl { display: block; font-family: var(--f-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sun); margin-bottom: 0.4rem; }
.thread b { color: var(--ink); }

.ref-tag { font-family: var(--f-ui); font-size: 0.78rem; font-weight: 600; color: var(--ink-faint); }

/* -------------------------------------------------- 10. FOOTER ---------- */
.site-foot { margin-top: 1.5rem; background: linear-gradient(180deg, #1b222c 0%, #10141a 100%); color: var(--ink-faint); padding-block: 3rem 2.2rem; border-top: 1px solid var(--rule); }
.site-foot .wrap { text-align: center; }
.foot-mark { width: 40px; height: 40px; margin: 0 auto 0.8rem; display: block; }
.foot-brand { font-family: var(--f-display); font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; font-size: 0.95rem; color: var(--ink); }
.foot-tag { font-family: var(--f-read); font-style: italic; color: var(--ink-faint); margin-top: 0.3rem; }
.site-foot a { color: var(--sun-bright); text-decoration: none; }
.site-foot a:hover { color: var(--sun); text-decoration: underline; }
.foot-copy { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-family: var(--f-ui); font-size: 0.76rem; line-height: 1.65; color: var(--ink-ghost); }
.foot-copy p { margin: 0 0 0.5rem; }

/* -------------------------------------------------- 11. PROGRESS / UI --- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--sun), var(--ember)); z-index: 200; transition: width .1s linear; }
.to-top { position: fixed; right: 1.3rem; bottom: 1.3rem; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--ember); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, background .2s; z-index: 120; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--sun); color: #17130a; }

/* -------------------------------------------------- 12. REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* -------------------------------------------------- 13. RESPONSIVE ------ */
@media (max-width: 720px) {
  body { font-size: 1.06rem; }
  .brand-sub { display: none; }
  .hero-card h1 { font-size: clamp(2.4rem, 13vw, 3.6rem); }
  .hero .sun { top: 10%; right: 8%; }
}
