/* =========================================================================
   METRIX — marketing site
   Style: GetLayers "Kimi" (kimi-style), committed in getlayers.json.
   A light art-directed sheet: near-white ground, near-black ink, ONE
   electric-cyan accent spent on instrumentation, Oswald for display and
   Space Grotesk for everything said, uppercase throughout, corner brackets
   and chamfers instead of borders and radii.
   ========================================================================= */

/* Tier 1 — primitives. The only place a literal colour may appear. */
:root {
  --raw-ice-50: #f7fafb;
  --raw-ice-100: #ebeef1;
  --raw-ice-200: #dfe5e9;
  --raw-steel-400: #b6c1c8;
  --raw-ink-950: #090a0b;
  --raw-ink-900: #0e0f14;
  --raw-ink-800: #1b1d24;
  --raw-ink-700: #2a2d36;
  --raw-ink-a35: rgb(9 10 11 / 0.35);
  --raw-ink-a55: rgb(9 10 11 / 0.55);
  --raw-ink-a08: rgb(9 10 11 / 0.08);
  --raw-slate-500: #7a7a7a;
  --raw-slate-600: #4d4d4d;
  --raw-cyan-400: #02d2e3;
  --raw-cyan-a25: rgb(2 210 227 / 0.25);
  --raw-white: #ffffff;
  --raw-white-a04: rgb(255 255 255 / 0.04);
  --raw-white-a10: rgb(255 255 255 / 0.1);
  --raw-white-a15: rgb(255 255 255 / 0.15);
  --raw-white-a40: rgb(255 255 255 / 0.4);
}

/* Tier 2 — roles. */
:root {
  --background: var(--raw-ice-50);
  --foreground: var(--raw-ink-950);
  --foreground-muted: var(--raw-ink-a35);
  --foreground-soft: var(--raw-ink-a55);
  --surface-dark: var(--raw-ink-900);
  --surface-dark-raised: var(--raw-ink-800);
  --surface-black: var(--raw-ink-950);
  --surface-muted: var(--raw-ice-100);
  --surface-soft: var(--raw-ice-200);
  --on-dark: var(--raw-white);
  --on-dark-muted: var(--raw-steel-400);
  --on-dark-faint: var(--raw-white-a40);
  --on-dark-line: var(--raw-white-a15);
  --border-muted: var(--raw-ice-200);
  --border-on-dark: var(--raw-ink-700);
  --map-dot: var(--raw-slate-500);
  --map-grid: var(--raw-slate-600);
  --accent: var(--raw-cyan-400);
  --accent-muted: var(--raw-cyan-a25);
  --contour-light: var(--raw-ink-a08);
  --contour-dark: var(--raw-white-a10);

  --t-impact: 6rem;
  --t-display-lg: 4.375rem;
  --t-display: 3.25rem;
  --t-display-sm: 3.4375rem;
  --t-heading: 2.375rem;
  --t-title: 1.25rem;
  --t-lead: 1.125rem;
  --t-label: 1rem;
  --t-body: 0.875rem;
  --t-eyebrow: 0.75rem;

  --lh-headline: 0.95;
  --lh-flat: 0.9;
  --lh-cap: 0.72;
  --lh-display: 1.1;
  --tr-stat: -0.08em;
  --tr-label: -0.04em;
  --tr-eyebrow: -0.02em;

  --font-sans: "Space Grotesk", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --ease-entrance: cubic-bezier(0.2, 0, 0, 1);
  --ease-plate: cubic-bezier(0.33, 0, 0, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-plate: 700ms;

  --gutter: 1.5rem;
}
@media (min-width: 640px) {
  :root { --gutter: 2rem; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100lvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4, p, dl, dd, dt { font-size: inherit; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--surface-black); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}
.skip {
  position: fixed; left: 1rem; top: 1rem; z-index: 200; padding: 0.75rem 1rem;
  background: var(--surface-black); color: var(--on-dark); font-size: var(--t-body);
  text-transform: uppercase; transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- the adaptive grid ----------
   Drawn at 1440. From 1280 the root scales with the viewport so a design
   pixel stays a share of the width; below 1280 it holds at 16px and the
   layouts adapt by breakpoint. Above 1920 main.js damps the growth. */
html { font-size: 16px; }
@media (min-width: 1280px) { html { font-size: 1.111111vw; } }

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: var(--t-eyebrow); font-weight: 500; text-transform: uppercase;
  line-height: var(--lh-flat); letter-spacing: var(--tr-eyebrow);
}
.idx { color: var(--accent); }
.dot { display: inline-block; }

/* ---------- text engine ----------
   A flex row of inline-block words (or letters), spaced by a column gap in
   em, played in by stagger. Never clipped: the display leadings would crop
   descenders under a mask. */
.te { display: flex; flex-wrap: wrap; column-gap: 0.26em; }
.te-box { display: contents; }
.te-word { display: inline-flex; white-space: nowrap; }
.te-unit {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.42em, 0);
  transition:
    opacity 0.7s var(--ease-entrance) var(--te-d, 0ms),
    transform 1.1s var(--ease-entrance) var(--te-d, 0ms);
}
.te-letters .te-unit {
  filter: blur(0.12em);
  transition:
    opacity 0.6s var(--ease-entrance) var(--te-d, 0ms),
    transform 0.9s var(--ease-entrance) var(--te-d, 0ms),
    filter 0.9s var(--ease-entrance) var(--te-d, 0ms);
}
.te.is-in .te-unit { opacity: 1; transform: none; filter: none; }
html:not(.js) .te-unit { opacity: 1; transform: none; filter: none; }

/* Blocks that rise into place on first view. */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
  transition:
    opacity 0.9s var(--ease-entrance) var(--d, 0ms),
    transform 1.2s var(--ease-entrance) var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }

/* Hairline rules that draw themselves from the left. */
[data-rule] { transform-origin: left center; transform: scaleX(0); transition: transform 1.4s var(--ease-plate) var(--d, 200ms); }
[data-rule].is-in { transform: scaleX(1); }
html:not(.js) [data-rule] { transform: none; }

/* ---------- corner brackets ----------
   One 10px right angle drawn four ways. Black on light grounds, cyan on the
   dark band; they breathe outward when the panel is hovered. */
[data-brackets] { position: relative; }
.bk {
  position: absolute; width: 0.625rem; height: 0.625rem; pointer-events: none;
  color: var(--bk, var(--foreground));
  transition: translate var(--dur-plate) var(--ease-plate);
}
.bk.tl { left: 0; top: 0; transform: scaleX(-1); }
.bk.tr { right: 0; top: 0; }
.bk.bl { left: 0; bottom: 0; transform: scale(-1); }
.bk.br { right: 0; bottom: 0; transform: scaleY(-1); }
@media (hover: hover) {
  [data-brackets]:hover > .bk.tl { translate: -0.25rem -0.25rem; }
  [data-brackets]:hover > .bk.tr { translate: 0.25rem -0.25rem; }
  [data-brackets]:hover > .bk.bl { translate: -0.25rem 0.25rem; }
  [data-brackets]:hover > .bk.br { translate: 0.25rem 0.25rem; }
}

/* ---------- chamfered CTA ----------
   The frame is an inline SVG path drawn to the element's own size (main.js),
   so the cut corner stays a true 45° at any width. The accent floods along
   the path on hover and the label turns ink. */
.cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 1.25em; height: 3.125rem; padding: 0 1.75em; min-width: 13.75rem;
  font-size: var(--t-label); text-transform: uppercase; line-height: var(--lh-flat);
  color: var(--accent); isolation: isolate;
}
.cta-frame { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; }
.cta-frame .flood {
  transform-box: fill-box; transform-origin: left center; transform: scaleX(0);
  transition: transform var(--dur-normal) var(--ease-plate);
}
.cta-label { position: relative; white-space: nowrap; transition: color var(--dur-normal) var(--ease-plate); }
.cta-arrow { position: relative; width: 0.85em; height: 0.66em; flex-shrink: 0; transition: transform var(--dur-fast) var(--ease-entrance); }
.cta-arrow path { stroke: currentColor; fill: none; }
.cta:hover .flood, .cta:focus-visible .flood { transform: scaleX(1); }
.cta:hover, .cta:focus-visible { color: var(--surface-black); }
.cta:hover .cta-arrow { transform: translateX(0.25rem); }
.cta-light { color: var(--on-dark); }

