/* ============================================================
   11 — Event · "Trail Pass"
   The page is the ticket. Perforated stub, countdown, punch-out sessions.
   Fonts: Bebas Neue (display) + JetBrains Mono (data).
   ============================================================ */

@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/fonts/BebasNeue-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #12241C;
  --ticket: #FDFBF4;
  --ticket-2: #F2EDDF;
  --perf: #12241C;
  --ink: #1A2620;
  --muted: #5A6A61;
  --trail: #C04620;        /* 4.72:1 on the ticket -- 4.50 rounded under */
  --trail-light: #DE6C48;  /* 4.51:1 on the dark page ground */
  --moss: #2F7A54;

  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* The UA's `[hidden] { display: none }` loses to any author `display` rule
   below, and every demo here toggles `element.hidden` to show and hide
   panels. Without this, hiding silently stops working. */
[hidden] { display: none !important; }

/* A long unbroken token -- a pasted URL, a 200-character "word" -- must wrap
   rather than push its container past its grid track and break the row.
   `anywhere` rather than `break-word` on purpose: only `anywhere` reduces the
   element's min-content width, and a grid or flex item defaults to
   `min-width: auto`, which refuses to shrink below its longest word. With
   `break-word` alone, demo-06 and demo-10 still blew 1.4k px past the viewport.
   The `min-width: 0` below is the other half of the same fix. */
h1, h2, h3, h4, p, li, a, span, strong, em, code, label, time,
button, input, textarea { overflow-wrap: anywhere; }
.card, .post, .listing, .idea, .topic, .question, .profile-card, .submission,
.lesson, .resource, .nominee, .archive-item, .member-card, .comment, .reply,
.answer, .idea-body-wrap { min-width: 0; }


body {
  margin: 0;
  padding-block-end: 80px;
  background: var(--bg);
  background-image:
    repeating-linear-gradient(120deg, rgba(255,255,255,0.017) 0 2px, transparent 2px 9px);
  color: var(--ticket);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

.wrap { max-width: 780px; margin-inline: auto; padding: 0 20px; }

h1, h2, h3 { margin: 0; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: var(--trail-light); }

:focus-visible { outline: 2px solid var(--trail); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar {
  padding-block: clamp(38px, 6vw, 66px) 22px;
  display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: space-between; align-items: flex-end;
}
.topbar h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.8vw, 74px);
  line-height: 0.9;
  letter-spacing: 0.008em;
  text-transform: uppercase;
  max-width: 13ch;
}
.topbar > div > p { color: #A9BCB1; max-width: 46ch; margin-top: 12px; font-size: 14px; }

.identity-picker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #A9BCB1; }
.identity-picker select {
  font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none;
  margin-left: 6px; min-height: 44px; padding: 9px 12px;
  background: var(--ticket); color: var(--ink);
  border: 0; border-radius: 4px;
}

/* ---------- The ticket ---------- */

.event-card {
  position: relative;
  background: var(--ticket);
  color: var(--ink);
  border-radius: 10px;
  padding: 30px 32px 34px;
  box-shadow: 0 40px 70px -44px rgba(0,0,0,0.85);
}

/* Perforation across the ticket, just under the RSVP row. The line and both
   notches hang off the same heading, so they stay aligned at any width
   without JS measuring anything. */
.event-card > h3:first-of-type {
  position: relative;
  margin-top: 38px;
  padding-top: 32px;
  /* Bleed to the card edges so the perforation crosses the whole ticket,
     then pad the text back to where it was. */
  margin-inline: -32px;
  padding-inline: 32px;
  background-image: radial-gradient(circle at 4px 1px, var(--perf) 1.5px, transparent 1.7px);
  background-size: 11px 2px;
  background-repeat: repeat-x;
  background-position: left top;
  background-origin: border-box;
  background-clip: border-box;
}
.event-card > h3:first-of-type::before,
.event-card > h3:first-of-type::after {
  content: "";
  position: absolute; top: -10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg);
}
.event-card > h3:first-of-type::before { left: -11px; }
.event-card > h3:first-of-type::after  { right: -11px; }

.event-card > h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.event-card > h3 {
  font-family: var(--mono); font-weight: 700;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  margin: 30px 0 14px;
}

.event-meta {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 16px;
}
.event-card > p { color: var(--ink); }

/* Countdown block (chrome). */
.countdown {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 20px 0 4px;
}
.countdown-unit {
  background: var(--ticket-2);
  border-radius: 6px;
  padding: 10px 16px;
  min-width: 4.6rem;
  text-align: center;
}
.countdown-value {
  font-family: var(--display);
  font-size: 30px; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--trail);
  display: block;
}
.countdown-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}

.capacity-label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--moss);
  margin: 18px 0 0;
}

.rsvp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.btn {
  font-family: var(--mono); font-size: 12px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.14em; text-transform: uppercase;
  min-height: 44px; padding: 12px 24px;
  background: var(--trail); color: var(--ticket);
  border: 0; border-radius: 5px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -14px var(--trail); }

.btn-ghost {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.12em; text-transform: uppercase;
  min-height: 44px; padding: 11px 18px;
  background: transparent; color: var(--muted);
  border: 1px solid rgba(26,38,32,0.24); border-radius: 5px;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Sessions ---------- */

.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.session {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(26,38,32,0.2);
}
.session:last-child { border-bottom: 0; }
.session-time {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--trail);
  margin: 0;
}
.session-title { font-size: 16px; font-weight: 600; margin: 0; }
.session-speaker {
  grid-column: 2;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 4px 0 0;
}

/* ---------- Attendees ---------- */

.attendee-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.attendee-list li {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: var(--ticket-2); color: var(--ink);
  border-radius: 999px; padding: 8px 15px;
}
.attendee-list li.is-waitlist { background: transparent; color: var(--muted); border: 1px dashed rgba(26,38,32,0.34); }

/* ---------- Toasts ---------- */

.toast-stack { position: fixed; right: 16px; bottom: 88px; display: grid; gap: 8px; z-index: 50; }
.toast {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.05em;
  background: var(--ticket); color: var(--ink);
  border-radius: 5px; padding: 12px 16px;
  box-shadow: 0 18px 38px -20px rgba(0,0,0,0.8);
}
.toast.error { background: var(--trail); color: var(--ticket); }

/* ---------- Motion ---------- */

.motion .session, .motion .countdown-unit { opacity: 0; }

@media (max-width: 560px) {
  .event-card { padding: 24px 20px 28px; }
  .event-card > h3:first-of-type { margin-inline: -20px; padding-inline: 20px; }
  .session { grid-template-columns: 1fr; gap: 2px; }
  .session-speaker { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .motion .session, .motion .countdown-unit { opacity: 1 !important; transform: none !important; }
  .btn { transition: none !important; }
}
