/* Kedarnath Wedding — continuous scroll-video journey */

:root {
  --ink: #0a1218;
  --sky: #1a2a35;
  --ivory: #f3ede3;
  --ivory-soft: rgba(243, 237, 227, 0.82);
  --gold: #c4a035;
  --gold-light: #e8d5a3;
  --maroon: #5c1a24;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Cinzel', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Montserrat', system-ui, sans-serif;
}

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

html {
  background: var(--ink);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-body);
  background: var(--ink);
  overflow-x: hidden;
  min-height: 100dvh;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ol, ul { list-style: none; }

/* Atmosphere */
.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 1.25rem;
  justify-items: center;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #1a3344 0%, var(--ink) 70%);
  transition: transform 0.85s var(--ease-out), opacity 0.55s ease;
}

.loader.is-done {
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
}

.loader-mark {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.loader-track {
  width: min(200px, 50vw);
  height: 1px;
  background: rgba(243, 237, 227, 0.15);
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.15s linear;
}

.loader-pct {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ivory-soft);
}

/* Progress rail */
.rail {
  position: fixed;
  right: clamp(0.65rem, 2vw, 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 2px;
  height: min(120px, 22vh);
  pointer-events: none;
}

.rail-track {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(243, 237, 227, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.rail-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--gold);
  border-radius: 2px;
  transition: height 0.08s linear;
}

/* Journey — frame-based scroll film */
#experience { width: 100%; }

.journey {
  height: 950svh;
  background: var(--ink);
  color: var(--ivory);
}

.journey-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  touch-action: none;
}

.film-region {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}

#journey-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.chapter-nav {
  position: absolute;
  right: clamp(0.65rem, 2vw, 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chapter-nav button {
  border: 0;
  background: none;
  min-height: 36px;
  width: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.chapter-nav i {
  display: block;
  height: 1px;
  width: 8px;
  background: rgba(196, 160, 53, 0.5);
}

.chapter-nav button[aria-current="step"] span {
  color: var(--gold);
}

.journey-footer {
  position: absolute;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.journey-footer .scroll-cue {
  pointer-events: auto;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  cursor: pointer;
}

.chapter-caption {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 237, 227, 0.75);
}

.chapter-caption b {
  color: var(--gold);
  margin-right: 0.5em;
}

.media-status {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-align: center;
}

.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 12;
  background: rgba(243, 237, 227, 0.12);
  pointer-events: none;
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gold);
}

html.static-journey .journey { height: auto; }
html.static-journey .journey-stage { position: relative; }
html.static-journey .chapter-nav { visibility: hidden; }

.stage {
  position: absolute;
  inset: 0;
  background: #000;
}

.film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
}

.film.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 10, 14, 0.72) 0%, rgba(6, 10, 14, 0.28) 22%, rgba(6, 10, 14, 0.18) 48%, rgba(6, 10, 14, 0.32) 72%, rgba(6, 10, 14, 0.78) 100%),
    radial-gradient(ellipse 85% 65% at 50% 50%, rgba(6, 10, 14, 0.15) 0%, rgba(6, 10, 14, 0.55) 100%);
}

/* Overlay copy */
.copy-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.copy-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  isolation: isolate;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* A soft contrast field keeps type readable while leaving the footage visible. */
.copy-panel::before {
  content: '';
  position: absolute;
  inset: 10% -12%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 62% 46% at 50% 50%,
    rgba(4, 8, 11, 0.56) 0%,
    rgba(4, 8, 11, 0.3) 42%,
    rgba(4, 8, 11, 0) 78%
  );
}

.copy-panel > * { position: relative; z-index: 1; }

.copy-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: clamp(0.6rem, 1.8vw, 0.72rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 12px rgba(0, 0, 0, 0.9);
}

.names {
  font-family: var(--font-script);
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 1),
    0 5px 18px rgba(0, 0, 0, 0.9),
    0 0 34px rgba(0, 0, 0, 0.72);
}

.names .amp {
  font-family: var(--font-display);
  font-size: 0.38em;
  color: var(--gold-light);
  margin: 0 0.1em;
  vertical-align: middle;
}

.lede {
  font-family: var(--font-ui);
  font-size: clamp(0.65rem, 2vw, 0.78rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 10px rgba(0, 0, 0, 0.88);
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1rem, 4vh, 2rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.75;
  animation: float-hint 2.4s ease-in-out infinite;
}

.scroll-hint span:first-child {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.scroll-line {
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
}

@keyframes float-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* Invite panel */
.copy-panel--invite {
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
  left: 0;
  right: 0;
}

.copy-panel--invite::before,
.copy-panel--countdown::before {
  inset: 18% -8%;
  background: radial-gradient(
    ellipse 54% 48% at 50% 50%,
    rgba(4, 8, 11, 0.62) 0%,
    rgba(4, 8, 11, 0.32) 46%,
    rgba(4, 8, 11, 0) 78%
  );
}

.headline-script {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--gold-light);
  line-height: 1;
  margin: 0.35rem 0 0.5rem;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 1), 0 4px 16px rgba(0, 0, 0, 0.9);
}

