/* ============================================================
   Cartograph — the data platform for e-commerce brands
   "The ledger": Swiss-grid engineering sheet. Cold white, one
   cobalt accent, hard hairlines, drafting crosshairs, expanded
   grotesk display type and tabular mono numerals. Zero rounded
   corners, zero texture, zero decoration that isn't data.
   ============================================================ */

:root {
  --bg:        #f2f3f7;
  --panel:     #fbfbfd;
  --ink:       #101321;
  --ink-2:     #1a1e30;
  --muted:     #5a5f73;
  --cobalt:    #2945e6;
  --cobalt-2:  #1e35c4;
  --cobalt-lt: #dfe4ff;
  --line:      rgba(16, 19, 33, 0.16);
  --line-soft: rgba(16, 19, 33, 0.08);
  --line-lt:   rgba(251, 251, 253, 0.28);
  --line-lt-soft: rgba(251, 251, 253, 0.14);

  --font-sans: "Archivo", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --ease-sharp: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-snap: cubic-bezier(0.7, 0, 0.2, 1);

  --pad-x: clamp(1.25rem, 5vw, 6rem);
}

/* ultra-wide screens: cap the content at 1720px and center it,
   while section backgrounds keep bleeding to the edges */
@media (min-width: 2000px) {
  :root { --pad-x: calc((100vw - 1720px) / 2); }
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --bg: oklch(96% 0.005 275);
    --panel: oklch(98.6% 0.002 275);
    --ink: oklch(20% 0.03 275);
    --muted: oklch(48% 0.025 275);
    --cobalt: oklch(51% 0.23 268);
    --cobalt-2: oklch(44% 0.22 268);
    --cobalt-lt: oklch(91% 0.05 268);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.03125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--cobalt); color: var(--panel); }

h1, h2 {
  font-family: var(--font-sans);
  font-weight: 830;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(2.1rem, 5vw, 3.7rem); }
h1 em, h2 em { font-style: normal; color: var(--cobalt); }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 120;
  background: var(--ink);
  color: var(--panel);
  padding: 0.7rem 1.3rem;
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(-250%);
  transition: transform 0.3s var(--ease-sharp);
}
.skip-link:focus-visible { transform: none; }

/* ---------- cell-reference labels : A1, B1, C1… ---------- */
.ref {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.ref i {
  font-style: normal;
  font-weight: 600;
  color: var(--cobalt);
  border: 1px solid var(--cobalt);
  padding: 0.14rem 0.5rem;
  letter-spacing: 0.1em;
}
.ref--lt { color: var(--line-lt); }
.ref--lt i { color: var(--panel); border-color: rgba(251, 251, 253, 0.55); }

/* ---------- buttons : square, engineered ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.9rem 1.7rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-sharp);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn--fill { background: var(--ink); color: var(--bg); }
.btn--fill:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn--paper { background: var(--panel); border-color: var(--panel); color: var(--ink); }
.btn--paper:hover { background: transparent; color: var(--panel); }
.btn--big {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  padding: 1.25rem 2.6rem;
  letter-spacing: 0.06em;
  text-transform: none;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ============================================================
   NAV — one hairline instrument bar
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0.9rem var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand__cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 18px;
  height: 18px;
}
.brand__cells i { border: 1.5px solid currentColor; }
.brand__cells i:first-child { background: var(--cobalt); border-color: var(--cobalt); }
.brand:hover .brand__cells i:first-child { background: var(--ink); border-color: var(--ink); }
.brand__word {
  font-weight: 800;
  font-stretch: 115%;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav__tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 1.6rem;
  margin-right: auto;
}

.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--cobalt); }

.nav__cta { padding: 0.6rem 1.2rem; font-size: 0.72rem; }

/* ============================================================
   SECTIONS — every section is a sheet with corner crosshairs
   ============================================================ */
.sec {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(4.5rem, 9vw, 8rem) var(--pad-x);
}
.sec::before,
.sec::after {
  content: "+";
  position: absolute;
  top: -0.78rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: rgba(16, 19, 33, 0.35);
  pointer-events: none;
}
.sec::before { left: calc(var(--pad-x) * 0.35); }
.sec::after { right: calc(var(--pad-x) * 0.35); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: 7.5rem;
  border-top: 0;
  /* graph paper */
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 52px 52px;
}
.hero::before, .hero::after { display: none; }

.hero__title {
  font-size: clamp(3rem, 8.4vw, 6.6rem);
  margin: 0.6rem 0 1.8rem;
}
.hero__title span { display: block; }

.hero__sub {
  max-width: 33rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-bottom: 2.4rem;
}

.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ============================================================
   FIG. 01 — the reconciliation demo
   ============================================================ */
.demo {
  border: 1px solid var(--ink);
  background: var(--panel);
  box-shadow: 14px 14px 0 color-mix(in srgb, var(--cobalt) 15%, transparent);
}
.demo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.demo__fig {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo__toggle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  background: transparent;
  border: 1px solid var(--cobalt);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.demo__toggle:hover { background: var(--cobalt); color: #fff; }

.demo__stage {
  position: relative;
  height: 400px;
  margin: 1.1rem;
  overflow: hidden;
}

/* a claim, torn out of some platform's dashboard */
.chip {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: min(46%, 15rem);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  transform: rotate(var(--r));
  transition:
    left 0.6s var(--ease-snap),
    top 0.6s var(--ease-snap),
    width 0.6s var(--ease-snap),
    transform 0.6s var(--ease-snap),
    border-color 0.3s,
    background 0.3s;
  transition-delay: calc(var(--row) * 45ms);
}
.chip__src {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip__metric {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip__val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}
.chip--store { border-color: var(--ink); }

/* unified: the chips snap into ledger rows */
.demo__stage.is-unified .chip {
  left: 0;
  top: calc(var(--row) * 50px);
  width: 100%;
  transform: rotate(0deg);
  background: var(--panel);
  border-color: var(--line-soft);
  border-left: 3px solid var(--cobalt);
}
.demo__stage.is-unified .chip--store {
  border-left-color: var(--ink);
}

.demo__truth {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  background: var(--cobalt);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease-sharp) 0.5s, transform 0.45s var(--ease-sharp) 0.5s;
}
.demo__stage.is-unified .demo__truth { opacity: 1; transform: none; }
.demo__truth span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.demo__truth b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.demo__note {
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

/* ============================================================
   THE DISCREPANCY
   ============================================================ */
.disc__head { max-width: 52rem; }
.disc__grid {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.disc__item {
  padding: 1.8rem 1.6rem 2.2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.disc__item:hover { background: var(--panel); }
.disc__no {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cobalt);
  margin-bottom: 2.6rem;
}
.disc__item h3 { margin-bottom: 0.6rem; }
.disc__item p { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   THE SYSTEM — flat schematic, right angles only
   ============================================================ */
.system { background: var(--panel); }

.schema {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
}
.schema__col { display: flex; flex-direction: column; gap: 0.5rem; }
.schema__box {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.55rem 1rem;
  background: var(--bg);
  text-align: center;
  white-space: nowrap;
}
.schema__box--hub {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
  padding: 1.1rem 1.6rem;
}
.schema__box--hub em {
  display: block;
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  margin-top: 0.35rem;
  color: var(--cobalt-lt);
}
.schema__box--out { border-width: 2px; }

.schema__bus {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0;
  min-width: 3rem;
}
.schema__bus--one { justify-content: center; }

/* the source bus is a manifold: five lines meet a vertical trunk,
   then one stub carries them into the hub */
.schema__bus:not(.schema__bus--one) { position: relative; }
.schema__bus:not(.schema__bus--one) i { margin-right: 30px; }
.schema__bus:not(.schema__bus--one)::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background-image: linear-gradient(180deg, var(--ink) 0 5px, transparent 5px 11px);
  background-size: 2px 11px;
}
.schema__bus:not(.schema__bus--one)::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 30px;
  height: 2px;
  margin-top: -1px;
  background-image: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 11px);
  background-size: 11px 2px;
  animation: bus-flow 0.9s linear infinite;
}
.schema__bus i {
  height: 2px;
  background-image: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 11px);
  background-size: 11px 2px;
  animation: bus-flow 0.9s linear infinite;
}
.schema__bus--one i { background-image: linear-gradient(90deg, var(--cobalt) 0 5px, transparent 5px 11px); }
@keyframes bus-flow { to { background-position: 11px 0; } }

.system__steps {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.step { padding-top: 1.5rem; }
.step__no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.9rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.95rem; max-width: 24rem; }

/* ============================================================
   THE PLATFORM — the sheet
   ============================================================ */
.platform__head { max-width: 52rem; }

/* the workbench: sheet + figure panels in one mosaic */
.bench {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
  align-items: stretch;
}
.bench .sheet { grid-row: 1 / span 2; }
.panel--products { grid-column: 1 / -1; }

.sheet {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--ink);
  box-shadow: 14px 14px 0 color-mix(in srgb, var(--cobalt) 15%, transparent);
}
.sheet__fig {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  border-right: 1px solid var(--line);
  padding: 0.85rem 1.2rem 0.85rem 0;
}
.sheet__top {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0 1.2rem;
  border-bottom: 1px solid var(--line);
}
.sheet__tab {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 0;
  border-bottom: 2px solid transparent;
}
.sheet__tab.is-on { color: var(--ink); border-bottom-color: var(--cobalt); }
.sheet__sync {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sheet__sync i {
  width: 7px;
  height: 7px;
  background: var(--cobalt);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.sheet__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.sheet__kpi { padding: 1.1rem 1.2rem 1rem; }
.sheet__kpi + .sheet__kpi { border-left: 1px solid var(--line-soft); }
.sheet__kpi > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.sheet__kpi b {
  display: block;
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.sheet__kpi em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--cobalt);
  margin-top: 0.4rem;
  white-space: nowrap;
}

.sheet__split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.sheet__chart {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  border-right: 1px solid var(--line-soft);
}
.sheet__cap {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.sheet__bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 130px;
  border-bottom: 1px solid var(--line);
}
.sheet__bars i {
  flex: 1;
  height: var(--h);
  background: rgba(16, 19, 33, 0.16);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease-sharp);
}
.sheet__bars i.is-now { background: var(--cobalt); }
.in-view .sheet__bars i { transform: scaleY(1); }
.in-view .sheet__bars i:nth-child(1) { transition-delay: 0.04s; }
.in-view .sheet__bars i:nth-child(2) { transition-delay: 0.08s; }
.in-view .sheet__bars i:nth-child(3) { transition-delay: 0.12s; }
.in-view .sheet__bars i:nth-child(4) { transition-delay: 0.16s; }
.in-view .sheet__bars i:nth-child(5) { transition-delay: 0.20s; }
.in-view .sheet__bars i:nth-child(6) { transition-delay: 0.24s; }
.in-view .sheet__bars i:nth-child(7) { transition-delay: 0.28s; }
.in-view .sheet__bars i:nth-child(8) { transition-delay: 0.32s; }

.sheet__table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.sheet__table th {
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: 0.85rem 1.2rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.sheet__table th:first-child { text-align: left; }
.sheet__table td {
  padding: 0.62rem 1.2rem;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
}
.sheet__table td:first-child { text-align: left; font-weight: 600; }
.sheet__table tr:last-child td { border-bottom: 0; }

/* bottom row of the sheet: customers + AOV */
.sheet__bottom {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line-soft);
}
.sheet__cell {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem;
}
.sheet__cell + .sheet__cell { border-left: 1px solid var(--line-soft); }

.stack {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}
.stack__col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
}
.stack__col i {
  display: block;
  height: var(--h);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease-sharp);
}
.stack__col .new { background: var(--cobalt); }
.stack__col .ret { background: rgba(16, 19, 33, 0.18); }
.in-view .stack__col i { transform: scaleY(1); }
.in-view .stack__col:nth-child(2) i { transition-delay: 0.05s; }
.in-view .stack__col:nth-child(3) i { transition-delay: 0.10s; }
.in-view .stack__col:nth-child(4) i { transition-delay: 0.15s; }
.in-view .stack__col:nth-child(5) i { transition-delay: 0.20s; }
.in-view .stack__col:nth-child(6) i { transition-delay: 0.25s; }
.in-view .stack__col:nth-child(7) i { transition-delay: 0.30s; }
.in-view .stack__col:nth-child(8) i { transition-delay: 0.35s; }

