/* FragSubs website. Same palette as the app: CT blue for anything you can
   click, T gold for live speech and the language tags. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/Barlow-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/Barlow-Medium.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/Barlow-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("fonts/BarlowSemiCondensed-Bold.ttf") format("truetype"); }

:root {
  --base: #181b21;
  --panel: #20242c;
  --raised: #272c36;
  --line: #2c323d;
  --text: #e6e8ec;
  --muted: #9aa2b0;
  --blue: #6e8fd0;
  --blue-hover: #86a3dc;
  --gold: #e3a33b;
  --hud: "Barlow Semi Condensed", "Barlow", "Segoe UI", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 18px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
code { font: 500 0.92em var(--body); background: var(--raised); padding: 1px 6px; border-radius: 4px; }
strong { font-weight: 600; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #0f1420; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; z-index: 10; }

h1, h2, h3 { font-family: var(--hud); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 28px; }
h3 { font-size: 23px; font-weight: 600; }
.fine { font-size: 15px; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ header */
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 24px var(--hud); }
.brand img { border-radius: 6px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 16px; }
nav a:hover { color: var(--text); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
h1 { font-size: clamp(40px, 4.8vw, 62px); line-height: 1.02; }
.eyebrow { font: 700 15px/1.3 var(--hud); letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.lede { font-size: 21px; color: #c9ced7; margin: 22px 0 32px; max-width: 36ch; }
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; color: #c9ced7; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before {
  content: ""; width: 10px; height: 6px; margin-top: -3px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg);
}
.cta { display: grid; gap: 12px; justify-items: start; }
.button {
  display: inline-block; background: var(--blue); color: #0f1420; text-decoration: none;
  font: 700 21px var(--hud); padding: 15px 30px; border-radius: 8px;
  transition: background 120ms ease;
}
.button:hover { background: var(--blue-hover); color: #0f1420; }
nav a.button-sm, .button-sm { font-size: 16px; padding: 7px 14px; border-radius: 6px; color: #0f1420; }
nav a.button-sm:hover { color: #0f1420; }

/* The demo: a dim game frame with FragSubs captions over it. */
/* Each map gets its own light: the demo and the map picker switch palette. */
[data-map] { --sky-a: #9a8b6f; --sky-b: #7a6d57; --floor-a: #4b453b; --floor-b: #3a352e; --glow: rgba(255, 236, 200, 0.35); }
[data-map="de_inferno"] { --sky-a: #a8805f; --sky-b: #85604a; --floor-a: #54402f; --floor-b: #3b2c21; --glow: rgba(255, 214, 170, 0.35); }
[data-map="de_dust2"] { --sky-a: #b8a47e; --sky-b: #94805e; --floor-a: #5f513b; --floor-b: #45392a; --glow: rgba(255, 240, 205, 0.4); }
[data-map="de_nuke"] { --sky-a: #8593a0; --sky-b: #66727e; --floor-a: #43494f; --floor-b: #2f3439; --glow: rgba(220, 235, 255, 0.3); }
[data-map="de_ancient"] { --sky-a: #84906b; --sky-b: #626d4f; --floor-a: #414a36; --floor-b: #2e3427; --glow: rgba(225, 245, 200, 0.3); }
[data-map="de_anubis"] { --sky-a: #a59a78; --sky-b: #7f8b80; --floor-a: #4d4a3b; --floor-b: #36342a; --glow: rgba(255, 240, 200, 0.35); }
[data-map="de_overpass"] { --sky-a: #8c978b; --sky-b: #6b7569; --floor-a: #434a42; --floor-b: #30352f; --glow: rgba(230, 245, 230, 0.3); }
[data-map="de_vertigo"] { --sky-a: #93aac0; --sky-b: #728aa0; --floor-a: #4c5258; --floor-b: #363a3f; --glow: rgba(230, 242, 255, 0.4); }
[data-map="de_cache"] { --sky-a: #8f9483; --sky-b: #6f7464; --floor-a: #464a3f; --floor-b: #33362d; --glow: rgba(235, 240, 220, 0.3); }

.scene {
  position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: #1d1f24;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.scene-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 46%, var(--floor-a) 46.2%, var(--floor-b) 100%);
  transition: opacity 400ms ease;
}
.scene-ground { transition: opacity 400ms ease; }
/* Loading the next map: the picture dims for a moment. */
.scene.switching .scene-sky, .scene.switching .scene-ground, .scene.switching .crosshair { opacity: 0.08; }
.map-badge {
  position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 8px;
  background: rgba(12, 14, 18, 0.6); padding: 6px 12px; border-radius: 999px;
  font: 600 14px var(--hud); color: var(--text); transition: opacity 300ms ease;
}
.map-badge-label { font: 700 11px/1 var(--hud); letter-spacing: 0.09em; text-transform: uppercase; color: #b9c0cc; }
.scene.switching .map-badge { opacity: 0; }
.scene-ground {
  /* walls of a corridor, for depth */
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(30, 27, 23, 0.85) 0 18%, transparent 18.2%),
    linear-gradient(260deg, rgba(30, 27, 23, 0.8) 0 22%, transparent 22.2%),
    linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.25) 100%);
}
.scene::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55); pointer-events: none; }
.crosshair {
  /* four short lines with a gap in the middle */
  position: absolute; left: 50%; top: 46%; width: 24px; height: 24px; transform: translate(-50%, -50%); opacity: 0.85;
  background:
    linear-gradient(#bff2c9, #bff2c9) 50% 0 / 2px 8px no-repeat,
    linear-gradient(#bff2c9, #bff2c9) 50% 100% / 2px 8px no-repeat,
    linear-gradient(#bff2c9, #bff2c9) 0 50% / 8px 2px no-repeat,
    linear-gradient(#bff2c9, #bff2c9) 100% 50% / 8px 2px no-repeat;
}

.voice {
  position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 8px;
  background: rgba(12, 14, 18, 0.6); padding: 6px 12px 6px 10px; border-radius: 999px;
  font: 600 14px var(--hud); color: var(--text); opacity: 0; transition: opacity 200ms ease;
}
.voice.on { opacity: 1; }
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(227, 163, 59, 0.6); animation: pulse 1s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(227, 163, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 163, 59, 0); } }

.captions {
  position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; padding: 0 16px; list-style: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.cap {
  display: grid; grid-template-columns: auto 1fr; column-gap: 9px; max-width: 92%;
  background: rgba(12, 14, 18, 0.62); border-radius: 7px; padding: 7px 13px 8px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
  animation: cap-in 260ms ease-out both;
}
.cap.out { animation: cap-out 500ms ease-in both; }
.cap.partial .cap-text { color: #c9ced7; }
.cap-tag { font: 700 13px/1.75 var(--hud); color: var(--gold); }
.cap-text { font: 600 clamp(15px, 1.7vw, 20px)/1.25 var(--hud); color: var(--text); }
.cap-orig { grid-column: 2; font-size: clamp(12px, 1.2vw, 14px); color: #b9c0cc; line-height: 1.35; }
@keyframes cap-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes cap-out { to { opacity: 0; } }

.demo { margin: 0; }
.scene-note { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: right; }

/* ------------------------------------------------------------------ how */
.how { padding: 80px 0; border-top: 1px solid var(--line); }
.how h2 { max-width: 22ch; margin-bottom: 40px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.flow-step { position: relative; }
.flow-step h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.flow-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #0f1420; font: 700 20px/1 var(--hud);
}
.flow-step > p { margin: 18px 0 0; color: #c9ced7; }
.flow-card {
  position: relative; height: 176px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  display: grid; align-content: center; justify-items: center; gap: 12px; padding: 18px;
}
/* arrows between the cards */
.flow-step:not(:last-child) .flow-card::after {
  content: ""; position: absolute; right: -33px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(-45deg);
}
.hear-who { display: flex; align-items: center; gap: 8px; font: 600 16px var(--hud); justify-self: start; }
.hear-lang { font: 700 12px/1 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
.wave { display: flex; align-items: center; gap: 3px; height: 46px; width: 100%; }
.wave i { flex: 1; height: var(--h); min-height: 3px; border-radius: 2px; background: var(--gold); opacity: 0.85; }
.hear-text { margin: 0; font-style: italic; color: var(--muted); font-size: 16px; }
.think img { border-radius: 8px; }
.pair { display: flex; align-items: center; gap: 14px; font: 700 30px/1 var(--hud); }
.pair span:first-child { color: var(--gold); }
.pair-arrow { width: 34px; height: 2px; background: var(--muted); position: relative; }
.pair-arrow::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.think p { margin: 0; font-size: 15px; color: var(--muted); }
.see { align-content: end; overflow: hidden; background: #3a352e linear-gradient(180deg, #8d7f66 0%, #6d624f 48%, #403a32 48.4%, #2f2b25 100%); }
.see::before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.55); }
.see .cap { position: relative; animation: none; max-width: 100%; }

/* ------------------------------------------------------------------ details */
.details { padding: 80px 0; background: var(--panel); border-block: 1px solid var(--line); }
.details-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.shot img { border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.8); }
.facts { margin: 0; display: grid; gap: 22px; }
.facts dt { font: 700 21px var(--hud); margin-bottom: 4px; }
.facts dd { margin: 0; color: #c9ced7; }

/* ------------------------------------------------------------------ maps */
.maps { padding: 80px 0; border-top: 1px solid var(--line); background: var(--panel); }
.maps-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.maps h2 { margin-bottom: 20px; }
.maps .section-text + .section-text { margin-top: 14px; }
.map-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.map-tab {
  font: 600 15px/1 var(--hud); padding: 8px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--base); color: var(--muted);
}
.map-tab:hover { color: var(--text); border-color: #3a4250; }
.map-tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #0f1420; }
.map-scene {
  position: relative; height: 150px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden;
  display: grid; align-content: end; justify-items: center; padding: 16px;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 48%, var(--floor-a) 48.4%, var(--floor-b) 100%);
}
.map-scene::before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.5); }
.map-scene .cap { position: relative; animation: none; max-width: 100%; }
.map-scene .cap.fresh { animation: cap-in 260ms ease-out both; }
.map-count { margin: 16px 0 10px; }
.chips.map-chips { gap: 6px; }
.chips.map-chips li { font-size: 15px; padding: 7px 9px; color: #b9c0cc; background: var(--base); }
/* Callouts heard in the example subtitle. */
.chips.map-chips li.on { color: var(--text); border-color: var(--gold); background: rgba(227, 163, 59, 0.12); }

/* ------------------------------------------------------------------ languages */
.langs { padding: 80px 0; border-top: 1px solid var(--line); }
.langs-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.langs h2 { margin-bottom: 20px; }
.section-text { margin: 0; color: #c9ced7; max-width: 42ch; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 600 17px/1 var(--hud); padding: 9px 13px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.chips li.on { color: var(--text); background: var(--raised); border-color: #3a4250; }
.legend { margin-top: 16px; display: flex; align-items: center; gap: 10px; }
.key { flex: none; width: 18px; height: 14px; border-radius: 3px; background: var(--raised); border: 1px solid #3a4250; }
.shot-note { margin-top: 12px; }

/* ------------------------------------------------------------------ install */
.install { padding: 80px 0; }
.install-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.install-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.install-steps li::marker { font: 700 20px var(--hud); color: var(--blue); }
.reqs { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; align-self: start; }
.reqs h3 { margin-bottom: 12px; }
.reqs ul { margin: 0 0 16px; padding-left: 1.1em; display: grid; gap: 6px; }
.reqs .fine + .fine { margin-top: 10px; }

/* ------------------------------------------------------------------ faq */
.faq { padding: 80px 0 96px; border-top: 1px solid var(--line); }
.faq .wrap { max-width: 820px; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font: 600 22px var(--hud);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 150ms ease;
}
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { margin: 0 0 20px; color: #c9ced7; max-width: 68ch; }
details ul { margin: -8px 0 20px; padding-left: 1.2em; color: #c9ced7; max-width: 68ch; display: grid; gap: 8px; }

/* ------------------------------------------------------------------ final call */
.final { padding: 64px 0; background: var(--panel); border-top: 1px solid var(--line); }
.final-row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.final h2 { margin-bottom: 8px; }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-row { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }
.foot p { margin: 0; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid, .details-grid, .install-grid, .langs-grid, .maps-grid { grid-template-columns: 1fr; gap: 40px; }
  .flow { grid-template-columns: 1fr; gap: 40px; max-width: 560px; }
  .flow-step:not(:last-child) .flow-card::after { display: none; }
  .lede { max-width: none; }
}
@media (max-width: 700px) {
  nav a:nth-child(-n+3) { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  nav { gap: 16px; }
  nav .nav-github { display: none; }
  .scene { aspect-ratio: 4 / 5; }
  .scene-note { text-align: left; }
  .how, .maps, .langs, .details, .install, .faq { padding: 56px 0; }
  .final { padding: 48px 0; }
  .eyebrow { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cap, .cap.out, .voice-dot, .map-scene .cap.fresh { animation: none; }
  .scene-sky, .scene-ground, .map-badge { transition: none; }
}
