@import 'variables.css';

/* ============================================================================
   RESET & APP SHELL — no-scroll "continuous film"
   ============================================================================ */

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

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-serif);
  background-color: var(--color-black);
  color: var(--color-ink);
  line-height: 1.6;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

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

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

/* Gold gradient text — used for names and countdown digits */
.gold-text {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

/* ============================================================================
   PROGRESS BAR
   ============================================================================ */

.progress-bar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: flex;
  gap: 7px;
  z-index: 200;
  pointer-events: none;
}

.progress-segment {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--gradient-gold-soft);
  box-shadow: var(--glow-gold);
}

.progress-segment.done .progress-fill { width: 100%; }

.progress-segment.active .progress-fill {
  animation-name: fillProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes fillProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ============================================================================
   FILM SHELL, SCENES & TRANSITIONS
   ============================================================================ */

#film {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-black);
  cursor: pointer;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity var(--transition-scene) cubic-bezier(0.22, 1, 0.36, 1),
              transform var(--transition-scene) cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.scene.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 3;
}

.scene-light { background: var(--gradient-cream); }
.scene-blush { background: var(--gradient-blush); }
.scene-dark  { background: var(--color-black); }

.scene video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: var(--z-base);
}

/* ---------------------------------------------------------------------------
   STAGE — how a portrait (9:16-ish) clip is presented.

   Phones are portrait too, so the stage is simply full-bleed there. On a
   widescreen display, filling the viewport with a portrait clip would mean
   cover-cropping away ~72% of the frame AND upscaling the source ~1.8x, which
   is what made the video look both "zoomed" and soft. Instead the stage becomes
   a centred box at the clip's exact native ratio — nothing cropped, nothing
   stretched, and the source is displayed at or below 1:1 so it stays crisp —
   with a blurred still of the same footage filling the surrounding area so
   there are never any empty pillarbox bars.
   --------------------------------------------------------------------------- */

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.stage-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(34px) brightness(0.40) saturate(1.15);
  transform: scale(1.18);
}

.stage-backdrop-opening { background-image: url('/public/images/backdrop-opening.jpg'); }
.stage-backdrop-final   { background-image: url('/public/images/backdrop-final.jpg'); }

@media (min-width: 1024px) {
  .stage-backdrop { display: block; }

  .stage {
    position: relative;
    inset: auto;
    height: min(92vh, 1000px);
    width: auto;
    max-width: 94vw;
    border-radius: 12px;
    box-shadow:
      0 40px 110px rgba(0, 0, 0, 0.66),
      0 12px 36px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(232, 201, 120, 0.34);
  }

  /* Exact native ratios — the guarantee against any stretch or squish.
     opening-ganesh.mp4 and ganesh-loop.mp4 are both 1080x1916;
     couple-ending-loop.mp4 is 1080x1798 after the watermark crop. */
  .stage-opening { aspect-ratio: 1080 / 1916; }
  .stage-final   { aspect-ratio: 1080 / 1798; }

  /* Inside a portrait stage, size type against stage height, not viewport width */
  .stage .gilded-frame { inset: 14px; }
  .stage .hero-text { padding: 0 26px; }
  .stage .hero-name { font-size: clamp(2.2rem, 5.2vh, 3.5rem); }
  .stage .hero-invite { font-size: clamp(0.78rem, 1.5vh, 0.95rem); }
  .stage .hero-monogram { width: clamp(56px, 9vh, 88px); }
  .stage .final-overlay { padding: 40px 30px 44px; }
  .stage .final-message { font-size: clamp(0.95rem, 1.9vh, 1.2rem); }
  .stage .final-family { font-size: clamp(1.5rem, 3.6vh, 2.3rem); }
  .stage .final-content { max-width: 100%; }

  /* A portrait stage is too narrow for the names side by side */
  .stage .hero-names { flex-direction: column; gap: 2px; }
  .stage .hero-weds { margin: 4px 0; }
}

/* Ambient floating particles */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 201, 120, 0.95) 0%, rgba(232, 201, 120, 0) 70%);
  opacity: 0;
  animation: drift 22s ease-in-out infinite;
}

