:root {
  --wine: #72253d;
  --wine-dark: #3b0c1c;
  --rose: #c27686;
  --blush: #eed3d0;
  --blush-light: #fbefea;
  --ivory: #fff8ef;
  --paper: #f5e6dc;
  --gold: #b88a4c;
  --gold-light: #ead09f;
  --sage: #74806b;
  --ink: #522a30;
  --shadow: rgba(70, 17, 28, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 0, rgba(255,255,255,.55), transparent 44%);
}
body.locked { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.story { position: relative; overflow: clip; }
.scene {
  min-height: 100svh;
  padding: max(68px, env(safe-area-inset-top)) 22px max(62px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.content {
  width: min(760px, 90vw);
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.content.narrow { width: min(630px, 88vw); }

.hero-scene,
.final-scene {
  color: var(--wine);
  background: var(--blush-light) url("/assets/hero-arch.webp") center/cover no-repeat;
}
.hero-scene { background-position: center calc(50% + var(--hero-shift, 0px)); }
.hero-shade,
.final-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,248,239,.42), rgba(255,248,239,.08) 52%, rgba(70,17,28,.05));
}
.hero-content { transform: translateY(-4vh); }
.hero-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -38px -26px;
  background: radial-gradient(ellipse at center, rgba(255,248,239,.78), rgba(255,248,239,.38) 58%, transparent 76%);
  filter: blur(2px);
  border-radius: 46% 54% 48% 52%;
}
.bismillah {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: clamp(18px, 4.4vw, 31px);
  font-style: italic;
  text-shadow: 0 1px rgba(255,255,255,.75);
}
.eyebrow {
  margin: 0 0 20px;
  color: var(--wine);
  letter-spacing: .27em;
  font: 700 clamp(10px, 2.6vw, 14px)/1.4 Arial, sans-serif;
}
.names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--wine);
  font-family: "Segoe Script", "Brush Script MT", "URW Chancery L", cursive;
  font-size: clamp(52px, 14vw, 100px);
  font-weight: 400;
  line-height: .95;
  text-shadow: 0 2px 22px rgba(255,248,239,.7);
}
.names i { margin: 10px 0; color: var(--gold); font-size: .48em; }
.ornament { width: min(390px, 74vw); display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--gold); }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament i:last-child { transform: rotate(180deg); }
.ornament b { font-size: 13px; }
.date-card {
  min-width: min(440px, 84vw);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--wine);
  background: rgba(255,248,239,.79);
  border: 1px solid rgba(104,27,44,.38);
  border-radius: 24px 5px;
  box-shadow: inset 0 0 0 5px rgba(173,127,74,.08), 0 16px 45px var(--shadow);
  backdrop-filter: blur(7px);
  overflow: hidden;
  position: relative;
}
.date-card::after {
  content: "";
  position: absolute;
  inset: -120% auto -120% -45%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
  transform: rotate(16deg);
  animation: luxurySweep 6.5s ease-in-out infinite;
}
.date-card strong { font: 700 clamp(16px, 4vw, 25px) Arial, sans-serif; letter-spacing: .07em; }
.date-card span { font-size: clamp(27px, 6vw, 41px); }

