/* ============== TOKENS ============== */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem;
  --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --content-narrow: 680px;
  --content-default: 920px;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Sacred night palette */
  --color-bg: #0a0e1a;
  --color-bg-2: #070a14;
  --color-surface: #11162a;
  --color-text: #e8e6df;
  --color-text-muted: #9a9b9f;
  --color-text-faint: #5e6172;
  --color-gold: #d9a441;
  --color-gold-soft: #e8c478;
  --color-gold-faint: rgba(217, 164, 65, 0.18);
  --color-line: rgba(217, 164, 65, 0.22);
}

/* ============== BASE ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.7;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; font-family: var(--font-display); font-weight: 500; }
p { text-wrap: pretty; }

::selection { background: rgba(217, 164, 65, 0.28); color: #fff; }

:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ============== LAYOUT HELPERS ============== */
.wrap { width: min(var(--content-default), 90vw); margin-inline: auto; }
.wrap-narrow { width: min(var(--content-narrow), 90vw); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.divider {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-4); margin-block: var(--space-12);
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1; max-width: 120px;
  background: linear-gradient(to var(--dir, right), transparent, var(--color-line));
}
.divider::after { --dir: left; }
.divider svg { color: var(--color-gold); opacity: 0.8; }

/* ============== REVEAL (no CLS) ============== */
.reveal { opacity: 1; }
@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    animation: fade-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}
@keyframes fade-in { to { opacity: 1; } }

/* ============== NAV ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) clamp(var(--space-4), 5vw, var(--space-12));
  transition: background var(--transition-interactive), backdrop-filter var(--transition-interactive);
}
.nav.scrolled {
  background: rgba(7, 10, 20, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 164, 65, 0.12);
}
.nav__brand { display: flex; align-items: center; gap: var(--space-3); }
.nav__logo { width: auto; height: 38px; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
@media (max-width: 720px) { .nav__logo { height: 34px; } }
.nav__brand-text { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; letter-spacing: 0.02em; }
.nav__sub { display: block; font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-text-faint); margin-top: -2px; }
.nav__links { display: flex; gap: var(--space-8); }
.nav__links a { font-size: var(--text-sm); color: var(--color-text-muted); transition: color var(--transition-interactive); }
.nav__links a:hover { color: var(--color-gold); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ============== HERO ============== */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-24) var(--space-4) var(--space-16);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
}
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, transparent 0%, rgba(10,14,26,0.55) 70%, rgba(10,14,26,0.92) 100%),
    linear-gradient(to bottom, rgba(10,14,26,0.55) 0%, transparent 30%, transparent 60%, rgba(10,14,26,0.96) 100%);
}
.hero__inner { max-width: 880px; }
.hero__eyebrow { margin-bottom: var(--space-6); }
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin-bottom: var(--space-6);
}
.hero h1 em { font-style: italic; color: var(--color-gold-soft); }
.hero__ref {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}
.hero__scroll {
  position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-text-faint);
}
.hero__scroll svg { animation: bob 2.4s var(--ease-out) infinite; }
@keyframes bob { 0%,100%{transform:translateY(0);opacity:0.5;} 50%{transform:translateY(6px);opacity:1;} }

/* ============== SCRIPTURE ============== */
.scripture {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  text-align: center;
  background: var(--color-bg-2);
}
.scripture__verse {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text);
}
.scripture__verse em { font-style: italic; color: var(--color-gold-soft); }
.scripture__cite {
  display: block; margin-top: var(--space-8);
  font-family: var(--font-body); font-size: var(--text-sm);
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-gold);
}

/* ============== SECTIONS ============== */
.section { padding-block: clamp(var(--space-20), 10vw, var(--space-32)); position: relative; }
.section__label {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.section__num {
  font-family: var(--font-display); font-size: var(--text-lg); font-style: italic;
  color: var(--color-gold); opacity: 0.7;
}
.section h2 {
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-8);
  letter-spacing: -0.01em;
}
.section h2 em { font-style: italic; color: var(--color-gold-soft); }
.section p {
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  max-width: 64ch;
  font-weight: 300;
}
.section p.muted { color: var(--color-text-muted); }

