/* UK Partners Banquet. Photographs lead; neutral canvas, one burgundy accent. Spatial ramp 4..128 */
:root {
  --wine-50: #fbf3f4;
  --wine-100: #f4dfe2;
  --wine-300: #cf8d98;
  --wine-500: #8a1c2e;
  --wine-600: #741626;
  --wine-700: #5c101d;
  --wine-900: #2e080f;
  --canvas: #f7f7f6;
  --surface: #ffffff;
  --well: #efefed;
  --ink: #171314;
  --ink-2: #4a4446;
  --ink-3: #6b6466;
  --line: rgba(23, 19, 20, 0.1);
  --error: #b3261e;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 160ms;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, dl, dd, ul, fieldset, figure { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
.wrap { width: min(1200px, 100% - 64px); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 50; background: var(--surface); color: var(--ink); padding: 12px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--wine-500); outline-offset: 3px; }
.hero :focus-visible, .foot :focus-visible { outline-color: #fff; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 600 15px/1 var(--sans);
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-lg { min-height: 56px; padding: 16px 32px; font-size: 16px; }
.btn-wine {
  color: #fff; background: var(--wine-500);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px -12px rgba(92, 16, 29, 0.6);
}
.btn-wine:hover { background: var(--wine-600); }
.btn-wine:active { background: var(--wine-700); }
.btn-light { color: var(--ink); background: #fff; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5); }
.btn-light:hover { background: var(--wine-50); }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
/* Hero entrance: CSS, not JS, so it always finishes and the hero can never be left hidden */
@keyframes hero-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes hero-logo-in { from { opacity: 0; transform: translateY(16px) scale(0.92); } }
.hero-logo { animation: hero-logo-in 1400ms var(--ease) 200ms both; }
.hero-theme, .hero-when, .hero-center > .btn, .hero-note { animation: hero-rise 900ms var(--ease) both; }
.hero-theme { animation-delay: 700ms; }
.hero-when { animation-delay: 800ms; }
.hero-center > .btn { animation-delay: 950ms; }
.hero-note { animation-delay: 1100ms; }
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 4px; transition: text-decoration-color var(--fast) var(--ease); }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Hero: the table, full bleed ---------- */
main { position: relative; }
.hero {
  position: sticky; top: 0; z-index: 0; isolation: isolate; overflow: hidden;
  height: 100svh; min-height: 640px; max-height: 1080px;
  color: #fff; background: #0d0b10;
  display: grid; grid-template-rows: auto 1fr auto;
}
.hero-media { position: absolute; inset: 0; z-index: -2; will-change: transform; }
.hero-photo, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero-video { opacity: 0; transition: opacity 900ms var(--ease); }
.hero-video.is-on { opacity: 1; }
.hero-dim { position: absolute; inset: 0; z-index: 2; background: #0d0b10; opacity: 0; pointer-events: none; }
/* Scrim: darkest behind the centre stack, fading out so the table and candles stay bright */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 44% at 50% 62%, rgba(10, 8, 12, 0.82) 0%, rgba(10, 8, 12, 0.5) 55%, transparent 100%),
    radial-gradient(44% 40% at 50% 34%, rgba(10, 8, 12, 0.55) 0%, transparent 100%),
    linear-gradient(180deg, rgba(10, 8, 12, 0.85) 0%, rgba(10, 8, 12, 0.2) 38%, transparent 55%),
    linear-gradient(0deg, rgba(10, 8, 12, 0.55) 0%, transparent 28%);
}
.hero { grid-template-rows: 1fr; }
.hero h1, .rsvp h2, .pass-name { font-optical-sizing: none; font-variation-settings: "opsz" 14; }
.reveal-in { display: block; }
.reveal-clip { display: block; overflow: clip; padding: 0.16em 0.06em 0.14em; margin: -0.16em -0.06em -0.08em; }