/* The bracketed nav link: [ Book a demo → ] */
.bracket-link { white-space: nowrap; font-weight: 700; }
.bracket-link .arw { display: inline-block; transition: transform var(--dur-fast) var(--ease-entrance); }
.bracket-link:hover .arw { transform: translateX(0.2rem); }

.nav-link {
  white-space: nowrap; font-size: var(--t-label); text-transform: uppercase;
  line-height: var(--lh-flat); transition: color var(--dur-fast) var(--ease-entrance);
}
.nav-link:hover { color: var(--accent); }

.pulse { position: relative; width: 0.5rem; height: 0.5rem; flex-shrink: 0; background: var(--accent); }
.pulse::after {
  content: ""; position: absolute; inset: -0.25rem; border: 1px solid var(--accent);
  animation: pulse 2.4s var(--ease-entrance) infinite;
}
@keyframes pulse { 0% { opacity: 0.9; transform: scale(0.6); } 70%, 100% { opacity: 0; transform: scale(2.2); } }

/* =========================================================================
   LOADER — a veil on the page's own ground. The mark fills with the real
   progress of the 3D scene and the veil lifts only once it has drawn.
   ========================================================================= */
.loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--background);
}
html:not(.js) .loader { display: none; }
.loader-inner {
  display: flex; flex-direction: column; align-items: center;
  transition: opacity 0.43s var(--ease-entrance), transform 0.43s var(--ease-entrance);
}
.loader.is-clearing .loader-inner { opacity: 0; transform: translateY(-0.75rem); }
/* The wordmark itself is the meter: a faint shell, filled left to right. */
.loader-mark {
  position: relative; width: 14rem; aspect-ratio: 1163 / 300;
  -webkit-mask: url("assets/metrix-logo.svg") center / contain no-repeat;
  mask: url("assets/metrix-logo.svg") center / contain no-repeat;
}
.loader-shell { position: absolute; inset: 0; background: color-mix(in srgb, var(--foreground) 12%, transparent); }
.loader-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--foreground); }
.loader-meter {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0.25rem; overflow: hidden;
  background: var(--border-muted); transition: opacity 0.43s var(--ease-entrance);
}
.loader.is-clearing .loader-meter { opacity: 0; }
.loader-meter > div { height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--foreground); }

/* =========================================================================
   THE STORY — a pinned stage. The ribbon is the hero; scrolling untwists it
   into a bar chart, a stock matrix and finally the ERP dashboard. The dark
   ERP block then comes out over it while the stage recedes.
   ========================================================================= */
.story { position: relative; z-index: 1; height: calc(var(--story-screens, 5.6) * 100lvh); }
.story-pin { position: sticky; top: 0; height: 100lvh; overflow: hidden; background: var(--surface-black); }
.story-inner { position: absolute; inset: 0; overflow: hidden; background: var(--background); transform-origin: center; }
.story-shade { position: absolute; inset: 0; z-index: 9; pointer-events: none; background: var(--surface-black); opacity: 0; }
.story-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.story-canvas { width: 100%; height: 100%; }
.story-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dl {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.625rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--foreground-soft); white-space: nowrap; opacity: 0; will-change: transform, opacity;
}
.dl::before { content: ""; width: 0.375rem; height: 1px; background: currentColor; }
.dl.hot { color: var(--foreground); font-weight: 500; }
.dl.hot::before { background: var(--accent); }

.story-ramp {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 46%; pointer-events: none;
  opacity: var(--hero-out, 0);
  background-image: linear-gradient(to bottom,
    color-mix(in srgb, var(--background) 0%, transparent) 0%,
    color-mix(in srgb, var(--background) 30%, transparent) 30%,
    color-mix(in srgb, var(--background) 78%, transparent) 62%,
    var(--background) 100%);
}
@media (min-width: 1280px) { .story-ramp { display: none; } }

