:root {
/* Sampled from the save-the-date artwork so the site and the card match. */
  --bg: #f8f4e9;
  --card: #fdfbf4;
  --ink: #2f3a2e;
  --muted: #77806f;
  --line: #e3dcc9;
  --line-soft: #eee8d9;
  --accent: #3f5840;
  --accent-deep: #2c3f2d;
  --accent-ink: #fdfbf4;
  --gold: #e8c25f;
  --rose: #db928e;
  --yes: #3f5840;
  --yes-bg: #e8eee2;
  --no: #b0625c;
  --no-bg: #f6e7e3;
  --warn-bg: #fbf0d6;
  --shadow: 0 18px 48px rgba(47, 58, 46, 0.12);
  --shadow-sm: 0 4px 18px rgba(47, 58, 46, 0.07);
  --display: "Cormorant Garamond", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --page: 62rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* An <img>'s width/height attributes act as presentational hints. Without an
   explicit height:auto the height stays pinned at the attribute value and any
   aspect-ratio never gets a say. */
img { max-width: 100%; height: auto; }

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

a { color: var(--accent-deep); }

h1, h2, h3, legend, .display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.15;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 10;
  background: var(--card); padding: 0.5rem 0.9rem;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(248, 244, 233, 0.93);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: none;
}
.brand-name {
  font-family: var(--display);
  font-size: 1.2rem;
  font-style: italic;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  align-items: center;
}
.site-header nav a {
  text-decoration: none;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.site-header nav a.nav-cta {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  border-bottom: none;
}
.site-header nav a.nav-cta:hover { background: var(--accent-deep); color: #fff; }

/* ---------- Layout ---------- */
main {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 1.75rem;
}
.panel.narrow { max-width: 40rem; margin-inline: auto; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.center { text-align: center; }

.prose p { margin: 0 0 1.1rem; }
.prose h2 { margin: 2rem 0 0.6rem; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.center-prose { text-align: center; }
.lead-para {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-style: italic;
  color: var(--ink);
  max-width: 34rem;
  margin-inline: auto;
}

/* ---------- Poster hero ---------- */
/* The save-the-date is a portrait card with the couple's names over an open
   field. This is the same composition, using the photograph as that field. */
.poster {
  position: relative;
  width: 100%;
  max-width: 25rem;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
/* Cream type over a bright sky is only 2.9:1. This scrim takes it past 6:1
   while still reading as sky rather than as a panel. */
.poster::after {
  content: "";
  position: absolute;
  inset: 0 0 40% 0;
  background: linear-gradient(to bottom,
    rgba(30, 45, 32, 0.62) 0%,
    rgba(30, 45, 32, 0.38) 45%,
    rgba(30, 45, 32, 0) 100%);
  pointer-events: none;
}
.poster-text {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  z-index: 1;
  padding: clamp(1.6rem, 5vw, 2.75rem) 1.5rem 0;
  text-align: center;
  color: var(--bg);
}
.poster-text .eyebrow {
  color: var(--gold);
  margin: 0 0 0.35rem;
  text-shadow: 0 1px 10px rgba(26, 40, 28, 0.55);
}

.names {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.7rem);
  line-height: 1.15;
  text-wrap: balance;
  color: var(--bg);
  text-shadow: 0 1px 14px rgba(26, 40, 28, 0.35);
}
.names span { display: block; }
.names .amp {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.3em;
  letter-spacing: 0.06em;
  margin: 0.1em 0;
  opacity: 0.9;
}

/* Size the names against the poster, not the viewport, so they stay in the
   sky at every width instead of drifting onto the parasol. */
@supports (container-type: inline-size) {
  .poster { container-type: inline-size; }
  .names { font-size: 14.5cqw; }
  .poster-text .eyebrow { font-size: 3.1cqw; }
}

/* ---------- The invitation, below the poster ---------- */
.invite {
  text-align: center;
  max-width: 34rem;
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
}
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
  color: var(--gold);
}
.rule span {
  height: 1px;
  flex: 1 1 auto;
  max-width: 6.5rem;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.rule b {
  width: 6px;
  height: 6px;
  background: var(--rose);
  transform: rotate(45deg);
  border-radius: 1px;
}
.hero-date {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  letter-spacing: 0.18em;
  margin: 0 0 0.7rem;
  color: var(--accent-deep);
}
.hero-venue {
  margin: 0;
  font-family: var(--display);
  color: var(--accent);
  font-size: 1.18rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-venue .where-at {
  display: block;
  text-transform: none;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-intro {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 1.5rem auto 0;
  max-width: 26rem;
}
.countdown {
  margin: 1.75rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown strong {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--accent-deep);
  letter-spacing: 0;
  margin-right: 0.35rem;
}
.deadline {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
  margin: 1rem 0 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.9rem 0 0;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.7rem 2rem;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.button.ghost { background: transparent; color: var(--accent-deep); }
.button.ghost:hover { background: var(--accent); color: #fff; }

/* ---------- Page heads ---------- */
.page-head { margin: 0 0 2rem; text-align: center; }
.page-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); margin: 0 0 0.5rem; }
.page-head .lede {
  color: var(--muted);
  margin: 0 auto;
  max-width: 34rem;
  font-size: 1.02rem;
}

/* ---------- Schedule page ---------- */
.schedule { list-style: none; margin: 0; padding: 0; }
.schedule-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line-soft);
}
.schedule > :first-child { border-top: none; padding-top: 0; }
.schedule-when { flex: 0 0 11rem; }
.schedule-what { flex: 1 1 18rem; }
.schedule-what h2 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.day {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 0.2rem;
}
.clock { display: block; color: var(--muted); font-size: 0.95rem; margin: 0; font-family: var(--display); }
.where { margin: 0; color: var(--muted); }
.address, .dress { margin: 0.2rem 0; font-size: 0.9rem; color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; }

/* ---------- Alerts & callouts ---------- */
.alert {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.4rem;
  background: var(--warn-bg);
  border: 1px solid var(--gold);
  font-size: 0.95rem;
}
.alert.success { background: var(--yes-bg); border-color: var(--accent); color: var(--accent-deep); }
.alert.error { background: var(--no-bg); border-color: var(--rose); color: #8c463f; }

.callout {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}
.callout-title {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.callout .big { font-family: var(--display); font-size: 1.9rem; margin: 0 0 0.4rem; }
.callout .big a { text-decoration: none; }

/* ---------- Forms ---------- */
.field { margin: 0 0 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field label, .code-form label, .name-form label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input:not([type]), textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea { resize: vertical; }

.field-row { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.field-row .field { flex: 1 1 11rem; }

.name-form .field-row { margin-bottom: 1.2rem; }
.name-form .button { display: block; width: 100%; }

.guest-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0 0 1.4rem;
  background: var(--bg);
}
.guest-card legend {
  font-size: 1.3rem;
  padding: 0.15rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.answer-block { border-top: 1px solid var(--line); }
.answer-block:first-of-type { border-top: none; }

.answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.answer-event { display: flex; flex-direction: column; font-size: 1.02rem; }
.answer-event small {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.answer-choices { display: flex; gap: 0.4rem; }
.answer-choices input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.answer-choices label {
  display: inline-block;
  min-width: 3.8rem;
  text-align: center;
  padding: 0.42rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.answer-choices input[value="yes"]:checked + label {
  background: var(--yes-bg); border-color: var(--yes); color: var(--yes); font-weight: 400;
}
.answer-choices input[value="no"]:checked + label {
  background: var(--no-bg); border-color: var(--no); color: var(--no); font-weight: 400;
}
.answer-choices input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Meal choice: visible by default so it still works without :has() support,
   then hidden once the guest says they aren't coming. */
.meal {
  border: none;
  border-left: 2px solid var(--line);
  margin: 0 0 0.9rem;
  padding: 0 0 0 1rem;
}
.answer-block:has(input[value="no"]:checked) .meal { display: none; }
.meal > legend {
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 0;
  background: none;
  border: none;
}
.meal-options { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.meal-options input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.meal-options label {
  display: inline-block;
  padding: 0.38rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  font-size: 0.88rem;
}
.meal-options input:checked + label {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.meal-options input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.rsvp-form > .button { display: block; width: 100%; }

.summary { padding-left: 1.1rem; }
.summary > li { margin-bottom: 0.85rem; }
.summary ul { color: var(--muted); padding-left: 1.1rem; }

/* ---------- Name-match chooser ---------- */
.choices { list-style: none; margin: 0; padding: 0; }
.choices li + li { margin-top: 0.65rem; }
.choices a {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
}
.choices a:hover { border-color: var(--accent); }
.choices strong { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 500; }
.choices .muted { font-size: 0.9rem; }

/* ---------- Tables (admin) ---------- */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data th {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 400;
}
table.data td.yes { color: var(--yes); }
table.data td.no { color: var(--no); }
table.data td.awaiting { color: var(--muted); }
table.data tr.pending td:first-child { border-left: 3px solid var(--warn-bg); }
.chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
  margin: 0 0.35rem 0.25rem 0;
  font-size: 0.78rem;
}
.msg { font-style: italic; }
.muted { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 3rem 1.25rem 3.5rem;
  text-align: center;
  color: var(--ink);
  font-size: 0.92rem;
}
.site-footer p { margin: 0.2rem 0; }
.footer-mark {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.site-footer .muted { font-size: 0.86rem; }

/* ---------- Narrow screens ---------- */
@media (max-width: 56rem) {
  /* Edge to edge on a phone: the photo is the page. */
  main { padding-top: 0; }
  .poster {
    max-width: none;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    border-radius: 0 0 14px 14px;
    box-shadow: none;
  }
  .poster { aspect-ratio: 4 / 5; }
}

@media (max-width: 34rem) {
  /* One compact row instead of two, and it stays put so RSVP is always a
     tap away rather than scrolling off with the hero. */
  .site-header {
    flex-wrap: nowrap;
    padding: 0.7rem 0.9rem;
    gap: 0.9rem;
  }
  .site-header nav { flex-wrap: nowrap; gap: 0.85rem; }
  .site-header nav a { font-size: 0.66rem; letter-spacing: 0.12em; }
  .site-header nav a.nav-cta { padding: 0.42rem 0.85rem; }
  .brand-name { display: none; }
  .brand-mark { display: inline; }
  .schedule-when { flex-basis: 100%; }
  /* Stack every row the same way rather than letting a longer date decide. */
  .answer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .button { padding: 0.7rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

