:root {
  --orange: #ff7a1a;
  --orange-deep: #e85d04;
  --sun: #ffc93c;
  --ink: #2b1d14;
  --ink-soft: #6b5a4e;
  --cream: #fff8ef;
  --card: #ffffff;
  --line: #f1e3d3;
  --teal: #19b3a6;
  --pink: #ff6fa5;
  --violet: #8b6cff;
  --danger: #d64545;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(43, 29, 20, .04), 0 12px 32px -12px rgba(232, 93, 4, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, #ffe2c2 0%, transparent 70%),
    repeating-linear-gradient(-55deg, transparent 0 46px, rgba(255, 122, 26, .045) 46px 64px),
    var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 48px 16px 32px; position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero { text-align: center; margin-bottom: 28px; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: .9rem; color: var(--orange-deep);
}
.badge {
  position: relative; width: 148px; height: 148px; margin: 0 auto 14px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(115deg, var(--orange) 0 18px, var(--orange-deep) 18px 26px);
  box-shadow: inset 0 0 0 8px #fff, 0 18px 40px -14px rgba(232, 93, 4, .6);
  display: grid; place-items: center;
  animation: bob 4s ease-in-out infinite;
}
.badge-num {
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 96px; line-height: 1;
  color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .15);
}
.badge-tiger {
  position: absolute; right: -6px; bottom: -4px; font-size: 46px;
  background: #fff; border-radius: 50%; width: 64px; height: 64px; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
h1 {
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 3.3rem); line-height: 1.08; margin: 8px 0 10px; letter-spacing: -.01em;
}
h1 .name { color: var(--orange-deep); }
h1 .six {
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 460px; margin: 0 auto; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.detail { display: flex; gap: 14px; align-items: flex-start; }
.detail .icon {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: #fff1e3; font-size: 22px;
}
.detail h2 { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.detail p { margin: 2px 0 0; }
.strong { font-weight: 800; font-size: 1.05rem; }
.link { display: inline-block; margin-top: 6px; color: var(--orange-deep); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- countdown ---------- */
.countdown { text-align: center; margin-bottom: 14px; }
.count-label { margin: 0 0 10px; font-weight: 700; color: var(--ink-soft); }
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.count-grid div { background: var(--cream); border-radius: 16px; padding: 12px 4px; }
.count-grid b {
  display: block; font-family: "Fredoka", sans-serif; font-size: clamp(1.6rem, 6vw, 2.2rem);
  color: var(--orange-deep); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.count-grid span { font-size: .8rem; color: var(--ink-soft); font-weight: 700; }
.cal-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 800; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary {
  width: 100%; padding: 16px 24px; font-size: 1.1rem; color: #fff;
  background: linear-gradient(180deg, var(--orange), var(--orange-deep));
  box-shadow: 0 10px 24px -10px rgba(232, 93, 4, .8), inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.btn.primary:hover { box-shadow: 0 14px 28px -10px rgba(232, 93, 4, .9), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn.ghost { background: #fff1e3; color: var(--orange-deep); }
.btn.ghost:hover { background: #ffe4c9; }
.btn.ghost.green { background: #e3f7ea; color: #13803f; }
.btn.ghost.green:hover { background: #ccf0d8; }
.btn.small { padding: 10px 16px; font-size: .92rem; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(255, 122, 26, .45); outline-offset: 2px; }

.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: .9; }

/* ---------- form ---------- */
.rsvp { padding: 26px 22px; }
.form-head h2 { font-family: "Fredoka", sans-serif; font-size: 2rem; margin: 0; }
.form-head p { margin: 2px 0 18px; }
.muted { color: var(--ink-soft); }
.tiny { font-size: .85rem; text-align: center; margin: 12px 0 0; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 800; margin-bottom: 10px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice legend { grid-column: 1 / -1; }
.choice-card { position: relative; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-card span {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 16px 10px; border: 2px solid var(--line); border-radius: 18px; font-weight: 800;
  transition: border-color .15s, background .15s, transform .15s;
}
.choice-card em { font-style: normal; font-size: 1.8rem; }
.choice-card:hover span { border-color: #ffc89a; }
.choice-card input:checked + span { border-color: var(--orange); background: #fff4e8; transform: translateY(-2px); }
.choice-card input:focus-visible + span { outline: 3px solid rgba(255, 122, 26, .45); outline-offset: 2px; }

.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field i { color: var(--orange-deep); font-style: normal; }
.field small { font-weight: 600; color: var(--ink-soft); }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fffdfa;
  border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: border-color .15s;
}
input::placeholder, textarea::placeholder { color: #b9a796; }
input:hover, textarea:hover { border-color: #f0cfaf; }
input:focus, textarea:focus { border-color: var(--orange); outline: none; }
textarea { resize: vertical; min-height: 84px; }
.invalid { border-color: var(--danger) !important; background: #fff6f6; }

.stepper { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fffdfa; }
.stepper button {
  flex: none; width: 48px; border: 0; background: #fff1e3; color: var(--orange-deep);
  font: inherit; font-size: 1.4rem; font-weight: 800; cursor: pointer;
}
.stepper button:hover { background: #ffe4c9; }
.stepper input {
  border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 1.1rem;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.attending-only { animation: fadeIn .25s ease; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error {
  background: #fff1f1; color: var(--danger); border: 1px solid #f5c9c9;
  padding: 10px 14px; border-radius: 12px; font-weight: 700; margin: 0 0 14px;
}

.thanks { text-align: center; padding: 10px 0 4px; animation: fadeIn .35s ease; outline: none; }
.thanks-emoji { font-size: 64px; animation: bob 3s ease-in-out infinite; }
.thanks h3 { font-family: "Fredoka", sans-serif; font-size: 1.9rem; margin: 6px 0 6px; }
.thanks p { color: var(--ink-soft); margin: 0 auto 18px; max-width: 420px; }

.thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.thanks .tiny { margin: 12px auto 0; }

/* ---------- waiver ---------- */
.waiver {
  margin: 14px 0 0; padding: 10px 16px; text-align: center; font-size: .92rem; color: var(--ink-soft);
  background: #fff6d6; border: 1px solid #ffe08a; border-radius: 14px;
}
.waiver .link { margin: 0 0 0 4px; white-space: nowrap; }
.thanks .waiver { margin: 0 auto 18px; max-width: 440px; }

/* ---------- gifts ---------- */
.gifts {
  margin-top: 14px; padding: 22px; text-align: center;
  border: 1.5px dashed #f0cfaf; border-radius: var(--radius); background: rgba(255, 252, 247, .92);
}
.gifts-icon { font-size: 28px; line-height: 1; }
.gifts h2 { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.25rem; margin: 6px 0 6px; }
.gifts p { color: var(--ink-soft); margin: 0 auto; max-width: 480px; }
.gift-more { margin-top: 12px; }
.gift-more summary {
  display: inline-block; cursor: pointer; list-style: none;
  color: var(--orange-deep); font-weight: 700; font-size: .95rem;
}
.gift-more summary::-webkit-details-marker { display: none; }
.gift-more summary::after { content: " ▾"; font-size: .8em; }
.gift-more[open] summary::after { content: " ▴"; }
.gift-more summary:hover { text-decoration: underline; }
.gift-more summary:focus-visible { outline: 3px solid rgba(255, 122, 26, .45); outline-offset: 3px; border-radius: 6px; }
.gift-body { padding-top: 10px; animation: fadeIn .25s ease; }
.gift-code { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 8px; flex-wrap: wrap; }
.gift-code code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 14px; user-select: all;
}

.foot { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 28px; }

/* ---------- balloons ---------- */
.balloons { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.balloon {
  position: absolute; bottom: -140px; width: 56px; height: 70px; border-radius: 50% 50% 48% 48%;
  opacity: .5; animation: rise linear infinite;
}
.balloon::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 60px; background: rgba(43, 29, 20, .2);
}
.b1 { left: 4%;  background: var(--pink);   animation-duration: 22s; }
.b2 { left: 18%; background: var(--sun);    animation-duration: 28s; animation-delay: -10s; width: 44px; height: 56px; }
.b3 { left: 82%; background: var(--teal);   animation-duration: 25s; animation-delay: -4s; }
.b4 { left: 92%; background: var(--violet); animation-duration: 31s; animation-delay: -17s; width: 40px; height: 52px; }
.b5 { left: 68%; background: var(--orange); animation-duration: 35s; animation-delay: -22s; width: 36px; height: 46px; }

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

@keyframes rise { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-125vh) rotate(6deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .wrap { padding-top: 32px; }
  .details, .grid.two { grid-template-columns: 1fr; }
  .badge { width: 124px; height: 124px; }
  .badge-num { font-size: 80px; }
  .count-grid { gap: 6px; }
  .rsvp { padding: 22px 16px; }
  .balloon { opacity: .3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .balloons { display: none; }
}