.invite-text {
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  line-height: 1.55;
  color: rgba(243, 237, 227, 0.95);
  max-width: 28em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 11px rgba(0, 0, 0, 0.9);
}

.parents {
  font-size: clamp(0.78rem, 2.1vw, 0.88rem);
  line-height: 1.55;
  color: rgba(243, 237, 227, 0.88);
  margin: 0.85rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 10px rgba(0, 0, 0, 0.82);
}

.parents p + p { margin-top: 0.2rem; }

.names-inline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  color: #fff;
  letter-spacing: 0.04em;
}

.names-inline .amp {
  color: var(--gold);
  margin: 0 0.25em;
}

/* Events panel */
.copy-panel--events-intro {
  align-items: stretch;
  justify-content: center;
  padding-top: clamp(3rem, 12vh, 6rem);
}

.copy-panel--events-intro::before,
.copy-panel--story::before {
  inset: 8% -10%;
  background: radial-gradient(
    ellipse 56% 62% at 50% 50%,
    rgba(4, 8, 11, 0.62) 0%,
    rgba(4, 8, 11, 0.34) 44%,
    rgba(4, 8, 11, 0) 78%
  );
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 1), 0 4px 16px rgba(0, 0, 0, 0.9);
}

.itinerary {
  width: min(100%, 480px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.itinerary li {
  padding: 0.25rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 10px rgba(0, 0, 0, 0.82);
}

.itinerary time {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.itinerary strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.itinerary span {
  font-size: 0.82rem;
  color: rgba(243, 237, 227, 0.86);
  line-height: 1.4;
}

/* Story panel */
.copy-panel--story {
  justify-content: flex-start;
  padding-top: clamp(3.5rem, 14vh, 7rem);
  max-width: 520px;
  margin: 0 auto;
  left: 0;
  right: 0;
  text-align: left;
}

.story-body p {
  font-size: clamp(0.85rem, 2.3vw, 0.95rem);
  line-height: 1.65;
  color: rgba(243, 237, 227, 0.92);
  margin-bottom: 0.65rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 11px rgba(0, 0, 0, 0.9);
}

.story-body p:last-child { margin-bottom: 0; }

/* Countdown panel */
.copy-panel--countdown .countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  width: min(100%, 360px);
  margin-top: 0.5rem;
}

.countdown-unit {
  padding: 0.35rem 0.35rem;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 10px rgba(0, 0, 0, 0.88);
}

.countdown-unit + .countdown-unit {
  border-left: 1px solid rgba(232, 213, 163, 0.42);
}

.countdown-unit span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.55rem);
  color: var(--gold-light);
}

.countdown-unit small {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 237, 227, 0.82);
}

/* RSVP panel */
.copy-panel--rsvp {
  justify-content: flex-end;
  padding-bottom: clamp(2rem, 8vh, 4rem);
}

.copy-panel--rsvp::before {
  inset: 48% -10% -8%;
  background: radial-gradient(
    ellipse 64% 48% at 50% 78%,
    rgba(4, 8, 11, 0.68) 0%,
    rgba(4, 8, 11, 0.3) 52%,
    rgba(4, 8, 11, 0) 82%
  );
}

.rsvp-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(100%, 280px);
  margin: 1.1rem 0 0.75rem;
}

.btn {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.btn-instagram {
  background: rgba(0, 0, 0, 0.35);
  color: var(--gold-light);
  border: 1px solid var(--gold-light);
}

.footer-blessing {
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(243, 237, 227, 0.6);
  color: rgba(243, 237, 227, 0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 3px 10px rgba(0, 0, 0, 0.82);
}

/* Tablet */
@media (min-width: 768px) {
  .copy-panel--events-intro .itinerary {
    max-width: 560px;
  }

  .countdown-unit {
    padding: 0.45rem 0.45rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .copy-panel--hero { align-items: flex-start; text-align: left; padding-left: clamp(2rem, 8vw, 6rem); }
  .copy-panel--invite { align-items: center; }
  .copy-panel--story { align-items: flex-start; padding-left: clamp(2rem, 8vw, 6rem); text-align: left; }
  .copy-panel--countdown { align-items: center; }
  .copy-panel--rsvp { align-items: center; padding-bottom: clamp(2.5rem, 10vh, 5rem); }

  .rail { height: min(160px, 28vh); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
  .film { transition: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .copy-panel { opacity: 1; visibility: visible; position: relative; min-height: 100vh; }
  .journey { height: auto; min-height: 100vh; }
  .stage { position: relative; height: 100vh; }
  .copy-layer { position: relative; }
  .copy-panel:not(:first-child) { margin-top: 2rem; }
}
