/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #03030c;
  --bg-mid: #0b0716;
  --bg-light: #120921;
  --bg-glow: #1a0a2f;
  --gold: #f3c258;
  --gold-soft: #ffde94;
  --rose: #f9a3c2;
  --rose-deep: #e86392;
  --pink-bright: #ff3377;
  --purple: #cca6ff;
  --purple-deep: #8553f2;
  --cream: #fff8f2;
  --text: #fdfaff;
  --text-muted: #cdbedb;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  overflow-x: hidden;
  width: 100%;
  touch-action: pan-y;
}

body {
  min-height: 100dvh;
  width: 100%;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(133, 83, 242, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(255, 51, 119, 0.1) 0%, transparent 45%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 40%, var(--bg-light) 70%, var(--bg-glow) 100%);
  overflow-x: hidden;
  line-height: 1.7;
  touch-action: pan-y;
}

.page-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.65);
}

/* ── Stars Background ── */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.75) 50%, transparent 50%),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 70% 45%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 85% 75%, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(255, 255, 255, 0.45) 50%, transparent 50%),
    radial-gradient(1px 1px at 45% 40%, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    radial-gradient(1px 1px at 92% 10%, rgba(255, 255, 255, 0.65) 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 90%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 25% 35%, rgba(243, 194, 88, 0.45) 50%, transparent 50%),
    radial-gradient(1px 1px at 78% 28%, rgba(204, 166, 255, 0.4) 50%, transparent 50%);
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.68; }
  100% { opacity: 1; }
}

/* ── Interactive Particle Canvas ── */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ── Aurora Background Glows (Cosmic Rose Redesign) ── */
.aurora-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.8;
}

.aurora-glow::before,
.aurora-glow::after {
  content: '';
  position: absolute;
  filter: blur(100px);
  border-radius: 50%;
  opacity: 0.16;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

.aurora-glow::before {
  top: -15%;
  left: -10%;
  width: min(85vw, 36rem);
  height: min(85vw, 36rem);
  background: radial-gradient(circle, var(--pink-bright) 0%, transparent 70%);
}

.aurora-glow::after {
  bottom: -20%;
  right: -5%;
  width: min(90vw, 42rem);
  height: min(90vw, 42rem);
  background: radial-gradient(circle, var(--purple-deep) 0%, transparent 70%);
  animation-delay: -7s;
  animation-duration: 30s;
}

@keyframes aurora-drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(8vw, 6dvh) scale(1.15) rotate(180deg); }
  100% { transform: translate(-4vw, -8dvh) scale(0.92) rotate(360deg); }
}

/* ── Floating Audio Control ── */
.audio-control-wrap {
  position: fixed;
  top: min(1.5rem, env(safe-area-inset-top, 1.25rem));
  right: 1.25rem;
  z-index: 290;
}

.audio-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(243, 194, 88, 0.22);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.35s var(--ease-bounce), background 0.35s, border-color 0.35s;
  -webkit-tap-highlight-color: transparent;
}

.audio-toggle-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(243, 194, 88, 0.45);
}

.audio-toggle-btn:active {
  transform: scale(0.92);
}

.audio-toggle-btn:not(.audio-toggle-btn--muted) {
  border-color: rgba(243, 194, 88, 0.5);
  box-shadow:
    0 0 16px rgba(243, 194, 88, 0.25),
    0 4px 20px rgba(0, 0, 0, 0.32);
  animation: audio-glow-pulse 2s infinite ease-in-out;
}

@keyframes audio-glow-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 16px rgba(243, 194, 88, 0.25); }
  50% { transform: scale(1.05); box-shadow: 0 0 24px rgba(243, 194, 88, 0.45); }
}

/* ── Countdown Overlay Screen ── */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #04030a;
  overflow: hidden;
  padding: 2rem 1.25rem;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.countdown-overlay.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.countdown-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.countdown-overlay__aurora {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(133, 83, 242, 0.14) 0%, transparent 55%),
    radial-gradient(circle at 65% 65%, rgba(255, 51, 119, 0.14) 0%, transparent 55%);
  animation: countdown-spin 35s linear infinite;
  pointer-events: none;
}

@keyframes countdown-spin {
  to { transform: rotate(360deg); }
}

.countdown-overlay__content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  max-width: 28rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(243, 194, 88, 0.2);
  border-radius: 1.5rem;
  padding: 2.75rem 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.countdown-heart-wrap {
  margin-bottom: 1.5rem;
}

.countdown-heart {
  background: none;
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  background: rgba(255, 51, 119, 0.07);
  border: 1px solid rgba(255, 51, 119, 0.22);
  box-shadow:
    0 0 20px rgba(255, 51, 119, 0.15),
    inset 0 0 10px rgba(255, 51, 119, 0.08);
  animation: heart-beat 1.6s infinite ease-in-out;
  transition: transform 0.3s var(--ease-bounce), background 0.3s, border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.countdown-heart:hover {
  transform: scale(1.1);
  background: rgba(255, 51, 119, 0.14);
  border-color: rgba(255, 51, 119, 0.45);
  box-shadow:
    0 0 32px rgba(255, 51, 119, 0.28),
    inset 0 0 12px rgba(255, 51, 119, 0.12);
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.08); }
  50% { transform: scale(0.96); }
}

.countdown-overlay__label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 14px rgba(255, 51, 119, 0.35);
}

.countdown-overlay__title {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 6.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 2rem;
}

.countdown-clock {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.countdown-time-box {
  flex: 1;
  max-width: 5.2rem;
  padding: 0.85rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.countdown-number {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.45rem, 5.5vw, 2rem);
  color: var(--gold-soft);
  line-height: 1.1;
  text-shadow: 0 0 16px rgba(243, 194, 88, 0.25);
}

.countdown-unit {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.countdown-overlay__subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Birthday Cinema ── */
.birthday-cinema {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #060305;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.birthday-cinema.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.birthday-cinema.fade-out {
  opacity: 0;
}

.birthday-cinema__stage {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 40%, rgba(243, 194, 88, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #15060e 0%, #060305 100%);
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  z-index: 20;
  background:
    repeating-linear-gradient(
      90deg,
      #460715 0px,
      #660e24 8px,
      #3a0512 16px,
      #73132c 24px
    );
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.65);
  transition: transform 2.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.curtain--left {
  left: 0;
  transform: translateX(0);
  border-right: 3px solid rgba(0, 0, 0, 0.45);
}

.curtain--right {
  right: 0;
  transform: translateX(0);
  border-left: 3px solid rgba(0, 0, 0, 0.45);
}

.birthday-cinema.curtains-open .curtain--left {
  transform: translateX(-100%);
}

.birthday-cinema.curtains-open .curtain--right {
  transform: translateX(100%);
}

.birthday-cinema__content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 2rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Rhythmic Stage Greeting Card (Fades in first) */
.birthday-greeting {
  opacity: 0;
  transform: scale(0.72) translateY(2.5rem);
  transition:
    opacity 1.2s var(--ease-out),
    transform 1.2s var(--ease-bounce);
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  width: 100%;
}

.birthday-cinema.show-greeting .birthday-greeting {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.birthday-greeting-card {
  position: relative;
  max-width: 25rem;
  width: 100%;
  padding: 2.75rem 2rem 3.25rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 51, 119, 0.28);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(255, 51, 119, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
  transform: rotateX(8deg);
  animation: float-card 4s ease-in-out infinite alternate;
}

@keyframes float-card {
  0% { transform: rotateX(8deg) translateY(0); }
  100% { transform: rotateX(4deg) translateY(-8px); }
}

.birthday-greeting-card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 51, 119, 0.2) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 1.5rem;
}

.birthday-greeting.hide {
  opacity: 0;
  transform: scale(1.05) translateY(-2rem);
  transition: opacity 0.8s ease-in, transform 0.8s ease-in;
  pointer-events: none;
}

.birthday-greeting__happy {
  font-family: var(--sans);
  font-size: clamp(0.85rem, 3.5vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}

.birthday-greeting__name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 16vw, 6rem);
  font-weight: 600;
  line-height: 0.95;
  margin-bottom: 0.25rem;
  background: linear-gradient(180deg, #fff9e6 0%, var(--gold-soft) 35%, var(--gold) 70%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 32px rgba(0, 0, 0, 0.72));
}

.birthday-greeting__love {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.85rem, 7.5vw, 2.60rem);
  font-weight: 700;
  color: #ffeff3;
  text-shadow:
    0 0 5px #ff3377,
    0 0 15px #ff3377,
    0 0 30px #ff6699;
  animation: love-pulse 1.5s ease-in-out infinite alternate;
  margin-top: 0.85rem;
}

@keyframes love-pulse {
  0% { transform: scale(0.98); text-shadow: 0 0 5px #ff3377, 0 0 15px #ff3377; }
  100% { transform: scale(1.04); text-shadow: 0 0 8px #ff3377, 0 0 25px #ff3377, 0 0 45px #ff3377; }
}

.birthday-blow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.birthday-blow.hidden {
  display: none;
}

.birthday-cinema.show-blow .birthday-blow {
  display: flex;
  animation: blow-in 0.8s var(--ease-out) forwards;
}

@keyframes blow-in {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}

.birthday-blow__word {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 11vw, 3.5rem);
  font-weight: 600;
  color: var(--cream);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
  animation: pusten-pulse 1.2s ease-in-out infinite;
  margin: 0;
}

.birthday-blow__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.birthday-cinema.pusten-go .birthday-blow__word,
.birthday-cinema.pusten-go .birthday-blow__sub {
  animation: pusten-blow 0.6s ease-out forwards;
}

@keyframes pusten-blow {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.2; }
}

@keyframes pusten-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* Glowing Microphone Indicator Bar */
.mic-indicator-wrap {
  width: 100%;
  max-width: 14rem;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.4s, transform 0.4s;
}

.mic-indicator-wrap.active {
  opacity: 1;
  transform: scaleY(1);
}

.mic-indicator-bar {
  width: 0%;
  height: 100%;
  background: var(--pink-bright);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 51, 119, 0.65);
  transition: width 0.08s ease-out, background-color 0.2s;
}

