/* ==========================================================
   AKADEMIA NAUKI – styl premium, mobile-first
   1. Tokeny  2. Baza  3. Komponenty  4. Sekcje  5. Ruch
   ========================================================== */

/* ---------- 1. TOKENY ---------- */
:root {
  /* kolory (role semantyczne) */
  --c-bg: #ffffff;
  --c-surface: #ff00ea;
  --c-surface-2: #eceef2;
  --c-text: #11141c;
  --c-text-2: #5a6070;
  --c-line: rgba(17, 20, 28, .1);
  --c-accent: var(--brand);
  --c-accent-press: var(--brand-press);
  --c-accent-soft: color-mix(in srgb, var(--brand) 10%, transparent);
  --c-dark: var(--ink);
  --c-danger: #d70015;
  --c-ok: #1a7f37;
  --c-star: var(--accent-ink);

  /* typografia */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  --fs-body: 1.0625rem;           /* 17px */
  --fs-small: .875rem;
  --fs-h1: clamp(2.5rem, 9.5vw, 5rem);
  --fs-h2: clamp(1.9rem, 6.5vw, 3.25rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.15rem, 3.6vw, 1.5rem);

  /* odstępy, promienie, cień, szerokości */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 40px; --sp-5: 64px;
  --sec: clamp(64px, 14vw, 120px);
  --r-s: 12px; --r-m: 20px; --r-l: 28px; --r-pill: 999px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --w: 1080px; --w-narrow: 720px;
  --hh: 56px;                      /* wysokość nagłówka */
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* ruch */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --d-fast: 160ms;
  --d-mid: 320ms;
  --d-slow: 480ms;
}

/* ---------- 2. BAZA ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 8px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.5; color: var(--c-text); background: var(--c-bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 3px; border-radius: 6px; }

.ico { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap {
  width: 100%; max-width: var(--w); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
}
.wrap.narrow { max-width: calc(var(--w-narrow) + 40px); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--c-text); color: #fff; padding: 12px 18px; border-radius: var(--r-s); transition: top var(--d-mid) var(--ease); }
.skip:focus { top: 12px; }

/* ---------- 3. KOMPONENTY ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-weight: 500; text-align: center;
  transition: background-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease), opacity var(--d-fast);
}
.btn:active { background: var(--c-accent-press); transform: scale(.97); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-light { background: #fff; color: var(--c-dark); }
.btn-light:active { background: var(--brand-tint); }
.link { display: inline-flex; align-items: center; min-height: 48px; color: var(--c-accent); font-weight: 500; }
.link::after { content: "›"; margin-left: 6px; font-size: 1.25em; line-height: 1; transition: transform var(--d-mid) var(--ease); }
.link:active::after { transform: translateX(3px); }

.head { text-align: center; margin-bottom: var(--sp-4); }
.head h2 { font-size: var(--fs-h2); }
.head p { margin-top: 12px; color: var(--c-text-2); font-size: var(--fs-lead); max-width: 34ch; margin-inline: auto; }

.sec { padding-block: var(--sec); }
.alt { background: var(--c-surface); }

/* nagłówek */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--hh);
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 transparent; transition: box-shadow var(--d-mid) var(--ease);
}
.top.scrolled { box-shadow: 0 1px 0 var(--c-line); }
.top.open { background: #fff; }
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; min-height: 48px; letter-spacing: -.01em; }
.brand-mark { color: var(--c-accent); width: 26px; height: 26px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--c-accent); transform: scaleX(0); transform-origin: left; will-change: transform; }

.menu-btn { position: relative; width: 48px; height: 48px; margin-right: -12px; }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--c-text); border-radius: 2px; transition: transform var(--d-mid) var(--ease); }
.menu-btn span:first-child { transform: translateY(-4px); }
.menu-btn span:last-child { transform: translateY(4px); }
.top.open .menu-btn span:first-child { transform: rotate(45deg); }
.top.open .menu-btn span:last-child { transform: rotate(-45deg); }

/* mobilne menu = arkusz na cały ekran (gdy JS działa) */
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.js .nav {
  position: fixed; top: var(--hh); left: 0; right: 0; height: calc(100dvh - var(--hh)); z-index: 40;
  flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 12px max(20px, env(safe-area-inset-left)) 40px;
  background: #fff; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--d-mid) var(--ease), transform var(--d-mid) var(--ease), visibility 0s var(--d-mid);
}
.js .top.open .nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.js .nav a {
  font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; padding: 16px 0; border-bottom: 1px solid var(--c-line);
  opacity: 0; transform: translateY(8px); transition: opacity var(--d-mid) var(--ease), transform var(--d-mid) var(--ease), color var(--d-fast);
}
.js .top.open .nav a { opacity: 1; transform: none; }
.js .top.open .nav a:nth-child(2) { transition-delay: 30ms; }
.js .top.open .nav a:nth-child(3) { transition-delay: 60ms; }
.js .top.open .nav a:nth-child(4) { transition-delay: 90ms; }
.js .top.open .nav a:nth-child(5) { transition-delay: 120ms; }
.js .top.open .nav a:nth-child(6) { transition-delay: 150ms; }
.nav a[aria-current="true"] { color: var(--c-accent); }

