:root {
  color-scheme: dark;
  --background: #121210;
  --surface: #181816;
  --text: #f5efe3;
  --muted: #c8c0b3;
  --gold: #c6a66d;
  --line: #3b3933;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.7 var(--sans);
}

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

.page-width { width: min(100% - 3rem, 1016px); margin-inline: auto; }
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header { padding: 24px 0 20px; border-bottom: 1px solid var(--line); }
.wordmark, .kicker, .date-day, .date-month, label, .button, .site-footer {
  letter-spacing: .16em;
  text-transform: uppercase;
}

.wordmark { display: grid; gap: .2rem; text-decoration: none; line-height: 1.3; }
.wordmark strong { font-size: 1.125rem; letter-spacing: .26em; }
.wordmark span { color: var(--gold); font-size: .65rem; }
.kicker { margin: 0; color: var(--gold); font-size: .75rem; }
.header-caption { color: var(--muted); text-align: right; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.19fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.25rem, 5.7vw, 4.4rem);
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3.75rem, 7.4vw, 5.5rem);
}

h1, h2, .date-number { font-family: var(--serif); font-weight: 400; }
h1 {
  margin: 1.1rem 0 1.4rem;
  font-size: clamp(3.4rem, 8vw, 6.45rem);
  letter-spacing: -.055em;
  line-height: .87;
}

h1 em { color: var(--gold); }
.intro { margin: 0 0 2.15rem; color: var(--muted); max-width: 31rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .9rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--gold);
  color: #17140f;
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: #dfc58c; }
.button:disabled { cursor: wait; opacity: .7; }
.event-card {
  position: relative;
  min-width: 0;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border: 1px solid #534b3d;
  background: radial-gradient(ellipse at 72% 12%, #27231c, var(--background) 80%);
}

.event-card::before, .event-card::after {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border: solid #a09a8a;
  pointer-events: none;
  content: '';
}

.event-card::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.event-card::after { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
.event-date { display: grid; margin: .75rem 0 2.95rem; }
.date-number { font-size: clamp(5.2rem, 8vw, 6.5rem); line-height: .92; letter-spacing: -.07em; }
.date-day { font-size: .875rem; }
.date-month { color: var(--muted); font-size: .8rem; }
.event-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem 1rem;
  margin: 0;
  padding-top: 1.65rem;
  border-top: 1px solid var(--line);
}

.event-info dd { margin: .35rem 0 0; font-size: .9375rem; }
.rsvp {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.15fr);
  gap: clamp(2.2rem, 5vw, 4.2rem);
  padding: 3.75rem 0 3rem;
  border-block: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

h2 { margin: .7rem 0 1.1rem; font-size: clamp(3rem, 4.7vw, 3.9rem); line-height: .97; letter-spacing: -.04em; }
.rsvp-copy { max-width: 21rem; }
.rsvp-copy > p:last-child { color: var(--muted); margin: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.2rem; margin-bottom: 1.3rem; }
.form-wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .7rem; }
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1px solid #545048;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}

select:disabled { opacity: .55; }
textarea { min-height: 88px; resize: vertical; }
.form-help, .form-status { margin: .55rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.form-status { color: var(--gold); }
.form-status:empty { margin: 0; }
.rsvp-confirmation {
  align-self: start;
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--gold);
  outline: none;
}

.site-footer { padding-block: 1.35rem; color: var(--muted); font-size: .75rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.admin-main { padding-block: clamp(2.5rem, 6vw, 5rem); }
.admin-main h1 { margin-top: 0; font-size: clamp(3.4rem, 7vw, 5.5rem); }
.guest-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: .75rem;
  margin: 2rem 0;
}

.guest-totals div, .empty-list, .admin-notice {
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.guest-totals dt, .guest-email, .empty-list { color: var(--muted); }
.guest-totals dd { margin: .15rem 0 0; color: var(--gold); font: 2rem/1.15 var(--serif); }
.guest-table { overflow: auto; }
.guest-table table { width: 100%; min-width: 46rem; border-collapse: collapse; text-align: left; }
.guest-table th, .guest-table td { padding: .75rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.guest-table thead th { color: var(--gold); font-size: .875rem; }
.guest-table tbody th { font-weight: 600; }
.guest-email { display: block; font-size: .875rem; font-weight: 400; overflow-wrap: anywhere; }
.guest-notes { max-width: 15rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-notice { color: var(--gold); }
.admin-pages { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.text-button {
  padding: .35rem 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 800px) {
  .page-width { width: min(100% - 2.5rem, 600px); }
  .hero, .rsvp { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.45rem, 12vw, 6.2rem); }
  .rsvp { padding-block: 3rem; }
}

@media (max-width: 460px) {
  .header-caption { max-width: 12rem; font-size: .65rem; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
