/* =====================================================================
   BAZA: reset, typografia, motywy sekcji, przyciski, wspólne elementy
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(48px, 7.2vw, 105px); line-height: .9; letter-spacing: -.055em; font-weight: 600; }
h2 { font-size: clamp(40px, 5vw, 68px); line-height: 1; letter-spacing: -.045em; }
h3 { font-size: 20px; line-height: 1.3; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; left: -9999px; }

/* ---------- Motywy sekcji: jedna zasada kolorów dla całej strony ----------
   Tło, kolor tekstu i akcent ustawia modyfikator, a komponenty tylko z nich korzystają.
   Rytm tła: paper -> cream -> paper -> cream -> deep ..., sąsiednie sekcje nigdy nie mają tego samego koloru. */
.section {
  --bg: var(--paper); --fg: var(--ink); --fg-muted: var(--muted); --accent: var(--blue);
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-y);
}
.section--cream { --bg: var(--cream); }
.section--deep { --bg: var(--deep); --fg: #fff; --fg-muted: #ffffffb3; --accent: var(--blue-light); }

/* ---------- Nagłówek sekcji (kicker + tytuł + opis) ---------- */
.kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h2 em, h1 em { color: var(--accent); font-weight: 500; }
.kicker + h2 { margin-top: 10px; }

.section-head {
  display: grid;
  grid-template-columns: 1fr .55fr;
  gap: clamp(28px, 6vw, 70px);
  align-items: end;
  margin-bottom: clamp(34px, 5vw, 52px);
}
.section-head p { max-width: 440px; margin-bottom: 5px; color: var(--fg-muted); line-height: 1.75; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-size: 13px;
  font-weight: 700;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, gap .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue-light); color: var(--deep); }
.btn--primary:hover { background: #e5f3f5; box-shadow: 0 12px 35px #05304040; }
.btn--ghost { border-color: #ffffff61; background: #ffffff12; color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: #ffffff26; }
.btn--dark { background: var(--deep); color: #fff; }
.btn--dark:hover { background: var(--blue-dark); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: #17323b12; }

/* ---------- Ruch: pojawianie się elementów przy przewijaniu ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s var(--ease); transition-delay: calc(var(--i, 0) * .08s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { opacity: 1; transform: none; }
}
