/* ------------------------------------------------------------------ */
/*  reset + variables                                                   */
/* ------------------------------------------------------------------ */

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

/* clarroxweb draft banner - always pinned to top */
.draft-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #3D3631;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  padding: 0.5rem 1rem;
  font-family: 'Quicksand', system-ui, sans-serif;
}
.draft-banner a {
  color: #8DB094;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.draft-banner a:hover { color: #fff; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #2d1551;
  color: #fff;
  font-family: 'Quicksand', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }

:root {
  --sky-top:     #050218;
  --sky-mid:     #1a0d3d;
  --sky-bot:     #3a1f6a;
  --horizon:     #6b3aa0;
  --pink:        #ffb4d8;
  --pink-strong: #ff6fb1;
  --gold:        #ffd98a;
  --paper:       #fbf6e9;
  --paper-edge:  #e6dec5;
  --ink:         #2b2440;
  --frost:       #fff5d6;
  --cake-pink:   #ffc1dd;
  --cake-pink-2: #ff9ec5;
  --candle:      #ffd0d0;
}

/* ------------------------------------------------------------------ */
/*  stage + atmosphere                                                  */
/* ------------------------------------------------------------------ */

.stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 110%, var(--horizon) 0%, transparent 55%),
    linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-bot) 100%);
  isolation: isolate;
}

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: var(--star-op, .8);
  animation: twinkle var(--star-dur, 3.4s) ease-in-out infinite;
  animation-delay: var(--star-delay, 0s);
}
.star.lg { width: 3px; height: 3px; box-shadow: 0 0 6px rgba(255,255,255,.7); }
.star.xl {
  width: 4px; height: 4px;
  box-shadow: 0 0 10px rgba(255, 220, 240, .9), 0 0 18px rgba(255, 180, 220, .35);
}
.star.cross {
  width: 14px; height: 14px;
  background: transparent;
  box-shadow: none;
}
.star.cross::before, .star.cross::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, #fff 50%, transparent 55%);
}
.star.cross::after { transform: rotate(90deg); }

@keyframes twinkle {
  0%, 100% { opacity: var(--star-op, .8); transform: scale(1); }
  50%      { opacity: .15; transform: scale(.6); }
}

.shooting-star {
  position: absolute;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, #fff 60%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: shoot 1.6s ease-out forwards;
}
@keyframes shoot {
  0%   { opacity: 0; transform: translate(0,0) rotate(-25deg); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(420px, 200px) rotate(-25deg); }
}

.moon {
  position: absolute;
  top: 8%;
  right: 10%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5e1, #f6dcb0 60%, #c69a64 100%);
  box-shadow:
    0 0 40px rgba(255, 230, 200, .35),
    0 0 90px rgba(255, 180, 220, .15);
  z-index: 2;
}

.ground-glow {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 150, 200, .18), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

/* ------------------------------------------------------------------ */
/*  scene transitions                                                   */
/* ------------------------------------------------------------------ */

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  /* clear room for the clarroxweb banner up top */
  padding-top: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s;
  z-index: 5;
}
.scene.is-active {
  opacity: 1;
  visibility: visible;
}
.scene.is-leaving {
  opacity: 0;
  transition: opacity .6s ease;
}

/* ------------------------------------------------------------------ */
/*  scene 1: landing                                                    */
/* ------------------------------------------------------------------ */

.scene-landing { cursor: pointer; }

.landing-inner {
  text-align: center;
  position: relative;
  padding: 0 24px;
}

.landing-hint {
  margin: 0 0 8px;
  font-family: 'Caveat', cursive;
  font-size: clamp(20px, 4vw, 28px);
  color: var(--pink);
  letter-spacing: .03em;
  opacity: 0;
  animation: fadeUp 1.2s .3s ease-out forwards;
}