/* Pull quote */
.pullquote {
  margin-block: clamp(var(--space-16), 8vw, var(--space-24));
  text-align: center;
}
.pullquote blockquote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  font-weight: 400;
  line-height: 1.32;
  color: var(--color-gold-soft);
  max-width: 22ch;
  margin-inline: auto;
}
.pullquote blockquote::before { content: "\201C"; color: var(--color-gold); opacity: 0.5; }
.pullquote blockquote::after { content: "\201D"; color: var(--color-gold); opacity: 0.5; }

/* ============== FEATURE IMAGE BANDS ============== */
.band {
  position: relative; min-height: 70vh;
  display: flex; align-items: center;
  padding-block: var(--space-24);
  overflow: hidden;
}
.band__bg { position: absolute; inset: 0; z-index: -2; }
.band__bg img { width: 100%; height: 100%; object-fit: cover; }
.band__veil { position: absolute; inset: 0; z-index: -1; }
.band--left .band__veil {
  background: linear-gradient(to right, rgba(7,10,20,0.92) 0%, rgba(7,10,20,0.7) 40%, rgba(7,10,20,0.15) 100%);
}
.band--center .band__veil {
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(7,10,20,0.55), rgba(7,10,20,0.9));
}
.band__content { max-width: 540px; }
.band--center .band__content { max-width: 720px; text-align: center; margin-inline: auto; }
.band__content h2 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.band__content h2 em { font-style: italic; color: var(--color-gold-soft); }
.band__content p { font-size: var(--text-lg); color: var(--color-text); font-weight: 300; }
.band--center .band__content p { margin-inline: auto; }

/* ============== SONG ============== */
.song {
  position: relative;
  padding-block: clamp(var(--space-24), 12vw, var(--space-32));
  text-align: center;
  overflow: hidden;
}
.song__bg { position: absolute; inset: 0; z-index: -2; }
.song__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.song__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--color-bg) 0%, rgba(10,14,26,0.65) 35%, rgba(10,14,26,0.65) 65%, var(--color-bg) 100%);
}
.song__credit { margin-bottom: var(--space-8); }
.song__title {
  font-size: var(--text-3xl);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-12);
  color: var(--color-gold-soft);
}
.song__lyrics {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--color-text);
  font-weight: 400;
}
.song__lyrics span { display: block; }
.song__lyrics .accent { color: var(--color-gold-soft); font-style: italic; }

/* ============== TRANSCRIPT ============== */
.transcript { padding-block: clamp(var(--space-20), 10vw, var(--space-32)); background: var(--color-bg-2); }
.transcript__head { text-align: center; margin-bottom: var(--space-16); }
.transcript__head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.transcript__head p { color: var(--color-text-muted); font-size: var(--text-base); }

details.tr {
  border-top: 1px solid rgba(217,164,65,0.14);
  padding-block: var(--space-2);
}
details.tr:last-of-type { border-bottom: 1px solid rgba(217,164,65,0.14); }
details.tr summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding-block: var(--space-6);
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text);
  transition: color var(--transition-interactive);
}
details.tr summary:hover { color: var(--color-gold); }
details.tr summary::-webkit-details-marker { display: none; }
details.tr summary .chev { color: var(--color-gold); transition: transform var(--transition-interactive); flex-shrink: 0; }
details.tr[open] summary .chev { transform: rotate(180deg); }
details.tr .tr__body { padding-bottom: var(--space-8); }
details.tr .tr__body p {
  font-size: var(--text-base); color: var(--color-text-muted); margin-bottom: var(--space-4);
  font-weight: 300; line-height: 1.8; max-width: 70ch;
}
details.tr .tr__body p:last-child { margin-bottom: 0; }

.read-full {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-12);
  font-size: var(--text-sm); letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-gold); border-bottom: 1px solid var(--color-line);
  padding-bottom: 2px; transition: color var(--transition-interactive), border-color var(--transition-interactive);
}
.read-full:hover { color: var(--color-gold-soft); border-color: var(--color-gold); }
.full-text { display: none; margin-top: var(--space-12); }
.full-text.open { display: block; }
.full-text p { font-size: var(--text-base); color: var(--color-text-muted); margin-bottom: var(--space-5); font-weight: 300; line-height: 1.85; max-width: 70ch; }

