/* AEROSENS — PCB-silkscreen design system: tokens, reset, typography, layout
   primitives. Loaded on every page.

   The world: the site is the tag's own circuit board. White soldermask ground,
   silkscreen ink linework, reference designators, 45°-routed traces, pads and
   test points. Three ink plates only — ink black, claim crimson, defense navy —
   and nothing exists outside them. Light-mode only, by brand commitment. */

/* Self-hosted type program — Space Grotesk (display), IBM Plex Sans (body),
   IBM Plex Mono (data), latin + latin-ext subsets, served from assets/fonts
   (no third-party fetch). Space Grotesk and Plex Sans are variable on weight
   (300-700 / 100-700), so any weight in range is a real outline.

   Plex Mono is the exception: it ships as two STATIC files, 400 and 500, and
   nothing else. Setting `--font-data` type to 600 or 700 therefore buys no
   bolder outline — the browser fakes one by smearing the 500 glyphs, and
   WebKit's synthetic bold is far heavier than Blink's (measured: +4.7% run
   width in Safari vs Chrome on the same label). That is why mono type reads
   thicker, and unevenly so, in Safari. Keep `--font-data` at 400 or 500, or
   add the real 600/700 subsets here before asking for them. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-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;
}

:root {
  /* Board surfaces */
  --paper: #ffffff; /* white soldermask — the ground everywhere */
  --substrate: #f5f7f9; /* exposed substrate — quiet panel fill */
  --substrate-veil: rgba(88, 122, 155, 0.06); /* composites to exactly #f5f7f9
    on paper — section.alt uses this form so the signal layer's waves pass
    beneath the panel instead of cutting off at its border; opaque surfaces
    (footer, media slots) keep --substrate */
  --hairline: #d9dfe6; /* fab hairline rules */
  --grid-dot: rgba(1, 8, 17, 0.08); /* placement-grid dots */

  /* Ink plates. Brand crimson + near-black ink come from the logo;
     navy is the Defense track's supporting ink only (never a lead). */
  --ink: #010811;
  --ink-2: #47525f; /* muted silkscreen — ≥4.5:1 on paper and substrate */
  --signal-red: #eb0043;
  --signal-red-rgb: 235, 0, 67;
  --signal-red-dark: #b8003a; /* hover/darkened claim; use on tinted surfaces */
  --signal-navy: #123a5e;
  --signal-navy-rgb: 18, 58, 94;
  --signal-navy-dark: #1c4d7a;

  /* Semantic accent — rescoped per track (see track-*.css).
     Default + Commercial: claim crimson. Defense: navy. */
  --accent: var(--signal-red);
  --accent-dark: var(--signal-red-dark);
  --accent-rgb: var(--signal-red-rgb);
  --accent-tint: rgba(var(--accent-rgb), 0.07);
  --accent-ink: #ffffff;

  /* Type — a three-way pairing. Space Grotesk is the display voice (its
     geometric, slightly technical cut suits board headings); IBM Plex Sans
     carries body copy; IBM Plex Mono is the data face for designators,
     measurements, and datelines. Display and body are separate families
     here, so heading hierarchy comes from size and weight, not a width axis. */
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-size-base: 1rem;
  --line-height-base: 1.65;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --radius: 3px;
  --radius-sm: 2px;
  --shadow-lift:
    0 1px 2px rgba(1, 8, 17, 0.05), 0 14px 34px rgba(1, 8, 17, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-2) transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--ink);
  background: var(--paper);
  caret-color: var(--signal-red);

  /* Never let a browser invent a weight we didn't ship. Plex Mono exists here
     only at 400 and 500 (see the @font-face note above), and a faked bold is
     not the same shape in every engine — WebKit's smear ran ~4.7% wider than
     Blink's, which is why mono type looked thicker, and thicker unevenly, in
     Safari. With synthesis off, a weight we don't have falls back to the
     nearest one we do instead of being drawn twice with an offset. Inherited,
     so it covers the whole page including SVG <text>.

     `style` stays permitted: no italic face is self-hosted for any of the three
     families, so synthetic obliquing is the only italic available and we want
     to keep it. */
  font-synthesis: style;
  font-synthesis-weight: none;
}

/* Browser surfaces carry the design too. */
::selection {
  background: var(--signal-red);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--ink-2);
}

ul,
ol {
  padding-left: 1.25rem;
  color: var(--ink-2);
}

li {
  margin-bottom: var(--space-2);
}

strong {
  color: var(--ink);
}

/* Data voice — measurements, designators, datelines. Tabular by default. */
.data {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Narrow document container — article and legal sheets. */
.container-narrow {
  max-width: 820px;
}

section {
  padding: var(--space-16) 0;
}

/* Exposed-substrate panel section. The veil form renders the identical
   #f5f7f9 but stays 94% transparent, so the broadcast plane behind <main>
   shows through — a wavefront crossing this panel keeps going instead of
   cutting off at the hairline. */
section.alt {
  background: var(--substrate-veil);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.lede {
  font-size: 1.15rem;
  max-width: 62ch;
  color: var(--ink-2);
}

/* Wide lede — for a full-width hero with no media column beside it, where a
   62ch paragraph strands half the sheet empty under a full-width rule. Longer
   than the body measure, still short of the 105ch it would take to reach the
   container edge, which would be unreadable. */
.lede.wide {
  max-width: 78ch;
}

.grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.text-center {
  text-align: center;
}

.prose {
  max-width: 68ch;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Placement grid — the board's fine dot lattice, used as a quiet ground
   on hero regions. Kept faint enough to read as fab texture, not pattern. */
.board-grid {
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px);
  background-size: 26px 26px;
}
