:root {
  --sand: #f6ecdc;
  --sand-deep: #ead8bc;
  --adobe: #c4683f;
  --chile: #a3261f;
  --chile-dark: #7c1a15;
  --turquoise: #1f8783;
  --pinon: #33553a;
  --gold: #d9a441;
  --ink: #3b2519;
  --ink-soft: #6e5243;
  --card: #fffaf2;

  --display: "Yeseva One", Georgia, "Times New Roman", serif;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
  margin: 0;
  line-height: 1.15;
}

a { color: var(--turquoise); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---- hero ---- */

.hero {
  background: var(--adobe);
  color: var(--card);
  display: grid;
}
.hero-img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}
.hero-text {
  padding: 28px 16px 36px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
.lede { margin: 0; font-size: 1.2rem; }

/* Stepped Southwestern band: turquoise / red / gold. */
.band {
  height: 22px;
  background:
    linear-gradient(135deg, var(--turquoise) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(225deg, var(--turquoise) 25%, transparent 25%) -11px 0 / 22px 22px,
    linear-gradient(315deg, var(--chile) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(45deg, var(--chile) 25%, transparent 25%) 0 0 / 22px 22px,
    var(--gold);
}

/* ---- details ---- */

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  display: grid;
  gap: 56px;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.detail {
  background: var(--card);
  border: 1px solid var(--sand-deep);
  border-radius: 6px;
  padding: 20px 22px;
}
.detail-wide { grid-column: 1 / -1; }
.detail h2 {
  font-size: 1.5rem;
  color: var(--chile);
  margin-bottom: 8px;
}
.detail p { margin: 0 0 8px; max-width: 70ch; }
.detail p:last-child { margin-bottom: 0; }
.small { font-size: 0.95rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .details { grid-template-columns: 1fr; }
}

/* ---- who's coming ---- */

.coming { display: grid; gap: 16px; }
.coming > h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--pinon);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--sand-deep);
  border-radius: 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--pinon);
  color: var(--card);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
tbody.family + tbody.family tr:first-child td { border-top: 2px solid var(--sand-deep); }
tbody.family tr:nth-child(n+2) td { border-top: 1px dashed var(--sand-deep); }
.check { text-align: center; width: 6.5rem; }
.tick { color: var(--turquoise); font-weight: 700; font-size: 1.15rem; }
.person { font-weight: 500; white-space: nowrap; }
.poc-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--turquoise);
  color: var(--card);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}
tfoot th, tfoot td {
  border-top: 2px solid var(--pinon);
  background: var(--sand);
  font-weight: 600;
}
.total { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.empty { text-align: center; color: var(--ink-soft); padding: 28px 14px; }
.legend { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.legend .poc-tag { margin: 0 4px 0 0; }

.rsvp-cta { display: flex; justify-content: center; padding-top: 12px; }

/* ---- buttons ---- */

.btn {
  font: 600 1rem var(--body);
  border: 0;
  border-radius: 6px;
  padding: 10px 22px;
  background: var(--chile);
  color: var(--card);
  cursor: pointer;
}
.btn:hover { background: var(--chile-dark); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-big {
  font: 400 2rem var(--display);
  letter-spacing: 0.08em;
  padding: 18px 72px;
  border-radius: 10px;
  box-shadow: 0 5px 0 var(--chile-dark);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-big:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--chile-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-soft);
}
.btn-ghost:hover { background: var(--sand-deep); }

/* ---- dialog ---- */

dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(40, 20, 10, 0.4);
}
dialog::backdrop { background: rgba(59, 37, 25, 0.6); }

#rsvp-form {
  display: grid;
  gap: 22px;
  padding: 26px 24px 22px;
  border-top: 8px solid var(--turquoise);
}
#rsvp-form h2 { font-size: 2rem; color: var(--chile); }

.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > label, .field > legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 6px;
}
.hint { margin: -6px 0 2px; font-size: 0.9rem; color: var(--ink-soft); }
.hint-inline { font-weight: 400; color: var(--ink-soft); }

input[type="text"], select, textarea {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c9b190;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
select { width: auto; min-width: 8rem; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #a8968a; opacity: 1; }

.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.options { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
input[type="radio"] { accent-color: var(--chile); width: 1.05rem; height: 1.05rem; }

.reveal { display: grid; gap: 6px; margin-top: 6px; }
.reveal label { font-weight: 500; }

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 5px;
  background: #f9e1dc;
  color: var(--chile-dark);
  font-weight: 500;
}

.actions { display: flex; justify-content: flex-end; gap: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- toast & footer ---- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--pinon);
  color: var(--card);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-weight: 500;
}

.footer { background: var(--adobe); color: var(--card); text-align: center; }
.footer p { margin: 0; padding: 22px 16px; font-family: var(--display); font-size: 1.3rem; }

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