/* ============================================================================
   ZÁKLAD — reset, typografie, pomocné třídy, odhalování obsahu
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  font: 400 1rem/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body[data-scroll-lock] { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
address { font-style: normal; }
[hidden] { display: none !important; }

::selection { background: var(--accent); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -- Nadpisy a text -------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -.045em; }
h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.04em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.025em; }

/* Dvoubarevný nadpis: druhá část je šedá (viz funkce duo() v helpers.php). */
h1 .dim, h2 .dim, .statement .dim { color: var(--faint); }

p { text-wrap: pretty; }
strong, b { font-weight: 600; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-2);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  flex: none;
  width: .5rem;
  height: .5rem;
  border-radius: 3px;
  background: currentColor;
}

.note { font-size: .875rem; color: var(--muted); }
.muted { color: var(--muted); }

.prose > * + * { margin-top: 1.375rem; }
.prose p { font-size: var(--fs-lead); line-height: 1.7; color: var(--ink-2); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }

/* -- Ikony ----------------------------------------------------------------- */

.icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.logo {
  flex: none;
  width: auto;
  height: var(--logo-size, 1.625rem);
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: var(--logo-weight, 22px);
  stroke-linejoin: round;
}

/* -- Pomocné třídy --------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

.anchor { display: block; height: 0; scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Past na roboty ve formuláři — člověk ji nikdy neuvidí. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -- Odhalování obsahu při posouvání --------------------------------------
   Obsah je schovaný jen tehdy, když běží JavaScript, který ho umí odhalit
   (html nemá třídu .no-js). Bez skriptu je všechno vidět hned. */

[data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
[data-reveal].is-visible,
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