/* ── Candle Styling ── */
.candle-scene {
  position: relative;
  padding: 0.75rem 0;
}

.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 3.5rem;
  margin: 0 auto;
}

/* Candle Blow Shockwave Ripple */
.candle-shockwave {
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 51, 119, 0.35) 45%, transparent 70%);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.candle-shockwave.active {
  animation: shockwave-ripple 1.1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes shockwave-ripple {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  35% { opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(7.5); opacity: 0; }
}

.candle__wax {
  width: 2.2rem;
  height: 5.5rem;
  background: linear-gradient(90deg, #fff8e8 0%, #f5e6c8 50%, #e8d4a8 100%);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset -4px 0 8px rgba(0, 0, 0, 0.08);
}

.candle__wick {
  position: absolute;
  top: -0.35rem;
  width: 3px;
  height: 0.5rem;
  background: #2a2018;
  border-radius: 1px;
}

.candle__flame {
  position: absolute;
  top: -2.1rem;
  width: 1.15rem;
  height: 1.7rem;
  background: radial-gradient(ellipse at 50% 80%, #ff6b20 0%, #ffb020 45%, #fff5a0 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: 50% 90%;
  animation: flame-flicker 0.35s ease-in-out infinite alternate;
  box-shadow: 0 0 20px rgba(255, 160, 40, 0.85);
  transition: opacity 0.5s, transform 0.5s;
}

.candle__glow {
  position: absolute;
  top: -3.5rem;
  width: 5rem;
  height: 5rem;
  background: radial-gradient(circle, rgba(255, 180, 60, 0.35) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.6s;
}

@keyframes flame-flicker {
  0% { transform: scale(1) rotate(-2deg); }
  100% { transform: scale(1.08, 1.12) rotate(2deg); }
}

.birthday-cinema.candle-blown .candle__flame {
  opacity: 0;
  transform: scale(0) translateY(12px);
  animation: none;
}

.birthday-cinema.candle-blown .candle__glow {
  opacity: 0;
}

.candle__smoke {
  position: absolute;
  top: -2.5rem;
  width: 2rem;
  height: 3rem;
  opacity: 0;
  pointer-events: none;
}

.candle__smoke::before,
.candle__smoke::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  background: rgba(200, 200, 210, 0.5);
  border-radius: 50%;
  filter: blur(4px);
}

.candle__smoke::before {
  left: 20%;
  animation: smoke-rise 2s ease-out forwards;
}

.candle__smoke::after {
  right: 20%;
  animation: smoke-rise 2s ease-out 0.3s forwards;
}

.birthday-cinema.candle-blown .candle__smoke {
  opacity: 1;
}

@keyframes smoke-rise {
  0% { transform: translateY(0) scale(1); opacity: 0.65; }
  100% { transform: translateY(-2.5rem) scale(1.8); opacity: 0; }
}

/* ── Memories (Interactive Polaroid Grid) ── */
.memories {
  margin-bottom: 2.75rem;
  text-align: center;
}

.memories__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 6vw, 2.2rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold-soft), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

.memories__lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.memories__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0.25rem;
}

/* Polaroid framing */
.polaroid {
  background: rgba(255, 255, 255, 0.96);
  padding: 0.55rem 0.55rem 1.65rem 0.55rem;
  border-radius: 0.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  color: #1a0f32;
  margin: 0;
  opacity: 0;
  transform: translateY(1.5rem) scale(0.92);
  transition: box-shadow 0.4s var(--ease-out);
}

.reveal.show .polaroid {
  animation: memory-in 0.75s var(--ease-out) forwards;
}

.memories__grid figure:nth-child(1) { animation-delay: 0.05s; }
.memories__grid figure:nth-child(2) { animation-delay: 0.15s; }
.memories__grid figure:nth-child(3) { animation-delay: 0.25s; }
.memories__grid figure:nth-child(4) { animation-delay: 0.35s; }

@keyframes memory-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.polaroid__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.memories__item--tall.polaroid .polaroid__img-wrap {
  aspect-ratio: 4 / 5;
  flex-grow: 1;
}

.polaroid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 140px;
  transition: transform 0.6s var(--ease-out);
}

.memories__item--tall img {
  min-height: 100%;
}

.polaroid__caption {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 700;
  text-align: center;
  margin-top: 0.65rem;
  line-height: 1.1;
  color: #2b1b4a;
  letter-spacing: 0;
}

.memories__item--tall {
  grid-row: span 2;
}

.memories__item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 11;
}

.polaroid:hover img {
  transform: scale(1.06);
}

/* ── Main Layout ── */
.main {
  position: relative;
  z-index: 2;
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.75rem 1.35rem 1.25rem;
  transition: opacity 0.8s var(--ease-out);
}

.main.visible {
  visibility: visible;
  opacity: 1;
}

