/* ════════════════════════════════════════════════════════════════
   summit.css — "The Ascent"
   Immersive scroll experience: the eagle rises from the midnight
   valley to the sunrise summit. Layers on top of style.css.

   Progressive enhancement:
     • Default (no JS / reduced motion): .static-fallback is shown,
       .stage is hidden. Clean, on-brand fallback page.
     • JS adds  body.mode-interactive  → .stage shown, fallback hidden.

   Tunable constants for the motion live in js/summit.js (top of file).
   ════════════════════════════════════════════════════════════════ */

/* ── Mode switching (progressive enhancement) ─────────────────── */
.stage            { display: none; }
body.mode-interactive .stage           { display: block; }
body.mode-interactive .static-fallback { display: none; }
body.mode-interactive { background: #0a0d1d; }

/* Keep the page from side-scrolling during pin */
body.mode-interactive { overflow-x: hidden; }

/* ── The pinned stage ─────────────────────────────────────────── */
.stage {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #0a0d1d;
  color: #fff;
}

/* ── Sky (two cross-fading gradients: midnight → dawn) ─────────── */
.sky {
  position: absolute; inset: 0;
  will-change: opacity;
}
.sky--night {
  background: linear-gradient(180deg,
    #05060f 0%, #0a0d1d 34%, #11152b 62%, #1a1f36 100%);
  opacity: 1;
}
.sky--dawn {
  background: linear-gradient(180deg,
    #1a1836 0%, #3a2a52 34%, #9c5a55 68%, #e9a860 86%, #f6d488 100%);
  opacity: 0;
}

/* Sun / sunburst glow rising behind the peak (echoes the logo) */
.sun {
  position: absolute;
  left: 50%; top: 58%;
  width: 62vmax; height: 62vmax;
  margin-left: -31vmax; margin-top: -31vmax;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      rgba(246,212,136,0.95) 0%,
      rgba(240,212,136,0.55) 14%,
      rgba(201,168,76,0.22) 30%,
      rgba(201,168,76,0.0) 60%);
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}
.sun::after { /* radiating rays — the church sunburst */
  content: "";
  position: absolute; inset: -20%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(246,212,136,0.10) 0deg 3deg,
    transparent 3deg 11deg);
  mix-blend-mode: screen;
}

/* ── Parallax mountain ranges ─────────────────────────────────── */
.range {
  position: absolute;
  left: -5%; right: -5%;   /* bleed to avoid edge gaps while translating */
  bottom: 0;
  width: 110%;
  height: 200vh;           /* tall: bottom = valley, top = peak */
  will-change: transform;
  pointer-events: none;
}
.range svg, .range img { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.range svg path, .range svg polygon { transition: none; }

/* The hero peak layer carries the church name */
.peak-title {
  position: absolute;
  left: 50%; top: 24%;
  transform: translateX(-50%);
  text-align: center;
  width: 90%;
  pointer-events: none;
  z-index: 4;
}
.peak-title::before {   /* soft halo so the name reads over the ridges */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 130%; height: 320%; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(10,13,29,.55) 0%, rgba(10,13,29,.28) 40%, rgba(10,13,29,0) 70%);
  z-index: -1;
}
.peak-title .kicker {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(.7rem, 1.6vw, .95rem);
  letter-spacing: .5em; text-transform: uppercase;
  color: #f0d488; opacity: .0;
  margin-bottom: .6rem;
}
.peak-title h2 {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-weight: 900; font-stretch: 112%;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 4.4vw, 3.4rem);
  line-height: .98; letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,.45);
  opacity: 0;
}

/* ── Eagle (DOM, flies the motion path during the climb) ──────── */
.eagle-track { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.eagle-track path { fill: none; stroke: none; }

.eagle {
  position: absolute; left: 22vw; top: 86vh;
  width: clamp(300px, 44vw, 720px);   /* wide wingspan */
  transform: translate(-50%, -50%);
  z-index: 6; pointer-events: none;
  will-change: left, top, transform;
}
.eagle img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.5));
}
.eagle-glow {   /* soft gold backlight behind the body — echoes the logo's sunburst */
  position: absolute; left: 50%; top: 42%;
  width: 62%; height: 120%; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(246,212,136,.42) 0%, rgba(240,212,136,.20) 30%, rgba(201,168,76,0) 66%);
  z-index: -1; pointer-events: none;
}

