﻿/* themes/home.css: the site homepage. Graphite like the rest of the site; colour lives only in the timeline bars
   and the game art. Standalone: the homepage does not load core.css or a game theme. */
:root {
  --bg: #121213;
  --panel: #18181a;
  --raise: #222224;
  --line: rgba(237, 237, 237, .09);
  --line-2: rgba(237, 237, 237, .16);
  --fg: #ededed;
  --fg-2: #c9c9cd;
  --muted: #a1a1a6;
  --white: #f4f4f6;
  --font-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --lab: 160px;           /* timeline: game name column */
  --cnt: 184px;           /* timeline: count column */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--fg); font: 16px/1.55 var(--font-body); }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.visually-hidden, .scrub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 56px max(24px, env(safe-area-inset-right, 0px)) 72px max(24px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; }

/* ---- catch-up: headline, then the timeline ---- */
.catchup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.since, .games, .soon { min-width: 0; }
.lede { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
h1 { font-weight: 500; font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.02em; max-width: 17ch; text-wrap: balance; }
.intro { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 46ch; padding-bottom: 6px; }

.since { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px 24px 20px; }
.since-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 20px; font-weight: 500; }
.since-pick select {
  appearance: none; -webkit-appearance: none; font: inherit; color: var(--fg); cursor: pointer;
  background: var(--raise) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23a1a1a6' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 32px 4px 12px; line-height: 1.4;
}
.since-pick select:hover { border-color: rgba(237, 237, 237, .3); }
.since-pick option { background: var(--raise); color: var(--fg); }

