/* ════════════════════════════════════════════
   CSS Variables
   ════════════════════════════════════════════ */
:root {
  --ivory: #fff8ec;
  --warm-ivory: #f7ead6;
  --champagne: #d9b86c;
  --soft-gold: #c9a24d;
  --deep-gold: #8f6b22;
  --wine: #7e0f24;
  --ruby: #b01831;
  --ink: #3d1f0d;
  --shadow: rgba(56, 31, 19, 0.22);
  --envelope-width: clamp(18rem, 36vw, 29.5rem);
  --envelope-radius: clamp(0.85rem, 2vw, 1.25rem);
}


/* ════════════════════════════════════════════
   Reset & Base
   ════════════════════════════════════════════ */
* {
  box-sizing: border-box;
  /* font-family: "Cormorant Garamond", Georgia, serif; */
}

/* ── Premium Font Utility Classes ── */
.font-cinzel   { font-family: "Cinzel", "Trajan Pro", serif; }
.font-script   { font-family: "Great Vibes", cursive; }
.font-body     { font-family: "Cormorant Garamond", Georgia, serif; }

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  /* Match the stage gradient so the page beneath the fixed intro gate
     matches the stage that scrolls into view. Avoids a flash of plain
     ivory through the cell gaps as they peel out. */
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 229, 0.88), transparent 28rem),
    linear-gradient(135deg, #f8ead1 0%, #efe0c4 48%, #dcc49b 100%);
  background-attachment: fixed;
}

body.intro-complete {
  /* once the intro runway is consumed, regular page scroll is in effect */
}

button {
  font: inherit;
}


/* ════════════════════════════════════════════
   Intro Gate — Scroll-Linked Runway
   The runway is a tall scroll track. The gate is sticky inside it
   and stays pinned while the user scrolls. JS writes a 0→1 progress
   into --p on .intro-gate; child elements interpolate everything
   off that single variable, so the disintegration tracks scroll
   pixel-for-pixel. No transitions, no setTimeout — scroll IS the
   timeline, which is what makes it feel buttery.
   ════════════════════════════════════════════ */
.intro-runway {
  position: relative;
  width: 100%;
  height: 100vh; /* scroll length consumed by the disintegration */
  z-index: 100;
  background: #060300; /* dark backdrop — shows through transparent gate as cells peel, prevents ivory flash */
}

.intro-gate {
  --p: 0;
  --p-fg: clamp(0, calc(var(--p) * 1.25), 1);   /* foreground leads slightly */
  --p1:   clamp(0, calc((var(--p) - 0.00) * 1.55), 1);
  --p2:   clamp(0, calc((var(--p) - 0.10) * 1.55), 1);
  --p3:   clamp(0, calc((var(--p) - 0.20) * 1.55), 1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: transparent;
  z-index: 200;
}

.intro-gate.is-done {
  visibility: hidden;
  pointer-events: none;
}

/* ── Background: 3 horizontal rows, B&W ── */
.intro-bg-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-columns: 1fr;
}

.intro-bg-cell {
  overflow: hidden;
  position: relative;
  will-change: transform, opacity, filter;
}

.intro-bg-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%) brightness(0.55);
}

/* Per-row scroll-driven peel-out — staggered via --p1/--p2/--p3.
   Rows 1 & 3 slide left, row 2 slides right, all dim and blur. */
.intro-bg-cell--1 {
  transform: translate3d(calc(var(--p1) * -110%), 0, 0)
             scale(calc(1 - var(--p1) * 0.18))
             rotate(calc(var(--p1) * -3deg));
  opacity: calc(1 - var(--p1));
  filter: grayscale(100%)
          brightness(calc(0.55 - var(--p1) * 0.45))
          blur(calc(var(--p1) * 14px));
}
.intro-bg-cell--2 {
  transform: translate3d(calc(var(--p2) *  110%), 0, 0)
             scale(calc(1 - var(--p2) * 0.18))
             rotate(calc(var(--p2) *  3deg));
  opacity: calc(1 - var(--p2));
  filter: grayscale(100%)
          brightness(calc(0.55 - var(--p2) * 0.45))
          blur(calc(var(--p2) * 14px));
}
.intro-bg-cell--3 {
  transform: translate3d(calc(var(--p3) * -110%), 0, 0)
             scale(calc(1 - var(--p3) * 0.18))
             rotate(calc(var(--p3) * -3deg));
  opacity: calc(1 - var(--p3));
  filter: grayscale(100%)
          brightness(calc(0.55 - var(--p3) * 0.45))
          blur(calc(var(--p3) * 14px));
}

/* ── Foreground card — centered, scroll-driven lift & fade ── */
.intro-poster-container {
  position: absolute;
  top:  50%;
  left: 50%;
  width:  82%;
  height: 76%;
  border-radius: 22px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.35);
  transform: translate3d(-50%, calc(-50% - var(--p-fg) * 130%), 0)
             scale(calc(1 + var(--p-fg) * 0.06));
  opacity: calc(1 - var(--p-fg) * 1.35);
  will-change: transform, opacity;
}

/* ════════════════════════════════════════════
   Modern Section Reveal (scroll-triggered)
   ════════════════════════════════════════════ */
.section-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a revealed section */
.section-reveal.is-visible > * {
  animation: none;
}

/* ════════════════════════════════════════════
   Scroll Animations (Global)
   ════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(50px) scale(0.97);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px) scale(0.98);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px) scale(0.98);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Full-bleed photo inside card */
.intro-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Dark warm overlay on card */
.intro-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6, 3, 0, 0.74) 0%,
    rgba(18, 7, 2, 0.62) 50%,
    rgba(6, 3, 0, 0.80) 100%
  );
  z-index: 1;
}

/* ── Text content inside the card ── */
.intro-content {
  position: absolute;
  left: clamp(0.9rem, 5vw, 2rem);
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.2rem);
  z-index: 2;
  overflow: hidden;
}

