/* ==========================================================================
   Reset — opinionated, minimal
   ========================================================================== */

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

* { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--wt-light);
  line-height: var(--lh-body);
  letter-spacing: var(--track-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img { height: auto; }

input,
button,
textarea,
select {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

h1, h2, h3, h4 {
  font-weight: var(--wt-normal);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

/* Focus: never remove it, only replace it. Rouge on light, blush on dark —
   both resolved through --focus so .on-ink scopes flip automatically. */
:focus { outline: none; }

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

::selection {
  background: var(--rouge);
  color: var(--ivory);
}

/* Skip link — first tab stop on every page */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: calc(var(--z-loader) + 1);
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--ivory);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }
