/* base.css — reset + element defaults. Mobile-first (360px), min-width only. Tokens only. */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--wp--preset--color--paper);
  background-image: var(--page-texture);
  background-size: var(--page-texture-size);
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

main { flex: 1 0 auto; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
table { border-collapse: collapse; }

h1, h2, h3, h4 {
  font-family: var(--wp--preset--font-family--display);
  font-weight: var(--font-weight-display);
  line-height: var(--line-height-tight);
  color: var(--wp--preset--color--ink);
  text-wrap: balance;
}
h1 { font-size: var(--wp--preset--font-size--display); letter-spacing: -0.02em; }
h2 { font-size: var(--wp--preset--font-size--xl); line-height: var(--line-height-snug); }
h3 { font-size: var(--wp--preset--font-size--lg); line-height: var(--line-height-snug); }
h4 { font-size: var(--wp--preset--font-size--base); line-height: var(--line-height-snug); }

p, li, dd, figcaption { max-width: var(--measure); text-wrap: pretty; }
p { font-size: var(--wp--preset--font-size--base); }
small { font-size: var(--wp--preset--font-size--sm); }

a {
  color: var(--wp--preset--color--accent-ink);
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--wp--preset--color--ink); }

.label {
  font-size: var(--wp--preset--font-size--sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--wp--preset--color--ink-3);
}

.num { font-variant-numeric: tabular-nums; }

:focus { outline: none; }
:focus-visible {
  outline: var(--focus-width) solid var(--wp--preset--color--accent);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-pill);
}

.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;
}

html.is-scroll-locked, html.is-scroll-locked body { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a { transition: color var(--dur) var(--ease); }
}
