/* Reset, fonty, typografia bazowa, dostępność (focus, ruch, cele dotykowe). */

/* --- Fonty samohostowane (self-hosted) — bez CDN, bez wycieku IP --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.1ad231aac0a8.woff2") format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-latin.260c81a4759b.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, 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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-latin-ext.acc46a2a7785.woff2") format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-latin.c47ff12887a3.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-italic-latin-ext.85778007deb5.woff2") format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-italic-latin.8e2daeb2e7cb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--c-ink);
  background: var(--c-canvas);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--c-ink);
}

/* --- Focus visibile — widoczny WSZĘDZIE, spełnia 2.4.7 / 2.4.11 --- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* Na ciemnych/kolorowych tłach obrys musi zostać widoczny (kontrast ≥3:1) */
.on-dark :focus-visible,
.btn--primary:focus-visible,
.btn--dark:focus-visible {
  outline-color: var(--c-focus-contrast);
  box-shadow: 0 0 0 3px var(--c-focus);
}

/* --- Link „Przejdź do treści" (2.4.1) --- */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  transform: translateY(-150%);
  background: var(--c-ink);
  color: var(--c-canvas);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: transform var(--duration-fast) var(--ease-out);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* --- Cele dotykowe ≥24px (2.5.8); komfortowo celujemy w --tap-min --- */
a, button, [role="button"], summary {
  min-height: 24px;
}

/* --- Ruch: uszanuj prefers-reduced-motion (2.3.3 AAA) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Kontrast wymuszony systemowo (Windows High Contrast itp.) --- */
@media (prefers-contrast: more) {
  :root {
    --c-ink-muted: var(--c-ink);
    --c-border: var(--c-ink);
  }
}

/* --- Scrollbar (dekoracja, nie treść — offset od tokenów akcentu) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-surface); }
::-webkit-scrollbar-thumb { background: var(--c-border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-accent-strong); }

/* --- Zaznaczenie tekstu --- */
::selection { background: var(--c-accent-strong); color: #fff; }

/* --- Alpine: ukryj przed inicjalizacją, żeby nie migało nieostylowane --- */
[x-cloak] { display: none !important; }