.intro-vertical-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.38em;
  color: rgba(255, 255, 255, 0.68);
  text-transform: uppercase;
  flex-shrink: 0;
}

.intro-name-frame {
  border-left:   1px solid rgba(255, 255, 255, 0.55);
  border-top:    1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  padding: clamp(1rem, 4.5vw, 2.2rem) clamp(0.9rem, 3.5vw, 1.8rem);
  padding-right: clamp(1.2rem, 6vw, 3rem);
  min-width: 0;
  flex: 1;
}

.intro-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  white-space: nowrap;
}

.intro-name {
  font-family: "Cinzel", serif;
  font-size: clamp(2.4rem, 9.5vw, 4.8rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
}

.intro-amp {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.4rem, 5.5vw, 2.8rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.3;
}

/* ── Swipe Up indicator (inside the card, bottom) ── */
.swipe-up-indicator {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.60);
  font-family: "Cinzel", serif;
  font-size: clamp(0.55rem, 1.8vw, 0.72rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: swipePulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes swipePulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(-8px); }
}


/* ════════════════════════════════════════════
   Stage
   ════════════════════════════════════════════ */


.stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.95), transparent 31rem),
    radial-gradient(circle at 16% 14%, rgba(219, 184, 108, 0.24), transparent 20rem),
    linear-gradient(135deg, #fffdf6 0%, #f6e7d2 44%, #ead7b8 100%);
  transition: background 1200ms ease;
}

.stage::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.27;
  pointer-events: none;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 32%),
    repeating-linear-gradient(0deg, rgba(112, 76, 38, 0.055) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(112, 76, 38, 0.035) 0 1px, transparent 1px 7px);
  mix-blend-mode: multiply;
}

.stage.is-open {
  background:
    radial-gradient(circle at 54% 30%, rgba(255, 255, 255, 0.95), transparent 30rem),
    radial-gradient(circle at 77% 48%, rgba(214, 174, 82, 0.28), transparent 23rem),
    linear-gradient(145deg, #fffaf0 0%, #f7dfbf 48%, #ead3a9 100%);
}

/* Full-screen split-cover override */
.stage,
.stage.is-open {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 229, 0.88), transparent 28rem),
    linear-gradient(135deg, #f8ead1 0%, #efe0c4 48%, #dcc49b 100%);
}

.stage::before,
.ambient {
  display: none;
}


/* ════════════════════════════════════════════
   Ambient & Particles
   ════════════════════════════════════════════ */
.ambient {
  position: absolute;
  z-index: -1;
  width: 38vmin;
  aspect-ratio: 1;
  border-radius: 999px;
  opacity: 0.32;
  filter: blur(3rem);
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.ambient-one {
  top: 7%;
  left: 7%;
  background: rgba(214, 166, 86, 0.55);
  animation: driftGlow 12s ease-in-out infinite alternate;
}

.ambient-two {
  right: 8%;
  bottom: 4%;
  background: rgba(166, 33, 50, 0.28);
  animation: driftGlow 15s ease-in-out -4s infinite alternate;
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: rgba(255, 245, 203, 0.92);
  box-shadow: 0 0 1.2rem rgba(214, 177, 95, 0.72);
  opacity: var(--opacity);
  transform: translate3d(0, 0, 0);
  animation:
    particleFloat var(--duration) ease-in-out var(--delay) infinite alternate,
    twinkle calc(var(--duration) * 0.72) ease-in-out var(--delay) infinite;
}

.particle.is-burst {
  animation: burst 900ms ease-out forwards;
}

.stage.is-open .particles {
  position: fixed;
}


/* ════════════════════════════════════════════
   Music / Replay Controls
   ════════════════════════════════════════════ */
.top-controls {
  position: fixed;
  top: auto;
  right: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  z-index: 20;
  display: flex;
  gap: 0.65rem;
}

.icon-button {
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  place-items: center;
  cursor: pointer;
  color: #6d461f;
  border: 1px solid rgba(157, 111, 35, 0.36);
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.66);
  box-shadow: 0 0.75rem 1.8rem rgba(74, 46, 20, 0.12);
  backdrop-filter: blur(0.7rem);
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover,
.icon-button.is-active {
  color: #fdf3d6;
  background: linear-gradient(145deg, #a77929, #5f3118);
  box-shadow: 0 0.85rem 1.9rem rgba(98, 54, 20, 0.18), 0 0 1.2rem rgba(223, 183, 89, 0.28);
  transform: translateY(-0.12rem);
}

.icon-button.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-0.45rem) scale(0.92);
}


/* ════════════════════════════════════════════
   Invitation Scene
   ════════════════════════════════════════════ */
.invitation-scene {
  width: 100vw;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
  perspective: 1800px;
  position: relative;
  display: grid;
  place-items: center;
}

body.is-open .invitation-scene {
  overflow: visible;
}


/* ════════════════════════════════════════════
   Envelope Wrap
   ════════════════════════════════════════════ */
.envelope-wrap {
  position: relative;
  z-index: 2;
  width: 100vw;
  min-height: 100svh;
  aspect-ratio: auto;
  cursor: pointer;
  animation: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.envelope-wrap:focus-visible {
  outline: none;
}

.envelope-wrap.is-opening,
.envelope-wrap.is-open {
  animation-play-state: paused;
  cursor: default;
}

/* ── Envelope Shell ── */
.envelope {
  position: fixed;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  filter: none;
  pointer-events: none;
  transform-style: preserve-3d;
}

body.intro-complete .envelope {
  display: none;
}

.envelope-back,
.fold {
  display: none;
}

.envelope-back,
.envelope-face,
.envelope-flap,
.fold {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--envelope-radius);
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(87, 41, 24, 0.12)),
    url("poster.jpg");
  background-position: center;
  background-size: cover;
}

