:root {
  --bg: #fdf1f1;
  --paper: #fff8f7;
  --rose: #e88a9a;
  --rose-strong: #d9607a;
  --rose-soft: #f6cfd5;
  --lilac: #b79ad9;
  --text: #7a5a5e;
  --text-soft: #9c7f83;
  --leaf: #a9b98a;
  --danger: #c2415b;
  --radius: 18px;
  --script: 'Great Vibes', cursive;
  --hand: 'Dancing Script', cursive;
  --sans: 'Josefin Sans', system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, #fde3e6 0, transparent 45%),
    radial-gradient(circle at 90% 80%, #f1e4fa 0, transparent 40%),
    var(--bg);
  padding: 16px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

/* ---------- moldura do convite ---------- */
.card {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  background: var(--paper);
  border: 1.5px solid var(--rose-soft);
  border-radius: 28px;
  box-shadow: 0 20px 60px -30px rgba(217, 96, 122, 0.35);
  overflow: hidden;
  text-align: center;
}
.card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--rose-soft);
  border-radius: 20px;
  pointer-events: none;
}

/* ---------- tipografia ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
}
.script { font-family: var(--script); font-weight: 400; color: var(--rose); line-height: 1; margin: 0; }
.script--xl { font-size: clamp(5rem, 22vw, 7.5rem); display: block; margin: 4px 0 -4px; }
.script--md { font-size: clamp(2.8rem, 12vw, 3.8rem); display: block; }
.script--sm { font-family: var(--hand); font-size: 1.7rem; }

.hero__title { margin: 8px 0 0; font-weight: 400; }
.lead { margin: 14px 0 0; font-size: 1.05rem; letter-spacing: 0.08em; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto;
  color: var(--rose);
  font-size: 1rem;
}
.divider::before, .divider::after {
  content: '';
  width: 64px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ---------- borboletas ---------- */
.bfly { position: absolute; pointer-events: none; z-index: 0; animation: float 7s ease-in-out infinite; }
.bfly--a { width: 52px; top: 14px; right: 16px; }
.bfly--b { width: 52px; top: 200px; left: 8px; animation-delay: -2s; transform: scaleX(-1); }
.bfly--c { width: 60px; top: -58px; right: 12px; animation-delay: -4s; }
.bfly--d { width: 52px; top: -18px; left: -6px; animation-delay: -1s; }
.hero, .details, .actions, .quote, .rsvp, .footer { position: relative; z-index: 1; }

@keyframes float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: 6px -10px; rotate: 4deg; }
  50% { translate: -4px -4px; rotate: -3deg; }
  75% { translate: -8px -12px; rotate: 2deg; }
}

/* ---------- contagem ---------- */
.countdown { display: flex; justify-content: center; gap: 12px; margin: 26px 0 8px; }
.countdown div {
  min-width: 74px;
  padding: 10px 8px 6px;
  border-radius: 14px;
  background: #fde7ea;
}
.countdown strong { display: block; font-family: var(--hand); font-size: 1.9rem; font-weight: 600; color: var(--rose-strong); line-height: 1.1; }
.countdown span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.countdown.is-today { font-family: var(--hand); font-size: 1.6rem; color: var(--rose-strong); }

/* ---------- detalhes ---------- */
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 0;
  margin: 34px 0 20px;
}
.detail { padding: 0 8px; }
.detail + .detail { border-left: 1px solid var(--rose-soft); }
.detail--place { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--rose-soft); padding-top: 18px; }
.detail__label { margin: 6px 0 0; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.85rem; }
.detail__value { margin: 2px 0 0; font-size: 2rem; letter-spacing: 0.08em; color: var(--rose); font-weight: 300; }
.detail__addr { margin: 6px 0 0; font-size: 1rem; letter-spacing: 0.04em; }

@media (min-width: 560px) {
  .details { grid-template-columns: 1fr 1fr 1.6fr; }
  .detail--place { grid-column: auto; border-top: 0; border-left: 1px solid var(--rose-soft) !important; padding-top: 0; }
  .bfly--a { width: 92px; top: 26px; right: 22px; }
  .bfly--b { width: 62px; top: 210px; left: 10px; }
  .bfly--c { width: 96px; top: -40px; right: 30px; }
  .bfly--d { width: 64px; left: 10px; }
}

