/* Sol's 4th Birthday — clean digital pastel system
   Ported from the design handoff (styles.css) and adapted for plain HTML. */
@import url('https://fonts.googleapis.com/css2?family=Caveat+Brush&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Caveat:wght@400;600&display=swap');

:root {
  --bg-page: #fbf7f3;
  --bg-card: #ffffff;
  --bg-soft: #fcf3f7;
  --ink: #4a3a52;
  --ink-soft: #7a6a82;
  --ink-faint: #a597ad;
  --line: rgba(74, 58, 82, 0.08);

  --c-lilac: #c9b3e8;
  --c-lilac-deep: #a888d0;
  --c-mint: #b6e3d4;
  --c-peach: #fcc7b6;
  --c-sky: #b9dcec;
  --c-yellow: #fae3a4;
  --c-pink: #f4c0d2;

  --primary: var(--c-lilac-deep);
  --primary-soft: #ede4f7;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(74, 58, 82, 0.04), 0 2px 8px rgba(74, 58, 82, 0.04);
  --shadow-md: 0 2px 6px rgba(74, 58, 82, 0.05), 0 12px 32px rgba(74, 58, 82, 0.07);

  --font-display: 'Caveat Brush', 'Caveat', cursive;
  --font-body: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-page);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.rsvp-app {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Page-wide soft watercolor blobs */
.wc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Subtle paper texture overlay */
.paper-tex::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(252,199,182,0.12) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(201,179,232,0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(182,227,212,0.10) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
}

/* Display headline */
.headline {
  font-family: var(--font-display);
  color: var(--c-lilac-deep);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.95;
  margin: 0;
}
.headline-xl { font-size: 88px; }
@media (max-width: 640px) { .headline-xl { font-size: 56px; } }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Layout shell */
.shell {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
@media (max-width: 640px) { .shell { padding: 0 20px 56px; } }

/* Buttons */
.btn {
  appearance: none;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 14px rgba(168, 136, 208, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(168, 136, 208, 0.4); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(74, 58, 82, 0.05), inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); box-shadow: 0 2px 6px rgba(74, 58, 82, 0.06), inset 0 0 0 1px var(--line); }

.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  padding: 80px 64px 56px;
  text-align: center;
  overflow: hidden;
}
@media (max-width: 640px) { .hero { padding: 52px 24px 36px; } }
.hero-content { position: relative; z-index: 2; }
.hero-chips {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta-row {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .hero-chips { margin-top: 14px; }
  .hero-cta-row { margin-top: 18px; flex-direction: column; gap: 10px; }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.chip--countdown { background: #fef0e6; color: #b86a40; }

.reply-by { font-size: 13px; color: var(--ink-soft); }
.reply-by b { color: var(--ink); }

/* Cards & detail rows */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  position: relative;
}
@media (max-width: 640px) { .card { padding: 20px; border-radius: var(--radius-md); } }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { gap: 20px; }

.detail-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.detail-row:last-child { border-bottom: none; }
.detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-icon--when  { background: var(--primary-soft); color: var(--c-lilac-deep); }
.detail-icon--where { background: #e0f2eb; color: #4a8b6f; }
.detail-icon--host  { background: #fef7d6; color: #a8862a; }
.detail-icon--note  { background: #fef0e6; color: #c97a55; }
.detail-text { flex: 1; }
.detail-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.detail-value { font-size: 15px; color: var(--ink); margin-top: 2px; font-weight: 500; }
.detail-value--soft { color: var(--ink-soft); font-weight: 400; }
.detail-value--note  { font-style: italic; color: var(--ink-soft); font-weight: 400; }

/* Map card */
.map-card { padding: 0; overflow: hidden; }
.map-image-link {
  display: block;
  line-height: 0;          /* kill inline-image baseline gap */
  background: #fbf7f3;     /* matches the illustration's paper tone */
  text-align: center;
}
.map-image {
  display: block;
  width: 100%;
  max-width: 520px;        /* keeps the map a comfortable size on desktop */
  height: auto;
  margin: 0 auto;
  transition: transform 0.4s ease;
}
.map-image-link:hover .map-image { transform: scale(1.015); }
@media (max-width: 640px) {
  .map-image { max-width: 100%; }   /* phone: fill the card width */
}
.map-foot {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.map-name { font-weight: 600; font-size: 14px; }
.map-addr { font-size: 13px; color: var(--ink-soft); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field-label .opt { font-weight: 400; color: var(--ink-faint); margin-left: 6px; }
.input, .textarea {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.input:focus, .textarea:focus {
  border-color: var(--c-lilac-deep);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.input--invalid { border-color: #e8a0a0; }
.textarea { resize: vertical; min-height: 72px; }

/* Pill segmented (yes/maybe/no) */
.pill-group {
  display: flex;
  gap: 8px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 999px;
}
.pill {
  appearance: none;
  border: none;
  background: transparent;
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pill[data-active="true"] {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(74,58,82,0.1);
}
.pill[data-active="true"][data-value="yes"]   { color: #4a8b6f; }
.pill[data-active="true"][data-value="maybe"] { color: #b58a3a; }
.pill[data-active="true"][data-value="no"]    { color: #b86b7a; }

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: 999px;
  border: 1.5px solid var(--line);
  overflow: hidden;
}
.stepper button {
  appearance: none;
  border: none;
  background: transparent;
  width: 40px;
  height: 44px;
  font-size: 20px;
  color: var(--c-lilac-deep);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.stepper button:hover:not(:disabled) { background: var(--primary-soft); }
.stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; }
.stepper .count {
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kids-row { display: flex; align-items: center; gap: 12px; }
.kids-descriptor { font-size: 13px; color: var(--ink-soft); }
.kids-block { transition: opacity 0.2s; }
.kids-block[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* Floating decorations */
.balloon, .star, .heart {
  position: absolute;
  pointer-events: none;
}
@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-6px) rotate(var(--r, 0deg)); }
}
.float { animation: float-y 5s ease-in-out infinite; }

/* Confetti */
@keyframes confetti-fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(720deg); opacity: 0.85; }
}
.confetti-piece {
  position: fixed;
  top: 0;
  width: 10px; height: 14px;
  border-radius: 2px;
  animation: confetti-fall var(--dur, 3.4s) cubic-bezier(0.2, 0.7, 0.6, 1) forwards;
  pointer-events: none;
  z-index: 60;
}

/* Page-fade between screens (HTMX swaps) */
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen-fade { animation: screen-in 0.32s cubic-bezier(.2,.7,.3,1); }

/* Form screen */
.form-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 24px 0;
}
.form-header .spacer { width: 70px; }
.form-deco {
  position: relative;
  height: 110px;
  margin: 0;
}
@media (max-width: 640px) {
  .form-header { padding: 20px 20px 0; }
  .form-deco { height: 80px; }
}
.form-display {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--c-lilac-deep);
  line-height: 1;
  margin: 6px 0 18px;
}
.form-footnote {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  margin-top: 24px;
}
.form-error {
  font-size: 13px;
  color: #b86b7a;
  text-align: center;
}

/* Confirmation */
.confirm-wrap {
  position: relative;
  padding: 56px 24px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.confirm-content {
  position: relative; z-index: 10;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.confirm-headline { font-size: 110px; }
@media (max-width: 640px) { .confirm-headline { font-size: 64px; } .confirm-wrap { padding: 40px 24px; } }
.confirm-body {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 20px auto;
  line-height: 1.55;
}
@media (max-width: 640px) { .confirm-body { font-size: 16px; } }
.confirm-body b { color: var(--ink); }
.allergies-pill {
  display: inline-block;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.allergies-pill b { color: var(--ink); }
.waiver-card {
  background: var(--bg-card);
  border: 1.5px solid var(--c-lilac);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 8px auto 20px;
  text-align: left;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
@media (max-width: 640px) { .waiver-card { padding: 16px; } }
.waiver-icon {
  width: 36px; height: 36px;
  border-radius: 10px; flex-shrink: 0;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-lilac-deep);
}
.waiver-body { flex: 1; min-width: 0; }
.waiver-title { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.waiver-text  { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 640px) {
  .waiver-title { font-size: 14px; }
  .waiver-text  { font-size: 13px; }
}
.confirm-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 320px;
  margin: 4px auto 0;
}

/* Footer signature on landing */
.signoff {
  text-align: center;
  color: var(--ink-faint);
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  padding-bottom: 80px;
}

/* Sticky CTA on landing */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 16px;
  display: flex; justify-content: center;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.sticky-cta .btn {
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(168, 136, 208, 0.5),
              0 2px 6px rgba(74,58,82,0.12),
              inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Form-screen back-button row */
.form-eyebrow { font-size: 11px; }

/* Inline link */
a.subtle { color: var(--c-lilac-deep); text-decoration: none; font-weight: 600; }
a.subtle:hover { text-decoration: underline; }

/* Detail-row inline links — inherit the row's color, underline on hover. */
a.detail-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--ink-faint);
  display: inline-block;
}
a.detail-link:hover {
  color: var(--c-lilac-deep);
  border-bottom-color: var(--c-lilac-deep);
}

/* Parents-only results view */
.results-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) { .results-summary { grid-template-columns: 1fr; } }
.summary-tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.summary-tile--yes   { border-top: 4px solid #4a8b6f; }
.summary-tile--maybe { border-top: 4px solid #b58a3a; }
.summary-tile--no    { border-top: 4px solid #b86b7a; }
.summary-num {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: var(--c-lilac-deep);
}
.summary-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}
.summary-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.results-table th, .results-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.results-table th {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-soft);
}
.results-table tr:last-child td { border-bottom: none; }
.results-table .num  { font-variant-numeric: tabular-nums; }
.results-table .time { font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-pill--yes   { background: #e0f2eb; color: #4a8b6f; }
.status-pill--maybe { background: #fef7d6; color: #a8862a; }
.status-pill--no    { background: #fcf3f7; color: #b86b7a; }
