/* Fragmentum: baza. Kroje, reset, typografia, fokus, odnośniki, ograniczony ruch. */

/* Kroje lokalne (podzbiór z polskimi znakami), bez żądań do obcych serwerów. */
@font-face {
  font-family: "Poltawski Nowy";
  src: url(kroje/poltawski-nowy.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poltawski Nowy";
  src: url(kroje/poltawski-nowy-kursywa.woff2) format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url(kroje/archivo.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
/* Metryki zastępcze: krój systemowy dopasowany do szerokości i wysokości wiersza docelowego,
   żeby układ nie skakał po wczytaniu. Wartości zmierzone w przeglądarce (canvas measureText); antykwa dopasowana do nagłówków 600, zastępnik to Georgia pogrubiona. */
@font-face {
  font-family: "Poltawski Nowy zastępczy";
  src: local("Georgia");
  size-adjust: 89%;
  ascent-override: 112%;
  descent-override: 34%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo zastępczy";
  src: local("Arial");
  size-adjust: 98.5%;
  ascent-override: 89%;
  descent-override: 21%;
  line-gap-override: 0%;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--kolor-tlo);
  color: var(--kolor-tekst);
  font: 400 var(--t-tekst) / var(--t-interlinia-tekst) var(--kroj-narzedzie);
  font-stretch: 100%;
  scroll-padding-top: var(--o-6);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--kolor-tlo);
  overflow-x: clip;
}
[data-motyw] { color: var(--kolor-tekst); }
body [data-motyw] { background: var(--kolor-tlo); }
img, svg, canvas, video { display: block; max-width: 100%; }
svg:not([fill]) { fill: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:where(ul, ol)[class] { list-style: none; margin: 0; padding: 0; }
:where(h1, h2, h3, h4, p, figure, blockquote, dl, dd) { margin: 0; }
[hidden] { display: none !important; }

/* Typografia: antykwa to głos, Archivo to narzędzie */
:where(h1, h2, h3, h4) {
  font-family: var(--kroj-glos);
  font-weight: 600;
  line-height: var(--t-interlinia-naglowek);
  text-wrap: balance;
}
h1 { font-size: var(--t-pokaz); line-height: .92; letter-spacing: -.022em; }
h2 { font-size: var(--t-h2); line-height: .98; letter-spacing: -.016em; }
h3 { font-size: var(--t-h4); line-height: 1.1; letter-spacing: -.005em; }
h4 { font-size: var(--t-h4); line-height: 1.1; }
p, li, dd { text-wrap: pretty; }
small { font-size: var(--t-maly); }
strong { font-weight: 600; }
em { font-family: var(--kroj-glos); font-style: italic; font-size: 1.06em; }

/* Odnośniki w tekście: podkreślone zawsze, nie samym kolorem */
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
:where(p, li, dd, td) a:not([class]) {
  text-decoration-color: var(--kolor-linia-2);
  transition: text-decoration-color var(--r-krotki);
}
@media (hover: hover) and (pointer: fine) {
  :where(p, li, dd, td) a:not([class]):hover { text-decoration-color: currentColor; }
}

/* Fokus: 2 px w barwie akcentu z odstępem 2 px */
:focus-visible {
  outline: 2px solid var(--kolor-fokus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Zaznaczenie tekstu w barwie światła stołu */
::selection { background: var(--kolor-akcent); color: var(--kolor-na-akcencie); }

/* Pomocnicze */
.tylko-czytnik {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.przeskok {
  position: absolute;
  z-index: 20;
  left: var(--o-4);
  top: var(--o-4);
  translate: 0 -200%;
  padding: var(--o-3) var(--o-4);
  border-radius: var(--p-przycisk);
  background: var(--kolor-akcent);
  color: var(--kolor-na-akcencie);
  font-weight: 600;
  text-decoration: none;
}
.przeskok:focus { translate: 0 0; }

/* Ograniczony ruch: przejścia natychmiastowe, informacja zostaje */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* Zestaw symboli SVG (znaczki płacht, ikony) wstawiony raz na stronie */
.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }
