/* ============================================================
 * base.css — reset, elementy bazowe, typografia płynna,
 * kontener, przyciski, narzędzia, dostępność. Mobile-first.
 * ============================================================ */

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

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

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ── Typografia płynna ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--teal);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: clamp(1rem, 1.4vw, 1.2rem); }
p  { line-height: 1.8; }
strong, b { font-weight: 600; }
em, i { font-style: italic; }

/* ── Kontener ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── Linki w treści ───────────────────────────────────────── */
.entry-content a,
.content-area a:not(.btn):not(.p-card):not(.p-link) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}
.entry-content a:hover,
.content-area a:not(.btn):not(.p-card):not(.p-link):hover { color: var(--primary-mid); }

/* ── Przyciski ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r);
  font-size: .88rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: all .3s var(--ease);
  letter-spacing: .01em;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-mid); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0, 52, 103, .25); }
.btn-teal:active { background: var(--primary-dark); transform: translateY(0); }

/* Napis GRANATOWY, nie biały. Biel na `--leaf-orange` daje 2,45:1 przy
   wymaganych 4,5:1; granat na tym samym pomarańczu to 5,09:1, więc kolor
   marki zostaje nietknięty (decyzja Włodka 16.08.2026, wariant A:
   pomarańcz jest kolorem plam, nie liter). */
.btn-orange { background: var(--leaf-orange); color: var(--primary); }
/* Hover ROZJAŚNIA, a nie przyciemnia: przy granatowym napisie ciemniejszy
   `--leaf-orange-dark` spadał do 4,16:1. #EE9C3C daje 5,61:1. */
.btn-orange:hover { background: #EE9C3C; transform: translateY(-2px); box-shadow: 0 10px 32px rgba(232, 146, 46, .3); }

.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--teal); background: var(--teal-soft); }

.btn-white { background: var(--white); color: var(--teal); }
.btn-white:hover { background: var(--cream); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0, 0, 0, .1); }

.btn-ghost-w { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .9); border: 1.5px solid rgba(255, 255, 255, .18); }
.btn-ghost-w:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); }

.arr { transition: transform .2s; width: 16px; height: 16px; }
.btn:hover .arr { transform: translateX(3px); }
.arrow-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── Animacje wejścia ─────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fu { animation: fadeUp .8s var(--ease) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; }
.d4 { animation-delay: .4s; } .d5 { animation-delay: .5s; } .d6 { animation-delay: .6s; }
.d7 { animation-delay: .7s; } .d8 { animation-delay: .8s; }

/* ── Narzędzia ────────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ── Dostępność: skip-link + focus-visible ────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--r) 0;
  font-size: .85rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

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