.hero-frame {
  position: relative; z-index: 2; display: flex; height: 100%; flex-direction: column;
  padding: var(--gutter); pointer-events: none;
}
.hero-frame a, .hero-frame button { pointer-events: auto; }

/* masthead */
.masthead { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 1rem; }
/* The Metrix wordmark, traced from the brand PNG and used as a mask so it
   takes whatever colour its context needs. */
.logo {
  display: inline-block; flex-shrink: 0; height: 1.625rem; aspect-ratio: 1163 / 300;
  background: currentColor;
  -webkit-mask: url("assets/metrix-logo.svg") center / contain no-repeat;
  mask: url("assets/metrix-logo.svg") center / contain no-repeat;
}
.brand-desc {
  display: none; border-left: 1px solid var(--border-muted); padding-left: 0.75rem;
  font-size: 0.625rem; line-height: 1.15; letter-spacing: 0.02em; text-transform: uppercase; color: var(--foreground-muted);
}
@media (min-width: 640px) { .brand-desc { display: block; } }
.primary { display: none; }
.masthead .bracket-link { display: none; }
.burger { margin-right: -0.5rem; padding: 0.5rem; }
.burger > span { display: flex; width: 1.5rem; flex-direction: column; gap: 0.3125rem; }
.burger > span > span { display: block; height: 1px; width: 100%; background: var(--foreground); }
@media (min-width: 1280px) {
  .primary { display: block; position: absolute; left: 50%; transform: translateX(-50%); }
  .primary ul { display: flex; align-items: center; gap: 4rem; }
  .masthead .bracket-link { display: block; }
  .burger { display: none; }
}

/* hero copy */
.hero-mid {
  display: flex; flex-direction: column; gap: 2rem; padding-top: 2.5rem;
  opacity: calc(1 - var(--hero-out, 0));
  transform: translate3d(0, calc(var(--hero-out, 0) * -2.5rem), 0);
}
@media (min-width: 768px) { .hero-mid { flex-direction: row; align-items: flex-start; justify-content: space-between; } }
@media (min-width: 1280px) { .hero-mid { padding-top: 3.25rem; } }
.identity { max-width: 46rem; }
.identity-id {
  margin-bottom: 1rem; font-size: var(--t-label); text-transform: uppercase;
  line-height: var(--lh-flat); color: var(--foreground-muted);
}
.identity-name {
  max-width: 7.6em; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: var(--lh-headline); font-size: var(--t-display);
}
@media (min-width: 768px) { .identity-name { font-size: var(--t-display-lg); } }
@media (min-width: 1280px) { .identity-name { font-size: var(--t-impact); } }
.identity-badge {
  margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: var(--t-eyebrow); font-weight: 500; text-transform: uppercase; letter-spacing: var(--tr-eyebrow);
}
.panels { display: none; }
@media (min-width: 768px) { .panels { display: flex; width: 13.625rem; flex-shrink: 0; flex-direction: column; gap: 1.5rem; } }
.panel { padding: 1rem 1.375rem 1.1875rem; }
.panel .eyebrow { color: var(--foreground-soft); }
.panel-status { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.375rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-flat); }
.panel-status dt { font-weight: 700; }
.panel-status dd { color: var(--foreground-soft); }
.panel-stats { margin-top: 1.5rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.panel-stats > div { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.panel-stats dt { white-space: nowrap; font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-label); }
.panel-stats dd { font-family: var(--font-display); font-size: var(--t-heading); font-weight: 500; line-height: var(--lh-cap); letter-spacing: var(--tr-stat); }
.panel-stats dd .te { justify-content: center; column-gap: 0; }

/* hero actions row */
.hero-actions {
  margin-top: auto; position: relative; z-index: 3;
  opacity: calc(1 - var(--hero-out, 0));
  transform: translate3d(0, calc(var(--hero-out, 0) * 1.5rem), 0);
}
.actions { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; }
@media (min-width: 640px) { .actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 2rem; } }
.film { display: none; align-items: center; gap: 0.75rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-flat); }
@media (min-width: 640px) { .film { display: flex; } }
.film svg { width: 2rem; height: 2rem; flex-shrink: 0; }
.film > span { display: flex; flex-direction: column; gap: 0.375rem; }
.film .label { font-weight: 500; transition: color var(--dur-fast) var(--ease-entrance); }
.film:hover .label { color: var(--accent); }
.film .meta { color: var(--foreground-muted); }
.hero-actions .cta { width: 100%; }
@media (min-width: 640px) { .hero-actions .cta { width: auto; justify-self: center; } }
.quick { display: none; justify-self: end; align-items: center; gap: 2.5rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-flat); }
@media (min-width: 640px) { .quick { display: flex; } }
.quick a { transition: color var(--dur-fast) var(--ease-entrance); }
.quick a:hover { color: var(--accent); }

