/* ==========================================================================
   Spearstone — site stylesheet

   Register: severity, authority, engineering precision. The reference points
   are defence/infrastructure brands, not consumer SaaS. Practically that means
   near-square corners, hairline rules, wide-tracked monospace eyebrows, serif
   display type for gravitas, and cyan used surgically rather than flooded.
   ========================================================================== */

@import url('tokens.css');

/* ------------------------------------------------------------------ fonts --
   Self-hosted woff2 subsets. No Google Fonts request: it removes a third-party
   origin from the CSP and eliminates the layout shift that comes with it.
   `font-display: swap` keeps first paint immediate on cold cache. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700; /* variable range — one file covers the whole scale */
  font-display: swap;
  /* Single variable file covers 400-700. Declared as plain woff2 because every
     browser that supports variable fonts also accepts that declaration, and the
     older woff2-variations token is now only a source of confusion. */
  src: url('/assets/fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* ------------------------------------------------------------------ reset -- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset in-page anchor targets so the sticky masthead never covers a heading. */
  scroll-padding-top: 6rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  padding: 0;
}

:target {
  scroll-margin-top: 6rem;
}

/* ---------------------------------------------------------- accessibility -- */

/* Visible only on keyboard focus; first tab stop on every page. */
.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: var(--z-overlay);
  padding: var(--space-2xs) var(--space-sm);
  background: var(--brand-cyan);
  color: #001018;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Single global focus treatment. Two-tone ring so it reads on any surface. */
:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- headings -- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1,
.h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

h2,
.h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

h3,
.h3 {
  font-size: var(--text-xl);
}

h4,
.h4 {
  font-size: var(--text-lg);
}

h5,
h6 {
  font-size: var(--text-md);
}

p {
  text-wrap: pretty;
}

a {
  color: var(--brand-cyan);
  text-decoration-color: rgba(0, 204, 255, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--dur-fast) var(--ease-out),
    text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--brand-cyan-bright);
  text-decoration-color: currentColor;
}

strong {
  font-weight: 600;
  color: var(--text);
}

/* Small-caps monospace eyebrow. Used above section headings to label the
   section — a large part of the "engineering document" feel. */
/* Block, not flex.
   As a flex container the label text became an anonymous flex item, which
   cannot wrap internally — so a long eyebrow such as "EXECUTIVE STRATEGY &
   EXECUTION INCUBATOR" overflowed the viewport on a phone. An inline-block
   rule inside a normal block wraps the way text should. */
.eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: var(--leading-normal);
  text-wrap: balance;
  color: var(--brand-cyan);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin-right: 0.6em;
  vertical-align: middle;
  background: currentColor;
}

/* The rule costs horizontal room that narrow screens cannot spare. */
@media (max-width: 30rem) {
  .eyebrow::before {
    width: 1rem;
    margin-right: 0.45em;
  }
}

.eyebrow--plain::before {
  display: none;
}

/* A class rather than an inline style attribute, because the CSP deliberately
   omits style-src-attr 'unsafe-inline'. */
.eyebrow--center {
  text-align: center;
}

/* Lede paragraph under a page or section heading. */
.lede {
  max-width: 46rem;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

/* --------------------------------------------------------------- layout ---- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* A full-bleed horizontal band. Sections are composed by stacking bands with
   alternating surface colours. */
.band {
  position: relative;
  padding-block: var(--band-y);
}

.band--tight {
  padding-block: var(--band-y-tight);
}

.band--s1 { background: var(--surface-1); }
.band--s2 { background: var(--surface-2); }

/* Hairline separator between adjacent bands of the same colour. */
.band--ruled { border-top: 1px solid var(--line); }

.band__head {
  max-width: 52rem;
  margin-bottom: var(--space-xl);
}

.stack > * + * {
  margin-top: var(--flow, var(--space-sm));
}

.stack--md { --flow: var(--space-md); }
.stack--lg { --flow: var(--space-lg); }

/* Auto-fitting card grid. min column width is passed per-instance so the same
   primitive drives 2-, 3- and 4-up layouts without bespoke media queries. */
.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-md));
  grid-template-columns: repeat(auto-fit, minmax(min(var(--col, 17rem), 100%), 1fr));
}

