/* ==========================================================================
   EFEKTO - base.css
   Reset, fonty, typografia bazowa, dostepnosc.
   ========================================================================== */

/* --- Fonty lokalnie. Zadnego CDN Google: szybciej i bez wycieku IP (RODO). --- */
@font-face {
  font-family: "Run";
  src: url("../assets/fonts/run-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  /* Font nie ma cyfr ani polskich znakow - ograniczamy go do tego, co ma. */
  unicode-range: U+0020-007E, U+2018, U+201D, U+2014, U+2022;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+2013-2014, U+2018-201D, U+2022;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../assets/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../assets/fonts/inter-tight-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+2013-2014, U+2018-201D, U+2022;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Lenis przejmuje scroll - natywny smooth bylby wtedy druga sila. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color var(--dur-slow) var(--ease-soft),
              color var(--dur-slow) var(--ease-soft);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--step-6); line-height: var(--lh-tight); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 var(--space-m); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-m); padding-left: 1.25em; }
li { margin-bottom: var(--space-2xs); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--text); }

strong { font-weight: 600; color: var(--text); }

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

/* --- Focus: zawsze widoczny, w obu motywach --- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

::selection { background: var(--brand-blue); color: var(--brand-black); }

/* Atrybut hidden musi wygrywac z display z klasy - inaczej elementy
   sterowane przez JS (typing, panele, kroki formularza) nie znikaja. */
[hidden] { display: none !important; }

/* --- Dostepnosc --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 200;
  padding: var(--space-s) var(--space-m);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--radius-s);
  transform: translateY(-160%);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ==========================================================================
   prefers-reduced-motion
   Warunek bazowy, nie poprawka na koniec. Tresc widoczna od razu.
   ========================================================================== */
@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;
    scroll-behavior: auto !important;
  }
  [data-anim] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* "Zatrzymaj animacje" z panelu dostepnosci - to samo, co systemowe
   ograniczenie ruchu. Moduly JS czytaja to przy starcie (state.js). */
html.a11y-bez-ruchu { scroll-behavior: auto; }
html.a11y-bez-ruchu *, html.a11y-bez-ruchu *::before, html.a11y-bez-ruchu *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
html.a11y-bez-ruchu [data-anim] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
html.a11y-bez-ruchu .preloader { display: none !important; }