.hero-gone .hero-mid, .hero-gone .hero-actions { visibility: hidden; }

/* hero entrance, gated on the loader's hand-over */
[data-hero-step] {
  opacity: 0; transform: translate3d(0, 1.25rem, 0);
  transition: opacity 1s var(--ease-entrance), transform 1.3s var(--ease-entrance);
}
.is-revealed [data-hero-step] { opacity: 1; transform: none; }
.is-revealed [data-hero-step="1"] { transition-delay: 180ms; }
.is-revealed [data-hero-step="2"] { transition-delay: 900ms; }
.is-revealed [data-hero-step="3"] { transition-delay: 1500ms; }
html:not(.js) [data-hero-step] { opacity: 1; transform: none; }

/* chapters 002–004 */
.chapters { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.chapter {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 6.5rem;
  visibility: hidden; opacity: 0;
  transition: opacity 0.45s var(--ease-entrance), visibility 0s linear 0.45s;
}
.chapter.is-active { visibility: visible; opacity: 1; transition: opacity 0.6s var(--ease-entrance), visibility 0s; }
.chapter a { pointer-events: auto; }
@media (min-width: 1280px) {
  .chapter { right: auto; bottom: auto; top: 50%; width: 32rem; transform: translateY(-46%); }
}
.chapter-idx { margin-bottom: 1.25rem; font-size: var(--t-label); text-transform: uppercase; line-height: var(--lh-flat); color: var(--foreground-muted); }
.chapter-idx b { font-weight: 500; color: var(--foreground); }
.chapter-title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: var(--lh-headline); font-size: var(--t-heading);
}
@media (min-width: 768px) { .chapter-title { font-size: var(--t-display-sm); } }
.chapter-rule { width: 4rem; height: 2px; margin: 1.5rem 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.9s var(--ease-plate) 0.25s; }
.chapter.is-active .chapter-rule { transform: scaleX(1); }
.chapter-copy { max-width: 27rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-display); }
@media (min-width: 768px) { .chapter-copy { font-size: var(--t-lead); } }
.chapter .bracket-link { display: inline-block; margin-top: 2rem; font-size: var(--t-label); text-transform: uppercase; }
.chapter .bracket-link:hover { color: var(--accent); }

/* progress rail — appears once the hero has gone */
.story-rail {
  position: absolute; z-index: 3; left: var(--gutter); bottom: 1.75rem; display: flex; align-items: center; gap: 0.75rem;
  font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-label);
  opacity: var(--hero-out, 0); pointer-events: none;
}
@media (min-width: 1280px) { .story-rail { left: 50%; transform: translateX(-50%); } }
.rail-track { position: relative; width: 9rem; height: 1px; overflow: hidden; background: var(--border-muted); }
.rail-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--story-p, 0)); background: var(--foreground); }
.rail-now { min-width: 1.75rem; font-weight: 500; }

/* menu sheet — a body child, so no transformed ancestor can trap it */
.sheet {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  padding: var(--gutter); background: var(--background);
}
.sheet[hidden] { display: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-close { margin-right: -0.5rem; padding: 0.5rem; }
.sheet-close > span { position: relative; display: block; width: 1.5rem; height: 1.5rem; }
.sheet-close > span > span { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--foreground); }
.sheet-close > span > span:first-child { transform: rotate(45deg); }
.sheet-close > span > span:last-child { transform: rotate(-45deg); }
.sheet nav { display: flex; flex: 1; flex-direction: column; justify-content: center; }
.sheet ul { display: flex; flex-direction: column; gap: 1.25rem; }
.sheet-link {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: var(--lh-headline); font-size: var(--t-heading);
  transition: color var(--dur-fast) var(--ease-entrance);
}
.sheet-link:hover { color: var(--accent); }
@media (min-width: 640px) { .sheet-link { font-size: var(--t-display); } }
.sheet .cta { align-self: flex-start; }
@media (min-width: 1280px) { .sheet { display: none; } }