.envelope-flap,
.envelope-face {
  left: 0;
  right: 0;
  width: 100%;
  height: calc(50% + 2px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background-image: url("poster.jpg");
  background-repeat: no-repeat;
  background-size: calc(100vw + 64px) calc(100svh + 64px);
  box-shadow: none;
  transition:
    transform 1500ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1000ms ease;
  will-change: transform;
}

.envelope-flap {
  top: 0;
  bottom: auto;
  z-index: 10;
  background-position: calc(50% + var(--parallax-x, 0px)) calc(0px + var(--parallax-y, 0px));
  transform: translate3d(0, 0, 3rem) rotateX(0deg);
  transform-origin: center bottom;
  box-shadow: 0 1rem 2rem rgba(70, 39, 19, 0.12);
}

.envelope-face {
  top: calc(50% - 2px);
  bottom: 0;
  z-index: 10;
  background-position: calc(50% + var(--parallax-x, 0px)) calc(-50svh + var(--parallax-y, 0px));
  transform: translate3d(0, 0, 3rem) rotateX(0deg);
  transform-origin: center top;
  box-shadow: 0 -1rem 2rem rgba(70, 39, 19, 0.08);
}

.envelope-face::before,
.envelope-face::after,
.envelope-flap::after,
.envelope::before,
.envelope::after {
  display: none;
}

.envelope-wrap.is-open .envelope-flap {
  filter: brightness(1.06);
  transform: translate3d(0, -103%, 7rem) rotateX(58deg);
}

.envelope-wrap.is-open .envelope-face {
  filter: brightness(0.98);
  transform: translate3d(0, 103%, 7rem) rotateX(-58deg);
}


/* ════════════════════════════════════════════
   Inner Card
   ════════════════════════════════════════════ */
.inner-card {
  position: relative;
  display: block;
  inset: 0;
  left: 0;
  top: 0;
  z-index: 2;
  width: 100%;
  min-height: 200svh;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background: #f7f0e4;
  box-shadow: none;
  transform: none;
  transition: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.inner-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.2px),
    radial-gradient(circle at 72% 62%, rgba(122, 80, 34, 0.28) 0 1px, transparent 1.3px),
    repeating-linear-gradient(110deg, rgba(82, 49, 22, 0.055) 0 1px, transparent 1px 5px);
  mix-blend-mode: soft-light;
}

.envelope-wrap.is-open .inner-card {
  z-index: 2;
  opacity: 1;
  transform: none;
}


/* ════════════════════════════════════════════
   Video Content Wrapper
   ════════════════════════════════════════════ */
.video-content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}


/* ════════════════════════════════════════════
   Background Image & Overlay
   ════════════════════════════════════════════ */
.hero-image-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0.92;
}

/* Dark overlay — same palette as the intro gate */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6, 3, 0, 0.72) 0%,
    rgba(18, 7, 2, 0.58) 50%,
    rgba(6, 3, 0, 0.76) 100%
  );
  z-index: 2;
  pointer-events: none;
}


/* ════════════════════════════════════════════
   Wedding Hero (Layer 1)
   ════════════════════════════════════════════ */
.wedding-hero {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  transition: opacity 0.8s ease, transform 0.8s ease;
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.wedding-hero.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-20px);
}


/* ── Hero Content Container ── */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  padding: clamp(2.5rem, 8vh, 5rem) 1.5rem clamp(2rem, 5vh, 3.5rem);
  text-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.5);
}

/* ── "Together with their families" ── */
.hero-intro {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 1.5rem 0;
  line-height: 1;
  text-align: center;
  font-weight: 500;
}

/* ── Couple Names Row ── */
.hero-names-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.5rem 0;
  width: 100%;
  gap: 1rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.couple-name {
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 5vh, 3.5rem);
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1;
}

.couple-name-connector {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vh, 3rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

/* ── "Invite you to their wedding celebration" ── */
.hero-invite {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: clamp(0.6rem, 1.3vh, 0.76rem);
  color: rgba(255, 255, 255, 0.82);
  margin: auto 0 2.5rem 0;   /* margin-top: auto pushes this + date to bottom */
  line-height: 1.8;
  text-align: center;
  font-weight: 400;
}

/* ── Date Block ── */
.hero-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  margin-top: auto;
}

.date-month {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-size: clamp(1.2rem, 2.5vh, 1.8rem);
  color: rgba(255, 255, 255, 0.90);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0.5rem 0;
}

.date-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.50);
}

.date-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  /* padding: 0 1.5rem; */
}

.date-day,
.date-time {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: clamp(0.6rem, 1.3vh, 0.8rem);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
}

.date-number {
  font-family: "Cinzel", serif;
  color: #fff;
  font-size: clamp(2.5rem, 6vh, 4rem);
  font-weight: 700;
  line-height: 0.8;
}

.date-year {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 7px;
  font-size: clamp(1.1rem, 2.2vh, 1.6rem);
  color: rgba(255, 255, 255, 0.90);
  margin: 0.5rem 0 0 0;
  font-weight: 600;
}

.date-underline {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  margin-top: 0.8rem;
}

/* ── Venue ── */
.hero-venue {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
}

.hero-venue-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 15px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.hero-venue-link:hover,
.hero-venue-link:focus-visible {
  color: #d4a84b;
  outline: none;
}

.hero-venue-icon {
  width: clamp(14px, 2vh, 18px);
  height: clamp(14px, 2vh, 18px);
  flex-shrink: 0;
  color: #d4a84b;
}


/* ════════════════════════════════════════════
   Person Profile Pages
   ════════════════════════════════════════════ */
.person-profile {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

/* Full-bleed background image */
.person-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.person-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* filter: blur(0.5px); */
  transform: scale(1.04); /* prevents blur edge bleed */
}

/* Gradient overlay — darker at bottom so card reads cleanly */
.person-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0.65) 75%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

/* Glass card */
.person-card {
  position: relative;
  z-index: 2;
  width: 88%;
  max-width: 400px;
  margin: 0 auto 10%;
  padding: 28px 28px 32px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  text-align: center;
  color: #fff;
}

/* Script / cursive name */
.person-script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  font-weight: 400;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* a.k.a nickname */
.person-aka {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.82rem, 2.8vw, 1rem);
  color: rgba(255, 255, 255, 0.65);
  margin: -6px 0 10px;
  letter-spacing: 0.04em;
}

