/* Wait It Out Studios — shared styles
   Dark brand palette: navy background, cream text, gold actions.
   Fonts: Lilita One (headings), IBM Plex Sans (body). Files go in /fonts.
   Until they are added, the fallback stacks are used. */

@font-face {
  font-family: "Lilita One";
  src: url("../fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --bg: #0f2246;
  --panel: #1a3566;
  --panel-deep: #0b1a38;
  --text: #fdeac2;
  --muted: #d3c6a6;
  --gold: #feba24;
  --gold-hover: #ffcd5c;
  --on-gold: #0f2246;
  --red: #dd1233;
  --red-text: #ff5a5f;
  --line: rgba(253, 234, 194, 0.18);

  --led: #ff5a5f;
  --led-dim: #3a1a2a;
  --ticket: #fdeac2;

  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 20px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hover); text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--on-gold); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }

.brand {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { color: var(--text); text-decoration: none; }

.brand-mark { width: 28px; height: 28px; background: var(--gold); border-radius: 7px; display: grid; place-items: center; }
.brand-mark svg { width: 17px; height: 17px; }
.brand-mark path { stroke: var(--on-gold); }

.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 0.97rem; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Hero ---------- */

.hero { padding: 36px 0 64px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }

.hero h1, .page h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0 0 22px;
  max-width: 14ch;
}

.lede { font-size: 1.2rem; line-height: 1.5; max-width: 38ch; margin: 0 0 28px; color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease-out, background-color 140ms ease-out;
}
.btn:hover { background: var(--gold-hover); color: var(--on-gold); text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-quiet { background: transparent; color: var(--gold); border: 2px solid var(--gold); padding: 12px 24px; }
.btn-quiet:hover { background: var(--gold); color: var(--on-gold); }

.btn-small { padding: 10px 22px; min-height: 44px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin: 14px 0 0; color: var(--muted); font-size: 0.97rem; }

.ticket-button {
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 14px;
  display: block;
}
.ticket-button:hover { color: var(--gold-hover); }
.ticket-button:disabled { opacity: 0.6; cursor: default; text-decoration: none; }

/* ---------- Board ---------- */

.board {
  background: #170c0b;
  border: 10px solid var(--panel-deep);
  border-radius: 14px;
  padding: 22px 22px 26px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 0 0 2px rgba(253, 234, 194, 0.12);
}
.board-label { font-family: var(--mono); font-size: 0.92rem; color: var(--muted); margin: 0 0 14px; display: flex; justify-content: space-between; gap: 12px; }

.digits { height: 110px; display: flex; gap: 12px; justify-content: space-between; padding: 0 10%; }
.digit { height: 100%; width: auto; aspect-ratio: 56 / 100; }
.seg { fill: var(--led-dim); transition: fill 120ms ease-out; }
.seg.on { fill: var(--led); filter: drop-shadow(0 0 5px rgba(255, 90, 95, 0.6)); }

.slot { height: 8px; background: #000; border-radius: 4px; margin: 22px auto 0; width: 88%; }

.ticket-stage { position: relative; height: 0; overflow: visible; }
.ticket {
  position: relative;
  z-index: 2;
  width: 76%;
  margin: -4px auto 0;
  background: var(--ticket);
  color: var(--on-gold);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.45;
  padding: 16px 18px 20px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  clip-path: polygon(0 0, 100% 0, 100% 96%, 95% 100%, 90% 96%, 85% 100%, 80% 96%, 75% 100%, 70% 96%, 65% 100%, 60% 96%, 55% 100%, 50% 96%, 45% 100%, 40% 96%, 35% 100%, 30% 96%, 25% 100%, 20% 96%, 15% 100%, 10% 96%, 5% 100%, 0 96%);
  transform-origin: top center;
}
.ticket[hidden] { display: none; }
.ticket.print { animation: print 260ms ease-out both; }
@keyframes print {
  from { transform: translateY(-14px) scaleY(0.9); opacity: 0; }
  to   { transform: translateY(0) scaleY(1); opacity: 1; }
}
.ticket strong { font-size: 1.05rem; }
.ticket p { margin: 0 0 4px; }
.ticket p:last-child { margin: 0; }

.board-wrap { padding-bottom: 150px; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; border-top: 1px solid var(--line); }

.section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  line-height: 1.05;
  margin: 0 0 12px;
}
.section .intro { max-width: 52ch; color: var(--muted); margin: 0 0 36px; }

/* Game cards */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }

.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 4.4vw, 1.9rem); line-height: 1.1; margin: 0; }
.card p { margin: 0; }
.card .joke { color: var(--muted); font-style: italic; }
.card .actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.small-link { font-size: 0.95rem; }

.plate {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--panel-deep);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 4px;
}

/* Prose */

.prose { max-width: 60ch; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--body); font-weight: 700; font-size: 1.1rem; margin: 1.4em 0 0.5em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }

/* Inner pages */

.page { padding: 28px 0 80px; }
.page h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.page .lede { max-width: 44ch; }
.crumb { font-size: 0.95rem; margin: 0 0 22px; }

.panel { background: var(--panel); border-radius: 12px; padding: 22px 24px; margin: 28px 0; max-width: 60ch; }
.panel p { margin: 0 0 0.6em; }
.panel p:last-child { margin: 0; }

.todo { background: var(--gold); color: var(--on-gold); padding: 0 6px; border-radius: 3px; font-family: var(--mono); font-size: 0.95em; }

/* Footer */

.site-footer { background: var(--panel-deep); color: var(--muted); padding: 40px 0 48px; font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-small { margin: 0; }

/* ---------- Hidden second queue ---------- */

.q2-title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6.4vw, 3.4rem); line-height: 1.05; margin: 0 0 20px; max-width: 16ch; }
.q2-wait { font-size: 1.1rem; margin: 0 0 14px; }
.progress { height: 14px; background: var(--panel-deep); border: 2px solid var(--panel); border-radius: 999px; overflow: hidden; max-width: 420px; }
.progress-fill { height: 100%; width: 0; background: var(--gold); transition: width 900ms linear; }
.q2-status { min-height: 3em; margin: 10px 0 20px; color: var(--muted); max-width: 40ch; }
.q2-small { margin: 18px 0 0; font-size: 0.95rem; color: var(--muted); max-width: 42ch; }
.page .hero-grid { padding-top: 12px; }

/* ---------- 404 ---------- */

.lost { text-align: left; padding: 40px 0 20px; }

/* ---------- Wider screens ---------- */

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .hero { padding: 56px 0 80px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 940px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 420px) {
  .digits { height: 88px; gap: 9px; }
  .board { padding: 18px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticket.print { animation: none; }
  .btn, .seg, .progress-fill { transition: none; }
}

.snail { width: 120px; height: 120px; border-radius: 24px; margin: 0 0 22px; }
@media (min-width: 760px) { .snail { width: 140px; height: 140px; } }