.grid--2 { --col: 24rem; }
.grid--3 { --col: 19rem; }
.grid--4 { --col: 15rem; }

/* Asymmetric split for text-beside-media rows. */
.split {
  display: grid;
  gap: clamp(var(--space-lg), 4vw, var(--space-2xl));
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--wide-start { grid-template-columns: 1.25fr 1fr; }
  .split--wide-end { grid-template-columns: 1fr 1.25fr; }
}

/* Centring a two-line heading against a four-paragraph column drops it into the
   middle of the row and leaves a hole above it. */
.split--top {
  align-items: start;
}

/* --------------------------------------------------------------- masthead -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

/* Applied by js/nav.js once the page is scrolled, to firm up the bar. */
.masthead.is-scrolled {
  background: rgba(5, 7, 10, 0.95);
  border-bottom-color: var(--line-strong);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 4.5rem;
}

.masthead__brand {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
  text-decoration: none;
}

.masthead__brand img {
  height: 2rem;
  width: auto;
}

.masthead__brand:focus-visible {
  outline-offset: 6px;
}

/* On desktop the panel is a row holding the nav list and the CTA side by side.
   The mobile block below turns it back into a stacked drawer. */
.masthead__nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ---- primary navigation */

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
}

.nav__link {
  display: block;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Current page: cyan text plus an underscore rule, so the state is not carried
   by colour alone (WCAG 1.4.1). */
.nav__link[aria-current='page'] {
  color: var(--brand-cyan);
  box-shadow: inset 0 -2px 0 var(--brand-cyan);
}

/* ---- services dropdown */

.nav__group {
  position: relative;
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  padding: var(--space-2xs) var(--space-xs);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.nav__toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav__toggle svg {
  width: 0.7em;
  height: 0.7em;
  transition: transform var(--dur) var(--ease-out);
}

.nav__toggle[aria-expanded='true'] {
  color: var(--brand-cyan);
}

.nav__toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.nav__menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  translate: -50% 0;
  min-width: 21rem;
  padding: var(--space-2xs);
  margin: 0;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* Hidden via visibility rather than display so the open/close transition runs
     and so focus cannot land inside a closed menu. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.4rem);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
    visibility var(--dur);
}

.nav__group.is-open .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__menu a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out);
}

.nav__menu a:hover {
  background: var(--surface-3);
}

.nav__menu strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}

.nav__menu span {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-subtle);
}

/* ---- mobile disclosure */

.nav__burger {
  display: none;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.nav__burger svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-inline: auto;
}

.nav__burger .icon-close { display: none; }
.nav__burger[aria-expanded='true'] .icon-open { display: none; }
.nav__burger[aria-expanded='true'] .icon-close { display: block; }

@media (max-width: 60rem) {
  .nav__burger {
    display: block;
  }

  .masthead__nav {
    position: fixed;
    inset: 4.5rem 0 auto;
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    padding: var(--space-md) var(--gutter) var(--space-xl);
    background: var(--surface-1);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lg);
    transform: translateY(-101%);
    transition: transform var(--dur-slow) var(--ease-out);
  }

  .masthead__nav.is-open {
    transform: translateY(0);
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3xs);
  }

  .nav__link,
  .nav__toggle {
    width: 100%;
    padding: var(--space-xs) var(--space-2xs);
    font-size: var(--text-md);
  }

  .nav__toggle {
    justify-content: space-between;
  }

  /* In the mobile drawer the dropdown becomes an inline accordion. */
  .nav__menu {
    position: static;
    translate: none;
    min-width: 0;
    margin-top: var(--space-3xs);
    background: var(--surface-2);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav__group.is-open .nav__menu {
    display: block;
  }

  .masthead__cta {
    width: 100%;
    margin-top: var(--space-sm);
  }
}

/* --------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

/* Primary: cyan fill with a very dark ink. Contrast ~11:1. */
.btn--primary {
  background: var(--brand-cyan);
  color: #001018;
}

.btn--primary:hover {
  background: var(--brand-cyan-bright);
  color: #001018;
  box-shadow: var(--glow-cyan);
}

.btn--secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  background: rgba(0, 204, 255, 0.06);
}

.btn--ghost {
  padding-inline: var(--space-2xs);
  background: none;
  color: var(--brand-cyan);
}

