/* =============================================================
   A modern CSS reset — based on Andy Bell's "A more modern CSS reset"
   https://piccalil.li/blog/a-more-modern-css-reset/
   Doplněno o a11y patterns: prefers-reduced-motion, :focus-visible.
   Pořadí v cascade: modern-normalize → reset.css → app.css
   ============================================================= */

/* Box sizing — modern-normalize box-sizing pravidlo doplňujeme i pro pseudo-elementy */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation on iOS landscape */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Vyhladit margins — explicitní typografická kontrola v app.css */
body,
h1, h2, h3, h4, h5, h6,
p,
figure, blockquote,
dl, dd {
  margin: 0;
}

/* Seznamy s ARIA role="list" — vypnout výchozí styling */
ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

/* Body baseline */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Kratší line-height u nadpisů a interaktivních prvků */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping na nadpisech (zabrání orphans) */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* Lepší zalomení v paragrafech (zabrání orphan slovu) */
p {
  text-wrap: pretty;
}

/* Odkazy bez třídy zdědí barvu textu */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Obrázky responzivní by default */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
}

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

/* Textarea bez explicitního rows */
textarea:not([rows]) {
  min-height: 10em;
}

/* Scroll-margin pro ukotvené prvky (lepší než scroll-padding na html) */
:target {
  scroll-margin-block: 5ex;
}

/* =============================================================
   A11y patterns
   ============================================================= */

/* Respekt k prefers-reduced-motion — WCAG 2.2 success criterion 2.3.3 */
@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;
  }
}

/* Focus-visible — viditelný outline jen pro klávesnici, ne pro myš
   (konkrétní outline styl řeší app.css v souladu s navy/gold paletou) */
:focus:not(:focus-visible) {
  outline: none;
}

/* Visually hidden — pro screen-reader-only obsah */
.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
