/*! © 2026 SH Games. All rights reserved. */
/* SH Games — deep space command UI */

:root {
  --bg: #050b1f;
  --bg-2: #081433;
  --line: rgba(122, 166, 255, 0.18);
  --line-strong: rgba(122, 166, 255, 0.38);
  --line-bright: rgba(170, 205, 255, 0.7);

  --cyan: #5ee6f0;
  --cyan-bright: #bff8fc;
  --cyan-soft: rgba(94, 230, 240, 0.14);
  --blue: #3d7bff;
  --blue-bright: #8fc0ff;
  --orange: #ff9a2a;
  --orange-bright: #ffc35c;
  --red: #ff5d6c;
  --green: #6ee7a8;

  --laser: #bff8fc;
  --plasma: #c9a0ff;
  --rocket: #ffb36b;
  --shield: #8fb8ff;
  --hostile: #ff5d6c;

  --text: #e8f0ff;
  --muted: #a9b9da;
  --faint: #8194c0;

  --font-display: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Type scale: 12 is the floor for anything people need to read */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --space-section: clamp(64px, 8vw, 104px);

  --glass: linear-gradient(180deg, rgba(36, 72, 160, 0.34), rgba(9, 21, 56, 0.8) 40%, rgba(6, 15, 42, 0.88));
  --glow-blue: 0 0 24px rgba(61, 123, 255, 0.35);
}

/* The condensed face has no Cyrillic, so Ukrainian and Russian headings use Plex Sans */
:lang(uk), :lang(ru) { --font-display: 'IBM Plex Sans', system-ui, sans-serif; }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* No background on body: it would paint over the fixed nebula layers below */
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Deep space behind the whole page: a generated nebula plus a sparse star pattern */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
body::before {
  background: url("../img/nebula.webp") 70% 20% / cover no-repeat, var(--bg);
}
body::after {
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 68% 42%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 76%, rgba(191, 248, 252, 0.7), transparent 60%),
    radial-gradient(1px 1px at 86% 84%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 24% 58%, rgba(255, 255, 255, 0.45), transparent 60%),
    linear-gradient(180deg, rgba(5, 11, 31, 0.1), rgba(5, 11, 31, 0.55) 60%, rgba(5, 11, 31, 0.75));
  background-size: 340px 340px, 280px 280px, 420px 420px, 380px 380px, 300px 300px, 100% 100%;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }

::selection { background: rgba(94, 230, 240, 0.3); color: #fff; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 15px 16px;
  background: var(--orange);
  color: #2b1200;
  font: 600 14px/1 var(--font-mono);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Glass panel ---------- */

.panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(190, 215, 255, 0.24),
    inset 0 0 0 1px rgba(6, 15, 42, 0.5),
    0 18px 50px rgba(0, 4, 20, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* Bright top edge and corner brackets, the signature of the command UI */
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  --c: rgba(127, 190, 255, 0.85);
  --s: 16px;
  background:
    linear-gradient(90deg, transparent 8%, rgba(143, 192, 255, 0.8) 50%, transparent 92%) top / 100% 1px,
    linear-gradient(var(--c), var(--c)) top left / var(--s) 2px,
    linear-gradient(var(--c), var(--c)) top left / 2px var(--s),
    linear-gradient(var(--c), var(--c)) bottom right / var(--s) 2px,
    linear-gradient(var(--c), var(--c)) bottom right / 2px var(--s);
  background-repeat: no-repeat;
}

/* Trapezoid tab on panels */
.panel-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 24px;
  color: var(--cyan-bright);
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(61, 123, 255, 0.42), rgba(16, 40, 100, 0.65));
  border-top: 1px solid rgba(143, 192, 255, 0.75);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
}
.panel-tab {
  position: absolute;
  top: -1px;
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  padding: 6px 26px 7px;
  white-space: nowrap;
  border-top: 0;
  border-bottom: 1px solid rgba(143, 192, 255, 0.75);
  background: linear-gradient(0deg, rgba(61, 123, 255, 0.45), rgba(16, 40, 100, 0.85));
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 12px 100%);
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 2em;
  border: 0;
  cursor: pointer;
  font: 600 16px/1 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
  transition: filter 0.2s, transform 0.1s;
}
:lang(uk) .btn, :lang(ru) .btn { font-family: 'IBM Plex Sans', sans-serif; letter-spacing: 0.04em; font-size: 15px; }
.btn > span { position: relative; z-index: 1; }
/* Gloss on the upper half */
.btn::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 3px;
  height: 46%;
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}
.btn:hover { filter: brightness(1.1) saturate(1.05); }
.btn:active { transform: translateY(1px); filter: brightness(0.96); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px rgba(0, 10, 40, 0.45); }

