/* ==========================================================================
   base.css — reset, tokeny projektu, typografia, dostępność
   Pomoc Drogowa 24h Chełmno
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   2. Tokeny projektu
   -------------------------------------------------------------------------- */
:root {
  /* kolory — marka */
  --clr-accent: #FDB913;              /* żółty z logo */
  --clr-accent-strong: #FFC845;
  --clr-accent-soft: rgba(253, 185, 19, 0.12);
  --clr-on-accent: #14161a;

  /* kolory — powierzchnie */
  --clr-bg: #0b0d10;
  --clr-bg-alt: #101318;
  --clr-surface: #15181e;
  --clr-surface-2: #1a1e25;
  --clr-border: #232830;
  --clr-border-strong: #2e3540;

  /* kolory — tekst */
  --clr-text: #f2f4f7;
  --clr-text-muted: #a6adba;
  --clr-text-faint: #78808d;

  /* typografia */
  --font-base: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* skala odstępów */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* geometria i efekty */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.35);
  --shadow-accent: 0 10px 28px rgba(253, 185, 19, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --tr: 0.25s var(--ease);
}

/* --------------------------------------------------------------------------
   3. Podstawy dokumentu
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  overflow-x: hidden;
}

::selection {
  background: var(--clr-accent);
  color: var(--clr-on-accent);
}

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

section[id],
footer[id] {
  scroll-margin-top: 84px;
}

/* pasek przewijania dopasowany do motywu */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--clr-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--clr-border-strong);
  border-radius: 8px;
  border: 3px solid var(--clr-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-accent);
}

/* --------------------------------------------------------------------------
   4. Typografia
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 800;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.1rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.8rem);
}

h3 {
  font-size: 1.02rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.h3-lg {
  font-size: 1.55rem;
  text-transform: none;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--clr-accent);
}

.lead {
  color: var(--clr-text-muted);
  font-size: 1.02rem;
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   5. Pomocnicze / dostępność
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--clr-accent);
  color: var(--clr-on-accent);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: top var(--tr);
}
.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ikony — domyślny kontener ikon liniowych (24×24) */
.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ico--star {
  fill: var(--clr-accent);
  stroke: none;
}

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