/* ─────────────────────────────────────────────────────────────────────
   "Dear You" — a letter, not an invitation
   Cinematic scroll template. Each scene is a full-viewport beat.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --ink:        #2a1d12;
  --ink-soft:   #5d4a36;
  --ink-faded:  #8b7458;
  --paper:      #f8efde;
  --paper-warm: #f2e3c6;
  --gold:       #b08a4a;
  --gold-soft:  #d4b482;
  --night:      #110a06;
  --night-warm: #1f140a;

  --serif:  "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --hand:   "Caveat", "Pinyon Script", cursive;
  --script: "Pinyon Script", cursive;
  --sans:   "Inter Tight", system-ui, sans-serif;
}

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

html, body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

html { scroll-padding-top: 0; }
body { overflow-x: hidden; }

/* Progress ribbon — top-of-page hairline */
.progress-ribbon {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(176, 138, 74, 0.08);
  z-index: 100;
  pointer-events: none;
}
.progress-ribbon > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-soft) 70%, transparent);
  box-shadow: 0 0 8px rgba(176, 138, 74, 0.6);
  transition: width 0.12s linear;
}

/* Generic scene scaffolding ─────────────────────────────────────────── */
.scene {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(10, 6, 4, 0.55) 90%);
}
.vignette--strong {
  background:
    radial-gradient(ellipse at center, transparent 25%, rgba(10, 6, 4, 0.6) 80%),
    linear-gradient(180deg, rgba(10, 6, 4, 0.15) 0%, transparent 20%, transparent 80%, rgba(10, 6, 4, 0.3) 100%);
}

/* ─────────────────────────────────────────────────────────────────────
   SCENE 1 — COVER
   ─────────────────────────────────────────────────────────────────── */
.scene-cover {
  background: radial-gradient(ellipse at 50% 35%, #2a1d12 0%, #110a06 60%, #050302 100%);
  color: var(--paper);
}
.cover-glow {
  position: absolute;
  top: 20%; left: 50%;
  width: 80vmin; height: 80vmin;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(244, 196, 112, 0.18) 0%, transparent 60%);
  filter: blur(20px);
  animation: cover-glow-pulse 6s ease-in-out infinite;
}
@keyframes cover-glow-pulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