/* karty-kafelki */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--r-m); padding: 20px 16px 22px;
  transition: transform var(--d-fast) var(--ease), box-shadow var(--d-mid) var(--ease);
}
.tile .ico { color: var(--c-accent); width: 32px; height: 32px; margin-bottom: 14px; }
.tile h3 { font-size: 1.0625rem; letter-spacing: -.01em; }
.tile p { color: var(--c-text-2); font-size: var(--fs-small); line-height: 1.4; }
.tile:active { transform: scale(.98); }

/* zakładki (segmented control) */
.tabs-wrap { display: flex; justify-content: center; margin-bottom: var(--sp-3); }
.tabs { position: relative; display: none; max-width: 100%; padding: 4px; gap: 2px; background: var(--c-surface-2); border-radius: var(--r-pill); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.js .tabs { display: inline-flex; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; flex: none; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-size: .9375rem; font-weight: 500; color: var(--c-text-2); white-space: nowrap; scroll-snap-align: center; transition: color var(--d-mid); }
.tabs button[aria-selected="true"] { color: var(--c-text); }
.tab-ind { position: absolute; z-index: 0; top: 4px; left: 0; height: calc(100% - 8px); width: 0; background: #fff; border-radius: var(--r-pill); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); transition: transform var(--d-slow) var(--ease), width var(--d-slow) var(--ease); }
.tab-ind.no-anim { transition: none; }
.panels { max-width: 720px; margin-inline: auto; }
.panel { background: var(--c-surface); border-radius: var(--r-l); padding: 28px 24px; margin-bottom: 12px; }
.js .panel { margin-bottom: 0; }
.js .panel[hidden] { display: none; }
.js .panel { animation: fade-up var(--d-slow) var(--ease); }
.panel h3 { font-size: clamp(1.5rem, 5vw, 2rem); }
.panel > p { margin-top: 10px; color: var(--c-text-2); }
.checks { margin: 20px 0 8px; display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; }
.checks li::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--c-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* kroki */
.steps { display: grid; gap: 28px; max-width: var(--w-narrow); margin-inline: auto; }
.steps li { padding-top: 20px; border-top: 1px solid var(--c-line); }
.num { display: block; font-size: 2.75rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--c-accent); margin-bottom: 12px; }
.steps h3 { font-size: var(--fs-h3); }
.steps p { margin-top: 6px; color: var(--c-text-2); }

/* opinie – na telefonie przesuwany pasek */
.reviews { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 4px 20px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 20px; }
.reviews::-webkit-scrollbar { display: none; }
.review { flex: 0 0 84%; scroll-snap-align: start; background: var(--c-surface); border-radius: var(--r-l); padding: 28px 24px; display: flex; flex-direction: column; }
.stars { color: var(--c-star); letter-spacing: 2px; font-size: 1rem; margin-bottom: 14px; }
.review blockquote { font-size: 1.1875rem; line-height: 1.4; letter-spacing: -.01em; flex: 1; }
.review figcaption { margin-top: 20px; color: var(--c-text-2); font-size: var(--fs-small); }

/* wezwanie do działania */
.cta { background: var(--c-dark); color: #fff; text-align: center; padding-block: var(--sec); }
.cta h2 { font-size: var(--fs-h2); }
.cta p { margin: 12px 0 28px; color: rgba(255, 255, 255, .72); font-size: var(--fs-lead); }

/* FAQ – płynny akordeon */
.faq { border-top: 1px solid var(--c-line); }
.faq-item { border-bottom: 1px solid var(--c-line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; text-align: left; font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; }
.faq-q::after { content: ""; width: 14px; height: 14px; flex: none; background: var(--c-text-2); -webkit-mask: var(--plus) center / 100% no-repeat; mask: var(--plus) center / 100% no-repeat; transition: transform var(--d-mid) var(--ease); }
.faq-q[aria-expanded="true"]::after { transform: rotate(135deg); }
.faq-a p { padding: 0 0 20px; color: var(--c-text-2); }
.js .faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-slow) var(--ease); }
.js .faq-a > div { overflow: hidden; visibility: hidden; transition: visibility 0s var(--d-slow); }
.js .faq-item.open .faq-a { grid-template-rows: 1fr; }
.js .faq-item.open .faq-a > div { visibility: visible; transition-delay: 0s; }

/* formularz */
.form { display: grid; gap: 18px; background: var(--c-surface); border-radius: var(--r-l); padding: 24px 20px; }
.field { display: grid; gap: 8px; align-content: start; }
label { font-size: var(--fs-small); font-weight: 600; }
.opt { font-weight: 400; color: var(--c-text-2); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px = iOS nie powiększa pola */ color: var(--c-text);
  min-height: 52px; padding: 0 16px; background: #fff; border: 1px solid #d2d2d7; border-radius: var(--r-s);
  transition: border-color var(--d-fast), box-shadow var(--d-fast); -webkit-appearance: none; appearance: none;
}
textarea { padding: 14px 16px; min-height: 120px; resize: vertical; line-height: 1.4; }
select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
input::placeholder, textarea::placeholder { color: #8e8e93; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px var(--c-accent-soft); }
[aria-invalid="true"] { border-color: var(--c-danger); }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(215, 0, 21, .14); }
.err { color: var(--c-danger); font-size: var(--fs-small); min-height: 0; }
.err:empty { display: none; }
.form .btn { width: 100%; min-height: 54px; }
.form-note { text-align: center; font-weight: 500; color: var(--c-ok); }
.form-note:empty { display: none; }

/* stopka */
.foot { background: var(--c-surface); padding: 32px 0 calc(32px + 80px + var(--safe-b)); color: var(--c-text-2); font-size: var(--fs-small); }
.foot-row { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--c-line); }
.foot .brand { color: var(--c-text); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* dolny pasek z jedną akcją (tylko telefon) */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px max(20px, env(safe-area-inset-left)) calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -1px 0 var(--c-line);
  transform: translateY(100%); visibility: hidden;
  transition: transform var(--d-slow) var(--ease), visibility 0s var(--d-slow);
}
.dock.show { transform: none; visibility: visible; transition-delay: 0s; }
.dock .btn { width: 100%; min-height: 50px; }

