/* Type and colour follow the game: UiTypography.cs (Barlow for interface copy,
   Barlow Condensed SemiBold for major display titles only), UiUxStandards.cs
   (colour tokens) and UI_CONTRACT.md (sentence case; uppercase only for short
   telemetry labels). Fonts: SIL OFL, see /fonts/OFL.txt. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/fonts/Barlow-Regular.woff2?v=e42fb205c9") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/fonts/Barlow-Medium.woff2?v=2678a2313b") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("/fonts/Barlow-Bold.woff2?v=9c9d54ac20") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/BarlowCondensed-SemiBold.woff2?v=febe727f4a") format("woff2"); }

:root {
  --bg: #071019;            /* SpaceBackground */
  --panel: #0b1822;         /* PanelBackground */
  --line: rgba(53, 199, 208, 0.2);
  --text: #e8eef0;          /* PrimaryText */
  --text-2: #a6c7e0;        /* SecondaryText */
  --muted: #7890a8;         /* MutedMetadata */
  --cyan: #35c7d0;          /* PlayerSystems */
  --cyan-hi: #9ce6e4;       /* PlayerSystemsSupporting */
  --violet: #b454cf;        /* Corruption */
  --amber: #e6a93d;         /* Salvage */
  --font: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }  /* an #anchor lands below the fixed menu */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-hi); }
h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.1; margin: 0 0 1rem; }
h3 { font-weight: 700; font-size: 1.3rem; margin: 1rem 0 0.5rem; }
strong { font-weight: 700; }

/* Hero */
/* z-index: the menu inside it stays fixed above the rest of the page; padding-top keeps the hero's words clear of it. */
.hero { position: relative; z-index: 30; isolation: isolate; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding-top: 4.75rem; }
.hero__bg {
  position: absolute; inset: 0 0 0 30%; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(7, 16, 25, 0.6) 30%, rgba(7, 16, 25, 0) 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%),
    url("/img/hero.webp?v=f31372c33f") left center / cover no-repeat;
}

.nav { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem clamp(1rem, 5vw, 4rem);
  position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background 200ms, border-color 200ms, padding 200ms; }
/* The menu is always on screen: on the home page fixed over the hero, elsewhere stuck to the top.
   Once the page scrolls (main.js adds .is-stuck) it gets a backing so text under it doesn't show through. */
.hero .nav { position: fixed; left: 0; right: 0; }
.nav.is-stuck { background: rgba(7, 16, 25, 0.94); border-bottom-color: var(--line); padding-top: 0.75rem; padding-bottom: 0.75rem; }
@supports (backdrop-filter: blur(1px)) { .nav.is-stuck { background: rgba(7, 16, 25, 0.8); backdrop-filter: blur(10px); } }
/* The wordmark keeps the title plate's capitals (MaverickSkiesTitle.svg). */
.nav__brand { white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.12em; color: var(--cyan-hi); text-decoration: none; }
.nav__links { display: flex; gap: 1.75rem; }
.nav__links a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.nav__links a:hover { color: var(--cyan-hi); }
.nav__links a[aria-current="page"] { color: var(--cyan-hi); }
.nav__links .nav__discord { color: var(--cyan-hi); font-weight: 700; }

