/* ==========================================================================
   base.css — reset + typography defaults
   All spacing uses --space-* tokens from tokens.css.
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-block-size: 100vh;
  min-block-size: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

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

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

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

table {
  border-collapse: collapse;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-display);
}
/* Czech accents (ů, é, í, ř) sit above the cap height; at 1.05 they touch
   the descenders of the line above, so Czech headings get more room. */
:lang(cs) :is(h1, h2, h3) {
  line-height: 1.2;
}

h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); line-height: var(--leading-snug); }
h5 { font-size: var(--step-1); line-height: var(--leading-snug); letter-spacing: 0; }
h6 { font-size: var(--step-0); line-height: var(--leading-snug); letter-spacing: 0; }

/* ---- Body text & 62ch measure ---- */
p,
li,
dd,
blockquote,
figcaption {
  max-inline-size: var(--measure);
  text-wrap: pretty;
}

ul,
ol {
  padding-inline-start: var(--space-3);
}

small {
  font-size: var(--step--1);
}

strong,
b {
  font-weight: var(--weight-bold);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
}

blockquote {
  padding-inline-start: var(--space-3);
  border-inline-start: var(--border-strong);
}

hr {
  border: 0;
  border-block-start: var(--border-hairline);
}

/* ---- Links & focus ---- */
a {
  color: var(--color-text);
  text-decoration-line: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition:
    color var(--duration-fast) var(--ease-out),
    text-decoration-color var(--duration-fast) var(--ease-out),
    text-underline-offset var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent-ink);
  text-decoration-color: currentColor;
  text-underline-offset: 0.3em;
}

:focus-visible {
  outline: 2px solid var(--color-accent-ink);
  outline-offset: 3px;
  border-radius: var(--radius-1);
}

::selection {
  background-color: rgb(146 151 122 / 0.32); /* sage at 32% */
  color: var(--color-text);
}

/* ---- Utilities ---- */
.visually-hidden,
.sr-only {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.eyebrow {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-muted);
}

