/* ==========================================================================
   Dataflex — "Signal & Ink"
   A dark instrument panel. Cyan is raw signal; amber is the record we
   extract from it. Every accent on this site is one of those two things.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url('../fonts/archivo-400_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: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url('../fonts/archivo-400_700-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: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-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 Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-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.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;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* dark is the default identity */
  --page: #080b11;
  --panel: #0d111a;
  --panel-2: #121826;
  --panel-3: #171e2e;
  --line: #1d2534;
  --line-2: #2a3446;

  --text: #dbe2ec;
  --text-mid: #94a1b5;
  --text-dim: #64738b;

  --signal: #3ddbd9;
  --signal-ink: #051a1a;
  --signal-wash: rgba(61, 219, 217, 0.10);
  --signal-edge: rgba(61, 219, 217, 0.28);

  --meaning: #ffb86b;
  --meaning-wash: rgba(255, 184, 107, 0.10);
  --meaning-edge: rgba(255, 184, 107, 0.30);

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 24px 60px -32px rgba(0, 0, 0, 0.9);

  --font-display: 'Archivo', 'Archivo Expanded', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.25rem);
  --max: 1240px;
  --radius: 3px;
  --radius-lg: 5px;

  --step: cubic-bezier(0.16, 0.84, 0.44, 1);

  color-scheme: dark;
}

:root[data-theme='light'] {
  --page: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f6f8fa;
  --panel-3: #eef2f6;
  --line: #dbe1e9;
  --line-2: #c3ccd8;

  --text: #0a0e16;
  --text-mid: #4c5a6e;
  --text-dim: #6c7b91;

  --signal: #04807d;
  --signal-ink: #ffffff;
  --signal-wash: rgba(4, 128, 125, 0.08);
  --signal-edge: rgba(4, 128, 125, 0.24);

  --meaning: #a35a07;
  --meaning-wash: rgba(163, 90, 7, 0.08);
  --meaning-edge: rgba(163, 90, 7, 0.26);

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -30px rgba(10, 20, 40, 0.35);

  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --page: #eef1f5;
    --panel: #ffffff;
    --panel-2: #f6f8fa;
    --panel-3: #eef2f6;
    --line: #dbe1e9;
    --line-2: #c3ccd8;
    --text: #0a0e16;
    --text-mid: #4c5a6e;
    --text-dim: #6c7b91;
    --signal: #04807d;
    --signal-ink: #ffffff;
    --signal-wash: rgba(4, 128, 125, 0.08);
    --signal-edge: rgba(4, 128, 125, 0.24);
    --meaning: #a35a07;
    --meaning-wash: rgba(163, 90, 7, 0.08);
    --meaning-edge: rgba(163, 90, 7, 0.26);
    --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 18px 40px -30px rgba(10, 20, 40, 0.35);
    color-scheme: light;
  }
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--signal);
  color: var(--signal-ink);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--signal);
  color: var(--signal-ink);
  padding: 0.7rem 1.1rem;
  font: 500 0.8125rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

.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;
}

/* --- The panel grid ------------------------------------------------------- */
/* Four hairlines behind everything: the instrument's chassis. */