.cover-inner {
  position: relative;
  text-align: center;
  max-width: 640px;
  z-index: 2;
}
.cover-eyebrow {
  color: var(--gold-soft);
  margin-bottom: 28px;
  opacity: 0;
  animation: drift-up 1.6s 0.2s cubic-bezier(.22,.7,.25,1) both;
}
.cover-title {
  font-family: var(--script);
  font-size: clamp(72px, 12vw, 156px);
  font-weight: 400;
  color: var(--paper);
  line-height: 0.85;
  letter-spacing: 0.005em;
  margin-bottom: 32px;
}
.cover-title-word {
  display: inline-block;
  opacity: 0;
  animation: drift-up 1.8s cubic-bezier(.22,.7,.25,1) both;
}
.cover-title-word:nth-child(1) { animation-delay: 0.5s; }
.cover-title-word:nth-child(2) { animation-delay: 0.9s; margin-left: 0.2em; color: var(--gold-soft); font-style: italic; }
.cover-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(248, 239, 222, 0.65);
  line-height: 1.6;
  margin-bottom: 64px;
  text-wrap: balance;
  opacity: 0;
  animation: drift-up 2s 1.3s cubic-bezier(.22,.7,.25,1) both;
}

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: drift-up 2s 2s cubic-bezier(.22,.7,.25,1) both;
}
.scroll-hint-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.scroll-hint-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--gold-soft) 55%, var(--gold-soft));
  position: relative;
}
.scroll-hint-line::after {
  /* Clean chevron arrow at the bottom */
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  width: 8px; height: 8px;
  border-right: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  transform: translateX(-50%) rotate(45deg);
  animation: scroll-arrow-bob 2s ease-in-out infinite;
}
@keyframes scroll-arrow-bob {
  0%, 100% { transform: translate(-50%, 0) rotate(45deg); opacity: 0.7; }
  50%      { transform: translate(-50%, 4px) rotate(45deg); opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────
   SCENE 2 — LETTER UNFOLDING (video)
   ─────────────────────────────────────────────────────────────────── */
.scene-unfold {
  background: var(--night);
  padding: 0;
}
.unfold-stage {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* Video crop wrapper — scales the video up so Veo's bottom-right
   watermark is cropped past the edge. */
.video-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--night);
}
.cinematic-video {
  position: absolute;
  inset: 0;
  width: 118%;
  height: 118%;
  object-fit: cover;
  /* Shift up-left so the bottom-right watermark exits the visible area.
     Veo watermarks can be up to ~12% wide, so we crop ~9% off bottom-right. */
  transform: translate(-9%, -9%);
}
.cinematic-video--tear {
  /* Tear video: keep the ink-hit centred, push watermark off-canvas. */
  transform: translate(-9%, -10%);
  width: 118%;
  height: 120%;
}

.unfold-caption {
  position: absolute;
  left: 0; right: 0; bottom: 14vh;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  padding: 0 24px;
}
.unfold-caption-line {
  font-family: var(--hand);
  font-size: clamp(22px, 3vw, 30px);
  color: rgba(248, 239, 222, 0.85);
  letter-spacing: 0.005em;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(20px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.unfold-caption-line.caption-2 {
  margin-top: 12px;
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(248, 239, 222, 0.55);
  font-style: italic;
}
.in-view .unfold-caption-line.caption-1 {
  animation: drift-up 1.6s 1s cubic-bezier(.22,.7,.25,1) forwards;
}
.in-view .unfold-caption-line.caption-2 {
  animation: drift-up 1.6s 2.4s cubic-bezier(.22,.7,.25,1) forwards;
}

/* ─────────────────────────────────────────────────────────────────────
   PAPER SCENES (Scenes 3, 6) — cream paper background, handwritten ink
   ─────────────────────────────────────────────────────────────────── */
.scene-paper {
  background:
    /* Subtle paper grain via radial speckles */
    radial-gradient(circle at 15% 25%, rgba(176, 138, 74, 0.06) 0%, transparent 6%),
    radial-gradient(circle at 75% 65%, rgba(176, 138, 74, 0.05) 0%, transparent 4%),
    radial-gradient(circle at 45% 85%, rgba(176, 138, 74, 0.04) 0%, transparent 5%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  color: var(--ink);
  padding: 100px 24px;
}
.scene-paper::before,
.scene-paper::after {
  /* Paper edge shadows top and bottom — feels like an actual page */
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 30px;
  pointer-events: none;
  z-index: 2;
}
.scene-paper::before {
  top: 0;
  background: linear-gradient(180deg, rgba(60, 40, 20, 0.18), transparent);
}
.scene-paper::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(60, 40, 20, 0.18), transparent);
}

.paper {
  position: relative;
  max-width: 640px;
  width: 100%;
  text-align: left;
  z-index: 1;
}
.paper--centered { text-align: center; }

.paper-hand {
  font-family: var(--hand);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.4s cubic-bezier(.22,.7,.25,1), transform 1.4s cubic-bezier(.22,.7,.25,1);
  text-wrap: pretty;
}
.paper-hand em {
  font-family: var(--script);
  font-style: normal;
  font-size: 1.4em;
  color: var(--gold);
  letter-spacing: 0;
  padding: 0 4px;
}
.paper-hand--accent {
  font-family: var(--script);
  font-size: clamp(36px, 5.5vw, 60px);
  color: var(--gold);
}
.paper-hand--small {
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--ink-soft);
  font-style: italic;
}

/* Reveal — when scene enters view */
.scene-paper.in-view .paper-hand {
  opacity: 1;
  transform: translateY(0);
}
.scene-paper.in-view .paper-hand:nth-child(1) { transition-delay: 0.2s; }
.scene-paper.in-view .paper-hand:nth-child(2) { transition-delay: 1.2s; }
.scene-paper.in-view .paper-hand:nth-child(3) { transition-delay: 2.4s; }

/* ─────────────────────────────────────────────────────────────────────
   SCENE 4 — MEMORIES
   ─────────────────────────────────────────────────────────────────── */
.scene-memories {
  background:
    radial-gradient(circle at 50% 0%, #2a1d12 0%, transparent 50%),
    linear-gradient(180deg, #110a06 0%, #1f140a 100%);
  color: var(--paper);
  flex-direction: column;
  padding: 120px 24px;
}
.memories-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 60px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s, transform 1.2s;
}
.scene-memories.in-view .memories-kicker {
  opacity: 1; transform: translateY(0);
}

.memories {
  list-style: none;
  max-width: 700px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  counter-reset: memory;
}
.memories li {
  position: relative;
  padding: 22px 26px 22px 64px;
  background: rgba(248, 239, 222, 0.04);
  border-left: 1px solid rgba(176, 138, 74, 0.4);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(248, 239, 222, 0.88);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.2s cubic-bezier(.22,.7,.25,1), transform 1.2s cubic-bezier(.22,.7,.25,1);
  counter-increment: memory;
}
.memories li::before {
  content: counter(memory, decimal-leading-zero);
  position: absolute;
  left: 22px; top: 24px;
  font-family: var(--script);
  font-size: 22px;
  color: var(--gold);
  font-style: normal;
}
.scene-memories.in-view .memories li {
  opacity: 1;
  transform: translateY(0);
}
.scene-memories.in-view .memories li:nth-child(1) { transition-delay: 0.3s; }
.scene-memories.in-view .memories li:nth-child(2) { transition-delay: 0.8s; }
.scene-memories.in-view .memories li:nth-child(3) { transition-delay: 1.3s; }
.scene-memories.in-view .memories li:nth-child(4) { transition-delay: 1.8s; }
.scene-memories.in-view .memories li:nth-child(5) { transition-delay: 2.3s; }

/* ─────────────────────────────────────────────────────────────────────
   SCENE 5 — THE TEAR
   ─────────────────────────────────────────────────────────────────── */
.scene-tear {
  background: var(--night);
  padding: 0;
}
.tear-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tear-line {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 3;
  font-family: var(--script);
  font-size: clamp(64px, 11vw, 130px);
  color: var(--paper);
  letter-spacing: 0.005em;
  opacity: 0;
  text-shadow:
    0 0 30px rgba(0,0,0,0.85),
    0 0 60px rgba(0,0,0,0.6),
    0 4px 24px rgba(0,0,0,0.7);
  transition: opacity 2.2s cubic-bezier(.22,.7,.25,1), filter 3s linear, transform 2s cubic-bezier(.22,.7,.25,1);
  filter: blur(0);
  padding: 0 24px;
}
.scene-tear.in-view .tear-line {
  opacity: 1;
  transition-delay: 1s;
}
.scene-tear.tear-fired .tear-line {
  filter: blur(1.4px);
  opacity: 0.92;
  transform: translateY(-50%) scale(1.02);
}

/* ─────────────────────────────────────────────────────────────────────
   SCENE 7 — INVITATION
   ─────────────────────────────────────────────────────────────────── */
.scene-invite {
  background:
    radial-gradient(ellipse at 50% 0%, #2a1d12 0%, transparent 60%),
    linear-gradient(180deg, #1a0f08 0%, #0d0703 100%);
  color: var(--paper);
  padding: 120px 24px;
  flex-direction: column;
}
.invite-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  text-align: center;
  padding: 56px 36px;
  background: rgba(248, 239, 222, 0.03);
  border: 1px solid rgba(176, 138, 74, 0.28);
  border-radius: 4px;
  z-index: 2;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.6s cubic-bezier(.22,.7,.25,1), transform 1.6s cubic-bezier(.22,.7,.25,1);
}
.invite-card::before,
.invite-card::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--gold-soft);
  opacity: 0.5;
}
.invite-card::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.invite-card::after  { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.scene-invite.in-view .invite-card { opacity: 1; transform: translateY(0); }

.invite-closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2.2vw, 21px);
  color: rgba(248, 239, 222, 0.85);
  line-height: 1.6;
  margin-bottom: 36px;
  text-wrap: pretty;
}
.invite-divider {
  display: flex; justify-content: center;
  color: var(--gold-soft);
  margin-bottom: 30px;
}
.invite-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.invite-names {
  font-family: var(--script);
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 400;
  color: var(--paper);
  line-height: 1;
  margin-bottom: 22px;
}
.invite-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--gold-soft);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.invite-venue {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 239, 222, 0.55);
  margin-bottom: 36px;
}

