/* =========================================================================
   ZÁKLAD — reset, typografie, přístupnost
   ========================================================================= */

/* ---------- PÍSMO -------------------------------------------------------
   Inter variable, self-hostovaný. Žádné Google Fonts (GDPR + latence).
   unicode-range zajistí, že se latin-ext stáhne jen kvůli diakritice. */
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  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;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-sm));
  -moz-tab-size: 2;
  tab-size: 2;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-normal);
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Musí přebít display: grid/flex na komponentách, které skrýváme atributem. */
[hidden] { display: none !important; }

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

img { background-color: var(--bg-sunken); }

/* <picture> je mezičlánek mezi kontejnerem a <img>. Bez tohoto pravidla
   se height: 100 % na obrázku nemá o co opřít a fotka nevyplní dlaždici. */
.hero__media picture,
.card__media picture,
.zigzag__media picture,
.gallery__btn picture { display: block; width: 100%; height: 100%; }

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

button { background: none; border: none; padding: 0; cursor: pointer; }

/* Dělení slov vypnuto — u českých textů rozbíjelo nadpisy (-webkit- kvůli Safari) */
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; -webkit-hyphens: none; hyphens: none; }

ul, ol { padding: 0; list-style: none; }

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

/* iOS Safari: zabránit automatickému zvětšení při focusu na input */
@supports (-webkit-touch-callout: none) {
  input, select, textarea { font-size: max(16px, 1rem); }
}

/* ---------- TYPOGRAFIE -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
}

h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
}

h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: var(--fw-semi); }
h5, h6 { font-size: var(--fs-md); font-weight: var(--fw-semi); }

p { text-wrap: pretty; }

strong, b { font-weight: var(--fw-semi); color: var(--text-strong); }

small { font-size: var(--fs-sm); }

/* ---------- ODKAZY ------------------------------------------------------ */
a {
  color: var(--c-turf-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-fast) var(--ease),
              text-decoration-color var(--t-fast) var(--ease);
}

a:hover { color: var(--c-clay-700); }

/* ---------- FOKUS -------------------------------------------------------
   Viditelný na světlém i tmavém podkladu, nikdy neschovávat. */
:focus-visible {
  outline: var(--focus-w) solid var(--focus-color);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-xs);
}

.on-dark :focus-visible,
[data-theme="dark"] :focus-visible { outline-color: var(--c-turf-300); }

:focus:not(:focus-visible) { outline: none; }

/* ---------- PŘÍSTUPNOST -------------------------------------------------- */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: var(--gutter);
  z-index: var(--z-skip);
  transform: translateY(-120%);
  padding: var(--sp-xs) var(--sp-md);
  background: var(--c-turf-800);
  color: var(--c-white);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform var(--t-base) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--c-white);
}

/* Vysoký kontrast v systému */
@media (prefers-contrast: more) {
  :root {
    --text-body: var(--c-ink);
    --border: var(--c-ink-mute);
  }
}

/* ---------- VÝBĚR TEXTU -------------------------------------------------- */
::selection {
  background-color: var(--c-turf-800);
  color: var(--c-white);
}

/* ---------- TISK --------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cta-band, .gallery__filter,
  .lightbox, .form, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .section { padding-block: 1rem; }
}