/* ---------- 4. SEKCJE ---------- */
.hero { padding: clamp(40px, 10vw, 96px) 0 var(--sec); text-align: center; }
.eyebrow { color: var(--c-accent); font-weight: 600; font-size: 1rem; margin-bottom: 14px; }
.hero h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; max-width: 14ch; margin-inline: auto; }
.hero h1 span { color: var(--c-accent); }
.lead { font-size: var(--fs-lead); color: var(--c-text-2); max-width: 30ch; margin: 20px auto 0; line-height: 1.35; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 28px; }
.hero-visual {
  margin: clamp(36px, 8vw, 64px) auto 0; max-width: 760px; aspect-ratio: 16 / 10; border-radius: var(--r-l);
  background: var(--c-surface);
  display: grid; place-items: center; color: var(--c-accent);
}
.hero-visual .ico { width: clamp(72px, 20vw, 140px); height: auto; aspect-ratio: 1; stroke-width: 1.1; }

/* ---------- RESPONSYWNOŚĆ (od małych do dużych) ---------- */
@media (min-width: 560px) {
  .actions { flex-direction: row; justify-content: center; gap: 16px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tile { padding: 24px 20px 26px; }
  .form { grid-template-columns: 1fr 1fr; padding: 32px; gap: 20px; }
  .full { grid-column: 1 / -1; }
  .foot-row { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 820px) {
  :root { --hh: 64px; }
  .menu-btn, .dock { display: none; }
  .js .nav {
    position: static; height: auto; padding: 0; flex-direction: row; gap: 4px 28px; background: none; overflow: visible;
    opacity: 1; visibility: visible; transform: none; align-items: center;
  }
  .js .nav a, .nav a { font-size: .875rem; font-weight: 500; letter-spacing: 0; padding: 0; border: 0; opacity: 1; transform: none; color: var(--c-text-2); min-height: 44px; display: inline-flex; align-items: center; transition: color var(--d-fast); }
  .nav a[aria-current="true"] { color: var(--c-text); }
  .nav .nav-cta { color: var(--c-accent); }
  .reviews { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 20px; }
  .review { flex: none; }
  .steps { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 32px; }
  .panel { padding: 44px; }
  .foot { padding-bottom: 32px; }
  .form { padding: 44px; }
}
@media (hover: hover) {
  .btn:hover { background: var(--brand-hover); }
  .btn-light:hover { background: var(--brand-tint); }
  .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .nav a:hover { color: var(--c-text); }
  .tabs button:hover { color: var(--c-text); }
  .faq-q:hover { color: var(--c-accent); }
  .link:hover::after { transform: translateX(3px); }
}

/* ---------- 5. RUCH ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* wejście hero – krótkie, kaskadowe */
.reveal-load { animation: fade-up 700ms var(--ease) both; }
.hero h1.reveal-load { animation-delay: 70ms; }
.hero .lead.reveal-load { animation-delay: 140ms; }
.hero .actions.reveal-load { animation-delay: 210ms; }
.hero .hero-visual.reveal-load { animation-delay: 300ms; }

/* odsłanianie przy przewijaniu (gdy działa JS) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .nav a { opacity: 1; transform: none; }
}

/* ==========================================================
   6. CHARAKTER I GESTY DOTYKOWE
   ========================================================== */
.btn { position: relative; overflow: hidden; }
.ripple { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: currentColor; opacity: .22; pointer-events: none; animation: ripple 560ms var(--ease) forwards; }
@keyframes ripple { to { transform: scale(40); opacity: 0; } }

/* wymiennik słowa */
.rotor { display: inline-grid; vertical-align: bottom; overflow: hidden; padding-block: .06em; margin-block: -.06em; }
.rotor > span { grid-area: 1 / 1; text-align: center; opacity: 0; transform: translateY(70%); transition: opacity 360ms var(--ease), transform 460ms var(--ease); }
.rotor > .on { opacity: 1; transform: none; }
.rotor > .out { opacity: 0; transform: translateY(-70%); }

/* hero: pływające ikony przedmiotów */
.hero-visual { position: relative; touch-action: pan-y; cursor: pointer; -webkit-user-select: none; user-select: none; }
.hero-visual .cap { position: relative; z-index: 1; transition: transform var(--d-slow) var(--ease); }
.hero-visual:active .cap { transform: scale(.94) rotate(-4deg); }
.chip {
  position: absolute; left: calc(50% + var(--x)); top: calc(50% + var(--y)); width: 44px; height: 44px; z-index: 2;
  transform: translate(-50%, -50%) translate(calc(var(--px, 0) * var(--d) * 1px), calc(var(--py, 0) * var(--d) * 1px));
  transition: transform 420ms var(--ease);
  animation: chip-in 700ms var(--ease) backwards; animation-delay: calc(400ms + var(--t) * -120ms);
}
.chip i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 14px; background: #fff; color: var(--c-accent); box-shadow: 0 6px 18px rgba(17, 20, 28, .12); animation: drift 4.2s ease-in-out infinite alternate; animation-delay: var(--t); }
.hero-visual .chip .ico { width: 22px; height: 22px; aspect-ratio: auto; stroke-width: 1.6; }
@keyframes drift { from { translate: 0 -5px; } to { translate: 0 6px; } }
@keyframes chip-in { from { opacity: 0; scale: .4; } }
@keyframes pop { 40% { scale: 1.3; } }
.hero-visual.pop .chip .ico { animation: pop 520ms var(--ease); }

/* kafelki: ikona „podskakuje" pod palcem, pojawiają się z lekkim powiększeniem */
.tile .ico { transition: transform 260ms var(--ease); }
.tile:active .ico { transform: rotate(-10deg) scale(1.15); }
.js .tile.reveal:not(.in) { transform: translateY(20px) scale(.96); }

/* zakładki: panel wjeżdża z kierunku przesunięcia */
@keyframes slide-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.js .panels[data-dir="next"] .panel { animation-name: slide-next; }
.js .panels[data-dir="prev"] .panel { animation-name: slide-prev; }

/* kroki: oś czasu, która wypełnia się podczas przewijania (telefon) */
.steps { position: relative; padding-left: 32px; --sp: 0; }
.steps::before, .steps::after { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.steps::before { background: var(--c-line); }
.steps::after { background: var(--c-accent); transform: scaleY(var(--sp)); transform-origin: top; will-change: transform; }
.steps li { border-top: 0; padding-top: 0; position: relative; }
.steps li::before { content: ""; position: absolute; left: -32px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-line); transition: background-color 400ms var(--ease), border-color 400ms var(--ease), transform 400ms var(--ease); }
.steps li.in::before { background: var(--c-accent); border-color: var(--c-accent); transform: scale(1.1); }
@media (min-width: 820px) {
  .steps { padding-left: 0; }
  .steps::before, .steps::after, .steps li::before { display: none; }
  .steps li { border-top: 1px solid var(--c-line); padding-top: 20px; }
  .dots { display: none; }
}

/* opinie: kropki */
.dots { display: flex; justify-content: center; margin-top: 8px; }
.dot { width: 28px; height: 44px; position: relative; }
.dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #c7c7cc; transition: transform var(--d-mid) var(--ease), background-color var(--d-mid); }
.dot[aria-current="true"]::before { background: var(--c-accent); transform: scale(1.35); }

/* konfetti */
.confetti { position: fixed; z-index: 200; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; animation: confetti 900ms cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)); opacity: 0; } }

