/* ==========================================================================
   Okra — Engineering Intelligence
   Design tokens + component styles
   ========================================================================== */

:root {
  /* Brand */
  --accent: #2563EB;
  --accent-hover: #1D4FD7;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --accent-tint: #9DB9F5;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --bg-hover: #F4F4F4;
  --bg-hover-strong: #F2F2F2;
  --bg-dark: #111111;

  /* Ink */
  --ink: #111111;
  --ink-strong: #222222;
  --ink-body: #3A3A3A;
  --ink-muted: #4A4A4A;
  --ink-soft: #5A5A5A;
  --ink-quiet: #6A6A6A;
  --ink-faint: #777777;
  --ink-dim: #888888;
  --ink-dimmer: #999999;
  --ink-ghost: #AAAAAA;

  /* Ink on dark */
  --ink-inv: #FFFFFF;
  --ink-inv-strong: #EDEDED;
  --ink-inv-muted: #A0A0A0;
  --ink-inv-faint: #7A7A7A;
  --ink-inv-dim: #6E6E6E;

  /* Lines */
  --line: #E9E9E9;
  --line-card: #E5E5E5;
  --line-rule: #E2E2E2;
  --line-hair: #EFEFEF;
  --line-hair-2: #F0F0F0;
  --line-hair-3: #EEEEEE;
  --line-field: #E0E0E0;
  --line-strong: #DCDCDC;
  --line-stack: #D9D9D9;
  --line-card-hover: #D5D5D5;
  --line-pill-hover: #C9C9C9;
  --line-btn-hover: #BBBBBB;

  /* Lines on dark */
  --line-dark: #262626;
  --line-dark-card: #2A2A2A;
  --line-dark-hair: #2F2F2F;

  /* Type */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 8vw, 104px);
  --radius: 10px;
  --radius-sm: 6px;

  /* Motion */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3 {
  margin: 0;
}

p {
  margin: 0;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

::placeholder {
  color: #6B6B6B;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--ink-inv);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  color: var(--ink-inv);
}

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

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.section--subtle {
  background: var(--bg-subtle);
}

.section--dark {
  background: var(--bg-dark);
}

.section__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

/* Responsive auto grid. --min is clamped to the container so narrow
   viewports never produce a horizontal overflow. */
.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 300px), 100%), 1fr));
  gap: var(--gap, 24px);
}

/* Hairline grid: 1px gaps rendered by the parent background colour. */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 300px), 100%), 1fr));
  gap: 1px;
  background: var(--line-card);
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.mono {
  font-family: var(--font-mono);
}

/* Sized from the hero column, not the viewport. Viewport units broke above
   1240px: the shell stops growing and the grid gap keeps widening, so the
   column shrinks while a vw-based font size does not — line one overflowed
   and "AI that ⟨really⟩ does" split, orphaning "does" and dropping the
   handwritten word on top of the line above.
   Line one measures 5.86 x the font size, so 15.5cqi leaves ~10% slack. */
.h1 {
  /* The floor is load-bearing, not taste: at a 280px column (320px viewport)
     46px leaves only 11px of slack on line one, which a fallback font can eat
     before Inter loads. 42px leaves ~26px. */
  font-size: clamp(42px, 15.5cqi, 88px);
  line-height: 1.0;
  letter-spacing: -0.038em;
  font-weight: 800;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.h2--tight {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
}

.lede {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Buttons + pills
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--ink-inv);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--ink-inv);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--line-btn-hover);
  color: var(--ink);
}

.btn--ghost-solid {
  border-color: var(--line-strong);
  background: var(--bg);
  color: var(--ink);
}

.btn--ghost-solid:hover {
  background: var(--bg-hover);
  border-color: var(--line-btn-hover);
  color: var(--ink);
}

.btn--sm {
  font-size: 14px;
  padding: 10px 18px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555555;
  border: 1px solid var(--line-card);
  background: var(--bg-subtle);
  padding: 7px 12px;
  border-radius: 100px;
}

