/* ============================================================
   MISSION EXPO NELLAI 2026 — cinematic scroll film
   Palette: deep off-black, pure ivory, subtle gold
   ============================================================ */

:root {
  --black: #0b0a08;
  --ivory: #f7f3ea;
  --ivory-dim: rgba(247, 243, 234, 0.62);
  --gold: #c9a35c;
  --gold-soft: rgba(201, 163, 92, 0.55);
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-width: thin; scrollbar-color: var(--gold-soft) var(--black); }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-mark { color: var(--gold); font-size: 22px; margin-bottom: 26px; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
.loader-title {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.55em; text-indent: 0.55em; color: var(--ivory-dim);
  margin-bottom: 34px;
}
.loader-bar { width: 220px; height: 1px; background: rgba(247,243,234,.14); margin: 0 auto; }
.loader-fill { width: 0%; height: 100%; background: var(--gold); transition: width .3s ease; }
.loader-pct { margin-top: 16px; font-size: 10px; letter-spacing: .3em; color: var(--ivory-dim); }

/* ---------- More Details — shared button skin ---------- */
.md-btn {
  display: inline-block;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-indent: .06em; text-transform: uppercase;
  color: var(--black); text-decoration: none;
  background: var(--gold);
  padding: 13px 26px; border-radius: 999px;
  box-shadow: 0 8px 26px rgba(11,10,8,.3);
  transition: background .3s, transform .3s, box-shadow .3s;
}
.md-btn:hover {
  background: #ddb872; transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(11,10,8,.38);
}

/* Fixed corner instance — visible throughout the scroll */
#moreDetailsBtn {
  position: fixed; top: 26px; right: 30px; z-index: 60;
}
@media (max-width: 680px) {
  #moreDetailsBtn { top: 16px; right: 16px; padding: 10px 18px; font-size: 10px; }
}

/* In-flow instance at the end of the logistics section — reveals on
   scroll-into-view, then keeps a slow gold pulse to draw the eye as the
   natural final call-to-action. */
.log-more-row { text-align: center; margin: 7vh 0 0; }
.md-btn-inline {
  opacity: 0; transform: translateY(22px) scale(.96);
  transition: opacity .7s ease, transform .7s ease;
}
.md-btn-inline.in {
  opacity: 1; transform: translateY(0) scale(1);
  animation: mdPulse 2.6s ease-in-out 0.7s infinite;
}
@keyframes mdPulse {
  0%, 100% { box-shadow: 0 8px 26px rgba(11,10,8,.3), 0 0 0 0 rgba(201,163,92,.45); }
  50% { box-shadow: 0 8px 26px rgba(11,10,8,.3), 0 0 0 14px rgba(201,163,92,0); }
}

/* ---------- Fixed stage ---------- */
#stage {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 1; display: block; background: var(--black);
}
#vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(11,10,8,.55) 100%);
}
#blackout {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: var(--black); opacity: 0;
}

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}

/* Act I — Hero */
.hero-kicker {
  font-size: 10px; font-weight: 500; letter-spacing: .5em; text-indent: .5em;
  color: var(--gold); margin-bottom: 4.5vh;
}
.hero-title { position: relative; line-height: 0; }
/* Soft cloud-like glow behind the logo — lifts the dark lettering off the
   busy sky/church photo so it reads clearly without a hard panel or scrim.
   Opacity is driven explicitly by scroll position (--glow-op, set in main.js)
   rather than just riding on the parent's fade, so it's guaranteed to appear
   only at the very start of the scroll, while the church is behind it. */
.hero-title::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 118%;
  background: radial-gradient(ellipse at center,
    rgba(255,252,245,.78) 0%, rgba(255,252,245,.48) 40%,
    rgba(255,252,245,.20) 68%, rgba(255,252,245,0) 94%);
  filter: blur(20px);
  pointer-events: none;
  opacity: var(--glow-op, 1);
}
.hero-lockup {
  position: relative;
  width: min(760px, 86vw); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 6px 44px rgba(11,10,8,.55));
}
.hero-rule { width: 64px; height: 1px; background: var(--gold-soft); margin: 4vh auto 3vh; }
.hero-date {
  font-size: clamp(11px, 1.2vw, 14px); font-weight: 500;
  letter-spacing: .48em; text-indent: .48em; color: var(--ivory);
}
.hero-scroll {
  position: absolute; bottom: 4.5vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 9px; letter-spacing: .5em; text-indent: .5em; color: var(--ivory-dim);
}
.scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); animation: drop 2.4s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top } 55% { transform: scaleY(1); transform-origin: top } 56% { transform-origin: bottom } 100% { transform: scaleY(0); transform-origin: bottom } }