.btn--ghost:hover {
  color: var(--brand-cyan-bright);
  gap: var(--space-xs);
}

.btn--lg {
  padding: 1rem 1.9rem;
  font-size: var(--text-base);
}

.btn--block {
  width: 100%;
}

.btn__arrow {
  width: 0.85em;
  height: 0.85em;
  flex: none;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.btn-row--center {
  justify-content: center;
}

/* ------------------------------------------------------------------ hero --- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(84svh, 46rem);
  padding-block: var(--space-3xl) var(--space-2xl);
  overflow: hidden;
  background: var(--bg);
}

/* Layered background: a cyan bloom off-centre plus a faint engineering grid.
   Both are pure CSS — no image request, no CLS. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto auto;
  width: min(70rem, 120%);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 65% 35%,
    rgba(0, 204, 255, 0.16) 0%,
    rgba(0, 204, 255, 0.05) 38%,
    transparent 68%
  );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  /* Fade the grid out toward the edges so it suggests structure without
     competing with the headline. */
  mask-image: radial-gradient(ellipse 80% 65% at 50% 45%, #000 20%, transparent 78%);
  opacity: 0.5;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: var(--z-raised);
  max-width: 56rem;
}

.hero h1 {
  font-size: var(--text-display);
  margin-bottom: var(--space-md);
}

/* Cyan emphasis inside a display headline. */
.hero h1 em,
.accent {
  font-style: normal;
  color: var(--brand-cyan);
}

.hero__lede {
  max-width: 42rem;
  margin-bottom: var(--space-lg);
  font-size: var(--text-md);
  color: var(--text-muted);
}

/* The credo, rendered as a spaced rule-flanked line. */
.credo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.credo b {
  color: var(--brand-cyan);
  font-weight: 500;
}

.credo::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-accent), transparent);
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

/* Cyan wipe along the top edge on hover — reads as a targeting indicator
   rather than a generic lift. */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-lg);
  right: var(--space-lg);
  height: 2px;
  background: linear-gradient(to right, var(--brand-cyan), transparent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.card:hover,
.card:focus-within {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

.card__index {
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--brand-cyan);
}

.card h3 {
  margin-bottom: var(--space-2xs);
  font-size: var(--text-lg);
}

.card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Push the card's link to the bottom regardless of copy length, so a row of
   cards keeps its CTAs on one line. */
.card__link {
  margin-top: auto;
  padding-top: var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}

.card__link svg {
  width: 0.8em;
  height: 0.8em;
  transition: transform var(--dur) var(--ease-out);
}

.card:hover .card__link svg {
  transform: translateX(3px);
}

/* Makes the whole card clickable while keeping one real anchor for a11y. */
.card--linked .card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* ------------------------------------------------------------------ stats -- */

.stats {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  padding: var(--space-lg);
  background: var(--surface-1);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  color: var(--brand-cyan);
}

.stat__label {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 600;
}

.stat__note {
  display: block;
  margin-top: var(--space-3xs);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-subtle);
}

/* --------------------------------------------------------------- process --- */

/* Numbered, gated stage list — used for the Forward-Deployed Engineering
   delivery model and the innovation lifecycle. */
.stages {
  display: grid;
  gap: var(--space-md);
  counter-reset: stage;
  list-style: none;
  margin: 0;
}

@media (min-width: 60rem) {
  .stages--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Five-layer stack. Two rows on mid widths, one row on wide screens, so the
   layer sequence still reads left-to-right. */
@media (min-width: 48rem) {
  .stages--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 76rem) {
  .stages--5 {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-sm);
  }
}

.stage {
  position: relative;
  counter-increment: stage;
  padding: var(--space-md);
  padding-top: var(--space-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brand-cyan);
  border-radius: var(--radius);
}

.stage::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  top: var(--space-2xs);
  right: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: rgba(0, 204, 255, 0.22);
}

.stage h3 {
  margin-bottom: var(--space-3xs);
  font-size: var(--text-md);
}

.stage__meta {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.stage p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Checklist with cyan ticks, for capability/service lists. */
.ticks {
  display: grid;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-muted);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--brand-cyan);
  border-bottom: 2px solid var(--brand-cyan);
  rotate: -45deg;
}

.ticks strong {
  color: var(--text);
}