.chip--status {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #333333;
  border: 1px solid var(--line-rule);
  background: var(--bg);
  padding: 7px 12px;
  border-radius: 100px;
  white-space: nowrap;
  /* Hover only. opacity/transform are driven by GSAP — leaving them in the
     transition makes the browser re-interpolate every frame GSAP writes. */
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  background: var(--bg-hover);
  border-color: var(--line-pill-hover);
}

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

/* The hidden state is applied only once JS has confirmed it can run the
   reveal (html.js). If the script never arrives, content stays visible. */
/* Initial hidden state only. Motion is driven by GSAP ScrollTrigger in
   main.js, which writes inline styles that override these. If GSAP or
   main.js fails to load, the `js` class is dropped and everything shows. */
.js .reveal:not(.is-visible),
.js .fx:not(.is-visible) {
  opacity: 0;
}

/* Hero plays an intro timeline on load rather than on scroll. Hiding these in
   CSS avoids a flash of the finished layout before GSAP takes over. */
.js .hero .eyebrow,
.js .hero h1,
.js .hero__lede,
.js .hero__actions,
.js .hero__chips,
.js .ins__word,
.js .ins__caret {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .fx {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo lockup. "TECH LABS" is only 17% of the mark's height, so the header
   size is set by what keeps the tagline legible rather than by the text
   wordmark it replaced. */
.wordmark {
  display: flex;
  align-items: center;
  flex: none;
}

.wordmark img {
  display: block;
  height: 38px;
  width: auto;
}

@media (max-width: 520px) {
  .wordmark img {
    height: 32px;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: #444444;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-header .btn {
  flex: none;
}

@media (max-width: 779px) {
  .site-nav {
    display: none;
  }
}

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

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

/* Query container for the headline. Without this, cqi falls back to the
   viewport — which is exactly the behaviour that broke line one above 1240px. */
.hero__copy {
  container-type: inline-size;
}

.hero .eyebrow {
  display: block;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 26px;
}

.hero__lede {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 600px;
  margin: 0 0 36px;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Metrics panel */
.panel {
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-hair);
  background: var(--bg-subtle);
  border-radius: var(--radius) var(--radius) 0 0;
}

.panel__head .label {
  color: #666666;
}

.panel__head .label--quiet {
  color: var(--ink-dimmer);
}

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bg-hover-strong);
}

.panel__row:last-child {
  border-bottom: none;
}

.panel__cell {
  display: grid;
  gap: 3px;
}

.panel__cell--end {
  text-align: right;
}

.panel__name {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

.panel__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8E8E8E;
}

.panel__value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.panel__value--accent {
  color: var(--accent);
}

.panel__note {
  font-size: 11px;
  color: #8E8E8E;
}

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */

.stat-band {
  border-left: 1px solid var(--line-card);
  border-right: 1px solid var(--line-card);
}

.stat-band .stat {
  background: var(--bg-subtle);
  padding: 30px 24px;
}

/* Below the 4-across breakpoint the band pairs up rather than collapsing to a
   single tall column — a stack of four reads as more body copy after the hero. */
@media (max-width: 860px) {
  /* minmax(0,…) so a wide figure like "50,000+" can't force one track wider
     than the other — equal halves matter more than never wrapping. */
  .stat-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .stat-band .stat {
    padding: 24px 18px;
  }

  /* Scoped to .stat-band: this block sits above the base .stat__value rule in
     the file, so it needs the extra specificity to win. Sized so the longest
     figure ("50,000+", 7 mono chars) still fits the half-width cell at 320px. */
  .stat-band .stat__value {
    font-size: clamp(22px, 6.2vw, 32px);
  }

  .stat-band .stat__label {
    font-size: 12.5px;
  }
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 38px);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat__value--accent {
  color: var(--accent);
}

.stat__label {
  font-size: 13px;
  color: var(--ink-quiet);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Section headers
   -------------------------------------------------------------------------- */

.section-head {
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 18px;
}

.section-head--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.section-head--split .lede {
  align-self: end;
  max-width: 520px;
}

/* --------------------------------------------------------------------------
   Accordion (capabilities + FAQ)
   -------------------------------------------------------------------------- */

.accordion {
  border-top: 1px solid var(--line-rule);
}

.accordion__item {
  border-bottom: 1px solid var(--line-rule);
  transition: background 0.2s ease;
}

.accordion__item:hover {
  background: var(--bg-hover);
}

.accordion--faq .accordion__item:hover {
  background: var(--bg-hover-strong);
}

.accordion__trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 26px 8px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: inherit;
}

.accordion--faq .accordion__trigger {
  padding: 24px 8px;
}

.accordion__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dimmer);
  flex: none;
}

