/* Drift Boss — design tokens taken from the approved mockup (oklch palette,
   Archivo headings / Karla body). */

:root {
  --bg:        oklch(0.16 0.02 262);
  --bg-bar:    oklch(0.19 0.022 262);
  --panel:     oklch(0.20 0.02 262);
  --card:      oklch(0.21 0.02 262);
  --surface:   oklch(0.23 0.02 262);
  --surface-2: oklch(0.25 0.02 262);
  --surface-3: oklch(0.28 0.02 262);
  --line:      oklch(0.28 0.02 262);
  --line-2:    oklch(0.30 0.02 262);
  --dash:      oklch(0.36 0.02 262);

  --text:   oklch(0.97 0.008 250);
  --text-1: oklch(0.90 0.01 250);
  --text-2: oklch(0.84 0.01 250);
  --text-3: oklch(0.80 0.01 250);
  --text-4: oklch(0.72 0.01 250);
  --muted:  oklch(0.66 0.01 250);
  --muted-2: oklch(0.60 0.01 250);

  --accent:      oklch(0.72 0.17 265);
  --accent-soft: oklch(0.78 0.15 265);
  --accent-lift: oklch(0.86 0.12 265);
  --accent-ink:  oklch(0.16 0.03 265);
  --cta:      oklch(0.78 0.16 150);
  --cta-hover: oklch(0.84 0.16 150);
  --cta-ink:  oklch(0.18 0.03 150);
  --gold:     oklch(0.82 0.15 85);

  --head: Archivo, system-ui, sans-serif;
  --body: Karla, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 980px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent-lift); }

h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(28px, 5vw, 40px); line-height: 1.05; letter-spacing: -0.03em; text-wrap: pretty; }
h2 { font-weight: 700; font-size: clamp(20px, 3vw, 24px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(12px, 3vw, 24px); height: 64px;
  background: var(--bg-bar); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); flex-shrink: 0; }
.brand .name { font-family: var(--head); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

.nav { display: flex; gap: 2px; flex-shrink: 0; }
.nav a {
  padding: 8px 14px; border-radius: 8px;
  font-weight: 700; font-size: 14px; color: var(--text-1);
}
.nav a:hover { background: var(--surface); color: var(--text-1); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--text); }

.spacer { flex: 1; }
.badge-note {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; background: var(--surface);
  font-size: 13px; color: var(--text-4); font-family: var(--mono); white-space: nowrap;
}

/* ---------- ad slots ---------- */
.ad {
  border-radius: 10px; border: 1px dashed var(--dash);
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--panel) 0 10px, oklch(0.22 0.02 262) 10px 20px);
  color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-align: center;
}
.ad-top { width: 100%; max-width: 1160px; height: 90px; flex-shrink: 0; }
.ad-top-wrap { display: flex; justify-content: center; padding: 14px clamp(12px, 3vw, 24px) 0; }
.ad-rail { position: sticky; top: 88px; width: 180px; height: 600px; writing-mode: vertical-rl; }
.ad-rail.left { justify-self: end; }
.ad-rail.right { justify-self: start; }
.ad-inline { width: 100%; height: 100px; }
.ad-article { width: 100%; height: 280px; }

/* ---------- shell ---------- */
.shell {
  display: grid; grid-template-columns: minmax(0, var(--shell));
  justify-content: center; gap: 24px; align-items: start;
  padding: 24px; max-width: 1900px; margin: 0 auto;
}
.shell > main {
  width: 100%; max-width: var(--shell); justify-self: center;
  display: flex; flex-direction: column; gap: 40px;
}
/* no ad rails -> single centred column at every width */
.shell.no-rails { grid-template-columns: minmax(0, var(--shell)); }
.ad-rail { display: none; }

@media (min-width: 1300px) {
  .shell { grid-template-columns: 180px minmax(0, var(--shell)) 180px; }
  .shell.no-rails { grid-template-columns: minmax(0, var(--shell)); }
  .ad-rail { display: flex; }
}
@media (max-width: 900px) {
  /* the note is the first thing to go — the nav must never clip */
  .badge-note { display: none; }
}
@media (max-width: 639px) {
  .shell { padding: 14px 12px; }
  .site-header { gap: 10px; }
  .brand .name { font-size: 17px; }
  .nav a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 400px) {
  .brand .name { display: none; }
}

/* Section gap must stay clearly larger than the gaps *inside* a section
   (grid row-gap 14px), otherwise the second row of game tiles reads as if it
   belonged to the block below it. */
.stack { display: flex; flex-direction: column; gap: 40px; }
.section { display: flex; flex-direction: column; gap: 16px; }
.lede {
  margin: 0; line-height: 1.6; color: var(--text-3);
  max-width: 70ch; font-size: clamp(15px, 2vw, 17px); text-wrap: pretty;
}

/* ---------- play panel ---------- */
.play-panel {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--panel);
}
.play-stage {
  position: relative; width: 100%;
  background: radial-gradient(120% 120% at 50% 0%, oklch(0.28 0.05 265) 0%, oklch(0.18 0.02 262) 70%);
}
/* 16:9 via padding spacer, same reason as the tiles above */
.play-stage::before { content: ""; display: block; width: 100%; padding-top: 56.25%; }
.play-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.play-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-4);
}
.play-bar .game-name { font-weight: 700; color: var(--text-1); }
.play-bar button {
  padding: 6px 12px; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text-2);
  font-family: var(--body); font-weight: 700; font-size: 13px;
}
.play-bar button:hover { background: var(--surface-3); }