.paper-scene {
  background:
    linear-gradient(rgba(255,248,239,.78), rgba(255,248,239,.82)),
    url("/assets/hero-arch.webp") center/cover fixed;
}
.swan-scene {
  background:
    linear-gradient(180deg, rgba(255,248,239,.15), rgba(255,248,239,.28) 48%, rgba(255,248,239,.08)),
    url("/assets/swan-water-v2.webp") center/cover no-repeat;
}
.swan-scene .content {
  padding-top: clamp(72px, 9vh, 110px);
  padding-bottom: clamp(132px, 17vh, 210px);
}
.swan-scene .invitation-card {
  background: rgba(255,250,245,.88);
  border-color: rgba(104,27,44,.24);
  box-shadow: 0 22px 60px rgba(85,33,42,.18), inset 0 0 0 6px rgba(173,127,74,.08);
  backdrop-filter: blur(11px);
}
.swan-scene .script-heading,
.swan-scene .family-sign {
  text-shadow: 0 2px 18px rgba(255,250,245,.95);
}
.paper-scene::before,
.blush-scene::before {
  content: "";
  position: absolute;
  inset: 19px;
  border: 1px solid rgba(173,127,74,.45);
  border-radius: 34px 8px;
  pointer-events: none;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.22), 0 0 70px rgba(114,37,61,.06);
}
.paper-scene::after,
.blush-scene::after {
  content: "✦";
  position: absolute;
  top: 34px;
  left: 50%;
  color: var(--gold);
  transform: translateX(-50%);
  font-size: 13px;
}
.script-heading {
  margin: 0;
  color: var(--wine);
  font-family: "Segoe Script", "Brush Script MT", "URW Chancery L", cursive;
  font-size: clamp(39px, 10vw, 72px);
  font-weight: 400;
  line-height: 1.08;
}
.script-heading.small { font-size: clamp(31px, 7vw, 49px); }
.invitation-card {
  padding: clamp(24px, 5vw, 38px);
  color: #5c373b;
  background: rgba(255,250,245,.8);
  border: 1px solid rgba(104,27,44,.2);
  border-radius: 34px 8px;
  box-shadow: 0 18px 50px rgba(85,33,42,.12), inset 0 0 0 6px rgba(173,127,74,.06);
  backdrop-filter: blur(8px);
  font-size: clamp(17px, 4.1vw, 23px);
  line-height: 1.68;
  position: relative;
}
.invitation-card::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(184,138,76,.18);
  border-radius: 27px 5px;
  pointer-events: none;
}
.invitation-card p { margin: 0; }
.invitation-card .salaam { margin-bottom: 18px; color: var(--wine); font-size: 1.08em; font-weight: 700; letter-spacing: .04em; }
.invitation-card strong, .invitation-card b { color: var(--wine); }
.family-sign { margin: 28px 0 0; padding-top: 23px; width: min(480px, 82vw); border-top: 1px solid rgba(104,27,44,.25); color: #765158; font-size: clamp(15px, 3.7vw, 20px); line-height: 1.65; }
.family-sign strong { color: var(--wine); }

.blush-scene {
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.6), transparent 35%),
    radial-gradient(circle at 82% 82%, rgba(183,103,118,.15), transparent 34%),
    linear-gradient(145deg, #f8e7e1, #efd5d1 55%, #f8ebe4);
}
.blush-scene h2,
.location-scene h2,
.final-scene h2 {
  margin: 0;
  color: var(--wine);
  font-size: clamp(35px, 7.5vw, 62px);
  font-weight: 400;
  line-height: 1.15;
}
.countdown {
  width: min(620px, 90vw);
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,248,239,.72);
  border: 1px solid rgba(104,27,44,.25);
  border-radius: 28px 7px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(85,33,42,.12);
  backdrop-filter: blur(12px);
}
.countdown div { padding: 19px 7px; border-right: 1px solid rgba(104,27,44,.16); }
.countdown div:last-child { border: 0; }
.countdown strong { display: block; color: var(--wine); font-size: clamp(27px, 7vw, 45px); font-weight: 400; }
.countdown strong.tick { animation: digitTick .48s cubic-bezier(.2,.8,.2,1); }
.countdown span { display: block; margin-top: 7px; color: var(--sage); font: 700 9px Arial, sans-serif; letter-spacing: .12em; }
.event-card {
  width: min(580px, 88vw);
  margin-top: 34px;
  padding: 25px 28px 30px;
  background: rgba(255,248,239,.64);
  border: 1px solid rgba(173,127,74,.44);
  border-radius: 8px 32px;
  box-shadow: 0 20px 54px rgba(85,33,42,.12), inset 0 0 0 6px rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
}
.event-line { margin-top: 24px; display: grid; grid-template-columns: 90px 36px 1fr; align-items: center; text-align: left; }
.event-line time { color: var(--wine); font-size: clamp(27px, 6vw, 38px); }
.event-line > span { width: 11px; height: 11px; justify-self: center; background: var(--rose); border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); box-shadow: 0 0 0 7px rgba(183,103,118,.13); }
.event-line strong { color: var(--wine); font-size: clamp(20px, 4.5vw, 28px); font-weight: 400; }
.event-line small { color: #7f6265; font-size: .67em; font-weight: 400; }

.location-scene .content { padding-block: clamp(18px, 4vh, 44px); }
.location-scene h2 span { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: .78em; }
.venue-visual {
  width: min(520px, 86vw);
  height: clamp(420px, 65vh, 660px);
  margin: 0 0 34px;
  position: relative;
  overflow: hidden;
  background: #28121a;
  border: 1px solid rgba(234,208,159,.88);
  border-radius: 52px 12px;
  box-shadow:
    0 34px 80px rgba(59,12,28,.3),
    0 0 0 7px rgba(255,248,239,.62),
    0 0 0 8px rgba(184,138,76,.34),
    inset 0 0 0 1px rgba(255,255,255,.25);
  isolation: isolate;
  animation: venueBreath 7s ease-in-out infinite;
}
.venue-visual::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(39,10,20,.08), transparent 34%, rgba(52,10,20,.62)),
    radial-gradient(circle at 50% 38%, rgba(255,226,169,.2), transparent 42%);
}
.venue-visual::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 13px;
  border: 1px solid rgba(255,238,202,.78);
  border-radius: 40px 7px;
  pointer-events: none;
  box-shadow: inset 0 0 28px rgba(255,244,214,.12);
}
.venue-visual img {
  width: 100%;
  height: 106%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  transform: translateY(var(--palace-shift, 0px)) scale(1.025);
  transition: transform .2s linear;
  filter: saturate(.84) contrast(1.04) brightness(1.03);
}
.venue-visual figcaption {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 21px;
  color: var(--ivory);
  font: 700 clamp(16px, 4vw, 24px) Georgia, serif;
  letter-spacing: .22em;
  text-shadow: 0 3px 18px rgba(20,3,9,.92);
  transform: translateX(-50%);
}
.venue-pin {
  position: absolute;
  z-index: 5;
  right: 22px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: rgba(255,248,239,.9);
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(45,6,15,.28);
  backdrop-filter: blur(8px);
  animation: venueFloat 3.2s ease-in-out infinite;
}
.venue-pin i { width: 19px; height: 24px; position: relative; background: var(--wine); border-radius: 50% 50% 50% 5px; transform: rotate(-45deg); }
.venue-pin i::after { content: ""; position: absolute; width: 8px; height: 8px; left: 5px; top: 5px; background: var(--ivory); border-radius: 50%; }
.pin { width: 105px; height: 105px; margin-bottom: 24px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; background: rgba(255,248,239,.78); box-shadow: 0 0 0 9px rgba(173,127,74,.08); }
.pin i { width: 43px; height: 54px; position: relative; background: var(--wine); border-radius: 50% 50% 50% 7px; transform: rotate(-45deg); }
.pin i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 12px; top: 12px; background: var(--ivory); border-radius: 50%; }
.address { margin: 22px 0 0; color: #75545a; font-size: clamp(20px, 4.7vw, 29px); }
.landmark { margin: 8px 0 0; color: #8a626a; font: 600 clamp(13px, 3.2vw, 18px) Arial, sans-serif; letter-spacing: .04em; }
.couple-inline { margin: 20px 0 0; color: var(--wine); font: 700 clamp(16px, 3.8vw, 22px) Georgia, serif; letter-spacing: .05em; }
.primary-button {
  min-width: 260px;
  min-height: 56px;
  margin-top: 28px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--ivory);
  background: linear-gradient(135deg, var(--rose), var(--wine-dark));
  border: 1px solid rgba(255,248,239,.35);
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(73,12,25,.28);
  letter-spacing: .1em;
  font: 700 11px Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.primary-button::before {
  content: "";
  position: absolute;
  top: -90%;
  bottom: -90%;
  left: -42%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transform: rotate(18deg);
  animation: luxurySweep 5.8s ease-in-out infinite;
}
.primary-button span { font-size: 18px; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(73,12,25,.34); }
.qr-card { margin-top: 25px; padding: 15px 17px 11px; background: rgba(255,255,255,.77); border: 1px solid rgba(173,127,74,.48); border-radius: 26px 7px; box-shadow: 0 12px 30px rgba(85,33,42,.1); }
.qr-card img { display: block; width: 168px; height: 168px; }
.qr-card p { margin: 6px 0 0; color: #75545a; font: 700 9px Arial, sans-serif; letter-spacing: .05em; }

.final-scene .content { transform: translateY(-1vh); }
.final-scene h2 { font-size: clamp(30px, 6.6vw, 49px); line-height: 1.32; }
.final-date { margin: 28px 0 0; color: #74535a; font: 700 11px Arial, sans-serif; letter-spacing: .11em; }
.share-button { margin-top: 28px; }
.monogram { margin: 30px 0 0; color: var(--wine); font-size: clamp(46px, 10vw, 72px); font-style: italic; }
.monogram i { color: var(--gold); font-size: .62em; }
.brand-note { margin: 17px 0 0; color: var(--gold); font: 700 9px Arial, sans-serif; letter-spacing: .18em; }

.down-arrow {
  width: 47px;
  height: 47px;
  margin-top: 28px;
  display: grid;
  place-items: center;
  color: var(--wine);
  border: 1px solid rgba(104,27,44,.48);
  border-radius: 50%;
  font-size: 25px;
  text-decoration: none;
  animation: bob 1.8s ease-in-out infinite;
}
.music-button {
  position: fixed;
  z-index: 30;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  min-width: 82px;
  height: 41px;
  padding: 0 13px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ivory);
  background: rgba(73,12,25,.82);
  border: 1px solid rgba(255,248,239,.35);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(57,8,18,.23);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.music-button.show { display: flex; }
.music-button span { font-size: 19px; }
.music-button b { font: 700 9px Arial, sans-serif; letter-spacing: .06em; }
.music-button.playing span { animation: note 1.5s ease-in-out infinite; }
.section-nav { position: fixed; z-index: 25; right: 15px; top: 50%; display: none; flex-direction: column; gap: 10px; transform: translateY(-50%); }
.section-nav.show { display: flex; }
.section-nav a { width: 9px; height: 9px; background: rgba(104,27,44,.3); border: 1px solid rgba(255,248,239,.76); border-radius: 50%; box-shadow: 0 2px 8px rgba(65,10,21,.22); }
.section-nav a.active { background: var(--wine); transform: scale(1.35); }

.gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e7c8c3;
  perspective: 1600px;
}
.gate::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: -30%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255,245,213,.9), rgba(255,222,168,.24) 34%, transparent 67%);
  transform: scale(.35);
  transition: opacity 1.35s ease .45s, transform 2.8s cubic-bezier(.16,.8,.18,1) .4s;
}
.gate.opening::after { opacity: .86; transform: scale(1.2); }
.gate-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--wine);
  text-align: center;
  background: linear-gradient(rgba(255,248,239,.31), rgba(255,248,239,.18)), url("/assets/hero-arch.webp") center/cover;
  text-shadow: 0 2px 24px rgba(255,248,239,.95);
}
.gate-reveal > * { opacity: 0; transform: translateY(18px) scale(.97); }
.gate.opening .gate-reveal > * { animation: revealName 1.15s cubic-bezier(.2,.8,.2,1) 1.3s forwards; }
.gate.opening .gate-reveal strong { animation-delay: 1.48s; }
.gate.opening .gate-reveal small { animation-delay: 1.67s; }
.gate-reveal span { font: 700 11px Arial, sans-serif; letter-spacing: .27em; }
.gate-reveal strong { width: min(500px, 84vw); font-family: "Segoe Script", "Brush Script MT", cursive; font-size: clamp(44px, 11vw, 82px); font-weight: 400; line-height: 1.08; }
.gate-reveal small { padding: 12px 18px; background: rgba(255,248,239,.7); border: 1px solid rgba(104,27,44,.28); font: 700 12px Arial, sans-serif; letter-spacing: .12em; }
.envelope-panel {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 50.2%;
  background-image: url("/assets/envelope.webp");
  background-size: 200% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 22px rgba(62,16,25,.26));
  backface-visibility: hidden;
  will-change: transform, filter;
  transition: transform 3.25s cubic-bezier(.72,.01,.19,1), filter 2.6s ease;
}
.envelope-left { left: 0; background-position: left center; transform-origin: left center; }
.envelope-right { right: 0; background-position: right center; transform-origin: right center; }
.gate.opening .envelope-left { transform: rotateY(-88deg) translateX(-22%) scale(1.015); filter: drop-shadow(18px 0 28px rgba(62,16,25,.3)); }
.gate.opening .envelope-right { transform: rotateY(88deg) translateX(22%) scale(1.015); filter: drop-shadow(-18px 0 28px rgba(62,16,25,.3)); }
.gate-vignette { position: absolute; z-index: 4; inset: 0; background: radial-gradient(circle at 50% 55%, transparent 0 13%, rgba(64,12,24,.13) 70%, rgba(50,7,16,.3)); transition: opacity 1.4s 1s; pointer-events: none; }
.gate.opening .gate-vignette { opacity: 0; }
.seal-button {
  position: absolute;
  z-index: 7;
  top: 58%;
  left: 50%;
  width: 195px;
  height: 205px;
  padding: 0;
  color: var(--ivory);
  background: transparent;
  border: 0;
  transform: translate(-50%, -50%);
  filter: blur(0);
  transition: opacity .62s, transform .86s cubic-bezier(.2,.8,.2,1), filter .68s;
  cursor: pointer;
}
.wax-seal {
  width: 154px;
  height: 154px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--gold-light);
  background: radial-gradient(circle at 34% 27%, #c05a70, var(--wine) 44%, var(--wine-dark) 82%);
  border: 8px ridge #8f3043;
  border-radius: 45% 52% 48% 55%;
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 7px var(--wine-dark), inset -12px -16px 28px rgba(30,3,10,.24), 0 17px 34px rgba(59,6,17,.49), 0 0 0 1px rgba(255,232,187,.48);
  animation: sealPulse 2.3s ease-in-out infinite;
}
.wax-seal b { font-size: 42px; font-weight: 400; font-style: italic; }
.wax-seal i { color: var(--ivory); font-size: 25px; }
.open-label { display: block; margin-top: 10px; color: var(--ivory); text-shadow: 0 2px 10px var(--wine-dark); font: 700 10px Arial, sans-serif; letter-spacing: .16em; }
.gate.unsealed .seal-button { opacity: 0; pointer-events: none; filter: blur(2.5px); transform: translate(-50%, -41%) scale(.45) rotate(8deg); }
.gate-hint { position: absolute; z-index: 7; bottom: max(28px, env(safe-area-inset-bottom)); margin: 0; color: var(--wine); font: 700 9px Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; transition: opacity .35s; }
.gate.unsealed .gate-hint { opacity: 0; }
.gate.done { display: none; }