/* ── Reveal Animation ── */
.reveal:not(.hero-line) {
  opacity: 0;
  transform: translateY(1.5rem) scale(0.97);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.reveal:not(.hero-line).show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Hero section ── */
.hero {
  position: relative;
  text-align: center;
  padding: 3.25rem 0.5rem 3rem;
  margin-bottom: 0.5rem;
}

.hero__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.hero__ring--outer {
  width: min(95vw, 25rem);
  height: min(95vw, 25rem);
  border: 1.5px solid rgba(243, 194, 88, 0.25);
  box-shadow: 
    0 0 40px rgba(243, 194, 88, 0.15),
    inset 0 0 30px rgba(255, 51, 119, 0.1);
  animation: ring-pulse-outer 8s ease-in-out infinite alternate;
}

.hero__ring--inner {
  width: min(80vw, 20rem);
  height: min(80vw, 20rem);
  border: 1px dashed rgba(255, 51, 119, 0.25);
  box-shadow: 
    0 0 25px rgba(255, 51, 119, 0.1),
    inset 0 0 15px rgba(243, 194, 88, 0.05);
  animation: ring-pulse-inner 14s linear infinite;
}

.main.visible .hero__ring {
  opacity: 1;
}

@keyframes ring-pulse-outer {
  0% { transform: translate(-50%, -50%) scale(0.96) rotate(0deg); opacity: 0.45; }
  100% { transform: translate(-50%, -50%) scale(1.04) rotate(45deg); opacity: 0.85; }
}

@keyframes ring-pulse-inner {
  0% { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) rotate(-360deg); opacity: 0.7; }
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.hero__petal--1 {
  top: -0.25rem;
  left: 2%;
  animation: petal-1 5s ease-in-out infinite;
}

.hero__petal--2 {
  top: -0.5rem;
  right: 4%;
  animation: petal-2 5.2s ease-in-out infinite;
  font-size: clamp(2rem, 7vw, 3rem);
}

.hero__petal--3 {
  top: 42%;
  left: -2%;
  opacity: 0.75;
  animation: petal-3 5.4s ease-in-out infinite;
}

@keyframes petal-1 {
  0%, 100% { transform: rotate(-18deg) translateY(0); }
  50% { transform: rotate(-18deg) translateY(-10px); }
}

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

@keyframes petal-3 {
  0%, 100% { transform: rotate(25deg) translateY(0); }
  50% { transform: rotate(25deg) translateY(-8px); }
}

.hero__spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 14px var(--gold);
  opacity: 0;
  animation: spark-twinkle 2.4s ease-in-out infinite;
}

.hero__spark--1 { top: 18%; left: 18%; animation-delay: 0s; }
.hero__spark--2 { top: 28%; right: 14%; animation-delay: 0.5s; }
.hero__spark--3 { bottom: 22%; left: 22%; animation-delay: 1s; }

.main.visible .hero__spark {
  opacity: 0.9;
}

@keyframes spark-twinkle {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 1; }
}

.hero-line {
  opacity: 0;
  transform: perspective(600px) translateY(1.5rem) scale(0.85) rotateX(15deg);
  filter: blur(8px);
  transition: none;
  will-change: transform, opacity, filter;
}

.hero-line.show {
  animation: hero-burst 1.15s var(--ease-bounce) forwards;
}

.hero-line[data-delay="0"].show { animation-delay: 0.05s; }
.hero-line[data-delay="1"].show { animation-delay: 0.12s; }
.hero-line[data-delay="2"].show { animation-delay: 0.2s; }
.hero-line[data-delay="3"].show { animation-delay: 0.28s; }