/* Thin divider line */
.person-divider {
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.50);
  margin: 0 auto 14px;
}

/* Shorter divider between son/grandson blocks */
.person-divider--sm {
  width: 28px;
  margin: 10px auto 12px;
  opacity: 0.35;
}

/* Full name */
.person-full-name {
  font-family: "Cinzel", serif;
  font-size: clamp(0.85rem, 3.2vw, 1.1rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 18px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* "Son / Daughter of" label */
.person-relation {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.78rem, 2.8vw, 0.92rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

/* Parent names */
.person-parents {
  font-family: "Cinzel", serif;
  font-size: clamp(0.72rem, 2.6vw, 0.85rem);
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 22px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* Social handle pill button */
.person-handle {
  display: inline-block;
  padding: 7px 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 30px;
  font-family: "Cinzel", serif;
  font-size: clamp(0.62rem, 2.2vw, 0.75rem);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.person-handle:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ── Person Profile entrance animations ── */

/* Background image: starts zoomed-in and invisible */
.person-bg img {
  opacity: 0;
  transform: scale(1.14);
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.person-profile.active .person-bg img {
  opacity: 1;
  transform: scale(1.04);
}

/* Card: slides up from below */
.person-card {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease 0.35s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.person-profile.active .person-card {
  opacity: 1;
  transform: translateY(0);
}

/* All card children start hidden */
.person-card > * {
  opacity: 0;
}

/* Script name: sweeps in like handwriting */
@keyframes writeIn {
  from { opacity: 0; transform: translateX(-18px) skewX(-6deg); }
  to   { opacity: 1; transform: translateX(0) skewX(0deg); }
}

/* General staggered fade-up for card children */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Divider expands from center */
@keyframes expandLine {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.person-profile.active .person-card > *:nth-child(1) {
  animation: writeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}
.person-profile.active .person-card > *:nth-child(2) {
  animation: fadeUp 0.6s ease 1.35s forwards;
}
.person-profile.active .person-card > *:nth-child(3) {
  animation: expandLine 0.5s ease 1.65s forwards;
  transform-origin: center;
}
.person-profile.active .person-card > *:nth-child(4) {
  animation: fadeUp 0.55s ease 1.9s forwards;
}
.person-profile.active .person-card > *:nth-child(5) {
  animation: fadeUp 0.55s ease 2.1s forwards;
}
.person-profile.active .person-card > *:nth-child(6) {
  animation: expandLine 0.4s ease 2.3s forwards;
  transform-origin: center;
}
.person-profile.active .person-card > *:nth-child(7) {
  animation: fadeUp 0.55s ease 2.45s forwards;
}
.person-profile.active .person-card > *:nth-child(8) {
  animation: fadeUp 0.55s ease 2.6s forwards;
}

/* ════════════════════════════════════════════
   Program Section (Natural scroll below hero)
   ════════════════════════════════════════════ */
.program-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
  overflow: hidden;
}

.program-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.5s ease, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-wrapper.active .program-bg-image {
  opacity: 1;
  transform: scale(1);
}

.program-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6, 3, 0, 0.72) 0%,
    rgba(18, 7, 2, 0.484) 50%,
    rgba(6, 3, 0, 0.76) 100%
  );
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.program-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.program-title {
  font-family: "Great Vibes", cursive;
  margin: 0 0 3rem 0;
  color: #fff;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1;
  text-align: center;
  width: 100%;
  font-weight: 400;
  text-shadow: 0 2px 16px rgba(0,0,0,0.32);
}

.script-text {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding: 0 20px;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  opacity: 1;
  transform: none;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Alternate slide direction per item */
.timeline-item:nth-child(odd)  { --timeline-x: -20px; }
.timeline-item:nth-child(even) { --timeline-x: 20px; }

/* Staggered entrance delays */
.timeline-item:nth-child(1) { --timeline-delay: 0.2s; }
.timeline-item:nth-child(2) { --timeline-delay: 0.4s; }
.timeline-item:nth-child(3) { --timeline-delay: 0.6s; }
.timeline-item:nth-child(4) { --timeline-delay: 0.8s; }
.timeline-item:nth-child(5) { --timeline-delay: 1.0s; }
.timeline-item:nth-child(6) { --timeline-delay: 1.2s; }

.timeline-text {
  width: 40%;
}

.Timeline-text.left  { text-align: right; }
.timeline-text.right { text-align: left; }

.timeline-icon {
  width: 40%;
  font-size: 1.5rem;
}
.timeline-icon.left  { text-align: right; }
.timeline-icon.right { text-align: left; }

.timeline-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.80);
  border-radius: 50%;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-time {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.12em;
  color: #3d1f0d;
}

.timeline-event {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
  letter-spacing: 2px;
  font-weight: 600;
}


/* ════════════════════════════════════════════
   Text Reveal Animation
   ════════════════════════════════════════════ */
.text-reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 800ms ease,
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

.envelope-wrap.is-open .text-reveal,
.reveal.active .text-reveal,
.reveal.active .text-reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Rotating text fade */
.rotating-text {
  transition: opacity 0.8s ease !important;
}


/* ════════════════════════════════════════════
   Angel Figure
   ════════════════════════════════════════════ */
.angel {
  position: absolute;
  right: clamp(1rem, 5vw, 4.5rem);
  bottom: clamp(1rem, 5vh, 3.5rem);
  z-index: 4;
  width: clamp(7.5rem, 17vw, 15rem);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(2rem, 1rem, 0) scale(0.82);
  transition:
    opacity 850ms ease 1300ms,
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1) 1300ms;
  will-change: transform, opacity;
}

.stage.is-open .angel {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  animation: angelFloat 5s ease-in-out 1900ms infinite;
}

.angel img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 1.4rem 1.8rem rgba(65, 38, 18, 0.18))
    drop-shadow(0 0 1.2rem rgba(255, 226, 149, 0.28));
  transform-origin: 50% 44%;
  animation: wingBreath 2.6s ease-in-out infinite;
}

.wing-glint {
  position: absolute;
  top: 24%;
  z-index: -1;
  width: 40%;
  height: 43%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 247, 220, 0.46), transparent 68%);
  filter: blur(0.25rem);
  transform-origin: 50% 100%;
  animation: wingGlow 2.8s ease-in-out infinite;
}