@media (min-width: 820px) { .chip { width: 56px; height: 56px; } .chip i { border-radius: 18px; } .hero-visual .chip .ico { width: 26px; height: 26px; } }
@media (prefers-reduced-motion: reduce) { .rotor > span:not(.on) { display: none; } .rotor > .on { opacity: 1; transform: none; } .chip, .chip i { animation: none !important; } }

/* ==========================================================
   7. SYSTEM KOLORU I RUCHU
   Marka: kobalt (dominujący) + granat (wspierający) + bursztyn (jedyny akcent).
   Tła neutralne: biel i chłodna szarość. Jedna sekcja = jeden kolor akcentu.
   ========================================================== */
/* ---- 7a. MOTYWY POZIOMÓW (jedyne miejsce z kolorami marki) ----
   Role: --brand (tożsamość ~15%), --accent (akcent ~5%), --ink (ciemne powierzchnie).
   Neutralne tła i powierzchnie (~80%) są wspólne i zdefiniowane w sekcji 1.
   JS zmienia wyłącznie atrybut data-theme na <html>. */

:root,
:root[data-theme="podstawowka"] {
  /* PODSTAWÓWKA: niebieski + ceglana terakota */

  --brand: #245CC5;
  --brand-hover: #1D4FAE;
  --brand-press: #173F8D;
  --brand-deep: #142F63;

  --brand-tint: #EAF1FF;
  --brand-light: #9BB9F4;
  --brand-on-dark: #BBD0FF;
  --ink: #14294B;

  --secondary: #D5E3FF;
  --secondary-strong: #7399E3;

  --accent: #B94F2E;
  --accent-hover: #A44125;
  --accent-press: #87351F;
  --accent-ink: #913A22;
  --on-accent: #FFFFFF;

  --c-surface: #F4F7FF;
  --c-surface-2: #F5F8FF;
  --border: #D4DFF1;
  --focus-ring: #B94F2E;
}