/* =========================================================================
   METRIX ERP — the first dark surface. It comes out over the pinned story,
   joined to it by a seam of heatmap cells.
   ========================================================================= */
.erp {
  position: relative; z-index: 2; margin-top: -100lvh;
  background: var(--surface-black); color: var(--on-dark);
  --bk: var(--accent);
}
.seam { position: absolute; left: 0; right: 0; height: 34svh; pointer-events: none; z-index: 4; }
.seam canvas { width: 100%; height: 100%; }
.seam-up { bottom: 100%; }
.seam-down { top: 100%; }
.net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.erp-frame { position: relative; z-index: 2; margin: 0 auto; max-width: 90rem; padding: 7rem var(--gutter) 6rem; }
@media (min-width: 1024px) { .erp-frame { padding-top: 9rem; padding-bottom: 7rem; } }

/* composition: vexon-showcase — label 4 | statement 8, then the card row */
.erp-head { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .erp-head { grid-template-columns: 4fr 8fr; gap: 2rem; } }
.section-label { font-size: var(--t-label); text-transform: uppercase; line-height: var(--lh-flat); color: var(--on-dark-muted); }
.section-label .idx { margin-right: 0.5rem; }
.mast {
  display: flex; flex-wrap: wrap; align-items: baseline; font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; line-height: var(--lh-headline); font-size: var(--t-display);
}
@media (min-width: 768px) { .mast { font-size: var(--t-display-lg); } }
@media (min-width: 1280px) { .mast { font-size: var(--t-impact); } }
.erp .mast { color: var(--accent); }
.erp .mast .dot { color: var(--on-dark); }
.mast-rule { height: 2px; max-width: 46rem; margin: 1.75rem 0; background: var(--accent); }
.erp-intro { max-width: 38rem; font-size: var(--t-lead); text-transform: uppercase; line-height: var(--lh-display); }

.fgrid { margin-top: 4.5rem; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .fgrid { margin-top: 6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.fcard {
  display: flex; min-height: 16.5rem; flex-direction: column; padding: 1.5rem 1.625rem 1.625rem;
  background: var(--raw-white-a04); transition: background var(--dur-plate) var(--ease-plate);
}
.fcard:hover { background: var(--raw-white-a10); }
.fcard-top { display: flex; align-items: flex-start; justify-content: space-between; }
.fcard-top .eyebrow { color: var(--accent); }
.fcard-icon { width: 2.25rem; height: 2.25rem; color: var(--on-dark); }
.fcard-icon * { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; }
.fcard-icon .hi { stroke: var(--accent); }
.fcard h3 {
  margin-top: auto; padding-top: 3rem; font-family: var(--font-display); font-weight: 500;
  font-size: 1.75rem; text-transform: uppercase; line-height: var(--lh-headline);
}
.fcard p { margin-top: 0.75rem; max-width: 21rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-display); color: var(--on-dark-muted); }

.erp-foot { margin-top: 4.5rem; display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 1024px) { .erp-foot { margin-top: 6rem; flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.erp-foot-copy { max-width: 26rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-display); color: var(--on-dark-muted); }
.erp-foot-copy .cta { margin-top: 1.5rem; }

/* the chamfered figures plate */
.plate { position: relative; display: grid; grid-template-columns: auto 1fr; min-width: min(100%, 31rem); color: var(--on-dark); isolation: isolate; }
.plate-frame { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; }
.plate-badge {
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--accent-muted); text-transform: uppercase;
}
.plate-badge b { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: var(--lh-cap); color: var(--accent); }
.plate-badge span { font-size: var(--t-eyebrow); letter-spacing: var(--tr-eyebrow); color: var(--on-dark-muted); }
.plate-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem 1.5rem; }
.plate-figs > div { display: flex; flex-direction: column; gap: 0.75rem; }
.plate-figs dd {
  order: -1; font-family: var(--font-display); font-size: var(--t-heading); font-weight: 500;
  line-height: var(--lh-cap); letter-spacing: var(--tr-stat);
}
.plate-figs dd .te { column-gap: 0; }
.plate-figs dt { font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-label); line-height: var(--lh-display); color: var(--on-dark-muted); }

