/* UNI-M — base styles: reset, typography, layout primitives. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-weight: 500;
  line-height: var(--lh-head);
  letter-spacing: var(--track-head);
  color: var(--text);
  text-wrap: balance;
}

.display { font-size: var(--step-5); line-height: var(--lh-tight); font-weight: 500; letter-spacing: -0.03em; }
h1, .h1 { font-size: var(--step-4); line-height: var(--lh-tight); letter-spacing: -0.028em; }
h2, .h2 { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-2); font-weight: 500; }
h4, .h4 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }

p { max-width: var(--measure); text-wrap: pretty; }
strong, b { font-weight: 600; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text);
  max-width: 36rem;
}

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

/* Labels: Archivo wide caps. Always paired with the dash. */
.label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-stretch: var(--wider);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--text);
}

.label::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 0.375rem;      /* 4:1, the proportion of the dash in the logo */
  background: var(--ink);
}

.label--plain::before { content: none; }

.meta {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.num {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums lining-nums;
}

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }

::selection { background: var(--navy); color: var(--white); }

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section) 0; }
.section:last-child { padding-bottom: var(--section); }
.section--tight { padding-top: calc(var(--section) * 0.6); }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--block-gap);
}

/* Standard section head: label in the left 4 columns, heading and intro in the right 8 */
.section-head { margin-bottom: var(--block-gap); }
.section-head > .label { grid-column: 1 / span 4; align-self: start; padding-top: 0.6em; }
.section-head > .section-head__body { grid-column: 5 / -1; display: grid; gap: var(--s-5); }

.stack > * + * { margin-top: var(--s-5); }
.stack-sm > * + * { margin-top: var(--s-3); }

.visually-hidden {
  position: absolute !important;
  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: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

/* Entrance motion: gentle fade and lift. Only runs when JS is on and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="2"] { transition-delay: 90ms; }
  .js [data-reveal="3"] { transition-delay: 180ms; }
}
