:root {
  --bg: #11091f;
  --bg-2: #1a0f2c;
  --pink: #ff7eb6;
  --pink-2: #ffb3d3;
  --gold: #ffd166;
  --cream: #fff7ed;
  --text: #fffaf6;
  --muted: rgba(255, 250, 246, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,126,182,.12), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(255,209,102,.09), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  overscroll-behavior: none;
}

body.shaking { overflow: hidden; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.section {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 6rem 1.25rem;
}

.hero {
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 20%;
  background: linear-gradient(transparent, var(--bg));
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .45;
}
.orb-one {
  width: 320px;
  height: 320px;
  background: #6f3cff;
  left: -120px;
  top: 10%;
}
.orb-two {
  width: 240px;
  height: 240px;
  background: #ff4f9a;
  right: -80px;
  bottom: 15%;
}

.eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--pink-2);
  font-weight: 700;
}

.hero-title {
  position: relative;
  z-index: 2;
  margin: 1.2rem 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.7rem, 13vw, 9.5rem);
  line-height: .86;
  letter-spacing: -.05em;
}
.hero-title .line { display: block; }
.hero-title .accent {
  color: var(--pink);
  font-style: italic;
  text-shadow: 0 0 38px rgba(255,126,182,.22);
}

.hero-copy {
  max-width: 580px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  color: rgba(255,255,255,.48);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 3;
}
.mouse {
  width: 24px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  padding-top: 7px;
}
.mouse i {
  display: block;
  width: 3px;
  height: 8px;
  background: var(--pink);
  border-radius: 99px;
  margin: auto;
  animation: scrollDot 1.5s infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(13px); opacity: 0; }
}

.age-section {
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 8vw, 8rem);
  max-width: 1200px;
  margin: auto;
}
.age-card { text-align: center; }
.age-card .small,
.age-card .years { display: block; color: var(--muted); }
.age-number {
  font-family: "Playfair Display", serif;
  font-size: clamp(9rem, 28vw, 20rem);
  line-height: .8;
  letter-spacing: -.12em;
  color: var(--gold);
  filter: drop-shadow(0 0 35px rgba(255,209,102,.12));
}
.digit { display: inline-block; }
.years {
  text-transform: uppercase;
  letter-spacing: .4em;
  font-size: .9rem;
  margin-top: 1.5rem;
}
.age-text {
  max-width: 480px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  line-height: 1.25;
  color: var(--cream);
}

.cake-section {
  min-height: 130svh;
  align-content: center;
  gap: 3rem;
  overflow: hidden;
}
.cake-copy { text-align: center; z-index: 3; }
.cake-copy h2,
.final-card h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.7rem, 8vw, 6.5rem);
  line-height: .95;
  margin: .5rem 0 1rem;
}
.cake-copy p:last-child { color: var(--muted); }

.stage {
  width: min(92vw, 620px);
  min-height: 520px;
  display: grid;
  place-items: center;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,.16), transparent 65%);
  filter: blur(8px);
}

