/* Critaxis — landing page
   Design tokens per PLAN.md §4. Orange is a scalpel: logomark, stat numerals,
   section indices, one hover state. Nothing else. */

:root {
  --black: #000000;
  --ink: #0a0a0a;
  --orange: #ff3407;
  --orange-dim: #b32304;
  --white: #ffffff;
  --grey-1: rgba(255, 255, 255, 0.72);
  --grey-2: rgba(255, 255, 255, 0.44);
  --line: rgba(255, 255, 255, 0.12);

  /* Drop-in point for self-hosted woff2 subsets. Until those are added the
     stack falls back to system faces, which is deliberate: no external font
     request, no privacy footnote, no render-blocking third party.
     To install: add @font-face blocks above and prepend the family names. */
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --band-pad: clamp(5rem, 12vh, 10rem);
  --maxw: 1440px;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--black);
  color: var(--grey-1);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--white); margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.link {
  color: var(--grey-1);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 160ms ease, border-color 160ms ease;
}
.link:hover { color: var(--orange); border-bottom-color: var(--orange); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--black);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

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

/* ---------- type scale ---------- */

h1, .hero__title {
  font-size: clamp(2.75rem, 7vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  max-width: 62ch;
}

.emph { color: var(--white); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.footnote {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--grey-2);
  margin-top: 1.5rem;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 64px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 240ms ease, border-color 240ms ease;
}
.nav.is-stuck {
  background: var(--black);
  border-bottom-color: var(--line);
}

.nav__inner {
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__mark, .foot__mark {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.34em;
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__dot {
  width: 5px;
  height: 5px;
  background: var(--orange);
  display: inline-block;
  flex: none;
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-1);
  text-decoration: none;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav__cta:hover { color: var(--orange); border-color: var(--orange); }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__canvas,
.hero__video,
.hero__scrim,
.hero__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__video { object-fit: cover; }

.hero__scrim {
  background:
    radial-gradient(130% 88% at 50% 44%, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.70) 74%),
    rgba(0, 0, 0, 0.20);
}

/* Scanlines + vignette. ~0 bytes, does the grade the video encode doesn't have to. */
.hero__grain {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.045) 0px,
    rgba(255,255,255,0.045) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.hero__logo img {
  width: clamp(150px, 17vw, 230px);
  margin: 1.25rem 0 1.75rem -0.25rem;
}

.hero__title {
  max-width: 18ch;
  font-size: clamp(2.35rem, 5.4vw, 5rem);
}

.hero__content .lede { margin-top: 1.5rem; }

.hero__stage {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--grey-2);
  margin-top: 1.25rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--orange-dim);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border: 1px solid var(--white);
  border-radius: 2px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ---------- bands ---------- */

.band {
  padding-block: var(--band-pad);
  border-bottom: 1px solid var(--line);
}
.band--alt { background: var(--ink); }

.band__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.band__body > * + * { margin-top: 1.25rem; }

/* Section labels carry the accent. One small orange mark per band, running
   down the left edge of the page. */
.band__eyebrow { color: var(--orange); }

.band__close {
  margin-top: 3.5rem;
  max-width: 68ch;
  color: var(--grey-1);
  border-left: 1px solid var(--orange-dim);
  padding-left: 1.25rem;
}

.emph {
  border-left: 1px solid var(--orange-dim);
  padding-left: 1.25rem;
}

@media (min-width: 900px) {
  .band__grid {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
    gap: 2rem 3rem;
  }
  .band__eyebrow { padding-top: 0.9rem; }
}

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

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 4rem;
}

@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.stat { border-top: 1px solid var(--line); padding-top: 1.5rem; }

.stat__num {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.stat__cap {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--grey-1);
  max-width: 34ch;
}

/* ---------- capability cells ---------- */

.cells {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 4rem;
  background: var(--line);
  border-block: 1px solid var(--line);
}

@media (min-width: 700px) { .cells { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .cells { grid-template-columns: repeat(3, 1fr); } }

.cell {
  background: var(--black);
  padding: 2rem 1.75rem 2.5rem;
}
.band--alt .cell { background: var(--ink); }

.cell__i {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin-bottom: 1.25rem;
}

.cell h3 { margin-bottom: 0.75rem; }
/* :not() keeps this off .cell__i — a bare `.cell p` outranks `.cell__i` on
   specificity and silently greys out the index. */
.cell p:not(.cell__i) { font-size: 0.9375rem; color: var(--grey-1); }

/* ---------- environments ---------- */

.envs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 4rem;
}

@media (min-width: 700px) { .envs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .envs { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

.env { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.env h3 { margin-bottom: 0.65rem; }
.env p { font-size: 0.9375rem; }

/* ---------- market ---------- */

.market {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 4rem;
}

@media (min-width: 760px) { .market { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

.mkt { border-top: 1px solid var(--line); padding-top: 1.5rem; }

.mkt__num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.mkt__cap { margin-top: 0.9rem; font-size: 0.9375rem; max-width: 34ch; }

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

.people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 4rem;
  background: var(--line);
  border-block: 1px solid var(--line);
}

@media (min-width: 860px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .people { grid-template-columns: repeat(3, 1fr); } }

.person {
  background: var(--ink);
  padding: 2rem 1.75rem 2.5rem;
}

.person h3 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.person__role {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-bottom: 1.25rem;
}

.person p { font-size: 0.9375rem; }

.person__edu {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-block: 1.25rem;
}

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

.foot { padding-block: clamp(3rem, 7vh, 5rem); }

.foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .foot__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
}

.foot__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-top: 0.75rem;
}

.foot__col .eyebrow { margin-bottom: 1rem; }
.foot__col li { font-size: 0.875rem; margin-bottom: 0.5rem; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--d, 0ms);
  }
  [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- error page ---------- */

.center {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
