/* Základ: písmo, reset, typografia, prístupnosť. Hodnoty len z tokens.css. */

/* Archivo (OFL) – variabilné písmo, latin + latin-ext (slovenská diakritika). Licencia: /fonts/LICENSES.md */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 700;   /* zúžené písmo – project/build-tools/fonts.py */
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 400 700;   /* zúžené písmo – project/build-tools/fonts.py */
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-s)); /* kotvy nezakryje lepkavá hlavička */
}

body {
  margin: 0;
  min-height: 100vh;               /* krátke stránky: pätička dole, bez bieleho pásu pod ňou */
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-stretch: var(--font-stretch-heading);
  line-height: var(--line-height-heading);
  color: var(--color-heading);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p, ul, ol, dl, dd, address, blockquote, figure { margin: 0; }
p, li { max-width: var(--measure); text-wrap: pretty; }
address { font-style: normal; }
strong, b { font-weight: var(--font-weight-medium); }

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

a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--color-action-hover); text-decoration-thickness: 2px; }

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

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.lead { font-size: var(--step-1); line-height: 1.45; }
.muted { color: var(--color-text-muted); font-size: var(--step--1); }

/* Vertikálny rytmus */
.flow > * + * { margin-top: var(--flow-space, var(--space-s)); }
.flow > h2 { --flow-space: var(--space-xl); }          /* nadpis bližšie k svojmu textu než k predchádzajúcemu */
.flow > h2 + * { --flow-space: var(--space-xs); }

/* Prístupnosť */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100%;
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--color-surface);
  color: var(--color-text);
}
.skip-link:focus { top: var(--space-s); }

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