/* =====================================================================
   Matematyka Chemika — styles.css
   Paleta z logo: grafit / magenta / turkus / pudrowy róż / biel.
   Nagłówki: Sora. Treść: Inter.
   ===================================================================== */

/* ---------- 1. TOKENY / ZMIENNE ---------- */
:root {
  /* Kolory z logo */
  --grafit:      #12161F;
  --grafit-2:    #1E2430;
  --magenta:     #FD638E;
  --magenta-dk:  #E84B78;
  --turkus:      #38DAD0;
  --turkus-dk:   #1FBDB3;
  --roz:         #FEC0D4;
  --roz-jasny:   #FEEAF1;
  --bialy:       #FFFFFF;

  /* Role */
  --tlo:         #FFFFFF;
  --tlo-roz:     #FEF6F9;
  --tekst:       #12161F;
  --tekst-mut:   #5B616E;
  --linia:       #ECE7EC;

  /* Typografia */
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --pad:  clamp(20px, 5vw, 48px);
  --radius: 20px;
  --radius-sm: 12px;

  /* Cień */
  --cień: 0 24px 60px -20px rgba(18, 22, 31, 0.18);
  --cień-sm: 0 10px 30px -12px rgba(18, 22, 31, 0.16);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Lenis wyłącza natywne smooth scroll gdy działa */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  color: var(--tekst);
  background: var(--tlo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

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

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- 3. TYPOGRAFIA ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }

.section__title { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero__title    { font-size: clamp(2.6rem, 7vw, 5rem); }

.hl { color: var(--magenta); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.14em;
  background: var(--turkus); border-radius: 2px; opacity: 0.55; z-index: -1;
}

/* ---------- 4. PRZYCISKI ---------- */
.btn {
  --btn-bg: var(--grafit); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.6em; border-radius: 100px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.98rem;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--cień-sm); }
.btn:active { transform: translateY(0); }

.btn--primary { --btn-bg: var(--magenta); --btn-fg: #fff; box-shadow: 0 12px 26px -12px var(--magenta); }
.btn--primary:hover { --btn-bg: var(--magenta-dk); }
.btn--teal { --btn-bg: var(--turkus); --btn-fg: var(--grafit); box-shadow: 0 12px 26px -12px var(--turkus); }
.btn--teal:hover { --btn-bg: var(--turkus-dk); }
.btn--ghost { background: transparent; color: var(--grafit); box-shadow: inset 0 0 0 2px var(--linia); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--grafit); }
.btn--ghost-light { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35); }
.btn--ghost-light:hover { box-shadow: inset 0 0 0 2px #fff; }
.btn--lg { padding: 1.05em 2em; font-size: 1.05rem; }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.9rem; }
.btn--full { width: 100%; }

/* ---------- 5. PRELOADER ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--grafit); color: #fff;
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; width: min(320px, 70vw); }
.preloader__mark {
  display: block; width: 92px; height: 92px; margin: 0 auto 1.4rem;
  object-fit: contain; background: #fff; border-radius: 22px; padding: 10px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.28);
}
@media (prefers-reduced-motion: no-preference) {
  .preloader__mark { animation: markPulse 1.8s var(--ease) infinite; }
}
@keyframes markPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.035); }
}
.preloader__logo { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; line-height: 1.1; margin-bottom: 1.4rem; }
.preloader__logo span { display: block; color: var(--magenta); }
.preloader__bar { height: 4px; background: rgba(255,255,255,0.15); border-radius: 100px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--magenta), var(--turkus)); }
.preloader__count { margin-top: 0.8rem; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: rgba(255,255,255,0.7); }

/* ---------- 6. PASEK POSTĘPU SCROLLA ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 999;
  background: linear-gradient(90deg, var(--magenta), var(--turkus));
}

/* ---------- 7. NAWIGACJA ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
  padding: 14px 0;
}
.nav.is-scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--linia);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.nav__logo { height: 46px; width: auto; object-fit: contain; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--grafit); position: relative; padding: 4px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--magenta); transition: width 0.25s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }
.nav__cta { margin-left: 0.5rem; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.nav__burger span { width: 26px; height: 2px; background: var(--grafit); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 8. MENU MOBILNE ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 400;
  background: var(--tlo); padding: 100px var(--pad) 40px;
  transform: translateY(-100%); transition: transform 0.45s var(--ease);
  display: flex;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; margin: auto 0; }
.mobile-menu a { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--linia); }
.mobile-menu .btn { margin-top: 1.2rem; font-size: 1.05rem; }

/* ---------- 9. HERO ---------- */
.hero { position: relative; padding: clamp(110px, 15vh, 160px) 0 56px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: var(--roz-jasny); color: var(--magenta-dk);
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  padding: 0.5em 1em; border-radius: 100px; margin-bottom: 1.4rem;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 4px rgba(253,99,142,0.2); }

.hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--tekst-mut); max-width: 34ch; margin: 1.5rem 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Pasek zaufania: zawsze 2 rządki po 2 (2x2) */
.hero__trust { display: grid; grid-template-columns: repeat(2, max-content); gap: 1.4rem clamp(1.6rem, 4vw, 3rem); margin-top: 2.6rem; }
.hero__trust li { display: flex; flex-direction: column; }
.hero__trust strong { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; color: var(--grafit); }
.hero__trust span { font-size: 0.85rem; color: var(--tekst-mut); }

/* Hero — wizual / logo */
.hero__col-visual { position: relative; }
.hero__logo-card {
  position: relative; background: var(--bialy); border-radius: 28px;
  padding: clamp(1.2rem, 3vw, 2.2rem); box-shadow: var(--cień);
  border: 1px solid var(--linia); z-index: 2;
}
.hero__logo-card img { width: 100%; }
.hero__chip {
  position: absolute; z-index: 3; font-family: var(--font-head); font-weight: 700;
  font-size: 0.9rem; padding: 0.5em 0.9em; border-radius: 100px; box-shadow: var(--cień-sm);
  background: #fff;
}
.hero__chip--1 { top: 6%; left: -6%; color: var(--turkus-dk); border: 2px solid var(--turkus); }
.hero__chip--2 { bottom: 14%; left: -8%; color: var(--magenta-dk); border: 2px solid var(--magenta); }
.hero__chip--3 { top: 22%; right: -6%; color: var(--grafit); border: 2px solid var(--roz); }

/* Dekoracje: plamy poświaty */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; opacity: 0.55; pointer-events: none; }
.blob--pink { width: 460px; height: 460px; background: var(--roz); top: -140px; left: -120px; }
.blob--teal { width: 380px; height: 380px; background: var(--turkus); bottom: -160px; right: -100px; opacity: 0.3; }