:root[data-theme="egzamin"] {
  /* EGZAMIN ÓSMOKLASISTY: zieleń + złoto
     Akcent komplementarny: malinowa czerwień */

  --brand: #24783D;
  --brand-hover: #1D6633;
  --brand-press: #164F28;
  --brand-deep: #103C20;

  --brand-tint: #E8F5EA;
  --brand-light: #8DCB9A;
  --brand-on-dark: #B3E5BC;
  --ink: #163B23;

  --secondary: #E5B94F;
  --secondary-strong: #C89A2D;

  --accent: #C43D58;
  --accent-hover: #AB3049;
  --accent-press: #8D263B;
  --accent-ink: #9E2D44;
  --on-accent: #FFFFFF;

  --c-surface: #F3F8F1;
  --c-surface-2: #F5FAF4;
  --border: #D1E5D3;
  --focus-ring: #C43D58;
}

:root[data-theme="srednia"] {
  /* SZKOŁA ŚREDNIA: fiolet + żółty */

  --brand: #7439B8;
  --brand-hover: #632E9F;
  --brand-press: #50247F;
  --brand-deep: #3C1B60;

  --brand-tint: #F0E8FA;
  --brand-light: #B99AE0;
  --brand-on-dark: #D6C1F3;
  --ink: #302044;

  --secondary: #EDE3FA;
  --secondary-strong: #C9ADEB;

  --accent: #E6C943;
  --accent-hover: #D4B52D;
  --accent-press: #B49A20;
  --accent-ink: #5B4700;
  --on-accent: #302500;

--c-surface: #F8F4FC;
--c-surface-2: #FAF7FD;
  --border: #E0D3F0;
  --focus-ring: #7439B8;
}

:root[data-theme="matura"] {
  /* MATURA: burgund + zieleń */

  --brand: #851F43;
  --brand-hover: #701936;
  --brand-press: #5A142B;
  --brand-deep: #431020;

  --brand-tint: #F7E8ED;
  --brand-light: #D79AAE;
  --brand-on-dark: #E9BDCA;
  --ink: #3E1826;

  --secondary: #F4E8DE;
  --secondary-strong: #DCC3B3;

  --accent: #2F8A61;
  --accent-hover: #26734F;
  --accent-press: #1D5C3F;
  --accent-ink: #216747;
  --on-accent: #FFFFFF;

--c-surface:#FAF3F0;
--c-surface-2: #FBF6F3;
  --border: #E7D3D9;
  --focus-ring: #2F8A61;
}


::selection { background: color-mix(in srgb, var(--brand) 18%, transparent); }
body { text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss03"; }
h1, h2, h3 { color: var(--c-text); }
.cta h2 { color: #fff; }

/* ---- przyciski ---- */
.btn { background: var(--brand); box-shadow: var(--glow); transition: background-color var(--d-mid) var(--ease), transform var(--d-mid) var(--ease), box-shadow var(--d-mid) var(--ease), opacity var(--d-fast); }
.btn:active { background: var(--c-accent-press); box-shadow: 0 4px 10px -6px color-mix(in srgb, var(--brand) 60%, transparent); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .55); }
.btn-light:active { background: var(--brand-tint); }
@media (hover: hover) {
  .btn:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--brand) 60%, transparent); }
  .btn:hover:active { transform: scale(.97); }
  .btn-light:hover { background: var(--brand-tint); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6); }
}

