/* ==========================================================================
   Black Marker — Base
   Reset, document defaults, typography primitives, layout helpers.
   ========================================================================== */

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

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

body {
  margin: 0;
  /* Ink, not paper. The sheet carries the light background and scrolls over a
     fixed footer; anything the sheet does not cover must already be dark, or a
     band of light shows between the sheet's edge and the footer. */
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  letter-spacing: var(--track-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Display type ---------------------------------------------------------
   A condensed, light cut of the serif. The reference never bolds its display
   face and neither do we: size and width do the work, not weight.        */

.display-xl, .display-l, .display-m, .display-s, .display-xs,
.stat-value, .faq-item > summary, .btn-lg {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-width);
  letter-spacing: var(--track-display);
}

/* The ramp lightens as it grows. 300 carries 48px and up; below that the
   strokes get too fine to hold, so those sizes go back to 400. */
.display-s, .display-xs, .faq-item > summary, .btn-lg {
  font-weight: var(--display-weight-s);
}


.display-xl, .display-l, .display-m, .display-s, .display-xs { text-wrap: balance; }

.display-xl { font-size: var(--display-xl); line-height: var(--leading-flat); }
.display-l  { font-size: var(--display-l);  line-height: var(--leading-flat); }
.display-m  { font-size: var(--display-m);  line-height: var(--leading-tight); }
.display-s  { font-size: var(--display-s);  line-height: var(--leading-snug); }
.display-xs { font-size: var(--display-xs); line-height: var(--leading-snug); }

/* --- Body type ----------------------------------------------------------- */

.lead {
  font-size: var(--text-lead);
  /* Not --leading-snug: that is tuned for display sizes. 20px body copy needs
     air. Matches the Body/Lead text style in Figma. */
  line-height: 1.4;
  color: var(--ink-3);
  text-wrap: pretty;
}

/* Centred lead copy reads badly as a long first line over a stub second one.
   Balancing evens the two, which is how the frame sets this block. */
.center .lead { text-wrap: balance; }

.body   { font-size: var(--text-base); line-height: var(--leading-body); }
.small  { font-size: var(--text-sm);   line-height: 1.43; }
.muted  { color: var(--ink-3); }

/* Eyebrow / kicker. Set in sans, uppercase, wide tracking. */
.caps {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

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

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

/* A real hyphen is a break opportunity, so "AI-powered" split across lines
   in the hero. This keeps hyphenated compounds whole. */
.nowrap { white-space: nowrap; }

.measure      { max-width: var(--container-text); }
.measure-wide { max-width: var(--container-display); }
.measure-mid  { max-width: var(--container-mid); }
.center  { margin-inline: auto; text-align: center; }

.section     { padding-block: var(--s-24); }
.section-lg  { padding-block: var(--s-32); }
.section-sm  { padding-block: var(--s-16); }

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

.grid { display: grid; gap: var(--grid-gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two columns is right for four items and for the six-item feature grid,
     but a row of exactly three strands the last one alone on a second row.
     Those go straight to a single column instead. */
  .grid-3.grid-trio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