@keyframes hero-burst {
  0% {
    opacity: 0;
    transform: perspective(600px) translateY(1.5rem) scale(0.85) rotateX(15deg);
    filter: blur(8px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: perspective(600px) translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
  }
}

.hero__label {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-size: clamp(0.72rem, 3.2vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1.25rem;
  line-height: 1.4;
  text-shadow:
    0 0 28px rgba(255, 51, 119, 0.65),
    0 2px 12px rgba(0, 0, 0, 0.85);
}

.hero__name {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(3.75rem, 16vw, 6.25rem);
  font-weight: 600;
  line-height: 0.98;
  background: linear-gradient(
    185deg,
    #fff9e6 0%,
    var(--gold-soft) 22%,
    var(--gold) 48%,
    var(--rose) 88%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(243, 194, 88, 0.15);
  margin-bottom: 0.65rem;
}

.hero__date {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5.5vw, 2rem);
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75);
}

.hero__born {
  position: relative;
  z-index: 1;
  font-size: clamp(0.72rem, 3vw, 0.88rem);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

/* ── Wax-Sealed 3D Letter Envelope ── */
.message {
  margin-bottom: 2.75rem;
}

.envelope-wrapper {
  perspective: 1000px;
  position: relative;
  width: 100%;
  margin: 1.5rem 0 2rem 0;
  text-align: center;
}

.envelope {
  position: relative;
  width: 100%;
  max-width: 25rem;
  height: 16rem;
  background: linear-gradient(135deg, #cc8fa5 0%, #a46d81 100%);
  border-radius: 0.5rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
  margin: 0 auto;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.envelope:hover {
  transform: translateY(-6px);
}

.envelope__top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #cc8fa5 0%, #b87c92 100%);
  clip-path: polygon(0 0, 50% 50%, 100% 0);
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.5rem 0.5rem 0 0;
}

.envelope__front {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(0, 0, 0, 0.05) 50%, transparent 60%),
    linear-gradient(45deg, #a46d81 0%, #9b6377 50%, #ae778b 100%);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
  border-radius: 0.5rem;
}

.envelope__seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.3rem;
  height: 3.3rem;
  background: radial-gradient(circle, #e23b6b 0%, #b81c46 100%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.35s var(--ease-bounce), box-shadow 0.3s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.envelope__seal:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow:
    0 0 15px rgba(226, 59, 107, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.envelope.open .envelope__top {
  transform: rotateX(180deg);
  z-index: 1; /* letter pulls in front of flap */
}

.envelope.open .envelope__seal {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}

.envelope__letter {
  position: absolute;
  bottom: 0.5rem;
  left: 5%;
  width: 90%;
  height: 90%;
  background: #fffdf9;
  border-radius: 0.3rem;
  z-index: 2; /* behind front cover, ahead of top flap when open */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(0) scale(0.98);
  transition:
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.32s,
    box-shadow 0.8s;
  overflow: hidden;
  text-align: left;
}

.envelope.open .envelope__letter {
  transform: translateY(-9rem) scale(1.0);
  height: auto;
  min-height: 19rem;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.letter-content {
  padding: 1.6rem 1.35rem;
  color: #2e2017;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.65;
  font-weight: 400;
}

.letter-content p {
  margin-bottom: 0.75rem !important;
  color: #2e2017 !important;
}

.letter-salutation {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: #b81c46;
  margin-bottom: 0.5rem;
}

.letter-closing {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: #b81c46 !important;
  line-height: 1.25;
  margin-top: 1.15rem !important;
  font-style: normal;
}

.letter-signature {
  font-size: 1.5rem;
  color: #b81c46;
}

.envelope-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  letter-spacing: 0.05em;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

/* ── Gift Section ── */
.gift-section {
  text-align: center;
  padding: 1rem 0 2rem;
}

.gift-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.gift-section.opened .gift-hint {
  animation: none;
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.4s, height 0.4s, margin 0.4s;
}

/* ── Gift Box ── */
.gift-box-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  padding: 1.5rem;
}

.gift-box__aura {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 194, 88, 0.25) 0%, transparent 65%);
  animation: gift-aura 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gift-aura {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

.gift-box__sparkle {
  position: absolute;
  font-size: 0.85rem;
  color: var(--gold-soft);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 8px var(--gold);
  animation: sparkle-orbit 3s ease-in-out infinite;
}

.gift-box__sparkle--1 { top: 5%; left: 15%; animation-delay: 0s; }
.gift-box__sparkle--2 { top: 20%; right: 10%; animation-delay: 1s; }
.gift-box__sparkle--3 { bottom: 15%; left: 20%; animation-delay: 2s; }

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

.gift-box-wrap.is-opening .gift-box__sparkle {
  animation: sparkle-burst 0.8s ease-out forwards;
}

@keyframes sparkle-burst {
  to { opacity: 0; transform: translateY(-30px) scale(1.5); }
}

.gift-box {
  position: relative;
  display: inline-block;
  width: 150px;
  height: 128px;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  z-index: 2;
  transition: transform 0.35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  animation: gift-float 3.2s ease-in-out infinite;
}

@keyframes gift-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-7px) rotate(-2deg); }
  66% { transform: translateY(-4px) rotate(2deg); }
}

.gift-box:hover:not(.opened) {
  transform: translateY(-10px) scale(1.08) rotate(-1deg);
  animation: none;
}

.gift-box:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: 4px;
}

.gift-box.opening {
  animation: gift-shake 0.55s ease-in-out;
}

@keyframes gift-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-6deg) scale(1.05); }
  30% { transform: rotate(6deg) scale(1.08); }
  45% { transform: rotate(-4deg) scale(1.06); }
  60% { transform: rotate(4deg) scale(1.1); }
  75% { transform: rotate(-2deg) scale(1.05); }
}

.gift-box.opened {
  cursor: default;
  pointer-events: none;
  animation: gift-pop 0.7s var(--ease-bounce) forwards;
}

@keyframes gift-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1.05); }
}

.gift-box__shine {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: gift-shine 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}

@keyframes gift-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gift-box__burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4rem;
  height: 4rem;
  margin: -2rem 0 0 -2rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 150, 0.9) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  z-index: 1;
}

.gift-box.opened .gift-box__burst {
  animation: gift-burst-light 0.9s ease-out forwards;
}

@keyframes gift-burst-light {
  0% { opacity: 0; transform: scale(0); }
  30% { opacity: 1; transform: scale(1.8); }
  100% { opacity: 0; transform: scale(2.5); }
}

.gift-box__body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 80px;
  background: linear-gradient(145deg, var(--purple-deep) 0%, #5a3d9e 100%);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gift-box__ribbon-v {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 80px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--rose-deep) 100%);
  border-radius: 0 0 3px 3px;
  z-index: 2;
}

.gift-box__ribbon-h {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 18px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--rose) 50%, var(--gold) 100%);
  z-index: 2;
}

.gift-box__lid {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 40px;
  transform-origin: bottom center;
  transition: transform 0.7s var(--ease-out);
  z-index: 3;
}