/* ---- nagłówek ---- */
.brand-mark { width: 32px; height: 32px; padding: 6px; border-radius: 10px; background: var(--brand); color: #fff; stroke-width: 1.8; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.progress { height: 2px; }
.progress i { background: var(--brand); }

/* ---- nagłówki sekcji: jedna spójna plakietka i jeden akcent ---- */
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin: 0 auto 14px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-weight: 600; font-size: .875rem; line-height: 1.4; max-width: none; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.hl { color: var(--brand); }
.hl-light { color: var(--brand-on-dark); }

/* ---- HERO ---- */
.hero { position: relative; overflow: hidden; background: #fff; padding-bottom: calc(var(--sec) + 36px); }
.hero > .wrap { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(72px); will-change: transform; animation: blob-drift 18s ease-in-out infinite alternate; }
.b1 { width: min(60vw, 460px); aspect-ratio: 1; left: -14%; top: -6%; background: var(--brand); opacity: .10; }
.b2 { width: min(62vw, 480px); aspect-ratio: 1; right: -20%; top: 20%; background: var(--brand-light); opacity: .16; animation-duration: 22s; }
.b3 { width: min(38vw, 280px); aspect-ratio: 1; left: 16%; bottom: 4%; background: var(--accent); opacity: .10; animation-duration: 20s; }
@keyframes blob-drift { to { translate: 24px 20px; scale: 1.06; } }

.eyebrow { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: .9375rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent); }
.eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.hero h1 .rotor > span { color: var(--brand); }

.hero-visual {
  overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand) 10%, transparent); box-shadow: var(--lift);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-tint) 35%, #fff), var(--brand-tint));   /* jedyny gradient w hero: bardzo delikatny */
}
.hero-visual .cap { stroke: var(--brand); filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--brand) 28%, transparent)); }
.ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--brand) 26%, transparent); translate: -50% -50%; animation: spin 60s linear infinite; pointer-events: none; }
.r1 { width: 60%; aspect-ratio: 1; }
.r2 { width: 92%; aspect-ratio: 1; border-color: color-mix(in srgb, var(--brand) 14%, transparent); animation-duration: 90s; animation-direction: reverse; }
@keyframes spin { to { rotate: 360deg; } }
.spark { position: absolute; width: 12px; height: 12px; background: var(--brand-light); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3.6s ease-in-out infinite; pointer-events: none; }
.s1 { left: 18%; top: 16%; background: var(--accent); }
.s2 { right: 16%; top: 50%; width: 9px; height: 9px; background: var(--brand); animation-delay: -1s; }
.s3 { left: 30%; bottom: 14%; width: 10px; height: 10px; animation-delay: -2s; }
.s4 { right: 30%; top: 12%; width: 8px; height: 8px; background: var(--brand); animation-delay: -.5s; }
@keyframes twinkle { 50% { scale: .5; opacity: .5; } }
.chip i { background: #fff; color: var(--brand); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px color-mix(in srgb, var(--brand) 8%, transparent), 0 12px 24px -12px rgba(17, 20, 28, .35); }

/* fala na dole hero: płynne przejście do pierwszej szarej sekcji */
.wave { --wp: 720px; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; overflow: hidden; pointer-events: none; }
.wave div { position: absolute; left: 0; bottom: 0; height: 100%; width: calc(100% + var(--wp)); background-repeat: repeat-x; background-size: var(--wp) 100%; animation: wave 28s linear infinite; }
.wave div { -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: var(--wp) 100%; mask-size: var(--wp) 100%; }
.wave-a { background-color: color-mix(in srgb, var(--brand) 16%, #fff); opacity: .7; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60C360 0 1080 120 1440 60V120H0Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60C360 0 1080 120 1440 60V120H0Z'/%3E%3C/svg%3E"); }
.wave-b { background-color: var(--c-surface); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 80C300 130 1100 20 1440 80V120H0Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 80C300 130 1100 20 1440 80V120H0Z'/%3E%3C/svg%3E"); animation-duration: 40s; animation-direction: reverse; }
@keyframes wave { to { transform: translateX(calc(var(--wp) * -1)); } }
@media (min-width: 820px) { .wave { --wp: 1440px; height: 90px; } }

/* ---- SEKCJE: naprzemiennie biel i chłodna szarość, nakładające się arkusze ---- */
.sec, .cta { position: relative; overflow: hidden; }
.sec > .wrap, .cta > .wrap { position: relative; z-index: 1; }
#przedmioty, #kroki, #faq { background: var(--c-surface); }
#sciezki, #opinie, #kontakt { background: #fff; }
.cta { background: var(--ink); }
#sciezki, #kroki, #opinie, #faq, #kontakt, .cta, .foot { position: relative; margin-top: -36px; border-radius: 36px 36px 0 0; }
#sciezki, #kroki, #opinie, #faq, #kontakt, .cta { padding-top: calc(var(--sec) + 36px); }

/* miękkie plamy światła: jeden odcień, tylko w czterech miejscach */
.deco, .orb { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; z-index: 0; filter: blur(64px); }
.dB, .dD, .dF, .o3 { display: none; }
.dA { width: 320px; height: 320px; right: -100px; top: -80px; background: var(--brand); opacity: .07; }
.dC { width: 320px; height: 320px; right: -110px; top: 26%; background: var(--brand-light); opacity: .14; }
.dE { width: 320px; height: 320px; right: -100px; top: -60px; background: var(--brand); opacity: .06; }
.dG { width: 320px; height: 320px; right: -110px; bottom: 4%; background: var(--brand-light); opacity: .14; }
.o1 { width: 380px; height: 380px; left: -120px; top: -130px; background: var(--brand); opacity: .45; filter: blur(80px); }
.o2 { width: 420px; height: 420px; right: -140px; bottom: -170px; background: var(--brand-light); opacity: .22; filter: blur(80px); }

.foot { background: var(--ink); color: rgba(255, 255, 255, .62); padding-top: 52px; padding-bottom: calc(120px + var(--safe-b)); }
.foot .brand { color: #fff; }
.foot-row { border-color: rgba(255, 255, 255, .12); }
.foot nav a { transition: color var(--d-fast); }
.foot nav a:hover { color: #fff; }
@media (min-width: 820px) { .foot { padding-bottom: 36px; } }

/* ---- KAFELKI PRZEDMIOTÓW: biała karta, ikona w kolorze marki ---- */
.tile { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--hair); box-shadow: var(--lift); transition: transform var(--d-mid) var(--ease), box-shadow var(--d-slow) var(--ease), border-color var(--d-mid); }
.tile > * { position: relative; z-index: 1; }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--d-slow) var(--ease); background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%); }
.tile .ico { width: 46px; height: 46px; padding: 10px; margin-bottom: 16px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); transition: transform var(--d-mid) var(--ease), background-color var(--d-mid), color var(--d-mid); }
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); box-shadow: var(--lift-hover); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
  .tile:hover::after { opacity: 1; }
  .tile:hover .ico { background: var(--brand); color: #fff; transform: rotate(-6deg) scale(1.06); }
}

