/* =========================================================================
   Design Warehouse — base.css
   Reset, typographic baseline, global chrome, accessibility defaults.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd, ol, ul, fieldset, legend {
  margin: 0;
  padding: 0;
}

ol[class], ul[class] { list-style: none; }

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

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

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

/* `hidden` is how the UI says "not now" — the clear buttons, the detail
   overlay, the mobile filter toggle. Author rules such as
   `.btn { display: inline-flex }` outrank the user-agent `[hidden]` rule, so
   restate it once here with enough weight to win, and let every component stop
   carrying its own `[hidden]` override. */
[hidden] { display: none !important; }

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

table { border-collapse: collapse; width: 100%; }

/* ----------------------------------------------------------------
   DOCUMENT
   ---------------------------------------------------------------- */
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  overflow-x: hidden;
  min-height: 100%;
}

/* While the curtain is down, don't let the page scroll underneath. */
body.is-loading { overflow: hidden; }

::selection {
  background: var(--clay);
  color: var(--paper);
}

/* Thin, dark-appropriate scrollbar (Chromium + Firefox). */
* { scrollbar-width: thin; scrollbar-color: rgba(243,240,234,.22) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(243,240,234,.20);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(243,240,234,.34); background-clip: content-box; }

/* ----------------------------------------------------------------
   TYPOGRAPHY
   ---------------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

h1, .display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-head);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-head);
}

h4 {
  font-size: var(--fs-h4);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

em, .italic { font-style: italic; }

p { text-wrap: pretty; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  letter-spacing: -0.005em;
}

strong, b { font-weight: 500; }

/* Numerals that don't jitter when counting. */
.num, .counter, time, .stat__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ----------------------------------------------------------------
   UTILITY PRIMITIVES
   ---------------------------------------------------------------- */

/* Small uppercase archive-style label. */
.eyebrow,
.meta {
  font-family: var(--font-text);
  font-size: var(--fs-meta);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--accent { color: var(--accent-text); }
.eyebrow--brass  { color: var(--brass); }

.meta--tight { letter-spacing: 0.10em; }

.muted { color: var(--muted); }

.text-clay { color: var(--accent-text); }
.text-brass { color: var(--brass); }

/* Hairline. */
.rule {
  border: 0;
  border-top: 1px solid var(--hair);
  height: 0;
  width: 100%;
}

.measure     { max-width: 62ch; }
.measure--sm { max-width: 46ch; }
.measure--xs { max-width: 34ch; }

/* ----------------------------------------------------------------
   CONTAINER
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-left: var(--pad-left);
  padding-right: var(--gutter);
}

.container--narrow { max-width: 1120px; }

/* ----------------------------------------------------------------
   SECTION CHROME
   ---------------------------------------------------------------- */
.section {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-y);
}

.section--flush { padding-block: 0; }
.section--tight { padding-block: clamp(56px, 8vh, 120px); }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--hair);
  margin-bottom: var(--s-9);
}

/* Shrinkable, because these labels are long enough to overflow a 390px
   viewport if the flex base stays at auto. */
.section__head .eyebrow { flex: 0 1 auto; min-width: 0; }

@media (max-width: 700px) {
  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
  }
}

/* ----------------------------------------------------------------
   FOCUS + SKIP LINK
   ---------------------------------------------------------------- */
:focus { outline: none; }

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

.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: var(--z-skip);
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease-out-quart);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ----------------------------------------------------------------
   SURFACE GRAIN — a whisper of texture on dark panels only.
   ---------------------------------------------------------------- */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------
   VISUALLY HIDDEN (still announced)
   ---------------------------------------------------------------- */
.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;
}

/* ----------------------------------------------------------------
   GLOBAL REDUCED-MOTION BASELINE
   Component-level overrides live in motion.css; this is the safety net.
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