/* =========================================================================
   BI CONSULTANCY — back to light. A 96px masthead and the brief on the
   left, services as black-bracketed instrument panels on the right, the
   contour field behind, and the process rail on a dark band at the foot.
   ========================================================================= */
.bi { position: relative; z-index: 1; overflow: hidden; background: var(--background); color: var(--foreground); }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bi-frame { position: relative; z-index: 2; margin: 0 auto; max-width: 90rem; display: grid; gap: 4rem; padding: 12rem var(--gutter) 6rem; }
@media (min-width: 1024px) { .bi-frame { grid-template-columns: 7fr 5fr; gap: 5rem; padding-top: 15rem; padding-bottom: 7rem; } }
.bi .section-label { color: var(--foreground-muted); }
.bi .mast { margin-top: 1.5rem; }
.bi .mast .dot { color: var(--accent); }
.bi-copy { margin-top: 2rem; max-width: 34rem; font-size: var(--t-lead); text-transform: uppercase; line-height: var(--lh-display); }
.bi-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; }
.platforms { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: var(--t-eyebrow); font-weight: 500; text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--foreground-soft); }
.platforms li { display: flex; align-items: center; gap: 0.5rem; }
.platforms li::before { content: ""; width: 0.375rem; height: 0.375rem; background: var(--foreground); }

.services { display: flex; flex-direction: column; gap: 1.25rem; align-self: end; }
.svc { padding: 1.25rem 1.5rem 1.375rem; background: color-mix(in srgb, var(--background) 82%, transparent); }
.svc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.svc h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; text-transform: uppercase; line-height: var(--lh-headline); }
.svc-head .idx { font-size: var(--t-eyebrow); font-weight: 500; letter-spacing: var(--tr-eyebrow); color: var(--foreground-soft); }
.svc p { margin-top: 0.75rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-display); color: var(--foreground-soft); }

/* composition: helion-timeline — stations on a shared baseline */
.bi-band { position: relative; z-index: 2; background: var(--surface-black); color: var(--on-dark); }
.bi-band-inner { margin: 0 auto; max-width: 90rem; padding: 3.5rem var(--gutter) 4rem; }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; }
.band-head h3 { display: flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; font-size: var(--t-heading); text-transform: uppercase; line-height: var(--lh-headline); color: var(--accent); }
.band-head h3 .dot { color: var(--on-dark); }
.band-head p { font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--on-dark-muted); }
.stations { margin-top: 3rem; display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .stations { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } }
.station { position: relative; display: flex; flex-direction: column; padding-left: 1.75rem; }
@media (min-width: 1024px) { .station { padding-left: 0; padding-right: 2.5rem; padding-bottom: 2.75rem; } }
.st-when { font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--on-dark-muted); }
.station.is-live .st-when { color: var(--accent); }
.st-name {
  margin-top: 0.75rem; display: flex; align-items: baseline; gap: 0.75rem; font-family: var(--font-display);
  font-weight: 700; font-size: 2rem; text-transform: uppercase; line-height: var(--lh-headline);
}
.st-name .idx { font-family: var(--font-sans); font-weight: 500; font-size: var(--t-eyebrow); letter-spacing: var(--tr-eyebrow); }
.st-copy { margin-top: 0.875rem; max-width: 17rem; font-size: var(--t-body); text-transform: uppercase; line-height: var(--lh-display); color: var(--on-dark-muted); }
/* the baseline, its ticks, markers and the crawling connectors */
.st-mark { position: absolute; left: 0; top: 0.125rem; width: 0.5rem; height: 0.5rem; background: var(--on-dark); }
.st-link {
  position: absolute; left: 0.2rem; top: 1.25rem; bottom: -2.5rem; width: 1px;
  background: repeating-linear-gradient(to bottom, var(--on-dark-faint) 0 0.375rem, transparent 0.375rem 0.75rem);
  background-size: 1px 0.75rem; animation: crawl-y 1.2s linear infinite;
}
.station:last-child .st-link { display: none; }
@media (min-width: 1024px) {
  .st-mark { top: auto; bottom: -0.25rem; }
  .st-link {
    left: 0.75rem; right: 0; top: auto; bottom: 0; width: auto; height: 1px;
    background: repeating-linear-gradient(to right, var(--on-dark-faint) 0 0.375rem, transparent 0.375rem 0.75rem);
    background-size: 0.75rem 1px; animation: crawl-x 1.2s linear infinite;
  }
  .station:last-child .st-link { display: block; right: 2.5rem; }
}
.station.is-live .st-mark { background: var(--accent); }
.station.is-live .st-mark::after {
  content: ""; position: absolute; inset: -0.375rem; border: 1px solid var(--accent);
  animation: pulse 2.4s var(--ease-entrance) infinite;
}
@keyframes crawl-x { to { background-position: 0.75rem 0; } }
@keyframes crawl-y { to { background-position: 0 0.75rem; } }

