/* shutdown's website, dressed in the game's own menu theme: hud/theme.css and
   the hud/ui_*.png pieces are generated from ui/themes (tools/web_hud.gd).
   The frames are used where the game uses them: the menu, keys, the header
   bar and screens (screenshots). Running text sits on the plain background. */

@font-face { font-family: "Silkscreen"; src: url("fonts/Silkscreen-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("fonts/Silkscreen-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #111417;
  --text: #c3c9ce;          /* GAUGE_OK */
  --bright: #e6e9ec;
  --muted: #9aa1a7;
  --accent: #b98c4c;        /* HudPlate.ACCENT */
  --green: #66ff73;         /* UnitWireframe.GREEN */
  --yellow: #ffd140;        /* UnitWireframe.YELLOW */
  --blue: #6fa6c4;
  --rule: #262c31;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; color: var(--text); background: var(--bg); font: 17px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, .key, time, kbd, .brand, .status { font-family: var(--pixel); font-weight: 400; }
b { color: var(--bright); font-weight: 600; }

/* ---- The game's menu theme (.ui-* from hud/theme.css) ---- */

.ui-panel img, .ui-screen img { image-rendering: auto; }  /* screenshots scale smoothly */
.ui-screen { display: block; }
a.ui-screen:hover { border-image-source: url("hud/ui_card_active.png"); }

.key {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; text-transform: uppercase; letter-spacing: 1px; font-size: 13px;
  padding: 4px 10px;
}
.key:hover { border-image-source: url("hud/ui_button_hover.png"); }
.key:active { border-image-source: url("hud/ui_button_pressed.png"); padding-top: 6px; padding-bottom: 2px; }

/* An action key with its icon and hotkey, as in the HUD's actions grid. */
.slot { position: relative; flex: none; width: 56px; height: 56px; display: inline-grid; place-items: center; }
.slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.slot kbd { position: absolute; right: 2px; bottom: -2px; font-size: 11px; color: var(--bright); }

.lamp { width: 8px; height: 8px; flex: none; background: var(--accent); }
.lamp.on { background: var(--green); }

/* ---- Header and hero ---- */

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--bright); text-decoration: none; font-size: 18px; letter-spacing: 2px; text-transform: uppercase; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav .key { font-size: 11px; padding: 2px 10px; }

.hero { position: relative; min-height: min(80vh, 760px); display: grid; align-content: center; padding: 48px 24px 40px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, var(--bg)); }
.menu { position: relative; z-index: 1; width: 100%; max-width: 440px; margin-left: max(0px, calc((100vw - 1080px) / 2)); }
h1 { margin: 0; font-size: clamp(30px, 7vw, 46px); line-height: 1.3; letter-spacing: 3px; color: var(--bright); text-align: center; font-weight: 700; padding: 6px 0; }
.tag { margin: 16px 10px 18px; color: var(--bright); }
.menu-keys { margin: 0 10px 18px; }
.menu-keys .key { padding: 8px 18px; }
.status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--bright); }
.hero-note { position: absolute; z-index: 1; right: 16px; bottom: 8px; margin: 0; font-size: 13px; color: var(--bright); text-shadow: 0 1px 2px #000; }

/* ---- Sections ---- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 72px 24px 0; }
h2 { display: inline-block; margin: 0 0 32px; font-size: 20px; letter-spacing: 3px; text-transform: uppercase; color: var(--bright); padding: 2px 6px; }
h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; color: var(--bright); }
figure { margin: 0; }
figcaption, .aside { color: var(--muted); font-size: 15px; }
figcaption { margin-top: 8px; }
.aside { max-width: 62ch; margin: -16px 0 24px; }

.note p { max-width: 62ch; }
.note .lead { margin-top: 0; }
.sign { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.sign .name { font-family: var(--pixel); font-size: 22px; letter-spacing: 2px; color: var(--accent); }
.key.ui-button_disabled { cursor: default; }
.key.ui-button_disabled:hover, .key.ui-button_disabled:active { border-image-source: url("hud/ui_button_disabled.png"); padding-top: 4px; padding-bottom: 4px; }
.menu-keys { display: flex; flex-wrap: wrap; gap: 10px; }
.menu-keys .key.ui-button_disabled:hover, .menu-keys .key.ui-button_disabled:active { padding-top: 8px; padding-bottom: 8px; }

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.note { padding-top: 48px; }
.copy { max-width: 60ch; }
.copy p:first-child { margin-top: 0; }
.lead { font-size: 20px; line-height: 1.5; color: var(--bright); }

.modes { margin: 24px 0 0; border-top: 1px solid var(--rule); }
.modes div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.modes dt { font-family: var(--pixel); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--green); padding-top: 2px; }
.modes dd { margin: 0; }
.core { max-width: 66ch; margin: 0 0 64px; }
.core .kicker { font-family: var(--pixel); font-size: 22px; line-height: 1.4; letter-spacing: 1px; text-transform: uppercase; color: var(--yellow); margin: 0 0 16px; }
.core p { font-size: 19px; line-height: 1.55; }
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 36px; align-items: center; margin-bottom: 64px; }
.feature.flip > .ui-screen { order: 2; }
.feature-text p { margin: 0 0 14px; max-width: 58ch; }
.feature-text h3 + p { margin-top: 4px; }
.feature-text p + h3 { margin-top: 28px; }

.videos { display: grid; gap: 20px; }
.video { aspect-ratio: 16/9; position: relative; padding: 0; }
.video iframe, .video button.play { width: 100%; height: 100%; border: 0; display: block; }
.video button.play { all: unset; cursor: pointer; width: 100%; height: 100%; background-size: cover; background-position: center; display: grid; place-items: center; }
.video button.play::after { content: "▶"; font-size: 24px; color: var(--bright); width: 72px; height: 52px; display: grid; place-items: center; border: 8px solid transparent; border-image: url("hud/ui_button_normal.png") 4 fill / 8px; image-rendering: pixelated; }
.video button.play:hover::after { border-image-source: url("hud/ui_button_hover.png"); }

.missions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.missions img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.gallery .wide { grid-column: span 2; grid-row: span 2; }
.gallery .wide img { height: 100%; }

.log { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.log li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--rule); }
.log li:last-child { border-bottom: 1px solid var(--rule); }
.log time { font-size: 12px; color: var(--green); letter-spacing: 1px; padding-top: 3px; }
.log h3 { margin-bottom: 4px; }
.log p { margin: 0; }

.foot { padding-bottom: 56px; color: var(--muted); font-size: 15px; }
.foot p { margin: 4px 0; }
.small { font-size: 13px; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,7,8,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox .ui-panel { max-width: min(1400px, 96vw); }
.lightbox img { max-height: 84vh; }

@media (max-width: 820px) {
  .about, .feature, .missions { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature.flip > .ui-screen { order: 0; }
  .feature { margin-bottom: 48px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .wide { grid-row: auto; }
  .wrap { padding: 56px 16px 0; }
  .hero { padding: 32px 16px 48px; }
  .hero-note { left: 16px; }
}
@media (max-width: 560px) {
  nav .key:not(:first-child) { display: none; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .wide { grid-column: auto; }
  .log li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
