:root {
  --maroon: #4b111d;
  --maroon-deep: #3a0c16;
  --maroon-line: #6b2a35;
  --gold: #e0ac48;
  --gold-soft: #c9a063;
  --cream: #f7ecdf;
  --muted: #d9c3c3;
  --error: #ffb4a8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--maroon-deep); }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #5a1624 0%, var(--maroon-deep) 70%);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.5;
  padding: 24px 16px 48px;
}

a { color: var(--gold); }

.card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--maroon);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* ── Hero ───────────────────────────── */
.hero {
  aspect-ratio: 816 / 400;
  overflow: hidden;
  position: relative;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(transparent, var(--maroon));
}

.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 15% 0;
  color: var(--gold);
  font-size: 10px;
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-soft);
  opacity: 0.7;
}

/* ── Intro ──────────────────────────── */
.intro {
  text-align: center;
  padding: 18px 28px 8px;
}
.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 3rem);
  line-height: 1.1;
  margin: 6px 0 2px;
}
.subtitle {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.5rem;
  margin: 0;
}
.tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 10px auto 0;
}
hr.short {
  width: 64px;
  border: 0;
  border-top: 1px solid var(--gold);
  margin: 16px auto;
}
.credit {
  margin: 2px 0;
  font-size: 0.92rem;
}
.credit strong { font-weight: 700; }

/* ── Details grid ───────────────────── */
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 24px 8px;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  background: var(--maroon-deep);
  overflow: hidden;
}
.cell {
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cell:first-child { border-right: 1px solid var(--maroon-line); }
.cell.wide {
  grid-column: 1 / -1;
  border-top: 1px solid var(--maroon-line);
}
.label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
}
.value.venue { font-size: 1.35rem; }
.address {
  color: var(--cream);
  font-size: 0.85rem;
  text-decoration-color: var(--gold-soft);
  text-underline-offset: 3px;
}

/* ── RSVP form ──────────────────────── */
.rsvp {
  padding: 24px 28px 8px;
}
.rsvp h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  text-align: center;
  margin: 0;
}
.hint {
  text-align: center;
  color: var(--muted);
  margin: 4px 0 20px;
  font-size: 0.95rem;
}

form {
  display: grid;
  gap: 16px;
}
form label {
  display: grid;
  gap: 6px;
}
form label > span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
form label em {
  text-transform: none;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
small {
  color: var(--muted);
  font-size: 0.8rem;
}

input, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--cream);
  background: var(--maroon-deep);
  border: 1px solid var(--maroon-line);
  border-radius: 8px;
  padding: 11px 12px;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 172, 72, 0.2);
}
textarea { resize: vertical; }
::placeholder { color: #a88a8e; }

.counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  border: 1px solid var(--maroon-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--maroon-deep);
}
.stepper input {
  border: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 1.3rem;
  cursor: pointer;
}
.stepper button:hover { background: rgba(224, 172, 72, 0.1); }

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

.turnstile { min-height: 65px; }

.error {
  margin: 0;
  color: var(--error);
  background: rgba(255, 120, 100, 0.1);
  border: 1px solid rgba(255, 150, 130, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.submit, .btn {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.submit {
  background: var(--gold);
  color: var(--maroon-deep);
  border: 0;
  padding: 14px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.submit:hover { filter: brightness(1.07); }
.submit:disabled { opacity: 0.6; cursor: wait; }

/* ── Thank-you ──────────────────────── */
.thanks {
  text-align: center;
  padding: 8px 0;
}
.thanks p { color: var(--muted); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--maroon-deep);
  border: 1px solid var(--gold);
  font-size: 0.9rem;
}
.btn.ghost {
  background: transparent;
  color: var(--gold);
}

footer {
  text-align: center;
  padding: 28px 16px 32px;
  font-size: 1.1rem;
  color: var(--muted);
}
footer a { text-decoration: none; font-weight: 600; }

[hidden] { display: none !important; }

@media (max-width: 480px) {
  body { padding: 0 0 24px; }
  .card { border-radius: 0; }
  .intro, .rsvp { padding-left: 16px; padding-right: 16px; }
  .details { margin-left: 16px; margin-right: 16px; }
  .cell { padding: 12px 8px; }
  .value { font-size: 1.15rem; white-space: nowrap; }
  .value.venue { font-size: 1.1rem; white-space: normal; }
}