.invite-signoff,
.invite-signature {
  font-family: var(--hand);
  color: var(--paper);
}
.invite-signoff {
  font-size: clamp(20px, 2.4vw, 24px);
  color: rgba(248, 239, 222, 0.7);
  margin-bottom: 4px;
}
.invite-signature {
  font-size: clamp(34px, 4.5vw, 48px);
  color: var(--gold-soft);
  margin-bottom: 40px;
}

.invite-cta-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.invite-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .3s, box-shadow .3s, background .3s;
  box-shadow: 0 8px 24px -8px rgba(244, 196, 112, 0.4);
}
.invite-cta:hover {
  transform: translateY(-2px);
  background: var(--gold-soft);
  box-shadow: 0 14px 36px -10px rgba(244, 196, 112, 0.6);
}
.invite-cta svg { transition: transform .3s; }
.invite-cta:hover svg { transform: translateX(4px); }

.invite-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: 0;
  color: rgba(248, 239, 222, 0.55);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s;
}
.invite-replay:hover { color: var(--gold-soft); }

/* Paper petals drifting at the bottom of the final scene */
.petal {
  position: absolute;
  width: 14px; height: 22px;
  background: linear-gradient(135deg, #f8efde, #e9cfa8);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0;
  z-index: 1;
}
.scene-invite.in-view .petal {
  animation: petal-drift 14s linear infinite;
  opacity: 0.8;
}
.scene-invite.in-view .petal--1 { left: 15%; animation-delay: 0s;   animation-duration: 16s; }
.scene-invite.in-view .petal--2 { left: 55%; animation-delay: -6s;  animation-duration: 18s; transform: rotate(20deg); }
.scene-invite.in-view .petal--3 { left: 80%; animation-delay: -10s; animation-duration: 20s; transform: rotate(-15deg); }

@keyframes petal-drift {
  0%   { top: -10%;  transform: translateX(0) rotate(0);     opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { top: 110%; transform: translateX(40px) rotate(360deg); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────────────────
   Shared animations
   ─────────────────────────────────────────────────────────────────── */
@keyframes drift-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduce-motion fallback */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .cinematic-video { display: none; }
  .scene-unfold, .scene-tear { background: var(--night-warm); min-height: 50vh; }
}

/* ─────────────────────────────────────────────────────────────────────
   Mobile
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .scene { padding: 60px 22px; }
  .scene-paper { padding: 80px 22px; }
  .invite-card { padding: 44px 26px; }
  .memories li { padding: 18px 20px 18px 56px; }
}

.paper-hand--tiny {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--ink-faded);
  margin-top: -8px;
  margin-bottom: 18px;
  letter-spacing: 0;
}
.paper-unit {
  font-family: var(--sans);
  font-size: 0.38em;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  vertical-align: middle;
  margin-left: 14px;
}
.scene-stats .paper-hand--accent {
  font-size: clamp(96px, 14vw, 156px);
  margin-bottom: 6px;
}
.scene-stats .paper-hand--accent span:first-child {
  font-family: var(--script);
}

.tear-sub {
  position: absolute;
  left: 0; right: 0;
  bottom: 24vh;
  text-align: center;
  z-index: 3;
  padding: 0 32px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 2vw, 19px);
  color: rgba(248, 239, 222, 0.72);
  line-height: 1.5;
  opacity: 0;
  text-wrap: pretty;
  transition: opacity 2s cubic-bezier(.22,.7,.25,1);
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.scene-tear.tear-fired .tear-sub { opacity: 1; }

/* ─────────────────────────────────────────────────────────────────────
   SCENE 7 — THREE DOORS — the actual ask
   ─────────────────────────────────────────────────────────────────── */
.scene-doors {
  background:
    radial-gradient(ellipse at 50% 0%, #2a1d12 0%, transparent 60%),
    linear-gradient(180deg, #1a0f08 0%, #0d0703 100%);
  color: var(--paper);
  padding: 110px 24px 140px;
  flex-direction: column;
  align-items: center;
}
.doors-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.4s cubic-bezier(.22,.7,.25,1), transform 1.4s cubic-bezier(.22,.7,.25,1);
}
.scene-doors.in-view .doors-inner { opacity: 1; transform: translateY(0); }

.doors-closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 24px);
  color: rgba(248, 239, 222, 0.85);
  line-height: 1.5;
  margin-bottom: 24px;
  text-wrap: pretty;
  max-width: 24ch;
  margin-left: auto; margin-right: auto;
}
.doors-divider {
  display: flex; justify-content: center;
  color: var(--gold-soft);
  margin-bottom: 40px;
}

.doors-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 52px;
  text-align: left;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 22px 64px;
  border-radius: 6px;
  text-decoration: none;
  background: rgba(248, 239, 222, 0.04);
  border: 1px solid rgba(176, 138, 74, 0.32);
  color: var(--paper);
  transition: transform .4s cubic-bezier(.22,.7,.25,1), border-color .4s, background .4s, box-shadow .4s;
  overflow: hidden;
}
.door::before {
  /* Faint gold edge highlight at the top */
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid transparent;
  background: linear-gradient(135deg, rgba(244, 196, 112, 0.12) 0%, transparent 30%);
  pointer-events: none;
  transition: opacity .4s, border-color .4s;
  opacity: 0;
}
.door:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 196, 112, 0.7);
  background: rgba(248, 239, 222, 0.08);
  box-shadow: 0 24px 50px -22px rgba(244, 196, 112, 0.35);
}
.door:hover::before { opacity: 1; }

