/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #413a38;
  --muted: #7a736f;
  --accent: #361215;
  --accent-dark: #240c0e;
  --accent-light: #f6f1ef;
  --border: #e4dfdc;
  --radius: 2px;
  --max-width: 640px;
  --shadow: none;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Spinnaker, "Avenir Next", "Segoe UI", sans-serif;
  --display: Aboreto, "Avenir Next", sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* ─── Top bar ───────────────────────────────────────────── */
.topbar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  padding: 0.85rem 1rem;
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  color: var(--text);
  padding: 3.25rem 1.5rem 2.25rem;
  text-align: center;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}
.hero-meta {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.meta-sep {
  margin: 0 0.35rem;
}
.hero-sub {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.event-list {
  list-style: none;
  margin: 0 auto 1.75rem;
  max-width: 420px;
}
.event-list li::before {
  content: "- ";
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.99); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 1rem;
}
.btn-large {
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ─── Sections ──────────────────────────────────────────── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
}
.section h2 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 400;
  margin-bottom: 0.85rem;
  margin-top: 1.75rem;
  text-align: left;
}
.section h2:first-child { margin-top: 0; }
.about p + p { margin-top: 0.85rem; }
.about {
  border-top: 1px solid var(--border);
  padding-top: 2.25rem;
}

/* ─── Tickets ───────────────────────────────────────────── */
.section-tickets {
  border-top: 1px solid var(--border);
  padding-top: 2.25rem;
}
.section-tickets h2 { text-align: center; }
.ticket-step {
  max-width: 420px;
  margin: 0 auto;
}
.step-label {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.step-head .step-label {
  margin-bottom: 0.75rem;
}
.undo {
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 0.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.step-hint {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.65rem;
  text-align: center;
}

input[type="email"],
input[type="tel"],
input[type="text"],
input[type="password"],
input[type="search"],
.checkin select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  margin-bottom: 0.75rem;
}
input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Waiver ────────────────────────────────────────────── */
.waiver-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.waiver-box h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.waiver-text {
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding-right: 0.25rem;
}
.waiver-text h4 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin: 0.9rem 0 0.35rem;
}
.waiver-text h4:first-child { margin-top: 0; }
.waiver-text p { margin-bottom: 0.5rem; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* ─── Schedule ─────────────────────────────────────────── */
.schedule {
  list-style: none;
  margin: 0.25rem 0 1rem;
}
.schedule li {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.schedule time {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--accent);
}
.schedule-note {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ─── Class choice ─────────────────────────────────────── */
.slot-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.slot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  cursor: pointer;
}
.slot:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}
.slot input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}
.slot-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
}
.slot-detail {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}
.slot-price {
  color: var(--accent);
  white-space: nowrap;
}

/* ─── Ticket card ──────────────────────────────────────── */
.ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.ticket-price {
  color: var(--accent);
}
.ticket-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.ticket-qty label {
  font-size: 0.95rem;
  color: var(--muted);
}
.ticket-qty select {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
}
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.attendee-label {
  margin: 0.45rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.attendee-fields .name-row { margin-bottom: 0.55rem; }
.attendee-share, #attendee-share { margin-top: 0.85rem; }
.attendee-share a, #attendee-share a { color: var(--accent); }

.apple-pay-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ─── Status boxes ──────────────────────────────────────── */
.status-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
}
.status-box h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.status-box p { color: var(--muted); font-size: 1rem; }

/* ─── Error ─────────────────────────────────────────────── */
.error-msg {
  background: #f8ecec;
  color: #8a3030;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 1rem;
}

/* ─── FAQ ──────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.95rem 0;
  cursor: pointer;
}
.faq summary {
  font-size: 1rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  float: right;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin-top: 0.65rem;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ─── Footer ────────────────────────────────────────────── */
footer {
  background: var(--accent);
  text-align: center;
  padding: 2rem 1.5rem;
  color: #f6f1ef;
  font-family: var(--display);
  letter-spacing: 1.2px;
  font-size: 0.95rem;
}
.footer-sub {
  font-family: var(--sans);
  letter-spacing: 0;
  font-size: 0.9rem;
  margin-top: 0.4rem;
  color: #e6d9d4;
}
.footer-sub a {
  color: inherit;
}

.checkin h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.checkin select {
  width: 100%;
  margin-bottom: 0.75rem;
}
.guest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.guest div { display: flex; flex-direction: column; }
.guest span { color: var(--muted); font-size: 0.9rem; }
.guest .waiver-flag.is-missing { color: #8a3030; }
.copy-waiver { margin-bottom: 0.75rem; }
.guest button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
}
.guest.is-in button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

/* ─── Utilities ─────────────────────────────────────────── */
.hidden { display: none !important; }