.hero-center {
  align-self: center; display: grid; justify-items: center; text-align: center;
  padding-block: 32px 48px; margin-top: -4vh;
}
.hero h1 { display: grid; justify-items: center; gap: 16px; margin: 0; }
.hero-logo {
  width: min(84vw, 50vh, 520px); height: auto;
  filter: drop-shadow(0 0 48px rgba(232, 190, 110, 0.28)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.55));
}
.hero-name {
  font: 500 clamp(36px, 4.6vw, 68px)/1.05 var(--serif); letter-spacing: -0.025em;
  text-wrap: balance; max-width: 16ch; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero-theme {
  margin-top: 16px; max-width: 28ch; text-wrap: balance;
  font: 500 clamp(20px, 2vw, 28px)/1.25 var(--serif); letter-spacing: -0.01em;
  font-optical-sizing: none; font-variation-settings: "opsz" 14;
  color: #e8cd8a; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-when {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px;
  margin-top: 16px; font-size: 18px; font-weight: 500; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 16px rgba(0, 0, 0, 0.85);
}
.hero-when .sep { color: rgba(255, 255, 255, 0.5); }
.hero-center .btn { margin-top: 32px; }
.hero-note { margin-top: 16px; text-wrap: balance; max-width: 36ch; font-size: 16px; font-weight: 500; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 16px rgba(0, 0, 0, 0.85); }
/* Localised scrim behind the words only, so the bright tablecloth never washes them out */
.hero-center { position: relative; isolation: isolate; }
.hero-center::after {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: 0; width: min(720px, 120%); height: 62%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 55%, rgba(10, 8, 12, 0.72) 0%, rgba(10, 8, 12, 0.4) 55%, transparent 100%);
}