.door-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.door-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--paper);
  line-height: 1.05;
  text-wrap: balance;
}
.door-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(248, 239, 222, 0.65);
  line-height: 1.55;
  text-wrap: pretty;
}
.door-arrow {
  position: absolute;
  bottom: 22px; right: 22px;
  font-size: 22px;
  color: var(--gold-soft);
  font-family: var(--serif);
  transition: transform .4s;
}
.door:hover .door-arrow { transform: translateX(6px); }

.door--bold {
  background: linear-gradient(180deg, rgba(244, 196, 112, 0.18), rgba(244, 196, 112, 0.04));
  border-color: rgba(244, 196, 112, 0.55);
}
.door--bold:hover {
  background: linear-gradient(180deg, rgba(244, 196, 112, 0.28), rgba(244, 196, 112, 0.08));
  box-shadow: 0 28px 56px -20px rgba(244, 196, 112, 0.5);
}

.doors-signoff,
.doors-signature,
.doors-ps {
  font-family: var(--hand);
  color: var(--paper);
  text-align: center;
}
.doors-signoff {
  font-size: clamp(20px, 2.4vw, 24px);
  color: rgba(248, 239, 222, 0.7);
  margin-bottom: 4px;
}
.doors-signature {
  font-size: clamp(36px, 5vw, 52px);
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.doors-ps {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(248, 239, 222, 0.55);
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(176, 138, 74, 0.22);
  max-width: 28ch;
  margin-left: auto; margin-right: auto;
  line-height: 1.55;
}

.doors-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  padding: 10px 18px;
  background: transparent;
  border: 0;
  color: rgba(248, 239, 222, 0.5);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s;
}
.doors-replay:hover { color: var(--gold-soft); }

/* Memory section footer (added in v3) */
.memories-footer {
  margin-top: 50px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 17px);
  color: rgba(248, 239, 222, 0.5);
  text-align: center;
  max-width: 36ch;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s 1.8s cubic-bezier(.22,.7,.25,1), transform 1.2s 1.8s cubic-bezier(.22,.7,.25,1);
}
.scene-memories.in-view .memories-footer { opacity: 1; transform: translateY(0); }

/* Mobile: doors stack to a single column */
@media (max-width: 720px) {
  .doors-row { grid-template-columns: 1fr; gap: 12px; }
  .door { padding: 22px 20px 58px; }
}

/* The old wedding-invite scene is removed — hide stragglers */
.scene-invite { display: none !important; }


/* ─── COVER background photo strip ──────────────────────────────────── */
.cover-photo-strip {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
  opacity: 0.18;
  filter: grayscale(0.4) sepia(0.25) blur(0.5px);
  pointer-events: none;
  animation: cover-strip-drift 24s linear infinite alternate;
}
.cover-photo-strip img {
  width: 33.3333%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}
.cover-photo-strip img:nth-child(1) { object-position: 40% 50%; }
.cover-photo-strip img:nth-child(2) { object-position: 60% 50%; }
@keyframes cover-strip-drift {
  from { transform: scale(1.05) translateX(-1.5%); }
  to   { transform: scale(1.08) translateX(1.5%); }
}

/* ─── SCENE 3 — PHOTO LADDER ───────────────────────────────────────── */
.scene-album {
  background:
    radial-gradient(circle at 50% 0%, #2a1d12 0%, transparent 50%),
    linear-gradient(180deg, #110a06 0%, #1f140a 100%);
  color: var(--paper);
  flex-direction: column;
  padding: 120px 24px 100px;
}
.album-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s, transform 1s;
}
.album-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  color: var(--paper);
  text-align: center;
  margin-bottom: 80px;
  line-height: 1.1;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s 0.2s, transform 1.2s 0.2s;
}
.album-headline em {
  font-family: var(--script);
  color: var(--gold-soft);
  font-style: italic;
  font-size: 1.1em;
  font-weight: 400;
}
.scene-album.in-view .album-kicker,
.scene-album.in-view .album-headline {
  opacity: 1; transform: translateY(0);
}

.photo-ladder {
  list-style: none;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 100px;
  padding: 0;
}
.photo-ladder li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(.22,.7,.25,1), transform 1.2s cubic-bezier(.22,.7,.25,1);
}
.photo-ladder li.is-visible {
  opacity: 1; transform: translateY(0);
}
.photo-ladder li:nth-child(even) { grid-template-columns: 1fr 1fr; }
.photo-ladder li:nth-child(even) .pl-frame { order: 2; }
.photo-ladder li:nth-child(even) .pl-text  { order: 1; text-align: right; }

.pl-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 230, 180, 0.12) inset,
    0 28px 60px -22px rgba(0, 0, 0, 0.7),
    0 6px 14px -6px rgba(0, 0, 0, 0.4);
  transform: rotate(-1.2deg);
  transition: transform .6s cubic-bezier(.22,.7,.25,1);
}
.pl-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.5s cubic-bezier(.22,.7,.25,1);
}
.photo-ladder li:nth-child(even) .pl-frame { transform: rotate(1.4deg); }
.photo-ladder li.is-visible .pl-frame img {
  /* Subtle Ken Burns when in view */
  transform: scale(1.06);
}
.photo-ladder li:hover .pl-frame { transform: rotate(0); }

.pl-text {
  text-align: left;
}
.pl-index {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 14px;
  display: inline-block;
}
.pl-caption {
  font-family: var(--hand);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  color: var(--paper);
  line-height: 1.2;
  margin-bottom: 16px;
  text-wrap: balance;
}
.pl-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(248, 239, 222, 0.7);
  line-height: 1.6;
  max-width: 36ch;
  text-wrap: pretty;
}
.photo-ladder li:nth-child(even) .pl-note { margin-left: auto; }

/* ─── SCENE 5 — POLAROID WALL ──────────────────────────────────────── */
.scene-polaroids {
  background:
    /* Subtle paper grain via radial speckles */
    radial-gradient(circle at 20% 30%, rgba(176, 138, 74, 0.05) 0%, transparent 5%),
    radial-gradient(circle at 80% 70%, rgba(176, 138, 74, 0.04) 0%, transparent 4%),
    linear-gradient(180deg, #f3e3c4 0%, #e9d4a8 100%);
  color: var(--ink);
  flex-direction: column;
  padding: 110px 24px 130px;
  overflow: visible;
}
.polaroids-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
}
.polaroids-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  color: var(--ink);
  text-align: center;
  margin-bottom: 60px;
  line-height: 1.1;
  text-wrap: balance;
}
.polaroids-headline em {
  font-family: var(--script);
  color: var(--gold);
  font-style: italic;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 36px 24px;
  width: min(100%, 920px);
  max-width: 920px;
  margin: 0 auto;
  perspective: 1400px;
}

.polaroid {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.22,.7,.25,1);
}
.polaroid:nth-child(odd)  { transform: rotate(-2.2deg); }
.polaroid:nth-child(even) { transform: rotate(1.8deg); }
.polaroid:nth-child(3n)   { transform: rotate(-1deg) translateY(8px); }

.polaroid.is-flipped { transform: rotateY(180deg) !important; }
.polaroid:hover:not(.is-flipped) {
  transform: rotate(0) translateY(-6px) scale(1.02);
}

.polaroid-face {
  position: absolute;
  inset: 0;
  background: #fdf8ec;
  border: 1px solid rgba(176, 138, 74, 0.18);
  padding: 14px 14px 50px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 20px 38px -18px rgba(58, 30, 18, 0.45),
    0 6px 14px -6px rgba(58, 30, 18, 0.25);
  display: flex;
  flex-direction: column;
}
.polaroid-face--front {
  align-items: stretch;
}
.polaroid-face--back {
  visibility: hidden;
}
.polaroid.is-flipped .polaroid-face--back {
  visibility: visible;
}
.polaroid.is-flipped .polaroid-face--front {
  visibility: hidden;
}
.polaroid-photo {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-color: #2a1d12;
}
.polaroid-caption {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  text-align: center;
}
.polaroid-title {
  display: block;
  font-family: var(--hand);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.polaroid-front-sub {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faded);
  margin-top: 4px;
}

.polaroid-face--back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #fdf8ec 0%, #f5e4be 100%);
  align-items: center;
  justify-content: center;
  padding: 22px 20px;
}
.polaroid-back-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}
.polaroid-back-corner {
  position: absolute;
  top: 12px; right: 14px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* "tap to flip" hint on first card */
.polaroid:first-child::after {
  content: "tap to flip ->";
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  font-family: var(--hand);
  font-size: 18px;
  color: var(--gold);
  white-space: nowrap;
  animation: tap-hint-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
.polaroid:first-child.is-flipped::after { opacity: 0; }
@keyframes tap-hint-pulse {
  0%, 100% { opacity: 0.85; transform: translate(-50%, 0); }
  50%      { opacity: 1;    transform: translate(-50%, -3px); }
}

/* ─── SCENE 8 — SCRATCH TO REVEAL ──────────────────────────────────── */
.scene-scratch {
  background:
    radial-gradient(ellipse at 50% 40%, #2a1d12 0%, #0d0703 70%, #050302 100%);
  color: var(--paper);
  flex-direction: column;
  padding: 120px 24px;
}
.scratch-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scratch-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 14px;
}
.scratch-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--paper);
  margin-bottom: 36px;
  text-align: center;
}

.scratch-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 460px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--night);
  box-shadow:
    0 1px 0 rgba(255, 230, 180, 0.08) inset,
    0 24px 60px -24px rgba(176, 138, 74, 0.5),
    0 8px 18px -8px rgba(0, 0, 0, 0.6);
}
.scratch-hidden {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background:
    radial-gradient(ellipse at center, #2a1d12 0%, #0d0703 80%);
  z-index: 1;
}
.scratch-hidden-text {
  font-family: var(--script);
  font-size: clamp(64px, 11vw, 110px);
  color: var(--paper);
  letter-spacing: 0.005em;
  line-height: 1;
  margin-bottom: 18px;
  text-shadow:
    0 0 24px rgba(244, 196, 112, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.6);
}
.scratch-hidden-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(248, 239, 222, 0.7);
  line-height: 1.5;
  max-width: 24ch;
  text-wrap: pretty;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
  transition: opacity 1.2s cubic-bezier(.22,.7,.25,1);
}
.scratch-card.is-revealed .scratch-canvas {
  opacity: 0;
  pointer-events: none;
}

.scratch-prompt {
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  text-align: center;
  z-index: 3;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(248, 239, 222, 0.5);
  pointer-events: none;
  animation: scratch-prompt-pulse 1.8s ease-in-out infinite;
}
.scratch-card.is-revealed .scratch-prompt {
  opacity: 0;
  transition: opacity .6s;
}
@keyframes scratch-prompt-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

/* Floating hearts that burst out once she reveals it */
.scratch-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.sh {
  position: absolute;
  left: 50%; top: 50%;
  font-size: 28px;
  color: #e8556d;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  filter: drop-shadow(0 4px 12px rgba(232, 85, 109, 0.5));
}
.scene-scratch.hearts-fly .sh {
  animation: heart-burst 2.4s ease-out forwards;
}
.scene-scratch.hearts-fly .sh--1 { animation-delay: 0.0s;   --hx: -140px; --hy: -160px; }
.scene-scratch.hearts-fly .sh--2 { animation-delay: 0.12s;  --hx:  130px; --hy: -180px; }
.scene-scratch.hearts-fly .sh--3 { animation-delay: 0.24s;  --hx: -180px; --hy:  -80px; }
.scene-scratch.hearts-fly .sh--4 { animation-delay: 0.36s;  --hx:  170px; --hy:  -50px; }
.scene-scratch.hearts-fly .sh--5 { animation-delay: 0.48s;  --hx:   20px; --hy: -220px; }
@keyframes heart-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--hx)), calc(-50% + var(--hy))) scale(1);
  }
}

/* ─── Doors mobile + small tweaks ──────────────────────────────────── */
@media (max-width: 720px) {
  .photo-ladder { gap: 70px; }
  .photo-ladder li { grid-template-columns: 1fr !important; gap: 18px; text-align: center; }
  .photo-ladder li:nth-child(even) .pl-frame { order: 0; }
  .photo-ladder li:nth-child(even) .pl-text  { order: 1; text-align: center; }
  .photo-ladder li .pl-text { text-align: center; }
  .pl-note { margin-left: auto; margin-right: auto; }

  .polaroid-grid { grid-template-columns: 1fr 1fr; gap: 30px 16px; }
}
@media (max-width: 480px) {
  .polaroid-grid { grid-template-columns: 1fr; gap: 36px; width: min(100%, 280px); max-width: 280px; }
}

/* Force black-ink look on the cinematic videos (Veo source has brown ink). */
.cinematic-video { filter: grayscale(1) contrast(1.32) brightness(0.92); }
.cinematic-video--tear { filter: grayscale(1) contrast(1.45) brightness(0.88); }


/* ─── ENTRY GATE — pull the curtains ───────────────────────────────── */
/* Lock the page scroll while the gate is up. */
body.gate-active { overflow: hidden; }

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: auto;
  isolation: isolate;
  /* Smooth disappearance when opened */
  transition: opacity 1.2s cubic-bezier(.22,.7,.25,1) 0.3s,
              visibility 0s 1.5s;
}
.entry-gate.gate-opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(244,196,112,0.18) 0%, transparent 55%),
    linear-gradient(180deg, #0d0508 0%, #050203 100%);
  z-index: 0;
}

/* Ornamental valance across the top */
.gate-pelmet {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5));
}
.gate-pelmet svg { width: 100%; height: 100%; display: block; }

/* Each curtain takes half the viewport. */
.gate-curtain {
  position: absolute;
  top: 0; bottom: 0;
  width: 52%;
  z-index: 2;
  will-change: transform;
  /* Drag is JS-driven; the snap-back transition is here. */
  transition: transform 0.6s cubic-bezier(.22,.7,.25,1);
  filter:
    drop-shadow(0 0 22px rgba(0,0,0,0.45))
    drop-shadow(0 12px 28px rgba(0,0,0,0.35));
}
.gate-curtain--l { left: 0; transform-origin: left center; }
.gate-curtain--r { right: 0; transform-origin: right center; }
.entry-gate.is-dragging .gate-curtain { transition: none; }