.cake {
  width: 310px;
  height: 380px;
  position: relative;
  transform-origin: center bottom;
  z-index: 2;
}
.cake-top {
  position: absolute;
  width: 250px;
  height: 65px;
  left: 30px;
  top: 155px;
  background: #fff1e7;
  border-radius: 50%;
  box-shadow: inset 0 -10px 0 rgba(255,126,182,.15);
  z-index: 4;
}
.cake-body {
  position: absolute;
  width: 250px;
  height: 145px;
  left: 30px;
  top: 183px;
  border-radius: 0 0 42px 42px;
  background: linear-gradient(110deg, #ff71ae, #ff9ac7 44%, #f262a2);
  box-shadow: 0 35px 55px rgba(0,0,0,.28), inset 0 -15px 0 rgba(127,29,77,.12);
  overflow: hidden;
  z-index: 3;
}
.cake-shine {
  position: absolute;
  width: 65px;
  height: 190px;
  transform: rotate(18deg);
  left: 28px;
  top: -25px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}
.cake-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Playfair Display", serif;
  font-size: 4.6rem;
  font-style: italic;
  color: rgba(255,255,255,.93);
  text-shadow: 0 3px 0 rgba(89,23,59,.14);
}
.cake-base {
  position: absolute;
  width: 270px;
  height: 28px;
  left: 20px;
  top: 316px;
  border-radius: 50%;
  background: #8d3864;
  z-index: 2;
}
.plate {
  position: absolute;
  width: 310px;
  height: 45px;
  left: 0;
  top: 325px;
  border-radius: 50%;
  background: linear-gradient(#fff9f0, #d9d0de);
  box-shadow: 0 20px 35px rgba(0,0,0,.24);
}

.cream {
  position: absolute;
  top: 37px;
  width: 27px;
  background: #fff1e7;
  border-radius: 0 0 18px 18px;
}
.c1 { left: 16px; height: 30px; }
.c2 { left: 62px; height: 44px; }
.c3 { left: 112px; height: 27px; }
.c4 { left: 164px; height: 39px; }
.c5 { left: 210px; height: 25px; }

.candle-wrap {
  position: absolute;
  left: 50%;
  top: 29px;
  transform: translateX(-50%);
  width: 52px;
  height: 140px;
  z-index: 8;
}
.candle {
  position: absolute;
  width: 28px;
  height: 92px;
  left: 12px;
  bottom: 0;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(90deg, #fff0aa, #ffd166 50%, #e8a82f);
  overflow: hidden;
  box-shadow: inset -5px 0 0 rgba(125,74,0,.12);
}
.stripe {
  position: absolute;
  width: 50px;
  height: 9px;
  left: -10px;
  background: #ff6b9e;
  transform: rotate(-30deg);
}
.stripe-1 { top: 16px; }
.stripe-2 { top: 44px; }
.stripe-3 { top: 72px; }

.flame {
  position: absolute;
  width: 30px;
  height: 45px;
  left: 11px;
  top: 0;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(#fff7b2 5%, #ffd166 42%, #ff6b35 100%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 12px rgba(255,159,28,.9)) drop-shadow(0 0 28px rgba(255,107,53,.55));
  animation: flame 1.2s ease-in-out infinite alternate;
}
.flame::before {
  content: "";
  position: absolute;
  inset: 8px 8px 4px;
  border-radius: inherit;
  background: #fff8dd;
}
.flame-core {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 7px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #7a4cff;
  z-index: 2;
  opacity: .8;
}
@keyframes flame {
  from { transform: rotate(-3deg) scaleX(.95); }
  to { transform: rotate(4deg) scaleX(1.06) scaleY(.96); }
}

.smoke {
  position: absolute;
  width: 80px;
  height: 100px;
  left: -14px;
  top: -15px;
  pointer-events: none;
  opacity: 0;
}
.smoke span {
  position: absolute;
  left: 32px;
  top: 38px;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(230,225,235,.42);
  border-radius: 50%;
}

.press-ring {
  position: absolute;
  width: 370px;
  height: 370px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  z-index: 1;
}
.press-ring span {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: 3px solid var(--pink);
  opacity: .7;
  transform: scale(0);
}
.press-label {
  position: absolute;
  bottom: 10px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .7rem;
}

.final-section {
  text-align: center;
  min-height: 100svh;
}
.final-card {
  max-width: 800px;
  padding: clamp(2rem, 7vw, 5rem);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  backdrop-filter: blur(18px);
}
.final-card > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}
.signature {
  margin-top: 2.5rem;
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--pink-2);
  font-size: 1.25rem;
}

@media (max-width: 760px) {
  .age-section { grid-template-columns: 1fr; text-align: center; }
  .age-text { margin: 0 auto; font-size: 1.75rem; }
  .age-number { font-size: 10rem; }
  .cake-section { min-height: 120svh; }
  .stage { transform: scale(.88); margin-block: -30px; }
  .scroll-indicator { bottom: 1rem; }
}

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