.landing-title {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(44px, 9vw, 72px);
  background: linear-gradient(135deg, #fff 0%, #ffd6ec 50%, #ffb4d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .01em;
  opacity: 0;
  animation: fadeUp 1.2s .8s ease-out forwards;
}

.tap-pulse {
  position: relative;
  margin: 30px auto 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 200, 230, .9);
  opacity: 0;
  animation: fadeUp 1s 1.4s ease-out forwards, pulse 2s 1.4s ease-in-out infinite;
}
.tap-pulse::before, .tap-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 200, 230, .55);
  animation: ripple 2s ease-out infinite;
}
.tap-pulse::after { animation-delay: 1s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
@keyframes ripple {
  0%   { transform: scale(.8); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ------------------------------------------------------------------ */
/*  scene 2: walk-in                                                    */
/* ------------------------------------------------------------------ */

.scene-walkin {
  /* characters anchored to bottom */
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4dvh;
}

.char {
  position: absolute;
  bottom: 4dvh;
  width: 38vw;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.45));
  pointer-events: none;
  opacity: 0;
}
.char.judy {
  left: 50%;
  transform: translateX(-130vw);
}
.char.nick {
  left: 50%;
  transform: translateX(130vw);
}

.scene-walkin.is-active .char.judy {
  animation:
    walkin-judy 2.6s .2s cubic-bezier(.22,.7,.3,1) forwards,
    bob 1.1s .2s ease-in-out 4 forwards;
  opacity: 1;
}
.scene-walkin.is-active .char.nick {
  animation:
    walkin-nick 2.6s .2s cubic-bezier(.22,.7,.3,1) forwards,
    bob 1.1s .2s ease-in-out 4 forwards;
  opacity: 1;
}
.scene-walkin.is-paused .char {
  animation-play-state: paused;
}

@keyframes walkin-judy {
  0%   { transform: translate(-130vw, 0); }
  85%  { transform: translate(calc(-50% - 80px), 0); }
  100% { transform: translate(calc(-50% - 60px), 0); }
}
@keyframes walkin-nick {
  0%   { transform: translate(130vw, 0); }
  85%  { transform: translate(calc(-50% + 80px), 0); }
  100% { transform: translate(calc(-50% + 60px), 0); }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* small heart pop above when meet */
.scene-walkin.is-active::after {
  content: "♥";
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, 0) scale(0);
  font-size: 36px;
  color: var(--pink-strong);
  text-shadow: 0 0 22px rgba(255, 130, 180, .8);
  opacity: 0;
  animation: heart-pop 1.6s 2.6s ease-out forwards;
}
@keyframes heart-pop {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.3); }
  35%  { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
  70%  { opacity: 1; transform: translate(-50%, -36px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60px) scale(.8); }
}

/* ------------------------------------------------------------------ */
/*  scene 3: flash + snap polaroid                                       */
/* ------------------------------------------------------------------ */

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 50;
  pointer-events: none;
}
.flash.is-firing {
  animation: flash-fire .55s ease-out;
}
@keyframes flash-fire {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  60%  { opacity: .25; }
  100% { opacity: 0; }
}

.snap-polaroid {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70vw;
  max-width: 280px;
  background: var(--paper);
  padding: 14px 14px 38px;
  box-shadow: 0 24px 40px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.04);
  border-radius: 4px;
  transform: translate(-50%, -50%) scale(.6) rotate(-6deg);
  opacity: 0;
  z-index: 40;
  pointer-events: none;
}
.snap-polaroid img {
  width: 100%;
  height: auto;
  background: #19112e;
  border-radius: 2px;
}
.snap-polaroid p {
  margin: 8px 0 0;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink);
}
.snap-polaroid.is-stamping {
  animation: snap-in 1.8s ease-out forwards;
}
@keyframes snap-in {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(1.6) rotate(-2deg); }
  10%  { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-3deg); }
  25%  { transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
  85%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.98) rotate(-4deg); }
}

/* ------------------------------------------------------------------ */
/*  scene 4: cake + countdown                                            */
/* ------------------------------------------------------------------ */

.scene-cake { gap: 24px; }