/* Two-column checklist for longer capability lists. */
@media (min-width: 48rem) {
  .ticks--two {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs) var(--space-xl);
  }
}

/* -------------------------------------------------------------- logo strip -- */

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-md), 3vw, var(--space-xl));
  /* Narrower than the page container so eleven marks break into two balanced
     rows instead of a full row of eight and an orphan row of three. */
  max-width: 58rem;
  margin-inline: auto;
}

/* Logos keep their original colours and sit on a light band.

   Recolouring a third-party mark to a white silhouette breaks most trademark
   usage guidelines, and it would destroy this particular set outright: Cresta is
   white type on a navy field, Wayfair is purple, Mount Kidd is a full-colour
   illustration. A light band is both the compliant and the better-looking answer.
   Marks are only scaled, never restyled. */
/* No height or width rules here on purpose. tools/prepare-assets.py normalises
   every mark to a matched optical area and bakes the result into the file, with
   the 1x dimensions declared on the element. Any max-height here would discard
   that work and make squares read smaller than wordmarks. */
.logos img {
  opacity: 0.85;
  transition: opacity var(--dur) var(--ease-out);
}

/* Below ~26rem the widest wordmarks would still overflow the gutter. */
@media (max-width: 26rem) {
  .logos img {
    max-width: 100%;
    height: auto;
  }
}

.logos img:hover {
  opacity: 1;
}

/* Light "proof" band. One bright section between dark ones reads as a receipts
   beat, and it is what lets the client marks display untouched. */
.band--paper {
  background: var(--paper);
  color: var(--paper-text);
}

.band--paper .eyebrow {
  color: var(--brand-cyan-deep);
}

.band--paper h2,
.band--paper h3 {
  color: var(--paper-text);
}

.band--paper .lede,
.band--paper p {
  color: var(--paper-muted);
}

/* ------------------------------------------------------------------- team -- */

.person {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

@media (min-width: 44rem) {
  .person {
    grid-template-columns: 12rem 1fr;
    gap: var(--space-lg);
    align-items: start;
  }
}

.person__photo {
  aspect-ratio: 1;
  width: 100%;
  max-width: 12rem;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-3);
  filter: grayscale(1) contrast(1.05);
  transition: filter var(--dur-slow) var(--ease-out);
}

.person:hover .person__photo {
  filter: grayscale(0) contrast(1);
}

.person__role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-cyan);
}

.person h3 {
  margin-block: var(--space-3xs) var(--space-3xs);
}

.person__tagline {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.person p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.person p + p {
  margin-top: var(--space-xs);
}

/* ---------------------------------------------------------- wide figure ---- */

/* The Spearstone Flow diagram is roughly 6:1. Scaled to fit a phone it would be
   about 60px tall and its labels illegible, so on narrow screens it scrolls
   horizontally at a readable size instead. */
.figure-wide {
  margin: 0;
}

.figure-wide__scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: var(--space-md) 0;
  /* Keeps the scrollbar from overlapping the artwork on macOS. */
  scrollbar-gutter: stable;
}

.figure-wide__scroll img {
  min-width: 46rem;
  width: 100%;
  height: auto;
}

.figure-wide figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--paper-muted);
}

/* Only shown when the image is actually wider than its container. */
.figure-wide__hint {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

@media (max-width: 48rem) {
  .figure-wide__hint {
    display: block;
  }
}

/* -------------------------------------------------------------- callout ---- */

.callout {
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.08), rgba(0, 204, 255, 0.01));
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-lg);
}

.callout--quote {
  border-left: 2px solid var(--brand-cyan);
}

.callout p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.callout cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* Sourced-figure footnote. Every borrowed metric carries its attribution. */
.source-note {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-subtle);
}

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

.cta {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta::before {
  content: '';
  position: absolute;
  inset: auto auto -60% 50%;
  translate: -50% 0;
  width: min(60rem, 130%);
  aspect-ratio: 2;
  background: radial-gradient(ellipse at center, rgba(0, 204, 255, 0.14), transparent 65%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: var(--z-raised);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.cta h2 {
  margin-bottom: var(--space-sm);
}

.cta p {
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
}

.cta .btn-row {
  justify-content: center;
}

/* ------------------------------------------------------------------ forms -- */

.form {
  display: grid;
  gap: var(--space-md);
}

.field {
  display: grid;
  gap: var(--space-2xs);
}

.field > label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

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

.field input:hover,
.field textarea:hover {
  border-color: var(--brand-cyan-deep);
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--brand-cyan);
  background: var(--surface-2);
  outline-offset: 1px;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

/* Invalid state is signalled by colour, an icon-free border change, and the
   error text below — never by colour alone. */
.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: var(--err);
}

.field__error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--err);
}

.field__error:empty {
  display: none;
}

/* Honeypot. Off-screen rather than display:none — some bots skip hidden
   inputs but will happily fill a positioned one. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

.form__status:empty {
  display: none;
}

.form__status[data-state='ok'] {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.form__status[data-state='error'] {
  border-color: rgba(255, 92, 92, 0.45);
  background: rgba(255, 92, 92, 0.08);
}

/* ---------------------------------------------------------- contact detail -- */

.detail {
  padding-block: var(--space-md);
  border-top: 1px solid var(--line);
}

.detail dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: var(--space-2xs);
}

.detail dd {
  margin: 0;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- footer -- */

.footer {
  padding-block: var(--space-2xl) var(--space-lg);
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
}

.footer__grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  margin-bottom: var(--space-xl);
}

.footer__brand img {
  height: 2.25rem;
  width: auto;
  margin-bottom: var(--space-sm);
}

.footer__brand p {
  max-width: 22rem;
  color: var(--text-subtle);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

.footer h2 {
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.footer ul {
  display: grid;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--brand-cyan);
}

address {
  font-style: normal;
}

.footer address {
  color: var(--text-muted);
  line-height: var(--leading-normal);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

.footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ------------------------------------------------------------- long-form --- */

/* Legal and policy pages. Light "paper" surface: long-form reading is the one
   place where the dark theme costs comprehension, and cyan is barred here by
   the contrast rule, so links use the deep variant. */
.prose {
  --flow: var(--space-sm);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--paper-muted);
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: var(--text-xl);
  color: var(--paper-text);
}

.prose h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-2xs);
  font-size: var(--text-md);
  color: var(--paper-text);
}

.prose p + p,
.prose ul,
.prose ol,
.prose table {
  margin-top: var(--space-sm);
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: var(--space-2xs);
}

.prose strong {
  color: var(--paper-text);
}

.prose a {
  color: var(--brand-cyan-deep);
  text-decoration-color: currentColor;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.prose th,
.prose td {
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--paper-line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--paper-alt);
  color: var(--paper-text);
  font-weight: 600;
}

.paper {
  background: var(--paper);
  color: var(--paper-text);
}

.paper h1 {
  color: var(--paper-text);
}

.paper .eyebrow {
  color: var(--brand-cyan-deep);
}

.paper .lede {
  color: var(--paper-muted);
}

.doc-meta {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--paper-muted);
}

/* Page header band for interior pages. */
.pagehead {
  padding-block: calc(var(--space-3xl) + 1rem) var(--band-y-tight);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 100% at 15% 0%, rgba(0, 204, 255, 0.1), transparent 70%),
    var(--surface-1);
}

.pagehead--paper {
  padding-block: calc(var(--space-3xl) + 1rem) var(--band-y-tight);
  background: var(--paper-alt);
  border-bottom: 1px solid var(--paper-line);
  color: var(--paper-text);
}

/* Without these the h1 inherits the dark-theme near-white and disappears
   against the light header. Cyan is barred on light surfaces by the contrast
   rule, so the eyebrow uses the deep variant. */
.pagehead--paper h1,
.pagehead--paper h2 {
  color: var(--paper-text);
}

.pagehead--paper .eyebrow {
  color: var(--brand-cyan-deep);
}

.pagehead--paper .lede,
.pagehead--paper p {
  color: var(--paper-muted);
}

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

.center { text-align: center; }
.center .lede,
.center .band__head { margin-inline: auto; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.measure { max-width: 46rem; }
.no-wrap { white-space: nowrap; }

/* Print: drop chrome and decoration, force ink-on-paper. */
@media print {
  .masthead,
  .footer,
  .cta,
  .skip-link,
  .hero::before,
  .hero::after {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
