/* 1st birthday sample card. Palette: butter yellow, sage, peach on cream. */
:root {
  --cream: #FFF8EC; --paper: #FFFDF8; --butter: #F6D47A; --butter-soft: #FBEBC0;
  --sage: #A9C2A3; --sage-deep: #5F7D5B; --peach: #F7C3AE; --peach-deep: #E8977B;
  --ink: #3D3A34; --muted: #7A7265; --line: #EDE3D1;
  /* names used by the shared promo block */
  --serif: "Fredoka", "Nunito", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gold-light: #F6D47A; --ivory: #FFF8EC; --emerald-deep: #4C6849;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1rem/1.6 var(--sans); -webkit-tap-highlight-color: transparent;
}
.defs { position: absolute; }
h1, h2, p { margin: 0; }
svg { display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; }

/* ---------- gate ---------- */
.gate { display: none; }
html.js .gate {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px; text-align: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #FFFDF6 0%, var(--cream) 55%, #F8EEDB 100%);
  transition: opacity .6s ease, visibility .6s;
}
html.js.opened .gate { opacity: 0; visibility: hidden; }
html.js:not(.opened) body { overflow: hidden; }
.gate-kicker { font: 600 .95rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); }
.gate-name { font: 600 clamp(2.1rem, 9vw, 3rem)/1.1 var(--serif); color: var(--ink); }
.gate-name span { color: var(--peach-deep); }
.gift { position: relative; border: 0; background: none; padding: 0; margin: 18px 0 6px; width: min(64vw, 240px); cursor: pointer; animation: wiggle 2.6s ease-in-out infinite; }
.gift svg { width: 100%; height: auto; overflow: visible; }
.gift .lid { transform-box: fill-box; transform-origin: 20% 100%; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1), opacity .7s; }
html.opening .gift { animation: none; }
html.opening .gift .lid { transform: translate(-30px, -90px) rotate(-28deg); opacity: 0; }
.gate-btn {
  margin-top: 8px; min-height: 48px; padding: 0 30px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sage-deep); color: #fff; font: 600 1.02rem var(--sans); box-shadow: 0 8px 20px rgba(95, 125, 91, .3);
}
.gate-balloons .gb { position: absolute; width: 54px; height: 108px; animation: float 6s ease-in-out infinite; }
.gb1 { color: var(--butter); left: 6%; top: 8%; }
.gb2 { color: var(--peach); right: 7%; top: 12%; animation-delay: -2s !important; width: 46px !important; height: 92px !important; }
.gb3 { color: var(--sage); left: 10%; bottom: 10%; animation-delay: -3.5s !important; width: 40px !important; height: 80px !important; }
.gb4 { color: var(--butter-soft); right: 12%; bottom: 14%; animation-delay: -1s !important; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 95% { transform: rotate(-2deg); } }

/* tap hint: finger + ripple */
.tap-hint { position: absolute; right: 2%; bottom: 4%; width: 54px; height: 54px; pointer-events: none; transition: opacity .3s; }
.tap-hint .ring { position: absolute; left: 6px; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sage-deep); animation: ripple 1.6s ease-out infinite; }
.tap-hint .hand { position: absolute; left: 8px; top: 8px; font-size: 32px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translate(6px, 8px); } 35%, 50% { transform: translate(0, 0) scale(.92); } }
@keyframes ripple { 0%, 30% { transform: scale(.4); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
html.opening .tap-hint { opacity: 0; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx, 0), 110vh) rotate(var(--r, 540deg)); opacity: .9; } }

/* ---------- card ---------- */
.card { max-width: 560px; margin: 0 auto; }
html.js:not(.opened) .card { visibility: hidden; }
section { padding: 0 22px; }

