/* ============================================================
   HAJLAJTY — styles/base.css
   ------------------------------------------------------------
   RESET + baza typograficzna + globalne prymitywy (kontener,
   focus, flagi). ZERO reguł komponentów i ZERO layoutu stron.
============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background var(--t-med), color var(--t-med);
}

img, svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input { font: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

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

/* ---- KONTENER (spójna szerokość treści) ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- FLAGI: płaskie SVG (flagcdn) — identyczne na każdym OS ----
   Prymityw globalny: komponenty kart jedynie skalują wysokość
   przez lokalną zmienną (--card-flag-h itp.). */
.country-flag {
  flex: 0 0 auto;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.22);
  object-fit: cover;
  -webkit-user-select: none;
  user-select: none;
}

/* ---- UTILITY: ukrycie przez filtr (stan globalny strony) ---- */
.is-hidden-by-filter { display: none !important; }

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