/* SVG fills the full curtain area */
.gate-curtain-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

/* When fully opened the curtains slide all the way off-screen */
.entry-gate.gate-opened .gate-curtain--l { transform: translateX(-105%) skewX(-2deg); }
.entry-gate.gate-opened .gate-curtain--r { transform: translateX( 105%) skewX( 2deg); }

/* Tassel hanging from the inner edge of each curtain */
.gate-tassel {
  position: absolute;
  top: 8%;
  width: 14px; height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.gate-tassel--l { right: 18px; }
.gate-tassel--r { left: 18px; }

.gate-rope {
  width: 2px;
  height: 36px;
  background: linear-gradient(180deg, #b07a36, #6e4a1c);
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.gate-knot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4c470 0%, #b07a36 65%, #5a3a18 100%);
  box-shadow: 0 0 6px rgba(244,196,112,0.45), 0 2px 4px rgba(0,0,0,0.5);
  margin: -2px 0;
}
.gate-fringe {
  width: 14px; height: 58px;
  background:
    repeating-linear-gradient(180deg,
      #d4a458 0 2px,
      #8b6028 2px 4px);
  border-radius: 2px 2px 50% 50% / 2px 2px 12% 12%;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));
}

/* ── Centre prompt ───────────────────────────────────────────────── */
.gate-prompt {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  text-align: center;
  color: var(--paper);
  padding: 0 20px;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.5s cubic-bezier(.22,.7,.25,1);
}
.entry-gate.is-dragging .gate-prompt { opacity: 0.25; transform: translate(-50%, -50%) scale(0.97); }
.entry-gate.gate-opened .gate-prompt { opacity: 0; }

.gate-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
  opacity: 0;
  animation: gate-fade-up 1.4s 0.3s cubic-bezier(.22,.7,.25,1) both;
}
.gate-title {
  font-family: var(--script);
  font-size: clamp(56px, 9vw, 100px);
  font-weight: 400;
  color: var(--paper);
  line-height: 0.9;
  margin-bottom: 32px;
  text-shadow: 0 4px 32px rgba(0,0,0,0.7);
  opacity: 0;
  animation: gate-fade-up 1.6s 0.5s cubic-bezier(.22,.7,.25,1) both;
}
.gate-title em { color: var(--gold-soft); font-style: italic; }
.gate-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(248,239,222,0.75);
  margin-bottom: 36px;
  opacity: 0;
  animation: gate-fade-up 1.6s 0.8s cubic-bezier(.22,.7,.25,1) both;
}

.gate-arrows {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--gold-soft);
  opacity: 0;
  animation: gate-fade-up 1.8s 1.1s cubic-bezier(.22,.7,.25,1) both;
}
.gate-arrow--l { animation: gate-arrow-pulse-l 2.4s ease-in-out infinite; }
.gate-arrow--r { animation: gate-arrow-pulse-r 2.4s ease-in-out infinite; }
.gate-hand-line {
  width: 70px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
@keyframes gate-arrow-pulse-l {
  0%, 100% { transform: translateX(0);  opacity: 0.85; }
  50%      { transform: translateX(-8px); opacity: 1; }
}
@keyframes gate-arrow-pulse-r {
  0%, 100% { transform: translateX(0);  opacity: 0.85; }
  50%      { transform: translateX( 8px); opacity: 1; }
}
@keyframes gate-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── RESTORED — stats counter helper + photo-ladder parallax ────── */
.scene-stats .paper-hand--accent span:first-child {
  display: inline-block;
  min-width: 0.6em;
  font-variant-numeric: tabular-nums;
}
.photo-ladder .pl-frame { will-change: transform; }

/* Product guardrails for the inactive Dear You template too. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.cover-title,
.invite-names,
.polaroids-headline,
.scratch-headline,
.scratch-hidden-text,
.gate-title,
.door-label,
.doors-signature {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (max-width: 520px), (max-height: 700px) {
  .cover-title,
  .invite-names,
  .gate-title {
    font-size: clamp(44px, min(15vw, 12svh), 78px) !important;
    line-height: .92 !important;
  }

  .polaroids-headline,
  .scratch-headline,
  .scratch-hidden-text {
    font-size: clamp(34px, min(12vw, 10svh), 58px) !important;
  }

  .scratch-card,
  .doors-inner {
    max-width: calc(100vw - 28px) !important;
  }
}
