/* Cinderwing: "Squadron red", the game's menus on the web.
   Colours are the game's MenuKit tokens (ui/theme/tokens.json): black panels, red accent line along the top,
   cut corners top left and bottom right, italic Exo 2 headings, Saira labels. */

@font-face {
  font-family: "Exo 2";
  src: url("../fonts/Exo2-Italic-VF.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Saira Semi Condensed";
  src: url("../fonts/SairaSemiCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Saira Semi Condensed";
  src: url("../fonts/SairaSemiCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-hi: #1c1c20;
  --line: #2e2e34;
  --text: #e8ecf4;
  --muted: #a8a8b0;
  --accent: #e0242c;
  --accent-deep: #a8101f;
  --accent-text: #ff6068;
  --warning: #ffb547;
  --info: #6fe7ff;
  --glow: #6e0a1b;
  --cut: 14px;
  --wrap: 1180px;
  --head: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --body: "Saira Semi Condensed", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: #ff8a90; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--head);
  font-style: italic;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent-deep); color: #fff; padding: 0.6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Kicker: the game's small caps label with lines */
.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 0.85rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent-text); margin: 0 0 0.9rem;
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 11, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 -1px var(--accent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.brand span { font: italic 800 1.25rem/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  color: var(--text); text-decoration: none;
  font: 600 0.85rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.5rem 0; display: inline-block; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); color: #fff; }
@media (max-width: 760px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.6rem 0; }
  .nav { gap: 0.1rem 1rem; }
  .nav .opt { display: none; }
  .site-header { position: static; }
}

/* Buttons: cut-corner tiles */
.btn {
  --c: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.8rem 1.6rem;
  font: 700 1rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none;
  color: #fff; background: var(--accent-deep);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  box-shadow: inset 0 2px 0 var(--accent-text);
}
.btn:hover { background: #c4142a; color: #fff; }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.btn.ghost { background: var(--surface-hi); box-shadow: inset 0 2px 0 var(--accent), inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #26262c; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }

/* Panels */
.panel {
  position: relative;
  background: var(--surface);
  padding: 1.5rem 1.5rem 1.3rem;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 2px 0 var(--accent), inset 0 0 0 1px var(--line);
}
.panel h3 { margin-bottom: 0.4em; }
.panel p:last-child { margin-bottom: 0; }

/* Hero: the art is its own block (tall render on the right on desktop, on top on tablet and phone),
   so the ship, the boss and the planet are never hidden under the text. */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--accent); background: #060609; }
.hero-media { display: block; position: relative; }
.hero-art { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero-copy { position: relative; padding: 0 0 3rem; }
.hero-logo { width: min(560px, 100%); margin: 0 0 1rem -0.5rem; }
.tagline { font: italic 700 clamp(1.25rem, 2.4vw, 1.65rem)/1.3 var(--head); max-width: 30ch; margin-bottom: 0.6rem; }
.hero .lede { color: #cfd3dc; max-width: 46ch; margin-bottom: 1.6rem; }
.hero small { display: block; color: var(--muted); margin-top: 0.9rem; font-size: 0.9rem; }
/* phone: tall art cropped 4:5, text below */
.hero-media { aspect-ratio: 4 / 5; }
.hero-art { object-position: 50% 72%; }
.hero-media::after { background: linear-gradient(0deg, #060609 0%, rgba(6,6,9,0) 30%); }
.hero-copy { margin-top: -3rem; }
/* tablet: the wide art, whole */
@media (min-width: 601px) {
  .hero-media { aspect-ratio: 16 / 9; }
  .hero-art { object-position: 50% 50%; }
  .hero-copy { margin-top: 0; padding-top: 1.5rem; }
}
/* desktop: text left, tall art filling the right half */
@media (min-width: 1000px) {
  .hero .wrap { min-height: min(86vh, 780px); display: flex; align-items: center; }
  .hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; aspect-ratio: auto; }
  .hero-art { object-position: 50% 88%; }
  .hero-media::after { background: linear-gradient(90deg, #060609 0%, rgba(6,6,9,0) 28%), linear-gradient(0deg, rgba(6,6,9,0.6) 0%, rgba(6,6,9,0) 20%); }
  .hero-copy { margin: 0; padding: 4rem 0; max-width: 46%; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.alt { background: linear-gradient(180deg, #0f0f11, var(--bg)); border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 1.1rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.stat { font: italic 800 2.2rem/1 var(--head); color: var(--accent-text); display: block; margin-bottom: 0.3rem; }

/* Stage route */
.route { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.route li {
  counter-increment: st;
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 0.8rem; align-items: baseline;
  padding: 0.75rem 1rem; background: var(--surface); border-left: 2px solid var(--accent);
}
.route li::before { content: counter(st); grid-row: span 2; font: italic 800 1.6rem/1 var(--head); color: var(--accent-text); }
.route strong { font-weight: 600; }
.route span { color: var(--muted); font-size: 0.95rem; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1.2rem; }

/* Gallery: swap files in assets/img/shots/ (see README) */
.gallery {
  list-style: none; margin: 0; padding: 0 0 1rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 23%);
  gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery li { scroll-snap-align: start; }
.gallery a { display: block; }
.gallery img {
  width: 100%; aspect-ratio: 1 / 2; object-fit: cover; background: var(--surface);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.gallery a:focus-visible { outline-offset: 2px; }
@media (max-width: 760px) { .gallery { grid-auto-columns: 62%; } }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--accent-deep); }
.gallery { scrollbar-color: var(--accent-deep) var(--surface); }

/* Trailer slot */
.trailer { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 760px) { .trailer { grid-template-columns: 1fr; } }
.trailer-frame { position: relative; display: block; max-width: 300px; }
.trailer-frame img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.trailer-frame .play {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; display: grid; place-items: center;
  background: var(--accent-deep); box-shadow: inset 0 2px 0 var(--accent-text);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.trailer-frame .play::after { content: ""; border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; margin-left: 6px; }
.trailer-frame:hover .play { background: #c4142a; }

/* Cast */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } }
.faces { display: flex; gap: 1rem; margin: 1.5rem 0 0; }
.faces figure { margin: 0; flex: 1; max-width: 200px; }
.faces img { width: 100%; aspect-ratio: 1; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); border-top: 2px solid var(--c, var(--accent)); }
.faces figcaption { font: 600 0.85rem/1.3 var(--body); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.5rem; color: var(--muted); }
.cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.cast li { background: var(--surface); padding: 0.8rem 1rem; border-left: 3px solid var(--c, var(--accent)); }
.cast strong { display: block; font: italic 800 1.1rem/1.2 var(--head); }
.cast span { color: var(--muted); font-size: 0.97rem; }

/* Platforms */
.platforms { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.platforms > :only-child { max-width: 36rem; }
.badge { display: inline-block; font: 700 0.75rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.14em; padding: 0.4rem 0.6rem; background: var(--accent-deep); color: #fff; margin-bottom: 0.8rem; }
.badge.muted { background: var(--surface-hi); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* Document pages (privacy, support, press) */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem;
  background: radial-gradient(ellipse at 15% 0%, rgba(110, 10, 27, 0.55), transparent 60%); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; margin-bottom: 0.4rem; }
.page-head p { color: var(--muted); margin: 0; }
.doc { padding-bottom: 4rem; }
.doc h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-top: 2.2rem; text-transform: none; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .panel { margin: 1.5rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.facts dt { font: 600 0.85rem/1.6 var(--body); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); padding-top: 0.15rem; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 0.1rem; } .facts dd { margin-bottom: 0.7rem; } }
details { background: var(--surface); margin-bottom: 0.6rem; border-left: 2px solid var(--accent); }
summary { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 600; }
details > div { padding: 0 1.1rem 1rem; color: #d3d6de; }
.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.downloads a { display: block; text-decoration: none; color: var(--text); background: var(--surface); padding: 0.8rem; box-shadow: inset 0 2px 0 var(--accent); height: 100%; }
.downloads a:hover { background: var(--surface-hi); }
.downloads img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #050506; margin-bottom: 0.6rem; }
.downloads span { display: block; color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer { border-top: 2px solid var(--accent); background: #070708; padding: 2.5rem 0; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0; padding: 0; }
.site-footer a { color: var(--text); }
.site-footer p { margin: 0; }
.doc .downloads { padding-left: 0; }
.downloads.tall img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; }