/* Act II — the artwork interlude (ivory backdrop, so text runs dark) */
.timeline-kicker {
  position: absolute; top: 6vh; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 600; letter-spacing: .5em; text-indent: .5em;
  color: #8a6520; opacity: 0; white-space: nowrap;
}
.timeline-caption {
  position: absolute; bottom: 6vh; left: 50%; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(18px, 2.2vw, 30px); letter-spacing: .06em;
  color: #4a331b; opacity: 0; white-space: nowrap;
}

/* Act III — Drama */
.drama-kicker {
  font-size: 10px; font-weight: 500; letter-spacing: .5em; text-indent: .5em;
  color: var(--gold); margin-bottom: 4vh;
}
.drama-title {
  font-family: var(--serif); font-weight: 600; line-height: 1.04;
  font-size: clamp(56px, 10vw, 148px); letter-spacing: .06em;
}
.drama-rule { width: 64px; height: 1px; background: var(--gold-soft); margin: 4vh auto 3.2vh; }
.drama-sub {
  font-size: clamp(11px, 1.15vw, 14px); font-weight: 400;
  letter-spacing: .42em; text-indent: .42em; color: var(--ivory-dim);
}

/* ---------- Scroll runway ---------- */
#track { position: relative; z-index: 0; }
.space { width: 100%; }

/* ---------- Act IV — Logistics ---------- */
#logistics {
  position: relative; z-index: 10;
  background: var(--ivory); color: var(--black);
  padding: 14vh 6vw 8vh;
}
.log-inner { max-width: 1180px; margin: 0 auto; }
.log-kicker {
  font-size: 10px; font-weight: 600; letter-spacing: .5em; text-indent: .5em;
  color: #a07f42; text-align: center; margin-bottom: 3vh;
}
.log-title {
  font-family: var(--serif); font-weight: 600; text-align: center;
  font-size: clamp(44px, 6vw, 84px); color: var(--black); line-height: 1;
}
.log-rule { width: 64px; height: 1px; background: #a07f42; margin: 4.5vh auto 8vh; }

.log-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(11,10,8,.14); border: 1px solid rgba(11,10,8,.14);
}
.log-card { background: var(--ivory); padding: 46px 38px 50px; }
.log-card-num {
  font-size: 11px; letter-spacing: .3em; color: #a07f42;
  margin-bottom: 26px; font-weight: 600;
}
.log-card h3 {
  font-family: var(--serif); font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600; margin-bottom: 14px; line-height: 1.15;
}
.log-card p { font-size: 14px; font-weight: 300; line-height: 1.7; color: rgba(11,10,8,.66); }

.log-cta-row {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  margin-top: 8vh; flex-wrap: wrap;
}
.cta {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--black); color: var(--ivory); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: .28em; text-indent: .28em;
  padding: 22px 44px; border: 1px solid var(--black);
  transition: background .35s ease, color .35s ease;
}
.cta:hover { background: transparent; color: var(--black); }
.cta .cta-arrow { text-indent: 0; letter-spacing: 0; transition: transform .35s ease; }
.cta:hover .cta-arrow { transform: translateX(6px); }
.cta-ghost {
  font-size: 11px; letter-spacing: .25em; text-indent: .25em; font-weight: 500;
  color: rgba(11,10,8,.55); text-decoration: none;
  border-bottom: 1px solid rgba(11,10,8,.3); padding-bottom: 6px;
  transition: color .3s ease, border-color .3s ease;
}
.cta-ghost:hover { color: #a07f42; border-color: #a07f42; }

.log-footer {
  margin-top: 12vh; padding-top: 4vh; border-top: 1px solid rgba(11,10,8,.14);
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  font-size: 9.5px; letter-spacing: .3em; color: rgba(11,10,8,.45); font-weight: 500;
}
.log-footer .dot { color: #a07f42; }

@media (max-width: 860px) {
  .log-grid { grid-template-columns: 1fr; }
  .timeline-caption { font-size: clamp(15px, 4.6vw, 22px); }
  .timeline-kicker { font-size: 9px; letter-spacing: .3em; text-indent: .3em; }
}
