/* Brand West: Cybercore test build.
   Colour roles (one rule, used everywhere):
   cyan    = anything you can press or follow
   magenta = emphasis inside a headline or statement
   amber   = readout values (counts, indexes, status)
   Corners: all sharp. No radius anywhere. */

:root {
  --bg: #0a0d13;
  --panel: #0f151f;
  --line: #22324a;
  --line-hi: #2f4a6b;
  --text: #e8f0fa;
  --muted: #a3b5cb;
  --cyan: #3de3f5;
  --magenta: #ff62dc;
  --amber: #ffbd5c;
  --on-cyan: #04121a;
  --display: "Chakra Petch", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--display);
  overflow-x: hidden;
}
/* Scanlines: fixed overlay, never over interactive hit areas (pointer-events none). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.14) 2px 3px);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 64ch; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--cyan); color: var(--on-cyan); padding: 12px 16px; font: 600 1rem var(--mono);
}
.skip:focus { top: 8px; }

.shell { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.amber { color: var(--amber); }
.mag { color: var(--magenta); }

/* Bracketed HUD label: [ LIKE THIS ] */
.hud {
  font: 500 .8125rem/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: .04em;
}
.hud::before { content: "[ "; color: var(--cyan); }
.hud::after { content: " ]"; color: var(--cyan); }

/* ---------------- Header / status bar ---------------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 13, 19, .94);
  border-bottom: 1px solid var(--line);
}
.bar .shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--text); text-decoration: none; font: 700 1.125rem var(--display); letter-spacing: .02em;
}
.brand-mark { font: 600 .875rem var(--mono); color: var(--on-cyan); background: var(--cyan); padding: 3px 6px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font: 500 .875rem var(--mono); color: var(--muted); text-decoration: none;
}
.nav a:hover { color: var(--cyan); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::before { content: ">"; color: var(--amber); margin-right: 6px; }
.nav .all { color: var(--cyan); border: 1px solid var(--line-hi); }
@media (max-width: 719px) {
  .bar .shell { padding-block: 6px; }
  .nav { width: 100%; margin-inline: -10px; }
  .nav a { padding: 0 6px; font-size: .75rem; }
  .nav { margin-inline: -6px; }
}

/* ---------------- Buttons ---------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  font: 600 1rem/1.25 var(--mono); text-decoration: none; text-align: left;
  border: 1px solid var(--cyan);
  transition: transform .12s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--cyan); color: var(--on-cyan); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--on-cyan); }
.btn-primary::before { content: ">"; font-weight: 700; }
.btn-ghost { background: transparent; color: var(--cyan); }
.btn-ghost:hover { background: rgba(61, 227, 245, .1); color: var(--text); }
.btn:active { transform: translateY(1px); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { font: 400 .875rem/1.5 var(--mono); color: var(--muted); margin-top: 14px; }

/* ---------------- Glitch hover on headings ---------------- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .glitch:hover { animation: glitch .38s steps(2, end) 1; }
}
@keyframes glitch {
  0%   { text-shadow: 2px 0 var(--magenta), -2px 0 var(--cyan); transform: translateX(0); }
  25%  { text-shadow: -3px 0 var(--magenta), 3px 0 var(--cyan); transform: translateX(1px) skewX(-4deg); }
  50%  { text-shadow: 3px 1px var(--magenta), -3px -1px var(--cyan); transform: translateX(-1px); }
  75%  { text-shadow: -1px 0 var(--magenta), 1px 0 var(--cyan); transform: skewX(3deg); }
  100% { text-shadow: none; transform: none; }
}

/* ---------------- Hero (home) ---------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .shell { position: relative; z-index: 1; display: grid; gap: 40px; padding-block: 36px 0; }
.boot { font: 500 .875rem/1.5 var(--mono); color: var(--muted); margin-bottom: 18px; }
.boot::before { content: "> "; color: var(--amber); }
.hero h1 { font-size: clamp(2.75rem, 11vw, 5.25rem); line-height: 1.02; letter-spacing: -.02em; }
.hero h1 .line { display: block; width: fit-content; }
.hero h1 .accent { color: var(--magenta); }
.hero .sub { font-size: clamp(1.125rem, 2.2vw, 1.3125rem); color: var(--text); margin-top: 20px; max-width: 34ch; }

/* Typing: clip-reveal of text that is already in the DOM.
   No JS, screen readers get the full headline, reduced motion skips it. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line { animation: type 1s steps(14, end) backwards; }
  .hero h1 .accent { animation-delay: 1.05s; animation-duration: .6s; animation-timing-function: steps(7, end); }
  .hero h1 .accent::after {
    content: "_"; color: var(--cyan); margin-left: .05em;
    animation: caret 1s steps(1) 1.7s infinite;
  }
  .bus li { animation: power .25s steps(2) backwards; animation-delay: calc(1.2s + var(--i) * 70ms); }
  .floor { animation: floor 5s linear infinite; }
}
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes power { from { opacity: .15; } to { opacity: 1; } }
@keyframes floor { to { background-position: 0 48px, 0 0; } }

/* Input bus: the 16 platforms as channels */
.bus-panel { border: 1px solid var(--line-hi); background: var(--panel); padding: 18px; align-self: start; }
.bus-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; flex-wrap: wrap; }
.bus-head .count { font: 600 .8125rem var(--mono); color: var(--amber); }
.bus { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.bus li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--line);
  font: 400 .875rem/1.35 var(--mono);
}
.bus li span:first-child { color: var(--amber); flex: none; }
.bus-foot { font: 400 .8125rem/1.5 var(--mono); color: var(--muted); margin: 14px 0 0; }