/* Hero — wskaźnik scrolla */
.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--linia); border-radius: 100px; display: grid; place-items: start center; padding-top: 7px; }
.hero__scroll span { width: 4px; height: 8px; background: var(--magenta); border-radius: 4px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 10. MARQUEE ---------- */
.marquee { background: var(--grafit); color: #fff; padding: 18px 0; overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; align-items: center; gap: 1.6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; animation: marquee 26s linear infinite; }
.marquee__track span { text-transform: uppercase; letter-spacing: 0.02em; }
.marquee__sep { color: var(--turkus); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 11. SEKCJE (ogólne) ---------- */
.section { padding: clamp(40px, 6vw, 72px) 0; position: relative; }
.section__head { max-width: 640px; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.section__num { font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--magenta); display: inline-block; margin-bottom: 0.6rem; letter-spacing: 0.1em; }
.section__num--teal { color: var(--turkus-dk); }
.section__sub { color: var(--tekst-mut); font-size: clamp(1rem, 2vw, 1.15rem); margin-top: 1rem; }

/* ---------- 12. MANIFEST ---------- */
.manifest { padding: clamp(48px, 7vw, 84px) 0; background: var(--tlo-roz); }
.manifest__text { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4.4vw, 3rem); line-height: 1.28; letter-spacing: -0.02em; max-width: 20ch; }
.manifest__text .word { color: rgba(18,22,31,0.18); transition: color 0.2s; }
.manifest__text .word.is-lit { color: var(--grafit); }

/* ---------- 13. PRODUKTY / KARTY ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.card {
  position: relative; background: #fff; border: 1px solid var(--linia); border-radius: var(--radius);
  padding: 1.8rem 1.5rem; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  transform-style: preserve-3d;
}
.card:hover { box-shadow: var(--cień); border-color: transparent; }
.card--featured { border-color: var(--magenta); box-shadow: 0 20px 50px -24px var(--magenta); }
.card--soon { background: var(--tlo-roz); }
.card__tag { align-self: flex-start; font-family: var(--font-head); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.4em 0.8em; border-radius: 100px; background: var(--grafit); color: #fff; margin-bottom: 1rem; }
.card__tag--free { background: var(--turkus); color: var(--grafit); }
.card__tag--soon { background: var(--roz); color: var(--magenta-dk); }
.card--featured .card__tag { background: var(--magenta); }
.card__title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card__desc { color: var(--tekst-mut); font-size: 0.95rem; margin-bottom: 1.2rem; }
.card__list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.6rem; }
.card__list li { position: relative; padding-left: 1.5rem; font-size: 0.92rem; }
.card__list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--turkus); }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.9rem; }
.card__price { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--grafit); }

/* ---------- 14. GENERATOR ---------- */
.generator { background: var(--grafit); color: #fff; overflow: hidden; }
.generator__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.generator .section__sub { color: rgba(255,255,255,0.72); }
.gen-badge { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.45em 0.95em; border-radius: 100px; background: var(--turkus); color: var(--grafit); margin-bottom: 1rem; }
.generator__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.generator .btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); }
.generator .btn--ghost:hover { box-shadow: inset 0 0 0 2px #fff; }

.gen-card { background: #fff; color: var(--grafit); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--cień); }
.gen-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; font-size: 0.82rem; }
.gen-card__badge { background: var(--roz-jasny); color: var(--magenta-dk); font-family: var(--font-head); font-weight: 600; padding: 0.35em 0.8em; border-radius: 100px; }
.gen-card__count { color: var(--tekst-mut); }
.gen-card__q { font-size: 1.05rem; font-weight: 500; margin-bottom: 1.3rem; }
.gen-card__q sub { font-size: 0.7em; }
.gen-card__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1.3rem; }
.gen-opt { padding: 0.8em; border-radius: var(--radius-sm); background: var(--tlo-roz); font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; transition: background 0.2s, transform 0.2s; box-shadow: inset 0 0 0 1px var(--linia); }
.gen-opt:hover { transform: translateY(-2px); }
.gen-opt.is-correct { background: var(--turkus); color: var(--grafit); box-shadow: none; }
.gen-card__foot { display: flex; justify-content: space-between; align-items: center; }
.gen-card__hint { font-size: 0.78rem; color: var(--tekst-mut); }

/* ---------- 15. O MNIE ---------- */
.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__photo { background: var(--tlo-roz); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--cień-sm); border: 1px solid var(--linia); }
.about__text p { color: var(--tekst-mut); margin-top: 1rem; max-width: 52ch; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.chips li { font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; padding: 0.5em 1em; border-radius: 100px; background: #fff; box-shadow: inset 0 0 0 2px var(--linia); }

/* ---------- 17. FORMULARZ ZAPISU (lead magnet w sekcji finałowej) ---------- */
.tester__form { display: flex; gap: 0.7rem; max-width: 500px; margin-inline: auto; }
.tester__form input { flex: 1; padding: 1em 1.2em; border-radius: 100px; border: 2px solid var(--linia); background: #fff; font-size: 1rem; transition: border-color 0.2s; }
.tester__form input:focus { border-color: var(--magenta); outline: none; }
.tester__note { margin-top: 1rem; font-size: 0.85rem; color: var(--tekst-mut); }

/* ---------- 18. FINAŁOWE CTA ---------- */
.final-cta__inner { background: var(--grafit); color: #fff; border-radius: 28px; padding: clamp(3rem, 8vw, 6rem) var(--pad); text-align: center; position: relative; overflow: hidden; }
.final-cta__inner::before { content: ""; position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(56,218,208,0.35), transparent 65%); top: -200px; left: -100px; }
.final-cta__inner::after { content: ""; position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(253,99,142,0.4), transparent 65%); bottom: -240px; right: -120px; }
.final-cta__title { font-size: clamp(2rem, 5.5vw, 3.6rem); position: relative; z-index: 2; }
.final-cta__sub { color: rgba(255,255,255,0.75); margin: 1rem auto 2rem; position: relative; z-index: 2; max-width: 46ch; text-wrap: balance; }
.final-cta__form { position: relative; z-index: 2; margin-top: 0.5rem; }
.final-cta__consent { display: flex; gap: 0.6rem; align-items: flex-start; justify-content: flex-start; text-align: left; max-width: 44ch; margin: 1.2rem auto 0; font-size: 0.82rem; line-height: 1.5; color: rgba(255,255,255,0.6); position: relative; z-index: 2; }
.final-cta__consent input { margin-top: 0.15rem; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--magenta); cursor: pointer; }
.final-cta__consent a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.final-cta__consent a:hover { color: var(--turkus); }
.final-cta__note { color: rgba(255,255,255,0.55); position: relative; z-index: 2; max-width: 52ch; margin: 0.9rem auto 0; text-wrap: balance; font-size: 0.85rem; }
.final-cta__note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.final-cta__note a:hover { color: var(--turkus); }

/* ---------- 19. STOPKA ---------- */
.footer { background: var(--grafit); color: #fff; padding: clamp(44px, 6vw, 64px) 0 28px; overflow: hidden; }
.footer__label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--turkus); margin-bottom: 1.1rem; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; min-width: 0; }
.footer__col a { color: rgba(255,255,255,0.7); font-size: 0.95rem; transition: color 0.2s; max-width: 100%; }
.footer__col a:hover { color: #fff; }
.footer__ilink { display: flex; align-items: center; gap: 0.6rem; min-width: 0; overflow-wrap: anywhere; }
.footer__ico { width: 18px; height: 18px; flex-shrink: 0; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 1.3rem; }
.footer__legal a, .footer__cookies { color: rgba(255,255,255,0.45); font-size: 0.82rem; transition: color 0.2s; }
.footer__cookies { background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; }
.footer__legal a:hover, .footer__cookies:hover { color: var(--turkus); }

/* ---------- 20. ANIMACJE — stany startowe (tylko gdy JS aktywny) ---------- */
/* Nagłówki data-split ukrywa maska (overflow:hidden + przesunięcie w JS),
   więc NIE ustawiamy im opacity — tylko reveal ma stan startowy. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }

/* ---------- 21. RESPONSYWNOŚĆ ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__col-visual { max-width: 420px; margin-inline: auto; order: -1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .generator__grid, .about__grid { grid-template-columns: 1fr; }
  .about__visual { max-width: 360px; }
}

@media (max-width: 640px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .hero__trust { gap: 1.4rem; }
  .tester__form { flex-direction: column; }
  .tester__form .btn { width: 100%; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .footer__bottom { flex-direction: column; }
  .hero__chip { display: none; }
}

/* ---------- 22. PREFERS-REDUCED-MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js [data-reveal], .js [data-split] .line-inner { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
}

/* ---------- 23. PODSTRONY PRAWNE (regulaminy, polityka) ---------- */
.legal-top { border-bottom: 1px solid var(--linia); }
.legal-top__inner { max-width: 860px; margin-inline: auto; padding: 18px clamp(20px, 5vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal-top__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; color: var(--grafit); font-size: 1.05rem; }
.legal-top__logo img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 8px; }
.legal-back { color: var(--magenta-dk); font-size: 0.9rem; }
.legal-back:hover { color: var(--turkus-dk); }

.legal { max-width: 820px; margin-inline: auto; padding: clamp(36px, 6vw, 80px) clamp(20px, 5vw, 40px) clamp(56px, 9vw, 110px); }
.legal__eyebrow { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--turkus-dk); }
.legal h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; margin: 10px 0 6px; }
.legal__meta { color: var(--tekst-mut); font-size: 0.9rem; }
.legal__note { background: var(--tlo-roz); border: 1px solid var(--linia); border-left: 3px solid var(--magenta); border-radius: var(--radius-sm); padding: 14px 18px; color: var(--tekst-mut); font-size: 0.92rem; margin: 24px 0 40px; }
.legal h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.65rem); color: var(--grafit); margin: 40px 0 12px; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--tekst-mut); line-height: 1.72; }
.legal p { margin-bottom: 14px; }
.legal ul, .legal ol { margin: 0 0 16px 1.25em; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--magenta-dk); text-decoration: underline; }
.legal a:hover { color: var(--turkus-dk); }
.legal__dash-list { list-style: none; margin-left: 1.25em; }
.legal__dash-list li { position: relative; padding-left: 1.1em; }
.legal__dash-list li::before { content: "–"; position: absolute; left: 0; }
.legal sup { position: relative; top: -0.4em; font-size: 0.7em; line-height: 0; vertical-align: baseline; }
.legal__ph { color: var(--magenta); font-style: italic; font-weight: 600; }
.legal__table-wrap { overflow-x: auto; margin: 4px 0 22px; border: 1px solid var(--linia); border-radius: var(--radius-sm); }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9rem; }
.legal th, .legal td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--linia); vertical-align: top; }
.legal thead th { font-family: var(--font-head); font-weight: 600; color: var(--grafit); background: var(--roz-jasny); white-space: nowrap; }
.legal tbody td { color: var(--tekst-mut); }
.legal tbody tr:last-child td { border-bottom: none; }
.legal tbody td:first-child { color: var(--grafit); font-weight: 600; }

