/* ==========================================================================
   ATLETIKA — Reset
   Minimal, opinionated. Normalises the things that actually bite.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

body {
  min-height: 100svh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Images: block-level and never overflow. width/height attributes are
   required in markup so the browser can reserve space — this rule keeps
   them responsive without reintroducing layout shift.                      */
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

/* Inputs do not inherit type by default. Fix that once, here. */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
textarea { resize: vertical; }

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

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

fieldset { border: 0; min-width: 0; }
legend { padding: 0; }

/* Single focus definition for the whole site. Never remove without
   replacing — WCAG 2.2 SC 2.4.11 (Focus Appearance) depends on it.        */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-w) solid var(--c-focus);
  outline-offset: var(--focus-offset);
}
/* Inverse surfaces need a light ring to stay visible. */
.is-inverse :focus-visible,
[data-theme="inverse"] :focus-visible {
  outline-color: var(--c-on-inverse);
}

[hidden] { display: none !important; }

::selection { background: var(--c-ink); color: var(--c-on-inverse); }

/* Screen-reader-only, but focusable when it needs to be (skip links). */
.u-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.u-visually-hidden:focus-visible {
  position: fixed;
  top: var(--s-2); left: var(--s-2);
  width: auto; height: auto;
  padding: var(--s-3) var(--s-4);
  clip-path: none;
  background: var(--c-ink);
  color: var(--c-on-inverse);
  z-index: var(--z-toast);
}
