/*
 * aptixx.com design system — "quiet confidence" (engineering notebook).
 * Single stylesheet for the whole site. Authored by hand; the design contract
 * lives in .claude/skills/aptixx-design/SKILL.md.
 *
 * Structure: fonts → tokens → reset → base type → utilities → header/nav →
 * sections/headers → components → forms → footer → motion → responsive.
 */

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
  font-family: "General Sans";
  src: url("/fonts/GeneralSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("/fonts/GeneralSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("/fonts/GeneralSans-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("/fonts/GeneralSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* IBM Plex Mono (OFL — see fonts/IBMPlexMono-LICENSE.txt), official Latin1
 * subset; glyphs outside the range fall back per-glyph to the system stack. */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA,
    U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030,
    U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #faf9f7;
  --paper-tint: #f1efeb;
  --ink: #101828;
  --ink-soft: #475067;
  --ink-faint: #5f6b81;
  --rule: #e4e1da;
  --cobalt: #1d4ed8;
  --cobalt-deep: #1e40af;
  --teal: #0b6f67;
  --teal-tint: #e4f2f0;
  --error: #b42318;
  --ok: #067647;

  --sans: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --size-display: clamp(2.25rem, 1.35rem + 3.4vw, 3.25rem);
  --size-h2: clamp(1.65rem, 1.25rem + 1.5vw, 2.375rem);
  --size-h3: 1.375rem;
  --size-lede: 1.125rem;
  --size-mono-label: 0.8125rem;

  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --spring: linear(
    0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 20.8%,
    1.077 26.9%, 1.062 32.6%, 1.007 40.9%, 0.984 52%, 1.002 77.2%, 1
  );
  --exception: #92580a;

  --space-section: clamp(4rem, 2.6rem + 5vw, 6.5rem);
  --container: 1240px;
  --radius: 6px;
}

/* ---------- Reset (lite) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
details {
  margin: 0;
}
ul,
ol {
  padding: 0;
}

/* ---------- Base typography ---------- */
h1 {
  font-size: var(--size-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 21ch;
}
h2 {
  font-size: var(--size-h2);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 28ch;
}
h3 {
  font-size: var(--size-h3);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
p {
  max-width: 68ch;
}
.lede {
  font-size: var(--size-lede);
  color: var(--ink-soft);
  max-width: 60ch;
}
.mono {
  font-family: var(--mono);
  font-size: var(--size-mono-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
a {
  color: var(--cobalt);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--cobalt-deep);
}
::selection {
  background: var(--teal-tint);
  color: var(--ink);
}

/* In-copy links get an underline that thickens on hover */
.prose a {
  text-decoration-line: underline;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container-wide {
  max-width: 1400px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  transition: top 0.15s var(--ease-out-quart);
}
.skip-link:focus {
  top: 1rem;
  color: var(--paper);
}
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 28px;
  height: auto;
}
.brand-name {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.nav-menu a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0;
  position: relative;
}
.nav-menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease-out-quart);
}
.nav-menu a:not(.btn):hover,
.nav-menu a:not(.btn)[aria-current="page"] {
  color: var(--ink);
}
.nav-menu a:not(.btn):hover::after,
.nav-menu a:not(.btn)[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease-out-quart), background-color 0.15s var(--ease-out-quart),
    border-color 0.15s var(--ease-out-quart), color 0.15s var(--ease-out-quart);
  cursor: pointer;
}
.btn-primary {
  background: var(--cobalt);
  color: #fff;
}
.btn-primary:hover {
  background: var(--cobalt-deep);
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  transform: translateY(-1px);
}
.btn-arrow {
  transition: transform 0.15s var(--ease-out-quart);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}
.cta-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* ---------- Sections & page headers ---------- */
.section {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--rule);
}
.section:first-child,
.hero + .section {
  border-top: 0;
}
.section-tint {
  background: var(--paper-tint);
}
.eyebrow {
  color: var(--teal);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow-index {
  color: var(--ink-faint);
}
.eyebrow-index::after {
  content: " /";
}
.page-header {
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2.5rem, 2rem + 2vw, 4rem);
}
.page-header .lede {
  margin-top: 1.25rem;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
  text-transform: none;
  letter-spacing: 0.02em;
}
.crumbs a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.25em;
}
.crumbs a:hover {
  color: var(--cobalt);
  text-decoration: underline;
}
.crumb-sep {
  color: var(--rule);
}
.section h2 {
  margin-bottom: 1rem;
}
.section .lede {
  margin-bottom: 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3.5rem, 2.5rem + 5vw, 7rem) 0 clamp(3rem, 2.25rem + 3vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero .lede {
  margin-top: 1.5rem;
}
.hero-diagram svg {
  width: 100%;
  height: auto;
}
/* Ambient dot grid — decorative, <8% opacity, disabled under reduced motion.
 * Oversized by one 280x140px drift period toward the top-left so the
 * compositor-only transform drift never exposes an edge; the travel is a
 * whole multiple of the 28px tile, so the 50s loop wraps seamlessly. */
.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  left: -280px;
  width: calc(100% + 280px);
  height: calc(100% + 140px);
  background-image: radial-gradient(var(--ink-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.06;
  animation: grid-drift 50s linear infinite;
  pointer-events: none;
}
@keyframes grid-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(280px, 140px);
  }
}
.hero > .container {
  position: relative;
}

/* ---------- Diagram (circuit-trace SVG) ---------- */
.diagram-trace {
  stroke: var(--ink);
  stroke-width: 1.5;
  fill: none;
}
.diagram-trace-accent {
  stroke: var(--teal);
}
.diagram-node {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}
.diagram-dot {
  fill: var(--ink);
}
.diagram-dot-accent {
  fill: var(--teal);
}
.diagram-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-soft);
}
.js .draw .diagram-trace {
  transition: stroke-dashoffset 1.6s var(--ease-out-quart);
}

/* ---------- Ops scene (animated hero diagram) ----------
 * Assembly beats: each element carries --b (beat index); .is-assembled starts
 * the staged entrance. The conductor in js/site.js drives the live loop. */
.js [data-ops-scene] .ops-node {
  opacity: 0;
  transform: scale(0.97);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.45s var(--ease-out-quart), transform 0.6s var(--spring);
  transition-delay: calc(180ms + var(--b, 0) * 75ms);
}
.js [data-ops-scene].is-assembled .ops-node {
  opacity: 1;
  transform: scale(1);
}
.js [data-ops-scene] .diagram-label {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease-out-quart), filter 0.5s var(--ease-out-quart),
    transform 0.5s var(--ease-out-quart);
  transition-delay: calc(420ms + var(--b, 0) * 55ms);
}
.js [data-ops-scene].is-assembled .diagram-label {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.js [data-ops-scene] .diagram-trace {
  transition-duration: 0.6s;
  transition-timing-function: var(--ease-out-quart);
  transition-delay: 750ms;
}
.js [data-ops-scene] .diagram-rail {
  transition-delay: 60ms;
}
.js [data-ops-scene] .diagram-tap {
  transition-delay: 1000ms;
}
.ops-node rect {
  transform-box: fill-box;
  transform-origin: center;
  transition: stroke 0.25s var(--ease-out-quart), fill 0.25s var(--ease-out-quart), transform 0.4s var(--spring);
}
.ops-node.is-compress rect {
  transform: scale(0.985);
  transition-duration: 0.09s;
  transition-timing-function: ease-in;
}
.ops-node.is-working rect {
  stroke: var(--teal);
  fill: var(--teal-tint);
}
.ops-node.is-exception rect {
  stroke: var(--exception);
  fill: transparent;
}
.node-work {
  stroke: var(--teal);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: opacity 0.15s var(--ease-out-quart);
}
.ops-node.is-working .node-work {
  opacity: 0.9;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--dwell, 300ms) linear, opacity 0.15s var(--ease-out-quart);
}
.ops-node.is-exception .node-work {
  stroke: var(--exception);
}
.src-dot {
  fill: var(--ink-faint);
  opacity: 0.2;
  animation: dot-drift var(--dur, 8s) var(--ease-in-out-quart) var(--del, 0s) infinite;
}
@keyframes dot-drift {
  0%, 100% { transform: translate(0, 0); opacity: 0.18; }
  30% { transform: translate(3px, -2px); opacity: 0.5; }
  55% { transform: translate(-2px, 1px); opacity: 0.3; }
  80% { transform: translate(2px, 2px); opacity: 0.45; }
}
.rail-tick {
  stroke: var(--teal);
  stroke-width: 1;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-quart);
}
.rail-tick.on {
  opacity: 0.8;
}
.rail-tick.old {
  opacity: 0;
}
.ev-ring {
  stroke: var(--teal);
  stroke-width: 1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.ops-pulse-hold {
  fill: none;
  stroke: var(--exception);
  stroke-width: 1.5;
}
@media (hover: hover) and (pointer: fine) {
  [data-ops-scene] .ops-node {
    cursor: default;
  }
  [data-ops-scene] .ops-node:hover rect {
    stroke: var(--cobalt);
  }
  [data-ops-scene][data-stage="0"] #tap-0,
  [data-ops-scene][data-stage="1"] #tap-1,
  [data-ops-scene][data-stage="2"] #tap-2,
  [data-ops-scene][data-stage="3"] #tap-3 {
    opacity: 1;
    stroke: var(--teal);
  }
  [data-ops-scene][data-stage="0"] #rail-0,
  [data-ops-scene][data-stage="1"] #rail-1,
  [data-ops-scene][data-stage="2"] #rail-2,
  [data-ops-scene][data-stage="3"] #rail-3 {
    fill: var(--teal);
    transform: scale(1.6);
  }
}
.diagram-flow {
  stroke: var(--cobalt);
  stroke-width: 2;
  stroke-dasharray: 3 9;
  opacity: 0;
  animation: flow-dash 0.85s linear infinite;
  transition: opacity 0.8s var(--ease-out-quart) 1.6s;
}
.diagram-flow-accent {
  stroke: var(--teal);
}
.js .draw.is-live .diagram-flow {
  opacity: 0.5;
}
@keyframes flow-dash {
  from {
    stroke-dashoffset: 12;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.hero-status {
  margin-top: 1rem;
  text-align: center;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out-quart);
}
.hero-status.is-counting {
  opacity: 1;
}
.hero-status #ops-count {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.hero-status::after {
  content: "▮";
  color: var(--teal);
  margin-left: 0.35em;
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-status {
    display: none;
  }
  .diagram-flow,
  .src-dot {
    opacity: 0 !important;
  }
  .js [data-ops-scene] .ops-node,
  .js [data-ops-scene] .diagram-label {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.diagram-arrow {
  fill: var(--ink);
}
.diagram-tap {
  stroke: var(--ink-faint);
  stroke-width: 1;
  opacity: 0.65;
}
.diagram-rail {
  stroke: var(--ink-faint);
}
.diagram-label-src,
.diagram-label-rail {
  fill: var(--ink-faint);
  font-size: 10px;
}
.diagram-label-ev {
  fill: var(--teal);
  font-size: 10px;
}
.ops-pulse {
  fill: var(--ink);
}
.ops-pulse-tap {
  fill: var(--teal);
}
.rail-dot {
  fill: var(--ink-faint);
  transition: transform 0.3s var(--ease-out-quart), fill 0.3s var(--ease-out-quart);
  transform-box: fill-box;
  transform-origin: center;
}
.rail-dot.blip {
  fill: var(--teal);
  transform: scale(1.9);
}
.ev-dot {
  fill: var(--teal);
  opacity: 0.55;
}
.ev-dot.blip {
  opacity: 1;
  transform: scale(1.7);
}

/* ---------- Proof metrics ---------- */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.metric {
  padding: 1.75rem 1.5rem;
  border-left: 1px solid var(--rule);
}
.metric:first-child {
  border-left: 0;
}
.metric-value {
  font-size: 2.1rem;
  color: var(--teal);
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.metric-suffix,
.metric-prefix {
  font-size: 1.3rem;
  color: var(--ink-faint);
}
.metric-prefix {
  margin-right: 0.1em;
}
.metric-label {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  max-width: none;
}

/* ---------- Pills & meta rows ---------- */
.pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  background: var(--teal-tint);
  color: var(--teal);
  letter-spacing: 0.08em;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  color: var(--ink-soft);
  margin: 1rem 0 0;
  max-width: none;
}
.meta-sep {
  color: var(--rule);
}

/* ---------- Grids: problems, services, bento ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.rule-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}
.rule-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: baseline;
  max-width: 62ch;
}
.rule-list .li-index {
  font-family: var(--mono);
  font-size: var(--size-mono-label);
  color: var(--ink-faint);
}
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.bento-tile {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--paper);
  transition: border-color 0.15s var(--ease-out-quart);
}
.bento-tile:hover {
  border-color: var(--ink-faint);
}
.bento-tile h3 {
  margin-bottom: 0.6rem;
}
.bento-tile p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.bento-tile p + p {
  margin-top: 0.75rem;
}
.bento-tile .tile-outcome {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--teal);
  font-family: var(--mono);
  font-size: var(--size-mono-label);
  letter-spacing: 0.04em;
  text-transform: none;
}
.tile-7 {
  grid-column: span 7;
}
.tile-5 {
  grid-column: span 5;
}
.tile-6 {
  grid-column: span 6;
}
.tile-4 {
  grid-column: span 4;
}
.tile-8 {
  grid-column: span 8;
}
.tile-12 {
  grid-column: span 12;
}

/* ---------- Case cards ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.case-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s var(--ease-out-quart), transform 0.15s var(--ease-out-quart);
}
.case-card:hover {
  border-color: var(--cobalt);
  transform: translateY(-2px);
  color: var(--ink);
}
.case-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.case-card-industry {
  color: var(--ink-faint);
}
.case-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex-grow: 1;
}
.card-link {
  color: var(--cobalt);
  letter-spacing: 0.04em;
  text-transform: none;
}
.case-card:hover .card-link {
  text-decoration: underline;
}

/* ---------- Buying path (numbered steps) ---------- */
.path-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.path-step {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
  position: relative;
}
.path-step .step-index {
  font-family: var(--mono);
  font-size: var(--size-mono-label);
  color: var(--teal);
  letter-spacing: 0.08em;
}
.path-step h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.15rem;
}
.path-step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Case study article ---------- */
.prose {
  max-width: 68ch;
}
.prose p + p {
  margin-top: 1rem;
}
.prose h2 {
  margin: 2.5rem 0 1rem;
}
.prose h3 {
  margin: 2rem 0 0.75rem;
}
.prose ul,
.prose ol {
  margin: 1rem 0 1rem 1.25rem;
}
.prose li + li {
  margin-top: 0.5rem;
}
.prose figure {
  margin: 2rem 0;
}
.prose figcaption {
  font-family: var(--mono);
  font-size: var(--size-mono-label);
  color: var(--ink-faint);
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
}
.callout {
  border-left: 3px solid var(--teal);
  background: var(--teal-tint);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.callout p {
  color: var(--ink);
}

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.05rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-marker {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  position: relative;
}
.faq-marker::before,
.faq-marker::after {
  content: "";
  position: absolute;
  background: var(--ink-soft);
  transition: transform 0.2s var(--ease-out-quart);
}
.faq-marker::before {
  left: 0;
  top: 5px;
  width: 12px;
  height: 2px;
}
.faq-marker::after {
  left: 5px;
  top: 0;
  width: 2px;
  height: 12px;
}
.faq-item[open] .faq-marker::after {
  transform: scaleY(0);
}
.faq-body {
  padding: 0 0 1.4rem;
  color: var(--ink-soft);
}

/* ---------- Forms ---------- */
.form {
  max-width: 34rem;
}
.field {
  margin-bottom: 1.4rem;
}
.field label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.field .hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.15s var(--ease-out-quart), box-shadow 0.15s var(--ease-out-quart);
}
.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 18%, transparent);
}
.field .error-text {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.35rem;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}
.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.4rem;
}
.fieldset legend {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  padding: 0;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice {
  position: relative;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: border-color 0.15s var(--ease-out-quart), color 0.15s var(--ease-out-quart),
    background-color 0.15s var(--ease-out-quart);
}
.choice input:checked + span {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: color-mix(in srgb, var(--cobalt) 7%, transparent);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}
.form-note {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}
.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  display: none;
}
.form-status.is-visible {
  display: block;
}
.form-status-ok {
  background: var(--teal-tint);
  color: var(--ink);
  border-left: 3px solid var(--ok);
}
.form-status-fail {
  background: #fdecea;
  color: var(--ink);
  border-left: 3px solid var(--error);
}
.turnstile-slot {
  min-height: 66px; /* reserve space so the widget cannot shift layout */
  margin-bottom: 1.25rem;
}