/* ---- POZIOMY: jeden wygląd panelu dla wszystkich poziomów ---- */
.tabs { background: var(--c-surface-2); }
.tab-ind { background: #fff; box-shadow: 0 2px 8px rgba(17, 20, 28, .14); transition: transform 420ms var(--ease), width 420ms var(--ease); }
.tab-ind::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 14px; height: 2px; border-radius: 2px; background: var(--accent); translate: -50% 0; }
.tabs button[aria-selected="true"] { color: var(--c-text); }
.panel { position: relative; overflow: hidden; background: var(--c-surface); border: 1px solid var(--hair); }
.panel > *:not(.art) { position: relative; z-index: 1; }
.panel .art { position: absolute; right: -14px; top: -14px; width: 150px; height: 150px; color: var(--brand); opacity: .10; stroke-width: 1; rotate: 12deg; }
.checks li { position: relative; }
.checks li::before { background: var(--brand-tint); }
.checks li::after { content: ""; position: absolute; left: 8px; top: 50%; width: 5px; height: 9px; border: solid var(--brand); border-width: 0 2px 2px 0; translate: 0 -64%; rotate: 45deg; }

/* ---- KROKI: białe karty, liczby i oś w kolorze marki ---- */
.num { color: var(--brand); }
.steps li { background: #fff; border: 1px solid var(--hair); border-radius: 22px; padding: 18px 20px 22px; box-shadow: var(--lift); }
.steps::before { background: rgba(17, 20, 28, .10); }
.steps::after { background: var(--brand); }
.steps li::before { top: 22px; background: #fff; border-color: rgba(17, 20, 28, .18); }
.steps li.in::before { background: var(--brand); border-color: var(--brand); }
@media (min-width: 820px) { .steps li { border-top: 1px solid var(--hair); padding: 26px 26px 30px; } }

/* ---- OPINIE ---- */
.review { position: relative; overflow: hidden; background: var(--c-surface); border: 1px solid var(--hair); }
.review::before { content: "\201C"; position: absolute; right: 18px; top: 4px; font: 700 5.5rem/1 Georgia, serif; color: var(--brand); opacity: .12; pointer-events: none; }
.stars { color: var(--accent-ink); }
.review figcaption { display: flex; align-items: center; gap: 10px; color: var(--c-text); font-weight: 500; }
.av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 600; background: var(--brand); }
.dot[aria-current="true"]::before { background: var(--brand); }

/* ---- CTA ---- */
.cta .btn { box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55); }