.cake-greeting {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(30px, 8vw, 56px);
  background: linear-gradient(135deg, #fff, var(--pink) 60%, var(--pink-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  letter-spacing: .01em;
  min-height: 1.2em;
  padding: 0 16px;
  max-width: 100%;
  text-shadow: 0 0 28px rgba(255, 150, 200, .25);
}

.cake {
  --w: 240px;
  position: relative;
  width: var(--w);
  height: 220px;
  transform: scale(0);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 20px 22px rgba(0,0,0,.4));
}
.scene-cake.is-active .cake {
  animation: cake-pop 1s .5s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes cake-pop {
  0%   { transform: scale(0) translateY(40px); }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cake-plate {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) + 24px);
  height: 14px;
  background: linear-gradient(#f4d186, #c69a4f);
  border-radius: 50%;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.cake-bottom {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--w);
  height: 78px;
  background: linear-gradient(180deg, var(--frost), #f5e3a8);
  border-radius: 8px 8px 4px 4px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.06);
}
.cake-drip.bottom-drip {
  position: absolute;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--w);
  height: 18px;
  background:
    radial-gradient(circle at 12% 0, var(--frost) 10px, transparent 11px),
    radial-gradient(circle at 32% 0, var(--frost) 7px, transparent 8px),
    radial-gradient(circle at 50% 0, var(--frost) 12px, transparent 13px),
    radial-gradient(circle at 70% 0, var(--frost) 8px, transparent 9px),
    radial-gradient(circle at 88% 0, var(--frost) 10px, transparent 11px),
    var(--frost);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.05));
}
.cake-top {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) - 60px);
  height: 64px;
  background: linear-gradient(180deg, var(--cake-pink), var(--cake-pink-2));
  border-radius: 6px 6px 4px 4px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.06);
}
.cake-drip.top-drip {
  position: absolute;
  bottom: 154px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) - 60px);
  height: 14px;
  background:
    radial-gradient(circle at 18% 0, var(--cake-pink) 8px, transparent 9px),
    radial-gradient(circle at 42% 0, var(--cake-pink) 10px, transparent 11px),
    radial-gradient(circle at 65% 0, var(--cake-pink) 7px, transparent 8px),
    radial-gradient(circle at 86% 0, var(--cake-pink) 9px, transparent 10px),
    var(--cake-pink);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.candle {
  --candle-h: 36px;
  position: absolute;
  bottom: 168px;
  left: calc(50% + (var(--i) - 2) * 26px);
  transform: translateX(-50%);
  width: 7px;
  height: var(--candle-h);
  background: repeating-linear-gradient(
    180deg,
    var(--candle) 0 8px,
    #f0a0a0 8px 16px
  );
  border-radius: 2px;
  z-index: 2;
}
.candle:nth-child(2) { background: repeating-linear-gradient(180deg, #c8e4ff 0 8px, #8fc1f2 8px 16px); }
.candle:nth-child(3) { background: repeating-linear-gradient(180deg, #fff2b0 0 8px, #f0c860 8px 16px); }
.candle:nth-child(4) { background: repeating-linear-gradient(180deg, #d8ffd6 0 8px, #95e08c 8px 16px); }
.candle:nth-child(5) { background: repeating-linear-gradient(180deg, #f0d6ff 0 8px, #b58af0 8px 16px); }

.flame {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 8px;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 70%, #fff8a8, #ffb547 55%, #ff5e3a 90%);
  border-radius: 50% 50% 50% 50% / 80% 80% 30% 30%;
  box-shadow: 0 0 14px rgba(255, 170, 60, .7), 0 0 28px rgba(255, 120, 60, .5);
  opacity: 0;
}
.scene-cake.is-active .flame {
  animation:
    flame-on .5s 1.6s ease-out forwards,
    flicker .35s 2.1s ease-in-out infinite alternate;
}
@keyframes flame-on {
  from { opacity: 0; transform: translateX(-50%) scale(.4); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes flicker {
  from { transform: translateX(-50%) scale(.95) translateY(0) skewX(-2deg); }
  to   { transform: translateX(-50%) scale(1.06) translateY(-1px) skewX(2deg); }
}

.cake.is-blown .flame { animation: flame-out .35s ease-out forwards; }
@keyframes flame-out {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  60%  { opacity: 1; transform: translateX(-50%) scale(.4); }
  100% { opacity: 0; transform: translateX(-50%) scale(.1); }
}

.smoke {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(220, 220, 230, .7);
  transform: translateX(-50%);
  opacity: 0;
  filter: blur(2px);
}
.cake.is-blown .smoke { animation: smoke-rise 2s ease-out forwards; }
@keyframes smoke-rise {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.8); }
  20%  { opacity: .8; }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(2.2); }
}

.countdown {
  font-family: 'Caveat', cursive;
  font-size: clamp(80px, 18vw, 140px);
  font-weight: 700;
  color: #fff;
  min-height: 1.1em;
  text-shadow: 0 0 30px rgba(255, 200, 230, .7), 0 0 60px rgba(255, 120, 180, .4);
  line-height: 1;
}
.countdown .num {
  display: inline-block;
  animation: count-pop .7s ease-out;
}
@keyframes count-pop {
  0%   { opacity: 0; transform: scale(.4); }
  40%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(.9); }
}

/* ------------------------------------------------------------------ */
/*  scene 5: envelope + letter                                           */
/* ------------------------------------------------------------------ */

.scene-letter {
  padding: 24px;
  overflow: hidden;
}

.envelope {
  --env-w: 280px;
  position: relative;
  width: var(--env-w);
  height: calc(var(--env-w) * .7);
  cursor: pointer;
  transform: translateY(120vh);
  transition: transform 1.2s cubic-bezier(.22,.7,.3,1), opacity .8s ease;
  filter: drop-shadow(0 22px 30px rgba(0,0,0,.5));
}
.scene-letter.is-active .envelope { transform: translateY(0); }
.envelope.is-fading { opacity: 0; pointer-events: none; }

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ffd0e6, #ff9bcb);
  border-radius: 4px;
}
.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ffe1ee, #ffb4d8);
  border-radius: 4px;
  /* envelope crossing seams */
  background-image:
    linear-gradient(135deg, transparent calc(50% - 1px), rgba(255,255,255,.4) 50%, transparent calc(50% + 1px)),
    linear-gradient(45deg,  transparent calc(50% - 1px), rgba(255,255,255,.4) 50%, transparent calc(50% + 1px)),
    linear-gradient(135deg, #ffe1ee, #ffb4d8);
}
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, #ff9bcb, #ff77b3);
  clip-path: polygon(0 0, 50% 80%, 100% 0);
  transform-origin: 50% 0;
  transition: transform 1s ease-out;
  z-index: 4;
}
.envelope.is-open .envelope-flap {
  transform: rotateX(180deg);
}
.envelope-seal {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: radial-gradient(circle at 35% 35%, #fff, #ffd0d0 40%, #d6385c 100%);
  border-radius: 50%;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,.3), inset 0 0 4px rgba(255,255,255,.3);
  display: grid;
  place-items: center;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  color: #6e1a30;
  font-size: 22px;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  transition: opacity .4s, transform .4s;
}
.envelope.is-open .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.6);
}
.envelope-hint {
  position: absolute;
  bottom: -36px;
  left: 0; right: 0;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--pink);
  margin: 0;
  animation: pulse-soft 1.6s ease-in-out infinite;
}
.envelope.is-open .envelope-hint { display: none; }
@keyframes pulse-soft {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}

.letter {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, 90vw);
  max-height: 80dvh;
  transform: translate(-50%, -40%);
  background: linear-gradient(180deg, var(--paper) 0%, #f3ecd6 100%);
  color: var(--ink);
  border-radius: 6px;
  padding: 32px 28px 24px;
  box-shadow:
    0 30px 60px rgba(0,0,0,.5),
    inset 0 0 0 1px rgba(0,0,0,.05),
    inset 0 0 80px rgba(220, 200, 160, .25);
  font-size: clamp(14px, 3.4vw, 16.5px);
  line-height: 1.65;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, transform .9s ease, visibility .8s;
  z-index: 6;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 28px, rgba(180, 150, 100, .08) 28px 29px),
    linear-gradient(180deg, var(--paper), #f3ecd6);
}
.letter.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.letter::before, .letter::after {
  /* paper torn-corner shadows */
  content: "";
  position: absolute;
  width: 50px; height: 50px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.07) 50%);
  pointer-events: none;
}
.letter::before { top: 0; left: 0; }
.letter::after  { bottom: 0; right: 0; transform: rotate(180deg); }

