/* ==========================================================================
   SKY LOKUS — site styles
   Display: Chakra Petch · Body: Inter · Data/labels: JetBrains Mono
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("../fonts/chakrapetch-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("../fonts/chakrapetch-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../fonts/chakrapetch-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../fonts/chakrapetch-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("../fonts/chakrapetch-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("../fonts/chakrapetch-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url("../fonts/jetbrainsmono-400-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url("../fonts/jetbrainsmono-400-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #05070a;
  --bg-alt: #080b10;
  --surface: #0c1118;
  --surface-2: #121924;
  --line: rgba(160, 180, 210, 0.11);
  --line-strong: rgba(160, 180, 210, 0.22);
  --text: #e6ebf2;
  --muted: #98a3b3;
  --dim: #6c7787;
  --accent: #4765ef;            /* logo blue — friendly / brand */
  --accent-hi: #8197ff;
  --accent-soft: rgba(71, 101, 239, 0.14);
  --amber: #ff9a2e;             /* interceptor accent orange — status */
  --hostile: #ff4b4b;           /* hostile track */

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 4px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --chamfer: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* film grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, picture, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1, h2 { text-transform: uppercase; }
h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); font-weight: 600; line-height: 1.2; }
h4 { font-size: 1.05rem; font-weight: 600; }
.h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); text-transform: none; }
p { margin: 0 0 1.1em; }
p, li { text-wrap: pretty; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 400;
  background: var(--accent); color: #fff; padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.section { position: relative; padding-block: var(--section); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }

/* ---------- Background treatments ---------- */
.bg-topo, .bg-grid { position: relative; isolation: isolate; }
.bg-topo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/topo.svg") center / cover no-repeat;
  opacity: .9;
  mask-image: radial-gradient(80% 90% at 70% 40%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(80% 90% at 70% 40%, #000 20%, transparent 85%);
}
.bg-grid::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 15%, #000 70%, transparent);
}

/* ---------- Labels / type helpers ---------- */
.tag, .eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before { content: "//"; color: var(--dim); letter-spacing: 0; }
.eyebrow .idx { color: var(--text); }
.lead { font-size: clamp(1.06rem, 1rem + 0.4vw, 1.25rem); color: #c9d2de; line-height: 1.65; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.section-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head p:last-child { margin-bottom: 0; }

/* HUD frame: corner brackets */
.hud { position: relative; }
.hud::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 2;
  --c: var(--accent-hi); --l: 16px;
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--l) 2px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 2px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--l) 2px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 2px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--l) 2px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 2px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--l) 2px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 2px var(--l) no-repeat;
  opacity: .8;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 26px;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer; clip-path: var(--chamfer);
  transition: background-color .2s var(--ease), color .2s, transform .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #5b78ff; color: #fff; }
