:root {
  --wine: #5f2935;
  --wine-dark: #3e1822;
  --sage: #71806a;
  --sage-dark: #4b5a47;
  --rose: #b57d82;
  --gold: #c7a86a;
  --cream: #f7f0e5;
  --paper: #fffaf3;
  --ink: #332c2a;
  --white: #fffefb;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

.login-page { min-height: 100svh; display: grid; place-items: center; padding: 2rem 1.25rem; color: var(--cream); background: var(--wine-dark); background-image: linear-gradient(135deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%), radial-gradient(circle at 50% 0, rgba(199,168,106,.2), transparent 42%); background-size: 28px 28px, auto; overflow: hidden; }
.login-modal { position: relative; width: min(100%, 34rem); padding: clamp(2.4rem, 7vw, 4.5rem); color: var(--ink); background: var(--paper); border: 1px solid rgba(199,168,106,.7); box-shadow: 0 1.5rem 5rem rgba(20,6,9,.38); text-align: center; z-index: 2; }
.login-modal::before { content: ""; position: absolute; inset: .7rem; border: 1px solid rgba(95,41,53,.18); pointer-events: none; }
.login-mark { position: relative; width: 4.8rem; height: 4.8rem; margin: -6.8rem auto 2rem; display: grid; place-items: center; color: var(--cream); background: var(--wine); border: 1px solid var(--gold); border-radius: 50%; font-family: var(--serif); font-size: 2rem; box-shadow: 0 .6rem 1.5rem rgba(62,24,34,.3); }
.login-mark span { position: absolute; right: .8rem; bottom: .45rem; color: var(--gold); font: 700 .7rem var(--sans); }
.login-eyebrow, .eyebrow, .section-number { margin: 0; color: var(--wine); font-size: .79rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.login-modal h1 { margin: .9rem 0 0; font: 400 clamp(2.35rem, 7vw, 3.8rem)/1.05 var(--serif); letter-spacing: -.035em; }
.login-copy { max-width: 24rem; margin: 1.25rem auto 1.7rem; font-family: var(--serif); font-size: 1.12rem; }
.login-form { position: relative; display: grid; gap: .85rem; }
.pin-label { color: var(--sage-dark); font-size: .79rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pin-fields { display: flex; justify-content: center; gap: clamp(.45rem, 2vw, .75rem); }
.pin-digit { width: clamp(3.15rem, 14vw, 4.2rem); height: 4.5rem; color: var(--wine-dark); background: var(--white); border: 1px solid #bcae9c; border-radius: 2px; font-family: var(--serif); font-size: 2rem; font-weight: 700; text-align: center; outline: none; }
.pin-digit:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(95,41,53,.15); transform: translateY(-2px); }
.login-form button, .primary-button, .blow-button { border: 0; color: var(--white); background: var(--wine); cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.login-form button { justify-self: center; margin-top: .35rem; padding: .9rem 1.4rem; border-radius: 2px; box-shadow: 0 .5rem 1.1rem rgba(95,41,53,.18); font-weight: 700; }
.login-form button:hover, .primary-button:hover, .blow-button:hover { background: var(--wine-dark); transform: translateY(-2px); }
.login-hint { margin: .25rem 0 0; color: #665c57; font: .95rem var(--serif); }
.login-error { margin: 0; color: #a3283d; font-size: .88rem; font-weight: 700; }
.login-decor { position: fixed; color: rgba(199,168,106,.48); font-family: var(--serif); z-index: 1; }
.login-star { top: 8%; left: 8%; font-size: clamp(4rem, 10vw, 8rem); transform: rotate(-17deg); }
.login-heart { right: 8%; bottom: 8%; font-size: clamp(3rem, 8vw, 6rem); }

.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(20rem, .75fr); align-items: center; gap: clamp(3rem, 7vw, 8rem); padding: 7rem clamp(1.5rem, 7vw, 8rem) 6rem; color: var(--cream); background: var(--wine-dark); overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 48vw; height: 48vw; right: -17vw; top: -18vw; border: 1px solid rgba(199,168,106,.2); border-radius: 50%; box-shadow: 0 0 0 5vw rgba(199,168,106,.025), 0 0 0 10vw rgba(199,168,106,.02); }
.nav { position: absolute; inset: 1.7rem clamp(1.5rem, 5vw, 5rem) auto; display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.logo { width: 3.7rem; height: 3.7rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--cream); font: 400 1.6rem var(--serif); text-decoration: none; }
.logo span { color: var(--gold); font: .65rem var(--sans); }
.nav-pill { padding: .7rem 1.1rem; border: 1px solid rgba(247,240,229,.5); border-radius: 99px; font-size: .88rem; text-decoration: none; }
.nav-pill:hover { color: var(--wine-dark); background: var(--cream); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { color: var(--gold); }
.eyebrow::after { content: ""; display: inline-block; width: 3rem; margin: 0 0 .25rem .8rem; border-top: 1px solid currentColor; }
h1 { margin: 1.6rem 0 1.9rem; font: 400 clamp(4.5rem, 10vw, 9.5rem)/.76 var(--serif); letter-spacing: -.075em; }
h1 em { display: inline-block; color: var(--cream); font-weight: 400; }
.intro { max-width: 36rem; color: #e8ded3; font: clamp(1.2rem, 1.7vw, 1.48rem)/1.55 var(--serif); }
.primary-button { display: inline-flex; align-items: center; margin-top: 1.1rem; padding: .9rem 1.35rem; border: 1px solid var(--gold); border-radius: 2px; background: transparent; text-decoration: none; }
.primary-button:hover { color: var(--wine-dark); background: var(--gold); }
.portrait-wrap { position: relative; width: min(37vw, 31rem); justify-self: center; z-index: 2; }
.portrait-frame { aspect-ratio: .79; overflow: hidden; border: .65rem solid var(--paper); box-shadow: 1.5rem 1.5rem 0 rgba(199,168,106,.23); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.age-sticker { position: absolute; left: -3rem; bottom: 2.4rem; width: 8.3rem; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--wine-dark); background: var(--gold); border: .45rem solid var(--wine-dark); border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); }
.age-sticker strong { font: 400 3.5rem/.8 var(--serif); }
.age-sticker span { margin-top: .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.botanical { position: absolute; z-index: 3; color: var(--gold); font-family: var(--serif); }
.botanical-one { top: -2.2rem; right: -2.2rem; font-size: 5.2rem; transform: rotate(20deg); }
.botanical-two { left: -1.5rem; top: 11%; font-size: 2rem; }
.hero-foot { position: absolute; inset: auto 0 0; padding: .9rem 1rem; color: var(--wine-dark); background: var(--gold); text-align: center; font-size: .76rem; font-weight: 700; letter-spacing: clamp(.08em, .4vw, .22em); }

main section { padding: clamp(5rem, 10vw, 9rem) clamp(1.5rem, 7vw, 8rem); }
.wish-section { position: relative; background: var(--paper); }
.section-number { margin-bottom: 2rem; }
.wish-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(3rem, 8vw, 9rem); align-items: center; }
.wish-grid h2, .family-copy h2, .cake-intro h2, .stats-section h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; }
.wish-grid h2 { font-size: clamp(3rem, 5.8vw, 6.2rem); line-height: 1; }
.wish-copy { padding-left: 1.6rem; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; }
.signature { margin-top: 1.6rem; color: var(--wine); font-family: var(--sans); font-weight: 700; }
.signature span { color: var(--rose); }

.family-section { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(3rem, 7vw, 7rem); color: var(--cream); background: var(--sage-dark); }
.family-photo { position: relative; padding: .8rem; background: var(--paper); box-shadow: 1.25rem 1.25rem 0 rgba(34,45,33,.35); }
.family-photo img { width: 100%; max-height: 43rem; object-fit: cover; object-position: center; }
.photo-note { position: absolute; right: 1.5rem; bottom: 1.5rem; max-width: 17rem; padding: .75rem 1rem; color: var(--ink); background: rgba(255,250,243,.94); font: italic 1rem/1.35 var(--serif); box-shadow: 0 .4rem 1rem rgba(0,0,0,.2); }
.family-copy p { margin: 0 0 1rem; color: #d7caa8; font-size: .78rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.family-copy h2 { font-size: clamp(2.6rem, 4.4vw, 5rem); line-height: 1.04; }
.ornament { display: block; margin-top: 2rem; color: var(--gold); font-size: 3rem; }

.cake-section { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(3rem, 7vw, 8rem); color: var(--cream); background: var(--wine); }
.cake-intro .section-number { color: var(--gold); }
.cake-intro h2 { font-size: clamp(3.1rem, 5.7vw, 6.4rem); line-height: .96; }
.cake-intro > p:last-child { max-width: 29rem; color: #eadde0; font: 1.1rem/1.65 var(--serif); }
.cake-stage { position: relative; min-height: 39rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 4rem; }
.celebration-message { position: absolute; top: 0; padding: .75rem 1.1rem; color: var(--wine-dark); background: var(--gold); font-family: var(--serif); font-weight: 700; opacity: 0; transform: translateY(1rem); transition: .4s ease; }
.cake-stage.complete .celebration-message { opacity: 1; transform: none; }
.candles { position: relative; z-index: 3; height: 7.3rem; display: flex; align-items: flex-end; justify-content: center; gap: clamp(.65rem, 2vw, 1.3rem); }
.candle { position: relative; width: 1.15rem; height: 5.2rem; padding: 0; border: 0; background: repeating-linear-gradient(45deg, var(--cream) 0 8px, var(--rose) 8px 16px); cursor: pointer; }
.candle:nth-child(even) { height: 6rem; }
.flame { position: absolute; left: 50%; top: -2.05rem; width: 1.2rem; height: 1.8rem; border-radius: 60% 40% 55% 45%; background: #ffd27b; box-shadow: 0 0 1.1rem #ffb13b; transform: translateX(-50%) rotate(45deg); animation: flicker .7s ease-in-out infinite alternate; }
.candle.out .flame { opacity: 0; animation: none; }
@keyframes flicker { to { transform: translateX(-50%) rotate(40deg) scale(.86); } }
.cake { position: relative; width: min(100%, 30rem); height: 14rem; display: grid; place-items: center; border-radius: 1rem 1rem .35rem .35rem; background: linear-gradient(#f1d8c6 0 32%, #d7a69d 32% 37%, #ebc7b8 37% 68%, #d7a69d 68% 73%, #eccbbe 73%); box-shadow: inset 0 -1rem rgba(95,41,53,.12), 0 1.2rem 2rem rgba(50,13,23,.32); }
.icing { position: absolute; inset: 0 0 auto; height: 3rem; border-radius: 1rem 1rem 0 0; background: var(--paper); }
.icing span { position: absolute; top: 2.2rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--paper); }
.icing span:nth-child(1) { left: 10%; }.icing span:nth-child(2) { left: 34%; }.icing span:nth-child(3) { left: 60%; }.icing span:nth-child(4) { left: 82%; }
.cake-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; color: var(--wine-dark); }
.cake-text strong { font: 400 5rem/.8 var(--serif); }
.cake-text small { margin-top: .8rem; font-size: .7rem; font-weight: 700; letter-spacing: .18em; }
.cake-plate { width: min(112%, 34rem); height: 1.25rem; margin-top: .75rem; border-radius: 50%; background: var(--gold); box-shadow: 0 .7rem 0 rgba(62,24,34,.35); }
.blow-button { display: flex; gap: .8rem; align-items: center; margin-top: 2.8rem; padding: .8rem 1rem; border: 1px solid var(--gold); border-radius: 99px; background: transparent; text-align: left; }
.blow-button strong, .blow-button small { display: block; }.blow-button small { color: #e5d4d7; font-size: .76rem; }
.mic-icon { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; color: var(--wine); background: var(--gold); border-radius: 50%; font-size: .6rem; }
.mic-status { min-height: 1.6rem; margin: .75rem 0 0; color: #eadde0; font-size: .88rem; text-align: center; }

.stats-section { color: var(--ink); background: var(--cream); }
.stats-heading { max-width: 52rem; margin-bottom: 3.5rem; }
.stats-heading h2 { font-size: clamp(3rem, 5.4vw, 6rem); line-height: 1; }
.stats-heading > p:last-child { max-width: 38rem; font-family: var(--serif); font-size: 1.15rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card { min-height: 16rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; border: 1px solid #d6c9b8; background: var(--paper); }
.stat-card strong { display: flex; gap: .2rem; align-items: baseline; color: var(--wine); font: 400 clamp(2.8rem, 5vw, 5.2rem)/1 var(--serif); }
.stat-card strong i { font-size: .45em; font-weight: 400; }
.stat-card > span { margin-top: .5rem; font-weight: 700; }.stat-card small { margin-top: .8rem; color: #665e59; font-family: var(--serif); }
.stat-main { grid-column: span 2; color: var(--cream); background: var(--wine-dark); border-color: var(--wine-dark); }.stat-main strong { color: var(--gold); }.stat-main small { color: #d8cbd0; }
.stat-sage { color: var(--cream); background: var(--sage-dark); border-color: var(--sage-dark); }.stat-sage strong { color: #e8d8ae; }.stat-sage small { color: #dfe5da; }
.stat-wine { color: var(--cream); background: var(--wine); border-color: var(--wine); }.stat-wine strong { color: var(--gold); }.stat-wine small { color: #eadde0; }
.stat-heart strong { color: var(--rose); }
footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem clamp(1.5rem, 7vw, 8rem); color: #e9ddd3; background: var(--wine-dark); font-size: .9rem; }
footer span { color: var(--gold); } footer a { text-underline-offset: .25rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 8rem; text-align: center; }
  .eyebrow::after { display: none; }
  .intro { margin-inline: auto; }
  .portrait-wrap { width: min(78vw, 28rem); margin: 1rem auto 2rem; }
  .wish-grid, .family-section, .cake-section { grid-template-columns: 1fr; }
  .family-section { text-align: center; }.family-photo { order: 2; }
  .cake-intro { text-align: center; }.cake-intro > p:last-child { margin-inline: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav { inset-inline: 1.1rem; }.nav-pill { font-size: .8rem; }
  .hero { padding-inline: 1.25rem; }.hero h1 { font-size: clamp(4.2rem, 25vw, 6.5rem); }
  .age-sticker { left: -1rem; width: 7rem; }.age-sticker strong { font-size: 3rem; }
  main section { padding-inline: 1.25rem; }
  .wish-copy { padding-left: 1.1rem; }
  .family-section { padding-inline: 1rem; }.photo-note { position: static; display: block; max-width: none; }
  .cake-stage { min-height: 34rem; }.cake { height: 12rem; }.cake-text strong { font-size: 4.2rem; }
  .stats-grid { grid-template-columns: 1fr; }.stat-main { grid-column: auto; }.stat-card { min-height: 14rem; }
  footer { flex-direction: column; text-align: center; }
}

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