.accordion--faq .accordion__index {
  color: #9A9A9A;
}

.accordion__title {
  flex: 1;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.accordion--faq .accordion__title {
  font-size: clamp(17px, 1.8vw, 21px);
}

.accordion__sign {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  flex: none;
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--ease-drawer);
}

.accordion__item.is-open .accordion__panel {
  grid-template-rows: 1fr;
}

.accordion__panel > div {
  min-height: 0;
  overflow: hidden;
}

.accordion__body {
  padding: 0 8px 28px 52px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px 32px;
}

.accordion__body p {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 620px;
}

.accordion__body span {
  font-size: 15px;
  color: var(--ink-strong);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.accordion__answer {
  margin: 0;
  padding: 0 8px 26px 52px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 76ch;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .accordion__panel {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Work cards
   -------------------------------------------------------------------------- */

/* Column layout so the rule + meta line can be pinned to the bottom. Grid
   already makes the cards equal height; without this the footers float at
   whatever height the copy happens to end, which reads as misaligned. */
.card {
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
  border-color: var(--line-card-hover);
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 22px;
}

.card__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

.card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.card p:last-of-type {
  margin-bottom: 22px;
}

.card p strong {
  font-weight: 600;
  color: var(--ink-strong);
}

.card__foot {
  /* Pins the footer to the bottom of an equal-height card. In the Labs cards
     .card__result sits after this, so the pair travels down together. */
  margin-top: auto;
  border-top: 1px solid var(--line-hair);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #666666;
}

.card__foot span:last-child {
  color: var(--ink);
}

.card__result {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink);
}

.card__result b {
  color: var(--accent);
  font-weight: 600;
}

/* CTA band */
.cta-band {
  margin-top: 28px;
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  align-items: center;
}

.cta-band h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.cta-band p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 520px;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-self: end;
}

@media (max-width: 620px) {
  .cta-band__actions {
    justify-self: start;
  }
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */

.case {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.case__notes {
  display: grid;
  gap: 28px;
}

.case__notes .label {
  display: block;
  color: var(--accent);
  margin-bottom: 10px;
}

.case__notes p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-body);
}

.case__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: 1px;
  background: var(--line-rule);
  border: 1px solid var(--line-rule);
  margin-top: 16px;
}

.case__metric {
  background: var(--bg-subtle);
  padding: 16px;
}

.case__metric b {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  display: block;
}

.case__metric span {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
  display: block;
}

/* Architecture diagram */
.arch {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
}

.arch__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.arch__head .label {
  color: var(--ink-inv-faint);
}

.arch__node {
  border: 1px solid var(--line-dark-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink-inv-strong);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.arch__node span:last-child {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-inv-faint);
  text-align: right;
}

.arch__node--accent {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink-inv);
  font-weight: 600;
}

.arch__node--accent span:last-child {
  font-weight: 400;
  color: var(--accent-tint);
}

.arch__link {
  height: 18px;
  width: 1px;
  background: var(--line-dark-hair);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */

.process {
  border: 1px solid var(--line-card);
}

.stage {
  background: var(--bg);
  padding: 28px 24px;
}

.stage__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-dimmer);
  margin-bottom: 24px;
}

.stage h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.stage p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.stage__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Stack
   -------------------------------------------------------------------------- */

.stack-group {
  border-top: 1px solid var(--line-stack);
  padding-top: 20px;
}

.stack-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stack-group__head .label {
  color: var(--ink-faint);
}

.stack-group__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-ghost);
}

.stack-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Principles (dark)
   -------------------------------------------------------------------------- */

.section--dark .eyebrow {
  color: var(--ink-inv-faint);
}

.section--dark .h2 {
  color: var(--ink-inv);
}