.chassis {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.chassis__inner {
  width: min(100% - var(--gutter) * 2, var(--max));
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.chassis__inner span {
  border-left: 1px solid var(--line);
  opacity: 0.55;
}
.chassis__inner span:last-child {
  border-right: 1px solid var(--line);
}

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

/* --- Layout --------------------------------------------------------------- */

.wrap {
  width: min(100% - var(--gutter) * 2, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding-block: clamp(3.75rem, 6vw, 6.5rem);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 4.5vw, 4.75rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* --- Type ----------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.d-hero {
  font-size: clamp(2.5rem, 0.95rem + 6.4vw, 6.75rem);
}
.d-1 {
  font-size: clamp(1.9rem, 1.25rem + 2.6vw, 3.1rem);
}
.d-2 {
  font-size: clamp(1.45rem, 1.15rem + 1.25vw, 2rem);
}
.d-3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.62;
  color: var(--text-mid);
  max-width: 62ch;
}

.body-mid {
  color: var(--text-mid);
}

p + p {
  margin-top: 1.05em;
}

.prose p {
  color: var(--text-mid);
  max-width: 68ch;
}

/* mono utility face — every label, code, timestamp and unit on the site */
.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 500;
}

.mono--sm {
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
}

/* Eyebrow: a label, then a trace running to the edge of the column. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--signal);
  margin-bottom: 1.6rem;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.eyebrow::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.eyebrow--amber {
  color: var(--meaning);
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.22s var(--step), border-color 0.22s var(--step),
    color 0.22s var(--step), transform 0.22s var(--step);
}

.btn:hover {
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-wash);
}

.btn__arrow {
  transition: transform 0.24s var(--step);
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--signal-ink);
}
.btn--primary:hover {
  background: var(--signal);
  color: var(--signal-ink);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.4rem;
}

/* Text link with an underline that behaves like a trace being drawn */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--signal);
  text-decoration: none;
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--step);
}
.tlink:hover,
.tlink:focus-visible {
  background-size: 100% 1px;
}

/* --- Header --------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--signal);
  transition: color 0.25s var(--step);
}

/* the mark is the thesis in miniature: a sine wave and the same wave
   quantised — continuous signal on the left, discrete record on the right */
.brand__mark .mark-bar {
  stroke: var(--meaning);
}

.brand__name {
  font-family: var(--font-display);
  font-stretch: 122%;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  margin-right: 0.75rem;
}

.nav a {
  position: relative;
  padding: 0.55rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.2s var(--step), background 0.2s var(--step);
}

.nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.nav a[aria-current='page'] {
  color: var(--signal);
}
.nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.2rem;
  height: 1px;
  background: currentColor;
}

.masthead__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--text-mid);
  transition: color 0.2s var(--step), border-color 0.2s var(--step);
}
.icon-btn:hover {
  color: var(--signal);
  border-color: var(--signal-edge);
}

.theme-toggle .i-sun {
  display: none;
}
:root[data-theme='light'] .theme-toggle .i-sun {
  display: block;
}
:root[data-theme='light'] .theme-toggle .i-moon {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .i-sun {
    display: block;
  }
  :root:not([data-theme]) .theme-toggle .i-moon {
    display: none;
  }
}

.nav-toggle {
  display: none;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: grid;
  }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--page);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--step), transform 0.2s var(--step),
      visibility 0.2s;
  }
  .nav[data-open='true'] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.8rem;
  }
  .nav a[aria-current='page']::after {
    display: none;
  }
  .nav .btn {
    margin-top: 1.1rem;
    justify-content: center;
  }
}

.nav .btn {
  padding: 0.6rem 1rem;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero::before {
  /* a low aurora of signal light, off-centre so it never reads as a template glow */
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(
    circle,
    var(--signal-wash) 0%,
    transparent 62%
  );
  pointer-events: none;
}


.hero__kicker {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.hero__kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-wash);
}