.particle.p1 { left: 8%;  top: 92%; animation-duration: 19s; animation-delay: 0s; }
.particle.p2 { left: 22%; top: 96%; animation-duration: 25s; animation-delay: 2s; }
.particle.p3 { left: 38%; top: 90%; animation-duration: 21s; animation-delay: 5s; }
.particle.p4 { left: 55%; top: 97%; animation-duration: 27s; animation-delay: 1s; }
.particle.p5 { left: 68%; top: 91%; animation-duration: 23s; animation-delay: 7s; }
.particle.p6 { left: 80%; top: 95%; animation-duration: 20s; animation-delay: 3s; }
.particle.p7 { left: 92%; top: 89%; animation-duration: 26s; animation-delay: 6s; }
.particle.p8 { left: 47%; top: 98%; animation-duration: 24s; animation-delay: 4s; }

@keyframes drift {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.8); }
  10%  { opacity: 0.30; }
  50%  { opacity: 0.20; transform: translate(-14px, -55vh) scale(1.15); }
  90%  { opacity: 0.10; }
  100% { opacity: 0; transform: translate(12px, -100vh) scale(0.9); }
}

/* ============================================================================
   SHARED ORNAMENTS
   ============================================================================ */

/* Monogram watermark behind every scene after the opening */
.scene-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(86vw, 560px);
  z-index: var(--z-watermark);
  pointer-events: none;
  user-select: none;
}

.scene-watermark-light {
  opacity: 0.055;
  mix-blend-mode: multiply;
  filter: saturate(0.35);
}

.scene-watermark-dark {
  opacity: 0.13;
  mix-blend-mode: screen;
  filter: saturate(0.5) brightness(1.15);
}

/* Inset gilded frame for dark/video scenes */
.gilded-frame {
  position: absolute;
  inset: clamp(10px, 2.4vw, 22px);
  border: 1px solid rgba(232, 201, 120, 0.28);
  border-radius: var(--radius-sm);
  z-index: var(--z-content);
  pointer-events: none;
}

.gilded-frame::before,
.gilded-frame::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(232, 201, 120, 0.6);
}

.gilded-frame::before {
  top: -1px; left: -1px;
  border-right: none;
  border-bottom: none;
  border-radius: var(--radius-sm) 0 0 0;
}

.gilded-frame::after {
  bottom: -1px; right: -1px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

/* Soft corner blooms for light scenes */
.corner-flourish {
  position: absolute;
  width: clamp(120px, 34vw, 260px);
  height: clamp(120px, 34vw, 260px);
  z-index: var(--z-watermark);
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(217, 142, 155, 0.28) 0%, rgba(217, 142, 155, 0) 62%),
    radial-gradient(circle at 60% 40%, rgba(232, 201, 120, 0.30) 0%, rgba(232, 201, 120, 0) 66%);
}

.corner-tl { top: 0; left: 0; }
.corner-tr { top: 0; right: 0; transform: scaleX(-1); }
.corner-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner-br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* Gold rule with a centre diamond — the card's divider motif */
.ornament-divider {
  position: relative;
  width: min(230px, 62%);
  height: 1px;
  margin: var(--spacing-md) auto;
  background: var(--gradient-gold-line);
}

.ornament-divider-light {
  background: linear-gradient(90deg, transparent 0%, rgba(242, 227, 182, 0.75) 30%, var(--color-gold-light) 50%, rgba(242, 227, 182, 0.75) 70%, transparent 100%);
}

.ornament-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gradient-gold-soft);
  box-shadow: var(--glow-gold);
}

.ornament-diamond::before,
.ornament-diamond::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%) rotate(0deg);
  background: var(--color-gold-light);
  border-radius: 50%;
}

.ornament-diamond::before { left: -13px; }
.ornament-diamond::after  { right: -13px; }

/* Small caps eyebrow label */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--spacing-sm);
}

.eyebrow-hindi {
  font-family: var(--font-devanagari);
  letter-spacing: 0.18em;
  text-transform: none;
  font-size: var(--font-size-sm);
  color: var(--color-gold-light);
}

/* ============================================================================
   SCENE-ENTER TEXT ANIMATION
   ============================================================================ */

.scene-text { opacity: 0; }

.scene-text.scene-text-in {
  animation: sceneTextIn 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sceneTextIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   SCENE 0: OPENING + GANESH LOOP
   ============================================================================ */

#ganesh-loop-video {
  opacity: 0;
  transition: opacity 900ms ease;
}

#ganesh-loop-video.visible { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--gradient-scrim);
  pointer-events: none;
}