.letter p { margin: 0 0 14px; }
.letter .letter-greet {
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 5vw, 28px);
  text-align: center;
  color: #c43a73;
  margin-bottom: 18px;
}
.letter .letter-line { font-weight: 600; }
/* admirer line + cta are hidden completely (no reserved space) until
 * scroll-to-bottom triggers them. that way the "real bottom" of the letter
 * is the end of the body text. */
.letter .letter-admirer {
  display: none;
  margin-top: 24px;
  font-family: 'Caveat', cursive;
  font-size: clamp(24px, 5vw, 32px);
  text-align: right;
  color: #c43a73;
}
.letter.show-admirer .letter-admirer {
  display: block;
  animation: letter-fade-in .7s cubic-bezier(.22,.7,.3,1) forwards;
}

.reveal-cta {
  display: none;
  margin: 14px auto 6px;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9bcb, #d6385c);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(214, 56, 92, .35);
  transition: transform .2s ease;
}
.reveal-cta:hover { transform: translateY(-2px); }
.letter.show-cta .reveal-cta {
  display: block;
  animation: letter-fade-in .6s cubic-bezier(.22,.7,.3,1) forwards;
}

@keyframes letter-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ */
/*  scene 6: polaroids + signoff + replay                                */
/* ------------------------------------------------------------------ */

