/* =========================================================
   Tekton Labs: styles
   Palette: blueprint ink, drafting paper, filament orange,
   vision cyan. Type: Archivo (variable width) + IBM Plex Mono
   used only for machine output (G-code, readouts).
   ========================================================= */

:root {
  --ink: #0F1A2C;          /* page background, blueprint ink */
  --ink-2: #15243B;        /* raised panels */
  --ink-3: #1C2F4C;
  --line: #29405F;         /* rules and grid on ink */
  --text: #DDE5EF;         /* body text on ink */
  --muted: #93A6BE;        /* secondary text on ink */
  --paper: #E6EBF1;        /* drafting sheet */
  --paper-2: #D7DFE9;
  --paper-line: #B8C5D6;
  --paper-text: #0F1A2C;
  --paper-muted: #4A5D78;
  --signal: #FF5B1F;       /* filament orange: actions */
  --signal-deep: #C2410C;  /* orange for text on paper */
  --trace: #5ADAE8;        /* vision cyan: diagrams, detection */

  --f-sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 11vw, 150px);
  --chamfer: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--ink); }

:focus-visible { outline: 3px solid var(--trace); outline-offset: 3px; border-radius: 2px; }
.sheet :focus-visible { outline-color: var(--signal-deep); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--signal); color: var(--ink); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }

/* ---------- Type ---------- */
.h2 {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.4rem);
  line-height: .98;
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  letter-spacing: -.025em;
  text-wrap: balance;
  max-width: 18ch;
}
.h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.02;
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  letter-spacing: -.02em;
}
.h3 .sub {
  display: block; margin-top: .45em;
  font-size: max(1.05rem, .5em); font-weight: 500; letter-spacing: 0;
  font-variation-settings: "wdth" 100;
  color: var(--trace);
}
.section-label {
  font-size: .95rem; font-weight: 600; color: var(--signal);
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .6rem;
}
.section-label::before {
  content: ""; width: 22px; height: 2px; background: currentColor;
}
.sheet .section-label { color: var(--signal-deep); }