.btn-primary {
  color: #2b1200;
  background: linear-gradient(180deg, #ffd27f 0%, #ffad40 44%, #f07c10 56%, #ff9c2e 100%);
}
.btn-secondary {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 20, 80, 0.55);
  background: linear-gradient(180deg, #a3ccff 0%, #4f8bff 44%, #1f55d8 56%, #3a74ff 100%);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: linear-gradient(180deg, rgba(10, 24, 62, 0.92), rgba(6, 14, 38, 0.88));
  border-color: var(--line-strong);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 4, 20, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 30px; height: 30px; color: var(--cyan); filter: drop-shadow(0 0 8px rgba(94, 230, 240, 0.45)); }
.bm-reticle { stroke: var(--orange-bright); }
.brand-name {
  font: 600 17px/1 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-name span { color: var(--muted); }

.nav-list { list-style: none; }
.nav-list a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-list a:hover,
.nav-list a[aria-current="true"] { color: var(--cyan-bright); }

.header-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(6, 15, 42, 0.6);
}
.lang-switch button {
  min-width: 44px;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(180deg, #7fb2ff, #2d63e0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 12px rgba(61, 123, 255, 0.5);
}

.menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(127, 178, 255, 0.35), rgba(10, 24, 62, 0.9));
  cursor: pointer;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1099px) {
  .nav {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    left: 0; right: 0;
    display: none;
    padding: 4px var(--gutter) 20px;
    background: linear-gradient(180deg, rgba(10, 24, 62, 0.97), rgba(6, 14, 38, 0.97));
    border-bottom: 1px solid var(--line-strong);
  }
  .nav.is-open { display: block; }
  .nav-list a {
    display: block;
    padding: 16px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }
}
@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .nav { flex: 1; display: flex; justify-content: center; }
  .nav-list { display: flex; gap: clamp(18px, 2.4vw, 34px); }
  .nav-list a[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -10px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
  }
}
@media (max-width: 420px) {
  .brand .brand-name span { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(100svh, 960px);
  padding-top: calc(var(--header-h) + clamp(36px, 8vh, 100px));
  padding-bottom: 28px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-grid {
  position: absolute;
  left: -40%; right: -40%;
  bottom: 0;
  height: 30%;
  overflow: hidden;
  perspective: 480px;
  perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
}
.hero-grid-plane {
  position: absolute;
  inset: 0 0 auto 0;
  height: 320%;
  background: url("../img/hex-tile.svg") 0 0 / 60px 104px repeat;
  opacity: 0.5;
  transform-origin: 50% 0;
  transform: rotateX(70deg) translateY(-104px);
  animation: grid-drift 16s linear infinite;
  will-change: transform;
}
@keyframes grid-drift { to { transform: rotateX(70deg) translateY(0); } }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); }
}

