/* ==========================================================================
   Base - reset, document defaults, type scale
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Offset for the fixed header when jumping to an in-page anchor: its height
     (~74px), minus a hair so the section's top edge tucks under the header
     and the section above shows no sliver. */
  scroll-padding-top: 4.55rem;
}

body {
  background-color: var(--base);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Ambient blooms are wider than the viewport by design; without this they
     create a horizontal scrollbar on small screens. */
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* WCAG 2.2 focus appearance: >=2px perimeter, 3:1 state contrast.
   Cyan on ink is 7.15:1, comfortably clear of the bar. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* On light bands cyan drops to 2.62:1 - swap to brand blue at 5.77:1. */
.band-light :focus-visible {
  outline-color: var(--brand);
}

::selection {
  background: var(--brand);
  color: #fff;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--wdth-heading);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Numerals are mono everywhere - the differentiating move from the brand doc.
   Every competitor sets metrics in their body grotesk; nobody uses mono
   systematically. */
data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---- Screen-reader only, and the skip link ---- */
.sr-only {
  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: -9999px;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--elevated);
  color: var(--fg);
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Type scale. Desktop targets from the brand doc, fluid down to mobile.
   ========================================================================== */

.t-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--wdth-display);
  /* 34 -> 52px. Measured, not guessed: at 58px the phrase "live in 4
     minutes" renders 532px against a 487px column, so it broke apart and the
     headline ran to four lines. 52px brings it to 477px and it holds. */
  font-size: clamp(2.125rem, 1.25rem + 3.5vw, 3.25rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  /* Evens out line lengths so the headline never strands a lone short word. */
  text-wrap: balance;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--wdth-heading);
  font-size: clamp(1.625rem, 1.15rem + 2.1vw, 2.5rem); /* 26 -> 40px */
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.t-h3 {
  font-family: var(--font-display);
  /* 700 not 900 - at card size the heaviest weight closes up the counters and
     reads as a solid block. */
  font-weight: 700;
  font-stretch: var(--wdth-sub);
  font-size: clamp(1.1875rem, 1.05rem + 0.65vw, 1.5rem); /* 19 -> 24px */
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.t-body-l {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); /* 17 -> 20px */
  line-height: 1.65;
}

/* Stat VALUES are the display face; stat LABELS stay mono. That split is the
   new spec, and it reverses the brand doc rule of setting every number in
   mono - flagged rather than silently applied. */
.t-metric {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--wdth-sub);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.375rem); /* 32 -> 54px */
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  display: block;
}

.t-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem; /* 12px */
  line-height: 1;
  /* 0.12em not 0.14em - IBM Plex Mono sets wider than JetBrains Mono did, so
     the old tracking pushed eyebrow labels past their container. */
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grad-text {
  background-image: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