/* ---------- RSVP ---------- */
/* The form slides over the hero */
.rsvp { position: relative; z-index: 1; margin-top: -32px; } /* overlap the hero so the rounded corners show the photo, not the page */
.rsvp {
  isolation: isolate; overflow: clip;
  padding-block: 96px; color: #fff; border-radius: 32px 32px 0 0;
  background:
    radial-gradient(60% 50% at 10% 0%, rgba(138, 28, 46, 0.45), transparent 70%),
    radial-gradient(50% 40% at 100% 100%, rgba(138, 28, 46, 0.25), transparent 70%),
    #120c10;
  box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.silk { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; pointer-events: none; }
/* Left: a sticky column that summarises the reply as it is written. Right: the reply card. */
.rsvp-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
.rsvp-side { position: sticky; top: 32px; display: grid; gap: 24px; max-height: calc(100svh - 64px); }
.side-facts { display: grid; }
.side-facts > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; }
.side-facts dt { color: rgba(255, 255, 255, 0.66); }
.side-facts dd { font-weight: 500; text-align: right; }
.card {
  color: var(--ink); background: var(--surface); border-radius: var(--r-lg); padding: 48px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 40px 80px -32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.photo { overflow: hidden; border-radius: var(--r-lg); background: var(--well); box-shadow: 0 32px 64px -32px rgba(23, 19, 20, 0.35); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* The sticky column must fit one screen, so the photo gives up height first; the place card sits near its top and stays in view */
.rsvp-photo { position: relative; height: clamp(240px, calc(100svh - 400px), 480px); container-type: inline-size; box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.7); }
.photo-inner { position: absolute; inset: 0 0 auto; aspect-ratio: 4 / 5; will-change: transform; }
/* The guest's name, set on the blank place card in the photograph */
.place-name {
  position: absolute; left: 45.5%; top: 17.6%; width: 23.5%; height: 8.6%;
  overflow: hidden;
  font: 500 3.4cqw/1 var(--serif); font-optical-sizing: none; font-variation-settings: "opsz" 10;
  color: #3d1119; mix-blend-mode: multiply; white-space: nowrap;
  transition: opacity 300ms var(--ease);
}
.place-name.is-empty { opacity: 0.38; }
/* Centred from its own midpoint, so a long name shrinks evenly inside the card */
.place-name > span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.seats {
  position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 8px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 500;
  background: rgba(20, 16, 20, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}
.seats[hidden] { display: none; }
.seats-n { display: grid; place-items: center; min-width: 32px; height: 32px; padding-inline: 8px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; overflow: hidden; }
.seats.is-out .seats-n { display: none; }
.seats.is-out { padding-left: 16px; }

.rsvp h2 { font: 500 clamp(40px, 4vw, 60px)/1.05 var(--serif); letter-spacing: -0.025em; }
.rsvp-lead { margin-top: -8px; color: rgba(255, 255, 255, 0.78); max-width: 34ch; }

/* One 24px rhythm between every row; the first question and the send row get more air */
/* The card is read in groups: each has its own serif heading and a quiet rule above it */
.form { display: grid; gap: 0; }
.group { display: grid; gap: 24px; padding-block: 32px; border-top: 1px solid var(--line); }
.form > .group:first-of-type, .group-reply { padding-top: 0; border-top: 0; }
.group-title { font: 500 26px/1.15 var(--serif); letter-spacing: -0.015em; font-optical-sizing: none; font-variation-settings: "opsz" 14; margin: 0; color: var(--ink); }
.q legend.group-title { font-size: 26px; font-weight: 500; margin-bottom: 24px; }
.group-sub { padding-top: 32px; border-top: 1px solid var(--line); gap: 8px; }
.group-sub .group-title { margin-bottom: 16px; }
.form-foot { padding-top: 32px; border-top: 1px solid var(--line); }
.form-alert { margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
/* Last name lines up with the right-hand column of the rows below */
.grid-name { grid-template-columns: 136px 1fr calc(50% - 12px); }
.field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; align-content: start; }
.field > label, .q legend { font-size: 14px; font-weight: 500; padding: 0; }
.q legend { margin-bottom: 8px; }
.opt { color: var(--ink-3); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: var(--surface); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px var(--line);
  transition: box-shadow var(--fast) var(--ease);
}
textarea { resize: vertical; min-height: 96px; }
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23171314' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select:invalid { color: #8d8688; }
input::placeholder, textarea::placeholder { color: #8d8688; }
input:hover, select:hover, textarea:hover { box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px rgba(23, 19, 20, 0.28); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--wine-500), 0 0 0 4px rgba(138, 28, 46, 0.14); }
[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--error) !important; }
.field-error { font-size: 14px; color: var(--error); }
.form-alert { padding: 12px 16px; border-radius: var(--r-sm); background: #fbeceb; color: var(--error); font-size: 15px; font-weight: 500; }

/* Segmented answers: native radios inside a recessed track */
.choice {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--well);
  box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.08);
}
.choice { position: relative; }
.choice::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 12px) / 2);
  border-radius: var(--r-sm); background: var(--surface); opacity: 0; transform: scale(0.92);
  box-shadow: 0 1px 2px rgba(23, 19, 20, 0.12), 0 4px 12px -4px rgba(23, 19, 20, 0.16);
  transition: transform 420ms cubic-bezier(0.3, 1.3, 0.4, 1), opacity 200ms var(--ease), background-color 300ms var(--ease);
}
.choice-lg::before { background: var(--wine-500); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 16px -8px rgba(92, 16, 29, 0.6); }
.choice:has(input:checked)::before { opacity: 1; transform: none; }
.choice:has(label:nth-child(2) input:checked)::before { transform: translateX(calc(100% + 4px)); }
.choice-3::before { width: calc((100% - 16px) / 3); }
.choice-3:has(label:nth-child(3) input:checked)::before { transform: translateX(calc(200% + 8px)); }
.choice-lg:has(#att-maybe:checked)::before { background: var(--ink); box-shadow: none; }
.choice-lg:has(#att-no:checked)::before { background: var(--ink-2); box-shadow: none; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 8px 16px; border-radius: var(--r-sm);
  font-weight: 500; font-size: 15px; text-align: center; color: var(--ink-2);
  transition: background-color var(--fast) var(--ease), color 300ms var(--ease), transform var(--fast) var(--ease);
}
.choice-lg span { min-height: 56px; font-size: 16px; }
.choice label:hover input:not(:checked) + span { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.choice label:active span { transform: scale(0.98); }
.choice input:focus-visible + span { outline: 2px solid var(--wine-500); outline-offset: 2px; }
.choice input:checked + span { color: var(--ink); background: transparent; }
.choice-lg input:checked + span { color: #fff; }
@supports not selector(:has(*)) {
  .choice input:checked + span { background: var(--surface); }
  .choice-lg input:checked + span { background: var(--wine-500); }
}
.choice:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px var(--error); }

/* Follow-up questions show only when they apply (works without JS) */
.if-coming, .if-kids { display: grid; gap: 24px; }
.form:has(#att-no:checked) .if-coming { display: none; }
.form:not(:has(#kids-yes:checked)) .if-kids { display: none; }
@supports not selector(:has(*)) { .if-coming, .if-kids { display: grid !important; } }

.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.if-maybe { display: none; }
.form:has(#att-maybe:checked) .if-maybe { display: block; }

/* Children: count on the left, one age box per child on the right, all boxes on one 52px line */
/* Same two columns as every row above: count under the spouse question, ages under the children question */
.kids { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.kids .stepper { width: 100%; grid-template-columns: 52px 1fr 52px; }
/* A legend is not a grid item, so it gets the 8px as a margin; the label gets it from the field's gap */
.kids .q legend { margin-bottom: 8px; line-height: 24px; }
.kids .field > label { margin-bottom: 0; line-height: 24px; }
.kids .field { gap: 8px; }
.kids .q { display: grid; gap: 8px; }
.ages { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.age {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding-inline: 16px 12px; cursor: text;
  background: var(--surface); border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px var(--line);
  transition: box-shadow var(--fast) var(--ease);
}
.age[hidden] { display: none; }
.age:hover { box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px rgba(23, 19, 20, 0.28); }
.age:focus-within { box-shadow: inset 0 0 0 1.5px var(--wine-500), 0 0 0 4px rgba(138, 28, 46, 0.14); }
.age:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px var(--error); }
.age span { flex: none; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.form .age input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0; text-align: right; font-weight: 600;
  background: transparent; box-shadow: none !important; -moz-appearance: textfield; appearance: textfield;
}
.age input::-webkit-inner-spin-button, .age input::-webkit-outer-spin-button { -webkit-appearance: none; }
.kids .hint { margin-top: 0; }

/* Country code and number share one row */
.phone-row { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.phone-row .dd-panel { width: 300px; }

/* ---------- Custom dropdown (enhances a native select) ---------- */
.dd { position: relative; }
.dd-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset: auto auto 0 16px; }
.dd-btn {
  position: relative; width: 100%; min-height: 52px; padding: 12px 44px 12px 16px;
  font: 400 16px/1.4 var(--sans); color: var(--ink); text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--surface); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px var(--line);
  transition: box-shadow var(--fast) var(--ease);
}
.dd-btn::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); transform-origin: 65% 65%; transition: transform 260ms var(--ease);
}
.dd-btn[aria-expanded="true"]::after { transform: rotate(225deg); }
.dd-btn.is-placeholder { color: #8d8688; }
.dd-btn:hover { box-shadow: inset 0 1px 2px rgba(23, 19, 20, 0.06), inset 0 0 0 1px rgba(23, 19, 20, 0.28); }
.dd-btn:focus-visible, .dd-btn[aria-expanded="true"] { outline: none; box-shadow: inset 0 0 0 1.5px var(--wine-500), 0 0 0 4px rgba(138, 28, 46, 0.14); }
.dd-panel {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); width: 100%; min-width: 220px; padding: 8px;
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -16px rgba(23, 19, 20, 0.28), 0 8px 16px -8px rgba(23, 19, 20, 0.12);
}
.dd-panel[hidden] { display: none; }
.dd-search { min-height: 44px !important; margin-bottom: 8px; background: var(--well) !important; box-shadow: none !important; }
.dd-search:focus { box-shadow: inset 0 0 0 1.5px var(--wine-500) !important; }
.dd-list { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; }
.dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: 15px;
}
.dd-opt[hidden] { display: none; }
.dd-opt.is-active { background: var(--well); }
.dd-opt[aria-selected="true"] { font-weight: 600; color: var(--wine-600); }
.dd-opt[aria-selected="true"]::after { content: ""; width: 6px; height: 12px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: none; }
.dd-none { padding: 12px; font-size: 14px; color: var(--ink-3); }

.stepper { display: inline-grid; grid-template-columns: 52px 88px 52px; gap: 8px; width: max-content; }
.stepper input { text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.step {
  min-height: 52px; border: 0; border-radius: var(--r-sm); cursor: pointer;
  font: 500 22px/1 var(--sans); color: var(--ink);
  background: var(--well); box-shadow: inset 0 -1px 0 rgba(23, 19, 20, 0.08);
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.step:hover { background: #e5e5e2; }
.step:active { transform: scale(0.94); }
.step:disabled { opacity: 0.4; cursor: not-allowed; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.fine { font-size: 13px; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Confirmation ---------- */
.pass { display: grid; gap: 24px; animation: pass-in 420ms var(--ease) both; }
@keyframes pass-in { from { opacity: 0; transform: translateY(8px); } }
.pass-status { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--wine-600); background: var(--wine-100); }
.muted-status { color: var(--ink-2); background: var(--well); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wine-500); }
.pass-name { font: 500 clamp(44px, 5vw, 72px)/1.05 var(--serif); letter-spacing: -0.025em; }
.pass-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border-radius: var(--r-md); overflow: hidden; background: var(--line); box-shadow: 0 16px 32px -24px rgba(23, 19, 20, 0.3); }
.pass-grid > div { background: var(--surface); padding: 16px 24px; }
.pass-grid dt { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.pass-grid dd { font-size: 17px; font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.06em; color: var(--wine-600); }
.pass-note { color: var(--ink-2); max-width: 56ch; }
.pass-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* ---------- Footer: the final scene ---------- */
.foot { position: relative; z-index: 1; isolation: isolate; overflow: hidden; color: #fff; background: #0d0b10; min-height: 72svh; display: grid; align-items: end; }
.foot-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.foot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10, 8, 12, 0.94) 0%, rgba(10, 8, 12, 0.55) 45%, rgba(10, 8, 12, 0.35) 100%); }
.foot-inner { display: grid; justify-items: center; gap: 16px; padding-block: 96px 32px; text-align: center; }
.foot-logo { width: min(320px, 60vw); height: auto; margin-bottom: 32px; filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.6)); }
.foot-meta { font-size: 14px; color: rgba(255, 255, 255, 0.86); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .rsvp-grid { grid-template-columns: 1fr; gap: 32px; }
  .rsvp-side { position: static; max-height: none; grid-template-columns: 1fr 1fr; align-items: start; }
  .rsvp-side h2, .rsvp-lead { grid-column: 1 / -1; }
  .rsvp-photo { aspect-ratio: 1 / 1; height: auto; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .rsvp { padding-block: 48px 64px; }
  .hero-when { font-size: 15px; flex-direction: column; align-items: center; gap: 0; }
  .hero-when .sep { display: none; }
  .hero-logo { width: min(86vw, 40vh, 420px); }
  /* On a narrow screen the text runs over the roses: darken the lower half evenly */
  .hero::before {
    background:
      linear-gradient(180deg, rgba(10, 8, 12, 0.6) 0%, rgba(10, 8, 12, 0.15) 30%, rgba(10, 8, 12, 0.55) 52%, rgba(10, 8, 12, 0.8) 75%, rgba(10, 8, 12, 0.7) 100%);
  }
  .hero-center .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 24px 16px; border-radius: var(--r-md); }
  .rsvp-side { grid-template-columns: 1fr; }
  /* On a phone the form comes straight after the heading; the hero already gave the date */
  .rsvp-photo, .side-facts { display: none; }
  .group-title, .q legend.group-title { font-size: 24px; }
  .grid-name { grid-template-columns: 1fr 1fr; }
  .grid-name .field:first-child { grid-column: 1 / -1; }
  .kids { grid-template-columns: 1fr; }
  /* Three answers stack on a phone, so none of them wraps; the pill slides down instead of across */
  .choice-3 { grid-auto-flow: row; }
  .choice-3::before { width: calc(100% - 8px); height: calc((100% - 16px) / 3); bottom: auto; }
  .choice-3:has(label:nth-child(2) input:checked)::before { transform: translateY(calc(100% + 4px)); }
  .choice-3:has(label:nth-child(3) input:checked)::before { transform: translateY(calc(200% + 8px)); }
  .choice-3 span { min-height: 52px; }
  .form-foot .btn { width: 100%; }
  .pass-grid { grid-template-columns: 1fr; }
  .foot { min-height: 60svh; }
}

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

@media print {
  .hero, .rsvp-photo, .foot, .pass-actions, .skip { display: none !important; }
  body { background: #fff; }
  .rsvp { padding: 0; }
  .rsvp-grid { display: block; }
  .rsvp-side, .silk { display: none; }
  .rsvp { background: #fff; color: var(--ink); }
  .card { box-shadow: none; padding: 0; }
}