.gift-box__lid-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 20px;
  background: linear-gradient(145deg, var(--purple) 0%, var(--purple-deep) 100%);
  border-radius: 4px 4px 0 0;
  transform: perspective(200px) rotateX(20deg);
  transform-origin: bottom center;
}

.gift-box__lid-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 130px;
  height: 22px;
  background: linear-gradient(180deg, #8b6fd4 0%, var(--purple-deep) 100%);
  border-radius: 2px;
}

.gift-box__bow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 24px;
  z-index: 4;
  transition: opacity 0.4s, transform 0.4s;
}

.gift-box__bow::before,
.gift-box__bow::after {
  content: '';
  position: absolute;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--rose);
  border-radius: 50% 50% 0 50%;
}

.gift-box__bow::before {
  left: 0;
  transform: rotate(-30deg);
}

.gift-box__bow::after {
  right: 0;
  transform: rotate(30deg) scaleX(-1);
}

.gift-box.opened .gift-box__lid {
  transform: translateX(-50%) rotateX(-130deg) translateY(-12px);
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-box.opened .gift-box__bow {
  opacity: 0;
  transform: translateX(-50%) translateY(-28px) scale(1.2);
  transition: opacity 0.35s, transform 0.6s var(--ease-out);
}

.gift-box.opened .gift-box__body {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(167, 139, 250, 0.4);
}

/* ── Gift Cinema (Vollbild-Show) ── */
.gift-cinema {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.gift-cinema.active {
  visibility: visible;
  opacity: 1;
}

.gift-cinema.closing {
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

/* One-frame layout warm-up (JS toggles briefly) */
.gift-cinema--warmup {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.gift-cinema__backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: layout paint;
}

.gift-cinema__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.35);
  transition: transform 2.2s var(--ease-out);
  content-visibility: auto;
}

.gift-cinema.active .gift-cinema__image {
  transform: scale(1);
}

.gift-cinema.dimmed .gift-cinema__image {
  transform: scale(1.05);
  filter: brightness(0.35);
  transition: transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
}

.gift-cinema__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 4, 15, 0.88) 0%,
    rgba(5, 4, 15, 0.35) 42%,
    rgba(5, 4, 15, 0.55) 100%
  );
  opacity: 0.55;
  transition: opacity 1s var(--ease-out);
}

.gift-cinema.dimmed .gift-cinema__shade {
  opacity: 1;
  background: rgba(7, 7, 26, 0.75);
}

#gift-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
}

.gift-cinema.fireworks-on #gift-fireworks {
  opacity: 1;
}

.gift-cinema__status {
  position: absolute;
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.45rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  color: #fff5f8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  background: rgba(8, 5, 22, 0.75);
  border: 1px solid rgba(243, 194, 88, 0.35);
  border-radius: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  animation: status-pulse 1.8s ease-in-out infinite;
}

.gift-cinema__status.hidden {
  visibility: hidden;
  opacity: 0;
  animation: none;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

.gift-cinema__intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  opacity: 0;
  transform: scale(0.88);
  transition:
    opacity 1s var(--ease-out),
    transform 1.2s var(--ease-out);
  pointer-events: none;
}

.gift-cinema__intro-card {
  max-width: 22rem;
  width: 100%;
  padding: 1.85rem 1.75rem 2rem;
  border-radius: 1.35rem;
  background: rgba(8, 5, 22, 0.82);
  border: 1px solid rgba(243, 194, 88, 0.45);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(232, 160, 191, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gift-cinema__intro.show {
  opacity: 1;
  transform: scale(1);
}

.gift-cinema__intro.hide {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.6s, transform 0.6s;
}

.gift-cinema__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: #ffd6ea;
  margin-bottom: 0.65rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.gift-cinema__city {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 16vw, 6.5rem);
  font-weight: 700;
  line-height: 0.95;
  color: #fff4d4;
  background: none;
  -webkit-text-fill-color: #fff4d4;
  text-shadow:
    0 1px 0 rgba(120, 80, 20, 0.95),
    0 3px 0 rgba(80, 50, 10, 0.85),
    0 8px 24px rgba(0, 0, 0, 0.9),
    0 0 48px rgba(243, 194, 88, 0.35);
  filter: none;
}

/* ── Trip Show (Interactive Parallax roadtrip) ── */
.trip-show {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 3.5rem;
  overflow: hidden;
}

.trip-show.visible {
  visibility: visible;
  opacity: 1;
}

.trip-scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.trip-sky-cloud,
.trip-scenery-mountain,
.trip-scenery-tree {
  position: absolute;
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.trip-show.visible .trip-sky-cloud,
.trip-show.visible .trip-scenery-mountain,
.trip-show.visible .trip-scenery-tree {
  opacity: 0.6;
}

.trip-sky-cloud--1 { top: 8%; left: 8%; font-size: 2.2rem; }
.trip-sky-cloud--2 { top: 18%; right: 10%; font-size: 1.8rem; }
.trip-scenery-mountain--1 { bottom: 21%; left: 6%; font-size: 3.2rem; }
.trip-scenery-mountain--2 { bottom: 19%; right: 8%; font-size: 2.6rem; }
.trip-scenery-tree--1 { bottom: 17%; left: 28%; font-size: 1.6rem; }
.trip-scenery-tree--2 { bottom: 17%; right: 32%; font-size: 1.8rem; }

/* Parallax motion when car drives */
.trip-show.moving .trip-sky-cloud--1 { animation: parallax-left 7s linear infinite; }
.trip-show.moving .trip-sky-cloud--2 { animation: parallax-left 5.8s linear infinite; }
.trip-show.moving .trip-scenery-mountain--1 { animation: parallax-left 9.5s linear infinite; }
.trip-show.moving .trip-scenery-mountain--2 { animation: parallax-left 8s linear infinite; }
.trip-show.moving .trip-scenery-tree--1 { animation: parallax-left 3.8s linear infinite; }
.trip-show.moving .trip-scenery-tree--2 { animation: parallax-left 3.2s linear infinite; }

@keyframes parallax-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-120vw); }
}