.svg-mono { font-family: var(--f-mono); font-size: 13px; fill: currentColor; }
.svg-mono-sm { font-family: var(--f-mono); font-size: 10px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent; --fg: var(--text); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px; padding: .8rem 1.5rem;
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none;
  font-variation-settings: "wdth" 108;
  background: var(--bg); color: var(--fg);
  border: 2px solid var(--bd);
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-signal { --bg: var(--signal); --fg: var(--ink); --bd: var(--signal); }
.btn-signal:hover { --bg: #FF7A45; --bd: #FF7A45; }
.btn-ghost { --fg: var(--text); --bd: #47618A; }
.btn-ghost:hover { --bd: var(--trace); --fg: #fff; }
.btn-ink { --bg: var(--paper-text); --fg: var(--paper); --bd: var(--paper-text); }
.btn-ink:hover { --bg: var(--signal-deep); --bd: var(--signal-deep); --fg: #fff; }
.btn-sm { min-height: 40px; padding: .55rem 1.1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
/* clip-path hides the outline, so draw focus inside */
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--trace); }
.btn-signal:focus-visible { box-shadow: inset 0 0 0 3px var(--ink); }

/* ---------- Placeholder marker (owner must replace) ---------- */
.ph {
  display: inline-block;
  padding: 0 .35em;
  border: 1.5px dashed var(--signal);
  color: inherit;
  background: rgba(255, 91, 31, .08);
  border-radius: 3px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(15, 26, 44, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--text); }
.brand-dot { fill: var(--signal); }
.brand-word {
  font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase;
  font-variation-settings: "wdth" 125;
  display: inline-flex; align-items: center; gap: .45rem;
}
.brand-labs {
  font-weight: 500; font-size: .72em; letter-spacing: .12em;
  padding: .15em .45em; border: 1.5px solid currentColor;
}

.site-nav ul { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.9rem); }
.site-nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--muted);
  padding: .4rem 0; position: relative; transition: color .2s;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-nav a:not(.btn):hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:not(.btn):hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; align-items: center; gap: .6rem;
  background: none; border: 1.5px solid var(--line); padding: .5rem .8rem; cursor: pointer;
  font-weight: 600; font-size: .95rem;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .25s, background-color .25s;
}
.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); }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 1.2rem var(--gutter) 2rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .25s var(--ease); }
  .js .site-header:has(.site-nav.is-open) { background: var(--ink); border-bottom-color: var(--line); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn) { display: block; padding: 1rem 0; font-size: 1.25rem; color: var(--text); font-variation-settings: "wdth" 115; font-weight: 700; }
  .site-nav a:not(.btn)::after { display: none; }
  .nav-cta-item { border-bottom: 0 !important; padding-top: 1.4rem; }
  .nav-cta-item .btn { width: 100%; min-height: 52px; font-size: 1.05rem; }
  /* no-JS: nav wraps under the logo */
  .no-js .header-inner { flex-wrap: wrap; height: auto; padding-block: .7rem; }
  .no-js .site-header { position: absolute; height: auto; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: .4rem 1rem; }
  .no-js .site-nav li { border: 0; }
  .no-js .site-nav a:not(.btn) { padding: .2rem 0; font-size: 1rem; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  padding: calc(var(--header-h) + clamp(40px, 8vh, 90px)) 0 clamp(56px, 9vh, 100px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
/* plotter bed: coordinate grid + ruler ticks */
.hero-bed {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(41, 64, 95, .55) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to bottom, rgba(41, 64, 95, .55) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to right, rgba(41, 64, 95, .22) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(to bottom, rgba(41, 64, 95, .22) 1px, transparent 1px) 0 0 / 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 65% 45%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 85% 75% at 65% 45%, #000 30%, transparent 85%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}
.hero::before { /* top ruler */
  left: 0; right: 0; top: var(--header-h); height: 14px;
  background:
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(to right, #47618A 0 1px, transparent 1px 80px);
  background-size: 100% 6px, 100% 14px; background-repeat: no-repeat;
  opacity: .9;
}
.hero::after { /* left ruler */
  top: var(--header-h); bottom: 0; left: 0; width: 14px;
  background:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(to bottom, #47618A 0 1px, transparent 1px 80px);
  background-size: 6px 100%, 14px 100%; background-repeat: no-repeat;
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero-kicker { color: var(--muted); font-weight: 500; margin-bottom: 1.4rem; }
.hero-title {
  font-size: clamp(3rem, 1.2rem + 7.4vw, 8rem);
  line-height: .9;
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  letter-spacing: -.035em;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line span { display: inline-block; }
.hero-title .line + .line span {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}
.hero-lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); max-width: 40ch; color: var(--text); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }
.hero-tagline { color: var(--muted); font-size: .95rem; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 40ch; }

/* load sequence */
.js .hero-title .line span { transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.js .hero-title .line + .line span { animation-delay: .12s; }
.js .hero-kicker, .js .hero-lede, .js .hero-actions, .js .hero-tagline { opacity: 0; animation: fade .8s ease forwards .45s; }
.js .sentinel { opacity: 0; animation: fade 1s ease forwards .25s; }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* Sentinel head */
.sentinel { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.sentinel-stage { width: min(100%, 380px); perspective: 900px; display: flex; flex-direction: column; align-items: center; }
.sentinel-head {
  --pan: 0deg; --tilt: 0deg;
  position: relative; width: 76%;
  transform: rotateY(var(--pan)) rotateX(var(--tilt));
  transform-style: preserve-3d;
  transition: transform .12s linear;
  z-index: 2;
}
.sentinel-screen {
  position: relative; aspect-ratio: 16 / 10;
  background: radial-gradient(120% 120% at 30% 20%, #193556, #0B1524 70%);
  border: 10px solid #2B4268;
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(90, 218, 232, .2);
  display: flex; align-items: center; justify-content: center; gap: 16%;
  overflow: hidden;
}
.eye {
  width: 22%; aspect-ratio: 1; border-radius: 30%;
  background: rgba(90, 218, 232, .12);
  box-shadow: 0 0 0 2px var(--trace), 0 0 28px rgba(90, 218, 232, .45);
  display: grid; place-items: center;
  animation: blink 5.5s infinite;
}
.pupil {
  --px: 0px; --py: 0px;
  width: 42%; aspect-ratio: 1; border-radius: 50%; background: var(--trace);
  transform: translate(var(--px), var(--py));
  transition: transform .12s linear;
  box-shadow: 0 0 14px var(--trace);
}
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.scanline {
  position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(90, 218, 232, .14), transparent);
  animation: scan 3.2s linear infinite;
}
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.horn { position: absolute; top: 50%; width: 14px; height: 40px; margin-top: -20px; background: #47618A; border-radius: 4px; }
.horn-l { left: -20px; } .horn-r { right: -20px; }
.sentinel-base { width: 76%; color: #47618A; margin-top: -10px; }
.sentinel-base .servo { fill: var(--ink-3); stroke: #47618A; stroke-width: 2; }
.sentinel-base .svg-mono { font-size: 12px; fill: var(--muted); }
.sentinel-readout {
  display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center;
  font-family: var(--f-mono); font-size: .85rem; color: var(--muted);
}
.sentinel-readout b { font-weight: 500; color: var(--text); }
.sentinel-readout output { color: var(--trace); display: inline-block; min-width: 4ch; }
.sentinel-readout .lock { color: var(--signal); }

/* cursor detection box (fine pointers only) */
.reticle {
  position: absolute; left: 0; top: 0; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  pointer-events: none; opacity: 0; transition: opacity .3s;
  background:
    linear-gradient(var(--trace), var(--trace)) 0 0 / 14px 2px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 0 0 / 2px 14px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 100% 0 / 14px 2px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 100% 0 / 2px 14px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 0 100% / 14px 2px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 0 100% / 2px 14px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 100% 100% / 14px 2px no-repeat,
    linear-gradient(var(--trace), var(--trace)) 100% 100% / 2px 14px no-repeat;
}
.reticle span { position: absolute; bottom: 100%; left: 0; margin-bottom: 4px; font-family: var(--f-mono); font-size: 11px; color: var(--trace); }
.reticle.is-on { opacity: 1; }

/* =========================================================
   TICKER
   ========================================================= */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--signal); color: var(--ink);
  overflow: hidden;
  position: relative;
}
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; flex-shrink: 0; }
.ticker-list li {
  padding: .95rem 1.4rem; white-space: nowrap;
  font-weight: 800; font-size: clamp(1rem, .9rem + .5vw, 1.35rem);
  font-variation-settings: "wdth" 120; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 2.8rem;
}
.ticker-list li::after {
  content: ""; width: 10px; height: 10px; border: 2px solid currentColor; transform: rotate(45deg);
  margin-left: 1.4rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-head { position: sticky; top: calc(var(--header-h) + 40px); }
.about-body { display: grid; gap: 1.3rem; max-width: 60ch; }
.about-body p { color: var(--muted); }
.about-body .big-p { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.45; color: var(--text); font-weight: 500; }
.etymology {
  margin-top: 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap;
}
.ety-word { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); font-weight: 300; color: var(--trace); line-height: 1; font-family: Georgia, "Times New Roman", serif; }
.ety-def { color: var(--muted); font-size: .98rem; }

/* =========================================================
   DEMONSTRATION WORKSHOP
   ========================================================= */
.demo {
  background:
    linear-gradient(to right, rgba(41, 64, 95, .35) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to bottom, rgba(41, 64, 95, .35) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--ink-2);
  border-top: 1px solid var(--line);
}
.demo-head { display: grid; gap: 1.4rem; max-width: 880px; }
.demo-title { max-width: 20ch; }
.demo-intro { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }

.question {
  margin: clamp(3.5rem, 8vw, 6.5rem) 0;
  padding-left: clamp(1.2rem, 3vw, 2.4rem);
  border-left: 4px solid var(--signal);
}
.question p {
  font-size: clamp(1.9rem, 1rem + 3.6vw, 4.2rem);
  line-height: 1.04; font-weight: 300;
  font-variation-settings: "wdth" 88;
  letter-spacing: -.02em;
  max-width: 22ch;
  text-wrap: balance;
}

.stations { display: grid; gap: clamp(3.5rem, 8vw, 7rem); counter-reset: none; }
.station {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.station-flip .station-fig { order: 2; }
.station-fig {
  background: var(--ink); border: 1px solid var(--line);
  padding: clamp(.8rem, 2vw, 1.4rem);
  position: relative;
}
.station-fig::before, .station-fig::after { /* corner registration marks */
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--signal);
}
.station-fig::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.station-fig::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
.station-text { display: grid; gap: 1rem; }
.station-num { color: var(--signal); font-weight: 600; }
.station-see { font-size: 1.08rem; }
.station-see b { color: var(--trace); font-weight: 600; }
.station-learn-label { font-weight: 600; margin-top: .4rem; }
.ticks { display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--signal);
}

.demo-outro {
  margin-top: clamp(4rem, 8vw, 6rem); padding-top: 2.4rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between;
}
.demo-outro p { max-width: 58ch; font-size: 1.15rem; }

/* diagram strokes (dark context) */
.diagram { width: 100%; height: auto; color: var(--muted); overflow: visible; }
.d-frame { fill: none; stroke: #47618A; stroke-width: 2; }
.d-grid {
  fill: none; stroke: var(--line); stroke-width: 1;
}
.d-axis { fill: none; stroke: #6A82A6; stroke-width: 2; }
.d-rail { stroke: #47618A; stroke-width: 6; stroke-linecap: round; fill: none; }
.d-carriage { fill: var(--ink-3); stroke: #6A82A6; stroke-width: 2; }
.d-tip { fill: var(--signal); }
.d-solid { fill: #47618A; }
.d-head { fill: var(--ink-3); stroke: #6A82A6; stroke-width: 2; }
.d-eye { fill: none; stroke: var(--trace); stroke-width: 3; }
.d-bracket { fill: none; stroke: #6A82A6; stroke-width: 4; stroke-linecap: round; }
.d-servo { fill: var(--ink-3); stroke: #6A82A6; stroke-width: 2; }
.d-code { fill: var(--ink-2); stroke: var(--line); }
.d-dim { fill: none; stroke: var(--trace); stroke-width: 1.5; stroke-dasharray: 4 4; }
.d-filament { fill: none; stroke: var(--signal); stroke-width: 2.5; }
.code { font-size: 12.5px; fill: var(--muted); }
.code.hl { fill: var(--signal); }
.bones { fill: none; stroke: var(--trace); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .8; }
.joints circle { fill: var(--ink); stroke: var(--trace); stroke-width: 2; }
.bbox { fill: none; stroke: var(--signal); stroke-width: 3; }
.bbox-label { fill: var(--signal); }
.signal { stroke: var(--signal); stroke-width: 3; stroke-dasharray: 8 8; fill: none; }
.plot-path { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linejoin: round; }

/* diagram motion (only when in view; disabled for reduced motion) */
.js .diag-sentinel .signal { animation: dash 1s linear infinite paused; }
.js .diag-sentinel .rig-head { transform-box: fill-box; transform-origin: 50% 100%; animation: nod 4s ease-in-out infinite paused; }
.js .diag-cnc .plot-path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .diag-cnc.in-view .plot-path { animation: draw 6s linear forwards; }
.js .diag-print .nozzle { animation: sweep 2.4s ease-in-out infinite alternate paused; }
.js .diag-print .layers rect { opacity: 0; }
.js .diag-print.in-view .layers rect { animation: lay .4s ease forwards; }
.js .in-view .signal, .js .in-view .rig-head, .js .in-view .nozzle { animation-play-state: running; }
.diag-print .layers rect { fill: var(--signal); }
.diag-print .layers rect:nth-child(even) { fill: #E04A12; }
.diag-print .layers rect:nth-child(1) { animation-delay: .1s; }
.diag-print .layers rect:nth-child(2) { animation-delay: .4s; }
.diag-print .layers rect:nth-child(3) { animation-delay: .7s; }
.diag-print .layers rect:nth-child(4) { animation-delay: 1s; }
.diag-print .layers rect:nth-child(5) { animation-delay: 1.3s; }
.diag-print .layers rect:nth-child(6) { animation-delay: 1.6s; }
.diag-print .layers rect:nth-child(7) { animation-delay: 1.9s; }
.diag-print .layers rect:nth-child(8) { animation-delay: 2.2s; }
.diag-print .layers rect:nth-child(9) { animation-delay: 2.5s; }
.diag-print .layers rect:nth-child(10) { animation-delay: 2.8s; }
.diag-print .layers rect:nth-child(11) { animation-delay: 3.1s; }
.diag-print .layers rect:nth-child(12) { animation-delay: 3.4s; }
@keyframes dash { to { stroke-dashoffset: -16; } }
@keyframes nod { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sweep { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes lay { to { opacity: 1; } }

/* =========================================================
   TRACKS (drafting sheet)
   ========================================================= */
.sheet {
  background:
    linear-gradient(to right, rgba(184, 197, 214, .45) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(to bottom, rgba(184, 197, 214, .45) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--paper);
  color: var(--paper-text);
}
.tracks-head {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.tracks-intro { display: grid; gap: 1.4rem; color: var(--paper-muted); }
.three-days { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--paper-text); background: var(--paper); }
.three-days li { padding: .8rem .9rem; font-size: .92rem; line-height: 1.35; color: var(--paper-text); }
.three-days li + li { border-left: 1.5px solid var(--paper-text); }
.three-days b { display: block; font-weight: 800; font-variation-settings: "wdth" 115; font-size: 1.05rem; margin-bottom: .15rem; color: var(--signal-deep); }

.track-ui { background: var(--paper); border: 1.5px solid var(--paper-text); }
.track-tabs {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-bottom: 1.5px solid var(--paper-text);
}
.track-tab {
  background: transparent; border: 0; cursor: pointer; text-align: left;
  padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .25rem;
  color: var(--paper-muted); position: relative;
  transition: background-color .2s, color .2s;
}
.track-tab + .track-tab { border-left: 1.5px solid var(--paper-text); }
.tt-num { font-size: .85rem; font-weight: 600; }
.tt-name { font-size: clamp(1.05rem, .9rem + .6vw, 1.4rem); font-weight: 800; font-variation-settings: "wdth" 118; letter-spacing: -.01em; color: var(--paper-text); }
.track-tab:hover { background: var(--paper-2); }
.track-tab[aria-selected="true"] { background: var(--paper-text); color: var(--paper-line); }
.track-tab[aria-selected="true"] .tt-name { color: var(--paper); }
.track-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--signal);
}
.track-tab:focus-visible { outline-offset: -5px; }

.track-panel { padding: clamp(1.4rem, 4vw, 3rem); }
.track-panel:focus-visible { outline-offset: -6px; }
.js .track-panel[hidden] { display: none; }
.no-js .track-panel + .track-panel { border-top: 1.5px solid var(--paper-text); }
.js .track-panel.is-entering { animation: panelIn .45s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.tp-intro { display: grid; gap: .8rem; }
.tp-num { font-weight: 600; color: var(--signal-deep); }
.tp-title {
  font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.6rem); line-height: .92; font-weight: 900;
  font-variation-settings: "wdth" 122; letter-spacing: -.035em;
}
.tp-sub { font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); font-weight: 600; font-variation-settings: "wdth" 105; }
.tp-theme { color: var(--paper-muted); }
.tp-theme b { color: var(--paper-text); font-weight: 700; margin-right: .5rem; }
.tp-desc { font-size: 1.1rem; max-width: 46ch; }
.tp-art { width: 100%; height: auto; max-height: 280px; overflow: visible; }
.a-line { fill: none; stroke: var(--paper-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.a-thin { fill: none; stroke: var(--paper-muted); stroke-width: 1.4; stroke-dasharray: 5 5; }
.a-accent { fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.a-dash { fill: none; stroke: var(--signal); stroke-width: 3; stroke-dasharray: 6 6; }
.a-dot { fill: var(--signal); }
.a-note { font-family: var(--f-mono); font-size: 13px; fill: var(--paper-muted); }

.days { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--paper-text); }
.day { padding: 1.6rem clamp(1rem, 2vw, 1.8rem) 1.8rem 0; }
.day + .day { padding-left: clamp(1rem, 2vw, 1.8rem); border-left: 1px dashed var(--paper-line); }
.day-n {
  display: inline-block; font-weight: 800; font-variation-settings: "wdth" 115;
  background: var(--paper-text); color: var(--paper); padding: .15rem .6rem; font-size: .9rem; margin-bottom: .8rem;
}
.day-t { font-size: clamp(1.15rem, 1rem + .45vw, 1.35rem); font-weight: 800; line-height: 1.15; font-variation-settings: "wdth" 108; margin-bottom: 1rem; letter-spacing: -.01em; }
.day ul { display: grid; gap: .55rem; }
.day li { position: relative; padding-left: 1.2rem; font-size: .97rem; color: #26364F; line-height: 1.5; }
.day li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border: 1.5px solid var(--signal-deep); transform: rotate(45deg); }

.tp-foot {
  border-top: 1.5px solid var(--paper-text); padding-top: 1.6rem;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
}
.outcomes h4 { font-size: 1rem; font-weight: 700; margin-bottom: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 820px; }
.chips li { border: 1.5px solid var(--paper-text); padding: .3rem .75rem; font-size: .9rem; font-weight: 500; background: var(--paper); }

/* =========================================================
   APPROACH
   ========================================================= */
.approach-head { display: grid; gap: 1.4rem; margin-bottom: clamp(3rem, 7vw, 5rem); }
.approach-intro { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }
.pipeline {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem;
  position: relative; padding-top: 2.2rem;
}
.pipeline::before { /* the trace */
  content: ""; position: absolute; top: calc(2.2rem + 11px); left: 0; right: 0; height: 2px;
  background: var(--line);
}
.pipeline::after { /* signal pulse along the trace */
  content: ""; position: absolute; top: calc(2.2rem + 10px); left: 0; height: 4px; width: 0;
  background: var(--signal); box-shadow: 0 0 12px var(--signal);
}
.js .pipeline.is-visible::after { animation: pulse 2.4s var(--ease) forwards .3s; }
.no-js .pipeline::after { width: 100%; }
@keyframes pulse { to { width: 100%; } }
.stage { position: relative; display: grid; gap: .6rem; align-content: start; }
.pad {
  width: 24px; height: 24px; background: var(--ink); border: 3px solid var(--signal);
  border-radius: 50%; position: relative; z-index: 1; margin-bottom: 1rem;
}
.pad::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--signal); }
.stage-n { font-family: var(--f-mono); color: var(--muted); font-size: .9rem; }
.stage-v {
  font-size: clamp(1.4rem, .6rem + 1.6vw, 2.1rem); line-height: 1; font-weight: 900;
  font-variation-settings: "wdth" 100; letter-spacing: -.03em;
}
.stage p { color: var(--muted); font-size: .98rem; max-width: 26ch; }

/* =========================================================
   BENCH (capabilities)
   ========================================================= */
.bench { background: var(--ink-2); border-block: 1px solid var(--line); }
.bench-head { display: grid; gap: 1.4rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.bench-head p:not(.section-label) { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }
.bench-table { border-top: 2px solid var(--text); }
.bt-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 2rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line); align-items: center;
  transition: background-color .2s;
}
.bt-row:not(.bt-head):hover { background: rgba(90, 218, 232, .05); }
.bt-head { color: var(--muted); font-size: .9rem; padding: .7rem 0; }
.bt-field { font-size: clamp(1.1rem, .95rem + .6vw, 1.5rem); font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -.01em; line-height: 1.2; }
.bt-where { display: flex; flex-wrap: wrap; gap: .45rem; }
.bt-where i {
  font-style: normal; font-size: .88rem; font-weight: 500; padding: .22rem .65rem;
  border: 1px solid #47618A; color: var(--text);
}

/* =========================================================
   TEAM
   ========================================================= */
.team-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.person { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2rem); align-items: start; border-top: 2px solid var(--text); padding-top: 1.6rem; }
.person-photo { aspect-ratio: 1; background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-body { display: grid; gap: .8rem; }
.person-role { color: var(--signal); font-weight: 600; font-size: .98rem; }
.person-name { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); font-weight: 800; line-height: 1.1; font-variation-settings: "wdth" 115; letter-spacing: -.02em; }
.person-desc { color: var(--text); }
.person-bio { color: var(--muted); }

/* =========================================================
   ENQUIRY
   ========================================================= */
.enquire { background: var(--ink-2); border-top: 1px solid var(--line); }
.enquire-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.enquire-copy { display: grid; gap: 1.3rem; position: sticky; top: calc(var(--header-h) + 40px); }
.enquire-copy > p:not(.section-label) { color: var(--muted); max-width: 52ch; }
.contact-list { display: grid; gap: .1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 80px 1fr; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }

.enquiry-form {
  background: var(--ink); border: 1px solid var(--line);
  padding: clamp(1.3rem, 4vw, 2.6rem);
  display: grid; gap: 1.2rem;
  position: relative;
}
.enquiry-form::before { content: ""; position: absolute; top: -1px; left: -1px; width: 60px; height: 4px; background: var(--signal); }
.field { display: grid; gap: .45rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.req { color: var(--signal); }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .75rem .9rem;
  background: var(--ink-2); border: 1.5px solid #3A5378; border-radius: 0;
  color: var(--text); font-size: 1rem;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field select option { background: var(--ink); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #6E83A0; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #5A77A0; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--trace); background: #182A45; box-shadow: 0 0 0 3px rgba(90, 218, 232, .25); }
.field [aria-invalid="true"] { border-color: #FF7A6B; }
.field-err { color: #FF9B8F; font-size: .9rem; min-height: 0; }
.field-err:empty { display: none; }

.pick-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span {
  display: inline-block; padding: .5rem .9rem; border: 1.5px solid #3A5378; font-size: .95rem; font-weight: 500;
  transition: background-color .2s, border-color .2s, color .2s;
}
.pick:hover span { border-color: #5A77A0; }
.pick input:checked + span { background: var(--trace); border-color: var(--trace); color: var(--ink); }
.pick input:focus-visible + span { outline: 3px solid var(--trace); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }
.form-note { color: var(--muted); font-size: .9rem; }
.form-status:empty { display: none; }
.form-status { padding: 1rem 1.1rem; border: 1.5px solid; font-size: .98rem; }
.form-status:focus { outline: none; }
.form-status.is-success { border-color: var(--trace); background: rgba(90, 218, 232, .08); }
.form-status.is-error { border-color: #FF7A6B; background: rgba(255, 122, 107, .08); }
.form-status.is-info { border-color: var(--signal); background: rgba(255, 91, 31, .08); }
.form-status strong { display: block; margin-bottom: .25rem; }
.form-status .btn { margin-top: .8rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { padding-top: clamp(60px, 8vw, 100px); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-word {
  font-size: clamp(2.4rem, 1.4rem + 4vw, 5rem); line-height: .9; font-weight: 900;
  font-variation-settings: "wdth" 125; letter-spacing: -.04em; margin-bottom: 1rem;
}
.footer-tag { color: var(--muted); font-size: 1.05rem; }
.footer-nav ul { display: grid; gap: .5rem; }
.footer-nav a, .to-top { text-decoration: none; color: var(--muted); transition: color .2s; }
.footer-nav a:hover, .to-top:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact { display: grid; gap: .6rem; color: var(--muted); align-content: start; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.4rem 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* =========================================================
   REVEALS (only key headings & figures, JS adds .is-visible)
   ========================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .9s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .track-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .track-tab { flex: 0 0 auto; min-width: 170px; scroll-snap-align: start; }
  .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 3rem; }
  .pipeline::before, .pipeline::after { display: none; }
  .person { grid-template-columns: 1fr; }
  .person-photo { max-width: 260px; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .sentinel { order: -1; }
  .sentinel-stage { width: min(68%, 300px); }
  .about-grid, .tracks-head, .enquire-grid { grid-template-columns: 1fr; }
  .about-head, .enquire-copy { position: static; }
  .station, .station-flip { grid-template-columns: 1fr; }
  .station-flip .station-fig { order: 0; }
  .tp-top { grid-template-columns: 1fr; }
  .tp-art { max-width: 420px; max-height: 240px; }
  .days { grid-template-columns: 1fr; }
  .day, .day + .day { padding: 1.4rem 0; border-left: 0; }
  .day + .day { border-top: 1px dashed var(--paper-line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .brand-word { font-size: 1.02rem; }
  .hero-title { font-size: clamp(2.5rem, 11.5vw, 3.4rem); }
  .hero-title .line + .line span { -webkit-text-stroke-width: 1.5px; }
  .stage-v { font-size: 1.7rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .reticle { display: none; }
  .three-days { grid-template-columns: 1fr; }
  .three-days li + li { border-left: 0; border-top: 1.5px solid var(--paper-text); }
  .track-tab { min-width: 140px; padding: .9rem 1rem; }
  .pipeline { grid-template-columns: 1fr; row-gap: 0; padding-top: 0; }
  .stage { grid-template-columns: 24px 1fr; column-gap: 1.2rem; padding-bottom: 2rem; position: relative; }
  .stage > :not(.pad) { grid-column: 2; }
  .pad { grid-row: 1 / span 3; margin: 0; }
  .stage:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
  .stage p { max-width: none; }
  .bt-row { grid-template-columns: 1fr; gap: .6rem; }
  .bt-head { display: none; }
  .team-grid { grid-template-columns: 1fr; }
  .person { grid-template-columns: 110px 1fr; }
  .person-photo { max-width: none; }
  .field-row { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 70px 1fr; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; animation-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker-list[aria-hidden="true"] { display: none; }
  .ticker-list { flex-wrap: wrap; justify-content: center; }
  .scanline { display: none; }
  .js .diag-cnc .plot-path { stroke-dashoffset: 0; }
  .js .diag-print .layers rect { opacity: 1; }
  .pipeline::after { width: 100%; }
  .reticle { display: none; }
}

.tracks-head .h2 { max-width: 14ch; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.9rem); }

/* =========================================================
   PRODUCT PHOTO SLOTS (demo modules + advanced tracks)
   ========================================================= */
.product-photo { margin: 0; aspect-ratio: 2 / 1; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.station > .product-photo { grid-column: 1 / -1; order: 3; }
.track-panel > .product-photo { border: 1.5px solid var(--paper-text); margin-bottom: clamp(2rem, 4vw, 3rem); }