/* ---- FAQ ---- */
.faq { border-top: 0; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--hair); border-radius: 20px; padding: 0 22px; box-shadow: var(--lift); transition: box-shadow var(--d-slow) var(--ease), border-color var(--d-mid); }
.faq-item.open { border-color: color-mix(in srgb, var(--brand) 25%, transparent); box-shadow: var(--lift-hover); }
.faq-q::after { background: var(--brand); }

/* ---- FORMULARZ ---- */
.form { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--hair); box-shadow: var(--lift); padding-top: 30px; }
.form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand); }
input, select, textarea { background-color: var(--c-surface); border-color: #d5d9e0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); background-color: #fff; }
@media (min-width: 560px) { .form { padding-top: 38px; } }

/* ---- DESKTOP: nawigacja ---- */
@media (min-width: 820px) {
  .nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform var(--d-mid) var(--ease); }
  .nav a:not(.nav-cta):hover::after, .nav a[aria-current="true"]:not(.nav-cta)::after { transform: scaleX(1); }
  .js .nav a, .nav a { position: relative; }
  .js .nav a.nav-cta, .nav a.nav-cta { color: var(--on-accent); background: var(--accent); padding: 0 18px; min-height: 38px; border-radius: 999px; transition: background-color var(--d-mid), transform var(--d-mid) var(--ease); }
  .js .nav a.nav-cta:hover, .nav a.nav-cta:hover { color: var(--on-accent); background: var(--accent-hover); }
}

/* ---- płynniejsze odsłanianie przy przewijaniu ---- */
.js .reveal { transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }

/* ==========================================================
   PŁYWAJĄCY PASEK DOLNY (telefon): szkło + kolor marki
   ========================================================== */
.tabbar { display: none; }
@media (max-width: 819.98px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 35; height: 64px; padding: 6px; border-radius: 30px;
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + var(--safe-b));
    background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(200%) blur(24px); backdrop-filter: saturate(200%) blur(24px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 0 0 1px rgba(17, 20, 28, .07), 0 14px 34px -10px rgba(17, 20, 28, .3), 0 2px 6px rgba(17, 20, 28, .06);
    transform: translateY(170%); transition: transform 600ms var(--ease);
  }
  .tabbar.ready { transform: none; }
  body.typing .tabbar, body.menu-open .tabbar { transform: translateY(170%); }
  .tb-ind {
    position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 24px; background: var(--brand-tint);
    transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 520ms cubic-bezier(.34, 1.25, .64, 1), opacity 240ms;
  }
  .tabbar.on-cta .tb-ind { opacity: 0; }
  .tb { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 24px; color: #5a6070; font-size: .6875rem; font-weight: 600; letter-spacing: .01em; transition: color 240ms, transform 160ms var(--ease); }
  .tb:active { transform: scale(.92); }
  .tb .ico { width: 24px; height: 24px; stroke-width: 1.7; transition: transform 380ms var(--ease); }
  .tb[aria-current] { color: var(--brand); }
  .tb:not(.tb-cta)[aria-current] .ico { transform: translateY(-1px) scale(1.12); }
  .tb-orb { display: grid; place-items: center; width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; color: var(--on-accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 255, 255, .95), 0 12px 22px -8px color-mix(in srgb, var(--accent) 65%, transparent); transition: transform 380ms var(--ease); }
  .tb-orb .ico { stroke-width: 1.9; }
  .tb-cta[aria-current] .tb-orb { transform: scale(1.08) rotate(-6deg); }
  .tb-cta { color: var(--accent-ink); }
}
@media (min-width: 820px) { .tabbar { display: none; } }

/* ---- reduced motion dla nowych warstw ---- */
@media (prefers-reduced-motion: reduce) {
  .blob, .ring, .spark, .wave div { animation: none !important; }
  .tabbar { transform: none; }
  .tb-ind { transition: none; }
  .tile::after { display: none; }
}

/* drobne poprawki */
.head .kicker { margin: 0 auto 14px; }
@media (min-width: 820px) { .dots { display: none; } }

/* ==========================================================
   8. PRZEJŚCIE MOTYWU
   Płynne przenikanie starego i nowego widoku (View Transitions),
   bez animowania odcieni. Pasek zakładek zostaje żywy i sam przesuwa wskaźnik.
   ========================================================== */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: ease; }
.tabs-wrap { view-transition-name: level-tabs; }
::view-transition-group(level-tabs), ::view-transition-new(level-tabs) { animation: none; }
::view-transition-old(level-tabs) { display: none; }
/* zapas dla przeglądarek bez View Transitions: krótkie przyciemnienie i powrót */
@keyframes theme-in { from { opacity: .55; } to { opacity: 1; } }
.theme-swap main, .theme-swap .foot { animation: theme-in 280ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .theme-swap main, .theme-swap .foot { animation: none; }
}