.hero h1 {
  max-width: 19ch;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.hero h1 em {
  font-style: normal;
  color: var(--signal);
}

/* the signal rule: full width, never distorted — it scales down in height
   with the viewport instead of squashing */
.hero__rule {
  display: block;
  width: 100%;
  height: auto;
  color: var(--signal);
  overflow: visible;
}

.hero__rule--narrow {
  display: none;
}

@media (max-width: 720px) {
  .hero__rule--wide {
    display: none;
  }
  .hero__rule--narrow {
    display: block;
  }
}

.hero__rule-wave {
  opacity: 0.55;
}

.hero__rule-head {
  color: var(--meaning);
  stroke: var(--meaning);
  opacity: 0.7;
}

.hero__rule-step {
  color: var(--meaning);
  stroke: var(--meaning);
  opacity: 0.8;
}

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

@media (max-width: 860px) {
  .hero__foot {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero__foot .lead {
  max-width: 46ch;
}

.hero__meta {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.hero__meta > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 860px) {
  .hero__meta {
    max-width: 34rem;
  }
}

.hero__meta dt,
.hero__meta .k {
  color: var(--text-dim);
}

.hero__meta .v {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 600;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  letter-spacing: -0.015em;
  color: var(--text);
  text-align: right;
}

/* --- Panels & cards ------------------------------------------------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.25s var(--step), transform 0.25s var(--step),
    background 0.25s var(--step);
}

.card::after {
  /* a trace that runs along the top edge when you point at it */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  transform: scaleX(0);
  transition: transform 0.4s var(--step);
}

a.card:hover,
a.card:focus-visible {
  border-color: var(--line-2);
  background: var(--panel-2);
  transform: translateY(-2px);
}

a.card:hover::after,
a.card:focus-visible::after {
  transform: scaleX(1);
}

.card__glyph {
  width: 46px;
  height: 46px;
  color: var(--signal);
}

.card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card p {
  color: var(--text-mid);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

.chip--live {
  color: var(--signal);
  border-color: var(--signal-edge);
  background: var(--signal-wash);
}
.chip--build {
  color: var(--meaning);
  border-color: var(--meaning-edge);
  background: var(--meaning-wash);
}

.grid {
  display: grid;
  gap: 1px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* --- Pipeline (Capture → Interpret → Structure → Deliver) ----------------- */
/* Order carries meaning here: it is the actual path data takes through us. */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}

@media (max-width: 940px) {
  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .pipeline {
    grid-template-columns: 1fr;
  }
}

.stage {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stage:last-child {
  border-right: 0;
}

@media (max-width: 940px) {
  .stage:nth-child(2n) {
    border-right: 0;
  }
  .stage:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .stage {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stage:last-child {
    border-bottom: 0;
  }
}

.stage__idx {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stage__idx b {
  color: var(--signal);
  font-weight: 500;
}

.stage__viz {
  height: 52px;
  color: var(--signal);
  opacity: 0.9;
}

.stage h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.stage p {
  color: var(--text-mid);
  font-size: 0.875rem;
  line-height: 1.58;
}

/* --- Flagship block ------------------------------------------------------- */

.flagship {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
}

@media (max-width: 1000px) {
  .flagship {
    grid-template-columns: 1fr;
  }
}

.spec {
  display: grid;
  gap: 0;
  margin-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.spec div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

@media (max-width: 480px) {
  .spec div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.spec dt {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spec dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
}

/* --- Dashboard mock ------------------------------------------------------- */

.mock {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text-dim);
}

.mock__bar .dots {
  display: flex;
  gap: 5px;
}
.mock__bar .dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
}

.mock__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 620px) {
  .mock__body {
    grid-template-columns: 1fr;
  }
}

.mock__cell {
  padding: 1.05rem 1.1rem 1.2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.mock__cell:nth-child(2n) {
  border-right: 0;
}
@media (max-width: 620px) {
  .mock__cell {
    border-right: 0;
  }
}

.mock__cell--wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.mock__cell:last-child {
  border-bottom: 0;
}

.mock__label {
  color: var(--text-dim);
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.mock__stat {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mock__sub {
  color: var(--text-dim);
  font-size: 0.8125rem;
  margin-top: 0.4rem;
}

/* bar chart, drawn with divs so it stays crisp and themable */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 62px;
}

.bars i {
  flex: 1;
  background: var(--signal);
  opacity: 0.34;
  border-radius: 1px 1px 0 0;
  transform-origin: bottom;
}

.bars i.hi {
  opacity: 1;
}

.mock__rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mock__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8125rem;
}

.mock__row .track {
  display: block; /* inline spans ignore height — the bars vanish without this */
  height: 4px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
  margin-top: 0.35rem;
}
.mock__row .track i {
  display: block;
  height: 100%;
  background: var(--meaning);
  border-radius: 2px;
}

.mock__row .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.mock__row .name {
  display: block;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Principles ----------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (max-width: 1000px) {
  .principles {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.principles__head {
  position: sticky;
  top: 108px;
}

@media (max-width: 1000px) {
  .principles__head {
    position: static;
  }
}


.principle {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.principle:first-of-type {
  border-top: 1px solid var(--line);
}

.principle__no {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  padding-top: 0.35rem;
}

.principle h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.principle p {
  color: var(--text-mid);
  max-width: 68ch;
  font-size: 0.9375rem;
}

@media (max-width: 560px) {
  .principle {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* --- Project entries (about page) ---------------------------------------- */

.entry {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 15rem);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.entry:first-of-type {
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}

.entry__glyph {
  width: 56px;
  height: 56px;
  color: var(--signal);
}

.entry__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.entry h3 {
  font-family: var(--font-display);
  font-stretch: 114%;
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  letter-spacing: -0.02em;
}

.entry__what {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry p {
  color: var(--text-mid);
  max-width: 60ch;
}

.entry__facts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

.entry__fact {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.6rem;
  font-size: 0.8125rem;
  align-items: baseline;
}

.entry__fact span:first-child {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry__fact span:last-child {
  color: var(--text-mid);
}

/* --- Feature list --------------------------------------------------------- */

.feat {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.feat:first-child {
  border-top: 1px solid var(--line);
}

.feat__tick {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 0.28rem;
  color: var(--signal);
}

.feat b {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.9375rem;
}

.feat span {
  color: var(--text-mid);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* --- CTA ------------------------------------------------------------------ */

.cta {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--panel-2), var(--panel) 62%);
  padding: clamp(2.25rem, 5vw, 4rem);
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 140% at 88% 8%,
    var(--signal-wash),
    transparent 55%
  );
  pointer-events: none;
}

.cta > * {
  position: relative;
}

.cta h2 {
  max-width: 20ch;
  margin-bottom: 1.1rem;
}

/* --- Contact -------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.field label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s var(--step), background 0.2s var(--step);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--signal);
  outline: none;
  background: var(--panel-2);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.form-status {
  margin-top: 1rem;
  min-height: 1.2em;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: none;
}
.form-status[data-tone='ok'] {
  color: var(--signal);
}
.form-status[data-tone='error'] {
  color: var(--meaning);
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 1.6rem 1.5rem;
}

.contact-card + .contact-card {
  margin-top: 1.25rem;
}

.contact-card a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid var(--signal-edge);
  word-break: break-word;
}
.contact-card a:hover {
  border-bottom-color: var(--signal);
}

.mail {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.1rem, 1rem + 1vw, 1.6rem);
  letter-spacing: -0.02em;
  color: var(--signal);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid var(--signal-edge);
  padding-bottom: 2px;
}
.mail:hover {
  border-bottom-color: var(--signal);
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 5vw, 4rem) 2rem;
  position: relative;
  z-index: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
}

@media (max-width: 860px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.footer__h {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer li a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.18s var(--step);
}

.footer li a:hover {
  color: var(--signal);
}

.footer__about p {
  color: var(--text-mid);
  font-size: 0.875rem;
  max-width: 34ch;
  margin-top: 1rem;
}

.footer__base {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-dim);
}

.footer__base a {
  color: var(--text-dim);
  text-decoration: none;
}
.footer__base a:hover {
  color: var(--signal);
}

/* --- Reveal on scroll ----------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--step), transform 0.65s var(--step);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --- Misc pages ----------------------------------------------------------- */

.page-head {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.page-head h1 {
  max-width: 18ch;
  margin-bottom: 1.4rem;
}

.legal h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin-top: 2.5rem;
  margin-bottom: 0.7rem;
}

.legal ul {
  list-style: none;
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal li {
  color: var(--text-mid);
  padding-left: 1.15rem;
  position: relative;
  max-width: 68ch;
}

.legal li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--signal);
}

.notfound {
  min-height: 62vh;
  display: grid;
  align-content: center;
  padding-block: 5rem;
}

.notfound__code {
  font-family: var(--font-mono);
  color: var(--meaning);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  margin-bottom: 1.5rem;
}

/* --- Motion preferences --------------------------------------------------- */

@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;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  .masthead,
  .chassis,
  .reader,
  .footer,
  .btn-row {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