/* Perspective grid floor, decorative, below the hero copy only */
.floor-wrap { height: 120px; margin-top: 48px; perspective: 260px; overflow: hidden; }
.floor {
  height: 260%; transform: rotateX(62deg); transform-origin: top center;
  background-image:
    linear-gradient(to bottom, rgba(61,227,245,.35) 1px, transparent 1px),
    linear-gradient(to right, rgba(61,227,245,.28) 1px, transparent 1px);
  background-size: 100% 48px, 48px 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
          mask-image: linear-gradient(to bottom, transparent, #000 30%);
}

@media (min-width: 960px) {
  .hero .shell { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; padding-top: 72px; }
  .floor-wrap { height: 150px; }
}

/* ---------------- Sections ---------------- */
.section { padding-block: clamp(56px, 9vw, 112px); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 22ch; }
.section-intro { color: var(--muted); margin-top: 14px; }

/* Modules (services as modules) */
.modules { margin-top: 40px; border-top: 1px solid var(--line-hi); }
.module {
  display: grid; gap: 14px 32px;
  padding-block: 28px; border-bottom: 1px solid var(--line-hi);
}
.module-idx { font: 700 clamp(2.5rem, 7vw, 4.5rem)/1 var(--mono); color: var(--amber); }
.module h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.module h3 a { color: var(--text); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.module h3 a::after { content: " ->"; color: var(--cyan); font-family: var(--mono); font-size: .7em; margin-left: .4em; }
.module h3 a:hover { color: var(--cyan); }
.module .promise { color: var(--muted); margin: 6px 0 0; }
.readout { font: 400 .875rem/1.5 var(--mono); display: grid; gap: 8px; align-content: start; }
.readout div { display: grid; grid-template-columns: 8.5ch 1fr; gap: 10px; }
.readout dt { color: var(--muted); }
.readout dd { color: var(--text); }
.readout .ok { color: var(--amber); }
@media (min-width: 860px) {
  .module { grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 20rem); align-items: start; }
}

/* Known faults (scenarios as log) */
.log { margin-top: 36px; border: 1px solid var(--line-hi); background: var(--panel); }
.log li {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  font-size: clamp(1.125rem, 2.4vw, 1.375rem); line-height: 1.35;
}
.log li:last-child { border-bottom: 0; }
.log .lvl { font: 600 .8125rem/1.9 var(--mono); color: var(--amber); }
.log-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.log-foot p { margin: 0; color: var(--muted); }

/* Fact readouts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; border-left: 1px solid var(--line-hi); border-top: 1px solid var(--line-hi); }
.fact { padding: 22px 18px; border-right: 1px solid var(--line-hi); border-bottom: 1px solid var(--line-hi); display: flex; flex-direction: column; gap: 6px; }
.fact .val { font: 700 clamp(2.5rem, 8vw, 4.75rem)/1 var(--display); color: var(--amber); }
.fact .unit { font-size: 1.0625rem; }
.fact .src { font: 400 .8125rem/1.45 var(--mono); color: var(--muted); margin-top: auto; padding-top: 10px; }
.fact .src::before { content: "src: "; color: var(--cyan); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 359px) { .facts { grid-template-columns: 1fr; } }

/* Why us: statements */
.stmts { display: grid; gap: 28px; margin-top: 8px; }
.stmt { font: 600 clamp(1.625rem, 4.4vw, 3rem)/1.15 var(--display); max-width: 26ch; }
.stmt:nth-child(2) { margin-left: clamp(0px, 10vw, 160px); }
.stmt:nth-child(3) { margin-left: clamp(0px, 20vw, 320px); }
.stmt .mag { font-style: italic; padding-bottom: .06em; }

/* Closing CTA */
.closing { padding-block: clamp(64px, 10vw, 128px); position: relative; overflow: hidden; }
.closing h2 { font-size: clamp(2rem, 6vw, 4rem); max-width: 18ch; }
.closing-box { border: 1px solid var(--cyan); padding: clamp(24px, 5vw, 56px); background: var(--panel); position: relative; }
.closing-box::before, .closing-box::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--magenta);
}
.closing-box::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.closing-box::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }

/* ---------------- Page head (inner pages) ---------------- */
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.5rem, 8vw, 5rem); max-width: 18ch; margin-top: 14px; }
.page-head .lede { font-size: clamp(1.125rem, 2vw, 1.25rem); margin-top: 18px; max-width: 48ch; }

/* ---------------- Services page ---------------- */
.svc-layout { display: grid; gap: 32px; padding-block: 40px 88px; }
.svc-index { font: 500 .875rem var(--mono); }
.svc-index ol { display: grid; gap: 2px; margin-top: 12px; }
.svc-index a { display: flex; gap: 12px; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; padding: 0 10px; border-left: 2px solid var(--line-hi); }
.svc-index a:hover { color: var(--cyan); border-left-color: var(--cyan); }
.svc-index a span { color: var(--amber); }
@media (max-width: 959px) {
  .svc-index ol { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
}
@media (min-width: 960px) {
  .svc-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 56px; }
  .svc-index { position: sticky; top: 96px; align-self: start; }
}
.svc { border: 1px solid var(--line-hi); background: var(--panel); margin-bottom: 32px; }
.svc-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid var(--line-hi); font: 500 .8125rem/1.5 var(--mono); color: var(--muted); }
.svc-top .ok { color: var(--amber); }
.svc-body { padding: clamp(20px, 4vw, 40px); display: grid; gap: 28px; }
.svc-body h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.svc-body h2 .num { font-family: var(--mono); color: var(--amber); font-size: .6em; margin-right: .5em; vertical-align: .2em; }
.svc-body .promise { font-size: clamp(1.125rem, 2vw, 1.3125rem); color: var(--magenta); margin: 12px 0 0; max-width: 40ch; }
.svc-body .headline { font: 600 1.25rem/1.3 var(--display); margin: 0 0 12px; }
.io { display: grid; gap: 24px; }
.io h3 { font: 600 .875rem var(--mono); color: var(--muted); margin-bottom: 10px; }
.io h3::before { content: "[ "; color: var(--cyan); }
.io h3::after { content: " ]"; color: var(--cyan); }
.outputs li { position: relative; padding: 8px 0 8px 26px; border-bottom: 1px solid var(--line); }
.outputs li::before { content: ">"; position: absolute; left: 4px; color: var(--amber); font-family: var(--mono); }
.inputs { display: flex; flex-wrap: wrap; gap: 8px; }
.inputs li { font: 500 .875rem var(--mono); border: 1px solid var(--line-hi); padding: 6px 10px; }
@media (min-width: 1100px) {
  .svc-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .svc-body > header { grid-column: 1 / -1; }
}
.svc-cta { padding: 0 clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px); }