.hero-game {
  margin-top: 0;
  color: var(--orange-bright);
  font: 600 clamp(1rem, 2vw, 1.25rem)/1 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 154, 42, 0.45);
}
.hero-title {
  margin: 0.2em 0 0.4em;
  font: 600 clamp(2.9rem, 8.6vw, 6.6rem)/0.94 var(--font-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 10, 40, 0.6);
}
:lang(uk) .hero-title,
:lang(ru) .hero-title {
  font-size: clamp(2.2rem, 6vw, 5rem);
  letter-spacing: -0.025em;
  line-height: 1;
}
.hero-line { display: block; }
.hero-lead {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Star map: decorative rings and orbits, no invented data */
.hero-map { display: none; }
@media (min-width: 960px) {
  .hero-map { display: block; justify-self: end; width: min(100%, 380px); }
}
.hero-map svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 20px rgba(61, 123, 255, 0.35)); }
.map-ring { fill: none; stroke: rgba(143, 192, 255, 0.28); stroke-width: 1; }
.map-ring-outer { stroke: rgba(143, 192, 255, 0.5); stroke-width: 1.5; }
.map-ring-dash { stroke-dasharray: 2 6; stroke: rgba(191, 248, 252, 0.45); }
.map-arc { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.map-arc-2 { stroke: var(--blue-bright); opacity: 0.6; }
.map-spin,
.map-orbit { transform-box: view-box; transform-origin: 200px 200px; }
.map-spin { animation: spin 40s linear infinite; }
.map-orbit-a { animation: spin 60s linear infinite; }
.map-orbit-b { animation: spin 34s linear infinite reverse; }
.map-orbit-c { animation: spin 24s linear infinite; }
.map-planet { fill: var(--blue-bright); }
.map-planet-warm { fill: var(--orange-bright); }
.map-hex { fill: rgba(94, 230, 240, 0.15); stroke: var(--cyan); stroke-width: 1.5; }
.map-sun { fill: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(44px, 8vh, 90px) 0 0;
  background: linear-gradient(180deg, rgba(36, 72, 160, 0.28), rgba(8, 20, 54, 0.7));
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(190, 215, 255, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-specs > div { padding: 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-specs > div:nth-child(2n) { border-right: 0; }
.hero-specs > div:nth-child(n + 3) { border-bottom: 0; }
.hero-specs dt {
  color: var(--faint);
  font: 500 var(--fs-xs)/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-specs dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: var(--fs-base);
  line-height: 1.35;
}
@media (min-width: 760px) {
  .hero-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-specs > div { border-bottom: 0; }
  .hero-specs > div:nth-child(2n) { border-right: 1px solid var(--line); }
  .hero-specs > div:last-child { border-right: 0; }
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  flex-shrink: 0;
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- Sections ---------- */

.section { position: relative; padding-block: var(--space-section); }
.section-head { margin-bottom: clamp(32px, 4vw, 48px); }
.section-title {
  max-width: 22ch;
  margin-top: 16px;
  font: 600 clamp(2rem, 4.6vw, 3.4rem)/1.04 var(--font-display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 0 30px rgba(61, 123, 255, 0.35);
}
:lang(uk) .section-title,
:lang(ru) .section-title {
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-lead {
  max-width: 38rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(var(--fs-base), 1.4vw, var(--fs-md));
  line-height: 1.6;
  text-wrap: pretty;
}
.note { margin-top: 24px; color: var(--faint); font: 400 var(--fs-sm)/1.6 var(--font-body); }

/* Cards */
.card-grid {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 20px);
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card { padding: 24px; }
.card h3 {
  margin: 16px 0 8px;
  font: 600 var(--fs-lg)/1.2 var(--font-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.card p { color: var(--muted); font-size: var(--fs-base); line-height: 1.6; }

/* Round glowing icon badge */
.badge {
  --w: var(--cyan-bright);
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(143, 192, 255, 0.65);
  background: radial-gradient(circle at 50% 30%, rgba(127, 178, 255, 0.5), rgba(16, 40, 100, 0.9) 70%);
  box-shadow: 0 0 18px rgba(61, 123, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.badge svg { width: 24px; height: 24px; }

.wi-line { fill: none; stroke: var(--w); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wi-dot { fill: var(--w); }

/* Status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(6, 15, 42, 0.6);
  font: 500 var(--fs-xs)/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-done { color: var(--green); border-color: rgba(110, 231, 168, 0.45); background: rgba(110, 231, 168, 0.08); }
.chip-now { color: var(--orange-bright); border-color: rgba(255, 195, 92, 0.45); background: rgba(255, 154, 42, 0.1); }

/* ---------- Combat prototype ---------- */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 20px);
}
@media (min-width: 1000px) {
  .demo { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
}
.demo-main { padding-top: 0; }

.demo-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(61, 123, 255, 0.18), transparent);
  border-radius: 6px 6px 0 0;
  font-family: var(--font-mono);
}
.hud-cell { display: flex; align-items: center; gap: 8px; }
.hud-label { color: var(--faint); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; }
.hud-value { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-phase .hud-value { color: var(--cyan-bright); text-transform: uppercase; font-size: 13px; letter-spacing: 0.1em; }
.hud-timer .hud-value { min-width: 2ch; text-align: right; }

.timer-ring { width: 28px; height: 28px; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: rgba(122, 166, 255, 0.3); stroke-width: 3; }
.timer-bar {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-dasharray: 94.25;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.2s linear, stroke 0.2s;
}
.hud-timer.is-warn .timer-bar { stroke: var(--orange); }
.hud-timer.is-crit .timer-bar { stroke: var(--red); }
.hud-timer.is-crit .hud-value { color: var(--red); }
.hud-timer.is-idle { opacity: 0.5; }

.board-wrap {
  position: relative;
  padding: clamp(10px, 2vw, 22px) clamp(8px, 2vw, 22px) 30px;
  background: radial-gradient(ellipse at 50% 45%, rgba(61, 123, 255, 0.16), transparent 70%);
}
.board {
  width: 100%;
  max-width: 540px;
  max-height: max(420px, 64vh);
  height: auto;
  margin: 0 auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.board:focus { outline: none; }
.board:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.board-tag {
  position: absolute;
  right: 14px; bottom: 8px;
  color: var(--faint);
  font: 400 var(--fs-xs)/1.4 var(--font-mono);
  letter-spacing: 0.04em;
}

/* Board cells */
.cell {
  fill: url(#hexFill);
  stroke: rgba(122, 166, 255, 0.3);
  stroke-width: 1;
  transition: stroke 0.15s;
}
.board { --aim: var(--laser); }
.board[data-weapon="plasma"] { --aim: var(--plasma); }
.board[data-weapon="rocket"] { --aim: var(--rocket); }
.cell.is-move { fill: url(#hexMove); stroke: rgba(94, 230, 240, 0.75); cursor: pointer; }
.cell.is-ram { fill: url(#hexRam); stroke: var(--hostile); stroke-width: 1.5; cursor: pointer; }
.cell.is-aim { fill: color-mix(in srgb, var(--aim) 9%, rgba(10, 26, 70, 0.6)); stroke: color-mix(in srgb, var(--aim) 60%, transparent); stroke-dasharray: 4 3; cursor: crosshair; }
.cell.is-blast { fill: rgba(255, 179, 107, 0.16); }
.cell.is-target { fill: rgba(191, 248, 252, 0.2); stroke: var(--cyan-bright); stroke-width: 2; stroke-dasharray: none; }
.cell.is-dest { stroke: var(--cyan); stroke-width: 2.2; }
@media (hover: hover) {
  .cell.is-move:hover { stroke: var(--cyan-bright); stroke-width: 2; }
  .cell.is-aim:hover { fill: color-mix(in srgb, var(--aim) 22%, transparent); }
}
.layer-static { pointer-events: none; }

.rock-body { fill: url(#rockFill); stroke: #6b82b3; stroke-width: 1.2; stroke-linejoin: round; }
.rock-crater { fill: rgba(5, 11, 31, 0.45); }
.rock.is-hit .rock-body { stroke: var(--orange-bright); }
.rockbar .bar-bg { fill: rgba(122, 166, 255, 0.25); }
.rockbar .bar-rock { fill: #b9c6e3; }
.debris { fill: none; stroke: rgba(160, 180, 220, 0.45); stroke-width: 1.2; stroke-linecap: round; }

.ram-mark { --w: var(--hostile); }

.plan-path { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: 0.85; }
.plan-ghost { opacity: 0.4; }

/* Weapon colours shared by reticles, aim lines, bolts and the weapon bar */
.w-laser { --w: var(--laser); }
.w-plasma { --w: var(--plasma); }
.w-rocket { --w: var(--rocket); }
.w-hostile { --w: var(--hostile); }
.plan-aim { stroke: var(--w); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.75; }
.reticle { fill: none; stroke: var(--w); stroke-width: 1.5; }
.reticle-label { fill: var(--w); stroke: none; font: 600 11px var(--font-mono); letter-spacing: 0.04em; }
.reticle-spin { animation: spin 6s linear infinite; transform-box: fill-box; transform-origin: center; }

/* Schematic markers: colours come in through custom properties, which cross into <use> */
.ship, .role-mark, .ship-pick svg {
  --ship-line: var(--cyan);
  --ship-fill: rgba(94, 230, 240, 0.16);
  --ship-plate: rgba(94, 230, 240, 0.32);
  --ship-glow: var(--cyan-bright);
}
.ship--pirate {
  --ship-line: var(--hostile);
  --ship-fill: rgba(255, 93, 108, 0.14);
  --ship-plate: rgba(255, 93, 108, 0.3);
  --ship-glow: #ffb0a0;
}
.sh-hull { fill: var(--ship-fill); stroke: var(--ship-line); stroke-width: 1.4; stroke-linejoin: round; }
.sh-line { fill: none; stroke: var(--ship-line); stroke-width: 0.8; stroke-linecap: round; opacity: 0.65; }
.sh-plate { fill: var(--ship-plate); }
.sh-core { fill: var(--ship-line); }
.sh-glow {
  fill: var(--ship-glow);
  opacity: var(--glow-on, 1);
  animation: flicker 0.14s steps(2) infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 0;
}
@keyframes flicker { to { transform: scaleY(0.6); opacity: calc(var(--glow-on, 1) * 0.7); } }
.ship { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--ship-line) 60%, transparent)); }
.ship.is-wreck { opacity: 0.28; --glow-on: 0; filter: none; }
.ship.is-wreck .shipbars { display: none; }
.shipbars .bar-bg { fill: rgba(122, 166, 255, 0.25); }
.shipbars .bar-hull { fill: var(--ship-line); }
.shipbars .bar-shield { fill: var(--shield); }

.fx-beam { stroke: var(--w); stroke-width: 2.5; stroke-linecap: round; }
.fx-orb { fill: var(--w); }
.fx-missile { fill: var(--w); }
.fx-trail { stroke: var(--w); stroke-width: 1.5; stroke-linecap: round; opacity: 0.6; }
.fx-ring { fill: none; stroke: var(--w); stroke-width: 2; }
.fx-ring--boom { stroke: #ffd9a0; stroke-width: 3; }
.fx-splash { fill: rgba(255, 255, 255, 0.14); }
.fx-debris { stroke: #ffd9a0; stroke-width: 1.5; stroke-linecap: round; }
.fx-text {
  font: 600 15px var(--font-mono);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.fx-text--dmg { fill: var(--red); }
.fx-text--shield { fill: var(--shield); }
.fx-text--rock { fill: #c9d4ee; font-size: 13px; }
.fx-text--warn { fill: var(--orange-bright); font-size: 13px; letter-spacing: 0.08em; }

/* Weapon bar */
.weapon-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 0;
  border-top: 1px solid var(--line);
}
.wslot {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(36, 72, 160, 0.3), rgba(6, 15, 42, 0.85));
  box-shadow: inset 0 1px 0 rgba(190, 215, 255, 0.18);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wslot .weapon-icon {
  grid-row: span 2;
  width: 34px; height: 34px;
  padding: 6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--w) 55%, transparent);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--w) 30%, transparent), rgba(6, 15, 42, 0.9) 70%);
}
.wslot-name { font: 500 13px/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--w); }
.wslot-state { font: 400 var(--fs-xs)/1.3 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wslot.is-active { border-color: var(--w); box-shadow: inset 0 0 0 1px var(--w), 0 0 16px color-mix(in srgb, var(--w) 35%, transparent); }
.wslot.is-armed .wslot-state { color: var(--w); }
.wslot[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.wslot-pips { position: absolute; top: 7px; right: 8px; display: flex; gap: 3px; }
.wslot-pips i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--w); }
.wslot-pips i.on { background: var(--w); box-shadow: 0 0 6px var(--w); }

/* Controls under the board */
.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.seg { display: flex; gap: 6px; }
.seg-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(36, 72, 160, 0.35), rgba(6, 15, 42, 0.85));
  color: var(--muted);
  cursor: pointer;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.seg-btn[aria-pressed="true"] { color: var(--cyan-bright); border-color: var(--cyan); box-shadow: 0 0 12px rgba(94, 230, 240, 0.25); }
.btn-engage { min-width: 170px; }
.btn-engage.is-ready { animation: ready 1.6s ease-in-out infinite; }
.btn-engage[aria-disabled="true"] { filter: grayscale(0.7) brightness(0.7); cursor: default; animation: none; }
@keyframes ready { 50% { filter: brightness(1.2); } }

.demo-hint {
  min-height: 3.2em;
  padding: 0 16px 16px;
  color: var(--muted);
  font: 400 var(--fs-sm)/1.5 var(--font-body);
}

@media (max-width: 480px) {
  .demo-controls { gap: 8px; padding: 10px 12px; }
  .seg { gap: 4px; }
  .seg-btn { gap: 6px; padding: 0 10px; }
  .btn-engage { flex: 1; min-width: 0; padding: 0 1.1em; font-size: 14px; letter-spacing: 0.04em; }
  .weapon-bar { gap: 6px; padding: 10px 12px 0; }
  .wslot { grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 52px; padding: 7px 8px; }
  .wslot .weapon-icon { display: none; }
  .wslot-name { font-size: 12px; }
  .wslot-state { white-space: normal; overflow-wrap: anywhere; }
  .wslot-pips { position: static; margin-top: 3px; }
  .board-tag { right: 10px; }
}
/* The smallest phones: the main order button gets a row of its own so its label always fits */
@media (max-width: 359px) {
  .demo-controls { flex-wrap: wrap; }
  .seg { flex: 1; }
  .seg-btn { flex: 1; justify-content: center; }
  .btn-engage { flex-basis: 100%; }
}

/* Overlay screens cover the whole demo panel */
.demo-main { position: relative; }
.demo-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 40%, rgba(16, 40, 100, 0.75), rgba(5, 11, 31, 0.9));
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.overlay-card { width: 100%; max-width: 470px; margin: auto; padding: 30px 22px 22px; }
.overlay-kicker { color: var(--orange-bright); font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.overlay-title { margin: 8px 0 10px; font: 600 clamp(1.5rem, 4vw, 1.9rem)/1.05 var(--font-display); text-transform: uppercase; }
.overlay-text { color: var(--muted); font-size: 15px; }
.overlay-text + .overlay-text { margin-top: 6px; }
.overlay-label { margin: 18px 0 8px; color: var(--cyan-bright); font: 500 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.overlay-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font: 400 var(--fs-sm)/1.6 var(--font-mono);
}
.overlay-paid { margin-top: 4px; color: var(--orange-bright); font: 500 var(--fs-sm)/1.6 var(--font-mono); }
.overlay-actions { display: grid; gap: 10px; margin-top: 20px; }
.overlay-actions .btn { width: 100%; }

/* Salvage on the victory screen */
.loot .overlay-label { margin-top: 18px; }
.loot-list { display: grid; gap: 8px; margin-bottom: 12px; list-style: none; }
.loot-list li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(6, 15, 42, 0.55);
}
.loot-ship { color: var(--faint); font: 500 var(--fs-xs)/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.loot-item { color: var(--text); font-size: var(--fs-sm); line-height: 1.5; }
.loot-none { color: var(--muted); font-size: var(--fs-sm); }
.loot .btn-small { width: 100%; min-height: 46px; }
.loot-stash { color: var(--green); font: 400 var(--fs-sm)/1.5 var(--font-mono); }
.loot-stash:focus { outline: none; }

/* Result banner with ribbon tails */
.banner {
  position: relative;
  margin: 8px -6px 16px;
  padding: 18px 20px;
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--banner) 45%, #0a1a4a), color-mix(in srgb, var(--banner) 18%, #050b1f));
  border-block: 1px solid color-mix(in srgb, var(--banner) 70%, white);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}
.banner-text {
  font: 600 clamp(2.2rem, 8vw, 3.2rem)/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 22px var(--banner), 0 2px 0 rgba(0, 0, 0, 0.35);
}
.banner--win { --banner: #3fa0ff; }
.banner--lose { --banner: #e8414f; }
.banner--draw { --banner: #f0a020; }

/* Ship picker */
.ship-picker { display: grid; gap: 8px; }
.ship-pick {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  width: 100%;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(36, 72, 160, 0.25), rgba(6, 15, 42, 0.8));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ship-pick svg { grid-row: span 3; width: 52px; height: 52px; }
.ship-pick[aria-checked="true"] { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan), 0 0 18px rgba(94, 230, 240, 0.25); }
.ship-pick-name { font: 600 1.05rem/1.1 var(--font-display); text-transform: uppercase; }
.ship-pick-role { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 400 var(--fs-xs)/1.4 var(--font-mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.mini-stats b { color: var(--text); font-weight: 500; }
@media (max-width: 480px) {
  .demo-overlay { padding: 10px; }
  .overlay-card { padding: 26px 14px 16px; }
  .overlay-title { font-size: 1.4rem; }
  .overlay-label { margin: 14px 0 8px; }
  .ship-pick { grid-template-columns: 42px minmax(0, 1fr); gap: 2px 10px; padding: 6px 10px 6px 6px; }
  .ship-pick svg { width: 42px; height: 42px; }
}

/* Side panel */
.demo-side {
  display: grid;
  gap: clamp(16px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
@media (min-width: 1000px) { .demo-side { grid-template-columns: minmax(0, 1fr); } }
.side-block { padding: 20px; }
.side-title {
  margin-bottom: 14px;
  color: var(--cyan-bright);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fleet { list-style: none; }
.fleet li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.fleet li:first-child { padding-top: 0; }
.fleet li:last-child { border-bottom: 0; padding-bottom: 0; }
.fleet-name { font-weight: 500; }
.fleet-side, .fleet-status, .fleet-loadout { color: var(--faint); font: 400 var(--fs-xs)/1.6 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.fleet-status { text-align: right; }
.fleet-loadout { grid-column: 1 / -1; text-transform: none; letter-spacing: 0.02em; }
.fleet .is-down { opacity: 0.45; }
.fleet .is-down .fleet-status { color: var(--red); }

.meter { grid-column: 1 / -1; display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font: 400 var(--fs-xs)/1 var(--font-mono); color: var(--faint); text-transform: uppercase; }
.meter-track { height: 6px; border-radius: 3px; background: rgba(122, 166, 255, 0.22); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 8px rgba(94, 230, 240, 0.5); transition: width 0.4s var(--ease); }
.meter-val { text-align: right; color: var(--text); }
.is-hostile .meter-hull .meter-fill { background: var(--hostile); box-shadow: 0 0 8px rgba(255, 93, 108, 0.5); }
.meter-shield .meter-fill { background: var(--shield); box-shadow: 0 0 8px rgba(143, 184, 255, 0.5); }
.meter-speed .meter-fill { background: var(--green); box-shadow: 0 0 8px rgba(110, 231, 168, 0.4); }

.rules { display: grid; gap: 8px; padding-left: 1.3em; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.rules li::marker { color: var(--cyan); font-family: var(--font-mono); font-size: 12px; }

.log { list-style: none; display: grid; gap: 14px; max-height: 300px; overflow-y: auto; color: var(--muted); font: 400 13px/1.5 var(--font-mono); }
.log-empty, .log-start { color: var(--faint); }
.log-head {
  margin-bottom: 6px;
  color: var(--cyan-bright);
  font: 500 var(--fs-xs)/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.log-block ul { list-style: none; display: grid; gap: 4px; }
.log-block li { padding-left: 10px; border-left: 2px solid var(--line-strong); }
.log-block .is-good { border-color: var(--cyan); color: var(--text); }
.log-block .is-bad { border-color: var(--red); color: var(--text); }
.log-block .is-warn { border-color: var(--orange); }

/* Roles and weapons next to the prototype */
.combat-ref {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 1000px) {
  .combat-ref { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); }
}
.ref-title { margin-bottom: 12px; color: var(--cyan-bright); font: 500 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.role-grid { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.role { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.role-head { display: flex; align-items: center; gap: 12px; }
.role-mark {
  flex-shrink: 0;
  width: 52px; height: 52px;
  padding: 6px;
  border-radius: 50%;
  border: 1px solid rgba(143, 192, 255, 0.5);
  background: radial-gradient(circle at 50% 35%, rgba(61, 123, 255, 0.35), rgba(6, 15, 42, 0.9) 70%);
}
.role h4 { font: 600 var(--fs-md)/1.15 var(--font-display); text-transform: uppercase; }
.role-code { margin-top: 4px; color: var(--faint); font: 400 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.12em; }
.role-desc { flex: 1; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.role-stats { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.role-stats .meter { grid-template-columns: 72px minmax(0, 1fr) 16px; }

.weapon-list { list-style: none; display: grid; gap: 16px; }
.weapon-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--w);
  border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--w) 10%, transparent), rgba(6, 15, 42, 0.6));
}
.weapon-icon { flex-shrink: 0; width: 26px; height: 26px; fill: none; }
.weapon-item h4 { color: var(--w); font: 500 13px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.weapon-item p { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }

/* ---------- Roadmap ---------- */

.roadmap { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.rm-item { position: relative; padding: 0 0 34px 30px; border-left: 2px solid var(--line-strong); }
.rm-item:last-child { padding-bottom: 0; }
.rm-item::before {
  content: "";
  position: absolute;
  left: -8px; top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--line-bright);
}
.rm-item.is-done::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 12px var(--green); }
.rm-item.is-now::before { background: var(--orange); border-color: var(--orange-bright); box-shadow: 0 0 12px var(--orange); animation: blink 1.8s ease-in-out infinite; }
.rm-item h3 { margin: 16px 0 8px; font: 600 var(--fs-lg)/1.2 var(--font-display); text-transform: uppercase; }
.rm-item p { color: var(--muted); font-size: var(--fs-base); line-height: 1.6; max-width: 30ch; }
@media (min-width: 860px) {
  .roadmap { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rm-item { padding: 32px 24px 0 0; border-left: 0; border-top: 2px solid var(--line-strong); }
  .rm-item::before { left: 0; top: -9px; }
}

.buildlog { margin-top: 48px; max-width: 48rem; padding: 24px; }
.buildlog ol { list-style: none; display: grid; gap: 10px; }
.buildlog li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; color: var(--muted); font-size: var(--fs-base); line-height: 1.5; }
.buildlog time { color: var(--orange-bright); font: 500 var(--fs-sm)/1.7 var(--font-mono); }

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 860px) {
  .about { grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
}
.founder { padding: 32px 24px 28px; text-align: center; }
/* Flat-top hexagon: metal rim, photo inside, glow behind */
.founder-frame {
  position: relative;
  width: 180px;
  aspect-ratio: 1.1547;
  margin: 0 auto;
  padding: 4px;
  filter: drop-shadow(0 0 18px rgba(61, 123, 255, 0.55));
  background: linear-gradient(160deg, #cfe4ff, #3d7bff 35%, #0d2466 65%, #8fc0ff);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.founder-photo {
  width: 100%;
  height: 100%;
  background: url("../img/founder.jpg") 50% 40% / cover no-repeat, #0b1a40;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.founder-name { margin: 20px 0 4px; font: 600 var(--fs-xl)/1.15 var(--font-display); text-transform: uppercase; }
.founder-role { margin-bottom: 20px; color: var(--orange-bright); font: 500 12px/1.5 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.founder-facts {
  list-style: none;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-align: left;
}
.founder-facts li { display: flex; gap: 10px; }
.founder-facts li::before { content: "▸"; color: var(--cyan); }

.story { max-width: 38rem; font-size: clamp(var(--fs-base), 1.4vw, var(--fs-md)); line-height: 1.65; }
.story p { margin-bottom: 1em; color: var(--muted); text-wrap: pretty; }
.story p:last-child { margin-bottom: 0; }
.story .story-lead {
  padding-left: 20px;
  border-left: 2px solid var(--orange);
  color: var(--text);
  font-size: clamp(var(--fs-md), 1.9vw, var(--fs-xl));
  line-height: 1.5;
}

/* ---------- Contact ---------- */

.section-contact { padding-top: 0; }
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(255, 154, 42, 0.16), transparent 55%),
    var(--glass);
}
@media (min-width: 860px) { .contact { grid-template-columns: minmax(0, 1.3fr) auto; } }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-mail { text-transform: none; letter-spacing: 0.02em; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(10, 24, 62, 0.6), rgba(5, 11, 31, 0.9));
  color: var(--faint);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 48px; align-items: start; }
}
.footer-brand .brand-name { display: block; margin-bottom: 8px; color: var(--text); font-size: 14px; }
.footer-meta { display: grid; gap: 4px; }
.footer-top { display: inline-block; padding: 16px 0; color: var(--muted); font: 500 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.footer-top:hover { color: var(--cyan); }

/* ---------- 404: an empty hex sector under a radar sweep ---------- */

.nf {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100svh;
}
.nf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
}
.nf-main {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 8px var(--gutter) clamp(120px, 20vh, 200px);
  text-align: center;
}
.nf-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
  color: #eaf6ff;
  font: 600 clamp(6.5rem, 24vw, 15rem)/0.9 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  text-shadow: 0 0 2px rgba(191, 248, 252, 0.9), 0 0 42px rgba(94, 230, 240, 0.45);
}
.nf-hex {
  width: 0.8em;
  height: 0.86em;
  margin: 0 0.02em;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(94, 230, 240, 0.5));
}
.nf-hex-fill { fill: rgba(16, 52, 130, 0.45); }
.nf-hex-line { fill: none; stroke: var(--cyan); stroke-width: 5; stroke-linejoin: round; }
.nf-hex-inner { fill: none; stroke: rgba(143, 192, 255, 0.4); stroke-width: 1.5; stroke-dasharray: 4 8; }
.nf-sweep,
.nf-ping,
.nf-reticle { transform-box: view-box; transform-origin: 0 0; }
.nf-sweep { animation: spin 4s linear infinite; }
.nf-ping { fill: none; stroke: var(--cyan); stroke-width: 1.5; animation: nf-ping 3.2s var(--ease) infinite; }
.nf-ping-2 { animation-delay: 1.6s; }
.nf-reticle { animation: spin 20s linear infinite reverse; }
.nf-reticle circle { fill: none; stroke: rgba(191, 248, 252, 0.75); stroke-width: 2; stroke-dasharray: 9 7; }
.nf-reticle path { stroke: rgba(191, 248, 252, 0.85); stroke-width: 2.5; stroke-linecap: round; }
/* The lost contact: it flares as the sweep passes and fades before the next one */
.nf-blip { fill: var(--orange-bright); opacity: 0; animation: nf-blip 4s linear infinite; }
@keyframes nf-ping {
  from { transform: scale(0.2); opacity: 0.9; }
  to { transform: scale(8); opacity: 0; }
}
@keyframes nf-blip {
  0%, 9% { opacity: 0; }
  13% { opacity: 1; }
  50% { opacity: 0.12; }
  100% { opacity: 0; }
}
.nf-kicker {
  margin-top: clamp(18px, 3vh, 30px);
  color: var(--orange-bright);
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nf-title {
  margin: 10px 0 12px;
  font: 600 clamp(1.8rem, 5vw, 2.8rem)/1.05 var(--font-display);
  text-transform: uppercase;
  text-wrap: balance;
}
.nf-text {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
/* The floor is wider than the screen for the perspective, so it gets its own clipping box */
.nf-floor { position: absolute; inset: auto 0 0; height: 34%; overflow: hidden; pointer-events: none; }
.nf-floor .hero-grid { height: 100%; }
@media (max-width: 480px) {
  .nf-actions { display: grid; width: 100%; }
  .nf-actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