.petals { position: fixed; z-index: 12; inset: 0; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -8vh; width: 10px; height: 15px; opacity: .48; background: linear-gradient(145deg, #f9d9d8, #b76776); border-radius: 70% 30% 65% 35%; filter: drop-shadow(0 2px 2px rgba(104,27,44,.1)); animation: petalFall linear infinite; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); max-width: 86vw; padding: 13px 21px; color: var(--ivory); background: rgba(73,12,25,.92); border: 1px solid rgba(255,248,239,.36); border-radius: 999px; box-shadow: 0 14px 38px rgba(0,0,0,.25); font: 700 11px Arial, sans-serif; text-align: center; transform: translate(-50%, 130%); transition: transform .35s ease; }
.toast.show { transform: translate(-50%, 0); }

.reveal .content,
.content.reveal { opacity: 0; filter: blur(7px); transform: translateY(48px) scale(.985); transition: opacity 1.15s ease, transform 1.25s cubic-bezier(.2,.8,.2,1), filter 1.05s ease; }
.reveal.visible .content,
.content.reveal.visible { opacity: 1; filter: blur(0); transform: none; }

@keyframes bob { 50% { transform: translateY(7px); } }
@keyframes note { 50% { color: #fff; transform: scale(1.2); } }
@keyframes sealPulse { 50% { transform: scale(1.045) rotate(-1deg); box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 7px var(--wine-dark), 0 20px 33px rgba(59,6,17,.52); } }
@keyframes petalFall {
  0% { transform: translate3d(0, -8vh, 0) rotate(0deg) scale(var(--scale)); }
  36% { transform: translate3d(var(--drift-mid), 38vh, 0) rotate(190deg) scale(var(--scale)); }
  72% { transform: translate3d(var(--drift-back), 78vh, 0) rotate(410deg) scale(var(--scale)); }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)) scale(var(--scale)); }
}
@keyframes revealName { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes digitTick { 0% { opacity: .35; transform: translateY(-8px) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes venueFloat { 50% { transform: translateY(-5px); box-shadow: 0 17px 32px rgba(45,6,15,.32); } }
@keyframes venueBreath {
  50% {
    box-shadow:
      0 39px 92px rgba(59,12,28,.36),
      0 0 0 7px rgba(255,248,239,.7),
      0 0 0 8px rgba(184,138,76,.45),
      inset 0 0 0 1px rgba(255,255,255,.3);
  }
}
@keyframes luxurySweep { 0%, 18% { transform: translateX(0) rotate(18deg); opacity: 0; } 30% { opacity: .85; } 56%, 100% { transform: translateX(520%) rotate(18deg); opacity: 0; } }

@media (max-width: 520px) {
  .scene { padding-inline: 18px; }
  .hero-content { transform: translateY(-2vh); }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .countdown div:nth-child(2) { border-right: 0; }
  .countdown div:nth-child(-n + 2) { border-bottom: 1px solid rgba(104,27,44,.16); }
  .section-nav { display: none !important; }
  .qr-card img { width: 145px; height: 145px; }
  .event-line { grid-template-columns: 77px 28px 1fr; }
  .seal-button { top: 59%; }
  .venue-visual { width: 88vw; height: min(58vh, 520px); border-radius: 38px 8px; }
  .venue-visual figcaption { max-width: 60%; font-size: 15px; letter-spacing: .16em; }
}

@media (min-width: 900px) {
  .scene { min-height: 930px; }
  .gate { background: #e8cec8; }
  .envelope-panel { max-width: 500px; }
  .envelope-left { left: calc(50% - 500px); }
  .envelope-right { right: calc(50% - 500px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .gate.opening .envelope-left { transform: translateX(-110%); }
  .gate.opening .envelope-right { transform: translateX(110%); }
}
