:root {
  --bg: #120616;
  --bg2: #1e0a2b;
  --pink: #ff5fa2;
  --pink-soft: #ffb3d1;
  --gold: #ffd36e;
  --purple: #a45cff;
  --text: #fff2f8;
  --muted: #d7b8ce;
  --card: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, #3a1250 0%, transparent 60%),
    radial-gradient(1000px 700px at 0% 110%, #47123f 0%, transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, .signature { font-family: "Playfair Display", serif; }

/* ===== ENTER GATE ===== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(900px 700px at 50% 30%, #48123f 0%, transparent 60%),
    linear-gradient(160deg, #0d040f, #1c0a29);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.gate.hidden { opacity: 0; visibility: hidden; }
.gate-inner { padding: 2rem; animation: floatUp 1s ease both; }
.gate-hearts {
  font-size: clamp(3rem, 12vw, 7rem);
  color: var(--pink);
  filter: drop-shadow(0 0 30px rgba(255, 95, 162, 0.6));
  animation: beat 1.3s ease-in-out infinite;
}
.gate-title {
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.15;
  margin: 1rem 0 0.6rem;
  background: linear-gradient(90deg, var(--pink-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gate-sub { color: var(--muted); margin-bottom: 1.8rem; }

/* ===== GIFT BOX (unwrap to enter) ===== */
.giftbox {
  position: relative;
  width: 150px; height: 130px;
  margin: 0 auto 2.2rem;
  cursor: pointer;
  animation: giftBounce 2s ease-in-out infinite;
  transition: transform .25s ease;
}
.giftbox:hover { transform: scale(1.07); }
.giftbox:focus-visible { outline: 3px solid var(--gold); outline-offset: 8px; border-radius: 12px; }
.gift-body {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 130px; height: 88px; border-radius: 8px;
  background: linear-gradient(160deg, #ff6fae, #d5468b);
  box-shadow: 0 18px 45px rgba(255, 95, 162, .45);
}
.gift-body::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 22px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), #e6a93d);
}
.gift-lid {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 34px; border-radius: 8px;
  background: linear-gradient(160deg, #ff87bd, #e05c9a);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  z-index: 2;
  transform-origin: 10% 100%;
  transition: transform .7s cubic-bezier(.34,1.56,.64,1), opacity .7s ease;
}
.gift-lid::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 22px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), #e6a93d);
}
.gift-bow {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold);
  box-shadow: -14px 2px 0 -2px var(--gold), 14px 2px 0 -2px var(--gold);
}
.giftbox.open { animation: none; }
.giftbox.open .gift-lid {
  transform: translateX(-90%) translateY(-70px) rotate(-35deg);
  opacity: 0;
}
.giftbox.open .gift-body { animation: giftShake .5s ease; }
@keyframes giftBounce { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
@keyframes giftShake { 0%,100%{ transform: translateX(-50%);} 25%{ transform: translateX(-54%);} 75%{ transform: translateX(-46%);} }

/* ===== SCROLL PROGRESS ===== */
#scrollProgress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  z-index: 96;
  background: linear-gradient(90deg, var(--gold), var(--pink), var(--purple));
  box-shadow: 0 0 12px rgba(255, 95, 162, .8);
  transition: width .1s linear;
  border-radius: 0 4px 4px 0;
}