.principles {
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.principle {
  background: var(--bg-dark);
  padding: 32px 28px;
}

.principle__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-inv-dim);
  margin-bottom: 20px;
}

.principle h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-inv);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.principle p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-inv-muted);
}

/* --------------------------------------------------------------------------
   Company
   -------------------------------------------------------------------------- */

.company {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.company h2 {
  margin: 0 0 22px;
}

.company__copy p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 560px;
  text-wrap: pretty;
}

.company__copy p + p {
  margin-top: 16px;
}

.facts {
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
}

.facts__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-hair-2);
}

.facts__row:last-child {
  border-bottom: none;
}

.facts__row dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  text-align: right;
}

.model-card {
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.model-card:hover {
  background: var(--bg-subtle);
  border-color: var(--line-card-hover);
}

.model-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.model-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.model-card__time {
  /* Same reason as .card__foot — the four blurbs are different lengths, so the
     duration rules only line up if they are pushed to the bottom. */
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  border-top: 1px solid var(--line-hair);
  padding-top: 14px;
}

/* --------------------------------------------------------------------------
   Reviews
   -------------------------------------------------------------------------- */

.review {
  margin: 0;
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.review__stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.review__stat b {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.review__stat span {
  font-size: 13px;
  color: var(--ink-quiet);
}

.review blockquote {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-strong);
  text-wrap: pretty;
}

.review figcaption {
  border-top: 1px solid var(--line-hair-2);
  padding-top: 14px;
  font-size: 13px;
  color: var(--ink-quiet);
}

.review figcaption b {
  color: var(--ink);
  font-weight: 600;
}

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

.form {
  background: var(--bg);
  border: 1px solid var(--line-card);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field .label {
  color: var(--ink-faint);
}

.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line-field);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.2s ease;
  width: 100%;
}

.field textarea {
  line-height: 1.6;
  resize: vertical;
}

.form__foot {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.form__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8A8A8A;
}

.submit {
  background: var(--accent);
  color: var(--ink-inv);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.submit[data-state="pending"] {
  opacity: 0.7;
  cursor: default;
}

.submit[data-state="success"] {
  background: #181818;
  border-color: #3A3A3A;
  cursor: default;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.site-footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) 36px;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-hair-3);
}

.site-footer__mark {
  display: block;
  width: clamp(150px, 20vw, 200px);
  height: auto;
  margin-bottom: 20px;
}

.site-footer__tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-quiet);
  max-width: 280px;
}

.site-footer__col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.site-footer__col .label {
  color: var(--ink-dimmer);
  margin-bottom: 4px;
}

.site-footer__col a,
.site-footer__col span:not(.label) {
  font-size: 14px;
  color: #333333;
}

.site-footer__col a:hover {
  color: var(--ink);
}

.site-footer__col .is-accent {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Legal pages (terms, privacy)
   Same tokens as the marketing page; narrower measure for long-form reading.
   -------------------------------------------------------------------------- */

.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.legal-hero {
  padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 18px;
}

.legal-hero .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.legal-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

.legal-dates {
  margin-top: 26px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.legal-dates b {
  color: var(--ink-quiet);
  font-weight: 500;
}

.legal-toc {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.legal-toc > .label {
  display: block;
  margin-bottom: 16px;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 40px;
}

.legal-toc li {
  margin: 0 0 10px;
  font-size: 15px;
  break-inside: avoid;
}

.legal-toc a {
  color: var(--ink-strong);
  display: flex;
  gap: 12px;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-toc .n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-ghost);
  min-width: 22px;
  padding-top: 2px;
}

.legal-section {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section > .label {
  display: block;
  margin-bottom: 10px;
}

.legal-section h2 {
  font-size: clamp(22px, 2.4vw, 27px);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}

.legal-section h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 26px 0 8px;
}

.legal-section p,
.legal-section li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.legal-section p {
  margin: 0 0 16px;
}

.legal-section ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-section li {
  margin: 0 0 8px;
}

.legal-section b {
  color: var(--ink);
  font-weight: 600;
}

.legal-section a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.legal-section a:hover {
  border-bottom-color: var(--accent);
}

/* Unfilled blanks. Deliberately loud — these must not ship unnoticed. */
.ph {
  background: #FDF3E7;
  color: #B4530A;
  border: 1px solid #F0DCC2;
  border-radius: 4px;
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  white-space: nowrap;
}

.note {
  background: var(--bg-subtle);
  border: 1px solid var(--line-card);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 15px;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-muted);
}

.legal-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}