.wing-left  { left: 3%; }
.wing-right { right: 3%; animation-delay: 200ms; }


/* ════════════════════════════════════════════
   RSVP Section — editorial bold dark
   ════════════════════════════════════════════ */
.rsvp-section {
  position: relative;
  width: 100%;
  background: #080706;
  overflow: hidden;
}

/* ── Part 1: RSVP Hero ── */
.rsvp-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 7vh, 5rem) 1rem clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
}

/* "please" script */
.rsvp-please {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.4rem, 9vw, 3.8rem);
  color: rgba(255, 254, 243, 0.82);
  margin: 0 0 clamp(0.2rem, 1vh, 0.5rem);
  line-height: 1;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.9s ease 0.1s, transform 0.9s ease 0.1s;
}
.rsvp-section.active .rsvp-please {
  opacity: 1;
  transform: translateY(0);
}

/* Decorative ring — full background watermark */
.rsvp-ring {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(300px, 92vw, 460px);
  height: clamp(300px, 92vw, 460px);
  border-radius: 50%;
  border: 1.5px solid rgba(200, 150, 62, 0.13);
  pointer-events: none;
  z-index: 0;
}
.rsvp-ring-inner {
  position: absolute;
  inset: clamp(14px, 4vw, 24px);
  border-radius: 50%;
  border: 0.5px solid rgba(200, 150, 62, 0.07);
  background: radial-gradient(circle, rgba(200, 150, 62, 0.025) 0%, transparent 70%);
}

/* Giant letters grid */
.rsvp-letters {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  margin: 0;
}
.rsvp-letters-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.rsvp-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(110px, 42vw, 200px);
  font-weight: 600;
  color: #fffef3;
  line-height: 0.88;
  display: block;
  width: clamp(110px, 42vw, 200px);
  text-align: center;
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.rsvp-section.active .rsvp-letter--r { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.rsvp-section.active .rsvp-letter--s { opacity: 1; transform: translateY(0); transition-delay: 0.18s; }
.rsvp-section.active .rsvp-letter--v { opacity: 1; transform: translateY(0); transition-delay: 0.31s; }
.rsvp-section.active .rsvp-letter--p { opacity: 1; transform: translateY(0); transition-delay: 0.44s; }

/* Meta: date + contact */
.rsvp-meta {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: clamp(0.8rem, 2.5vh, 1.4rem);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease 0.55s, transform 0.8s ease 0.55s;
}
.rsvp-section.active .rsvp-meta { opacity: 1; transform: translateY(0); }

.rsvp-by {
  font-family: "Cinzel", serif;
  font-size: clamp(0.58rem, 1.8vw, 0.78rem);
  letter-spacing: clamp(4px, 1.5vw, 7px);
  color: rgba(255, 254, 243, 0.75);
  text-transform: uppercase;
  margin: 0;
  font-weight: 400;
}

/* "thank you" script */
.rsvp-thankyou {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 8vw, 3.2rem);
  color: rgba(255, 254, 243, 0.65);
  margin: clamp(0.15rem, 0.8vh, 0.4rem) 0 0;
  line-height: 1;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease 0.7s, transform 0.9s ease 0.7s;
}
.rsvp-section.active .rsvp-thankyou { opacity: 1; transform: translateY(0); }

/* ── Family names (inside hero, below thank you) ── */
.rsvp-families {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(0.5rem, 1.5vh, 0.9rem);
  padding: 0;
  background: transparent;
}

.rsvp-families-divider {
  width: clamp(50px, 16vw, 80px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200, 150, 62, 0.4), transparent);
  margin-bottom: clamp(0.6rem, 1.8vh, 1rem);
}

/* Each family row */
.rsvp-family-item {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.85rem, 3vw, 1.1rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 254, 243, 0.62);
  text-align: center;
  letter-spacing: clamp(1.5px, 0.6vw, 3px);
  line-height: 1;
  margin-bottom: clamp(0.28rem, 0.9vh, 0.42rem);
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.3s ease;
  cursor: default;
}
.rsvp-family-item:last-of-type { margin-bottom: 0; }
.rsvp-family-item:hover { color: rgba(212, 168, 75, 0.85); }

/* staggered reveal — delayed after RSVP letters finish */
.rsvp-section.active .rsvp-fi--1 { opacity: 1; transform: none; transition-delay: 0.65s; }
.rsvp-section.active .rsvp-fi--2 { opacity: 1; transform: none; transition-delay: 0.76s; }
.rsvp-section.active .rsvp-fi--3 { opacity: 1; transform: none; transition-delay: 0.87s; }
.rsvp-section.active .rsvp-fi--4 { opacity: 1; transform: none; transition-delay: 0.98s; }
.rsvp-section.active .rsvp-fi--5 { opacity: 1; transform: none; transition-delay: 1.09s; }
.rsvp-section.active .rsvp-fi--6 { opacity: 1; transform: none; transition-delay: 1.20s; }

@media (max-width: 360px) {
  .rsvp-letter { font-size: 90px; width: 90px; }
  .rsvp-family-item { font-size: 1rem; }
  .rsvp-please, .rsvp-thankyou { font-size: 2rem; }
}

/* ════════════════════════════════════════════
   Welcome Section (Countdown + Location + Copy)
   ════════════════════════════════════════════ */