.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(26px, 7vh, 72px);
  z-index: var(--z-content);
  padding: 0 var(--spacing-lg);
  text-align: center;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1000ms ease, transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-mantra {
  font-family: var(--font-devanagari);
  color: var(--color-gold-light);
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  margin-bottom: clamp(6px, 1.4vh, 14px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-monogram {
  width: clamp(62px, 15vw, 104px);
  height: auto;
  margin: 0 auto clamp(8px, 1.6vh, 16px);
  filter: drop-shadow(0 4px 22px rgba(232, 201, 120, 0.55)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  animation: monogramFloat 6s ease-in-out infinite;
}

@keyframes monogramFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.hero-invite {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: rgba(253, 247, 236, 0.92);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  margin-bottom: clamp(8px, 1.8vh, 18px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 400;
  line-height: 1;
}

.hero-name {
  font-family: var(--font-script);
  font-size: var(--font-size-script);
  line-height: 1.05;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
  padding: 0 0.08em;
}

.hero-weds {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-gold-pale);
  margin: clamp(2px, 0.6vh, 8px) 0;
  padding: 0 var(--spacing-lg);
}

.hero-weds::before,
.hero-weds::after {
  content: '';
  position: absolute;
  top: 50%;
  width: clamp(26px, 8vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-light));
}

.hero-weds::before { right: 100%; }
.hero-weds::after  { left: 100%; transform: scaleX(-1); }

.hero-date {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(253, 247, 236, 0.86);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

@media (min-width: 600px) {
  .hero-names {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.4vw, 18px);
  }
  .hero-weds { margin: 0; }
}

/* ============================================================================
   SCENE 1: COUNTDOWN
   ============================================================================ */

#countdown-video {
  filter: blur(6px) brightness(0.62) saturate(1.15);
  transform: scale(1.14);
}

.scene-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--gradient-night);
  pointer-events: none;
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-content);
  padding: clamp(28px, 6vw, 64px);
  text-align: center;
}

.countdown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
}

.countdown-names {
  font-family: var(--font-script);
  font-size: var(--font-size-2xl);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: clamp(10px, 2vh, 18px);
}

.countdown-names em {
  font-style: normal;
  font-size: 0.68em;
  opacity: 0.85;
  padding: 0 0.1em;
}

.date-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  width: 100%;
  margin-bottom: clamp(18px, 4vh, 38px);
}

.date-band-rule {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--gradient-gold-line);
}

.date-band-text {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-gold-pale);
  white-space: nowrap;
}

.countdown-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.2vw, 22px);
  width: 100%;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.4vh, 12px);
}

.countdown-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  max-height: 24vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: clamp(12px, 2.4vw, 20px);
  background:
    linear-gradient(160deg, rgba(255, 249, 235, 0.16) 0%, rgba(255, 249, 235, 0.05) 42%, rgba(110, 27, 42, 0.22) 100%);
  border: 1px solid rgba(232, 201, 120, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 240, 0.35),
    inset 0 -18px 34px rgba(71, 16, 28, 0.35),
    0 18px 40px rgba(8, 3, 5, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}

.countdown-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 46%);
  pointer-events: none;
}

.countdown-value {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.countdown-value.tick { animation: countdownTick 520ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes countdownTick {
  0%   { transform: scale(1); }
  32%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

.countdown-label {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(253, 247, 236, 0.78);
}

.countdown-foot {
  margin-top: clamp(16px, 3.4vh, 32px);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--font-size-sm);
  color: rgba(253, 247, 236, 0.72);
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .countdown-card { max-height: 200px; }
  .countdown-value { font-size: clamp(2.6rem, 4.4vw, 4rem); }
}

/* ============================================================================
   SCENE 2: CELEBRATION SCHEDULE
   ============================================================================ */

.schedule-container {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: 1180px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(46px, 9vh, 80px) clamp(18px, 4vw, 40px) clamp(28px, 6vh, 56px);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.5) transparent;
}

.schedule-container::-webkit-scrollbar { width: 5px; }
.schedule-container::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 39, 0.45);
  border-radius: var(--radius-full);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.section-monogram {
  width: clamp(38px, 8vw, 54px);
  margin: 0 auto clamp(8px, 1.6vh, 14px);
  filter: drop-shadow(0 4px 14px rgba(110, 27, 42, 0.18));
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-maroon);
}

