/* ============================================================================
   reset.css — Moderní reset (Andy Bell 2023 style)
   ============================================================================ */

/* Box sizing přes celý strom */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Nulování vnějšího odsazení pro textové elementy */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

/* Seznamy bez role=list */
ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

/* Rolování v anchors smooth (user-respecting) */
html:focus-within {
  scroll-behavior: smooth;
}

/* Vždy rezervovat prostor pro vertikální scrollbar.
   Bez toho se stránky s krátkým obsahem (žádný scrollbar) zobrazí o ~17 px
   širší než dlouhé stránky → při přepnutí navigace „skočí" horizontálně.
   `scrollbar-gutter: stable` rezervuje prostor i když scrollbar není potřeba. */
html {
  scrollbar-gutter: stable;
}

/* Základ body */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* Média: responzivní */
img, picture, video, canvas, svg {
  max-width: 100%;
  display: block;
}

/* Formy: dědí typografii */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Dlouhá slova nerozbíjejí layout */
p, h1, h2, h3, h4 {
  overflow-wrap: break-word;
}

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