/* base.css — reset, typografia bazowa, layout, elementy globalne. Zob. design.md §4, §5. */

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;                 /* twardy wymóg: brak poziomego scrolla */
}

img{ max-width:100%; height:auto; display:block; }
a{ color:var(--blue); text-decoration:none; }
button{ font-family:inherit; }

h1,h2,h3,h4{
  font-family:var(--font-head);
  color:var(--navy);
  letter-spacing:-.02em;
  line-height:1.08;
  margin:0 0 .4em;
  font-weight:700;
}
h1{ font-size:clamp(38px, 6vw, 72px); line-height:1.05; }
h2{ font-size:clamp(30px, 4.5vw, 48px); }
h3{ font-size:22px; }
h4{ font-size:18px; }
p{ margin:0 0 1rem; }

/* Kontener */
.wrap{
  max-width:var(--maxw);
  margin-inline:auto;
  padding-inline:var(--wrap-pad);
}

/* Sekcja */
.section{ padding-block:var(--sec-pad); position:relative; }
.section.alt{ background:var(--bg-soft); }
.section.dark{ background:var(--dark); color:var(--on-dark); isolation:isolate; overflow:hidden; }
.section.dark h1,.section.dark h2,.section.dark h3,.section.dark h4{ color:#fff; }

/* Nagłówek sekcji */
.sec-head{ max-width:720px; margin-bottom:clamp(38px,5vw,58px); }
.sec-head.center{ margin-inline:auto; text-align:center; }
.eyebrow{
  display:inline-block;
  font-family:var(--font-head);
  font-weight:600;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--blue);
  margin-bottom:14px;
}
.section.dark .eyebrow{ color:var(--cyan); }
.sec-head p{ color:var(--slate); font-size:clamp(16px,2vw,18px); margin:0; }
.section.dark .sec-head p{ color:var(--on-dark-soft); }

/* Tekst gradientowy (fragment nagłówka) */
.grad-text{
  background:var(--grad);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* Dekoracje sekcji ciemnych (z-index 0, treść z-index 1) — zob. design.md §5 */
.grid-bg{
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(120,160,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.10) 1px, transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
  mask-image:radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
}
.glow{
  position:absolute; z-index:0; pointer-events:none;
  width:520px; height:520px; border-radius:50%;
  filter:blur(90px); opacity:.5;
}
.glow.g1{ background:#1f6dff; top:-120px; left:-80px; }
.glow.g2{ background:#46e6ff; bottom:-160px; right:-100px; opacity:.35; }
.section.dark .wrap{ position:relative; z-index:1; }

/* Skip link (dostępność) */
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:999;
  background:var(--navy); color:#fff; padding:12px 18px; border-radius:0 0 10px 0;
}
.skip-link:focus{ left:0; }

/* Widoczny focus (nie usuwamy outline) */
:focus-visible{ outline:3px solid var(--blue); outline-offset:2px; border-radius:4px; }

/* Reveal on scroll (design.md §9.2) — stan startowy; .in dodaje JS */
.reveal{ opacity:0; transform:translateY(34px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity:1; transform:none; }
.reveal.d1{ transition-delay:.08s; }
.reveal.d2{ transition-delay:.16s; }
.reveal.d3{ transition-delay:.24s; }
.reveal.d4{ transition-delay:.32s; }

/* Utility */
.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;
}