/* ===== MUSIC TOGGLE ===== */
.music-toggle {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 90;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--pink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.music-toggle:hover { transform: scale(1.08); }
.music-icon { font-size: 1.4rem; }
.eq { display: none; gap: 2px; align-items: flex-end; height: 18px; }
.music-toggle.playing .music-icon { display: none; }
.music-toggle.playing .eq { display: flex; }
.eq i {
  width: 3px; height: 100%;
  background: var(--pink);
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
}
.eq i:nth-child(2){ animation-delay: .2s; }
.eq i:nth-child(3){ animation-delay: .4s; }
.eq i:nth-child(4){ animation-delay: .1s; }
@keyframes eq { 0%,100%{ transform: scaleY(.3);} 50%{ transform: scaleY(1);} }

/* ===== FLOATING DECORATIONS ===== */
.floaties { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.floaty {
  position: absolute;
  bottom: -60px;
  font-size: 1.6rem;
  opacity: 0.65;
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: .7; }
  100% { transform: translateY(-115vh) rotate(360deg); opacity: 0; }
}

#confettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 95; }

/* ===== ADVENTUROUS BACKGROUND ===== */
#starCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.aurora {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: 0;
  pointer-events: none; filter: blur(60px); opacity: .5;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(164,92,255,.5), transparent 70%),
    radial-gradient(40% 60% at 80% 20%, rgba(255,95,162,.45), transparent 70%),
    radial-gradient(50% 60% at 50% 60%, rgba(124,231,255,.28), transparent 70%);
  animation: auroraShift 16s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0% { transform: translateX(-4%) translateY(-2%) scale(1); }
  100% { transform: translateX(6%) translateY(4%) scale(1.15); }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  z-index: 2;
}
.hero-glow {
  position: absolute;
  width: 70vmin; height: 70vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,95,162,.35), transparent 60%);
  filter: blur(40px);
  animation: pulse 6s ease-in-out infinite;
}
.hero-content {
  position: relative; z-index: 2;
  transform: perspective(900px) rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg));
  transition: transform .15s ease-out;
  will-change: transform;
}
.hero-eyebrow { letter-spacing: 6px; text-transform: uppercase; font-size: .8rem; color: var(--gold); }
.hero-crown {
  font-size: clamp(4rem, 14vw, 8.5rem);
  color: var(--gold);
  line-height: 1; margin-bottom: -.6rem;
  filter: drop-shadow(0 0 30px rgba(255,211,110,.85));
  animation: crownFloat 3.5s ease-in-out infinite, crownGlow 2.4s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes crownFloat { 0%,100%{ transform: translateY(0) rotate(-5deg);} 50%{ transform: translateY(-16px) rotate(5deg);} }
@keyframes crownGlow {
  0%,100% { filter: drop-shadow(0 0 20px rgba(255,211,110,.6)); }
  50% { filter: drop-shadow(0 0 44px rgba(255,211,110,1)) drop-shadow(0 0 70px rgba(255,95,162,.5)); }
}
.hero-name {
  font-size: clamp(4.6rem, 22vw, 13rem);
  font-family: "Great Vibes", cursive;
  line-height: 1;
  margin: .2rem 0;
  background: linear-gradient(90deg, var(--pink-soft), var(--gold), var(--purple), var(--pink-soft));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(255,95,162,.35));
  animation: shine 5s linear infinite, namePop 1s cubic-bezier(.2,.8,.2,1.2) both;
}
@keyframes namePop {
  0% { opacity: 0; transform: scale(.5) translateY(30px); }
  60% { opacity: 1; transform: scale(1.08) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-tag {
  font-size: clamp(1.3rem, 4.5vw, 2.2rem);
  font-family: "Playfair Display", serif;
  font-weight: 500;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--pink-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tagIn 1.1s ease .3s both, tagPulse 3s ease-in-out 1.4s infinite;
}
@keyframes tagIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tagPulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.05); } }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-ghost {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  padding: .85rem 2rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
  display: inline-block;
  border: none;
}
.btn-primary {
  color: #2a0a1f;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  box-shadow: 0 10px 30px rgba(255,95,162,.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(255,95,162,.6); }
.btn-primary.big { font-size: 1.2rem; padding: 1.1rem 2.8rem; }
.btn-ghost {
  color: var(--text);
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255,255,255,.15); }

.scroll-hint {
  margin-top: 3rem; color: var(--muted); font-size: .8rem;
  letter-spacing: 3px; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.scroll-hint span {
  width: 24px; height: 40px; border: 2px solid var(--muted); border-radius: 14px; position: relative;
}
.scroll-hint span::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--pink); border-radius: 2px;
  animation: scrolldot 1.6s ease infinite;
}
@keyframes scrolldot { 0%{opacity:0;top:7px;} 40%{opacity:1;} 80%{opacity:0;top:20px;} }

