:root {
  --bg: #faf8f5;
  --ink: #2a2426;
  --muted: #8a8083;
  --line: #e6dcdc;
  --burgundy: #6e1f2e;
  --burgundy-soft: #f3e6e8;
  --blush: #f4eeec;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* display rules below (e.g. form grid) would otherwise override the hidden attribute */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  position: relative;
  /* a faint warm glow so the page isn't a flat sheet */
  background: radial-gradient(ellipse 70% 55% at 50% 42%, #f6efee 0%, var(--bg) 70%);
}

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: var(--burgundy);
  margin-bottom: 0.5rem;
}

.names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.6rem, 13vw, 10.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.amp {
  font-style: italic;
  color: var(--burgundy);
  padding: 0 0.1em;
}

.flourish {
  width: 140px;
  height: 14px;
  margin: 2rem auto;
  overflow: visible;
}
.flourish path { fill: none; stroke: var(--burgundy); stroke-width: 1; stroke-linecap: round; }
.flourish circle { fill: var(--burgundy); }

.date {
  font-size: clamp(1.3rem, 3.6vw, 2rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-weight: 300;
}

.date-long {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  color: var(--muted);
  margin-top: 0.15rem;
}

.venue { margin-top: 2.25rem; }

.venue-name {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
}

.venue-address {
  display: inline-block;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  margin-top: 0.3rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.pin {
  width: 0.7em;
  height: 0.95em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
  overflow: visible;
}
.pin path { fill: none; stroke: var(--burgundy); stroke-width: 1.1; stroke-linejoin: round; }
.pin circle { fill: var(--burgundy); }
.venue-address:hover, .venue-address:focus-visible {
  color: var(--burgundy);
  text-decoration-color: var(--burgundy);
}

.link {
  color: var(--burgundy);
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.link:hover, .link:focus-visible { border-bottom-color: var(--burgundy); }

.note {
  margin-top: 2.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  color: var(--muted);
}

.cal {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1rem;
}
.cal-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-links { display: inline-flex; align-items: center; gap: 0.6rem; }
.cal .dot { color: #cdbfc1; }
/* thin divider between label and links when they share a line */
@media (min-width: 480px) {
  .cal-links { padding-left: 1rem; border-left: 1px solid #e0cfd2; }
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  text-decoration: none;
}
.scroll-cue svg { animation: bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: var(--burgundy); }

/* RSVP: a soft panel with an arched top edge */
.rsvp {
  background: var(--blush);
  border-radius: 50% 50% 0 0 / 90px 90px 0 0;
  padding: 5rem 1.5rem 3rem;
}

.rsvp-inner { max-width: 480px; margin: 0 auto; }

.rsvp h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  text-align: center;
  line-height: 1.1;
}

.sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin: 0.5rem 0 2.25rem;
}
#countdown {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--burgundy);
}

form { display: grid; gap: 1.5rem; }

.field { display: grid; gap: 0.45rem; border: 0; }

.field > span, .field legend {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 400;
  padding-left: 0.25rem;
}
.field em { color: var(--muted); font-weight: 300; }
.field legend { margin-bottom: 0.6rem; }

input[type="text"], textarea {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0.8rem 1.1rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus, textarea:focus {
  border-color: #d9bcc1;
  box-shadow: 0 0 0 4px rgba(110, 31, 46, 0.06);
}
textarea::placeholder { color: #bdb4b6; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  text-align: center;
  line-height: 1.3;
  transition: all 0.2s;
}
.choice:hover span { border-color: #e0cfd2; }
.choice input:checked + span {
  border-color: var(--burgundy);
  background: var(--burgundy-soft);
  color: var(--burgundy);
}
.choice input:focus-visible + span { outline: 2px solid var(--burgundy); outline-offset: 2px; }

button {
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--burgundy);
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  margin-top: 0.25rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
button:hover { opacity: 0.9; }
button:active { transform: scale(0.99); }
button:disabled { opacity: 0.5; cursor: default; }

.status { min-height: 1.2em; font-size: 0.9rem; text-align: center; color: var(--burgundy); }

.hp { position: absolute; left: -9999px; }

.thanks { text-align: center; color: var(--muted); }
.thanks-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--burgundy);
  margin-bottom: 0.25rem;
}

footer {
  background: var(--blush);
  text-align: center;
  padding: 1rem 1rem 2.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}
footer span { color: var(--burgundy); }

.nowrap { white-space: nowrap; }

/* Motion */
.fade {
  opacity: 0;
  transform: translateY(8px);
  animation: in 0.9s ease forwards;
  animation-delay: calc(var(--d) * 0.15s + 0.1s);
}
@keyframes in { to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translateY(4px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { animation: none; opacity: 1; transform: none; }
  .scroll-cue svg { animation: none; }
}

@media (max-height: 640px) {
  .scroll-cue { display: none; }
}
/* Phones: stack the names so they can be large */
@media (max-width: 600px) {
  .names { font-size: clamp(3.8rem, 21vw, 6rem); line-height: 0.95; }
  .names span { display: block; }
  .names .amp { font-size: 0.6em; line-height: 1.2; }
  .rsvp { border-radius: 50% 50% 0 0 / 48px 48px 0 0; padding-top: 4rem; }
  .choices { grid-template-columns: 1fr; }
}