.section-subtitle {
  font-family: var(--font-devanagari);
  font-size: var(--font-size-sm);
  color: var(--color-gold-deep);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.event-card {
  opacity: 0;
  transform: translateY(24px);
  border-radius: 150px 150px var(--radius-lg) var(--radius-lg);
  padding: 2px;
  background: linear-gradient(160deg, rgba(232, 201, 120, 0.95) 0%, rgba(201, 162, 39, 0.35) 30%, rgba(217, 142, 155, 0.35) 70%, rgba(232, 201, 120, 0.9) 100%);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.scene-text-in .schedule-grid .event-card:nth-child(1) { animation: cardIn 820ms cubic-bezier(0.22, 1, 0.36, 1) 160ms forwards; }
.scene-text-in .schedule-grid .event-card:nth-child(2) { animation: cardIn 820ms cubic-bezier(0.22, 1, 0.36, 1) 300ms forwards; }
.scene-text-in .schedule-grid .event-card:nth-child(3) { animation: cardIn 820ms cubic-bezier(0.22, 1, 0.36, 1) 440ms forwards; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.event-card-inner {
  position: relative;
  height: 100%;
  border-radius: 148px 148px 18px 18px;
  padding: clamp(52px, 9vw, 64px) clamp(20px, 4vw, 28px) clamp(22px, 4vw, 30px);
  text-align: center;
  background: linear-gradient(175deg, #FFFDF8 0%, var(--color-parchment) 46%, #F6E7D4 100%);
  overflow: hidden;
}

.event-card-inner::after {
  content: '';
  position: absolute;
  inset: 10px 10px 10px 10px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 140px 140px 12px 12px;
  pointer-events: none;
}

.event-card-feature .event-card-inner {
  background: linear-gradient(175deg, #FFF9F0 0%, #FBEBDA 44%, #F6DCD3 100%);
}

.event-badge {
  position: absolute;
  top: clamp(14px, 3vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 9vw, 54px);
  height: clamp(44px, 9vw, 54px);
  border-radius: 50%;
  background: var(--gradient-gold);
  color: #3B2606;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-md);
  line-height: 1;
  box-shadow: 0 6px 18px rgba(166, 124, 30, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.event-badge small {
  font-size: 0.42em;
  letter-spacing: 0.14em;
  margin-top: 2px;
  opacity: 0.85;
}

.event-day {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-bottom: var(--spacing-sm);
}

.event-name {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: 1.32;
  color: var(--color-maroon);
  letter-spacing: 0.03em;
}

.event-name-hindi {
  font-family: var(--font-devanagari);
  font-size: var(--font-size-sm);
  color: var(--color-maroon-soft);
  margin-top: 4px;
}

.event-rule {
  display: block;
  width: 60px;
  height: 1px;
  margin: clamp(10px, 2vh, 16px) auto;
  background: var(--gradient-gold-line);
}

.event-time {
  font-family: var(--font-serif);
  font-size: var(--font-size-base);
  color: var(--color-ink);
}

.event-time-strong {
  font-weight: 600;
  color: var(--color-maroon);
}

.event-venue {
  font-family: var(--font-serif);
  font-size: var(--font-size-sm);
  color: rgba(58, 34, 38, 0.78);
  line-height: 1.6;
  margin-top: var(--spacing-sm);
}

.maps-button {
  display: inline-block;
  margin-top: clamp(14px, 2.6vh, 20px);
  padding: 10px 22px;
  background: var(--gradient-gold);
  color: #3B2606;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  box-shadow: 0 8px 20px rgba(166, 124, 30, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  cursor: pointer;
}

.maps-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px rgba(166, 124, 30, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

@media (min-width: 860px) {
  .schedule-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================================
   SCENE 3: THE COUPLE
   ============================================================================ */

.couple-content {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: 1080px;
  max-height: 100%;
  overflow-y: auto;
  text-align: center;
  padding: clamp(46px, 8vh, 72px) clamp(20px, 5vw, 48px) clamp(26px, 5vh, 52px);
  scrollbar-width: none;
}

.couple-content::-webkit-scrollbar { display: none; }

.couple-title {
  font-family: var(--font-script);
  font-size: var(--font-size-2xl);
  font-weight: 400;
  line-height: 1.16;
  background: linear-gradient(135deg, var(--color-maroon) 0%, var(--color-maroon-soft) 45%, var(--color-gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.couple-title em {
  font-style: normal;
  font-size: 0.66em;
  opacity: 0.8;
}

.couple-gallery {
  position: relative;
  display: flex;
  justify-content: center;
  margin: clamp(18px, 3.4vh, 34px) 0 clamp(20px, 3.6vh, 36px);
}

.couple-frame {
  position: relative;
  border-radius: var(--radius-arch);
  overflow: hidden;
  background: var(--color-white);
  padding: 6px;
  box-shadow: var(--shadow-card);
}

.couple-frame::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 1px solid rgba(232, 201, 120, 0.75);
  pointer-events: none;
  z-index: 2;
}

.couple-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: inherit;
}

.couple-frame-main {
  height: clamp(230px, 38vh, 400px);
  aspect-ratio: 3 / 4;
  background: linear-gradient(150deg, #FFFFFF 0%, var(--color-parchment) 100%);
  box-shadow: 0 26px 60px rgba(71, 16, 28, 0.22), 0 6px 16px rgba(71, 16, 28, 0.12);
}

.couple-frame-main .couple-image {
  animation: kenBurns 22s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}

.couple-frame-accent {
  position: absolute;
  right: clamp(2px, 6vw, 60px);
  bottom: clamp(-14px, -2vh, -8px);
  height: clamp(96px, 16vh, 168px);
  aspect-ratio: 3 / 4;
  transform: rotate(4deg);
  z-index: 3;
  box-shadow: 0 18px 40px rgba(71, 16, 28, 0.26);
  transition: transform var(--transition-slow);
}

.couple-frame-accent:hover { transform: rotate(0deg) scale(1.04); }

.couple-message {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--font-size-md);
  font-weight: 300;
  color: var(--color-maroon);
  line-height: 1.8;
  max-width: 34ch;
  margin: 0 auto;
}

@media (min-width: 860px) {
  .couple-gallery {
    justify-content: center;
    gap: clamp(20px, 4vw, 46px);
  }
  .couple-frame-main { height: clamp(300px, 46vh, 440px); }
  .couple-frame-accent {
    position: static;
    height: clamp(210px, 34vh, 330px);
    align-self: flex-end;
    transform: rotate(3deg);
  }
}

/* ============================================================================
   SCENE 4: FINAL INVITATION
   ============================================================================ */

.final-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(90% 60% at 50% 12%, rgba(20, 9, 12, 0) 0%, rgba(20, 9, 12, 0.35) 70%, rgba(20, 9, 12, 0.6) 100%),
    var(--gradient-scrim);
  pointer-events: none;
}

#ending-video-alt {
  opacity: 0;
  transition: opacity 600ms linear;
}

#ending-video-alt.crossfade-in { opacity: 1; }

.final-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: var(--z-content);
  padding: clamp(34px, 7vw, 64px) clamp(20px, 5vw, 48px) clamp(34px, 7vh, 68px);
  text-align: center;
}

.final-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 620px;
}

.final-message {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--font-size-md);
  color: rgba(253, 247, 236, 0.95);
  line-height: 1.8;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.final-regards {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(253, 247, 236, 0.8);
  margin-bottom: 6px;
}

.final-family {
  font-family: var(--font-script);
  font-size: var(--font-size-xl);
  line-height: 1.2;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.6));
}

.final-monogram {
  width: clamp(34px, 7vw, 46px);
  margin: clamp(10px, 2vh, 18px) auto;
  opacity: 0.92;
  filter: drop-shadow(0 3px 14px rgba(232, 201, 120, 0.5));
}

.final-closing {
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  color: rgba(253, 247, 236, 0.86);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.replay-button {
  margin-top: clamp(18px, 3.4vh, 30px);
  padding: 12px 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(232, 201, 120, 0.14), rgba(201, 162, 39, 0.06));
  border: 1px solid rgba(232, 201, 120, 0.65);
  color: var(--color-gold-pale);
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 26px rgba(8, 3, 5, 0.45);
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
}

.replay-button:hover {
  background: var(--gradient-gold);
  color: #3B2606;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(166, 124, 30, 0.4);
}

/* ============================================================================
   SHORT-VIEWPORT TUNING
   ============================================================================ */

@media (max-height: 680px) {
  .hero-monogram { width: clamp(48px, 11vw, 72px); }
  .hero-invite { font-size: var(--font-size-xs); }
  .countdown-card { max-height: 19vh; }
  .couple-frame-main { height: clamp(180px, 32vh, 260px); }
}

/* ============================================================================
   UTILITY
   ============================================================================ */

.hidden { display: none !important; }
