/* landing.css - the website around the game: the landing (/, with home.css), /rankings, /u/<name>, the 404 page.
   Near black, gold and a violet glow, Anton over Figtree (recomp/fonts, SIL OFL): the top bar, the footer, buttons,
   the page head of the inner pages, panels, the "Back" link. Every picture is the game's own art, served from the
   game data volume at run time (/media/*, online/server/site.go), never from git. */
@font-face { font-family: Anton; src: url(fonts/Anton-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/Figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #07070a; --bg-2: #0e0d13; --raise: #121118; --ink: #f3f1ec; --soft: #d6d3dd; --muted: #aeacb9; --line: #ffffff1c;
  --accent: #ffc94d; --accent-hi: #ffe08f; --on-accent: #1d1400; --violet: #8f6dff; --bad: #ffb4a6;
  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --body: Figtree, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1); --max: 1320px; --gutter: 16px; --bar: 72px;
}
@media (min-width: 760px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, figure, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
picture { display: contents; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico.solid { fill: currentColor; stroke: none; }
.hot { color: var(--accent); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none;
  font: 800 13px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; transition: background-color .3s, color .3s, transform .5s var(--ease); }
.btn .ico { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn.solid { background: var(--accent); color: var(--on-accent); }
.btn.solid:hover { background: var(--accent-hi); }
.btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 1px #f3f1ec80; background: #07070a33; }
.btn.ghost:hover { background: #f3f1ec1a; }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 12px; letter-spacing: .18em; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- the top bar: fixed over the landing's hero, sticky and solid on the other pages ---- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; background: linear-gradient(180deg, #07070ae6, #07070a00); }
.top.solid { position: sticky; top: 0; background: #07070af0; box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar { position: relative; display: flex; align-items: center; gap: 16px; height: var(--bar); padding: 0 var(--gutter); max-width: 1680px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 15px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; }
.nav { display: none; gap: 34px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; opacity: .8; transition: opacity .3s, color .3s; }
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; color: var(--accent); }
.pill { display: inline-flex; align-items: center; min-height: 40px; margin-left: auto; padding: 0 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px #f3f1ec99; text-decoration: none; white-space: nowrap;
  font-weight: 800; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; transition: background-color .3s, color .3s; }
.pill:hover { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (min-width: 760px) { .nav { display: flex; position: absolute; left: 50%; transform: translateX(-50%); } }
/* the phone menu (the centred links show from 760 px) */
.menu { position: relative; }
.menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 4px; cursor: pointer; list-style: none; box-shadow: inset 0 0 0 1px #f3f1ec55; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: 52px; display: grid; min-width: 220px; padding: 8px; border-radius: 6px; background: #121118f5; box-shadow: 0 0 0 1px var(--line), 0 24px 60px -20px #000; }
.menu nav a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.menu nav a:hover { background: #f3f1ec14; }
@media (min-width: 760px) { .menu { display: none; } }

/* ---- type ---- */
h1, h2 { font: 400 clamp(44px, 6.4vw, 104px)/.92 var(--display); text-transform: uppercase; letter-spacing: .005em; overflow-wrap: anywhere; }
.lede { color: var(--muted); max-width: 34rem; }

/* ---- the inner pages: a head band with the game's art at the side, then the content ---- */
.page-head { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(300px, 32vw, 440px); padding: clamp(28px, 5vw, 64px) 0 clamp(32px, 5vw, 56px);
  background: radial-gradient(50% 80% at 85% 30%, #8f6dff2e, transparent 70%), radial-gradient(40% 60% at 70% 100%, #ffc94d14, transparent 70%); border-bottom: 1px solid var(--line); }
.page-head .wrap { position: relative; width: 100%; }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head h1 { font-size: clamp(48px, 8vw, 120px); max-width: 12ch; }
.page-head .lede { margin-top: 18px; }
.page-head .art { position: absolute; z-index: -1; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: 0; height: calc(100% - 16px); width: auto; max-width: 46%;
  object-fit: contain; object-position: right bottom; pointer-events: none;
  -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 22%); mask-image: linear-gradient(0deg, transparent 0, #000 22%); }
.page-head .art.cards { display: flex; gap: 12px; height: auto; top: 50%; bottom: auto; transform: translateY(-50%); max-width: none; -webkit-mask-image: none; mask-image: none; }
@media (max-width: 759.98px) { .page-head .art { opacity: .35; max-width: 70%; } .page-head .art.cards { display: none; } }
.page-head.lost { align-items: center; min-height: calc(100svh - var(--bar) - 220px); }
.back-row { margin: 0 0 18px; }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--soft);
  font-weight: 800; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; transition: color .3s; }
.back .ico { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.back:hover { color: var(--ink); }
.back:hover .ico { transform: translateX(-4px); }
.page-body { padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 8vw, 110px); }
.panel { padding: clamp(20px, 3vw, 32px); border-radius: 6px; background: var(--raise); box-shadow: 0 0 0 1px var(--line); }
.eyebrow { font: 800 12px/1.2 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats > div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.stats dt { font: 800 11px/1.3 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin-top: 6px; font: 400 clamp(36px, 4vw, 56px)/1 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 760px) { .stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- the footer ---- */
.foot { padding: 64px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot .wrap { display: grid; gap: 32px; }
.foot .brand { color: var(--ink); font-size: 14px; }
.foot .blurb { margin-top: 12px; max-width: 22rem; }
.foot nav ul { display: grid; gap: 4px; }
.foot nav a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot h2 { font: 600 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.foot .fine { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
@media (min-width: 760px) { .foot .wrap { grid-template-columns: 2fr 1fr 1fr; } }

/* the live player count (online.js fills it in) */
.online-now { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .02em; }
.online-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5fd35a; box-shadow: 0 0 0 4px #5fd35a2e; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