.hero { position: relative; text-align: center; padding-top: 68px; padding-bottom: 8px; }
.bunting { position: absolute; top: 0; left: 0; width: 100%; height: 60px; }
.kicker { font: 600 .88rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sage-deep); }
.photo-wrap { position: relative; width: min(66vw, 250px); margin: 22px auto 14px; }
.photo {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 8px solid var(--paper); box-shadow: 0 0 0 3px var(--butter), 0 18px 40px rgba(61, 58, 52, .14);
  background: var(--butter-soft);
}
.age {
  position: absolute; right: -6px; bottom: 6px; width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center; background: var(--peach-deep); color: #fff;
  font: 600 2.6rem/1 var(--serif); border: 5px solid var(--paper); box-shadow: 0 8px 18px rgba(232, 151, 123, .4);
}
.spark { position: absolute; width: 22px; height: 22px; color: var(--butter); }
.s1 { left: -14px; top: 18%; } .s2 { right: 2px; top: -4px; width: 16px; height: 16px; color: var(--sage); }
.s3 { left: 6%; bottom: -6px; width: 14px; height: 14px; color: var(--peach-deep); }
.name { font: 600 clamp(2.8rem, 13vw, 3.8rem)/1.05 var(--serif); color: var(--ink); }
.turns { font: 500 clamp(1.5rem, 6.5vw, 1.9rem)/1.2 var(--serif); color: var(--peach-deep); margin-top: 2px; }
.line { max-width: 420px; margin: 14px auto 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); font: 700 .92rem var(--sans); color: var(--ink);
}
.chip svg { width: 17px; height: 17px; color: var(--sage-deep); }

.count { margin: 34px 22px 0; padding: 22px 16px; border-radius: 24px; background: var(--butter-soft); text-align: center; }
.count-t { font: 600 .85rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); }
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.count-grid div { background: var(--paper); border-radius: 16px; padding: 10px 2px 8px; }
.count-grid b { display: block; font: 600 clamp(1.5rem, 7vw, 1.9rem)/1.1 var(--serif); color: var(--ink); }
.count-grid span { font-size: .75rem; color: var(--muted); }
.count.done .count-grid { display: none; }

.event { margin-top: 34px; }
.event-card {
  position: relative; background: var(--paper); border: 2px solid var(--sage); border-radius: 28px;
  padding: 28px 22px 24px; text-align: center; box-shadow: 0 14px 34px rgba(61, 58, 52, .07);
}
.ev-kicker {
  display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--sage); color: #fff;
  font: 600 .82rem var(--sans); letter-spacing: .12em; text-transform: uppercase;
}
.ev-day { margin-top: 16px; color: var(--muted); font-weight: 600; }
.ev-date { font: 600 clamp(1.6rem, 7vw, 2rem)/1.2 var(--serif); color: var(--ink); }
.ev-time { margin-top: 6px; font-weight: 700; color: var(--peach-deep); }
.event-card hr { border: 0; border-top: 2px dashed var(--line); margin: 20px 0; }
.ev-venue { font: 600 1.3rem/1.3 var(--serif); }
.ev-addr { color: var(--muted); margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 0; text-decoration: none; cursor: pointer; font: 700 .95rem var(--sans);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-main { margin-top: 18px; background: var(--sage-deep); color: #fff; box-shadow: 0 8px 18px rgba(95, 125, 91, .28); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.btn-soft { background: #F3EEE3; color: var(--ink); min-height: 42px; padding: 0 16px; font-size: .88rem; }
.btn-line { background: var(--paper); color: var(--sage-deep); border: 1.5px solid var(--sage); }

.notes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.notes li { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.notes b { display: block; font: 600 .95rem var(--serif); color: var(--ink); margin-bottom: 2px; }

.hosts { text-align: center; margin: 40px 0 44px; }
.hosts-k { font: 600 .88rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sage-deep); }
.hosts-n { font: 600 clamp(1.6rem, 7vw, 2rem)/1.25 var(--serif); margin-top: 6px; }
.hosts-s { color: var(--muted); }
.contacts { display: grid; gap: 12px; margin-top: 22px; }
.contact { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 16px; }
.contact p { font: 600 1.1rem var(--serif); margin-bottom: 10px; }
.contact p span { font: 400 .9rem var(--sans); color: var(--muted); }
.contact .btn { width: 100%; max-width: 300px; white-space: nowrap; }
.contacts { max-width: 400px; margin-left: auto; margin-right: auto; }
.share { margin-top: 22px; }

.foot { background: var(--emerald-deep); color: var(--ivory); text-align: center; padding: 40px 22px calc(36px + env(safe-area-inset-bottom)); }
.foot-q { font: 500 1.35rem/1.35 var(--serif); color: var(--gold-light); }
.foot-sub { margin-top: 6px; opacity: .85; }
.foot .credit { margin-top: 14px; font-size: .88rem; opacity: .85; }
.foot .credit a { color: var(--gold-light); }
.sample-note { margin-top: 10px; font-size: .78rem; opacity: .6; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 70;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .hero { padding-top: 84px; }
}
@media (max-width: 359px) {
  .notes { grid-template-columns: 1fr; }
  .count-grid { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
