/* ============================================================
   Base — reset, document defaults, typography, utilities.
   ============================================================ */

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

/* The `hidden` attribute must win. A component's own `display:` (e.g. flex/grid)
   is author CSS and would otherwise override the UA's [hidden]{display:none},
   leaving "hidden" elements visible as empty boxes. */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font-text);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul[role="list"] { list-style: none; padding: 0; }

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

/* ---- Headings / display ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug); letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
p  { color: var(--ink-2); }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-900);
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-300);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px; background: var(--accent-strong); border-radius: 2px;
}

.lede { font-size: var(--fs-500); color: var(--ink-2); max-width: 56ch; }
/* .lede is max-width-capped, so inside a centred block it must centre its own box
   too — otherwise the box sits flush left and the text reads visibly off-centre
   against the heading above it. */
.center .lede { margin-inline: auto; }

/* ---- Layout helpers ---- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--sp-9); }
.section-sm { padding-block: var(--sp-7); }
.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.accent-text { color: var(--accent-deep); }

.grid { display: grid; gap: var(--sp-5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.flow-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.skip-link {
  position: absolute; left: var(--sp-4); top: -120%;
  background: var(--ink); color: #fff; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm); z-index: 200; transition: top var(--dur);
}
.skip-link:focus { top: var(--sp-4); }

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }


/* Present for screen readers and search engines, absent visually.
   Used for the catalog's <h1>: the heading was cut from the design, but a page
   with no h1 at all loses a real ranking signal and leaves screen-reader users
   without a page title to land on. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
