:root {
  --bg-from: #fff4e6;
  --bg-to:   #ffd6e7;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(255, 107, 129, 0.12), 0 2px 8px rgba(60, 30, 50, 0.06);
  --fg: #2b2240;
  --muted: #76708a;
  --border: rgba(60, 30, 80, 0.08);
  --field-bg: #fff;
  --field-border: #f2dcea;

  --coral: #ff6b81;
  --tangerine: #ff9248;
  --sunshine: #ffd23f;
  --teal: #2ec4b6;
  --sky: #4cc9f0;
  --lavender: #a06cd5;

  --accent: var(--coral);
  --accent-fg: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--fg);
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(255, 210, 63, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(76, 201, 240, 0.25), transparent 55%),
    linear-gradient(160deg, var(--bg-from) 0%, var(--bg-to) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* Headings --------------------------------------------------------- */

h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw + 1rem, 3.4rem);
  margin: 0;
  text-align: center;
  letter-spacing: 0.005em;
  background: linear-gradient(90deg, var(--coral), var(--tangerine) 45%, var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4);
}

h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 0.9rem;
  color: var(--fg);
  display: inline-block;
  padding-bottom: 0.15rem;
  background-image: linear-gradient(90deg, var(--coral), var(--sunshine));
  background-repeat: no-repeat;
  background-size: 100% 4px;
  background-position: 0 100%;
}

/* Header / confetti ------------------------------------------------- */

.page-header {
  position: relative;
  padding: 1.5rem 0 1.75rem;
  text-align: center;
}

.confetti {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  opacity: 0.85;
  pointer-events: none;
  animation: bob 6s ease-in-out infinite;
}
.confetti.c1 { top: 10%;  left: 8%;  background: var(--coral);    transform: rotate(18deg);  animation-delay: 0s; }
.confetti.c2 { top: 60%;  left: 14%; background: var(--sunshine); border-radius: 50%;        animation-delay: 1.2s; }
.confetti.c3 { top: 18%;  right: 10%; background: var(--teal);    transform: rotate(-22deg); animation-delay: 0.6s; }
.confetti.c4 { top: 70%;  right: 6%;  background: var(--lavender); border-radius: 50%;       animation-delay: 1.8s; }
.confetti.c5 { top: 38%;  right: 22%; background: var(--sky);     transform: rotate(35deg);  animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-8px) rotate(var(--rot, 0deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .confetti { animation: none; }
}

/* Cards ------------------------------------------------------------- */

.details, .rsvp, .guest-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  margin-top: 1.25rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Hero ------------------------------------------------------------- */

.hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #ffe7c2, #ffc6d3);
  box-shadow: var(--card-shadow);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.2s ease-out;
}

.hero img.loaded {
  opacity: 1;
  animation: kenburns 18s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .hero img.loaded { animation: none; }
}

/* Countdown -------------------------------------------------------- */

.countdown {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
  margin: 1.25rem 0 0.25rem;
  flex-wrap: wrap;
}

.cd-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  box-shadow: 0 6px 14px rgba(255, 107, 129, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.cd-num {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.7rem, 3vw + 0.7rem, 2.4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cd-unit {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cd-clock { min-width: 7.5rem; letter-spacing: 0.02em; }

/* Color each countdown block differently */
.countdown .cd-block:nth-child(1) .cd-num { color: var(--coral); }
.countdown .cd-block:nth-child(2) .cd-num { color: var(--tangerine); }
.countdown .cd-block:nth-child(3) .cd-num { color: var(--lavender); }

.countdown.countdown-zero .cd-num { color: var(--muted); }

/* Details ---------------------------------------------------------- */

.details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1rem;
  row-gap: 0.6rem;
  margin: 0.25rem 0 0.5rem;
}

.details dt {
  color: var(--coral);
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  letter-spacing: 0.01em;
}

.details dd { margin: 0; }

.notes-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
  color: var(--teal);
  font-weight: 600;
}

.notes {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.notes li {
  margin-bottom: 0.4rem;
  padding-left: 1.4rem;
  position: relative;
}

.notes li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--sunshine);
}
.notes li:nth-child(2)::before { background: var(--teal); }
.notes li:nth-child(3)::before { background: var(--lavender); }

.notes strong { color: var(--fg); font-weight: 700; }

.map {
  margin-top: 0.6rem;
  max-width: 360px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(60, 30, 80, 0.08);
}

.map iframe { display: block; }

/* Form ------------------------------------------------------------- */

form { margin-top: 0.25rem; }

.field { margin-bottom: 0.95rem; }

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 129, 0.18);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field.checkbox label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
}

.field.checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--coral);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[type="submit"] {
  appearance: none;
  background: linear-gradient(135deg, var(--coral), var(--tangerine));
  color: var(--accent-fg);
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 0.35rem;
  box-shadow: 0 6px 16px rgba(255, 107, 129, 0.35);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 107, 129, 0.42);
}

button[type="submit"]:active { transform: translateY(0); }

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-status {
  margin: 0.7rem 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-weight: 600;
}

.form-status.error   { color: #c2185b; }
.form-status.success { color: #2e8b57; }

/* Guest list ------------------------------------------------------- */

.totals {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.totals-going { color: var(--fg); }
.totals-maybe { color: var(--lavender); }

.maybe-badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--lavender);
  border-radius: 999px;
  vertical-align: 2px;
}

tbody tr.row-maybe td:first-child { color: var(--muted); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 107, 129, 0.06);
}

tbody tr:nth-child(odd)  { background: rgba(255, 210, 63, 0.05); }
tbody tr:nth-child(even) { background: rgba(76, 201, 240, 0.05); }
tbody tr:last-child td   { border-bottom: 0; }

td:nth-child(2), td:nth-child(3),
th:nth-child(2), th:nth-child(3) {
  text-align: right;
  width: 5rem;
  font-variant-numeric: tabular-nums;
}