.subfoot { background: var(--grafit); color: rgba(255,255,255,0.5); padding: clamp(30px, 5vw, 46px) 0; margin-top: clamp(40px, 8vw, 90px); }
.subfoot__inner { max-width: 860px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.subfoot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.84rem; }
.subfoot a { color: rgba(255,255,255,0.7); text-decoration: none; }
.subfoot a:hover { color: #fff; }

/* ---------- 24. BANER COOKIE ---------- */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--grafit); color: rgba(255,255,255,0.85);
  border-top: 1px solid rgba(255,255,255,0.12);
  transform: translateY(110%); transition: transform 0.5s var(--ease);
  box-shadow: 0 -14px 40px rgba(0,0,0,0.25);
}
.cookie.is-visible { transform: translateY(0); }
.cookie__inner { max-width: 1180px; margin-inline: auto; padding: clamp(16px, 2.5vw, 24px) clamp(18px, 4vw, 40px); }
.cookie__main { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); flex-wrap: wrap; }
.cookie__text { flex: 1 1 420px; min-width: 0; }
.cookie__title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: #fff; margin-bottom: 4px; }
.cookie__text p { font-size: 0.9rem; line-height: 1.55; color: rgba(255,255,255,0.7); margin: 0; }
.cookie__text a { color: var(--turkus); text-decoration: underline; }
.cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.cookie__btn {
  font: inherit; font-family: var(--font-head); font-size: 0.85rem; font-weight: 600;
  padding: 11px 18px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #fff;
  transition: background 0.25s, border-color 0.25s, transform 0.15s; white-space: nowrap;
}
.cookie__btn--ghost:hover { border-color: #fff; }
.cookie__btn--primary { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.cookie__btn--primary:hover { background: var(--magenta-dk); border-color: var(--magenta-dk); }
.cookie__btn:active { transform: translateY(1px); }
.cookie__panel { margin-top: 18px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.12); max-height: 46vh; overflow-y: auto; }
.cookie__cat { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cookie__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie__cat-head strong { color: #fff; font-size: 0.98rem; }
.cookie__cat p { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 6px 0 0; max-width: 760px; }
.cookie__always { font-size: 0.8rem; color: var(--turkus); font-weight: 600; white-space: nowrap; }
.cookie__panel-actions { margin-top: 16px; }
.cookie__switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.cookie__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie__slider { position: absolute; inset: 0; background: rgba(255,255,255,0.25); border-radius: 99px; transition: background 0.25s; }
.cookie__slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.25s; }
.cookie__switch input:checked + .cookie__slider { background: var(--turkus); }
.cookie__switch input:checked + .cookie__slider::before { transform: translateX(20px); }
@media (max-width: 640px) {
  .cookie__actions { width: 100%; }
  .cookie__actions .cookie__btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- 25. STRONA 404 ---------- */
.nf { max-width: 620px; margin-inline: auto; padding: clamp(48px, 9vw, 110px) clamp(20px, 5vw, 40px); text-align: center; }
.nf__mascot { display: block; width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 28px; padding: 12px; margin: 0 auto 1.6rem; box-shadow: var(--cień-sm); }
.nf__eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--magenta); }
.nf__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.6rem 0 1rem; }
.nf__desc { color: var(--tekst-mut); font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; text-wrap: balance; }