/* ---------- splash (embed page) ---------- */
.splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(120% 120% at 50% 0%, oklch(0.28 0.05 265) 0%, oklch(0.18 0.02 262) 70%);
}
.splash .cube {
  width: 88px; height: 88px; border-radius: 24px; background: var(--accent);
  box-shadow: 0 18px 50px oklch(0.72 0.17 265 / 0.35);
  background-size: cover; background-position: center;
}
.splash .play-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px clamp(22px, 5vw, 34px); border: 0; border-radius: 12px; cursor: pointer;
  background: var(--cta); color: var(--cta-ink);
  font-family: var(--head); font-weight: 800; font-size: 22px; letter-spacing: 0.01em;
}
.splash .play-btn:hover { background: var(--cta-hover); }
.splash .note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.frame-full { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- two-column text ---------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.col p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-3); }

.rows { display: flex; flex-direction: column; gap: 8px; }
.ctl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; background: var(--card); }
.ctl .key {
  min-width: 96px; padding: 5px 10px; border-radius: 6px; background: var(--surface-3);
  font-family: var(--mono); font-size: 12px; text-align: center;
}
.ctl .what { font-size: 15px; color: var(--text-2); }

.tips { display: flex; flex-direction: column; gap: 10px; }
.tip { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card); }
.tip .n { font-family: var(--head); font-weight: 800; font-size: 15px; color: var(--cta); }
.tip .text { font-size: 15px; line-height: 1.55; color: var(--text-2); }

.article p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--text-3); }

/* ---------- game grids ---------- */
.grid-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.grid-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

.tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.tile:hover { color: var(--text); }
.tile:hover .shot img { transform: scale(1.05); }
/* Thumbnail ratio is done with a padding spacer, NOT `aspect-ratio`.
   Safari mis-measures an aspect-ratio box nested inside a grid item: the grid
   row gets a smaller height than its contents, so the second row of tiles
   overflows the section and lands on top of whatever follows it (FAQ).
   A percentage-padding spacer gives the row a definite height everywhere. */
.tile .shot {
  position: relative; border-radius: 11px; overflow: hidden; background: var(--surface);
}
.tile .shot::before { content: ""; display: block; width: 100%; }
.grid-similar .shot::before { padding-top: 100%; }   /* 1:1 */
.grid-catalog .shot::before { padding-top: 75%; }    /* 4:3 */
.tile .shot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .2s ease;
}
.tile .t { font-size: 14px; font-weight: 700; color: var(--text-1); }
.grid-catalog .tile .t { font-size: 15px; }
.tile .g { font-size: 13px; color: oklch(0.68 0.01 250); }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--body); font-size: 14px; font-weight: 700;
  background: var(--surface); color: var(--text-2);
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- faq ---------- */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border-radius: 10px; background: var(--card); overflow: hidden; }
.faq summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; font-weight: 700; font-size: 16px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 18px; margin-left: auto; }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 16px 16px; font-size: 15px; line-height: 1.6; color: var(--text-3); }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.review { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 11px; background: var(--card); }
.review .stars { color: var(--gold); font-size: 14px; letter-spacing: 0.15em; }
.review p { margin: 0; font-size: 15px; line-height: 1.55; color: oklch(0.86 0.01 250); }
.review .by { font-size: 13px; color: var(--muted); font-family: var(--mono); }

/* ---------- prose (privacy) ---------- */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 75ch; }
.prose h2 { font-size: 20px; }
.prose p { margin: 0; font-size: 16px; line-height: 1.65; color: oklch(0.82 0.01 250); }
.prose .stamp { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 20px; border-top: 1px solid var(--line); background: var(--bg-bar); }
.site-footer .inner {
  max-width: 1160px; margin: 0 auto; padding: 28px clamp(14px, 3vw, 24px);
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}
.site-footer .about { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.site-footer .about .name { font-family: var(--head); font-weight: 800; font-size: 18px; }
.site-footer .about .line { font-size: 14px; color: var(--text-4); line-height: 1.6; }
.site-footer .links { display: flex; gap: 20px; font-size: 14px; }
.site-footer .links a { color: var(--text-3); }
.site-footer .copy {
  border-top: 1px solid oklch(0.24 0.02 262); padding: 14px 24px; text-align: center;
  font-family: var(--mono); font-size: 12px; color: var(--muted-2);
}

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-soft); }
.crumbs > * + *::before { content: "/"; margin-right: 8px; color: var(--surface-3); }
.crumbs span[aria-current] { color: var(--text-3); }

/* ---------- share row ---------- */
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-right: 4px;
}
.share-btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text-2);
  font-family: var(--body); font-size: 13px; font-weight: 700; cursor: pointer;
}
.share-btn:hover { background: var(--surface); color: var(--text); border-color: var(--line-2); }

/* ---------- 404 ---------- */
.btn-link {
  display: inline-block; margin-right: 10px; padding: 12px 22px; border-radius: 11px;
  background: var(--cta); color: var(--cta-ink); font-family: var(--head);
  font-weight: 800; font-size: 16px;
}
.btn-link:hover { background: var(--cta-hover); color: var(--cta-ink); }
.btn-link.ghost { background: var(--surface); color: var(--text-2); }
.btn-link.ghost:hover { background: var(--surface-3); color: var(--text); }
