/* Afterburn Atlas website. Same palette and faces as the game (src/client/ui/styles.css). */

@font-face { font-family: 'Chakra Petch'; font-weight: 600; font-display: swap; src: url('/fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; font-display: swap; src: url('/fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-display: swap; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #05060d;
  --bg-2: #080b17;
  --panel: rgba(13, 19, 38, 0.72);
  --panel-solid: #0c1224;
  --line: rgba(130, 175, 255, 0.14);
  --line-strong: rgba(130, 175, 255, 0.28);
  --text: #c6d4e8;
  --dim: #8193ad;
  --white: #f2f7ff;
  --cyan: #22e8ff;
  --cyan-soft: rgba(34, 232, 255, 0.14);
  --magenta: #ff3cc8;
  --amber: #ffc23a;
  --red: #ff4f6b;
  --violet: #a98bff;
  --green: #7cff4f;
  --display: 'Chakra Petch', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(34, 232, 255, 0.35); color: var(--white); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ── header ───────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(to bottom, rgba(5, 6, 13, 0.92), rgba(5, 6, 13, 0.7));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); min-width: 0; }
.brand img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.brand span { font: 700 17px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.brand b { color: var(--cyan); font-weight: 700; }
.nav { margin-left: auto; display: flex; gap: clamp(12px, 3vw, 28px); }
.nav a { color: var(--dim); text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--white); }
@media (max-width: 520px) { .nav .opt { display: none; } .nav { gap: 14px; } .nav a { font-size: 11px; letter-spacing: 0.1em; } .brand span { font-size: 15px; } }

/* ── type ─────────────────────────────────────────────── */
.eyebrow { font: 600 12px/1.2 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 14px; }
.eyebrow.magenta { color: var(--magenta); }
.eyebrow.amber { color: var(--amber); }
h1, h2, h3 { font-family: var(--display); color: var(--white); line-height: 1.02; margin: 0; letter-spacing: 0.01em; text-wrap: balance; }
h2 { font-size: clamp(34px, 5.2vw, 56px); text-transform: uppercase; }
h3 { font-size: 21px; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.15; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text); max-width: 34em; text-wrap: pretty; }
p { text-wrap: pretty; }
.glow-cyan { color: var(--cyan); text-shadow: 0 0 24px rgba(34, 232, 255, 0.55); }
.glow-magenta { color: var(--magenta); text-shadow: 0 0 24px rgba(255, 60, 200, 0.5); }

/* ── buttons ──────────────────────────────────────────── */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px;
  border-radius: 12px; text-decoration: none; font: 700 15px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--cyan); color: #021016; box-shadow: 0 0 0 1px rgba(34, 232, 255, 0.6), 0 8px 32px rgba(34, 232, 255, 0.35); }
