:root {
  --rose-deep: #c45a74;
  --rose: #e87a95;
  --blush: #ffc2d1;
  --peach: #ffd8c2;
  --cream: #fff7f4;
  --mint: #b8d8d0;
  --ink: #3a2430;
  --ink-soft: #6b4a58;
  --white: #fffdfc;
  --font-display: "Yeseva One", Georgia, serif;
  --font-script: "Caveat", cursive;
  --font-body: "Nunito", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 10% -10%, var(--blush) 0%, transparent 55%),
    radial-gradient(100% 70% at 100% 0%, var(--peach) 0%, transparent 50%),
    radial-gradient(90% 60% at 50% 100%, var(--mint) 0%, transparent 45%),
    linear-gradient(165deg, #ffe8ef 0%, var(--cream) 45%, #f3ebe4 100%);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: drift 18s var(--ease-out) infinite alternate;
}

.blob-a {
  width: min(55vw, 280px);
  height: min(55vw, 280px);
  background: var(--blush);
  top: 8%;
  left: -8%;
}

.blob-b {
  width: min(45vw, 220px);
  height: min(45vw, 220px);
  background: var(--peach);
  top: 35%;
  right: -10%;
  animation-delay: -6s;
  animation-duration: 22s;
}

.blob-c {
  width: min(50vw, 240px);
  height: min(50vw, 240px);
  background: var(--mint);
  bottom: 5%;
  left: 20%;
  animation-delay: -12s;
  animation-duration: 20s;
}

.sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.55;
  animation: twinkle 3.5s ease-in-out infinite;
}

main {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.hero {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.85rem;
  padding: max(1.5rem, env(safe-area-inset-top)) 0 2rem;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 16vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--rose-deep);
  animation: rise 1s var(--ease-out) both;
}

.headline {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  animation: rise 1s var(--ease-out) 0.12s both;
}

.lede {
  margin: 0;
  max-width: 22rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  animation: rise 1s var(--ease-out) 0.22s both;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.95rem 1.45rem;
  border: none;
  border-radius: 0.85rem;
  background: var(--rose-deep);
  color: var(--white);
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s ease;
  animation: rise 1s var(--ease-out) 0.32s both;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover,
.cta:focus-visible {
  background: #b04c64;
  transform: translateY(-2px);
}

.cta:active {
  transform: translateY(0);
}

.cta-secondary {
  margin-top: 1.25rem;
  background: var(--ink);
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  background: #2a1822;
}

.hero-visual {
  width: 100%;
  margin-top: 0.75rem;
  animation: rise 1.1s var(--ease-out) 0.4s both;
}

.floral {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34vh;
}

.wish-moment {
  padding: 3rem 0 1rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.65rem;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.wish-moment .section-title,
.wish-moment .section-note {
  justify-self: stretch;
  text-align: left;
}

.cake-stage {
  position: relative;
  width: min(100%, 280px);
  margin: 1rem auto 0.5rem;
  padding-top: 1.5rem;
}

.candles {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  gap: 1.55rem;
  transform: translateX(-50%);
  z-index: 2;
}

.candle {
  position: relative;
  width: 10px;
  height: 52px;
}

.stick {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 34px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #fff3f6 0%, #f2c4cf 100%);
  transform: translateX(-50%);
}

.stick::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 2px;
  height: 6px;
  background: #5a3a44;
  transform: translateX(-50%);
}

.flame {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 12px;
  height: 18px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6c8 0%, #ffb347 45%, #ff6b4a 100%);
  transform: translateX(-50%);
  transform-origin: center bottom;
  animation: flicker 0.7s ease-in-out infinite alternate;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.candle:nth-child(2) .flame {
  animation-delay: 0.15s;
}

.candle:nth-child(3) .flame {
  animation-delay: 0.28s;
}

.smoke {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120, 100, 110, 0.25);
  transform: translateX(-50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
}

.candle.is-out .flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.2);
  animation: none;
}

.candle.is-out .smoke {
  animation: smoke-rise 1.1s var(--ease-out) forwards;
}

.cake {
  position: relative;
  margin-top: 2.6rem;
}

.cake-top {
  height: 22px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #ffd0dc 0%, #f4a7ba 100%);
}

.cake-body {
  position: relative;
  height: 68px;
  margin-top: -4px;
  border-radius: 0 0 16px 16px;
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.35) 0 10px, transparent 11px),
    radial-gradient(circle at 55% 55%, rgba(255, 255, 255, 0.28) 0 8px, transparent 9px),
    radial-gradient(circle at 78% 35%, rgba(255, 255, 255, 0.3) 0 9px, transparent 10px),
    linear-gradient(180deg, #ef8ea6 0%, #d96b88 100%);
  overflow: hidden;
}

.drip {
  position: absolute;
  top: -2px;
  left: 18%;
  width: 16px;
  height: 28px;
  border-radius: 0 0 12px 12px;
  background: #ffd0dc;
}

.drip.d2 {
  left: 48%;
  height: 34px;
}

