/* Baby Theodore's shower: watercolor safari, tropical greens, soft gold. */
:root {
  color-scheme: light;
  --cream: #FFFBF2;
  --paper: #FFFFFF;
  --ink: #3E4A2F;
  --ink-soft: #66704F;
  --sage: #A8BF8A;
  --sage-wash: #EEF3E4;
  --leaf: #5E8C3A;
  --olive: #7A8B3C;
  --peach: #F2B27A;
  --peach-wash: #FCEBDB;
  --gold: #C9A24A;
  --gold-deep: #A88332;
  --gold-light: #E8D08A;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(62, 74, 47, .06), 0 8px 28px rgba(62, 74, 47, .08);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  overflow-x: hidden;
}
/* Faint leaf confetti (set inline only when the art file exists). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: 560px;
  opacity: .16;
  pointer-events: none;
}

a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--olive); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Foliage corners (mirrored copy of one file). */
.corner {
  position: absolute;
  top: 0;
  width: min(42vw, 340px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.corner-tl { left: 0; }
.corner-tr { right: 0; transform: scaleX(-1); }

.page {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; }
.script {
  font-family: var(--script);
  font-weight: 400;
  background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.oh-baby { font-size: clamp(56px, 16vw, 92px); margin: 8px 0 0; }
.hero-art { display: block; width: 100%; height: auto; margin: -6px auto 0; }
.kicker {
  font-family: var(--script);
  font-size: 34px;
  color: var(--olive);
  margin: 8px 0 -6px;
}
.baby {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(38px, 11vw, 64px);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

.sprig { display: block; width: 160px; height: 24px; margin: 24px auto; }

/* ---------- Invitation text ---------- */
.invite { text-align: center; }
.greeting { font-family: var(--script); font-size: 32px; color: var(--olive); margin: 0 0 4px; }
.not-you { font-size: 13px; color: var(--ink-soft); margin: -2px 0 10px; }
.lede { font-family: var(--serif); font-size: 22px; line-height: 1.45; margin: 0; }
.lede strong { font-weight: 700; color: var(--ink); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-top: 24px;
  outline: 1px solid rgba(201, 162, 74, .45);
  outline-offset: -7px;
}

.details { display: grid; gap: 18px; text-align: center; }
.detail { display: grid; gap: 2px; align-content: start; }
.label {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep);
}
.value { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; }
.sub { font-size: 17px; }
.hint { font-size: 14px; color: var(--ink-soft); }
.food { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1.5px solid var(--sage);
  font: 700 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--sage-wash); color: var(--leaf); }
.btn-ghost:hover { background: #E3ECD4; color: var(--leaf); border-color: var(--leaf); }
.btn-gold {
  width: 100%; min-height: 54px; font-size: 18px; color: #fff; border: 0;
  background: linear-gradient(180deg, #D4AE55, var(--gold-deep));
  box-shadow: 0 4px 14px rgba(168, 131, 50, .35);
}
.btn-gold:hover { filter: brightness(1.05); color: #fff; }
.btn:focus-visible, .choice input:focus-visible + .choice-btn, .step:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--peach); outline-offset: 2px;
}

/* ---------- RSVP ---------- */
.section-title { font-family: var(--serif); font-size: 30px; font-weight: 700; text-align: center; margin: 0; }
.reply-by { text-align: center; margin: 0 0 16px; color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 19px; }
.household { text-align: center; font-size: 15px; color: var(--ink-soft); margin: -6px 0 14px; }
.household strong { color: var(--ink); }
.current { background: var(--sage-wash); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.error { background: var(--peach-wash); color: #8A4B1A; border-radius: 12px; padding: 10px 14px; font-weight: 600; }

.rsvp-form { display: grid; gap: 18px; position: relative; z-index: 1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-btn {
  display: grid; gap: 2px; place-content: center; text-align: center;
  min-height: 84px; padding: 12px 8px;
  border: 1.5px solid #DCE3CF; border-radius: 14px; background: #FBFCF8; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice-big { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.15; }
.choice-small { font-size: 13px; color: var(--ink-soft); }
.choice-btn:hover { border-color: var(--sage); }
#att-yes:checked + .choice-btn { border-color: var(--leaf); background: var(--sage-wash); box-shadow: inset 0 0 0 1px var(--leaf); }
#att-no:checked + .choice-btn { border-color: var(--peach); background: var(--peach-wash); box-shadow: inset 0 0 0 1px var(--peach); }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counts legend { font-weight: 700; margin-bottom: 8px; }

/* "Who's coming" checklist for households */
.members { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.members li { position: relative; }
.members input { position: absolute; opacity: 0; pointer-events: none; }
.members label {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px;
  border: 1.5px solid #DCE3CF; border-radius: 14px; background: #FBFCF8; cursor: pointer;
  font-weight: 600; transition: border-color .15s, background .15s;
}
.members label::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--sage); background: #fff center / 14px no-repeat;
}
.members input:checked + label { border-color: var(--leaf); background: var(--sage-wash); }
.members input:checked + label::before {
  background-color: var(--leaf); border-color: var(--leaf);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.members input:focus-visible + label { outline: 3px solid var(--peach); outline-offset: 2px; }
.members input:not(:checked) + label { color: var(--ink-soft); }
.kid-tag { font-size: 12px; font-weight: 700; color: #A0612A; background: var(--peach-wash); border-radius: 999px; padding: 1px 8px; }
.counts-hint { grid-column: 1 / -1; margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
/* Headcount only matters for a yes. */
.rsvp-form:has(#att-no:checked) .counts { display: none; }
.stepper { display: grid; gap: 6px; justify-items: center; background: #FBFCF8; border: 1.5px solid #DCE3CF; border-radius: 14px; padding: 10px; }
.stepper > label { font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.stepper-ctl { display: flex; align-items: center; gap: 6px; }
.step {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--sage); background: #fff; color: var(--leaf);
  font: 700 22px/1 var(--sans); cursor: pointer;
}
.step:hover { background: var(--sage-wash); }
.stepper input {
  width: 48px; height: 44px; text-align: center;
  font: 700 22px var(--sans); color: var(--ink);
  border: 0; background: transparent; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.note-label { font-weight: 700; margin-bottom: -10px; }
.optional { font-weight: 400; color: var(--ink-soft); }
textarea {
  width: 100%; resize: vertical; min-height: 92px;
  font: 16px/1.5 var(--sans); color: var(--ink);
  border: 1.5px solid #DCE3CF; border-radius: 14px; padding: 12px 14px; background: #FBFCF8;
}

/* Decorative peeking animals (only when the art exists). They sit in the
   card's top corners, above the content, so they never cover text or buttons. */
.peek { position: absolute; pointer-events: none; z-index: 2; height: auto; }
.peek-giraffe { width: 58px; left: 10px; top: -52px; }
.peek-monkey { width: 76px; right: 6px; top: -56px; }
.rsvp, .gifts { overflow: visible; margin-top: 56px; }

/* Thank-you state */
.thanks { text-align: center; display: grid; justify-items: center; gap: 6px; }
.thanks-art { width: min(220px, 60vw); height: auto; }
.thanks .script { font-size: 56px; margin: 0; }
.thanks-line { font-family: var(--serif); font-size: 22px; margin: 0; }
.summary { margin: 4px 0 0; }
.note-echo {
  margin: 10px 0 4px; padding: 10px 16px; max-width: 32em;
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft);
  border-left: 3px solid var(--sage); text-align: left;
}
.link { font-weight: 700; margin-top: 6px; }

/* Gifts */
.gifts { text-align: center; display: grid; justify-items: center; gap: 14px; background: linear-gradient(180deg, #fff, var(--sage-wash)); }
.gift-note { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; max-width: 30em; }

.foot { text-align: center; font-size: 15px; color: var(--ink-soft); }

@media (min-width: 560px) {
  .page { padding-top: 40px; }
  .card { padding: 32px 36px; }
  .details { grid-template-columns: 1fr 1fr; }
  .food, .actions { grid-column: 1 / -1; }
  .peek-giraffe { width: 68px; top: -62px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
