:root {
  --pink-50: #fff0f6;
  --pink-100: #ffe0ec;
  --pink-200: #ffc2da;
  --pink-300: #ff9ec2;
  --pink-400: #ff6fa6;
  --pink-500: #ff3d8a;
  --pink-600: #e91e7a;
  --pink-700: #b9135f;
  --ink: #3b0a23;
  --cream: #fff7fb;
}

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

html, body {
  height: 100%;
}

body {
  font-family: "Helvetica Neue", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, var(--pink-200) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, var(--pink-300) 0%, transparent 50%),
    linear-gradient(135deg, var(--pink-100), var(--pink-50));
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.6) 1.5px, transparent 2px),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.6) 1.5px, transparent 2px),
    radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 1px, transparent 1.5px);
  background-size: 240px 240px;
  pointer-events: none;
  z-index: 0;
  animation: sparkle 6s ease-in-out infinite alternate;
}

@keyframes sparkle {
  from { opacity: 0.4; }
  to   { opacity: 0.9; }
}

/* ───── Page-load reveal curtain ───── */

.page-reveal {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  overflow: hidden;
}

.page-reveal.done { display: none; }

.reveal-half {
  position: absolute;
  left: -2%;
  right: -2%;
  height: 52vh;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.25);
  animation-duration: 1.4s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.15, 1);
  animation-delay: 0.55s;
  animation-fill-mode: forwards;
  will-change: transform;
  backface-visibility: hidden;
}

.reveal-half.top    { top: 0;    animation-name: swipe-up; }
.reveal-half.bottom { bottom: 0; animation-name: swipe-down; }

@keyframes swipe-up {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -102%, 0); }
}
@keyframes swipe-down {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, 102%, 0); }
}

.reveal-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  line-height: 1;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
  animation: text-out 0.5s cubic-bezier(0.86, 0, 0.07, 1) 1.1s forwards;
}

.reveal-line-1,
.reveal-line-2 {
  display: block;
  opacity: 0;
}

.reveal-line-1 {
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  animation: line-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
}

.reveal-line-2 {
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-weight: 400;
  font-size: clamp(4rem, 16vw, 10rem);
  margin-top: 0.05em;
  animation: line-in-script 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes line-in {
  0%   { opacity: 0; transform: translateY(30px) scale(0.6); }
  100% { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes line-in-script {
  0%   { opacity: 0; transform: translateY(40px) scale(0.5) rotate(-12deg); }
  100% { opacity: 1; transform: translateY(0)   scale(1)   rotate(-4deg); }
}

@keyframes text-out {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* ───── Reveal animations for hero elements ───── */

.reveal {
  animation: rise-in 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: var(--delay, 1s);
}

@keyframes rise-in {
  0%   { opacity: 0; transform: translateY(40px) rotate(0deg); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0)   rotate(var(--final-rot, 0deg)); filter: blur(0); }
}

.reveal-portrait {
  animation: portrait-reveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: var(--delay, 1.3s);
}

@keyframes portrait-reveal {
  0%   { opacity: 0; transform: rotate(-22deg) scale(0.4) translateY(50px); }
  60%  { opacity: 1; transform: rotate(6deg)   scale(1.05) translateY(0); }
  100% { opacity: 1; transform: rotate(2deg)   scale(1)   translateY(0); }
}

.reveal-sticker {
  animation: sticker-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: var(--delay, 1.9s);
}

@keyframes sticker-pop {
  0%   { opacity: 0; transform: rotate(calc(var(--final-rot, 0deg) + 180deg)) scale(0); }
  70%  { opacity: 1; transform: rotate(var(--final-rot, 0deg)) scale(1.2); }
  100% { opacity: 1; transform: rotate(var(--final-rot, 0deg)) scale(1); }
}

/* ───── Layout ───── */

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  min-height: 100vh;
}

.copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.4rem 0.9rem;
  background: white;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pink-600);
  box-shadow: 0 6px 24px -10px rgba(233, 30, 122, 0.45);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 12px var(--pink-400);
}

h1 {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.02em;
}

h1 .gradient {
  display: inline-block;
  background: linear-gradient(120deg, var(--pink-500), var(--pink-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

h1 .script {
  display: block;
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--pink-600);
  --final-rot: -2deg;
  transform: rotate(-2deg);
  margin-top: 0.2em;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #5e2240;
  max-width: 46ch;
}

.lede strong {
  color: var(--pink-700);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.fact {
  background: white;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 10px 30px -16px rgba(233, 30, 122, 0.4);
  border: 1px solid var(--pink-100);
}

.fact .num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--pink-600);
  line-height: 1;
}

.fact .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a3a64;
  margin-top: 0.3rem;
  display: block;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  box-shadow: 0 12px 30px -10px rgba(233, 30, 122, 0.7);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px rgba(233, 30, 122, 0.8);
}

.portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(185, 19, 95, 0.45),
    0 0 0 6px white,
    0 0 0 10px var(--pink-200);
  transform: rotate(2deg);
  transition: transform 0.4s ease;
  max-width: 460px;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.portrait-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sticker {
  position: absolute;
  background: white;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink-700);
  box-shadow: 0 14px 30px -12px rgba(185, 19, 95, 0.5);
  border: 2px solid var(--pink-200);
  transform: rotate(var(--final-rot, 0deg));
}

.sticker-1 { top: -18px;    left: -28px;  --final-rot: -8deg; }
.sticker-2 {
  bottom: 30px; right: -36px; --final-rot: 6deg;
  background: var(--pink-500); color: white; border-color: white;
}
.sticker-3 { bottom: -22px;  left: 40px;  --final-rot: -3deg; }

/* ───── Footer ───── */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  color: var(--pink-700);
}

.footer-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.footer-divider {
  display: block;
  width: 72px;
  height: 2px;
  margin-bottom: 1.4rem;
  background: linear-gradient(90deg, transparent, var(--pink-300), transparent);
  border-radius: 2px;
}

.footer-line {
  font-size: 0.95rem;
  color: #8a3a64;
  font-weight: 500;
}

.footer-heart {
  display: inline-block;
  margin: 0 0.1em;
  animation: heartbeat 1.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1); }
  15%           { transform: scale(1.25); }
  30%           { transform: scale(1); }
  45%           { transform: scale(1.18); }
}

.footer-sign {
  font-size: 1.05rem;
  color: #8a3a64;
  font-weight: 500;
  margin-top: 0.1rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.footer-name {
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1;
  background: linear-gradient(120deg, var(--pink-500), var(--pink-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  transform: rotate(-3deg);
}

/* ───── Cake overlay ───── */

.cake-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  background:
    radial-gradient(circle at center, rgba(255, 194, 218, 0.85), rgba(185, 19, 95, 0.7));
  backdrop-filter: blur(8px);
  padding: 2rem 1rem;
}

.cake-overlay.open {
  display: flex;
  animation: fade-in 0.4s ease;
}

.cake-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--pink-700);
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(185, 19, 95, 0.5);
}
.cake-close:hover { transform: scale(1.05); }

.cake-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 40px 60px;
  animation: cake-rise 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cake-stage.shake      { animation: screen-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.cake-stage.mega-shake { animation: screen-shake 0.9s  cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes cake-rise {
  from { transform: translateY(60px) scale(0.85); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}

@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-12px, 8px)  rotate(-2deg); }
  20% { transform: translate(10px, -10px) rotate(2deg); }
  30% { transform: translate(-14px, -6px) rotate(-3deg); }
  40% { transform: translate(12px, 10px)  rotate(2deg); }
  50% { transform: translate(-8px, 8px)   rotate(-1.5deg); }
  60% { transform: translate(10px, -12px) rotate(2.5deg); }
  70% { transform: translate(-10px, 10px) rotate(-2deg); }
  80% { transform: translate(8px, 6px)    rotate(1deg); }
  90% { transform: translate(-6px, -8px)  rotate(-1deg); }
}

.cake {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  animation: jiggle 1.4s ease-in-out infinite;
}