/* ---------------- About page ---------------- */
.ops { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 900px) { .ops { grid-template-columns: 1fr 1fr; } }
.op { border: 1px solid var(--line-hi); background: var(--panel); }
.op-top { padding: 10px 20px; border-bottom: 1px solid var(--line-hi); font: 500 .8125rem var(--mono); color: var(--muted); }
.op-body { padding: clamp(20px, 3.5vw, 32px); }
.op h3 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.op .role { font: 500 .9375rem var(--mono); color: var(--amber); margin: 8px 0 18px; }
.op .focus { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.op .focus li { font: 500 .8125rem var(--mono); border: 1px solid var(--line-hi); padding: 6px 10px; }

.cfg { margin-top: 36px; font-family: var(--mono); border-left: 2px solid var(--cyan); }
.cfg li { padding: 18px 0 18px clamp(16px, 3vw, 32px); }
.cfg .key { font: 600 clamp(1.25rem, 3vw, 1.75rem)/1.25 var(--display); display: block; }
.cfg .key::before { content: "rule "; font: 500 .8125rem var(--mono); color: var(--amber); vertical-align: .25em; }
.cfg p { font: 400 1rem/1.6 var(--display); color: var(--muted); margin: 8px 0 0; }

.pipe { display: grid; gap: 0; margin-top: 40px; counter-reset: none; }
.pipe li { position: relative; padding: 0 0 32px 56px; }
.pipe li::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line-hi); }
.pipe li:last-child::before { display: none; }
.pipe .step { position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--amber); color: var(--amber); font: 600 .875rem var(--mono); }
.pipe h3 { font-size: clamp(1.25rem, 2.6vw, 1.625rem); padding-top: 6px; }
.pipe p { color: var(--muted); margin: 8px 0 0; }
@media (min-width: 1000px) {
  .pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .pipe li { padding: 64px 0 0; }
  .pipe li::before { left: 48px; right: -24px; top: 19px; bottom: auto; width: auto; height: 2px; }
}

.bus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; border-top: 1px solid var(--line-hi); border-left: 1px solid var(--line-hi); }
.bus-grid li { padding: 16px 14px; border-right: 1px solid var(--line-hi); border-bottom: 1px solid var(--line-hi); display: flex; flex-direction: column; gap: 4px; font-size: 1rem; }
.bus-grid li span { font: 500 .75rem var(--mono); color: var(--amber); }
@media (min-width: 700px) { .bus-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------------- Contact page ---------------- */
.channels { display: grid; gap: 0; margin-top: 8px; border-top: 1px solid var(--line-hi); }
.channel { display: grid; gap: 4px 24px; padding: 20px 0; border-bottom: 1px solid var(--line-hi); align-items: baseline; }
.channel .hud { margin: 0; }
.channel a { font: 600 clamp(1.25rem, 4.2vw, 2.5rem)/1.2 var(--display); color: var(--text); text-decoration-color: var(--cyan); overflow-wrap: anywhere; }
.channel a:hover { color: var(--cyan); }
.channel .socials { display: flex; flex-wrap: wrap; gap: 8px 28px; }
@media (min-width: 800px) { .channel { grid-template-columns: 12rem 1fr; } }

.prompts { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 800px) { .prompts { grid-template-columns: 1fr 1fr; } }
.prompts a {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 20px; border: 1px solid var(--line-hi); background: var(--panel);
  color: var(--text); text-decoration: none; font-size: 1.125rem; line-height: 1.4; min-height: 44px;
}
.prompts a:hover { border-color: var(--cyan); }
.prompts a:hover .go { color: var(--text); }
.prompts .lvl { font: 600 .8125rem/1.9 var(--mono); color: var(--amber); }
.prompts .go { display: block; font: 500 .8125rem var(--mono); color: var(--cyan); margin-top: 10px; }

.free { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .free { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.free .big { font: 700 clamp(4rem, 14vw, 9rem)/.9 var(--display); color: var(--amber); }

/* ---------------- Footer ---------------- */
.foot { padding-block: 48px 40px; font: 400 .875rem/1.6 var(--mono); color: var(--muted); }
.foot .shell { display: grid; gap: 28px; }
@media (min-width: 800px) { .foot .shell { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 6px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot ul { display: grid; }

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

/* Tap-target fixes */
.channel a, .channel .socials a { display: inline-flex; align-items: center; min-height: 44px; }
.fact .src a { display: inline-flex; align-items: center; min-height: 44px; }