.trip-road {
  position: absolute;
  bottom: 18%;
  left: 5%;
  right: 5%;
  height: 3px;
  z-index: 1;
}

.trip-road__line {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--rose) 85%, transparent);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out), opacity 0.4s;
}

.trip-road.show .trip-road__line {
  opacity: 0.65;
  transform: scaleX(1);
}

.trip-car {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: left 2.85s var(--ease-out), opacity 0.35s;
}

.trip-car.show {
  opacity: 1;
}

.trip-car.drive {
  left: 100%;
}

.trip-cards {
  position: relative;
  width: 100%;
  max-width: 22rem;
  min-height: 16.5rem;
  z-index: 2;
  contain: layout style;
}

.trip-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  overflow: hidden;
  box-sizing: border-box;
  gap: 0.25rem;
  background: linear-gradient(165deg, rgba(35, 20, 58, 0.94) 0%, rgba(16, 10, 36, 0.9) 100%);
  border: 1px solid rgba(243, 194, 88, 0.28);
  border-radius: 1.35rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(2rem) scale(0.88) rotate(-2deg);
  transition:
    opacity 0.72s var(--ease-out),
    transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.trip-card.active {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

@media (pointer: coarse) {
  .trip-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(165deg, rgba(35, 20, 58, 0.98) 0%, rgba(16, 10, 36, 0.96) 100%);
  }
}

.trip-card.exit {
  opacity: 0;
  transform: translateY(-1.5rem) scale(0.92);
  transition: opacity 0.4s, transform 0.4s;
}

.trip-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
  line-height: 1;
  animation: icon-pop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes icon-pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.trip-card__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0;
  flex-shrink: 0;
}

.trip-card__value {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.trip-card__detail {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.trip-card__badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.72rem;
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  background: rgba(243, 194, 88, 0.12);
  border: 1px solid rgba(243, 194, 88, 0.25);
  border-radius: 2rem;
}

.trip-progress {
  display: flex;
  gap: 0.45rem;
  margin-top: 1.5rem;
  z-index: 2;
}

.trip-progress__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s, transform 0.3s;
}

.trip-progress__dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

.trip-progress__dot.done {
  background: var(--rose);
}

body.cinema-open {
  overflow: hidden;
}

/* ── Gift Content (Final Reisedetails) ── */
.gift-content {
  text-align: left;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(243, 194, 88, 0.28);
  border-radius: 1.35rem;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.92);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    visibility 0.8s;
}

.gift-content.visible {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.gift-content__text {
  padding: 2rem 1.5rem;
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.gift-content__text.show {
  opacity: 1;
  transform: translateY(0);
}

.gift-overview__header {
  text-align: center;
  margin-bottom: 1.5rem;
  opacity: 0;
}

.gift-content__text.show .gift-overview__header {
  animation: tile-in 0.5s var(--ease-out) 0.05s forwards;
}

.gift-overview__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(243, 194, 88, 0.08);
  border: 1px solid rgba(243, 194, 88, 0.2);
  border-radius: 2rem;
  padding: 0.35rem 1rem;
  margin-bottom: 0.85rem;
}

.gift-content__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 7vw, 2.25rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold-soft), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

.gift-content__subtitle {
  font-size: 0.95rem;
  color: var(--rose);
  font-style: italic;
  margin-bottom: 0;
}

.gift-overview__intro {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
  opacity: 0;
}

.gift-click-hint {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--gold-soft);
  animation: pulse-hint 2.5s infinite;
}

.gift-content__text.show .gift-overview__intro {
  animation: tile-in 0.5s var(--ease-out) 0.12s forwards;
}

/* Double-Sided 3D Ticket Flips Sektion */
.gift-overview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}



.gift-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 12.5rem;
  padding: 1.25rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 1.15rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: border-color 0.3s, background-color 0.3s, transform 0.3s;
  box-sizing: border-box;

  /* Entrance animation starting state */
  opacity: 0;
  transform: translateY(0.75rem) scale(0.96);
}

.gift-tile:hover {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(255, 255, 255, 0.07);
}

.gift-content__text.show .gift-tile {
  animation: tile-in 0.55s var(--ease-out) forwards;
}