.sheet__legend {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sheet__legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sheet__legend i { width: 7px; height: 7px; }
.sheet__legend .k-new { background: var(--cobalt); }
.sheet__legend .k-ret { background: rgba(16, 19, 33, 0.18); }

.aov {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.aov__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 0;
}
.aov__row + .aov__row { border-top: 1px solid var(--line-soft); }
.aov__row span {
  flex: none;
  width: 3.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.aov__row i {
  position: relative;
  flex: 1;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
}
.aov__row i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--cobalt);
  transition: width 0.7s var(--ease-sharp) 0.15s;
}
.in-view .aov__row i::after { width: var(--w); }
.aov__row b {
  flex: none;
  width: 2.2rem;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.sheet__foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
  padding: 0.7rem 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- figure panels ---------- */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--ink);
  box-shadow: 14px 14px 0 color-mix(in srgb, var(--cobalt) 15%, transparent);
}
.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.panel__head span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.panel__head em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.panel__note {
  margin-top: auto;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Fig. 03: cohort retention heatmap */
.cohort {
  display: grid;
  grid-template-columns: auto repeat(6, minmax(0, 1fr));
  gap: 3px;
  padding: 1rem 1.1rem;
}
.cohort__ax, .cohort__mo {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
  text-align: center;
}
.cohort__mo { text-align: left; padding-right: 0.5rem; }
.cohort i {
  display: grid;
  place-items: center;
  height: 38px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: color-mix(in srgb, var(--cobalt) calc(var(--v) * 0.9%), var(--bg));
}
.cohort i.hi { color: #fff; }
.cohort i.nil { background: transparent; border: 1px dashed var(--line-soft); }

/* Fig. 04: reorder cycles */
.cycle {
  list-style: none;
  padding: 0.4rem 1.1rem 0.9rem;
}
.cycle li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0;
}
.cycle li + li { border-top: 1px solid var(--line-soft); }
.cycle__name {
  flex: none;
  width: 6.2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cycle__bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.cycle__bar i {
  display: block;
  height: 100%;
  width: var(--p);
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-sharp) 0.2s;
}
.in-view .cycle__bar i { transform: scaleX(1); }
.cycle__days {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}
.cycle__due {
  flex: none;
  width: 4.2rem;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--cobalt);
  white-space: nowrap;
}

