/* base.css — page ground, type scale, layout wrappers, skip link, focus ring. */

:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
}

/* ---- Type scale: display / body / HUD / numerals ---- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--text);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  font-size: var(--size-display);
  line-height: var(--leading-display);
  letter-spacing: -0.01em;
}

/* Heading steps hang off the display ramp: h2 tops out at the display minimum (2.25rem),
   h3 is one step under it. No separate scale. */
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

p + p {
  margin-block-start: 1em;
}

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

a:hover {
  color: var(--text);
  text-decoration-color: var(--accent-2);
}

strong,
b {
  font-weight: 600;
}

code,
kbd,
samp,
pre,
time,
.num {
  font-family: var(--font-num);
  font-size: var(--size-num);
  font-variant-numeric: tabular-nums;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
}

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

/* The .eyebrow HUD label is a component; see components.css. */

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

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}

/* ---- Skip link: off-screen until focused ---- */

.skip {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  display: inline-block;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* ---- Focus ring ---- */

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

/* main is a skip target, not an interactive control: no ring when it receives focus. */
main:focus {
  outline: none;
}
