/* The 13Beacons design system, shared by the landing page and the web app.
   Same tokens as Area13/Shared/Theme.swift. Text on orange is always ink (6.1:1); white fails. */

@font-face { font-family: "Bungee"; src: url("../fonts/Bungee-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Creepster"; src: url("../fonts/Creepster-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #07070B;
  --ink2: #100D18;
  --night: #241535;
  --dusk: #3A1E4E;
  --orange: #FD5101;
  --ember: #FF8A3D;
  --beam: #FFC24B;
  --bone: #F5EFE3;
  --bone2: #E9DFC9;
  --rust: #B23A06;
  --line: #000;
  --cactus: #241744;
  --ridge: #3F2B70;
  --muted: rgba(245, 239, 227, 0.62);
  --used: rgba(245, 239, 227, 0.5);
  --absent: #17121F;
  --display: "Bungee", "Arial Black", system-ui, sans-serif;
  --signature: "Creepster", "Bungee", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
/* Increase Contrast / prefers-contrast: faded text fades less. */
@media (prefers-contrast: more) {
  :root { --muted: rgba(245, 239, 227, 0.88); --used: rgba(245, 239, 227, 0.75); }
}

*, *::before, *::after { box-sizing: border-box; }
/* Follows the iPhone's Text Size setting in Safari, and the browser's text size everywhere. */
html { -webkit-text-size-adjust: 100%; }
/* The tilted marquee is wider than the screen on purpose; never let it scroll the page sideways. */
html, body { overflow-x: clip; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--beam); outline-offset: 3px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Eyebrow: Space Mono, wide tracking. */
.eyebrow {
  font-family: var(--mono); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 0.72rem; color: var(--ember); margin: 0;
}

/* Sticker card: white, 3px line, hard offset shadow, slight tilt. */
.sticker {
  background: #fff; color: var(--ink);
  border: 3px solid var(--line); border-radius: 22px;
  box-shadow: 8px 8px 0 var(--line);
}

/* Buttons slide into their shadow when pressed. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: 0.85em 1.4em; min-height: 44px;
  background: var(--orange); color: var(--ink);
  border: 3px solid var(--line); border-radius: 0;
  box-shadow: 6px 6px 0 var(--line);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--line); }
.btn--bone { background: var(--bone); }
.btn--beam { background: var(--beam); }
.btn--small { font-size: 0.8rem; padding: 0.6em 1em; box-shadow: 4px 4px 0 var(--line); }
.btn[aria-disabled="true"], .btn:disabled { cursor: default; background: #c9bfae; box-shadow: 4px 4px 0 var(--line); transform: none; }

/* Icon buttons in dark headers. */
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: rgba(16, 13, 24, 0.85); border: 2px solid rgba(245, 239, 227, 0.3); color: rgba(245, 239, 227, 0.9);
  padding: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:active { transform: scale(0.92); }

/* Sticker labels such as COMING SOON. */
.tag {
  display: inline-block; font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.04em;
  color: var(--ink); background: var(--beam); border: 2.5px solid var(--line);
  box-shadow: 3px 3px 0 var(--line); padding: 0.3em 0.7em; transform: rotate(6deg);
}

/* Tilted orange marquee. */
.marquee {
  position: relative; overflow: hidden; background: var(--orange); color: var(--ink);
  border-top: 3px solid var(--line); border-bottom: 3px solid var(--line);
  transform: rotate(-1.4deg) scaleX(1.06); padding: 0.3rem 0; z-index: 8;
}
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee__strip { display: flex; align-items: center; white-space: nowrap; }
.marquee__item { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.02em; }
.marquee__dot { color: var(--bone); font-size: 0.55rem; padding: 0 0.7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Caution tape for games already finished today. */
.tape {
  position: absolute; left: -12px; right: -12px; top: 50%; height: 30px;
  transform: translateY(-20%) rotate(-5deg);
  background: var(--beam); overflow: hidden; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  border-top: 5px solid; border-bottom: 5px solid;
  border-image: repeating-linear-gradient(135deg, var(--line) 0 5px, var(--beam) 5px 10px) 5;
}
.tape span { font-family: var(--display); font-size: 12px; letter-spacing: 1px; color: var(--ink); white-space: nowrap; }

/* Panels (dialogs): the site's bone bands with a dot grid. */
dialog.panel {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh;
  border-radius: 22px 22px 0 0; color: var(--ink); color-scheme: light;
  background: var(--bone) radial-gradient(rgba(7, 7, 11, 0.06) 1.1px, transparent 1.3px) 0 0 / 11px 11px;
}
dialog.panel:focus, dialog.panel:focus-visible { outline: none; }
@media (min-width: 700px) { dialog.panel { margin: auto; border-radius: 22px; border: 3px solid var(--line); box-shadow: 10px 10px 0 var(--line); } }
dialog.panel::backdrop { background: rgba(7, 7, 11, 0.6); }
.panel__inner { padding: 30px 28px 40px; display: flex; flex-direction: column; gap: 22px; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel__head .eyebrow { color: var(--rust); }
.panel__title { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; margin: 6px 0 0; text-transform: uppercase; }
.panel p, .body-text { margin: 0; color: rgba(7, 7, 11, 0.86); font-size: 1.06rem; line-height: 1.55; }
.panel p.small { font-size: 0.92rem; }

/* Four tilted stat stickers. */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { text-align: center; padding: 14px 4px; border-radius: 14px; box-shadow: 5px 5px 0 var(--line); }
.stat:nth-child(1) { transform: rotate(-2deg); } .stat:nth-child(2) { transform: rotate(1.4deg); }
.stat:nth-child(3) { transform: rotate(-1deg); } .stat:nth-child(4) { transform: rotate(2deg); }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--orange); line-height: 1.2; }
.stat span { font-family: var(--mono); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(7, 7, 11, 0.74); }

/* Game cards */
.cards { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card {
  position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 20px;
  background: var(--bone); color: var(--ink); border: 3px solid var(--line); border-radius: 20px; box-shadow: 7px 7px 0 var(--line);
}
.card__emblem {
  flex: none; width: 58px; height: 58px; display: grid; place-items: center;
  background: var(--orange); color: var(--ink); border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--line); transform: rotate(-3deg);
}
.card__emblem svg { width: 26px; height: 26px; }
.card__kind { color: var(--rust); }
.card__title { font-family: var(--display); font-weight: 400; font-size: 1.45rem; margin: 4px 0 6px; text-transform: uppercase; }
.card__pitch { margin: 0 0 16px; color: rgba(7, 7, 11, 0.74); }
.card--soon { background: var(--ink2); color: var(--bone); border: 2.5px dashed rgba(245, 239, 227, 0.4); box-shadow: none; }
.card--soon .card__emblem { background: var(--ink); color: var(--bone); }
.card--soon .card__kind { color: var(--beam); }
.card--soon .card__pitch { color: rgba(245, 239, 227, 0.75); }
.card__status { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--beam); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--beam); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.card__tag { position: absolute; top: -14px; right: 14px; }


/* Reduce Motion (system setting or the in-app "Still sky"): nothing moves. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
html.still *, html.still *::before, html.still *::after {
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
}