/* ============== CLOSING ============== */
.closing {
  position: relative; min-height: 90vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding-block: var(--space-32); overflow: hidden;
}
.closing__bg { position: absolute; inset: 0; z-index: -2; }
.closing__bg img { width: 100%; height: 100%; object-fit: cover; }
.closing__veil {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 90% 80% at 50% 60%, transparent, rgba(10,14,26,0.6) 70%, var(--color-bg) 100%);
}
.closing__inner { max-width: 760px; }
.closing h2 {
  font-size: var(--text-3xl); font-weight: 500; line-height: 1.1; margin-bottom: var(--space-8);
}
.closing h2 em { font-style: italic; color: var(--color-gold-soft); }
.closing p { font-size: var(--text-lg); color: var(--color-text); font-weight: 300; max-width: 50ch; margin-inline: auto; }
.closing .amen {
  margin-top: var(--space-12); font-family: var(--font-display); font-style: italic;
  font-size: var(--text-xl); color: var(--color-gold); letter-spacing: 0.1em;
}

/* ============== COMMUNION ============== */
.communion {
  position: relative; overflow: hidden;
  padding-block: clamp(var(--space-24), 14vw, var(--space-32));
  text-align: center;
}
.communion__bg { position: absolute; inset: 0; z-index: -2; }
.communion__bg img { width: 100%; height: 100%; object-fit: cover; }
.communion__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 70% at 50% 55%, rgba(7,10,20,0.35) 0%, rgba(7,10,20,0.82) 70%, var(--color-bg-2) 100%),
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 22%, transparent 78%, var(--color-bg-2) 100%);
}
.communion__inner { max-width: 720px; }
.communion__eyebrow { margin-bottom: var(--space-8); }
.communion h2 {
  font-size: var(--text-3xl); font-weight: 500; line-height: 1.08;
  margin-bottom: var(--space-8);
}
.communion h2 em { font-style: italic; color: var(--color-gold-soft); }
.communion__words {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-xl); line-height: 1.45;
  color: var(--color-text); max-width: 28ch; margin: 0 auto var(--space-8);
}
.communion__invite {
  font-size: var(--text-lg); color: var(--color-text-muted);
  font-weight: 300; max-width: 52ch; margin: 0 auto var(--space-12);
}
.communion__invite strong { color: var(--color-gold-soft); font-weight: 400; }
.communion__cite {
  display: block; margin-top: var(--space-6);
  font-family: var(--font-body); font-size: var(--text-xs);
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-gold);
}

/* CTA buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body); font-size: var(--text-sm);
  letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: var(--radius-full, 9999px);
  transition: background var(--transition-interactive), color var(--transition-interactive),
              border-color var(--transition-interactive), transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.btn svg { flex-shrink: 0; }
.btn--primary {
  background: var(--color-gold); border: 1px solid var(--color-gold);
  box-shadow: 0 4px 24px rgba(217,164,65,0.25);
  font-weight: 600;
}
.btn--primary, .btn--primary svg { color: #14110a; }
.btn--primary:hover { background: var(--color-gold-soft); border-color: var(--color-gold-soft); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(217,164,65,0.35); }
.btn--primary:hover, .btn--primary:hover svg { color: #14110a; }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: rgba(255,255,255,0.04); color: var(--color-text);
  border: 1px solid var(--color-line);
}
.btn--ghost:hover { border-color: var(--color-gold); color: var(--color-gold-soft); transform: translateY(-2px); background: rgba(217,164,65,0.06); }
.btn--ghost:active { transform: translateY(0); }

/* ============== FOOTER ============== */
.footer {
  padding-block: var(--space-16) var(--space-12);
  text-align: center; border-top: 1px solid rgba(217,164,65,0.12);
  background: var(--color-bg-2);
}
.footer__brand { display: inline-flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer__logo { width: auto; height: 44px; }
.footer__brand-text { font-family: var(--font-display); font-size: var(--text-lg); }
.footer p { font-size: var(--text-sm); color: var(--color-text-faint); }
.footer a { color: var(--color-text-muted); transition: color var(--transition-interactive); }
.footer a:hover { color: var(--color-gold); }