.icon { width: 34px; height: 34px; fill: none; stroke: var(--rose); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto; display: block; }
.icon--sm { width: 18px; height: 18px; margin: 0; display: inline-block; stroke-width: 1.8; }

/* ---------- botões ---------- */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; position: relative; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font: 400 0.95rem var(--sans);
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn--ghost { background: #fff; color: var(--rose-strong); border: 1px solid var(--rose-soft); }
.btn--ghost:hover { background: #fdecef; }
.btn--primary {
  width: 100%;
  border: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--rose), var(--rose-strong));
  box-shadow: 0 10px 24px -12px var(--rose-strong);
}
.btn--primary:hover { box-shadow: 0 14px 28px -12px var(--rose-strong); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .stepper button:focus-visible, .cal-menu a:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
}

.cal-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  z-index: 5;
  display: grid;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--rose-soft);
  border-radius: 14px;
  box-shadow: 0 16px 40px -20px rgba(122, 90, 94, 0.5);
  overflow: hidden;
}
.cal-menu[hidden] { display: none; }
.cal-menu a { padding: 12px 16px; color: var(--text); text-decoration: none; }
.cal-menu a + a { border-top: 1px solid #fbe4e7; }
.cal-menu a:hover { background: #fdecef; }

/* ---------- frase + flores ---------- */
.quote { margin: 44px -24px 0; }
.quote p {
  margin: 0 auto;
  max-width: 420px;
  padding: 0 24px;
  font-family: var(--hand);
  font-size: clamp(1.6rem, 6.5vw, 2rem);
  line-height: 1.3;
  color: var(--rose-strong);
}
.quote__flowers { width: 100%; margin-top: 18px; }

/* ---------- RSVP ---------- */
.rsvp { margin-top: 36px; text-align: left; }
.rsvp h2 { text-align: center; }
.rsvp__hint { text-align: center; margin: 12px auto 24px; max-width: 440px; font-size: 0.98rem; }

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > label:not(.pill), .field legend {
  display: block;
  margin-bottom: 6px;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.optional { text-transform: none; letter-spacing: 0; color: var(--text-soft); }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  font: 400 1rem var(--sans);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--rose-soft);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #c4aeb1; }
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px #fde2e6; outline: none; }
input[aria-invalid='true'] { border-color: var(--danger); }
textarea { resize: vertical; }

.field__note { margin: 6px 0 0; min-height: 1.2em; font-size: 0.88rem; color: var(--rose-strong); }

.choice { display: grid; gap: 10px; }
.pill { display: block; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--rose-soft);
  border-radius: 12px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pill input:checked + span { background: #fde7ea; border-color: var(--rose); color: var(--rose-strong); font-weight: 400; }
.pill input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: 2px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row[hidden] { display: none; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--rose-soft); border-radius: 12px; background: #fff; overflow: hidden; }
.stepper input { border: 0; border-radius: 0; text-align: center; padding: 10px 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus { box-shadow: none; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper button { flex: 0 0 44px; border: 0; background: #fdf0f2; color: var(--rose-strong); font-size: 1.3rem; cursor: pointer; }
.stepper button:hover { background: #fbe2e6; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { display: flex; justify-content: center; }
.turnstile:empty { margin: 0; }
.form-error { margin: 0 0 12px; min-height: 1.2em; color: var(--danger); text-align: center; font-weight: 400; }

/* ---------- resultado ---------- */
.result {
  text-align: center;
  padding: 28px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fde9ec, #f7eefc);
  animation: pop 0.45s ease-out;
}
.result:focus { outline: none; }
.result__bfly { width: 70px; margin: 0 auto 4px; animation: float 6s ease-in-out infinite; }
.result p { margin: 10px 0 0; }
.diaper { margin: 20px auto 6px; padding: 18px; max-width: 360px; border-radius: 16px; background: #fff; border: 1px dashed var(--rose); }
.diaper__size { font-size: 1.15rem; margin-top: 6px !important; }
.diaper__size strong { display: block; font-family: var(--hand); font-size: 2.6rem; color: var(--rose-strong); font-weight: 600; line-height: 1.1; }
.diaper__note { font-size: 0.9rem; color: var(--text-soft); }
.result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.btn--link { background: none; border: 0; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }

@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- rodapé ---------- */
.footer { margin-top: 40px; }
.footer .script--sm { color: var(--rose); }
.bow { width: 64px; margin: 8px auto 0; display: block; fill: none; stroke: var(--rose); stroke-width: 1.4; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