.gift-tile:nth-child(1) { animation-delay: 0.08s; }
.gift-tile:nth-child(2) { animation-delay: 0.16s; }
.gift-tile:nth-child(3) { animation-delay: 0.24s; }
.gift-tile:nth-child(4) { animation-delay: 0.32s; }
.gift-tile:nth-child(5) { animation-delay: 0.40s; }

@keyframes tile-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gift-tile--wide {
  grid-column: 1 / -1;
  min-height: 8.5rem;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  padding: 1.15rem 1.25rem;
}

.gift-tile__desc {
  margin-top: 0.65rem;
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--rose);
  text-align: center;
  width: 100%;
}

.gift-tile--wide .gift-tile__desc {
  margin-top: 0.4rem;
  text-align: left;
}

.gift-tile--wide .gift-tile__icon {
  margin-bottom: 0;
  margin-right: 0.25rem;
}

.gift-tile--wide .gift-tile__label,
.gift-tile--wide .gift-tile__value,
.gift-tile--wide .gift-tile__note {
  width: 100%;
}

.gift-tile__icon {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  line-height: 1;
}

.gift-tile__label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.15rem;
}

.gift-tile__value {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.gift-tile__note {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.gift-tile__note--gold {
  color: var(--gold-soft);
  font-weight: 500;
}



/* Schmetterlinghaus Gold Highlight */
.gift-highlight {
  position: relative;
  text-align: center;
  padding: 1.65rem 1.35rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(145deg, rgba(255, 51, 119, 0.1) 0%, rgba(133, 83, 242, 0.08) 100%);
  border: 1px solid rgba(255, 51, 119, 0.25);
  border-radius: 1.15rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(1rem);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.gift-content__text.show .gift-highlight {
  animation: tile-in 0.7s var(--ease-out) 0.5s forwards;
}

.gift-highlight__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(255, 51, 119, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.gift-highlight__icon {
  display: block;
  font-size: 2.35rem;
  margin-bottom: 0.4rem;
  animation: butterfly-float 3s ease-in-out infinite;
}

@keyframes butterfly-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.gift-highlight__label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.25rem;
}

.gift-highlight__title {
  font-family: var(--serif);
  font-size: 1.48rem;
  font-weight: 600;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.gift-highlight__text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* Wien-Pläne Liste */
.vienna-plans {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1rem;
  background: rgba(133, 83, 242, 0.05);
  border: 1px solid rgba(133, 83, 242, 0.14);
  border-radius: 1rem;
  opacity: 0;
  transform: translateY(0.75rem);
}

.gift-content__text.show .vienna-plans {
  animation: tile-in 0.6s var(--ease-out) 0.65s forwards;
}

.vienna-plans__lead {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-soft);
  text-align: center;
  margin-bottom: 0.85rem;
}

.vienna-plans__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.vienna-plans__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.65rem;
  border-left: 3px solid rgba(255, 51, 119, 0.45);
  opacity: 0;
  transform: translateX(-0.5rem);
}

.gift-content__text.show .vienna-plans__item {
  animation: plan-slide-in 0.5s var(--ease-out) forwards;
}

.vienna-plans__item:nth-child(1) { animation-delay: 0.75s; }
.vienna-plans__item:nth-child(2) { animation-delay: 0.85s; }
.vienna-plans__item:nth-child(3) { animation-delay: 0.95s; }
.vienna-plans__item:nth-child(4) { animation-delay: 1.05s; }
.vienna-plans__item:nth-child(5) { animation-delay: 1.15s; }

@keyframes plan-slide-in {
  to { opacity: 1; transform: translateX(0); }
}

.vienna-plans__icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  line-height: 1;
}

.vienna-plans__text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  text-align: left;
}

.gift-content__closing {
  text-align: center;
  margin-top: 0.5rem !important;
  margin-bottom: 0 !important;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(133, 83, 242, 0.12);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--rose) !important;
  line-height: 1.75;
  opacity: 0;
}

.gift-content__closing .signature {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 1rem;
  color: var(--gold-soft);
}

.gift-content__text.show .gift-content__closing {
  animation: tile-in 0.6s var(--ease-out) 0.8s forwards;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

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

  .reveal:not(.hero-line) {
    opacity: 1;
    transform: none;
  }

  .hero-line {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }

  .main.visible .hero__ring,
  .main.visible .hero__spark {
    animation: none;
    opacity: 0.5;
  }

  .hero__petal {
    animation: none !important;
  }

  .gift-content__text {
    opacity: 1;
    transform: none;
  }

  .gift-box,
  .gift-box-wrap .gift-box__sparkle,
  .gift-box__aura {
    animation: none !important;
  }

  .gift-tile,
  .gift-highlight,
  .vienna-plans,
  .vienna-plans__item,
  .gift-content__closing,
  .gift-overview__header,
  .gift-overview__intro {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .gift-highlight__icon {
    animation: none;
  }

  .gift-cinema,
  .birthday-cinema,
  .countdown-overlay {
    display: none !important;
  }

  .gift-cinema__status {
    animation: none !important;
  }

  .birthday-cinema.hidden {
    display: none !important;
  }
}