.welcome-section {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: clamp(3rem, 8vw, 5rem);
  padding: clamp(5.5rem, 10vw, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
  color: #3d1f0d;
  text-align: center;
  background:
    radial-gradient(circle at 0 0, rgba(153, 117, 72, 0.1), transparent 17rem),
    radial-gradient(circle at 100% 0, rgba(153, 117, 72, 0.09), transparent 17rem),
    linear-gradient(180deg, #fbf8f0, #f5efe4);
}

/* ── Countdown panel + welcome copy shared layout ── */
.countdown-panel,
.welcome-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 46rem);
  margin: 0 auto;
}

.script-heading {
  font-family: "Great Vibes", cursive;
  margin: 0;
  color: #3d1f0d;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1;
  font-weight: 400;
}

.countdown-label {
  font-family: "Cinzel", serif;
  margin: clamp(0.95rem, 3vw, 1.5rem) 0 clamp(1.8rem, 5vw, 2.8rem);
  color: #3d1f0d;
  font-size: clamp(0.75rem, 2.2vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ── Modern 2x2 Countdown Grid ── */
.modern-countdown-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modern-countdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  position: relative;
  background: #fff;
  border-radius: 40px;
  overflow: hidden; /* Contain the shine effect */
  box-shadow: 0 15px 45px rgba(61, 31, 13, 0.1);
  width: 100%;
}

/* Shiny Sweep Effect */
.modern-countdown-grid::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-20deg);
  animation: shinySweep 4s infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes shinySweep {
  0% { left: -150%; }
  25% { left: 150%; }
  100% { left: 150%; }
}

.countdown-box {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
}

.countdown-box:first-child { border-top-left-radius: 40px; }
.countdown-box:nth-child(2) { border-top-right-radius: 40px; }
.countdown-box:nth-child(3) { border-bottom-left-radius: 40px; }
.countdown-box:nth-child(4) { border-bottom-right-radius: 40px; }

.box-ivory {
  background-color: #ffffff;
}

.box-beige {
  background-color: #f5f0e8;
}

.countdown-number {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  color: #2d2d2d;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.countdown-divider {
  width: 25px;
  height: 2px;
  background-color: #c9a24d;
  margin: 0.5rem 0 0.8rem;
}

.countdown-label-unit {
  font-family: "Cinzel", serif;
  font-size: clamp(0.6rem, 1.8vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: #666;
  text-transform: uppercase;
}

.center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: #c9a24d;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  box-shadow: 0 0 10px rgba(201, 162, 77, 0.3);
}

/* ── Welcome Copy ── */
.welcome-angel {
  display: block;
  width: clamp(4rem, 13vw, 7rem);
  margin: 0 auto clamp(2.2rem, 6vw, 4rem);
  opacity: 0.8;
  animation: angelFloat 4s ease-in-out infinite;
}

@keyframes angelFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

.welcome-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  max-width: 39rem;
  margin: clamp(1.8rem, 5vw, 3rem) auto 0;
  color: #3d1f0d;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.6;
}


/* ════════════════════════════════════════════
   Body Open State
   ════════════════════════════════════════════ */
body.is-open {
  overflow-y: auto;
  overflow-x: hidden;
}

body.is-open .stage {
  overflow: visible;
}


/* ════════════════════════════════════════════
   Keyframe Animations
   ════════════════════════════════════════════ */
/* ── Memories Section ── */
.memories-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 8vw, 6rem) 0;
  overflow: hidden;
  box-sizing: border-box;
  background:#100f0d;
}

.memories-header {
  text-align: center;
  margin-bottom: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.memories-section .script-heading {
  color: #fffef3;
}

.memories-subtitle {
  font-family: "Cinzel", serif;
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  letter-spacing: 0.2em;
  color: #fffef3;
  margin-top: 0.5rem;
  text-transform: uppercase;
  opacity: 0.9;
}

.memories-container {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
  /* padding: 3rem 0; */
  z-index: 1;
  opacity: 0;
  transform: translateY(30px);
  transition: 
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.6s;
}

.memories-section.active .memories-container {
  opacity: 1;
  transform: translateY(0);
}

.memories-marquee {
  display: flex;
  width: 100%;
}

.marquee-content {
  display: flex;
  gap: 30px;
  animation: scrollLeft 30s linear infinite;
  padding: 20px 0;
}

.memory-img {
  width: 280px;
  height: 380px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 0 6px #1a1710,
    0 0 0 7.5px rgba(255, 254, 243, 0.5);
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.marquee-content:hover {
  animation-play-state: paused;
}

.memory-img:nth-child(even) {
  transform: rotate(3deg);
}

.memory-img:nth-child(odd) {
  transform: rotate(-3deg);
}

.memory-img:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 10;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 0 6px #1a1710,
    0 0 0 7.5px rgba(200, 150, 62, 0.85);
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-280px * 4 - 30px * 4)); }
}

/* Scroll reveal transition */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.98);
  transition: 
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes driftGlow {
  0%   { transform: translate3d(0, 0, 0) scale(0.95); }
  100% { transform: translate3d(2.2rem, 1rem, 0) scale(1.12); }
}

@keyframes particleFloat {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(var(--move-x), var(--move-y), 0); }
}

@keyframes twinkle {
  0%, 100% { opacity: calc(var(--opacity) * 0.35); }
  45%       { opacity: var(--opacity); }
}

@keyframes burst {
  0%   { opacity: 0.95; transform: translate3d(0, 0, 0) scale(0.8); }
  100% { opacity: 0;    transform: translate3d(var(--burst-x), var(--burst-y), 0) scale(0.1); }
}

@keyframes angelFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(0, -0.9rem, 0) scale(1.015); }
}

@keyframes wingBreath {
  0%, 100% { transform: rotate(-0.5deg) scaleX(1); }
  50%       { transform: rotate(0.7deg) scaleX(1.025); }
}

@keyframes wingGlow {
  0%, 100% { opacity: 0.3;  transform: rotate(-2deg) scaleX(0.94); }
  50%       { opacity: 0.68; transform: rotate(4deg)  scaleX(1.12); }
}

@keyframes cueFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(0.35rem); }
}


/* ════════════════════════════════════════════
   Responsive — Tablet
   ════════════════════════════════════════════ */