/* "Be there at launch" at the end of the guide pages: the same asks as the home page's. */
.launch { max-width: 64rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.launch h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
.launch p { color: var(--text-2); max-width: 46rem; margin: 0; }

.hero__content { margin: auto 0; padding: 2rem clamp(1rem, 5vw, 4rem) 6rem; max-width: 46rem; }
.eyebrow { font-weight: 500; color: var(--cyan); margin: 0; }
.title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.5rem, 10vw, 7.5rem); line-height: 0.95; margin: 0.5rem 0; letter-spacing: 0.02em;
  background: linear-gradient(90deg, #8cecff, #fff 50%, #c88cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(53, 199, 208, 0.35));
}
/* Part of the title plate lockup, so it keeps its capitals. */
.tagline { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 1.5rem; }
.lede { color: var(--text); font-size: 1.25rem; }
.platforms { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.lede strong { color: #fff; }
.stats { list-style: none; padding: 0; margin: 2rem 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.stats li { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); font-size: 0.95rem; }
.stats strong { display: block; font-size: 2.25rem; line-height: 1; letter-spacing: 0.02em; color: var(--cyan-hi); }

.cta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 1rem; }
.btn {
  display: inline-block; padding: 0.75rem 1.6rem; border: 1px solid var(--cyan); color: var(--text); background: transparent;
  text-decoration: none; font-family: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background 150ms, color 150ms;
}
.btn:hover { background: rgba(53, 199, 208, 0.15); }
.btn--primary { background: var(--cyan); color: var(--bg); }
.btn--primary:hover { background: var(--cyan-hi); }
/* Unavailable: outlined, readable (10.8:1), not faded. */
.btn--disabled, .btn--disabled.btn--primary { background: transparent; border-color: var(--muted); border-style: dashed; color: var(--text-2); cursor: default; }
.btn--disabled:hover { background: transparent; }

/* Sections */
.section { padding: 5rem clamp(1rem, 5vw, 4rem); max-width: 80rem; margin: 0 auto; }

.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: center; }
.about__text p { color: var(--text-2); }
.about__img, .pillar img, .pillar video, .gallery img { border: 1px solid var(--line); border-radius: 4px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 1rem 1rem 1.5rem; }
.pillar h3 { color: var(--accent); }
.pillar p { color: var(--text-2); margin: 0; }
.pillar--cyan { --accent: var(--cyan); }
.pillar--violet { --accent: #c77ddc; } /* Choir lilac: 6.3:1 on the panel (violet is 4.4:1) */
.pillar--amber { --accent: var(--amber); }

/* Learn it. Plan it. Hunt it. Race it.: four small cards under the features (two by two, the
   picture beside the words), each opening a page of its own. */
.master { padding-top: 1rem; }
.speedrun__clip { display: block; max-width: 46rem; margin: 1.5rem 0 0; }
.streamers__shot { display: block; width: 100%; max-width: 46rem; height: auto; margin: 1.5rem 0 0; border: 1px solid var(--line); border-radius: 4px; }
.streamers__features { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: 1.75rem 2rem; }
.streamers__features .zoom { border: 1px solid var(--line); border-radius: 4px; }
.streamers__features p { margin: 0.6rem 0 0; color: var(--text-2); }
.streamers__features strong { color: var(--cyan-hi); }
.feature-list.streamers__steps { display: block; list-style: decimal; padding-left: 1.5rem; }
.feature-list.streamers__steps li { padding-left: 0.25rem; margin-bottom: 0.6rem; }
.feature-list.streamers__steps li::before { content: none; }
.feature-list.streamers__steps li::marker { color: var(--cyan); font-weight: 700; }
.speedrun__clip video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.master h2 { margin-top: 0; }
.deep { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.deep__card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 1rem; align-content: start;
  position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 0.85rem;
  transition: border-color 150ms, background-color 150ms; }
.deep__card > .deep__media, .deep__card > .deep__icons { grid-column: 1; grid-row: 1 / -1; align-self: start; }
.deep__card > :not(.deep__media):not(.deep__icons) { grid-column: 2; }
.deep__card video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.deep__card h3 { color: var(--accent); margin: 0 0 0.3rem; }
.deep__card p { color: var(--text-2); margin: 0; font-size: 0.95rem; }
.deep__card--cyan { --accent: var(--cyan); }
.deep__card--green { --accent: #6fd08c; }
.deep__card--amber { --accent: var(--amber); }
.deep__card--violet { --accent: #c77ddc; }
.deep__more { align-self: end; padding-top: 0.6rem; font-weight: 500; text-decoration: none; }
/* The whole card is the link: the link's ::after covers it, so a click anywhere opens the page. */
.deep__more::after { content: ""; position: absolute; inset: 0; }
.deep__more:focus-visible { outline: none; }
.deep__card:hover, .deep__card:has(.deep__more:focus-visible) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.deep__card:has(.deep__more:focus-visible) { outline: 3px solid var(--cyan-hi); outline-offset: 3px; }
.deep__card:hover .deep__more { text-decoration: underline; }
.deep__media { overflow: hidden; border-radius: 4px; }
.deep__card--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 0.53fr) minmax(0, 1fr); }
.deep__media img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; transition: transform 200ms; }
.deep__card:hover .deep__media img { transform: scale(1.03); }
.deep__media video, .deep__icons img { transition: transform 200ms; }
.deep__card:hover .deep__media video, .deep__card:hover .deep__icons img { transform: scale(1.03); }
.deep__icons { aspect-ratio: 16 / 9; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); gap: 0.35rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.deep__icons img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.deep__card .deep__stat { order: 1; margin-bottom: 0.3rem; color: var(--text); }  /* written before the heading, shown under it */
.deep__stat strong { color: var(--amber); }
.deep__card h3 { order: 0; }
.deep__card p:not(.deep__stat) { order: 2; }
.deep__card .deep__more { order: 3; }