.legal-back {
  font-size: 14px;
  color: var(--ink-quiet);
  flex: none;
}

.legal-back:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .legal-toc ol {
    columns: 1;
  }
}

/* --------------------------------------------------------------------------
   Footer — llms.txt + AI summary hand-off
   -------------------------------------------------------------------------- */

.site-footer__ai {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-hair-3);
}

.llms-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.llms-chip:hover {
  background: var(--bg-subtle);
  border-color: var(--ink);
  color: var(--ink);
}

.site-footer__ai-label {
  font-size: 14px;
  color: var(--ink-quiet);
}

.ai-summary-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-summary-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--ink-quiet);
  transition: color 0.2s ease, background 0.2s ease;
}

.ai-summary-links a:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

/* currentColor keeps the marks monochrome so they sit in the footer rather
   than shouting three different brand colours at it. */
.ai-summary-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}

@media (max-width: 560px) {
  .site-footer__ai {
    gap: 14px;
  }

  .site-footer__ai-label {
    /* Let the label take its own line rather than squeezing the icon row. */
    flex: 1 0 100%;
    order: 3;
    font-size: 13px;
  }
}

.site-footer__base {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-dimmer);
}

/* --------------------------------------------------------------------------
   Handwritten insertion — hero headline
   Renders "really" as a proof-mark caret insertion above the baseline.
   -------------------------------------------------------------------------- */

.h1--ins {
  padding-top: 0.54em;
  text-wrap: normal;
}

.hero .eyebrow {
  margin-bottom: 18px;
}

.ins {
  position: relative;
  display: inline-block;
  width: 0.58em;
  vertical-align: baseline;
}

.ins__word {
  position: absolute;
  left: 50%;
  /* Raised in step with the larger font size — the rotated box plus the 'y'
     descender reach lower than the type metrics alone suggest. */
  bottom: 1.1em;
  transform: translateX(-50%) rotate(-6deg);
  transform-origin: 50% 100%;
  font-family: Caveat, "Bradley Hand", "Snell Roundhand", "Segoe Script", cursive;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}

.ins__caret {
  position: absolute;
  left: 50%;
  bottom: 0.1em;
  width: 0.4em;
  color: var(--accent);
  transform: translateX(-50%) rotate(-3deg);
}

.ins__caret svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Headroom for the raised insertion so it clears the eyebrow above. Scales
   with the headline, so the gap holds at every size. */
.h1--ins {
  padding-top: 0.62em;
}

/* The headline is authored as two lines. Keeping line one unbreakable means a
   near-miss shows as a hair of overflow rather than collapsing into three
   lines with the insertion detached from its slot. */
.h1__phrase {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .h1--ins { padding-top: 0.74em; }
  /* Slot stays narrow so line one still fits at 320px; the larger word simply
     overhangs it further, which is what the insertion is meant to do. */
  .ins { width: 0.62em; }
  .ins__word { font-size: 0.7em; bottom: 1.16em; }
  .ins__caret { width: 0.42em; }
}

/* --------------------------------------------------------------------------
   Metric-led work cards
   Number first, then a visual before/after delta, then one line of context.
   -------------------------------------------------------------------------- */

.card--metric .card__title {
  margin-bottom: 18px;
}

.figure {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.figure b {
  font-size: clamp(40px, 4.4vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.figure span {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.delta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.delta__side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.delta__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.delta__val {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-quiet);
}

.delta__side--after .delta__val {
  color: var(--ink);
}

.delta__arrow {
  color: var(--ink-ghost);
  font-size: 15px;
  line-height: 1;
}

.card__note {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card--metric .card__foot {
  margin-top: 18px;
}

@media (max-width: 420px) {
  .delta { gap: 10px; padding: 13px 14px; }
  .delta__val { font-size: 13px; }
}