@media (max-width: 760px) {
  .top-controls {
    right: 1.15rem;
    bottom: 1.15rem;
  }

  .icon-button {
    width: 3.35rem;
    height: 3.35rem;
    background: rgba(255, 255, 250, 0.92);
  }

  .modern-countdown-container {
    max-width: 340px;
    margin: 0 auto;
  }

  .angel {
    right: 0.3rem;
    bottom: 0.3rem;
    width: clamp(5.8rem, 28vw, 8rem);
  }
}


/* ════════════════════════════════════════════
   Responsive — Mobile
   ════════════════════════════════════════════ */
@media (max-width: 480px) {
  .welcome-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .countdown-label {
    letter-spacing: 0.12em;
    font-size: clamp(0.75rem, 3.5vw, 0.9rem);
  }

  .modern-countdown-container {
    max-width: 300px;
    padding: 0.5rem;
  }

  .countdown-box {
    padding: 1.5rem 0.5rem;
  }

  .countdown-number {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .location-name {
    letter-spacing: 0.1em;
  }

  .wedding-hero,
  .hero-content {
    align-items: center !important;
    text-align: center !important;
  }

  .hero-names-container {
    justify-content: center !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    gap: 0.4rem !important;
  }

  .couple-name {
    font-size: clamp(1.3rem, 5vw, 2rem) !important;
    letter-spacing: 2px !important;
  }

  .couple-name-connector {
    font-size: clamp(1rem, 4vw, 1.5rem) !important;
  }

  .hero-intro,
  .hero-invite {
    text-align: center !important;
    letter-spacing: 2px !important;
    line-height:2;
  }

  .hero-date-block {
    align-items: center !important;
    text-align: center !important;
    max-width: 100% !important;
  }
}


/* ════════════════════════════════════════════
   Accessibility — Reduced Motion
   ════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { font-size:16px; }



/* ═══════════════════════════════════════
   SECTION WRAPPER (full-width section)
═══════════════════════════════════════ */
.section-wrapper {
  width: 100%;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  /* padding: 60px 0; */
}

/* ═══════════════════════════════════════
   CONTAINER — fluid, max-width capped
═══════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 660px;
  /* Shrinks gracefully on all screen sizes */
}

/* ═══════════════════════════════════════
   CARD
═══════════════════════════════════════ */
.card {
  background: #0d0c0a;
  width: 100%;
  position: relative;
  padding: clamp(36px, 8vw, 60px) clamp(24px, 7vw, 58px) clamp(32px, 7vw, 54px);
  border: none;
  box-shadow: none;
}

/* Inner border removed */
.card::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: none;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════
   CORNER ORNAMENTS
═══════════════════════════════════════ */
.corner {
  position: absolute;
  width: clamp(60px, 12vw, 100px);
  height: clamp(60px, 12vw, 100px);
  z-index: 2;
}
.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); }

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.top-scroll {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(10px, 2.5vw, 16px);
  position: relative;
  z-index: 1;
}
.top-scroll svg {
  width: clamp(100px, 28vw, 160px);
  height: auto;
}