.drip.d3 {
  left: 74%;
  height: 24px;
}

.cake-plate {
  height: 12px;
  margin: 0 auto;
  width: 92%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3e4df 0%, #e5d0c8 100%);
  box-shadow: 0 8px 18px rgba(90, 50, 60, 0.12);
}

.blow-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11.5rem;
  margin-top: 0.75rem;
  padding: 1rem 1.4rem;
  border: 2px solid rgba(196, 90, 116, 0.35);
  border-radius: 0.85rem;
  background: rgba(255, 253, 252, 0.72);
  color: var(--rose-deep);
  font: 700 1rem/1 var(--font-body);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.blow-btn,
.blow-btn * {
  -webkit-user-select: none;
  user-select: none;
}

.blow-btn:hover,
.blow-btn:focus-visible {
  border-color: var(--rose-deep);
}

.blow-btn.is-blowing {
  transform: scale(0.98);
  border-color: var(--rose-deep);
}

.blow-btn.is-done {
  pointer-events: none;
  opacity: 0.55;
}

.blow-ring {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(232, 122, 149, 0.28), rgba(255, 194, 209, 0.45));
  transition: transform 0.05s linear;
}

.blow-label {
  position: relative;
  z-index: 1;
}

.blow-hint {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.blow-hint.is-hidden {
  opacity: 0;
}

.secret {
  width: 100%;
  margin-top: 1.25rem;
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid rgba(196, 90, 116, 0.22);
  text-align: left;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.secret.is-open {
  opacity: 1;
  transform: translateY(0);
}

.secret-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--rose-deep);
}

.secret-text {
  margin: 0;
  min-height: 4.5em;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.secret-text::after {
  content: "";
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.1em;
  background: var(--rose);
  animation: caret 0.9s steps(1) infinite;
}

.secret-text.is-complete::after {
  display: none;
}

.cake-stage.is-blowing .flame {
  animation-duration: 0.22s;
  transform: translateX(-50%) scale(1.05, 0.85) skewX(-6deg);
}

.wishes {
  padding: 3.5rem 0 1rem;
  display: grid;
  gap: 1.75rem;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  color: var(--rose-deep);
}

.section-note {
  margin: -0.75rem 0 0.5rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.wish {
  padding: 0.25rem 0 0.5rem;
  border-top: 1px solid rgba(196, 90, 116, 0.22);
}

.wish h3 {
  margin: 1.1rem 0 0.45rem;
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
}

.wish p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.wish-final {
  padding-bottom: 0.5rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(196, 90, 116, 0.18);
  text-align: center;
}

.footer p {
  margin: 0;
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--rose-deep);
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

.party-layer {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.party-layer.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.party-layer.is-on .balloons,
.party-layer.is-on .party-banner {
  pointer-events: none;
}

body.party-mode .atmosphere .blob {
  opacity: 0.7;
  animation-duration: 8s;
}

.balloons {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.balloon {
  position: absolute;
  bottom: -20%;
  width: 34px;
  height: 44px;
  border-radius: 50% 50% 48% 48%;
  animation: balloon-up linear forwards;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 1px;
  height: 18px;
  background: rgba(90, 50, 60, 0.35);
  transform: translateX(-50%);
}

.balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  border: 5px solid transparent;
  border-top-color: inherit;
  transform: translateX(-50%);
}

.party-banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.5rem;
  background: radial-gradient(ellipse at center, rgba(255, 247, 244, 0.88) 0%, rgba(255, 247, 244, 0.55) 45%, transparent 72%);
  text-align: center;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}

.party-layer.is-on .party-banner {
  transform: scale(1);
  opacity: 1;
}

.party-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 14vw, 5rem);
  line-height: 0.95;
  color: var(--rose-deep);
  letter-spacing: 0.02em;
}

.party-line {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: 600;
  color: var(--ink);
}

.party-sub {
  margin: 0.35rem 0 0;
  max-width: 18rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.party-layer.is-fading {
  opacity: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, -24px, 0) scale(1.08);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

@keyframes flicker {
  from {
    transform: translateX(-50%) scale(1, 1) rotate(-2deg);
  }
  to {
    transform: translateX(-50%) scale(0.92, 1.08) rotate(3deg);
  }
}

@keyframes smoke-rise {
  0% {
    opacity: 0.45;
    transform: translateX(-50%) translateY(0) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translateX(calc(-50% + 8px)) translateY(-36px) scale(1.8);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes balloon-up {
  0% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift, 20px), -120vh, 0) rotate(6deg);
    opacity: 0.85;
  }
}

@media (min-width: 768px) {
  main {
    padding-inline: 2rem;
  }

  .hero {
    gap: 1rem;
  }

  .lede {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .blob,
  .sparkles span,
  .brand,
  .headline,
  .lede,
  .cta,
  .hero-visual,
  .flame,
  .secret-text::after {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cake-stage.is-blowing .flame {
    transform: translateX(-50%);
  }

  .balloon {
    animation: none;
    opacity: 0;
  }

  .party-banner {
    transition: none;
  }
}
