/*
 * Base CSS — kumberova.com
 * Reset, fonty (self-host woff2 subsety + fallback metric override), typografie,
 * a11y (A1 focus-visible, A2 scroll-padding, A4 skip link util, A6 reduced motion).
 */

/* ---------- Fonty (SPEC-TechSpec § 7) ---------- */
/* Subsety latin + latin-ext, pyftsubset (kern,liga, no-hinting). Serif 600 = rezerva,
   NENÍ zapojen (nenačítá se, nepočítá se do budgetu). */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-600.woff2') format('woff2');
}

/* Fallback metric override proti CLS (P-E) — hodnoty spočítané fonttools
   (capsize vážený průměr šířek, hhea metriky webfontů, 2026-07-02). */
@font-face {
  font-family: 'Source Serif 4 Fallback';
  src: local('Georgia');
  size-adjust: 101.61%;
  ascent-override: 101.96%;
  descent-override: 32.97%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Source Sans 3 Fallback';
  src: local('Arial');
  size-adjust: 94.22%;
  ascent-override: 106.14%;
  descent-override: 34.6%;
  line-gap-override: 0%;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  /* A2: sticky header (64 px) nesmí zakrýt cíl anchoru #kontakt */
  scroll-padding-top: 72px;
  scroll-behavior: smooth;
}

/* A2: na mobilu nesmí MobileStickyCTA zakrýt focusovaný prvek/cíl scrollu */
@media (max-width: 959px) {
  html {
    scroll-padding-bottom: 88px;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-navy);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Typografie ---------- */
h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

p,
li {
  overflow-wrap: break-word;
}

a {
  /* Podtržení jen odkazy (brand manuál) — barvy per podklad řeší komponenty */
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

ul {
  padding-inline-start: 1.25em;
}

/* ---------- A11y ---------- */
/* A1: focus ring — navy na světlém podkladu (15,25:1 / 13,67:1) */
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

/* Na navy podkladu bílý ring (15,79:1) — nastavují komponenty s tmavým bg */
.on-navy :focus-visible {
  outline-color: var(--color-white);
}

/* A4: skip link / obecný visually-hidden util */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* A6: reduced motion — jediné animace na webu jsou fade/hover transitions 150 ms */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Full-width prose stacks inside w-full sections (DESIGN §3.4) */
.copy-stack {
  display: grid;
  gap: var(--space-4);
  width: 100%;
}

.copy-stack p {
  margin: 0;
}