/* ── Waypoint labels (clickable blocks along the trail) ───────── */
.waypoints { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.waypoint {
  position: absolute;
  pointer-events: none;   /* only the currently-visible card is clickable (see .is-visible) */
  display: flex; flex-direction: column;
  width: clamp(196px, 21vw, 252px);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10,13,29,.5);
  border: 1px solid rgba(240,212,136,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff; text-align: left;
  box-shadow: 0 8px 26px rgba(0,0,0,.34);
  opacity: 0; transform: translateY(26px) scale(.96);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1),
              border-color .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.waypoint.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.waypoint:hover, .waypoint:focus-visible {
  border-color: #f0d488;
  box-shadow: 0 14px 40px rgba(201,168,76,.4);
  outline: none;
}
/* Image / graphic slot — drop a real image at the data-img path anytime.
   Until then it shows a gold-tinted gradient + the section icon. */
/* Locked to 2:1 at every breakpoint. It used to be a height clamp, which made
   the slot drift between 1.89:1 and 2.59:1 — so the same photo cropped
   differently on desktop, tablet and phone. A fixed ratio means a 2:1 source
   image is shown whole, everywhere, with no crop at all. */
.wp-img {
  position: relative;
  width: 100%; aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, #1b2145 0%, #2b3158 55%, #3a3f68 100%);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(240,212,136,.2);
}
.wp-img::after {   /* subtle gold sheen so the placeholder reads as intentional */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 90% at 50% 0%, rgba(240,212,136,.14), transparent 62%);
}
.wp-icon { position: relative; z-index: 1; font-size: clamp(1.9rem, 4vw, 2.7rem);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45)); opacity: .92; }
.waypoint.has-img .wp-icon, .waypoint.has-img .wp-img::after { display: none; }
.wp-text { display: flex; flex-direction: column; gap: .18rem; padding: .72rem .95rem .85rem; }
.waypoint .wp-label {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-weight: 800; font-stretch: 108%;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  line-height: 1;
}
.waypoint .wp-sub {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: .76rem; color: #cbb977; letter-spacing: .02em;
}
.waypoint .wp-go {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: .72rem; color: #f0d488; opacity: 0;
  margin-top: .05rem; transition: opacity .2s;
}
.waypoint:hover .wp-go, .waypoint:focus-visible .wp-go { opacity: 1; }

/* Trail positions — snake up the mountain (top = card's top edge). Tunable. */
.waypoint[data-key="community"]  { left: 11%; top: 55%; }
.waypoint[data-key="about"]      { right: 12%; top: 48%; }
.waypoint[data-key="pastor"]     { left: 12%; top: 40%; }
.waypoint[data-key="mission"]    { right: 12%; top: 33%; }
.waypoint[data-key="live"]       { left: 14%; top: 25%; }
@media (max-width: 640px) {
  .waypoint { width: min(64vw, 240px); }
  .waypoint[data-key="community"] { left: 5%;  top: 56%; }
  .waypoint[data-key="about"]     { right: 5%; top: 50%; }
  .waypoint[data-key="pastor"]    { left: 5%;  top: 42%; }
  .waypoint[data-key="mission"]   { right: 5%; top: 34%; }
  .waypoint[data-key="live"]      { left: 6%;  top: 26%; }
}

/* ── Intro (base camp) overlay ────────────────────────────────── */
.intro {
  position: absolute; left: 0; right: 0; top: 44%; transform: translateY(-50%);
  text-align: center; z-index: 8; pointer-events: none;
  transition: opacity .5s ease;
}
.intro .welcome {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 600; text-transform: uppercase; letter-spacing: .42em;
  font-size: clamp(.8rem, 1.8vw, 1.05rem);
  color: #f0d488; margin: 0 0 .7rem .42em;
}
.intro .intro-name {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-weight: 900; font-stretch: 118%; text-transform: uppercase;
  font-size: clamp(2.2rem, 6.6vw, 4.6rem); line-height: .96; letter-spacing: .01em;
  color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.55);
}
.intro .tagline {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(.95rem, 2vw, 1.2rem); letter-spacing: .03em;
  color: #cbb977; margin-top: .9rem;
}

/* ── Starfield — fills the night sky, fades as dawn arrives ───── */
/* No z-index: DOM order places it after the sky/sun but before the
   mountain ranges, so stars sit in the sky, behind the peaks. */
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars span {
  position: absolute; border-radius: 50%; background: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,.5);
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .2 } 50% { opacity: .9 } }
@media (prefers-reduced-motion: reduce) { .stars span { animation: none; opacity: .55; } }
.intro .hint {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: .82rem; letter-spacing: .35em; text-transform: uppercase;
  color: #f0d488; margin-top: .9rem;
}
.intro .hint .arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }


/* ── Summit scrim — calm vignette so the centered finale reads ── */
.summit-scrim {
  position: absolute; inset: 0;
  z-index: 8; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse 92% 84% at 50% 50%,
    rgba(10,13,29,.5) 0%, rgba(10,13,29,.34) 42%, rgba(6,8,18,.86) 100%);
}

/* ── Summit finale — one centered composition (the payoff) ────── */
.summit-final {
  position: absolute; inset: 0; z-index: 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10vh 6vw;
  opacity: 0; transform: translateY(24px);
  pointer-events: none;
}
body.mode-interactive .summit-final.is-final { pointer-events: auto; }
.summit-final .eyebrow {
  font-family: var(--font-body, 'Inter', sans-serif);
  letter-spacing: .45em; text-transform: uppercase;
  font-size: clamp(.65rem, 1.6vw, .85rem); color: #f0d488; margin-bottom: .8rem;
}
.summit-final .final-name {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-weight: 900; font-stretch: 118%; text-transform: uppercase;
  font-size: clamp(2rem, 6.4vw, 4.6rem); line-height: .95; letter-spacing: .01em;
  color: #fff; text-shadow: 0 2px 40px rgba(0,0,0,.55);
}
.summit-final h1 {
  font-family: var(--font-display, 'Archivo', sans-serif);
  font-weight: 900; font-stretch: 118%; text-transform: uppercase;
  font-size: clamp(2.2rem, 7vw, 5rem); line-height: .95; color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,.5);
}
.summit-final .tagline {
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #e7e3d3; margin-top: 1rem; font-size: clamp(1rem, 2.4vw, 1.3rem);
}
.summit-final .svc {
  margin-top: .4rem; color: #f0d488; font-weight: 600;
  letter-spacing: .04em; font-size: clamp(.9rem, 2vw, 1.05rem);
}
.summit-final .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.summit-final .btn {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 600; padding: .9rem 1.8rem; border-radius: 999px;
  font-size: 1rem; letter-spacing: .02em; transition: transform .2s, box-shadow .2s;
}
.summit-final .btn-gold {
  background: linear-gradient(135deg,#f0d488 0%,#c9a84c 45%,#a8862f 100%);
  color: #11152b; box-shadow: 0 10px 30px rgba(201,168,76,.35);
}
.summit-final .btn-ghost { border: 1.5px solid rgba(240,212,136,.55); color: #fff; }
.summit-final .btn:hover { transform: translateY(-2px); }
.summit-final .socials { display: flex; gap: 1.3rem; margin-top: 1.6rem; }
.summit-final .socials a { color: #cbb977; transition: color .2s, transform .2s; }
.summit-final .socials a:hover { color: #f0d488; transform: translateY(-2px); }
.summit-final .socials svg { width: 24px; height: 24px; }

/* ── Fixed nav (translucent over the stage) ───────────────────── */
body.mode-interactive .nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(5,6,15,.55), rgba(5,6,15,0));
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
body.mode-interactive .nav-links a { color: rgba(255,255,255,.9); }
body.mode-interactive .nav-links a:hover { color: #f0d488; }

/* ── Progress rail ────────────────────────────────────────────── */
.progress-rail {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
  height: 40vh; width: 3px; border-radius: 3px;
  background: rgba(255,255,255,.14); z-index: 12; overflow: hidden;
}
.progress-rail span {
  position: absolute; left: 0; top: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg,#f0d488,#c9a84c);
}
@media (max-width: 640px) { .progress-rail { display: none; } }

/* ── Loading veil ─────────────────────────────────────────────── */
.veil {
  position: fixed; inset: 0; z-index: 50; background: #0a0d1d;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease;
}
.veil.gone { opacity: 0; pointer-events: none; }
.veil .mark {
  font-family: var(--font-display, 'Archivo', sans-serif);
  color: #f0d488; letter-spacing: .5em; text-transform: uppercase;
  font-size: .8rem; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
body:not(.mode-interactive) .veil { display: none; }

/* ── Reduced-motion safety ────────────────────────────────────── */
/* ── Sound toggle ─────────────────────────────────────────────── */
.sound-toggle {
  position: fixed; left: 24px; bottom: 22px; z-index: 22;
  width: 46px; height: 46px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(10,13,29,.55); color: #f0d488;
  border: 1px solid rgba(240,212,136,.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
}
body.mode-interactive .sound-toggle { display: flex; }
.sound-toggle:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(201,168,76,.35); }
.sound-toggle svg { width: 20px; height: 20px; }
.sound-toggle[aria-pressed="false"] .wave { opacity: .2; }
@media (max-width: 640px) { .sound-toggle { left: 16px; bottom: 16px; } }

@media (prefers-reduced-motion: reduce) {
  .intro .hint .arrow, .veil .mark { animation: none; }
}