/* =========================================================================
   FOOTER — a cyan page edge with a near-black panel inset inside it.
   ========================================================================= */
.footer { position: relative; z-index: 1; background: var(--accent); padding: 0.75rem; }
@media (min-width: 640px) { .footer { padding: 1rem; } }
.foot-panel {
  position: relative; display: flex; min-height: calc(100lvh - 2rem); flex-direction: column; overflow: hidden;
  background: var(--surface-black); color: var(--on-dark);
}
.foot-panel .contours { opacity: 1; }
.foot-grid { position: relative; z-index: 2; display: grid; gap: 3rem; padding: 3rem var(--gutter) 2rem; }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 1fr 1fr; padding-top: 4rem; } }
.foot-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.foot-nav a {
  width: max-content; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: var(--lh-headline); font-size: var(--t-heading); transition: color var(--dur-fast) var(--ease-entrance);
}
@media (min-width: 768px) { .foot-nav a { font-size: var(--t-display-sm); } }
.foot-nav a:hover { color: var(--accent); }
.foot-nav .te { flex-wrap: nowrap; column-gap: 0.2em; }
.foot-side { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 1024px) { .foot-side { align-items: flex-end; text-align: right; } }
.foot-head {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: var(--lh-headline);
  font-size: var(--t-display); color: var(--accent);
}
@media (min-width: 1280px) { .foot-head { font-size: var(--t-impact); } }
.foot-head .line { display: flex; align-items: baseline; }
@media (min-width: 1024px) { .foot-head .line { justify-content: flex-end; } .foot-head .te { justify-content: flex-end; } }
.foot-head .dot { color: var(--on-dark); }
.foot-contact { display: flex; flex-direction: column; gap: 0.625rem; font-size: var(--t-label); text-transform: uppercase; line-height: var(--lh-flat); }
.foot-contact a { transition: color var(--dur-fast) var(--ease-entrance); }
.foot-contact a:hover { color: var(--accent); }
.foot-contact span { color: var(--on-dark-muted); }
.foot-word {
  position: relative; z-index: 2; margin: auto var(--gutter) 2rem; aspect-ratio: 1163 / 300;
  background: var(--accent);
  -webkit-mask: url("assets/metrix-logo.svg") center / contain no-repeat;
  mask: url("assets/metrix-logo.svg") center / contain no-repeat;
}
.foot-legal {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 1.5rem var(--gutter); border-top: 1px solid var(--on-dark-line);
  font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--on-dark-faint);
}
.foot-legal ul { display: flex; gap: 2rem; }
.foot-legal a:hover { color: var(--on-dark); }

/* ---------- reduced motion: reduce, don't delete ---------- */
@media (prefers-reduced-motion: reduce) {
  .te-unit, [data-reveal], [data-hero-step] { transform: none !important; filter: none !important; }
  [data-rule], .chapter-rule { transition-duration: 0.01s !important; }
  .st-link, .pulse::after, .station.is-live .st-mark::after { animation: none !important; }
}