/* ===== SECTIONS SHARED ===== */
section { position: relative; z-index: 2; padding: 6rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: .5rem;
  background: linear-gradient(90deg, var(--pink-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 3rem; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* staggered children inside revealed sections */
.reveal .stat { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in .stat { opacity: 1; transform: none; }
.reveal.in .stat:nth-child(1) { transition-delay: .05s; }
.reveal.in .stat:nth-child(2) { transition-delay: .2s; }
.reveal.in .stat:nth-child(3) { transition-delay: .35s; }

/* ===== STATS ===== */
.stats { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; text-align: center; }
.stat {
  background: var(--card); border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px; padding: 2rem 2.4rem; min-width: 200px;
  backdrop-filter: blur(8px);
}
.stat-num { display: block; font-size: 2.6rem; font-weight: 700; color: var(--gold); font-family: "Playfair Display", serif; }
.stat-label { color: var(--muted); font-size: .95rem; }
.heart-beat { color: var(--pink); animation: beat 1.2s ease-in-out infinite; }

/* ===== CAKE ===== */
.cake-section { text-align: center; }
.cake {
  position: relative; width: 260px; height: 220px; margin: 3rem auto 1rem;
  cursor: pointer;
}
.plate {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 300px; height: 26px; border-radius: 50%;
  background: linear-gradient(#e7e2ea, #b9b2c2);
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.cake-bottom, .cake-mid, .cake-top {
  position: absolute; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 8px 8px;
}
.cake-bottom { bottom: 16px; width: 240px; height: 90px; background: linear-gradient(#ff8fbf, #d5468b); }
.cake-mid { bottom: 96px; width: 190px; height: 60px; background: linear-gradient(#ffa9cf, #e05c9a); }
.cake-top { bottom: 146px; width: 140px; height: 44px; background: linear-gradient(#ffc2df, #e878ac); }
.cake-bottom::before, .cake-mid::before, .cake-top::before {
  content:""; position:absolute; top:-8px; left:0; right:0; height:18px;
  background: radial-gradient(circle at 12px 0, #fff 8px, transparent 9px) repeat-x;
  background-size: 24px 18px;
}
.candles { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; z-index: 3; }
.candle { width: 8px; height: 46px; border-radius: 4px; background: repeating-linear-gradient(45deg,#fff,#fff 6px,#ff6fae 6px,#ff6fae 12px); position: relative; }
.flame {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff 0, #ffd36e 40%, #ff6a00 100%);
  box-shadow: 0 0 16px 4px rgba(255,150,0,.7);
  transform-origin: bottom center;
  animation: flicker .25s ease-in-out infinite alternate;
  cursor: pointer;
}
.flame.out { animation: none; opacity: 0; box-shadow: none; transform: translateX(-50%) scaleY(0); transition: all .4s ease; }
@keyframes flicker { from { transform: translateX(-50%) scale(1) rotate(-2deg);} to { transform: translateX(-52%) scale(1.1) rotate(2deg);} }

.wish-msg { min-height: 1.5rem; color: var(--gold); font-size: 1.2rem; margin: 1rem 0; font-family: "Great Vibes", cursive; font-size: 2rem; }

/* ===== SLIDESHOW (COVERFLOW) ===== */
.slideshow {
  position: relative;
  width: 100%;
  height: min(70vh, 560px);
  perspective: 1600px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.slide-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.slide {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(220px, 44vw, 380px);
  height: clamp(300px, 60vh, 500px);
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  background: #1a0a24;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s ease, filter .6s ease;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  cursor: pointer;
}
.slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.slide.is-active img { animation: kenburns 7s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, 1.5%); }
}
.slideshow::after {
  content: "";
  position: absolute; bottom: -8%; left: 50%; transform: translateX(-50%);
  width: 60%; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 95, 162, .3), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
}
.slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20,6,22,.55));
  opacity: 0; transition: opacity .5s ease;
}
.slide.is-active { cursor: zoom-in; }
.slide.is-active::before {
  content: "\2665 tap to enlarge";
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: .8rem; letter-spacing: 1px; z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,.7);
  opacity: 0; transition: opacity .4s ease;
}
.slide.is-active:hover::before, .slide.is-active:hover::after { opacity: 1; }

.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 54px; height: 54px; border-radius: 50%;
  font-size: 2rem; color: #fff; cursor: pointer;
  background: var(--glass); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.slide-nav:hover { background: var(--pink); transform: translateY(-50%) scale(1.08); }
.slide-prev { left: 2%; }
.slide-next { right: 2%; }

.slide-play {
  position: absolute; bottom: -6px; right: 4%;
  z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--pink-soft); font-size: .8rem; cursor: pointer;
  background: var(--glass); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
}
.slide-play:hover { background: rgba(255,255,255,.15); }

.slide-dots { display: flex; gap: 10px; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.slide-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.25); padding: 0;
  transition: background .3s ease, transform .3s ease;
}
.slide-dots button.on { background: var(--pink); transform: scale(1.4); }

/* ===== MEMORY TIMELINE ===== */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding: 1rem 0; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), var(--pink), var(--purple));
  border-radius: 3px; opacity: .55;
}
.tl-item {
  position: relative; width: 50%; padding: 1rem 2.6rem 2.4rem;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.tl-item.in { opacity: 1; transform: none; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }
.tl-item::before {
  content: "\2665"; position: absolute; top: 1.2rem;
  width: 34px; height: 34px; line-height: 34px; text-align: center;
  font-size: .9rem; color: #2a0a1f;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 95, 162, .18), 0 6px 18px rgba(0,0,0,.4);
  z-index: 2;
}
.tl-item:nth-child(odd)::before { right: -17px; }
.tl-item:nth-child(even)::before { left: -17px; }
.tl-card {
  display: inline-block; max-width: 320px;
  background: var(--card); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 1rem; backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: pointer;
}
.tl-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 22px 55px rgba(255,95,162,.3); }
.tl-card img {
  width: 100%; height: 170px; object-fit: cover;
  border-radius: 12px; display: block; margin-bottom: .8rem;
}
.tl-title { font-family: "Playfair Display", serif; color: var(--gold); font-size: 1.15rem; margin-bottom: .25rem; }
.tl-text { color: var(--muted); font-size: .9rem; line-height: 1.6; }

@media (max-width: 640px) {
  .timeline::before { left: 16px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) {
    width: 100%; left: 0; text-align: left; padding: 1rem 0 2rem 3.2rem;
  }
  .tl-item:nth-child(odd)::before, .tl-item:nth-child(even)::before { left: 0; right: auto; }
}

/* ===== BIBLE VERSE ===== */
.verse-section { display: flex; justify-content: center; }
.verse-card {
  position: relative; max-width: 720px; text-align: center;
  padding: 3.5rem clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255,211,110,.12), rgba(164,92,255,.1));
  border: 1px solid rgba(255,211,110,.35);
  box-shadow: 0 20px 60px rgba(0,0,0,.4), inset 0 0 60px rgba(255,211,110,.06);
  backdrop-filter: blur(10px);
}
.verse-mark {
  font-family: "Playfair Display", serif;
  font-size: 5rem; line-height: 0; color: var(--gold);
  opacity: .55; margin-bottom: 1.5rem;
}
.verse-text {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.8rem, 5.5vw, 3rem);
  line-height: 1.4; color: var(--pink-soft);
  margin: 0 0 1rem;
  text-shadow: 0 2px 20px rgba(255,95,162,.3);
}
.verse-ref {
  display: block; font-style: normal; letter-spacing: 3px; text-transform: uppercase;
  font-size: .8rem; color: var(--gold); margin-bottom: 1.8rem;
}
.verse-blessing { color: #f3dcea; line-height: 1.9; font-weight: 300; }

/* ===== LETTER ===== */
.letter {
  max-width: 760px; margin: 0 auto; background: var(--card);
  border: 1px solid rgba(255,255,255,.12); border-radius: 26px;
  padding: 3rem clamp(1.5rem,5vw,3.5rem); backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.letter p { color: #f3dcea; line-height: 1.9; margin-bottom: 1.2rem; font-weight: 300; font-size: 1.08rem; }
.signature { text-align: right; color: var(--gold); font-size: 1.6rem; margin-top: 1.5rem; }

/* ===== FINALE ===== */
.finale { text-align: center; }
.finale-note { margin-top: 2rem; font-family: "Great Vibes", cursive; font-size: 2.2rem; color: var(--pink-soft); }

.foot { text-align: center; padding: 2.5rem 1rem 3.5rem; color: var(--muted); position: relative; z-index: 2; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(8,3,12,.94); place-items: center;
  backdrop-filter: blur(6px);
}
.lightbox.open { display: grid; animation: fadeIn .3s ease; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.lb-close, .lb-nav {
  position: absolute; background: var(--glass); border: 1px solid rgba(255,255,255,.25);
  color: #fff; cursor: pointer; border-radius: 50%; backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: background .2s ease, transform .2s ease;
}
.lb-close { top: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.2rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2rem; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close:hover, .lb-nav:hover { background: var(--pink); }

/* ===== KEYFRAMES ===== */
@keyframes beat { 0%,100%{ transform: scale(1);} 15%{ transform: scale(1.18);} 30%{ transform: scale(1);} 45%{ transform: scale(1.12);} }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.8;} 50%{ transform: scale(1.15); opacity:1;} }
@keyframes shine { to { background-position: 200% center; } }
@keyframes floatUp { from { opacity:0; transform: translateY(30px);} to { opacity:1; transform: none;} }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== RESPONSIVE LAYOUT ===== */
@media (max-width: 900px) {
  section {
    width: 100%;
    padding: 5rem clamp(1rem, 4vw, 2rem);
  }

  .hero {
    min-height: 100svh;
    padding: 5rem 1.25rem 2rem;
  }

  .hero-name { font-size: clamp(5rem, 20vw, 10rem); }
  .hero-crown { font-size: clamp(4rem, 13vw, 7rem); }

  .slideshow {
    height: min(68svh, 540px);
    overflow: hidden;
  }

  .slide {
    width: clamp(230px, 58vw, 360px);
    height: min(58svh, 470px);
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .stat {
    min-width: 0;
    padding: 1.75rem 1rem;
  }
}

@media (max-width: 640px) {
  body { background-attachment: scroll; }

  .gate-inner {
    width: min(100%, 420px);
    padding: 1.5rem;
  }

  .giftbox {
    width: 128px;
    height: 112px;
    transform-origin: center bottom;
  }

  .gift-body { width: 112px; height: 76px; }
  .gift-lid { width: 128px; }

  .music-toggle {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 46px;
    height: 46px;
  }

  .hero {
    min-height: 100svh;
    padding:
      max(4.5rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      2rem
      max(1rem, env(safe-area-inset-left));
  }

  .hero-eyebrow {
    letter-spacing: 3px;
    font-size: .7rem;
  }

  .hero-crown {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
    margin-bottom: -.25rem;
  }

  .hero-name {
    font-size: clamp(4.5rem, 24vw, 7rem);
    overflow-wrap: anywhere;
  }

  .hero-tag {
    font-size: clamp(1.1rem, 5vw, 1.45rem);
    margin: .5rem auto 1.5rem;
  }

  .hero-cta {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 320px);
    margin-inline: auto;
  }

  .btn-primary,
  .btn-ghost {
    min-height: 48px;
    padding: .85rem 1.25rem;
  }

  .scroll-hint { margin-top: 2rem; }

  section { padding: 4rem 1rem; }
  .section-title { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .section-sub {
    margin: 0 auto 2rem;
    max-width: 34ch;
    font-size: .92rem;
    line-height: 1.7;
  }

  .slideshow {
    height: min(66svh, 500px);
    margin-inline: -1rem;
    width: calc(100% + 2rem);
  }

  .slide {
    width: min(72vw, 310px);
    height: min(56svh, 430px);
    border-radius: 18px;
  }

  .slide-nav {
    width: 44px;
    height: 44px;
    font-size: 1.65rem;
  }

  .slide-prev { left: 8px; }
  .slide-next { right: 8px; }
  .slide-play {
    right: 14px;
    bottom: 0;
    width: 44px;
    height: 44px;
  }

  .slide-dots {
    gap: 7px;
    margin-top: 1.5rem;
    padding-inline: 1rem;
  }

  .slide-dots button {
    width: 8px;
    height: 8px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat {
    width: min(100%, 360px);
    margin-inline: auto;
    padding: 1.5rem;
  }

  .cake {
    transform: scale(.88);
    transform-origin: center bottom;
    margin-top: 1rem;
    margin-bottom: -1rem;
  }

  .verse-card,
  .letter {
    width: 100%;
    padding: 2.25rem 1.25rem;
    border-radius: 20px;
  }

  .verse-text { font-size: clamp(1.7rem, 8vw, 2.35rem); }
  .verse-blessing,
  .letter p {
    font-size: .98rem;
    line-height: 1.75;
  }

  .signature {
    text-align: center;
    font-size: 1.35rem;
  }

  .finale .btn-primary.big {
    width: min(100%, 320px);
    font-size: 1.05rem;
    padding-inline: 1rem;
  }

  .finale-note { font-size: 1.9rem; }

  .lightbox img {
    max-width: calc(100vw - 24px);
    max-height: 78svh;
    border-radius: 10px;
  }

  .lb-close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }

  .lb-nav {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }

  .foot {
    padding:
      2rem
      1rem
      max(2.5rem, env(safe-area-inset-bottom));
    font-size: .88rem;
  }
}

@media (max-width: 380px) {
  .hero-name { font-size: 4.25rem; }
  .hero-crown { font-size: 3.5rem; }
  .slide { width: 76vw; }
  .cake { transform: scale(.8); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding-block: 1rem;
  }

  .hero-crown { font-size: 3rem; }
  .hero-name { font-size: 5rem; }
  .hero-tag { margin-bottom: .75rem; }
  .scroll-hint { display: none; }

  .slideshow { height: 88svh; }
  .slide {
    width: min(34vw, 280px);
    height: 76svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
