/* =====================================================================
   BASE — reset, style bazowe elementów i layout.
   Wyłącznie tokeny z warstwy semantic/primitives (żadnych literałów koloru
   ani fontu). Komponenty (przyciski, karty) wchodzą w osobnym kroku.
   ===================================================================== */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light dark; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:target { scroll-margin-top: var(--space-2400); }

/* ---- BASE ELEMENTY ---- */
body {
  font-family: var(--font-sans);
  font-size: var(--scale-03);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  color: var(--text-default);
  background: var(--bg-default);
}

h1, h2, h3, h4, h5, h6 { font-weight: var(--weight-semibold); line-height: 1.2; }

a {
  color: var(--text-brand);
  text-decoration: none;
  transition: color var(--transition, .2s ease);
}
a:hover { color: var(--text-brand-secondary); text-decoration: underline; }

strong, b { font-weight: var(--weight-semibold); }
small { font-size: var(--scale-02); }

::selection { background: var(--bg-brand-secondary); color: var(--text-on-brand); }

/* utility */
.muted { color: var(--text-secondary); }

/* strona 404 */
.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-600); text-align: center; padding-block: clamp(var(--space-1600), 6vw, var(--space-2400)); }
.not-found__logo { height: 36px; width: auto; }
.not-found__code { font-family: var(--font-serif); font-size: clamp(var(--scale-08), 8vw, var(--scale-10)); font-weight: var(--weight-bold); color: var(--text-brand); line-height: 1; margin: 0; }
.not-found__desc { max-width: 48ch; }

/* ---- FOCUS (a11y) ---- */
:focus-visible {
  outline: var(--stroke-focus-ring) solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-100);
}

/* skip-link do treści */
.skip-link {
  position: absolute;
  left: var(--space-400);
  top: var(--space-negative-400);
  transform: translateY(-150%);
  z-index: 1000;
  padding: var(--space-200) var(--space-400);
  background: var(--bg-brand);
  color: var(--text-on-brand);
  border-radius: var(--radius-200);
  font-size: var(--scale-02);
  font-weight: var(--weight-medium);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); text-decoration: none; }

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: var(--bp-desktop);
  margin-inline: auto;
  padding-inline: clamp(var(--space-400), 5vw, var(--space-800));
}

.section {
  padding-block: clamp(var(--space-1600), 8vw, var(--space-2400));
}
.section + .section { padding-top: 0; }

/* nagłówek sekcji (wyśrodkowany blok tytułowy) */
.section-head {
  max-width: 64ch;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-1200), 5vw, var(--space-1600));
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-400);
}

/* ---- RUCH ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