.btn--ghost { background: var(--line-strong); color: var(--text); position: relative; }
.btn--ghost::before { content: ""; position: absolute; inset: 1px; background: var(--bg); clip-path: var(--chamfer); z-index: -1; }
.btn--ghost { isolation: isolate; }
.btn--ghost:hover { background: var(--accent-hi); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent-hi);
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
}
.text-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.text-link:hover svg, .card--link:hover .text-link svg { transform: translateX(4px); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s;
}
.site-header.is-scrolled { background: rgba(5, 7, 10, 0.94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 32px; height: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: .22em; }
.brand:hover { color: #fff; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.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); }

.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-link, .nav-sub-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px;
  color: #c3ccd8; font-family: var(--font-display); font-size: .92rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; background: none; border: 0; cursor: pointer; transition: color .2s;
}
.nav-link:hover, .nav-sub-toggle:hover { color: #fff; }
.nav-link[aria-current="page"], .nav-item.is-current > .nav-split > .nav-link { color: #fff; box-shadow: inset 0 -2px 0 var(--amber); }
.nav-cta { margin-left: 10px; }
.nav-cta .btn { min-height: 42px; padding: 8px 20px; font-size: .86rem; }

.nav-item--has-sub { position: relative; }
.nav-split { display: flex; align-items: center; }
.nav-split .nav-link { padding-right: 2px; }
.nav-sub-toggle { padding: 10px 8px; }
.nav-sub-toggle svg { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.nav-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 24px 48px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.nav-sub.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s var(--ease), visibility 0s; }
@media (hover: hover) and (min-width: 1025px) {
  .nav-item--has-sub:hover .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s var(--ease), visibility 0s; }
}
.nav-sub a { display: block; padding: 10px 12px; color: #c3ccd8; text-decoration: none; font-size: .95rem; }
.nav-sub a:hover { background: var(--accent-soft); color: #fff; }
.nav-sub a[aria-current="page"] { color: #fff; box-shadow: inset 2px 0 0 var(--amber); }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    /* the header's backdrop-filter makes it the containing block, so size explicitly */
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 16px var(--gutter) 40px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; padding: 18px 4px; font-size: 1.1rem; }
  .nav-link[aria-current="page"], .nav-item.is-current > .nav-split > .nav-link { box-shadow: none; color: var(--amber); }
  .nav-split { justify-content: space-between; }
  .nav-split .nav-link { width: auto; flex: 1; }
  .nav-sub-toggle { width: 46px; height: 46px; justify-content: center; border: 1px solid var(--line); }
  .nav-sub {
    position: static; min-width: 0; padding: 0 0 12px 12px; margin: 0;
    background: none; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .nav-sub.is-open { display: block; }
  .nav-sub a { padding: 12px; font-size: 1rem; }
  .nav-cta { margin: 24px 0 0; border-bottom: 0 !important; }
  .nav-cta .btn { width: 100%; min-height: 54px; font-size: 1rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 70% at 78% 35%, rgba(71,101,239,.20), transparent 70%),
    radial-gradient(35% 45% at 5% 95%, rgba(255,154,46,.06), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; gap: clamp(32px, 4.5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero h1 .accent { color: var(--accent-hi); }
.hero-quote {
  font-family: var(--font-display); font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); font-weight: 600;
  color: #fff; margin: 0 0 1.3em; padding-left: 16px; border-left: 3px solid var(--amber);
}
.hero .lead { max-width: 58ch; }
.hero .btn-row { margin-top: 28px; }

/* Tactical display */
.tac { margin: 0; }
.tac-screen {
  position: relative; aspect-ratio: 1 / 1; background: radial-gradient(70% 70% at 50% 55%, #0b1320, #05080d 80%);
  border: 1px solid var(--line-strong); overflow: hidden;
}
.tac-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tac-head, .tac-foot {
  position: absolute; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  pointer-events: none;
}
.tac-head { top: 0; }
.tac-foot { bottom: 0; }
.tac-live { color: var(--amber); }
.tac-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--amber); border-radius: 50%; animation: blink 1.4s steps(2, start) infinite; vertical-align: 1px; }
@keyframes blink { to { visibility: hidden; } }
.tac-phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border: 1px solid var(--line-strong); border-top: 0; }
.tac-phases li {
  background: var(--surface); padding: 12px 12px 14px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
  position: relative; transition: color .3s, background-color .3s;
}
.tac-phases li b { display: block; font-family: var(--font-display); font-size: .95rem; letter-spacing: .06em; color: inherit; font-weight: 600; margin-top: 2px; }
.tac-phases li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: transparent; transition: background-color .3s; }
.tac-phases li.is-active { color: #fff; background: var(--surface-2); }
.tac-phases li.is-active::after { background: var(--amber); }
.tac-phases li.is-done { color: var(--muted); }
.tac figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; color: var(--dim); }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(48px, 8vw, 112px) clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(50% 80% at 85% 0%, rgba(71,101,239,.18), transparent 70%);
}
.page-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4rem); max-width: 20ch; }
.page-hero .lead { max-width: 64ch; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.page-hero-grid h1 { max-width: none; }
.page-hero-media { margin: 0; }
.page-hero-media img { width: 100%; border: 1px solid var(--line-strong); }

.breadcrumb { margin-bottom: 24px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-alt); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker li { display: flex; align-items: center; gap: 28px; padding: 18px 0 18px 28px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: #aeb8c6; white-space: nowrap; }
.ticker li::after { content: ""; width: 8px; height: 8px; background: var(--amber); transform: rotate(45deg); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); margin: 0; }
.metric { background: var(--surface); padding: clamp(24px, 3vw, 40px); position: relative; }
.metric dt { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.metric dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.metric dd small { font-family: var(--font-mono); font-size: .32em; font-weight: 500; color: var(--amber); margin-left: 6px; letter-spacing: .08em; }
.metric-bar { display: block; height: 2px; margin-top: 22px; background: var(--line); position: relative; overflow: hidden; }
.metric-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform 1.6s var(--ease); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s, transform .25s var(--ease), background-color .25s;
}
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); margin: 0; }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); transition: transform .7s var(--ease), filter .4s; }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,7,10,.55)); pointer-events: none; }
.card-body { padding: clamp(22px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { margin-bottom: .35em; }
.card-body p { color: var(--muted); margin-bottom: .8em; }
.card-body p:last-child { margin-bottom: 0; }
.card-body .text-link { margin-top: auto; padding-top: 10px; }
.card-idx { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--amber); margin-bottom: 6px; }
.card--link:hover { border-color: rgba(129,151,255,.55); transform: translateY(-3px); background: var(--surface-2); }
.card--link:hover .card-media img { transform: scale(1.04); filter: none; }
.card--link .stretched::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.card--link h3 a { color: inherit; text-decoration: none; }

/* Check list */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .52em; width: 10px; height: 10px;
  border: 2px solid var(--accent-hi); transform: rotate(45deg);
}
.checklist strong { color: #fff; font-weight: 600; }

/* Split (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.split + .split { margin-top: clamp(64px, 9vw, 120px); }
.split--reverse .split-media { order: 2; }
.split-media { margin: 0; }
.split-media img { width: 100%; border: 1px solid var(--line); background: var(--surface-2); }
.split-media--contain img { max-height: 480px; width: auto; margin-inline: auto; }

/* Step header */
.step-num {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em; color: var(--amber); text-transform: uppercase;
}
.step-num span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--amber); color: #fff; font-family: var(--font-display); font-size: 1rem; letter-spacing: 0; clip-path: var(--chamfer); background: rgba(255,154,46,.08); }

/* Stage diagram (how it works) */
.stage-visual { position: relative; margin: 0; }
.stage-visual .diagram { position: absolute; right: 14px; bottom: 14px; width: 132px; height: 132px; background: rgba(5,7,10,.82); border: 1px solid var(--line-strong); padding: 10px; backdrop-filter: blur(6px); z-index: 2; }
.stage-visual .diagram svg { width: 100%; height: 100%; }

/* Stat cards */
.stat-card { position: relative; background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 2.6vw, 34px); }
.stat-card .value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 1.8rem + 2.4vw, 3.8rem); color: #fff; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.stat-card .unit { display: block; margin: 10px 0 16px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.stat-card h3 { font-family: var(--font-body); font-size: 1.06rem; font-weight: 600; margin-bottom: .4em; }
.stat-card p { color: var(--muted); margin: 0; font-size: .96rem; }
.stat-card .icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent-hi); border: 1px solid var(--line-strong); margin-bottom: 18px; }
.stat-card .icon svg { width: 22px; height: 22px; }

/* Statement */
.statement {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 1rem + 1.3vw, 2rem);
  line-height: 1.3; color: #fff; margin: 0; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(71,101,239,.12), transparent 60%);
}
.statement::first-letter { color: var(--amber); }

/* Media frame */
.media-frame { margin: 0; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface-2); }
.media-frame img { width: 100%; }

/* Spec sheet */
.spec { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.blueprint { position: relative; margin: 0; background: #070d18; border: 1px solid rgba(129,151,255,.3); }
.blueprint svg { width: 100%; height: auto; }
.blueprint .bp-scan { position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, rgba(129,151,255,.12), transparent); animation: scan 5s linear infinite; pointer-events: none; }
@keyframes scan { to { top: 100%; } }
.spec-table { margin: 0; border-top: 1px solid var(--line-strong); }
.spec-table div { display: grid; grid-template-columns: 42% 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-table dt { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.spec-table dd { margin: 0; color: #fff; font-weight: 500; }

/* Spectrum (EWM) */
.spectrum { margin: 0; }
.spectrum-screen { position: relative; aspect-ratio: 4 / 3.2; background: #05080d; border: 1px solid var(--line-strong); overflow: hidden; }
.spectrum-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(129,151,255,.3);
  padding: clamp(36px, 5vw, 72px);
  background: radial-gradient(80% 140% at 100% 0%, rgba(71,101,239,.32), transparent 60%), var(--surface);
  display: grid; grid-template-columns: 1.4fr auto; gap: 24px 40px; align-items: center;
}
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/topo.svg") center / cover; opacity: .6; mask-image: linear-gradient(90deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); }
.cta-band h2 { margin-bottom: .35em; }
.cta-band p { margin: 0; color: #cfd6e2; }

/* Contact */
.contact-card { background: var(--surface); border: 1px solid var(--line); padding: clamp(26px, 3.5vw, 48px); }
.contact-list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.contact-list .icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--accent-hi); }
.contact-list .icon svg { width: 20px; height: 20px; }
.contact-list .label { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-list .value { font-size: 1.12rem; color: #fff; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a.value { text-decoration: none; }
.contact-list a.value:hover { color: var(--accent-hi); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); background: var(--bg-alt); padding-block: clamp(56px, 7vw, 88px) 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 52px; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 36ch; }
.footer-title { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--dim); font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--dim); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }


/* ---------- Additions: process strip, display backgrounds ---------- */
.tac-screen { background: url("../img/topo.svg") center / 160% no-repeat, radial-gradient(70% 70% at 50% 55%, #0b1320, #05080d 80%); }
.spectrum figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; color: var(--dim); }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 20px); position: relative; }
.process li { display: flex; flex-direction: column; }
.process li h3 { font-size: 1rem; line-height: 1.35; margin: 0; }
.process li:not(:last-child)::after {
  content: ""; position: absolute; top: 44px; right: calc(-1 * clamp(12px, 1.6vw, 20px)); width: clamp(12px, 1.6vw, 20px); height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
a.stat-card { display: block; }
@media (max-width: 1080px) { .process { grid-template-columns: repeat(3, 1fr); } .process li::after { display: none; } }
@media (max-width: 640px) { .process { grid-template-columns: 1fr; } }

.stage-visual img { width: 100%; max-height: 500px; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero-grid, .page-hero-grid, .spec { grid-template-columns: 1fr; }
  .tac { max-width: 620px; }
  .page-hero-media { max-width: 560px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .cta-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .tac-phases { grid-template-columns: repeat(2, 1fr); }
  .tac-head span:nth-child(2) { display: none; }
  .tac-foot [data-readout] { display: none; }
  .btn-row .btn { flex: 1 1 100%; }
  .brand-name { font-size: 1rem; letter-spacing: .16em; }
  .spec-table div { grid-template-columns: 1fr; gap: 4px; }
  .stage-visual .diagram { width: 104px; height: 104px; right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .ticker-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .blueprint .bp-scan { display: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .skip-link, .ticker { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
}