.chart { --pos: 50%; display: grid; gap: 12px; margin-top: 20px; user-select: none; -webkit-user-select: none; }
.lane { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr) var(--cnt); gap: 20px; align-items: center; }
.lane-name { display: flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; min-width: 0; }
.lane-name:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lane-logo { width: 20px; height: 20px; object-fit: contain; flex: none; }
.lane-track { position: relative; display: block; height: 40px; cursor: ew-resize; touch-action: pan-y; }
.lane-bars { display: block; width: 100%; height: 100%; fill: color-mix(in srgb, var(--game) 72%, #fff); }
.lane-bars rect { opacity: .6; }
.lane-bars rect.maj { opacity: 1; }
.lane-bars .lane-rule { fill: var(--line-2); opacity: 1; }
/* before you left: dimmed. The white bar is the marker, the same mark as the logo */
.lane-track::before { content: ''; position: absolute; inset: -2px auto -2px 0; width: var(--pos); background: rgba(24, 24, 26, .8); }
.lane-track::after { content: ''; position: absolute; top: -8px; bottom: -8px; left: var(--pos); width: 3px; margin-left: -1.5px; border-radius: 1px; background: var(--white); }
.chart:focus-within .lane-track::after { box-shadow: 0 0 0 3px rgba(244, 244, 246, .28); }
.lane-count { color: var(--muted); font-size: 14px; text-align: right; white-space: nowrap; }
.lane-count b { color: var(--fg); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; margin-right: 2px; }

.axis { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr) var(--cnt); gap: 20px; }
.axis-track { grid-column: 2; position: relative; height: 20px; cursor: ew-resize; touch-action: pan-y; }
.axis-track span { position: absolute; top: 0; padding-left: 4px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
/* the "You left" tag sits on top of the marker: placed first in the grid, above the lanes */
.tag-row { order: -1; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr) var(--cnt); gap: 20px; height: 16px; }
.tag-track { grid-column: 2; position: relative; }
.tag { position: absolute; bottom: 2px; left: var(--pos); transform: translateX(-50%); padding: 0 6px; border-radius: 4px;
  background: var(--white); color: #121213; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.since-hint { margin-top: 16px; color: var(--muted); font-size: 14px; }
.chart:not(.live) ~ .since-hint { display: none; }

/* ---- game cards ---- */
/* CARD RULE: every card is the same size. Same column width, six 16:9 tiles (3 x 2), cards in a row stretch to the
   tallest, and the buttons sit on one line at the bottom whatever the text length. */
.games h2, .soon h2 { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 16px; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.game { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.game-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #0c0c0d; }
.game-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: filter .15s ease; }
.game-art:hover img { filter: brightness(1.06); }
.game-body { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.game-blurb { margin-top: 8px; }
.game-nums { margin-top: 20px; }
.game-note { margin-top: 16px; }
.game-go { margin-top: auto; padding-top: 24px; }
.game-head { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.game-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.game h3 { font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.game h3 a { text-decoration: none; }
.game h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.game-blurb { color: var(--fg-2); max-width: 52ch; }
.game-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.game-nums div { display: flex; flex-direction: column-reverse; gap: 2px; min-width: 0; }
.game-nums dd { font-size: 32px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.game-nums dt { color: var(--muted); font-size: 14px; line-height: 1.3; }
.game-note { color: var(--fg-2); font-size: 15px; }
.game-go { display: grid; gap: 12px; }
.btn { justify-self: start; display: inline-block; line-height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 500; text-decoration: none; transition: background-color .15s ease; }
/* section buttons: a real icon from the section, its name and what is inside */
.game-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sec { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--raise); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.sec:hover { border-color: var(--line-2); background: #262629; }
.sec-pic { flex: none; display: grid; place-items: center; width: 48px; height: 36px; overflow: hidden; border-radius: 6px; background: #131314; }
.sec-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sec-heroes .sec-pic img { width: 100%; height: 100%; object-fit: cover; }
.sec-maps .sec-pic img { max-height: 30px; }
.sec-txt { display: grid; min-width: 0; line-height: 1.3; }
.sec-txt b { font-weight: 500; }
.sec-txt span { color: var(--muted); font-size: 13px; }
.sec-go { flex: none; width: 12px; height: 12px; margin-left: auto; color: var(--muted); }
.sec:hover .sec-go { color: var(--fg); }

/* each game's colour lives in one place: the button into that game (same accent as its own pages). The art carries
   the rest of its identity; the card itself stays graphite like the page. A new game adds one line here. */
.game { --c-accent: var(--fg); --c-on: #121213; --c-hover: #fff; }
.game-dota2 { --c-accent: #b3121d; --c-on: #fff; --c-hover: #c71a26; }
.game-cs2 { --c-accent: #f5d300; --c-on: #111213; --c-hover: #ffe14d; }
.btn { background: var(--c-accent); color: var(--c-on); }
.btn:hover { background: var(--c-hover); }

/* ---- coming next ---- */
.soon ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.soon li { display: grid; gap: 2px; padding: 16px 0; border-top: 1px solid var(--line); }
.soon b { font-weight: 500; }
.soon span { color: var(--muted); font-size: 15px; }

.foot { max-width: 1200px; margin: 0 auto; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 48px max(24px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); }

@media (max-width: 960px) {
  .lede { grid-template-columns: 1fr; gap: 16px; }
  .game-grid { grid-template-columns: 1fr; max-width: 640px; }
}
@media (max-width: 720px) {
  .wrap { padding-top: 40px; padding-bottom: 56px; gap: 56px; }
  .catchup { gap: 24px; }
  .intro { font-size: 17px; }
  .since { padding: 20px 16px 16px; border-radius: 12px; margin: 0 -8px; }
  .since-pick { font-size: 18px; }
  .chart { gap: 8px; margin-top: 20px; }
  .lane { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .lane-track { grid-column: 1 / -1; height: 32px; margin-bottom: 8px; }
  .lane-count { grid-row: 1; grid-column: 2; }
  .lane-count b { font-size: 18px; }
  .axis { grid-template-columns: 1fr; }
  .axis-track, .tag-track { grid-column: 1; }
  .tag-row { grid-template-columns: 1fr; }
  .axis-track .odd { display: none; }
  .game-body { padding: 20px; }
  .game h3 { font-size: 24px; }
  .game-nums dd { font-size: 26px; }
  .soon ul { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .game-links { grid-template-columns: 1fr; }
  .btn { justify-self: stretch; text-align: center; }
  .game-nums { gap: 12px; }
  .game-nums dt { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.game-blurb a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.game-blurb a:hover { text-decoration-color: currentColor; }
