:root {
  --ink: #243c44;
  --ink-soft: #3d5660;
  --rust: #ae6c38;
  --rust-dark: #8f5528;
  --tan: #c8925e;
  --paper: #f6f1e6;
  --card: #fbf8f1;
  --line: #243c44;
  --radius: 14px;
  --shadow: 4px 4px 0 var(--ink);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .14  0 0 0 0 .23  0 0 0 0 .27  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>");
  --crosshair: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><g fill='none' stroke='%23f6f1e6' stroke-width='4' stroke-linecap='round'><circle cx='20' cy='20' r='9'/><path d='M20 2v10M20 28v10M2 20h10M28 20h10'/></g><g fill='none' stroke='%23ae6c38' stroke-width='2' stroke-linecap='round'><circle cx='20' cy='20' r='9'/><path d='M20 2v10M20 28v10M2 20h10M28 20h10'/></g><circle cx='20' cy='20' r='1.6' fill='%23243c44'/></svg>") 20 20, crosshair;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rust-dark); }

.visually-hidden, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

/* ---------- masthead */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px 8px;
}
.logo {
  width: min(420px, 82vw);
  mix-blend-mode: multiply;
}
.when {
  margin: 14px 0 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: clamp(15px, 2.4vw, 19px);
}
.when b { font-weight: inherit; white-space: nowrap; }
.when .dot { color: var(--rust); padding: 0 .45em; }
@media (max-width: 560px) {
  .when b { display: block; }
  .when .dot { display: none; }
}

/* ---------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 15px;
  color: var(--paper);
  background: var(--rust);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.btn:hover { background: var(--rust-dark); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); }
.btn-ink:hover { background: #172a31; }
.btn-big { font-size: 17px; padding: 15px 28px; width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.small-link {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--rust-dark);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- the range */
.range-wrap { margin: 8px 0 0; }
.range {
  position: relative;
  width: 100%;
  min-height: 220px;
  cursor: var(--crosshair);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, rgba(200,146,94,.08), rgba(200,146,94,.2));
}
.range:focus-visible { outline-offset: -4px; }
.range canvas { display: block; cursor: var(--crosshair); }
.mute {
  position: absolute;
  right: calc(var(--post-inset, 20px) + 14px);
  bottom: 12px;
  z-index: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  cursor: pointer;
}
.mute .x { display: none; }
.mute[aria-pressed="true"] .x { display: inline; }
.mute[aria-pressed="true"] .waves { display: none; }

/* ---------- content */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 36px 0 12px;
}
.fact {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}
.fact h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rust);
}
.fact p { margin: 0 0 6px; }
.fact strong { font-weight: 700; font-size: 18px; }

.block { margin: 56px 0; }

.section-title {
  margin: 0 0 18px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 10px;
  background: var(--rust);
  border-radius: 3px;
}
.lede { margin: -4px 0 22px; max-width: 60ch; font-size: 18px; }

.format-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: start;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; font-size: 18px; }
.steps .num {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--rust);
  color: var(--paper);
  font-weight: 900;
  font-size: 24px;
  box-shadow: 2px 2px 0 var(--ink);
}
.steps strong { font-weight: 800; }

.table-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption {
  text-align: left;
  padding: 14px 18px 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rust);
}
th, td { padding: 10px 18px; text-align: right; }
th:first-child { text-align: left; }
thead th {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}
tbody tr + tr td, tbody tr + tr th { border-top: 1px dashed rgba(36,60,68,.3); }
tbody th { font-weight: 800; }
tfoot th, tfoot td {
  font-weight: 800;
  background: var(--ink);
  color: var(--paper);
}

.map {
  margin: 0;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map img { width: 100%; }
.map figcaption {
  padding: 12px 18px;
  font-size: 15px;
  border-top: 2px solid var(--ink);
}

.gear-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--tan);
  background-image: var(--grain);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}
.gear-card .section-title { font-size: clamp(24px, 4vw, 32px); }
.gear-card .section-title::after { background: var(--ink); }
.gear-card p { margin: 0; max-width: 52ch; }

/* ---------- form */
.rsvp, .rsvp-done {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 640px;
}
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}
.opt { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="number"], textarea {
  width: 100%;
  font: inherit;
  font-size: 17px; /* 16px+ keeps iOS from zooming */
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 11px 13px;
}
input[type="number"] { max-width: 120px; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--tan); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: #b23a2a; background: #fff6f3; }

.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  background: #fff;
}
.choice input:checked + span { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--rust); outline-offset: 2px; }

.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbe9e3;
  border: 2px solid #b23a2a;
  color: #7c2416;
  font-weight: 600;
}

.rsvp-done h3 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.rsvp-done p { margin: 0 0 14px; }

.foot {
  text-align: center;
  padding: 36px 16px 48px;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 2px solid var(--ink);
  margin-top: 64px;
}
.foot p { margin: 0; }

/* ---------- small screens */
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .format-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .block { margin: 44px 0; }
  .mute { padding: 6px; bottom: 10px; }
  .mute span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gear-card { flex-direction: column; align-items: stretch; padding: 20px; }
  .gear-card .btn { width: 100%; }
  th, td { padding: 9px 12px; }
  .rsvp, .rsvp-done { padding: 18px; }
  .steps li { font-size: 17px; }
}