.feature-list { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: 0.75rem 2rem; }
.feature-list li { padding-left: 1.5rem; position: relative; }
.feature-list li::before { content: "›"; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
.feature-list strong { color: var(--cyan-hi); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery a { display: block; overflow: hidden; cursor: zoom-in; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 200ms; }
.gallery a:hover img { transform: scale(1.03); }

.trailers { display: grid; gap: 2rem; }
.trailer { margin: 0; }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 4px; display: block; }
.trailer figcaption { margin-top: 0.75rem; }
.trailer figcaption span { color: var(--muted); margin-left: 0.5rem; }
.transcript { margin-top: -1rem; }
.transcript summary { cursor: pointer; color: var(--text-2); font-weight: 500; width: max-content; }
.transcript summary:hover { color: var(--cyan-hi); }
.transcript p { color: var(--text-2); margin: 0.5rem 0; max-width: 46rem; }
.transcript b { color: var(--text); font-weight: 500; }
.transcript__card { font-style: italic; }
.transcript__card span { color: var(--muted); font-style: normal; }

.legal { max-width: 46rem; }
.legal h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; margin: 0 0 0.5rem; }
.legal h2 { margin-top: 2.5rem; color: var(--cyan-hi); }
.legal h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.legal p { color: var(--text-2); }
.legal__meta { color: var(--muted); }

.demo { text-align: center; max-width: 48rem; }
.demo .cta { justify-content: center; }
.demo p { color: var(--text-2); }
.downloads__handheld { margin: 1rem 0 0; }

.footer { border-top: 1px solid var(--line); text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.95rem; }
.footer p { margin: 0.25rem 0; }
.footer__small { font-size: 0.85rem; }

/* `hidden` must win over .btn and other display rules: unconfigured links stay out of sight. */
[hidden] { display: none !important; }

/* Accessibility helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 40; padding: 0.6rem 1rem; background: var(--cyan); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--cyan-hi); outline-offset: 3px; }
/* .btn's clip-path cuts off an outline, so its focus ring is drawn inside it (on cyan and on dark). */
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 5px var(--cyan-hi); }

.section__lede { color: var(--text-2); max-width: 46rem; margin: 0 0 2rem; }

/* Story */
.story { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: center; }
.story__text p { color: var(--text-2); }
.story__text q { color: var(--text); font-style: italic; }
.story__img { border: 1px solid var(--line); border-radius: 4px; }

