:root {
  --bg: #0c1116;
  --bg-soft: #111922;
  --panel: rgba(15, 23, 32, 0.78);
  --panel-border: rgba(231, 218, 184, 0.12);
  --text: #f4efe2;
  --text-soft: #d6cdbd;
  --text-muted: #9e988e;
  --gold: #d8b36d;
  --gold-soft: rgba(216, 179, 109, 0.18);
  --olive: #6f8063;
  --accent: #8ea77a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --max: 1180px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(216, 179, 109, 0.08), transparent 22%),
    radial-gradient(circle at top left, rgba(142, 167, 122, 0.10), transparent 18%),
    linear-gradient(180deg, #0b1015 0%, #121921 45%, #0b1116 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.02));
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  line-height: 1.75;
}

.progress-bar {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #f6ddac);
  z-index: 70;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 60;
  width: min(calc(100% - 2rem), var(--max));
  margin: 1rem auto 0;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.brand-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-nav {
  display: flex;
  gap: 1.3rem;
}

.desktop-nav a,
.mobile-nav a,
.text-link {
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.text-link:hover {
  color: var(--gold);
}

.icon-button,
.button,
.study-toggle,
.toc-link,
.verse-link,
.mode-chip {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.icon-button {
  display: none;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0.75rem auto 0;
  border-radius: 26px;
  padding: 1rem;
  gap: 0.75rem;
  flex-direction: column;
}

.mobile-nav.open {
  display: flex;
}

.section-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  padding: 7.5rem 0 4rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-size: 0.72rem;
  margin-bottom: 1rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  max-width: 12ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  max-width: 14ch;
}

h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.lede,
.section-intro p,
.feature-card p,
.approach-card p,
.chapter-intro p,
.scene-copy p,
.scene-endnote,
.reflection-text {
  color: var(--text-soft);
}

.lede {
  max-width: 54ch;
  font-size: 1.08rem;
  margin-top: 1.4rem;
}

.hero-actions,
.chapter-actions,
.scene-actions,
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #17130b;
  background: linear-gradient(180deg, #ebd4a4 0%, #d8b36d 100%);
  box-shadow: 0 12px 30px rgba(216, 179, 109, 0.28);
}

.button-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-visual {
  position: relative;
  min-height: 450px;
  display: grid;
  place-items: center;
}

.halo {
  position: absolute;
  width: min(78vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 179, 109, 0.20), rgba(216, 179, 109, 0.06) 40%, transparent 68%);
  filter: blur(6px);
}

.road-card {
  position: relative;
  width: min(100%, 420px);
  min-height: 420px;
  border-radius: var(--radius-lg);
  padding: 2rem;
  overflow: hidden;
}

.road-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 28%, rgba(216,179,109,0.06));
}

.road-line {
  position: absolute;
  left: 50%;
  top: 2rem;
  bottom: 2rem;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(216,179,109,0.85), transparent);
  transform: translateX(-50%);
}

.road-stop {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  min-width: 140px;
  text-align: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-soft);
}

.road-stop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(216,179,109,0.1);
}

.stop-1 { top: 2.8rem; }
.stop-2 { top: 8.4rem; }
.stop-3 { top: 14rem; }
.stop-4 { top: 19.6rem; }
.stop-5 { top: 25.2rem; }
.active {
  background: rgba(216,179,109,0.12);
  border-color: rgba(216,179,109,0.26);
  color: #fff7e9;
}

.section-intro {
  margin-bottom: 2rem;
}

.section-intro.narrow {
  max-width: 720px;
}

.journey-grid,
.feature-layout,
.approach-grid,
.theme-grid {
  display: grid;
  gap: 1.2rem;
}

.journey-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.journey-card,
.feature-card,
.approach-card,
.scene-card,
.sidebar-panel,
.reflection-panel,
.theme-chip,
.study-panel,
.info-panel {
  border-radius: var(--radius-md);
}

.journey-card,
.feature-card,
.approach-card,
.sidebar-panel,
.reflection-panel,
.study-panel,
.info-panel {
  padding: 1.4rem;
}

.chapter-tag,
.status-pill,
.feature-meta,
.scripture-tag,
.timeline-chip,
.mode-chip,
.verse-link,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.chapter-tag,
.feature-meta,
.timeline-chip,
.meta-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--gold);
}

.status-pill {
  background: rgba(142,167,122,0.15);
  color: #dfe7d5;
}

.featured-outline {
  outline: 1px solid rgba(216,179,109,0.25);
}

.feature-band {
  padding-top: 1rem;
}

.feature-layout,
.approach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list,
.chapter-meta {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.feature-list li,
.chapter-meta li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
  margin-bottom: 0.65rem;
}

.feature-list li::before,
.chapter-meta li::before {
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
}

.theme-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme-chip {
  padding: 1.05rem 1rem;
  text-align: center;
  color: var(--text-soft);
}