/* ---------- 26. FORMULARZ MAILERLITE (embed w sekcji finałowej) ---------- */
.final-cta .ml-form-embedContainer { max-width: 460px; margin: 0.5rem auto 0; position: relative; z-index: 2; }
.final-cta .ml-form-align-center { text-align: center; }
.final-cta .ml-form-embedWrapper { display: block; width: 100%; max-width: 100%; background: transparent; }
.final-cta .ml-form-embedBody { padding: 0; }
.final-cta .ml-form-embedContent { display: none; } /* ukryj wewnętrzny nagłówek MailerLite */
.final-cta .ml-form-formContent { margin: 0 0 0.9rem; width: 100%; }
.final-cta .ml-form-fieldRow { margin: 0; width: 100%; }
.final-cta .ml-field-email input[type="email"] {
  width: 100%; box-sizing: border-box; background: #fff; color: var(--grafit);
  border: 2px solid transparent; border-radius: 100px; font-family: var(--font-body);
  font-size: 1rem; padding: 1em 1.4em; transition: border-color 0.2s;
}
.final-cta .ml-field-email input[type="email"]:focus { border-color: var(--magenta); outline: none; }
/* zgoda RODO */
.final-cta .ml-form-checkboxRow { float: none; width: 100%; margin: 0 0 1rem; text-align: left; }
.final-cta .ml-form-checkboxRow label.checkbox { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0; min-height: 0; font-weight: 400; cursor: pointer; }
.final-cta .ml-form-checkboxRow input[type="checkbox"] { position: static; opacity: 1; z-index: auto; width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--magenta); cursor: pointer; }
.final-cta .ml-form-checkboxRow .label-description { color: rgba(255,255,255,0.6); }
.final-cta .ml-form-checkboxRow .label-description p { color: rgba(255,255,255,0.6); font-size: 0.82rem; line-height: 1.5; margin: 0; }
.final-cta .ml-form-checkboxRow .label-description a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.final-cta .ml-form-checkboxRow .label-description a:hover { color: var(--turkus); }
/* przycisk */
.final-cta .ml-form-embedSubmit { float: none; width: 100%; margin: 0; }
.final-cta .ml-form-embedSubmit button.primary {
  width: 100%; background: var(--magenta); color: #fff; border: none; border-radius: 100px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; padding: 1.05em 2em;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.final-cta .ml-form-embedSubmit button.primary:hover { background: var(--magenta-dk); transform: translateY(-2px); }
.final-cta .ml-form-embedSubmit button.loading { width: 100%; background: var(--magenta); border: none; border-radius: 100px; padding: 1.05em 2em; }
/* komunikat sukcesu */
.final-cta .ml-form-successContent h4 { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #fff; margin: 0 0 0.5rem; }
.final-cta .ml-form-successContent p { color: rgba(255,255,255,0.7); font-size: 1rem; margin: 0; }
/* stan błędu walidacji */
.final-cta .ml-error input { border-color: #ff7a9c !important; }
.final-cta .ml-error .label-description p { color: #ffb3c4; }
/* spinner ładowania + a11y */
.ml-form-embedSubmitLoad { display: inline-block; width: 20px; height: 20px; }
.ml-form-embedSubmitLoad:after { content: " "; display: block; width: 11px; height: 11px; margin: 1px; border-radius: 50%; border: 4px solid #fff; border-color: #fff #fff #fff transparent; animation: ml-spin 1.2s linear infinite; }
@keyframes ml-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
