/* ==========================================================================
   Base + layout primitives
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

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

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

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

/* --- skip link ------------------------------------------------------------ */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-size: var(--t-meta);
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* --- typography roles ----------------------------------------------------- */
/* Section labels: Poppins Bold, caps, +30% tracking — the guide's own spec.
   Not red: the guide reserves Scan Red for data, and a label is not data. */
.eyebrow {
  font-family: var(--font-label);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.eyebrow--accent { color: var(--ink); }

.stamp {
  font-family: var(--font-label);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Sentence case, not caps. The guide sets its H1 as "Precise reads, clinical
   clarity." — Poppins ExtraBold at −2% tracking, with the sentence intact. */
.h-hero, .h-display, .h-title, .h-section, .h-card, .h-sub {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--track-display);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.h-hero    { font-size: var(--t-hero);    line-height: 1.02; }
.h-display { font-size: var(--t-display); line-height: 1.05; }
.h-title   { font-size: var(--t-title);   line-height: 1.08; }
.h-section { font-size: var(--t-section); line-height: 1.1; }
.h-card    { font-size: var(--t-card);    line-height: 1.2;  letter-spacing: -.015em; }
.h-sub     { font-size: var(--t-sub);     line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

.lead { font-size: var(--t-lead); line-height: 1.6;  color: var(--ink-body); margin: 0; }
.copy { font-size: var(--t-body); line-height: 1.6;  color: var(--ink-body); margin: 0; }
.fine { font-size: var(--t-fine); line-height: 1.55; color: var(--ink-muted); margin: 0; }

.measure    { max-width: 30rem; }
.measure-lg { max-width: 35rem; }

/* --- page shell ----------------------------------------------------------- */
.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: var(--band);
  border-top: 1px solid var(--line);
}
.band--flush   { border-top: 0; }
.band--wash    { background: var(--wash); }

.band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 3vw, 44px);
}

/* --- generic responsive grids --------------------------------------------- */
.grid       { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--3    { grid-template-columns: repeat(3, 1fr); }
.grid--2    { grid-template-columns: repeat(2, 1fr); }
.grid--split{ grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 4.5vw, 64px); align-items: center; }

@media (max-width: 1000px) {
  .grid--3     { grid-template-columns: 1fr 1fr; }
  .grid--split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* Route view fades in — the shell around it never re-renders. */
.view { animation: view-in var(--dur) var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Spacing floors
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  /* Anything a finger has to hit gets a 44px box, which is the smallest target
     most people can hit reliably on the first try. */
  .btn, .pill--block, .cycle__option, .faq__q, .site-nav a {
    min-height: 44px;
  }
  .pill { min-height: 38px; }
  .band-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
  .h-hero { letter-spacing: -.02em; }
}