.theme-chip:hover {
  color: #fff7e9;
  border-color: rgba(216,179,109,0.25);
}

.site-footer {
  padding: 3rem 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.footer-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 0.3rem;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
}

/* Chapter pages */
.chapter-page .hero {
  padding-top: 6.5rem;
  grid-template-columns: 1fr 320px;
  align-items: start;
}

.chapter-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  padding-top: 6.5rem;
  align-items: start;
}

.chapter-hero-copy {
  max-width: 760px;
}

.chapter-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
  max-width: 11ch;
}

.chapter-subtitle {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 60ch;
}

.chapter-rail {
  position: sticky;
  top: 6.4rem;
  display: grid;
  gap: 1rem;
}

.sidebar-panel h3,
.info-panel h3,
.reflection-panel h3,
.study-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.panel-list a,
.toc-link {
  color: var(--text-soft);
}

.panel-list a:hover,
.toc-link:hover {
  color: var(--gold);
}

.toc-list {
  display: grid;
  gap: 0.7rem;
}

.mode-chip {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.mode-chip.active,
.study-toggle.active {
  background: rgba(216,179,109,0.15);
  color: #fff7e9;
  border: 1px solid rgba(216,179,109,0.22);
}

.study-toggle {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.study-panel {
  display: none;
}

body.study-mode .study-panel {
  display: block;
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.chapter-main {
  display: grid;
  gap: 1.3rem;
}

.scene-card {
  position: relative;
  padding: 1.7rem;
  overflow: hidden;
}

.scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 35%, rgba(216,179,109,0.03));
  pointer-events: none;
}

.scene-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.scene-number {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.scene-title {
  max-width: 18ch;
}

.scene-copy {
  position: relative;
  z-index: 1;
}

.verse-link,
.scripture-tag {
  color: #f1e0b5;
  background: rgba(216,179,109,0.10);
  border: 1px solid rgba(216,179,109,0.16);
}

.scripture-row,
.mode-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pull-quote,
.divider-quote {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.35;
  color: #fff6e2;
}

.pull-quote {
  margin: 1.3rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid rgba(216,179,109,0.55);
  background: rgba(255,255,255,0.03);
  border-radius: 0 16px 16px 0;
}

.scene-endnote {
  margin-top: 1.1rem;
}

.divider-block {
  padding: 3rem 1.5rem;
  text-align: center;
}

.divider-block .divider-quote {
  max-width: 24ch;
  margin: 0 auto;
}

.reflection-panel {
  margin-top: 0.4rem;
}

.reflection-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.reflection-list li {
  margin-bottom: 0.7rem;
}

.page-nav {
  justify-content: space-between;
}

.page-nav .button {
  min-width: min(100%, 220px);
}

.hidden-note {
  display: none;
}

body.study-mode .hidden-note {
  display: block;
}

.inline-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.chapter-visual {
  min-height: 290px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 1.5rem;
}

.chapter-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(216,179,109,0.24), transparent 22%),
    linear-gradient(160deg, rgba(255,255,255,0.03), transparent 35%, rgba(111,128,99,0.20));
}

.temple-lines,
.veil-lines {
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.temple-lines::before,
.temple-lines::after,
.veil-lines::before,
.veil-lines::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,0.14);
}

.temple-lines::before {
  inset: 18% 20% 18% 20%;
  border-bottom-width: 3px;
}

.temple-lines::after {
  inset: 30% 32% 18% 32%;
  border-top: 0;
}

.veil-lines::before {
  left: 50%;
  top: 14%;
  bottom: 14%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.5), transparent);
  border: 0;
}

.veil-lines::after {
  inset: 16% 16% 16% 16%;
  border-radius: 24px;
}

@media (max-width: 1100px) {
  .journey-grid,
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-hero,
  .chapter-layout,
  .chapter-page .hero,
  .feature-layout,
  .approach-grid {
    grid-template-columns: 1fr;
  }

  .chapter-rail {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .icon-button {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 6.2rem;
  }

  .feature-layout,
  .approach-grid,
  .journey-grid,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: start;
  }

  .site-header {
    top: 0.75rem;
  }

  .chapter-title,
  h1 {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header,
  .mobile-nav,
  .section-shell {
    width: min(calc(100% - 1rem), var(--max));
  }

  .site-header {
    padding: 0.75rem 0.9rem;
  }

  .scene-card,
  .journey-card,
  .feature-card,
  .approach-card,
  .sidebar-panel,
  .reflection-panel,
  .study-panel,
  .info-panel {
    padding: 1.2rem;
  }

  .hero {
    padding-top: 5.8rem;
  }

  .chapter-hero {
    padding-top: 5.8rem;
  }

  .button {
    width: 100%;
  }

  .page-nav {
    flex-direction: column;
  }
}