.cake.party {
  animation: party-spin 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes jiggle {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  20% { transform: scale(1.03, 0.97) rotate(-1.2deg); }
  50% { transform: scale(0.97, 1.03) rotate(0deg); }
  80% { transform: scale(1.02, 0.98) rotate(1.2deg); }
}

@keyframes party-spin {
  0%   { transform: scale(1) rotate(0deg); }
  30%  { transform: scale(1.25) rotate(180deg); }
  60%  { transform: scale(0.85) rotate(540deg); }
  100% { transform: scale(1) rotate(720deg); }
}

.candles {
  display: flex;
  gap: 14px;
  margin-bottom: -4px;
  z-index: 3;
}

.candle {
  width: 12px;
  height: 50px;
  background:
    repeating-linear-gradient(0deg,
      #ffffff 0 5px,
      #ffd0e3 5px 10px);
  border-radius: 3px 3px 1px 1px;
  position: relative;
  cursor: pointer;
  animation: candle-sway 2.4s ease-in-out infinite;
  transform-origin: bottom center;
}

.candle::before {
  content: "";
  position: absolute;
  inset: -32px -6px -8px;
}
.candle:nth-child(1) { animation-delay: 0s; }
.candle:nth-child(2) { animation-delay: 0.3s; }
.candle:nth-child(3) { animation-delay: 0.55s; }
.candle:nth-child(4) { animation-delay: 0.8s; }
.candle:nth-child(5) { animation-delay: 1.05s; }

.candle:hover { animation-play-state: paused; transform: translateY(-3px) rotate(0deg); }
.candle:active { transform: translateY(-1px); }

@keyframes candle-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.candle .flame {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at 50% 80%, #fff8b3 0%, #ffd966 40%, #ff7a00 80%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 70% 70% 40% 40%;
  animation: flicker 0.5s ease-in-out infinite alternate;
  box-shadow: 0 0 18px #ffae00, 0 0 30px rgba(255, 174, 0, 0.5);
  transition: opacity 0.4s, transform 0.5s;
}

@keyframes flicker {
  0%   { transform: translateX(-50%) scale(1)    rotate(-4deg); }
  100% { transform: translateX(-50%) scale(1.08) rotate(4deg); }
}

.candle.out .flame {
  opacity: 0;
  transform: translateX(-50%) translateY(-30px) scale(0.4);
  box-shadow: none;
}

.candle.out::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, rgba(180, 180, 180, 0.5), transparent 70%);
  animation: smoke 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes smoke {
  from { transform: translateX(-50%) translateY(0) scale(0.6); opacity: 0.7; }
  to   { transform: translateX(-50%) translateY(-40px) scale(1.4); opacity: 0; }
}

.tier {
  position: relative;
  background: linear-gradient(180deg, var(--pink-400), var(--pink-700));
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.08);
}
.tier-top    { width: 130px; height: 56px; border-radius: 6px 6px 4px 4px; z-index: 2; }
.tier-middle { width: 200px; height: 64px; border-radius: 6px 6px 4px 4px; z-index: 1; margin-top: -2px; }
.tier-base   { width: 260px; height: 78px; border-radius: 8px 8px 6px 6px; margin-top: -2px; }

.frosting {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 18px;
  background: white;
  border-radius: 6px 6px 0 0;
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 55%,
    96% 100%, 92% 60%,
    84% 100%, 78% 55%,
    70% 100%, 64% 60%,
    56% 100%, 50% 55%,
    42% 100%, 36% 60%,
    28% 100%, 22% 55%,
    14% 100%, 8% 60%,
    4% 100%, 0% 55%
  );
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}

.plate {
  width: 320px;
  height: 22px;
  background: radial-gradient(ellipse at center, white 60%, var(--pink-100));
  border-radius: 50%;
  margin-top: -4px;
  box-shadow: 0 18px 40px -12px rgba(185, 19, 95, 0.45);
}

.cake-hint {
  background: white;
  color: var(--pink-700);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(185, 19, 95, 0.4);
}

.cake-hint.celebrate {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.5rem;
  animation:
    celebrate-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    celebrate-pulse 0.7s ease-in-out 0.5s infinite alternate;
}

@keyframes celebrate-pop {
  0%   { opacity: 0; transform: translateY(20px) scale(0.4) rotate(-8deg); }
  100% { opacity: 1; transform: translateY(0)   scale(1)   rotate(0deg); }
}

@keyframes celebrate-pulse {
  0%   { transform: scale(1)    rotate(-1.5deg); }
  100% { transform: scale(1.08) rotate(1.5deg); }
}

/* ───── Confetti ───── */

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 300;
}

.confetti-piece,
.confetti-emoji {
  --x-drift: 0px;
  --rot-end: 720deg;
  position: absolute;
  top: -30px;
  animation: confetti-fall linear forwards;
  will-change: transform, opacity;
}

.confetti-piece {
  width: 10px;
  height: 14px;
  border-radius: 2px;
}

.confetti-emoji {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(185, 19, 95, 0.3));
}

@keyframes confetti-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(var(--x-drift), 110vh) rotate(var(--rot-end)); opacity: 0; }
}

/* ───── Shared animations ───── */

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ───── Responsive ───── */

@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem 3rem;
    gap: 2.5rem;
    text-align: center;
  }
  .copy { align-items: center; }
  .eyebrow { align-self: center; }
  .lede { max-width: none; }
  .cta-row { justify-content: center; }
  .sticker-1 { left: -10px; }
  .sticker-2 { right: -10px; }

  .cake { transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .page-reveal { display: none; }
  .reveal, .reveal-portrait, .reveal-sticker {
    opacity: 1;
    animation: none;
  }
  .cake, .candle, .cake-hint.celebrate, .footer-heart { animation: none; }
}