.the-journey {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  letter-spacing: clamp(4px, 1.5vw, 7px);
  color: #b8872e;
  font-weight: 400;
  text-align: center;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.forever-wrap {
  text-align: center;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.forever {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(52px, 16vw, 100px);
  color: #d4a84b;
  line-height: 1;
  letter-spacing: 2px;
}

.mid-diamond {
  display: flex;
  justify-content: center;
  margin: clamp(4px, 1vw, 8px) 0 clamp(10px, 2.5vw, 16px);
  position: relative;
  z-index: 1;
}

.tagline {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: clamp(2px, 1vw, 3.5px);
  color: #b8872e;
  font-weight: 400;
  line-height: 2.2;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════
   TIMELINE
═══════════════════════════════════════ */
.timeline {
  position: relative;
  margin-top: clamp(20px, 5vw, 36px);
  z-index: 1;
}

.timeline-line {
  position: absolute;
  /* center of dot: timeline-padding(20) + medallion-width + dot-right-offset(7) - half-dot-width */
  left: calc(20px + clamp(90px, 22vw, 134px) + 7px - clamp(10px, 2.5vw, 14px) / 2);
  top: clamp(45px, 10vw, 68px);
  bottom: clamp(45px, 10vw, 68px);
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,254,243,0.4) 5%, rgba(255,254,243,0.4) 95%, transparent);
  transform: translateX(-50%);
}

.event {
  display: flex;
  align-items: center;
  margin-bottom: clamp(20px, 5vw, 40px);
  position: relative;
  opacity: 0;
  transform: translateX(-30px);
  transition: 
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-wrapper.active .event {
  opacity: 1;
  transform: translateX(0);
}

.section-wrapper.active .event:nth-child(1) { transition-delay: 0.8s; }
.section-wrapper.active .event:nth-child(2) { transition-delay: 1.0s; }
.section-wrapper.active .event:nth-child(3) { transition-delay: 1.2s; }

.event:last-child { margin-bottom: 0; }

/* ─── MEDALLION ─── */
.medallion-wrap {
  width: clamp(90px, 22vw, 134px);
  height: clamp(96px, 23.5vw, 142px);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.event:hover .medallion-wrap {
  transform: scale(1.08) rotate(3deg);
}

.medallion-wrap svg {
  width: 100%;
  height: 100%;
}

.dot {
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(10px, 2.5vw, 14px);
  height: clamp(10px, 2.5vw, 14px);
  border-radius: 50%;
  background: #0d0c0a;
  border: 1.5px solid #fffef3;
  z-index: 3;
}
.dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(3px, 1vw, 5px);
  height: clamp(3px, 1vw, 5px);
  border-radius: 50%;
  background: #fffef3;
}

/* ─── EVENT TEXT ─── */
.event-text {
  padding-left: clamp(14px, 4vw, 32px);
  flex: 1;
  min-width: 0;
}

.event-header {
  display: flex;
  align-items: baseline;
  gap: clamp(6px, 1.5vw, 12px);
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.event-num {
  font-size: 20px;
  font-weight: 300;
  color: #d4a84b;
  line-height: 1;
  flex-shrink: 0;
}

.event-name {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: #d4a84b;
  font-weight: 500;
}

.h-divider {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: clamp(3px, 0.8vw, 6px) 0 clamp(6px, 1.5vw, 11px);
}
.h-line { height: 1px; background: #fffef3; opacity: 0.35; width: clamp(28px, 8vw, 46px); }
.h-dia  { width: 6px; height: 6px; background: #fffef3; opacity: 0.55; transform: rotate(45deg); flex-shrink: 0; }

.event-desc {
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 400;
  color: #c4a265;
  line-height: 1.75;
  margin-bottom: clamp(8px, 2vw, 13px);
}

.event-time {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  /* letter-spacing: clamp(1.5px, 0.7vw, 2.5px); */
  color: #8a6428;
  font-weight: 400;
}
.event-time svg {
  width: clamp(10px, 2.5vw, 14px);
  height: clamp(10px, 2.5vw, 14px);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer-scroll {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 5vw, 36px);
  margin-bottom: clamp(8px, 2vw, 12px);
  z-index: 1;
  position: relative;
}
.footer-scroll svg {
  width: clamp(100px, 28vw, 150px);
  height: auto;
}

.footer-line1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(6px, 1.5vw, 8.5px);
  letter-spacing: clamp(3px, 1.2vw, 5px);
  color: #b8872e;
  text-align: center;
  margin-bottom: clamp(4px, 1vw, 8px);
  position: relative;
  z-index: 1;
}

.footer-script {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(38px, 11vw, 64px);
  color: #d4a84b;
  text-align: center;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.footer-dash {
  display: flex;
  justify-content: center;
  margin-top: clamp(6px, 1.5vw, 12px);
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════
   SECTION-WRAPPER COLOUR OVERRIDES
═══════════════════════════════════════ */

/* Text */
.section-wrapper .the-journey,
.section-wrapper .forever,
.section-wrapper .tagline,
.section-wrapper .event-num,
.section-wrapper .event-name,
.section-wrapper .event-desc,
.section-wrapper .event-time,
.section-wrapper .footer-line1,
.section-wrapper .footer-script {
  color: #fffef3;
}

/* SVG strokes & fills — all gold/amber inline colours → #fffef3 */
.section-wrapper svg [stroke="#c8963e"] { stroke: #fffef3; }
.section-wrapper svg [fill="#c8963e"]   { fill:   #fffef3; }
.section-wrapper svg [stroke="#8a6428"] { stroke: #fffef3; }
.section-wrapper svg [fill="#8a6428"]   { fill:   #fffef3; }
.section-wrapper svg [stroke="#6b4e1a"] { stroke: #fffef3; }
.section-wrapper svg [fill="#6b4e1a"]   { fill:   #fffef3; }
/* preserve explicit none values */
.section-wrapper svg [fill="none"]      { fill:   none; }

/* ═══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
═══════════════════════════════════════ */

/* Small phones */
@media (max-width: 380px) {
  /* .event-name { letter-spacing: 1px; } */
  .the-journey { letter-spacing: 3px; }
  .tagline { letter-spacing: 1.5px; }
  .footer-line1 { letter-spacing: 2px; }
  .card::before { top:5px; left:5px; right:5px; bottom:5px; }
}

/* 320px phones — full card realignment */
@media (max-width: 360px) {
  /* Card: tighter horizontal padding so content has room */
  .card {
    padding: 30px 12px 26px;
  }
  .card::before {
    top: 4px; left: 4px; right: 4px; bottom: 4px;
  }

  /* Corners: scale down so they don't swallow content */
  .corner {
    width: 48px;
    height: 48px;
  }

  /* Header typography */
  .the-journey {
    font-size: 14px;
    letter-spacing: 2.5px;
  }
  .forever {
    font-size: 44px;
  }
  .tagline {
    font-size: 10px;
    letter-spacing: 1.2px;
    line-height: 2;
  }

  /* Timeline: smaller medallion → more text room */
  .medallion-wrap {
    width: 68px;
    height: 72px;
    flex-shrink: 0;
  }
  .timeline-line {
    /* 20px timeline-padding + 68px medallion + 7px dot-right - 5px half-dot = 90px */
    left: 90px;
  }
  .dot {
    width: 10px;
    height: 10px;
  }
  .dot::after {
    width: 3px;
    height: 3px;
  }

  /* Event text: compact but readable */
  .event {
    align-items: center;
    margin-bottom: 18px;
  }
  .event-text {
    padding-left: 10px;
  }
  .event-header {
    gap: 5px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
    align-items: baseline;
  }
  .event-num {
    font-size: 14px;
    flex-shrink: 0;
  }
  .event-name {
    font-size: 14px;
    letter-spacing: 0.8px;
    line-height: 1.3;
    word-break: break-word;
  }
  .h-divider {
    margin: 3px 0 5px;
    gap: 4px;
  }
  .h-line {
    width: 22px;
  }
  .h-dia {
    width: 5px;
    height: 5px;
  }
  .event-desc {
    font-size: 10px;
    line-height: 1.65;
    margin-bottom: 6px;
  }
  .event-time {
    font-size: 15px;
    letter-spacing: 0.8px;
    gap: 5px;
  }
  .event-time svg {
    width: 10px;
    height: 10px;
  }

  /* Footer */
  .footer-scroll svg {
    width: 90px;
  }
  .footer-line1 {
    font-size: 10px;
    letter-spacing: 1.8px;
  }
  .footer-script {
    font-size: 32px;
  }
  .footer-dash svg {
    width: 90px;
  }
}

/* Tablets and up: restore comfortable spacing */
@media (min-width: 600px) {
  .event-header { flex-wrap: nowrap; }
}

/* Large screens */
@media (min-width: 700px) {
  .container { max-width: 660px; }
}