.btn-primary:hover { color: #021016; transform: translateY(-1px); box-shadow: 0 0 0 1px var(--cyan), 0 10px 44px rgba(34, 232, 255, 0.55); }
.btn-ghost { color: var(--white); border: 1px solid var(--line-strong); background: rgba(10, 14, 28, 0.6); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--white); }
.badge-soon {
  display: inline-flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 18px 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(10, 14, 28, 0.6); color: var(--white);
}
.badge-soon svg { width: 22px; height: 22px; flex: none; }
.badge-soon small { display: block; font: 600 10px/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.badge-soon strong { display: block; font: 700 16px/1.15 var(--display); letter-spacing: 0.04em; }

/* ── hero ─────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 18% 45%, rgba(5, 6, 13, 0.88), rgba(5, 6, 13, 0) 70%),
    linear-gradient(to bottom, rgba(5, 6, 13, 0) 70%, var(--bg));
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding-top: clamp(48px, 9vw, 112px); padding-bottom: clamp(56px, 9vw, 120px); }
.hero h1 { font-size: clamp(46px, 6.4vw, 86px); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 22px; }
.hero h1 .line2 { display: block; }
.hero .lede { margin: 0 0 30px; }
.hero .fine { margin: 18px 0 0; font: 400 12px/1.5 var(--mono); color: var(--dim); letter-spacing: 0.06em; }
.hero-phone { justify-self: center; position: relative; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero::after { background: linear-gradient(to bottom, rgba(5, 6, 13, 0.8), rgba(5, 6, 13, 0.35) 45%, var(--bg)); }
}

/* ── phone mockup ─────────────────────────────────────── */
.phone {
  position: relative; width: min(300px, 72vw); aspect-ratio: 1206 / 2622; border-radius: 44px; padding: 9px;
  background: linear-gradient(150deg, #2a3350, #0b0f1d 40%, #1c2440);
  box-shadow: 0 0 0 1px rgba(160, 190, 255, 0.18), 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 90px rgba(34, 232, 255, 0.16);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: #020309; }
.phone.sm { width: min(240px, 60vw); border-radius: 36px; padding: 7px; }
.phone.sm img { border-radius: 30px; }
.tilt-l { transform: rotate(-4deg); }
.tilt-r { transform: rotate(4deg); }

/* ── sections ─────────────────────────────────────────── */
section { padding: clamp(64px, 10vw, 128px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lede { margin: 18px 0 0; }
.alt { background: linear-gradient(to bottom, var(--bg), var(--bg-2) 20%, var(--bg-2) 80%, var(--bg)); }

.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; overflow: hidden;
}
.card::before { /* HUD corner tick */
  content: ''; position: absolute; top: 0; left: 0; width: 18px; height: 18px;
  border-top: 2px solid var(--accent, var(--cyan)); border-left: 2px solid var(--accent, var(--cyan)); border-top-left-radius: var(--radius);
}
.card p { margin: 10px 0 0; color: var(--text); font-size: 16px; }
.card .num { font: 600 12px/1 var(--mono); color: var(--accent, var(--cyan)); letter-spacing: 0.18em; display: block; margin-bottom: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps svg { width: 100%; height: auto; display: block; margin: 0 0 20px; border-radius: 10px; background: rgba(2, 4, 10, 0.7); border: 1px solid var(--line); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps svg { max-width: 360px; } }

.warning {
  margin-top: 18px; display: flex; gap: 18px; align-items: center; padding: 20px 24px; border-radius: var(--radius);
  border: 1px solid rgba(255, 79, 107, 0.4); background: linear-gradient(90deg, rgba(255, 79, 107, 0.14), rgba(255, 79, 107, 0.03));
}
.warning .tag { flex: none; font: 700 12px/1 var(--mono); letter-spacing: 0.16em; color: #1a0207; background: var(--red); padding: 7px 9px; border-radius: 6px; }
.warning p { margin: 0; color: var(--white); }
@media (max-width: 560px) { .warning { flex-direction: column; align-items: flex-start; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.anomaly svg { width: 64px; height: 64px; display: block; margin-bottom: 18px; }

/* split: copy beside phones */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split, .split.flip { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.phones { display: flex; justify-content: center; gap: clamp(12px, 3vw, 28px); padding: 12px 0; }
.phones .phone:nth-child(2) { margin-top: 56px; }
@media (max-width: 520px) { .phones .phone.sm { width: 44vw; border-radius: 26px; padding: 5px; } .phones .phone.sm img { border-radius: 22px; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.stats li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; background: var(--panel); }
.stats b { display: block; font: 700 32px/1 var(--display); color: var(--white); }
.stats span { display: block; margin-top: 6px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bullets { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.bullets li { position: relative; padding-left: 26px; }
.bullets li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 10px; border: 2px solid var(--cyan); transform: rotate(45deg); }

/* sector gallery */
.sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sectors figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #020309; position: relative; }
.sectors img { aspect-ratio: 1; width: 100%; object-fit: cover; transition: transform 0.6s ease; }
.sectors figure:hover img { transform: scale(1.04); }
.sectors figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(2, 3, 9, 0.92), rgba(2, 3, 9, 0));
  font: 600 12px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--white);
}
.sectors figcaption span { display: block; color: var(--dim); font-weight: 400; letter-spacing: 0.08em; text-transform: none; margin-top: 2px; }
@media (max-width: 860px) { .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .sectors img { transition: none; } .sectors figure:hover img { transform: none; } .btn { transition: none; } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.features .card h3 { font-size: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.final { text-align: center; }
.final h2 { margin-bottom: 18px; }
.final .lede { margin: 0 auto 30px; }
.final .cta-row { justify-content: center; }

/* ── footer ───────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--dim); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { color: var(--white); text-decoration: underline; }
.studio { font: 600 12px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.studio b { color: var(--white); font-weight: 600; }

/* ── document pages (privacy, support) ────────────────── */
.doc { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(40px, 6.5vw, 64px); text-transform: uppercase; margin-bottom: 10px; }
.doc .meta { font: 400 13px/1.6 var(--mono); color: var(--dim); letter-spacing: 0.04em; margin: 0 0 32px; }
.doc h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 44px 0 12px; padding-top: 8px; scroll-margin-top: 80px; }
.doc h3 { font-size: 17px; margin: 26px 0 8px; color: var(--white); }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--cyan); }
.doc strong { color: var(--white); }
.summary { border: 1px solid rgba(34, 232, 255, 0.35); background: linear-gradient(135deg, rgba(34, 232, 255, 0.1), rgba(34, 232, 255, 0.02)); border-radius: var(--radius); padding: 22px 24px; }
.summary h2 { margin: 0 0 10px; padding: 0; font-size: 18px; color: var(--cyan); }
.summary ul { margin: 0; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: var(--panel); margin: 24px 0 0; }
.toc p { margin: 0 0 8px; font: 600 12px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font: 600 11px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); background: rgba(13, 19, 38, 0.8); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--white); font-weight: 600; }

.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; border: 1px solid rgba(34, 232, 255, 0.35); border-radius: var(--radius); padding: 24px; background: linear-gradient(135deg, rgba(34, 232, 255, 0.1), rgba(34, 232, 255, 0.02)); }
.contact-card h2 { margin: 0 0 6px; padding: 0; font-size: 24px; }
.contact-card p { margin: 0; }
@media (max-width: 640px) { .contact-card { grid-template-columns: 1fr; } }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 10px 0; }
summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative; color: var(--white); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 22px/1 var(--mono); color: var(--cyan); }
details[open] summary::after { content: '–'; }
details > div { padding: 0 18px 16px; }
details > div > p:first-child { margin-top: 0; }
kbd { font: 600 13px/1 var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: var(--white); background: rgba(255, 255, 255, 0.04); }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: clamp(56px, 11vw, 120px); text-transform: uppercase; margin-bottom: 18px; }
.notfound .lede { margin: 0 auto 30px; }
.notfound .cta-row { justify-content: center; }