.scene-polaroids {
  padding: 32px 16px;
  gap: 18px;
}

.polaroid-stack {
  position: relative;
  width: min(380px, 90vw);
  height: clamp(280px, 56dvh, 440px);
  margin-bottom: 4px;
}

.polaroid {
  position: absolute;
  top: 0; left: 50%;
  width: clamp(140px, 48%, 200px);
  margin: 0;
  background: var(--paper);
  padding: 10px 10px 30px;
  border-radius: 3px;
  box-shadow:
    0 22px 36px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(0,0,0,.05);
  transform: translate(-50%, -120vh) rotate(-12deg);
  opacity: 0;
}
.polaroid img {
  width: 100%;
  height: auto;
  background: #1a1230;
}
.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink);
}
.polaroid-stack { --spread: clamp(60px, 18vw, 110px); }
.polaroid.p1 { transform: translate(calc(-50% - var(--spread)), -120vh) rotate(-12deg); }
.polaroid.p2 { transform: translate(-50%, -120vh) rotate(0deg); }
.polaroid.p3 { transform: translate(calc(-50% + var(--spread)), -120vh) rotate(12deg); }

.scene-polaroids.is-active .polaroid.p1 {
  animation: drop-1 1.2s .1s cubic-bezier(.22,.8,.3,1.1) forwards;
}
.scene-polaroids.is-active .polaroid.p2 {
  animation: drop-2 1.2s .55s cubic-bezier(.22,.8,.3,1.1) forwards;
}
.scene-polaroids.is-active .polaroid.p3 {
  animation: drop-3 1.2s 1s cubic-bezier(.22,.8,.3,1.1) forwards;
}
@keyframes drop-1 {
  0%   { opacity: 0; transform: translate(calc(-50% - var(--spread)), -120vh) rotate(-30deg); }
  60%  { opacity: 1; transform: translate(calc(-50% - var(--spread)), 8px) rotate(-9deg); }
  100% { opacity: 1; transform: translate(calc(-50% - var(--spread)), 0) rotate(-12deg); }
}
@keyframes drop-2 {
  0%   { opacity: 0; transform: translate(-50%, -120vh) rotate(20deg); }
  60%  { opacity: 1; transform: translate(-50%, 8px) rotate(2deg); }
  100% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); }
}
@keyframes drop-3 {
  0%   { opacity: 0; transform: translate(calc(-50% + var(--spread)), -120vh) rotate(40deg); }
  60%  { opacity: 1; transform: translate(calc(-50% + var(--spread)), 8px) rotate(15deg); }
  100% { opacity: 1; transform: translate(calc(-50% + var(--spread)), 0) rotate(12deg); }
}

.signoff {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-size: clamp(28px, 6vw, 40px);
  color: #fff;
  text-align: center;
  text-shadow: 0 0 22px rgba(255, 200, 230, .5);
  min-height: 1.4em;
}
.signoff .pen {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #ffd0e6;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 0%,100% {opacity:1} 50% {opacity:0} }

.replay {
  margin-top: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 200, 230, .35);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .8s ease, background .2s ease;
}
.replay.is-on { opacity: .95; }
.replay:hover { background: rgba(255, 255, 255, .15); }

/* ------------------------------------------------------------------ */
/*  audio toggle                                                         */
/* ------------------------------------------------------------------ */

.audio-toggle {
  position: absolute;
  /* sits below the clarroxweb banner */
  top: calc(40px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 100;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 200, 230, .25);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: .7;
  transition: opacity .2s, background .2s;
}
.audio-toggle:hover { opacity: 1; background: rgba(255, 255, 255, .15); }
.audio-toggle .icon-off { display: none; }
.audio-toggle.is-muted .icon-on  { display: none; }
.audio-toggle.is-muted .icon-off { display: block; }

/* ------------------------------------------------------------------ */
/*  reduced motion                                                       */
/* ------------------------------------------------------------------ */

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

/* ------------------------------------------------------------------ */
/*  larger screens - shrink characters slightly                          */
/* ------------------------------------------------------------------ */

@media (min-width: 720px) {
  .char { max-width: 380px; width: 32vw; }
  .moon { width: 110px; height: 110px; }
}
@media (min-height: 800px) {
  .cake { --w: 280px; }
}