/* Fig. 05: the product ledger */
.ptable-wrap { overflow-x: auto; }
.ptable {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.ptable th {
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: 0.8rem 1.1rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.ptable th:first-child { text-align: left; }
.ptable td {
  padding: 0.6rem 1.1rem;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.ptable td:first-child { text-align: left; font-weight: 600; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .up { color: var(--cobalt); }
.ptable .dn { color: var(--ink); }
.ptable .is-flag td { background: color-mix(in srgb, var(--cobalt) 7%, transparent); }
.ptable .is-flag td:first-child { box-shadow: inset 3px 0 0 var(--cobalt); }

/* the question ledger */
.spec__ref {
  margin-top: clamp(3rem, 7vw, 5rem);
  margin-bottom: 1.2rem;
}
.spec {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(2.5rem, 4vw, 5rem);
}
/* wide screens: the ledger runs in two columns instead of hugging the left */
@media (min-width: 1280px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec__row:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.spec__row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem 3rem;
  padding: 1.35rem 0.2rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding-left 0.3s var(--ease-sharp);
}
.spec__row:hover { background: var(--panel); padding-left: 1rem; }
.spec__row dt {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.spec__row dd { color: var(--muted); font-size: 0.96rem; max-width: 36rem; }

/* ============================================================
   RESULTS
   ============================================================ */
.results { background: var(--panel); }
.results__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.result {
  padding: 2rem 1.8rem 2.4rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result b {
  display: block;
  font-weight: 850;
  font-stretch: 125%;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.result:nth-child(3) b { color: var(--cobalt); }
.result p { color: var(--muted); font-size: 0.95rem; max-width: 16rem; }

.results__note {
  margin-top: clamp(2rem, 5vw, 3rem);
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
}
.results__note a { color: var(--cobalt); font-weight: 600; }
.results__note a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   CONTACT + FOOTER — the cobalt block
   ============================================================ */
.contact {
  background: var(--cobalt);
  color: #fff;
  border-top-color: var(--ink);
  padding-bottom: 0;
}
.contact::before, .contact::after { color: rgba(16, 19, 33, 0.45); }

.contact__title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 850;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 0.92;
  margin-bottom: 1.6rem;
}
.contact__sub {
  color: var(--cobalt-lt);
  max-width: 30rem;
  margin-bottom: 2.8rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}
.contact__hint {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-lt);
}

/* copied feedback */
.btn--paper.is-copied { background: var(--cobalt-lt); border-color: var(--cobalt-lt); color: var(--ink); }
.footer__links a.is-copied { color: #fff; }

.footer {
  margin-top: clamp(4rem, 9vw, 6.5rem);
  padding: 2.4rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem 3rem;
  border-top: 1px solid var(--line-lt);
}
.brand--footer { color: #fff; }
.brand--footer .brand__cells i:first-child { background: #fff; border-color: #fff; }
.footer__note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt-lt);
}
.footer__links { display: flex; gap: 1.8rem; font-size: 0.88rem; }
.footer__links a { color: var(--cobalt-lt); transition: color 0.2s; padding: 0.6rem 0; }
.footer__links a:hover { color: #fff; }
.footer__copy {
  grid-column: 1 / -1;
  color: var(--cobalt-lt);
  font-size: 0.78rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line-lt-soft);
}

/* ============================================================
   REVEALS — quick and mechanical, not floaty
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-sharp), transform 0.5s var(--ease-sharp);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].in-view { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav__links, .nav__tag { display: none; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 7rem;
  }
  .demo { max-width: 36rem; }

  .disc__grid { grid-template-columns: minmax(0, 1fr); }
  .system__steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
  .step:last-child { border-bottom: 0; }

  /* schematic goes vertical */
  .schema { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .schema__col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .schema__bus {
    flex-direction: row;
    justify-content: center;
    gap: 1.2rem;
    min-width: 0;
    min-height: 2.6rem;
    padding: 0 1rem;
    align-self: auto;
    width: 100%;
  }
  .schema__bus i {
    width: 2px;
    height: auto;
    background-image: linear-gradient(180deg, var(--ink) 0 5px, transparent 5px 11px);
    background-size: 2px 11px;
  }
  /* vertical layout: one line into the hub, no manifold */
  .schema__bus:not(.schema__bus--one)::before,
  .schema__bus:not(.schema__bus--one)::after { display: none; }
  .schema__bus:not(.schema__bus--one) i { display: none; margin-right: 0; }
  .schema__bus:not(.schema__bus--one) i:first-child { display: block; }
  .schema__bus--one i { background-image: linear-gradient(180deg, var(--cobalt) 0 5px, transparent 5px 11px); }
  @keyframes bus-flow { to { background-position: 0 11px; } }

  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench .sheet { grid-row: auto; }
  .panel--products { grid-column: auto; }

  .sheet__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet__kpi:nth-child(3), .sheet__kpi:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .sheet__kpi:nth-child(3) { border-left: 0; }
  .sheet__split { grid-template-columns: minmax(0, 1fr); }
  .sheet__chart { border-right: 0; border-bottom: 1px solid var(--line-soft); }

  .spec__row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .results__row { grid-template-columns: minmax(0, 1fr); }
  .footer { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 560px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { text-align: center; }
  .btn--big {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    padding: 1.1rem 0.5rem;
  }
  .demo__stage { height: 380px; }
  .chip { width: min(62%, 13rem); }
  .chip__metric { display: none; }
  .demo__stage.is-unified .chip .chip__metric { display: block; }
  .demo__truth { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .sec::before, .sec::after { display: none; }
}

/* QA mode (#qa-… URLs): skip animations for clean captures */
html.no-anim .hero { min-height: auto; }
html.no-anim * { transition: none !important; animation: none !important; }
html.no-anim [data-reveal] { opacity: 1; transform: none; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .schema__bus i, .sheet__sync i { animation: none; }
  .sheet__bars i { transform: scaleY(1); transition: none; }
  .chip, .demo__truth { transition: none; }
  * { transition-duration: 0.01ms !important; }
}