/* Factions */
.factions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.faction { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 1.25rem; }
.factions .faction { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-top-width: 1px; isolation: isolate; }
.faction__art { position: relative; z-index: -1; display: block; width: 100%; height: auto; aspect-ratio: 256 / 448; object-fit: cover; object-position: top;
  -webkit-mask-image: linear-gradient(#000 60%, transparent 96%); mask-image: linear-gradient(#000 60%, transparent 96%); transition: filter 150ms; }
.faction:hover .faction__art { filter: brightness(1.15); }
.faction__body { margin-top: -2rem; padding: 0 1.25rem 1.25rem; }
.faction h3 { color: var(--accent); font-size: 1.2rem; }
.faction p { color: var(--text-2); margin: 0; font-size: 1rem; }
.faction--helix { --accent: #85929a; }
.faction--salvagers { --accent: var(--amber); }
.faction--choir { --accent: #c77ddc; }
.faction--maverick { --accent: var(--cyan); }
.faction--thorns { --accent: #58c997; }
/* Faction cards link to their pages: the whole card is the link (the h3's link stretches over it). */
.faction { position: relative; transition: border-color 150ms, transform 150ms; }
.faction:hover { border-color: var(--accent); transform: translateY(-2px); }
.faction h3 a { color: inherit; text-decoration: none; }
.faction h3 a::after { content: ""; position: absolute; inset: 0; }
.faction__more { display: block; margin-top: 0.75rem; color: var(--accent); font-weight: 700; font-size: 0.95rem; }

/* Faction pages */
.faction-page h1 { color: var(--accent); margin: 0; }
.faction-page__banner { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; margin-bottom: 1.5rem; }
.faction-page__banner img { display: block; width: 100%; height: auto; }
.faction-page__head { display: flex; gap: 1.25rem; align-items: center; }
.faction-page__head > img { width: 96px; height: 96px; flex: none; }
.faction-page__creed { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }
.faction-page__story { max-width: 46rem; font-size: 1.1rem; }
.faction-page__story p { color: var(--text-2); }
.faction-page__start { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text) !important; }
.faction-page__quote { margin: 2.5rem 0 0; max-width: 46rem; }
.faction-page__quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; color: var(--text); }
.faction-page__quote blockquote p::before { content: "“"; color: var(--accent); }
.faction-page__quote blockquote p::after { content: "”"; color: var(--accent); }
.faction-page__quote figcaption { color: var(--accent); font-weight: 700; margin-top: 0.5rem; }
.faction-page__quote figcaption::before { content: "— "; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.people img { width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--line); border-bottom: 3px solid var(--accent); border-radius: 4px; }
.people h3 { margin: 0.75rem 0 0.25rem; }
.people p { color: var(--text-2); margin: 0; }
.faction-page .commander { max-width: 46rem; }
.faction-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.faction-links .faction { padding: 0.75rem 1rem; }
.faction-links a { display: flex; align-items: center; gap: 0.75rem; color: var(--accent); font-weight: 700; text-decoration: none; }
.faction-links a::after { content: ""; position: absolute; inset: 0; }
.faction-links img { width: 48px; height: 48px; }

/* Commanders */
.commanders { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.commander { display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 1rem; }
.commander img { width: 9rem; height: 9rem; object-fit: cover; border-radius: 2px; }
.commander .zoom { border-radius: 2px; }
.commander h3 { margin: 0; }
.commander__role { color: var(--accent); font-weight: 500; margin: 0.15rem 0 0.5rem; }
.commander p { color: var(--text-2); margin-bottom: 0; }
.commander q { color: var(--text); font-style: italic; }
.commander--choir { --accent: #c77ddc; }
.commander--salvagers { --accent: var(--amber); }
.commander--thorns { --accent: #ff9a8c; }
.commander--helix { --accent: var(--cyan); }

/* Demo and community */
.install-notes { max-width: 40rem; margin: 1.5rem auto 0; text-align: left; color: var(--text-2); }
.install-notes details { border-top: 1px solid var(--line); padding: 0.5rem 0; }
.community { text-align: center; max-width: 48rem; }
.community .cta { justify-content: center; }
.community .section__lede { margin-inline: auto; }
.community__note { color: var(--text-2); }
.community__mail { color: var(--muted); font-size: 0.95rem; }

/* FAQ */
.faq { max-width: 52rem; }
.faq details, .install-notes details { border-bottom: 1px solid var(--line); }
.faq summary, .install-notes summary { cursor: pointer; font-weight: 700; padding: 0.9rem 0; list-style-position: outside; }
.faq summary:hover, .install-notes summary:hover { color: var(--cyan-hi); }
.faq details p { color: var(--text-2); margin: 0 0 1rem; }

/* Trailer: YouTube click-to-play poster */
.trailer__facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #000; cursor: pointer; overflow: hidden; }
.trailer__facade img { width: 100%; height: 100%; object-fit: cover; }
.trailer__play { position: absolute; inset: 50% auto auto 50%; width: 5rem; height: 5rem; margin: -2.5rem 0 0 -2.5rem; border-radius: 50%; background: rgba(7, 16, 25, 0.75); border: 2px solid var(--cyan); }
.trailer__play::after { content: ""; position: absolute; left: 1.9rem; top: 1.4rem; border-style: solid; border-width: 1.1rem 0 1.1rem 1.8rem; border-color: transparent transparent transparent var(--cyan-hi); }
.trailer__facade:hover .trailer__play { background: rgba(53, 199, 208, 0.25); }
.trailer__note { position: absolute; right: 0.75rem; bottom: 0.6rem; font-size: 0.85rem; color: var(--text-2); background: rgba(7, 16, 25, 0.8); padding: 0.15rem 0.5rem; }
.trailer iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 4px; display: block; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; overflow: visible; }
.lightbox::backdrop { background: rgba(7, 16, 25, 0.92); }
.lightbox img, .lightbox video { max-height: 84vh; width: auto; max-width: 95vw; margin: 0 auto; display: block; }
.lightbox [hidden] { display: none; }
.lightbox__caption { text-align: center; color: var(--text-2); margin: 0.6rem 0 0; }
.lightbox__btn { position: fixed; width: 3rem; height: 3rem; border: 1px solid var(--line); border-radius: 50%; background: rgba(11, 24, 34, 0.9); color: var(--text); font: 700 1.8rem/1 var(--font); cursor: pointer; }
.lightbox__btn:hover { border-color: var(--cyan); color: var(--cyan-hi); }
.lightbox__prev { left: 1rem; top: 50%; }
.lightbox__next { right: 1rem; top: 50%; }
.lightbox__close { right: 1rem; top: 1rem; }
.lightbox--single .lightbox__prev, .lightbox--single .lightbox__next { display: none; }
.zoom { display: block; overflow: hidden; cursor: zoom-in; }
.zoom img, .zoom video { transition: transform 200ms; }
.zoom:hover img, .zoom:hover video { transform: scale(1.03); }
.zoom video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Sub-pages */
.page { max-width: 64rem; }
.page h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; margin: 0 0 0.75rem; }
.page h2 { margin-top: 3rem; }
.page__lede { color: var(--text-2); font-size: 1.2rem; max-width: 46rem; }
.page__meta { color: var(--muted); }
.page .gallery { margin-top: 1rem; }
.facts { border-collapse: collapse; width: 100%; max-width: 46rem; }
.facts th, .facts td { text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { color: var(--muted); font-weight: 500; width: 11rem; }
.facts--compact { font-size: 0.95rem; margin: 0 0 1rem; }
.facts--compact thead th { text-align: left; color: var(--text); font-weight: 500; }
.faq .facts td { color: var(--text-2); }
.facts--compact th[scope="row"] { width: 6rem; }
.facts--compact > tbody:last-child > tr:last-child > * { border-bottom: 0; }  /* the answer's own rule closes the table */
.facts--specs { max-width: none; margin-bottom: 0.5rem; }
.facts--specs thead th { width: 28%; }
.facts--specs tbody th { color: var(--text); font-weight: 700; }
.facts--specs tbody th span { display: block; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.facts__note { color: var(--muted); font-size: 0.9rem; }
.feature-list--plain { margin-top: 0; }
.badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.badges li { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-2); font-weight: 500; }
.credits { display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.credits dt { font-weight: 700; }
.credits dd { margin: 0; color: var(--text-2); }
.post { max-width: 46rem; }
/* Latest news on the home page: one card, the whole card is the link. */
.latest { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; max-width: 64rem; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--cyan); padding: 1rem; color: inherit; text-decoration: none; }
.latest img { border-radius: 2px; transition: transform 200ms; }
.latest:hover img { transform: scale(1.02); }
.latest h3 { margin: 0.25rem 0 0.5rem; font-size: 1.6rem; }
.latest p { color: var(--text-2); }
.latest__meta { margin: 0; font-weight: 500; }
.latest__meta span { color: var(--cyan); text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-display); }
.latest__more { color: var(--cyan-hi); font-weight: 700; }
.latest:hover .latest__more { text-decoration: underline; }
.post img { border: 1px solid var(--line); border-radius: 4px; margin: 1rem 0; }
.post__clip { margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.post li { color: var(--text-2); margin-bottom: 0.4rem; }
.post li strong { color: var(--text); }
.not-found { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 560px) { .credits { grid-template-columns: 1fr; } .credits dd { margin-bottom: 0.75rem; } .facts th { width: auto; } .facts td { overflow-wrap: anywhere; } }

/* Footer links */
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-bottom: 1rem; }
.footer__links a { color: var(--text-2); }
.footer__consent { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; cursor: pointer; }
.consent { position: fixed; z-index: 20; left: 1rem; right: 1rem; bottom: 1rem; max-width: 34rem; margin-left: auto; padding: 1rem 1.25rem;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--cyan); box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 0.5); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 0.75rem; color: var(--text-2); font-size: 0.95rem; }
.consent__buttons { display: flex; gap: 0.75rem; }
.consent__buttons .btn { flex: 1; }

/* Mobile menu button */
.nav__toggle { display: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: rgba(11, 24, 34, 0.8); cursor: pointer; }
.nav__toggle-bars, .nav__toggle-bars::before, .nav__toggle-bars::after { display: block; width: 1.25rem; height: 2px; margin: 0 auto; background: var(--text); position: relative; transition: transform 150ms; }
.nav__toggle-bars::before, .nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media (max-width: 1100px) {
  .factions { grid-template-columns: repeat(3, 1fr); }
  .nav__links { gap: 1.1rem; }  /* the full menu still fits beside the wordmark down to 901 px */
}
@media (max-width: 900px) {
  .about, .story, .pillars, .commanders, .latest, .deep { grid-template-columns: 1fr; }
  .deep__card, .deep__card--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .factions, .faction-links { grid-template-columns: repeat(2, 1fr); }
  .nav__toggle { display: block; }
  .nav__links { display: none; position: absolute; top: 100%; right: clamp(1rem, 5vw, 4rem); z-index: 5; flex-direction: column; gap: 0; min-width: 12rem; background: var(--panel); border: 1px solid var(--line); padding: 0.5rem 0; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.65rem 1.25rem; }
  .hero__bg { inset: 0; opacity: 0.5; background:
    linear-gradient(0deg, var(--bg) 0%, transparent 30%),
    url("/img/hero-900.webp?v=ea8be1633c") center / cover no-repeat; }
}
@media (max-width: 560px) {
  .facts--specs thead { display: none; }
  .facts--specs tr { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  .facts--specs th, .facts--specs td { display: block; border: 0; padding: 0.25rem 0; width: auto; }
  .facts--specs td::before { display: block; color: var(--muted); font-size: 0.85rem; }
  .facts--specs td:nth-of-type(1)::before { content: "macOS"; }
  .facts--specs td:nth-of-type(2)::before { content: "Windows"; }
  .facts--specs td:nth-of-type(3)::before { content: "Linux"; }
  .gallery, .factions, .people, .faction-links { grid-template-columns: 1fr; }
  .factions .faction { flex-direction: row; align-items: stretch; }
  .faction__art { width: 6.5rem; flex: none; aspect-ratio: auto; height: auto; min-height: 11rem;
    -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
  .faction__body { margin: 0; padding: 1rem 1rem 1rem 0.5rem; }
  .commander { grid-template-columns: 6rem 1fr; }
  .commander img { width: 6rem; height: 6rem; }
}

/* Print (the press fact sheet, the legal pages): black on white, no chrome, link targets spelled out. */
@media print {
  :root { --bg: #fff; --panel: #fff; --text: #000; --text-2: #222; --muted: #444; --cyan-hi: #000; --line: #bbb; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .skip-link, .hero__bg, .cta, .btn, .lightbox, .consent, .trailers, .footer__links, .install-notes, .nav__toggle { display: none !important; }
  .section, .page { padding: 0; max-width: none; }
  h1, h2, h3, .title { color: #000 !important; background: none !important; -webkit-text-fill-color: #000; text-shadow: none !important; }
  h2, h3 { break-after: avoid; }
  img, tr, li, .commander, .faction, .post { break-inside: avoid; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .page a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .faq details { display: block; }
  .faq details > p { display: block; }
}

/* Achievements (/achievements, built by scripts/build-achievements.py). Tier colours are the game's (Achievements.uss). */
.achievements__count { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-2); margin: 0 0 1rem; }
.achievements__count strong { color: var(--cyan); font-size: 1.6rem; }
.achievements__toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 2rem; }
.achievements__group { margin-top: 2.5rem; }
.achievements__group h2 span { color: var(--muted); font-size: 0.7em; margin-left: 0.4rem; }
.achievements__group > p { color: var(--text-2); margin-top: 0; }
.achievements { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 0.75rem; }
.achievement { --tier: #25d9e8; display: flex; gap: 1rem; align-items: center; padding: 0.75rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--tier); }
.achievement img { width: 4.5rem; height: 4.5rem; flex: none; }
.achievement h3 { margin: 0 0 0.2rem; font-size: 1.05rem; color: var(--text); }
.achievement p { margin: 0; color: var(--text-2); font-size: 0.95rem; }
.achievement--merit { --tier: #5ac57b; }
.achievement--elite { --tier: #a85ee0; }
.achievement--charter { --tier: #e9aa22; }
.skins__faction { margin: 1.75rem 0 0; font-size: 1.15rem; color: var(--text); }
.skins { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr)); gap: 0.75rem; }
.skin { padding: 0.9rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan); }
.skin h4 { margin: 0; font-size: 1.1rem; color: var(--text); }
.skin__riddle { margin: 0.15rem 0 0.6rem; color: var(--text-2); font-style: italic; }
.skin__pair, .skins__kitty { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.skins__kitty { grid-template-columns: repeat(3, 1fr); max-width: 52rem; margin: 1rem 0 0.5rem; }
.skin figure, .skins__kitty figure { margin: 0; }
.skin img, .skins__kitty img { display: block; width: 100%; height: auto; border-radius: 4px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--cyan) 10%, var(--panel)) 0%, var(--bg) 75%); }
.skin figcaption, .skins__kitty figcaption { margin-top: 0.35rem; font-size: 0.95rem; color: var(--text); }
.skin figcaption span, .skins__kitty figcaption span { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.achievements--classified { grid-template-columns: repeat(auto-fill, 4rem); gap: 0.5rem; }
.achievements--classified img { width: 4rem; height: 4rem; display: block; }

/* Flight school (/flight-school, built by scripts/build-flight-school.py). */
.techs { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.tech { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: center; padding: 1.25rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan); }
.tech:not(:has(.zoom)) { grid-template-columns: 1fr; }
.tech .zoom video { display: block; width: 100%; height: auto; }
.tech h2 { margin: 0 0 0.35rem; font-size: 1.6rem; }
.tech p { margin: 0.5rem 0 0; color: var(--text-2); }
.tech__input { font-weight: 600; color: var(--text) !important; }
kbd { font-family: inherit; font-size: 0.85em; font-weight: 700; padding: 0.1em 0.45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--bg); color: var(--cyan); white-space: nowrap; }
.speedtech { margin-top: 3rem; }
.speedtech > p { color: var(--text-2); }
.speedtech dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.75rem 1.5rem; margin: 1rem 0 0; }
.speedtech dt { font-weight: 700; color: var(--text); }
.speedtech dd { margin: 0; color: var(--text-2); }
@media (max-width: 760px) {
  .tech { grid-template-columns: 1fr; }
  .speedtech dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .speedtech dd { margin-bottom: 0.75rem; }
}

/* Phones: the home cards' picture goes on top (after the 900px rule, which sets two columns). */
@media (max-width: 560px) {
  .deep__card, .deep__card--wide { grid-template-columns: 1fr; grid-template-rows: none; }
  .deep__card > .deep__media, .deep__card > .deep__icons { grid-row: auto; margin-bottom: 0.75rem; }
  .deep__card > :not(.deep__media):not(.deep__icons) { grid-column: 1; }
}

/* Arsenal (/weapons, scripts/build-weapons.py): each weapon with its clip; its evolutions under it. */
.arms__count { color: var(--text-2); margin: 0 0 1rem; }
.arms__index { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; margin: 0 0 2rem; }
.arms__index a { font-size: 0.9rem; padding: 0.2rem 0.55rem; border: 1px solid var(--line); text-decoration: none; }
.arms__index a:hover, .arms__index a:focus-visible { border-color: var(--cyan); }
.arms { display: grid; gap: 1.5rem; }
/* A clip's 960 px width must not stretch the column past a phone's screen. */
.arms > *, .arm__evolutions > * { min-width: 0; }
.arms--fusions { margin-top: 3rem; }
.arms--fusions > h2 { margin-bottom: 0; }
.arm { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--cyan); padding: 1rem; scroll-margin-top: 5rem; }
.arm--evolution { border-top-color: var(--amber); background: rgba(255, 255, 255, 0.02); }
.arm > p { margin: 0.4rem 0 0; max-width: 60rem; }
.arm__name { display: flex; align-items: center; gap: 0.6rem; margin: 0.8rem 0 0; }
.arm__name img { width: 40px; height: 40px; flex: none; }
.arm__clip { position: relative; aspect-ratio: 16 / 9; background: #000; max-width: 960px; }
.arm__clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
.arm__sound {
  position: absolute; right: 0.6rem; bottom: 0.6rem; padding: 0.35rem 0.75rem; font: inherit; font-size: 0.9rem;
  color: var(--text); background: rgba(7, 16, 25, 0.78); border: 1px solid var(--cyan); cursor: pointer;
}
.arm__sound:hover, .arm__sound:focus-visible { background: var(--cyan); color: var(--bg); }
.arm__sound[aria-pressed="true"] { background: var(--cyan); color: var(--bg); }
/* Play: a big triangle on the poster; once playing, a small pause switch in the corner. */
.arm__play {
  position: absolute; inset: 50% auto auto 50%; width: 4.5rem; height: 4.5rem; transform: translate(-50%, -50%);
  padding: 0; background: rgba(7, 16, 25, 0.78); border: 1px solid var(--cyan); border-radius: 50%; cursor: pointer;
}
.arm__play span { display: block; border-style: solid; border-width: 0.9rem 0 0.9rem 1.5rem; border-color: transparent transparent transparent var(--cyan); width: 0; height: 0; margin-inline: auto; transform: translateX(0.15rem); }
.arm__play:hover, .arm__play:focus-visible { background: var(--cyan); }
.arm__play:hover span, .arm__play:focus-visible span { border-left-color: var(--bg); }
.arm__play[aria-pressed="true"] { inset: auto auto 0.6rem 0.6rem; width: 2.2rem; height: 2.2rem; transform: none; border-radius: 0; }
.arm__play[aria-pressed="true"] span { width: 0.7rem; height: 0.9rem; border: solid var(--cyan); border-width: 0 0.22rem; transform: none; }
.arm__play[aria-pressed="true"]:hover span, .arm__play[aria-pressed="true"]:focus-visible span { border-color: var(--bg); }
.arm__recipe { color: var(--text-2); font-size: 0.95rem; }
.arm__fuses { font-size: 0.95rem; }
.arm__evolutions { display: grid; gap: 1rem; margin-top: 1.2rem; }
.arm__evolves { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
@media (min-width: 900px) {
  .arm__evolutions { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