/* ---------- Founder block ---------- */
.founder {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.founder img {
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.final-cta .eyebrow {
  justify-content: center;
}
.final-cta h2,
.final-cta .lede {
  margin-left: auto;
  margin-right: auto;
}
.final-cta .cta-pair {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-tint);
  padding: 4rem 0 2rem;
  margin-top: var(--space-section);
}
.site-footer .brand img {
  filter: invert(1) brightness(0.2); /* white mark -> ink on light footer */
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 2rem;
}
.footer-desc {
  color: var(--ink-soft);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 26ch;
}
.footer-contact {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  text-transform: none;
}
.footer-contact a {
  color: var(--ink-soft);
}
.footer-heading {
  color: var(--ink-faint);
  margin-bottom: 1rem;
  font-size: 0.75rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-col a:hover {
  color: var(--cobalt);
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  text-transform: none;
}
.footer-bottom p {
  max-width: none;
}

/* ---------- Consent banner (built by js/consent.js) ---------- */
.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: 30rem;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.25);
}
.consent-text {
  font-size: 0.9rem;
  margin: 0;
  flex: 1 1 16rem;
}
.consent-actions {
  display: flex;
  gap: 0.5rem;
}
.consent-btn {
  font: inherit;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.consent-btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.consent-reopen {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 80;
  font: inherit;
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out-quart), transform 0.5s var(--ease-out-quart);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }
  .metric:nth-child(3) {
    border-left: 0;
  }
  .metric {
    border-top: 1px solid var(--rule);
  }
  .metric:nth-child(-n + 2) {
    border-top: 0;
  }
  .case-grid,
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .path-steps {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }
  .bento-tile[class*="tile-"] {
    grid-column: span 6;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .hero-grid,
  .grid-2,
  .founder {
    grid-template-columns: 1fr;
  }
  .hero-diagram {
    order: 2;
  }
  .case-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .bento-tile[class*="tile-"] {
    grid-column: span 12;
  }
  /* Mobile nav */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    z-index: 60;
  }
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s var(--ease-out-quart), opacity 0.2s var(--ease-out-quart);
  }
  .nav-toggle-bar {
    position: relative;
  }
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-bar::before {
    top: -6px;
  }
  .nav-toggle-bar::after {
    top: 6px;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar {
    background: transparent;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
    transform: translateY(-6px) rotate(-45deg);
  }
  .nav-menu {
    position: fixed;
    inset: 0;
    top: 64px;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
    gap: 1.5rem;
    display: none;
    border-top: 1px solid var(--rule);
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-menu a:not(.btn) {
    font-size: 1.3rem;
  }
  .nav-cta {
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .metric-strip {
    grid-template-columns: 1fr;
  }
  .metric {
    border-left: 0;
  }
  .metric:first-child {
    border-top: 0;
  }
  .path-steps {
    grid-template-columns: 1fr;
  }
  .cta-pair .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Reduced motion baseline (mandatory) ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero::before {
    animation: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .consent-banner,
  .consent-reopen,
  .skip-link {
    display: none;
  }
}

/* Consent banner yields while the mobile nav overlay is open (its buttons sit
   outside the menu focus loop, so it must not paint above the panel). */
.nav-open .consent-banner,
.nav-open .consent-reopen {
  visibility: hidden;
}
/* The hero journey counter is meaningless when the scene is static. */
@media (prefers-reduced-motion: reduce) {
  .hero-status {
    display: none;
  }
}
