/* =============================================================================
   TSoftware — styles.css
   Koncepcja: „control room”. Głęboki granat, światło shaderowe w hero,
   monospace jako etykiety systemowe, jedna scena sterowana scrollem.
   ============================================================================= */

:root {
  color-scheme: dark;

  /* Kolory */
  --bg: #070b16;
  --bg-2: #0b1222;
  --surface: #0f172b;
  --surface-2: #152038;
  --line: rgb(var(--line-rgb) / 0.13);
  --line-strong: rgb(var(--line-rgb) / 0.28);
  --fg: #e9eef9;
  --fg-muted: #a3afc9;
  --fg-dim: #74809c;
  --accent: #78a2ff;
  --accent-strong: #3f6ff5;
  --accent-soft: rgb(var(--accent-rgb) / 0.14);
  --signal: #ffb45c;
  --ok: #4fd1a0;
  --accent-hover: #4b79ff;
  --packet: #ffffff;
  --btn-fg: #ffffff;

  /* składowe RGB do półprzezroczystości i poświat */
  --accent-rgb: 120 162 255;
  --accent-strong-rgb: 63 111 245;
  --signal-rgb: 255 180 92;
  --ok-rgb: 79 209 160;
  --line-rgb: 156 178 224;
  --ink-rgb: 255 255 255;
  --bg-rgb: 7 11 22;
  --bg2-rgb: 11 18 34;
  --surface-rgb: 15 23 43;
  --surface2-rgb: 21 32 56;
  --shadow-k: 1;
  --grain-blend: screen;
  --grain-opacity: 0.07;

  /* kolory shadera w hero (hex, czytane w JS) */
  --shader-bg: #070b16;
  --shader-a: #3f6ff5;
  --shader-b: #78a2ff;
  --shader-c: #ffb45c;
  --shader-light: 0;
  --neon: #22e5ff;
  --neon-2: #ff3d9a;
  --neon-rgb: 34 229 255;

  /* Typografia */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Układ */
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1180px;
  --section: clamp(64px, 9vw, 120px);
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ----------------------------------------------------------------------------
   Warianty kolorystyczne (przełącznik w prawym dolnym rogu, wersja szkicowa)
   ---------------------------------------------------------------------------- */
:root[data-theme="slate"] {
  --bg: #141c31;
  --bg-2: #182239;
  --surface: #1f2a46;
  --surface-2: #273556;
  --line: rgb(170 190 230 / 0.16);
  --line-strong: rgb(170 190 230 / 0.32);
  --fg: #f1f4fc;
  --fg-muted: #b7c1da;
  --fg-dim: #8b97b4;
  --accent: #8fb3ff;
  --accent-strong: #4a7bff;
  --accent-hover: #5c89ff;
  --accent-soft: rgb(120 162 255 / 0.16);
  --signal: #ffbd70;
  --ok: #5fe0b0;
  --accent-rgb: 143 179 255;
  --accent-strong-rgb: 74 123 255;
  --signal-rgb: 255 189 112;
  --ok-rgb: 95 224 176;
  --line-rgb: 170 190 230;
  --bg-rgb: 20 28 49;
  --bg2-rgb: 24 34 57;
  --surface-rgb: 31 42 70;
  --surface2-rgb: 39 53 86;
  --shadow-k: 0.8;
  --shader-bg: #141c31;
  --shader-a: #4a7bff;
  --shader-b: #8fb3ff;
  --shader-c: #ffbd70;
  --neon: #22e5ff;
  --neon-2: #ff3d9a;
  --neon-rgb: 34 229 255;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc;
  --bg-2: #edf1f9;
  --surface: #ffffff;
  --surface-2: #f3f6fd;
  --line: rgb(30 50 100 / 0.12);
  --line-strong: rgb(30 50 100 / 0.24);
  --fg: #0f1830;
  --fg-muted: #4b5775;
  --fg-dim: #7a86a3;
  --accent: #2b55e6;
  --accent-strong: #2f5bff;
  --accent-hover: #1f4ae6;
  --accent-soft: rgb(47 91 255 / 0.1);
  --signal: #c96b00;
  --ok: #0f9d6e;
  --packet: #2f5bff;
  --accent-rgb: 47 91 255;
  --accent-strong-rgb: 47 91 255;
  --signal-rgb: 230 140 40;
  --ok-rgb: 15 157 110;
  --line-rgb: 30 50 100;
  --ink-rgb: 15 24 48;
  --bg-rgb: 245 247 252;
  --bg2-rgb: 237 241 249;
  --surface-rgb: 255 255 255;
  --surface2-rgb: 243 246 253;
  --shadow-k: 0.22;
  --grain-blend: multiply;
  --grain-opacity: 0.05;
  --shader-bg: #f5f7fc;
  --shader-a: #2f5bff;
  --shader-b: #7fb0ff;
  --shader-c: #ffb45c;
  --shader-light: 1;
  --neon: #0891b2;
  --neon-2: #db2777;
  --neon-rgb: 8 145 178;
}

:root[data-theme="warm"] {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-2: #f3efe6;
  --surface: #ffffff;
  --surface-2: #f7f3eb;
  --line: rgb(60 50 30 / 0.12);
  --line-strong: rgb(60 50 30 / 0.24);
  --fg: #1b1a17;
  --fg-muted: #5a564d;
  --fg-dim: #8a8577;
  --accent: #0e7c86;
  --accent-strong: #0f8a95;
  --accent-hover: #0c7681;
  --accent-soft: rgb(14 124 134 / 0.1);
  --signal: #d4541f;
  --ok: #2a9d5c;
  --packet: #0f8a95;
  --accent-rgb: 14 124 134;
  --accent-strong-rgb: 15 138 149;
  --signal-rgb: 226 87 42;
  --ok-rgb: 42 157 92;
  --line-rgb: 60 50 30;
  --ink-rgb: 27 26 23;
  --bg-rgb: 250 248 243;
  --bg2-rgb: 243 239 230;
  --surface-rgb: 255 255 255;
  --surface2-rgb: 247 243 235;
  --shadow-k: 0.22;
  --grain-blend: multiply;
  --grain-opacity: 0.06;
  --shader-bg: #faf8f3;
  --shader-a: #0f8a95;
  --shader-b: #7fd3c8;
  --shader-c: #e2572a;
  --shader-light: 1;
  --neon: #0e7c86;
  --neon-2: #d4541f;
  --neon-rgb: 14 124 134;
}

/* ----------------------------------------------------------------------------
   Reset i podstawy
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* ziarno (tekstura generowana w JS, patrz --grain) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: var(--grain, none);
  background-size: 180px 180px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent-strong);
  color: var(--btn-fg);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* ----------------------------------------------------------------------------
   Kursor (desktop) i pasek postępu
   ---------------------------------------------------------------------------- */
.cursor-glow {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--accent-strong-rgb) / 0.16), transparent 70%);
  pointer-events: none;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .js .cursor-glow { display: block; }
}

.scroll-progress {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent), var(--signal));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* ----------------------------------------------------------------------------
   Przyciski
   ---------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.btn--primary {
  background: var(--accent-strong);
  color: var(--btn-fg);
  box-shadow: 0 8px 24px -10px rgb(var(--accent-strong-rgb) / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.18);
  overflow: hidden;
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 34px -10px rgb(var(--accent-strong-rgb) / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn--ghost {
  background: rgb(var(--ink-rgb) / 0.02);
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.btn--lg { padding: 15px 24px; font-size: 1.04rem; }

/* ----------------------------------------------------------------------------
   Nagłówek
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgb(var(--bg-rgb) / 0.66);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__tld { color: var(--fg-dim); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover,
.nav a.is-active { color: var(--fg); background: rgb(var(--ink-rgb) / 0.05); }

.header-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: rgb(var(--bg2-rgb) / 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgb(0 0 0 / calc(0.8 * var(--shadow-k)));
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 12px; font-size: 1.02rem; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .header-cta .btn { display: none; }
}

/* ----------------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: center;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 110px);
  overflow: hidden;
  isolation: isolate;
  /* fallback, gdy WebGL jest niedostępny */
  background:
    radial-gradient(900px 600px at 78% 30%, rgb(var(--accent-strong-rgb) / 0.28), transparent 65%),
    radial-gradient(600px 500px at 20% 90%, rgb(var(--signal-rgb) / 0.08), transparent 70%),
    var(--bg);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgb(var(--line-rgb) / 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--line-rgb) / 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 65%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 65%);
  opacity: 0.5;
  pointer-events: none;
}
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 180px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(0, 0.48fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  pointer-events: none;
}
.hero__copy { min-width: 0; pointer-events: auto; }
.hero__scene-space { min-height: 1px; }
.hero__hint {
  position: absolute;
  left: var(--gutter);
  bottom: 18px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
}
.hero__hint .ic { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .hero__hint { display: inline-flex; } }
.hero--nogl .hero__canvas, .hero--nogl .scene-labels { display: none; }
@media (max-width: 960px) {
  .hero { min-height: 0; padding-bottom: 24px; }
  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__scene-space { min-height: min(118vw, 520px); }
  .scene-label { padding: 5px 9px 5px 7px; }
  .scene-label__head { font-size: 0.66rem; }
  .scene-label__head .ic { width: 12px; height: 12px; }
  .scene-core { width: 74px; height: 74px; }
  .scene-core b { font-size: 1.2rem; }
  .scene-core small { font-size: 0.52rem; }
  .hero__hint { display: none; }
}
.hero__title {
  margin-top: 20px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 14ch;
}
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .w__i { display: inline-block; }
.hero__title .w--accent { color: var(--accent); }
.js .hero__title:not(.is-in) { opacity: 0; }
.js .hero__title:not(.is-in) .w__i { transform: translateY(110%); }
.hero__title.is-in .w__i { transition: transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.hero__title em { font-style: normal; color: var(--accent); }

.hero__lead {
  margin-top: 22px;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--fg-muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg);
}
.hero__facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 8px 11px;
  border: 1px solid rgb(var(--ok-rgb) / 0.4);
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -14px rgb(0 0 0 / calc(0.9 * var(--shadow-k))), inset 0 0 0 1px rgb(var(--ok-rgb) / 0.08);
}
.hero__facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
  box-shadow: 0 0 8px rgb(var(--ok-rgb) / 0.7);
}

/* wejście elementów hero */
.js [data-rise]:not(.is-in) { opacity: 0; transform: translateY(18px); }
[data-rise].is-in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }

/* Scena 3D: etykiety hubów, rdzeń, zdarzenia (pozycje z hero-scene.js) */
.scene-labels {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
.scene-labels.is-ready { opacity: 1; }
.scene-label, .scene-core, .scene-card {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.scene-label {
  display: grid;
  gap: 3px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgb(var(--neon-rgb) / 0.4);
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.86), rgb(var(--bg-rgb) / 0.78));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  color: var(--fg);
  white-space: nowrap;
  box-shadow: 0 12px 30px -16px rgb(0 0 0 / calc(0.9 * var(--shadow-k))), inset 0 0 24px rgb(var(--neon-rgb) / 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.scene-label::before, .scene-label::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--neon);
  opacity: 0.9;
}
.scene-label::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 3px; }
.scene-label::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 3px; }
.scene-label__head { display: flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 500; letter-spacing: 0.04em; }
.scene-label__head .ic { width: 14px; height: 14px; color: var(--accent); }
.scene-label__meta { font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--neon); opacity: 0.9; }
.scene-label__meta.is-tick { animation: metaTick 0.5s var(--ease-out); }
@keyframes metaTick { 0% { color: var(--signal); transform: translateX(3px); } 100% { transform: none; } }
.scene-label.is-hit { animation: labelHit 1.4s ease-out; }
@keyframes labelHit {
  0% { border-color: var(--signal); box-shadow: 0 0 0 0 rgb(var(--signal-rgb) / 0.55), 0 0 34px -4px rgb(var(--signal-rgb) / 0.9); }
  100% { border-color: rgb(var(--neon-rgb) / 0.4); box-shadow: 0 0 0 16px rgb(var(--signal-rgb) / 0), 0 12px 30px -16px rgb(0 0 0 / calc(0.9 * var(--shadow-k))); }
}
.scene-core {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgb(var(--accent-rgb) / 0.55);
  background: radial-gradient(circle at 50% 40%, rgb(var(--accent-strong-rgb) / 0.4), rgb(var(--surface-rgb) / 0.65) 70%);
  box-shadow: 0 0 70px -10px rgb(var(--accent-strong-rgb) / 0.9), inset 0 0 26px rgb(var(--accent-rgb) / 0.28);
  text-align: center;
  line-height: 1;
}
.scene-core::before, .scene-core::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  animation: coreRing 3.2s ease-out infinite;
}
.scene-core::after { animation-delay: 1.6s; }
@keyframes coreRing { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
.scene-core__orbit {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px dashed rgb(var(--neon-rgb) / 0.55);
  animation: orbitSpin 14s linear infinite;
}
.scene-core__orbit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px 2px rgb(var(--neon-rgb) / 0.8);
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.scene-core b { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.02em; color: var(--fg); }
.scene-core small { margin-top: 5px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* karta zdarzenia (hologram) */
.scene-card {
  display: grid;
  gap: 6px;
  min-width: 230px;
  max-width: 280px;
  padding: 10px 12px 9px;
  border: 1px solid rgb(var(--neon-rgb) / 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0.92), rgb(var(--surface-rgb) / 0.9));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgb(var(--neon-rgb) / 0.12), 0 20px 50px -20px rgb(0 0 0 / calc(0.95 * var(--shadow-k))), 0 0 60px -14px rgb(var(--neon-rgb) / 0.55);
  overflow: hidden;
}
.scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgb(var(--neon-rgb) / 0.05) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.scene-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgb(var(--neon-rgb) / 0.22), transparent);
  pointer-events: none;
}
.scene-card.is-on { opacity: 1; animation: holoIn 0.5s var(--ease-out); }
.scene-card.is-on::after { animation: holoSweep 0.9s ease-out; }
@keyframes holoIn {
  0% { clip-path: inset(0 0 100% 0); transform: translate(-50%, -100%) translateY(6px); }
  45% { clip-path: inset(0 0 0 0); }
  55% { transform: translate(-50%, -100%) translateX(-2px); }
  100% { clip-path: inset(0 0 0 0); }
}
@keyframes holoSweep { from { top: -40%; } to { top: 120%; } }
.scene-card__head { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.scene-card__head span { overflow: hidden; text-overflow: ellipsis; }
.scene-card__rows div { white-space: nowrap; }
.scene-card__rows span:last-child { overflow: hidden; text-overflow: ellipsis; }
.scene-card__head i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px rgb(var(--signal-rgb) / 0.9); flex: none; }
.scene-card.is-ok .scene-card__head i { background: var(--ok); box-shadow: 0 0 8px rgb(var(--ok-rgb) / 0.9); }
.scene-card.is-ai .scene-card__head i { background: var(--neon); box-shadow: 0 0 8px rgb(var(--neon-rgb) / 0.9); }
.scene-card__head em { margin-left: auto; font-style: normal; font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }
.scene-card__rows { display: grid; gap: 3px; }
.scene-card__rows div { display: flex; justify-content: space-between; gap: 14px; }
.scene-card__rows span:first-child { color: var(--fg-dim); }
.scene-card__rows span:last-child { color: var(--fg); font-variant-numeric: tabular-nums; }
.scene-card__foot { padding-top: 6px; border-top: 1px dashed rgb(var(--neon-rgb) / 0.3); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--neon); }
.scene-card.is-ok .scene-card__foot { color: var(--ok); }
.scene-card.is-ai .scene-card__foot { color: var(--signal); }
@media (max-width: 960px) {
  .scene-label__meta { display: none; }
  .scene-card { min-width: 180px; max-width: 220px; font-size: 0.62rem; padding: 8px 10px 7px; }
  .scene-card__rows div:nth-child(n+3) { display: none; }
}

/* kursor: kropka + pierścień (tylko desktop) */
.cursor-ring, .cursor-dot {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgb(var(--accent-rgb) / 0.8);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), margin 0.25s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
}
.cursor-ring.is-link { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgb(var(--accent-rgb) / 0.12); border-color: rgb(var(--accent-rgb) / 0.4); }
.cursor-ring.is-drag { width: 70px; height: 70px; margin: -35px 0 0 -35px; border-style: dashed; }
.cursor-ring.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor-ring, .js .cursor-dot { display: block; }
}

/* ----------------------------------------------------------------------------
   Pasek narzędzi (marquee)
   ---------------------------------------------------------------------------- */
.tools {
  padding-block: 20px;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.tools__inner { display: flex; align-items: center; gap: 24px; min-width: 0; }
.tools__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 10px;
  width: max-content;
  list-style: none;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: rgb(var(--ink-rgb) / 0.015);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 5px)); }
}
@media (max-width: 640px) {
  .tools__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .marquee { width: 100%; }
}

/* ----------------------------------------------------------------------------
   Sekcje i ujawnianie na scroll
   ---------------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section__head h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.section__head > p { max-width: 52ch; color: var(--fg-muted); font-size: 1.05rem; }
@media (max-width: 800px) { .section__head { grid-template-columns: 1fr; } }

.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(22px); }
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
/* nagłówki: słowa wjeżdżają spod maski */
[data-words-scroll] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.1em; margin-bottom: -0.1em; }
[data-words-scroll] .w__i { display: inline-block; }
.js [data-words-scroll]:not(.is-in) { opacity: 0; }
.js [data-words-scroll]:not(.is-in) .w__i { transform: translateY(110%); }
[data-words-scroll].is-in .w__i { transition: transform 0.8s var(--ease-out); transition-delay: var(--d, 0s); }

/* Karty ze „spotlight” pod kursorem */
[data-spotlight] { position: relative; overflow: hidden; }
[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--accent-rgb) / 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
[data-spotlight]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--accent-rgb) / 0.9), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
[data-spotlight]:hover::before, [data-spotlight]:hover::after { opacity: 1; }
[data-spotlight] > * { position: relative; z-index: 1; }

/* Usługi */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 24px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.4s var(--ease-out), background-color 0.3s ease, opacity 0.7s ease;
}
.service:hover { border-color: rgb(var(--accent-rgb) / 0.35); background: var(--surface-2); transform: translateY(-4px); }
.service__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.18);
}
.service__icon svg { width: 22px; height: 22px; }
.service h3 { font-size: 1.15rem; font-weight: 600; }
.service p { flex: 1; color: var(--fg-muted); font-size: 0.95rem; }
.service__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service__tags span {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgb(var(--ink-rgb) / 0.045);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-dim);
}
@media (max-width: 1100px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   Scena sterowana scrollem („Jak to działa”)
   ---------------------------------------------------------------------------- */
.stage { position: relative; background: var(--bg-2); border-block: 1px solid var(--line); }
.stage__track { height: 420vh; }
.stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--header-h) * 0.6);
  background:
    radial-gradient(700px 500px at 75% 50%, rgb(var(--accent-strong-rgb) / 0.12), transparent 65%),
    var(--bg-2);
}
.stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(var(--container), 100% - 2 * var(--gutter));
}
.stage__readout { min-width: 0; }

.stage__hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.hud__item b { font-weight: 500; color: var(--fg); margin-left: 6px; }
.hud__item--ring { display: inline-flex; align-items: center; gap: 8px; }
.hud__item--ring svg { width: 22px; height: 22px; transform: rotate(-90deg); }
.hud__ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 3; }
.hud__ring { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; }
.hud__item--ring b { margin: 0; font-variant-numeric: tabular-nums; }

.stage__steps { position: relative; margin-top: 22px; min-height: 240px; }
.stage__step {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transform: translateY(18px);
  visibility: hidden;
  transition: opacity 0.45s ease, transform 0.6s var(--ease-out), visibility 0s linear 0.45s;
  pointer-events: none;
}
.stage__step.is-active {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.5s ease 0.1s, transform 0.7s var(--ease-out) 0.1s, visibility 0s;
  pointer-events: auto;
}
.stage__step.is-prev { transform: translateY(-14px); }
.stage__kind {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
}
.stage__step h2 { margin-top: 10px; font-size: clamp(1.6rem, 3vw, 2.5rem); }
.stage__step p { margin-top: 14px; max-width: 46ch; color: var(--fg-muted); }
.stage__num { white-space: nowrap; color: var(--accent); font-variant-numeric: tabular-nums; }
.stage__result { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 18px; }
.stage__result > div { display: grid; }
.stage__result b {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}
.stage__result span { margin-top: 6px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); }
.stage__step--done .btn { margin-top: 22px; }

.stage__log {
  display: grid;
  gap: 3px;
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(var(--bg-rgb) / 0.7);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  min-height: calc(6 * 1.5em + 26px);
}
.stage__log span { opacity: 0; transform: translateX(-6px); transition: opacity 0.35s ease, transform 0.45s var(--ease-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__log span.is-shown { opacity: 1; transform: none; }
.stage__log span.is-last { color: var(--fg-muted); }

/* diagram */
.stage__viz { min-width: 0; }
.viz {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: calc(100svh - 120px);
  margin-inline: auto;
}
.viz__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  opacity: 0.9;
}
.viz__corner--tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.viz__corner--tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.viz__corner--bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.viz__corner--br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.viz__paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.viz__base {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
  vector-effect: non-scaling-stroke;
  animation: dashflow 1.6s linear infinite;
}
@keyframes dashflow { to { stroke-dashoffset: -10; } }
.viz__lit {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.45; /* jednostki viewBox: dasharray i offset liczone w JS w tych samych jednostkach */
  stroke-linecap: round;
}
@media (hover: hover) { .viz__lit { filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.85)); } }

.vnode {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  width: clamp(150px, 42%, 230px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgb(var(--surface-rgb) / 0.92);
  box-shadow: 0 16px 40px -20px rgb(0 0 0 / calc(0.9 * var(--shadow-k)));
  transition: border-color 0.4s ease, box-shadow 0.5s ease, background-color 0.4s ease;
}
.vnode__kind { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); transition: color 0.4s ease; }
.vnode__title { grid-column: 1; font-weight: 600; font-size: clamp(0.82rem, 1.1vw, 0.95rem); line-height: 1.25; color: var(--fg-muted); transition: color 0.4s ease; }
.vnode__dot {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color 0.4s ease, box-shadow 0.5s ease;
}
.vnode.is-on { border-color: rgb(var(--accent-rgb) / 0.7); background: rgb(var(--surface2-rgb) / 0.96); }
.vnode.is-on .vnode__kind { color: var(--accent); }
.vnode.is-on .vnode__title { color: var(--fg); }
.vnode.is-on .vnode__dot { background: var(--accent); box-shadow: 0 0 10px 2px rgb(var(--accent-rgb) / 0.6); }
.vnode.is-live { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.14), 0 0 46px -8px rgb(var(--accent-rgb) / 0.8), 0 16px 40px -20px rgb(0 0 0 / calc(0.9 * var(--shadow-k))); }
.vnode.is-live .vnode__dot { animation: ping 1.4s ease-out infinite; }
.viz.is-done .vnode { border-color: rgb(var(--ok-rgb) / 0.6); }
.viz.is-done .vnode__dot { background: var(--ok); box-shadow: 0 0 10px 2px rgb(var(--ok-rgb) / 0.55); animation: none; }
.viz.is-done .vnode__kind { color: var(--ok); }
.viz.is-done .viz__lit { stroke: var(--ok); }

.packet {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--packet);
  box-shadow: 0 0 0 3px rgb(var(--signal-rgb) / 0.35), 0 0 18px 4px rgb(var(--signal-rgb) / 0.75);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.packet.is-visible { opacity: 1; }

.viz__done {
  position: absolute;
  left: 74%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgb(var(--ok-rgb) / 0.55);
  border-radius: 999px;
  background: rgb(var(--bg-rgb) / 0.85);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out);
  box-shadow: 0 0 40px -6px rgb(var(--ok-rgb) / 0.5);
}
.viz__done i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='black'/><path d='M4.5 8.2l2.4 2.4 4.6-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='black'/><path d='M4.5 8.2l2.4 2.4 4.6-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}
.viz.is-done .viz__done { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* bez JS / ograniczony ruch: scena pokazuje stan końcowy w normalnym przepływie */
html:not(.js) .stage__track, .stage.is-static .stage__track { height: auto; }
html:not(.js) .stage__sticky, .stage.is-static .stage__sticky { position: static; height: auto; padding-block: var(--section); }
html:not(.js) .stage__step, .stage.is-static .stage__step { position: static; opacity: 1; transform: none; visibility: visible; margin-top: 18px; }
html:not(.js) .stage__log span, .stage.is-static .stage__log span { opacity: 1; transform: none; }
html:not(.js) .vnode, .stage.is-static .vnode { border-color: rgb(var(--accent-rgb) / 0.7); }

@media (max-width: 960px) {
  .stage__track { height: 380vh; }
  .stage__sticky { padding-top: 0; align-items: stretch; }
  .stage__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    align-content: start;
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: 16px;
    height: 100%;
  }
  .stage__readout { order: 1; }
  .stage__viz { order: 2; display: grid; align-items: center; min-height: 0; }
  .stage__hud { margin-top: 10px; gap: 6px 14px; font-size: 0.66rem; }
  .stage__steps { margin-top: 12px; min-height: 150px; }
  .stage__step h2 { font-size: clamp(1.35rem, 5.4vw, 1.8rem); margin-top: 6px; }
  .stage__step p { margin-top: 8px; font-size: 0.92rem; }
  .stage__result { gap: 10px 24px; margin-top: 10px; }
  .stage__result b { font-size: 1.4rem; }
  .stage__step--done .btn { margin-top: 12px; padding: 10px 16px; font-size: 0.9rem; }
  .stage__step--done p { display: none; }
  .stage__log { display: none; }
  .viz { aspect-ratio: 5 / 4; max-height: 100%; width: min(100%, 520px); }
  .vnode { width: clamp(132px, 44%, 200px); padding: 8px 10px; border-radius: 10px; }
  .vnode__title { font-size: 0.78rem; }
  .vnode__kind { font-size: 0.58rem; }
  .vnode__dot { width: 7px; height: 7px; }
  .viz__done { font-size: 0.64rem; padding: 8px 12px; }
}
@media (max-width: 960px) and (max-height: 640px) {
  .stage__step p { display: none; }
  .stage__steps { min-height: 96px; }
}

/* ----------------------------------------------------------------------------
   Współpraca: kroki z linią postępu
   ---------------------------------------------------------------------------- */
.steps-wrap { position: relative; }
.steps__line {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 38px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.steps__line i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.8);
}
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; list-style: none; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.4s ease, opacity 0.7s ease, transform 0.9s var(--ease-out);
}
.step.is-lit { border-color: rgb(var(--accent-rgb) / 0.4); }
.step__num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.step__num i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.step.is-lit .step__num i { background: var(--accent); box-shadow: 0 0 10px 2px rgb(var(--accent-rgb) / 0.55); }
.step h3 { margin-top: 12px; font-size: 1.15rem; font-weight: 600; }
.step p { flex: 1; margin-top: 10px; font-size: 0.95rem; color: var(--fg-muted); }
.step__time {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--fg-dim);
}
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps__line { display: none; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.pillar { min-width: 0; }
.pillar::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 14px; background: var(--accent); }
.pillar h3 { font-size: 1.05rem; font-weight: 600; }
.pillar p { margin-top: 8px; font-size: 0.93rem; color: var(--fg-muted); }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   Zastosowania
   ---------------------------------------------------------------------------- */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.case {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.4s var(--ease-out), opacity 0.7s ease;
}
.case:hover { border-color: rgb(var(--accent-rgb) / 0.35); transform: translateY(-3px); }
.case h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }
.case h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.7); }
.case ul { display: grid; gap: 8px; margin-top: 14px; list-style: none; }
.case li { position: relative; padding-left: 16px; font-size: 0.93rem; color: var(--fg-muted); }
.case li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 1px; background: var(--fg-dim); }
@media (max-width: 960px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cases { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   FAQ
   ---------------------------------------------------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px 64px;
  align-items: start;
}
.faq-layout h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.faq-layout__lead { margin-top: 16px; max-width: 36ch; color: var(--fg-muted); }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.3s ease, opacity 0.7s ease, transform 0.9s var(--ease-out); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 20px; max-width: 70ch; font-size: 0.97rem; color: var(--fg-muted); }
@media (max-width: 800px) { .faq-layout { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   Kontakt
   ---------------------------------------------------------------------------- */
.contact-section {
  background:
    radial-gradient(800px 500px at 85% 100%, rgb(var(--accent-strong-rgb) / 0.14), transparent 65%),
    var(--bg-2);
}
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.contact__intro { min-width: 0; }
.contact__intro h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.contact__lead { margin-top: 16px; max-width: 46ch; color: var(--fg-muted); }
.contact__details { display: grid; gap: 14px; margin: 32px 0 0; }
.contact__details > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; font-size: 0.97rem; }
.contact__details dt { padding-top: 4px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.contact__details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.contact__details a { border-bottom: 1px solid var(--line-strong); transition: border-color 0.15s ease; }
.contact__details a:hover { border-color: var(--accent); }

.form {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: rgb(var(--surface-rgb) / 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 0.86rem; font-weight: 500; color: var(--fg-muted); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-dim); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; line-height: 1.5; color: var(--fg-dim); }
.form__consent input { margin-top: 4px; flex: none; accent-color: var(--accent-strong); }
.form__consent a { color: var(--fg-muted); border-bottom: 1px solid var(--line-strong); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__status { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--fg-muted); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
  .contact__details > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ----------------------------------------------------------------------------
   Stopka
   ---------------------------------------------------------------------------- */
.site-footer { padding-block: 48px 28px; background: var(--bg); border-top: 1px solid var(--line); }
.site-footer .container { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.footer__brand { min-width: 0; }
.footer__brand p { margin-top: 16px; max-width: 40ch; font-size: 0.94rem; color: var(--fg-muted); }
.site-footer h4 { font-family: var(--font-mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); }
.site-footer ul { display: grid; gap: 8px; margin-top: 14px; list-style: none; }
.site-footer ul a { font-size: 0.94rem; color: var(--fg-muted); transition: color 0.15s ease; }
.site-footer ul a:hover { color: var(--fg); }
.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
}
@media (max-width: 760px) {
  .site-footer .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------------------
   Dostępność: ograniczony ruch
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-glow, .cursor-ring, .cursor-dot { display: none !important; }
  .js [data-reveal]:not(.is-in), .js [data-rise]:not(.is-in) { opacity: 1; transform: none; }
  .js [data-words-scroll]:not(.is-in), .js .hero__title:not(.is-in) { opacity: 1; }
  .js [data-words-scroll]:not(.is-in) .w__i, .js .hero__title:not(.is-in) .w__i { transform: none; }
}

/* =============================================================================
   v0.3 — grafiki: ikony, ilustracje usług, przepływy, mapa integracji
   ============================================================================= */
.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Ilustracje usług ---------- */
.service__art {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  background:
    linear-gradient(rgb(var(--line-rgb) / 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgb(var(--line-rgb) / 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(120px 70px at 50% 50%, rgb(var(--accent-strong-rgb) / 0.16), transparent 70%),
    rgb(var(--bg-rgb) / 0.55);
  border: 1px solid var(--line);
  overflow: visible;
}
.service__art * { transform-box: fill-box; }
.art-line { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 5; animation: dashflow 1.2s linear infinite; }
.art-line2 { fill: none; stroke: var(--line); stroke-width: 1.5; }
.art-node { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.5; stroke-opacity: 0.55; animation: artPulse 2.4s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 0.8s); }
.art-mini { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.art-dot { fill: var(--signal); filter: drop-shadow(0 0 5px rgb(var(--signal-rgb) / 0.9)); }
.art-dot--b { fill: var(--accent); filter: drop-shadow(0 0 5px rgb(var(--accent-rgb) / 0.9)); }
.art-core { fill: var(--accent); animation: corePulse 2s ease-in-out infinite; transform-origin: center; }
.art-pins rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; animation: pinBlink 3s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 0.5s); }
.art-bubble rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
.art-bubble--r rect { fill: rgb(var(--accent-strong-rgb) / 0.35); stroke: var(--accent); }
.art-bubble { animation: bubbleIn 5.4s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 1.1s); transform-origin: left center; }
.art-bubble--r { transform-origin: right center; }
.art-text { fill: none; stroke: var(--fg-dim); stroke-width: 2; stroke-linecap: round; }
.art-typing circle { fill: var(--accent); animation: typing 1s ease-in-out infinite; }
.art-typing circle:nth-child(2) { animation-delay: 0.15s; }
.art-typing circle:nth-child(3) { animation-delay: 0.3s; }
.art-frame { fill: rgb(var(--surface2-rgb) / 0.7); stroke: var(--line-strong); stroke-width: 1.2; }
.art-gen { fill: url(#artGen); transform-origin: bottom; animation: genRise 5.1s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 1.2s); }
.art-holes rect { fill: var(--line-strong); }
.art-play { fill: var(--accent); animation: corePulse 2s ease-in-out infinite; transform-origin: center; }
.art-bar { fill: var(--line); }
.art-progress { fill: var(--accent); transform-origin: left; animation: progress 4s linear infinite; }
.art-dotm circle { fill: var(--line-strong); }
.art-block { fill: var(--line-strong); transform-origin: left; animation: blockIn 5s ease-out infinite; animation-delay: calc(var(--k, 0) * 0.35s); }
.art-block--cta { fill: var(--accent-strong); }
.art-block--img { fill: rgb(var(--accent-strong-rgb) / 0.25); stroke: var(--accent); stroke-width: 1; }
.art-block--ok { fill: var(--ok); }
.art-prompt { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.art-cursor { fill: var(--accent); animation: blink 1s steps(2) infinite; }
.art-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--fg-muted); text-anchor: middle; }

@keyframes artPulse {
  0%, 45%, 100% { stroke-opacity: 0.55; filter: none; }
  15% { stroke-opacity: 1; filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.9)); }
}
@keyframes corePulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes pinBlink { 0%, 60%, 100% { fill: var(--accent-soft); } 15% { fill: var(--accent); } }
@keyframes bubbleIn {
  0% { opacity: 0; transform: translateY(6px) scale(0.96); }
  8%, 78% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes typing { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-3px); opacity: 1; } }
@keyframes genRise { 0% { transform: scaleY(0); } 25%, 80% { transform: scaleY(1); } 95%, 100% { transform: scaleY(0); } }
@keyframes progress { 0% { transform: scaleX(0); } 85% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
@keyframes blockIn { 0% { transform: scaleX(0); } 12%, 82% { transform: scaleX(1); } 92%, 100% { transform: scaleX(0); } }

/* ---------- Przepływy w zastosowaniach ---------- */
.case h3 .ic { color: var(--accent); width: 20px; height: 20px; }
.case h3::before { display: none; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgb(var(--ink-rgb) / 0.03);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
}
.chip .ic { width: 15px; height: 15px; color: var(--fg-muted); }
.chip--ai { border-color: rgb(var(--signal-rgb) / 0.55); background: rgb(var(--signal-rgb) / 0.08); color: var(--signal); }
.chip--ai .ic { color: var(--signal); }
.chip--out { border-color: rgb(var(--ok-rgb) / 0.55); background: rgb(var(--ok-rgb) / 0.08); color: var(--ok); }
.chip--out .ic { color: var(--ok); }
.chip:nth-of-type(1) { --k: 0; } .chip:nth-of-type(2) { --k: 1; } .chip:nth-of-type(3) { --k: 2; } .chip:nth-of-type(4) { --k: 3; }
.js .case:not(.is-in) .chip { opacity: 0; }
.case.is-in .chip { animation: chipIn 0.55s var(--ease-out) both; animation-delay: calc(0.25s + var(--k, 0) * 0.14s); }
@keyframes chipIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.flow__arrow { position: relative; width: 12px; height: 1px; background: var(--line-strong); flex: none; }
.flow__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
}
.case__effect { margin-top: 14px; font-size: 0.9rem; color: var(--fg-muted); }
.cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cases .case { padding: 24px; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .chip { font-size: 0.76rem; padding: 6px 8px; } }

/* ---------- Mapa integracji ---------- */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.map-layout__copy { min-width: 0; }
.map-layout h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.map-layout__lead { margin-top: 16px; max-width: 44ch; color: var(--fg-muted); }
.map-points { display: grid; gap: 16px; margin-top: 28px; list-style: none; }
.map-points li { display: flex; gap: 14px; align-items: flex-start; }
.map-points .ic { width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
.map-points b { display: block; font-weight: 600; }
.map-points span { display: block; font-size: 0.92rem; color: var(--fg-muted); }
.map-wrap { position: relative; min-width: 0; }
.map { width: min(100%, 560px); height: auto; margin-inline: auto; display: block; overflow: visible; }
.map__spokes path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 7; animation: dashflow 1.4s linear infinite; }
.map__dots circle { fill: var(--signal); filter: drop-shadow(0 0 6px rgb(var(--signal-rgb) / 0.9)); }
.map__dots circle:nth-child(even) { fill: var(--accent); filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.9)); }
.map__glow { transform-box: fill-box; transform-origin: center; animation: glowPulse 4s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { transform: scale(0.9); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }
.map__hub { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.map__hubtext { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--fg); text-anchor: middle; }
.map__hubsub { font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--fg-dim); text-anchor: middle; }
.map__sat rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.map__sat text { font-family: var(--font-body); font-weight: 600; font-size: 14px; fill: var(--fg); }
.map__sat .ic { color: var(--accent); overflow: visible; }
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .map { width: min(100%, 440px); }
}

/* ---------- Kroki i filary z ikonami ---------- */
.step__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: 14px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.2);
}
.step__icon .ic { width: 20px; height: 20px; }
.pillar::before { display: none; }
.pillar .ic { width: 24px; height: 24px; margin-bottom: 12px; color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .art-dot, .map__dots { display: none; }
  .js .case:not(.is-in) .chip { opacity: 1; }
}

/* =============================================================================
   v0.6 — realizacje (przed/po), kalkulator, konfigurator, cennik,
   interaktywna mapa, intro, efekty
   ============================================================================= */
.section__note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
}
.pill {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(var(--ink-rgb) / 0.03);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.pill:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-1px); }
.pill.is-on { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--btn-fg); }

/* ---------- Realizacje: suwak przed / po ---------- */
.studies { display: grid; gap: 22px; }
.study {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
}
.study:nth-child(even) { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.study:nth-child(even) .compare { order: 2; }
.compare {
  position: relative;
  aspect-ratio: 5 / 3;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.compare__after, .compare__before { position: absolute; inset: 0; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos) * 1%) 0 0); }
.compare .ill { width: 100%; height: 100%; display: block; }
.compare__after { background: linear-gradient(135deg, rgb(var(--ok-rgb) / 0.08), transparent 60%), var(--bg-2); }
.compare__before { background: linear-gradient(135deg, rgb(var(--signal-rgb) / 0.12), transparent 60%), var(--bg-2); }
.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pos) * 1%);
  width: 2px;
  margin-left: -1px;
  background: var(--fg);
  box-shadow: 0 0 0 1px rgb(0 0 0 / calc(0.4 * var(--shadow-k)));
  pointer-events: none;
}
.compare__handle i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 8px 24px rgb(0 0 0 / calc(0.5 * var(--shadow-k)));
}
.compare__handle i::before, .compare__handle i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--bg);
  border-left: 2px solid var(--bg);
}
.compare__handle i::before { left: 10px; transform: translateY(-50%) rotate(-45deg); }
.compare__handle i::after { right: 10px; transform: translateY(-50%) rotate(135deg); }
.compare__tag {
  position: absolute;
  top: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}
.compare__tag--before { left: 12px; background: rgb(var(--signal-rgb) / 0.18); color: var(--signal); }
.compare__tag--after { right: 12px; background: rgb(var(--ok-rgb) / 0.18); color: var(--ok); }
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare__range:focus-visible + .compare__handle, .compare:focus-within .compare__handle { background: var(--accent); }
.study__body { min-width: 0; padding: 8px 10px 8px 0; }
.study__tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.study__body h3 { margin-top: 10px; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.study__body > p { margin-top: 12px; color: var(--fg-muted); font-size: 0.97rem; }
.study__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.study__stats > div { min-width: 0; padding: 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgb(var(--bg-rgb) / 0.5); }
.study__stats dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.study__stats dd { margin: 6px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.2; }
.study__stats s { color: var(--fg-dim); font-weight: 500; font-size: 0.85em; text-decoration-color: var(--signal); }
.study__stats b { color: var(--ok); }
@media (max-width: 900px) {
  .study, .study:nth-child(even) { grid-template-columns: 1fr; padding: 12px; }
  .study:nth-child(even) .compare { order: 0; }
  .study__body { padding: 8px 6px 10px; }
}
@media (max-width: 560px) { .study__stats { grid-template-columns: 1fr 1fr; } }

/* ilustracje przed / po */
.ill text { font-family: var(--font-mono); }
.ill-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--fg-dim); }
.ill-label--c { text-anchor: middle; }
.ill-label--bad { fill: var(--signal); }
.ill-label--ok { fill: var(--ok); }
.ill-panel { fill: rgb(var(--surface2-rgb) / 0.9); stroke: var(--line-strong); stroke-width: 1.2; }
.ill-env rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
.ill-env path { fill: none; stroke: var(--fg-dim); stroke-width: 1.2; }
.ill-env--hot rect { stroke: var(--signal); }
.ill-cell { fill: var(--line-strong); }
.ill-cell--bad { fill: var(--signal); }
.ill-clock circle { fill: none; stroke: var(--fg-dim); stroke-width: 1.6; }
.ill-clock path { fill: none; stroke: var(--fg-dim); stroke-width: 1.8; stroke-linecap: round; }
.ill-clock--bad circle, .ill-clock--bad path { stroke: var(--signal); }
.ill-clock--bad .ill-label { fill: var(--signal); }
.ill-clock--ok circle, .ill-clock--ok path { stroke: var(--ok); }
.ill-clock--ok .ill-label { fill: var(--ok); }
.ill-person circle, .ill-person path { fill: none; stroke: var(--fg-muted); stroke-width: 1.8; }
.ill-squiggle { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-dasharray: 4 5; stroke-linecap: round; }
.ill-chip rect { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.4; }
.ill-chip path { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.ill-chip__core { fill: var(--accent); stroke: none; animation: corePulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill-chip .ill-label { fill: var(--accent); }
.ill-doc path:first-child { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.4; }
.ill-doc path:nth-child(2) { fill: none; stroke: var(--fg-dim); stroke-width: 1.4; }
.ill-ok { fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ill-bad { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linecap: round; }
.ill-flow { fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-dasharray: 3 6; stroke-linecap: round; animation: dashflow 1.2s linear infinite; }
.ill-packet { fill: var(--signal); filter: drop-shadow(0 0 4px rgb(var(--signal-rgb) / 0.9)); }
.ill-check circle { fill: rgb(var(--ok-rgb) / 0.15); stroke: var(--ok); stroke-width: 1.6; }
.ill-check path { fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ill-box rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.4; }
.ill-box--bad rect { stroke: var(--signal); }
.ill-box--ok rect { stroke: var(--ok); }
.ill-qty { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-anchor: middle; fill: var(--fg); }
.ill-box--bad .ill-qty { fill: var(--signal); }
.ill-neq { font-family: var(--font-display); font-weight: 700; font-size: 34px; text-anchor: middle; fill: var(--signal); }
.ill-eq { font-family: var(--font-display); font-weight: 700; font-size: 34px; text-anchor: middle; fill: var(--ok); }
.ill-warn path:first-child { fill: rgb(var(--signal-rgb) / 0.15); stroke: var(--signal); stroke-width: 1.6; stroke-linejoin: round; }
.ill-warn path:last-child { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; }
.ill-paper rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
.ill-paper path { fill: none; stroke: var(--fg-dim); stroke-width: 1.2; }
.ill-scan rect { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.4; }
.ill-scan__beam { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; animation: scanBeam 1.6s ease-in-out infinite; }
@keyframes scanBeam { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(20px); opacity: 1; } }

/* ---------- Kalkulator ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.calc__intro { min-width: 0; }
.calc__intro h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.calc__lead { margin-top: 16px; max-width: 44ch; color: var(--fg-muted); }
.calc__presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.calc__panel {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.calc__field label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--fg-muted); }
.calc__row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; align-items: center; margin-top: 8px; }
.calc__row output { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-strong) var(--fill, 0%), var(--line-strong) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--fg); border: 3px solid var(--accent-strong); box-shadow: 0 2px 10px rgb(0 0 0 / calc(0.5 * var(--shadow-k))); transition: transform 0.15s ease; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--fg); border: 3px solid var(--accent-strong); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
.calc__results { display: grid; gap: 16px; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.calc__big { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline; }
.calc__big b { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.8rem); letter-spacing: -0.03em; line-height: 1; color: var(--signal); font-variant-numeric: tabular-nums; }
.calc__big span { font-size: 0.95rem; color: var(--fg-muted); }
.calc__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc__grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgb(var(--bg-rgb) / 0.5); }
.calc__grid b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.calc__grid span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }
.calc__bar-track { position: relative; height: 10px; border-radius: 5px; background: rgb(var(--signal-rgb) / 0.35); overflow: hidden; }
.calc__bar-track i { display: block; height: 100%; width: 10%; border-radius: 5px; background: var(--ok); transition: width 0.6s var(--ease-out); }
.calc__bar-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); }
.calc__bar-legend b { color: var(--ok); font-weight: 500; }
.calc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.calc__note { flex: 1; min-width: 200px; font-size: 0.82rem; color: var(--fg-dim); }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .calc__grid { grid-template-columns: 1fr; } .calc__big { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Konfigurator ---------- */
.cfg {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.cfg__steps { display: grid; gap: 14px; min-width: 0; }
.cfg__group { margin: 0; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.cfg__group legend { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.cfg__group legend i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
}
.cfg__options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cfg__opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgb(var(--ink-rgb) / 0.03);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}
.cfg__opt .ic { width: 15px; height: 15px; color: var(--fg-dim); transition: color 0.2s ease; }
.cfg__opt:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-1px); }
.cfg__opt.is-on { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.12); }
.cfg__opt.is-on .ic { color: var(--accent); }
.cfg__opt[data-ai].is-on { border-color: var(--signal); background: rgb(var(--signal-rgb) / 0.1); box-shadow: 0 0 0 3px rgb(var(--signal-rgb) / 0.12); }
.cfg__opt[data-ai].is-on .ic { color: var(--signal); }
.cfg__preview { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; min-width: 0; }
.cfg__canvas {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(rgb(var(--line-rgb) / 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(var(--line-rgb) / 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(360px 200px at 50% 50%, rgb(var(--accent-strong-rgb) / 0.14), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}
.cfg__diagram { display: block; width: 100%; height: auto; }
.cfg__diagram .dg-link { fill: none; stroke: var(--line-strong); stroke-width: 1.6; stroke-dasharray: 4 6; animation: dashflow 1.3s linear infinite; }
.cfg__diagram .dg-link--ai { stroke: rgb(var(--signal-rgb) / 0.6); }
.cfg__diagram .dg-packet { fill: var(--signal); filter: drop-shadow(0 0 4px rgb(var(--signal-rgb) / 0.9)); }
.cfg__diagram .dg-node rect { fill: rgb(var(--surface-rgb) / 0.95); stroke: var(--line-strong); stroke-width: 1.3; }
.cfg__diagram .dg-node--trigger rect { stroke: var(--accent); }
.cfg__diagram .dg-node--ai rect { stroke: var(--signal); fill: rgb(var(--signal-rgb) / 0.08); }
.cfg__diagram .dg-node--action rect { stroke: rgb(var(--ok-rgb) / 0.7); }
.cfg__diagram .dg-node text { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; fill: var(--fg); }
.cfg__diagram .dg-node .dg-kind { font-family: var(--font-mono); font-weight: 400; font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--fg-dim); }
.cfg__diagram .dg-node .ic { color: var(--accent); overflow: visible; }
.cfg__diagram .dg-node--ai .ic { color: var(--signal); }
.cfg__diagram .dg-node--action .ic { color: var(--ok); }
.cfg__diagram .dg-node { transform-box: fill-box; transform-origin: center; animation: dgIn 0.5s var(--ease-out) both; }
@keyframes dgIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.cfg__diagram .dg-link { stroke-dashoffset: 0; animation: dashflow 1.3s linear infinite, dgFade 0.5s ease both; }
@keyframes dgFade { from { opacity: 0; } to { opacity: 1; } }
.cfg__diagram .dg-empty { font-family: var(--font-mono); font-size: 11px; fill: var(--fg-dim); text-anchor: middle; }
.cfg__estimate { display: grid; grid-template-columns: 1.3fr 1fr 0.7fr; gap: 10px; }
.cfg__estimate > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cfg__estimate span { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.cfg__estimate b { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cfg__estimate > div:first-child b { color: var(--accent); }
.cfg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cfg__note { flex: 1; min-width: 200px; font-size: 0.82rem; color: var(--fg-dim); }
@media (max-width: 960px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg__preview { position: static; }
}
@media (max-width: 680px) {
  .cfg__canvas { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cfg__diagram { min-width: 640px; }
}
@media (max-width: 560px) { .cfg__estimate { grid-template-columns: 1fr 1fr; } .cfg__estimate > div:first-child { grid-column: 1 / -1; } }

/* ---------- Cennik ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 26px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, opacity 0.7s ease;
}
.plan:hover { transform: translateY(-4px); border-color: rgb(var(--accent-rgb) / 0.4); }
.plan[data-spotlight] { overflow: visible; }
.plan--hot { border-color: rgb(var(--accent-rgb) / 0.6); background: linear-gradient(180deg, rgb(var(--accent-strong-rgb) / 0.12), transparent 50%), var(--surface); box-shadow: 0 30px 80px -40px rgb(var(--accent-strong-rgb) / 0.8); }
.plan__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.plan__name { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.plan__for { margin-top: 8px; font-size: 0.95rem; color: var(--fg-muted); min-height: 2.6em; }
.plan__price { margin-top: 14px; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -0.03em; line-height: 1; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__price small { font-family: var(--font-mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.plan__list { display: grid; gap: 9px; margin: 22px 0 24px; padding-top: 18px; border-top: 1px solid var(--line); list-style: none; flex: 1; }
.plan__list li { position: relative; padding-left: 24px; font-size: 0.93rem; color: var(--fg-muted); }
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgb(var(--ok-rgb) / 0.18);
  -webkit-mask: none;
}
.plan__list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.35em + 3px);
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--ok);
  border-bottom: 1.6px solid var(--ok);
  transform: rotate(-45deg);
}
.plan .btn { width: 100%; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- Mapa integracji: interakcja ---------- */
.map__sat { cursor: pointer; outline: none; transition: opacity 0.35s ease; }
.map__sat rect { transition: stroke 0.3s ease, fill 0.3s ease; }
.map__sat:hover rect, .map__sat:focus-visible rect { stroke: var(--accent); }
.map.has-active .map__sat:not(.is-active) { opacity: 0.35; }
.map.has-active .map__spokes path:not(.is-active) { opacity: 0.2; }
.map__sat.is-active rect { stroke: var(--accent); fill: var(--surface-2); }
.map__spokes path.is-active { stroke: var(--accent); stroke-dasharray: none; stroke-width: 2; animation: none; }
.map-panel {
  margin: 14px auto 0;
  width: min(100%, 560px);
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.3s ease;
}
.map-panel.is-open { border-color: rgb(var(--accent-rgb) / 0.5); }
.map-panel__hint { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim); }
.map-panel h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 600; }
.map-panel h3 .ic { color: var(--accent); }
.map-panel ul { display: grid; gap: 7px; margin-top: 10px; list-style: none; }
.map-panel li { position: relative; padding-left: 16px; font-size: 0.92rem; color: var(--fg-muted); animation: chipIn 0.4s var(--ease-out) both; }
.map-panel li:nth-child(2) { animation-delay: 0.08s; } .map-panel li:nth-child(3) { animation-delay: 0.16s; }
.map-panel li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1px; background: var(--accent); }
.map-panel a { display: inline-block; margin-top: 10px; font-size: 0.86rem; font-weight: 600; color: var(--accent); }

/* ---------- Intro (raz na sesję) ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.intro.is-on { display: flex; }
.intro.is-out { opacity: 0; visibility: hidden; }
.intro__mark svg { width: 56px; height: 56px; animation: introMark 1.2s var(--ease-out) both; }
@keyframes introMark { from { opacity: 0; transform: scale(0.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
.intro__text { font-family: var(--font-mono); font-size: 1.1rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg); }
.intro__bar { width: 160px; height: 2px; background: var(--line-strong); overflow: hidden; }
.intro__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: introBar 1.3s var(--ease-out) both; }
@keyframes introBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Kinetyczna typografia w hero ---------- */
.hero__title .w__i { font-variation-settings: "wght" var(--wg, 700); transition: font-variation-settings 0.35s ease; }

/* ---------- View Transitions (zmiana motywu) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Scroll-driven animations (natywne, gdy przeglądarka umie) ---------- */
@supports (animation-timeline: view()) {
  .sda [data-reveal] { opacity: 1; transform: none; animation: sdaReveal linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; transition: none; }
  .sda [data-reveal-group] > [data-reveal] { animation-range: entry calc(0% + var(--i, 0) * 4%) entry calc(38% + var(--i, 0) * 4%); }
  @keyframes sdaReveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  .sda .scroll-progress i { transform: none; animation: sdaGrow linear both; animation-timeline: scroll(root); }
  @keyframes sdaGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Honeypot ---------- */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .ill-packet, .cfg__diagram .dg-packet { display: none; }
  .sda [data-reveal] { animation: none; }
}

/* wybuch sceny */
.hero.is-boom .hero__canvas { animation: boomShake 0.5s ease-out; }
@keyframes boomShake { 0%, 100% { transform: none; } 20% { transform: translate(-4px, 3px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, -3px); } 80% { transform: translate(2px, 2px); } }
.scene-core { pointer-events: auto; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.scene-core:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.scene-core:active { transform: translate(-50%, -50%) scale(0.92) !important; }
.hero__canvas:focus-visible { outline: 2px solid rgb(var(--accent-rgb) / 0.6); outline-offset: -2px; }

/* =============================================================================
   v0.7 — dane, Granat domyślny, cyberpunk hero, WhatsApp, lead magnet
   ============================================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Motyw: przycisk w nagłówku ---------- */
.theme { position: relative; }
.theme__btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.theme__btn .ic { width: 18px; height: 18px; }
.theme__btn:hover, .theme__btn[aria-expanded="true"] { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
.theme__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgb(var(--surface-rgb) / 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / calc(0.9 * var(--shadow-k)));
  animation: menuIn 0.18s var(--ease-out);
}
.theme__menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.theme__menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.theme__menu button:hover { background: rgb(var(--ink-rgb) / 0.06); color: var(--fg); }
.theme__menu button[aria-checked="true"] { color: var(--fg); background: var(--accent-soft); }
.theme__menu i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--sw);
  background: linear-gradient(135deg, var(--sb) 50%, var(--sw) 50%);
  flex: none;
}

/* ---------- WhatsApp ---------- */
.wa-fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 12px;
  border-radius: 999px;
  background: #25d366;
  color: #062b14;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 14px 34px -10px rgb(37 211 102 / 0.8);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.wa-fab svg { width: 24px; height: 24px; fill: currentColor; }
.wa-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px -10px rgb(37 211 102 / 0.9); }
.wa-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgb(37 211 102 / 0.5);
  animation: waPing 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes waPing { 0% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0.5); } 100% { box-shadow: 0 0 0 16px rgb(37 211 102 / 0); } }
.wa-fab.is-hidden { display: none; }
@media (max-width: 560px) { .wa-fab span { display: none; } .wa-fab { padding: 13px; } }

/* ---------- Intro: boot ---------- */
.intro { gap: 0; }
.intro__boot {
  position: absolute;
  left: clamp(16px, 5vw, 64px);
  top: clamp(16px, 5vh, 48px);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--fg-dim);
  white-space: pre-wrap;
}
.intro__boot b { color: var(--ok); font-weight: 500; }
.intro__boot em { color: var(--neon); font-style: normal; }
.intro__center { display: grid; justify-items: center; gap: 18px; }
.intro.is-out { clip-path: circle(0% at 50% 50%); opacity: 1; transition: clip-path 0.7s var(--ease-out), visibility 0s linear 0.7s; }

/* ---------- Hero: HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; font-family: var(--font-mono); }
.hud__corner { position: absolute; width: 22px; height: 22px; border: 1px solid rgb(var(--neon-rgb) / 0.55); opacity: 0.8; }
.hud__corner--tl { left: var(--gutter); top: 18px; border-right: 0; border-bottom: 0; }
.hud__corner--tr { right: var(--gutter); top: 18px; border-left: 0; border-bottom: 0; }
.hud__corner--bl { left: var(--gutter); bottom: 18px; border-right: 0; border-top: 0; }
.hud__corner--br { right: var(--gutter); bottom: 18px; border-left: 0; border-top: 0; }
.hud__tele {
  position: absolute;
  right: calc(var(--gutter) + 14px);
  top: 26px;
  display: grid;
  gap: 3px;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-align: right;
}
.hud__tele b { font-weight: 500; color: var(--fg); margin-left: 6px; font-variant-numeric: tabular-nums; }
.hud__tele .hud__ok { color: var(--ok); }
.hud__ticker {
  position: absolute;
  right: calc(var(--gutter) + 180px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(60vw, 520px);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
}
.hud__ticker-label { padding: 2px 6px; border: 1px solid rgb(var(--neon-rgb) / 0.5); border-radius: 4px; color: var(--neon); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }
#hud-ticker { overflow: hidden; text-overflow: ellipsis; animation: tickIn 0.4s var(--ease-out); }
@keyframes tickIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  .hud__tele { display: none; }
  .hud__ticker { left: var(--gutter); right: 86px; bottom: 10px; max-width: none; font-size: 0.6rem; }
  .hud__corner { width: 14px; height: 14px; }
  .hud__corner--tl, .hud__corner--tr { top: 10px; }
  .hud__corner--bl, .hud__corner--br { bottom: 6px; }
}

/* glitch tytułu (RGB split + poszatkowanie) */
.hero__title.is-glitch .w__i {
  animation: glitchWord 0.55s steps(2, end) both;
  animation-delay: calc(var(--d, 0s) * 0.35);
}
@keyframes glitchWord {
  0% { text-shadow: none; transform: none; clip-path: none; }
  15% { text-shadow: -3px 0 var(--neon), 3px 0 var(--neon-2); transform: translate(-2px, 1px) skewX(-6deg); clip-path: inset(10% 0 55% 0); }
  30% { text-shadow: 3px 0 var(--neon), -3px 0 var(--neon-2); transform: translate(2px, -1px); clip-path: inset(50% 0 5% 0); }
  45% { text-shadow: -2px 0 var(--neon-2), 2px 0 var(--neon); transform: translate(-1px, 0) skewX(4deg); clip-path: inset(25% 0 30% 0); }
  60% { text-shadow: 2px 0 var(--neon), -2px 0 var(--neon-2); transform: translate(1px, 1px); clip-path: inset(0 0 70% 0); }
  75% { text-shadow: none; transform: none; clip-path: inset(60% 0 0 0); }
  100% { text-shadow: none; transform: none; clip-path: none; }
}
.hero.is-boom .hud__corner { animation: boomShake 0.5s ease-out; border-color: var(--neon-2); }

/* ---------- Lead magnet ---------- */
.magnet-section {
  background:
    radial-gradient(700px 400px at 20% 50%, rgb(var(--accent-strong-rgb) / 0.16), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.magnet {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.magnet__cover { position: relative; display: grid; place-items: center; min-width: 0; padding: 24px 0; }
.magnet__book {
  width: min(100%, 300px);
  aspect-ratio: 800 / 1131;
  border-radius: 10px;
  overflow: hidden;
  transform: perspective(1200px) rotateY(18deg) rotateX(4deg);
  box-shadow:
    -30px 30px 70px -20px rgb(0 0 0 / calc(0.9 * var(--shadow-k))),
    0 0 0 1px rgb(var(--ink-rgb) / 0.08),
    0 0 80px -20px rgb(var(--accent-strong-rgb) / 0.6);
  transition: transform 0.6s var(--ease-out);
  background: var(--surface-2);
}
.magnet__cover:hover .magnet__book { transform: perspective(1200px) rotateY(8deg) rotateX(2deg) translateY(-6px); }
.magnet__book img { width: 100%; height: 100%; object-fit: cover; display: block; }
.magnet__badge {
  position: absolute;
  right: 6%;
  top: 8%;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--signal);
  color: #1b1a17;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  transform: rotate(6deg);
  box-shadow: 0 10px 24px -10px rgb(var(--signal-rgb) / 0.8);
}
.magnet__copy { min-width: 0; }
.magnet__copy h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.magnet__lead { margin-top: 16px; max-width: 52ch; color: var(--fg-muted); }
.magnet__points { display: grid; gap: 8px; margin-top: 18px; list-style: none; }
.magnet__points li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--fg-muted); }
.magnet__points .ic { color: var(--ok); }
.magnet__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; max-width: 520px; }
.magnet__form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.magnet__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.magnet__status { margin-top: 10px; font-size: 0.84rem; color: var(--fg-dim); }
.magnet__status a { color: var(--accent); font-weight: 600; }
.magnet__status.is-ok { color: var(--ok); }
@media (max-width: 860px) {
  .magnet { grid-template-columns: 1fr; }
  .magnet__cover { order: 2; padding: 8px 0 0; }
  .magnet__book { width: min(70%, 260px); transform: perspective(1200px) rotateY(10deg); }
}

/* ---------- Ilustracje realizacji (nowe elementy) ---------- */
.ill-env--spam rect { stroke-dasharray: 3 3; stroke: var(--fg-dim); }
.ill-q { font-family: var(--font-display); font-weight: 800; font-size: 20px; fill: var(--signal); }
.ill-bin rect, .ill-bin__r { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.3; }
.ill-bin--ok rect { stroke: var(--ok); }
.ill-bin--dim rect { stroke-dasharray: 3 3; }
.ill-bin .ill-label { font-size: 8.5px; }
.ill-count { font-family: var(--font-display); font-weight: 700; font-size: 11.5px; text-anchor: middle; fill: var(--fg); }
.ill-count--ok { fill: var(--ok); }
.ill-phone rect:first-child { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.ill-phone > path { fill: none; stroke: var(--fg-dim); stroke-width: 2; stroke-linecap: round; }
.ill-phone--bad rect:first-child { stroke: var(--signal); }
.ill-phone--ok rect:first-child { stroke: var(--ok); }
.ill-bubble--in { fill: rgb(var(--ink-rgb) / 0.12); }
.ill-bubble--ai { fill: rgb(var(--ok-rgb) / 0.35); }
.ill-tick { fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ill-badge { fill: var(--signal); animation: corePulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill-badge__t { font-family: var(--font-mono); font-size: 11px; font-weight: 500; fill: #1b1a17; text-anchor: middle; }
.ill-moon path { fill: rgb(var(--signal-rgb) / 0.25); stroke: var(--signal); stroke-width: 1.4; }
.ill-tag rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
.ill-tag .ill-label { font-size: 9px; fill: var(--fg-muted); }
.ill-note rect { fill: rgb(var(--signal-rgb) / 0.22); stroke: var(--signal); stroke-width: 1.1; }
.ill-note path { fill: none; stroke: var(--signal); stroke-width: 1.1; stroke-opacity: 0.8; }
.ill-bars rect { fill: var(--ok); transform-box: fill-box; transform-origin: bottom; animation: blockIn 4s ease-out infinite; animation-delay: calc(var(--k, 0) * 0.25s); }
@media (prefers-reduced-motion: reduce) { .ill-bars rect, .ill-badge { animation: none; } }

/* =============================================================================
   v0.9 — hero w stylu „Jarvis”: celownik, głos AI, namierzanie, wskaźniki,
   przebieg procesu
   ============================================================================= */
/* celownik wokół rdzenia */
.reticle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 250px;
  height: 250px;
  margin: -125px 0 0 -125px;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
}
.scene-labels.is-ready .reticle { animation: hudIn 1.1s var(--ease-out) 0.2s both; }
@keyframes hudIn { from { opacity: 0; transform: var(--tf, none) scale(1.6) rotate(-20deg); } to { opacity: 1; transform: var(--tf, none); } }
.reticle svg { width: 100%; height: 100%; overflow: visible; }
.reticle svg > * { transform-box: fill-box; transform-origin: center; }
.ret-ring { fill: none; stroke: rgb(var(--neon-rgb) / 0.45); stroke-width: 0.8; }
.ret-ring--outer { stroke-dasharray: 2 6; animation: retSpin 60s linear infinite; }
.ret-ring--seg { stroke: rgb(var(--neon-rgb) / 0.7); stroke-width: 3; stroke-dasharray: 40 18 6 18 80 18; animation: retSpin 28s linear infinite reverse; }
.ret-ring--inner { stroke: rgb(var(--accent-rgb) / 0.5); stroke-dasharray: 1 4; animation: retSpin 40s linear infinite; }
.ret-arc { fill: none; stroke: var(--neon); stroke-width: 1.6; stroke-linecap: round; }
.ret-arc--a { animation: retSpin 9s linear infinite; }
.ret-arc--b { stroke: var(--accent); animation: retSpin 13s linear infinite reverse; }
.ret-arc--c { stroke: rgb(var(--neon-rgb) / 0.6); stroke-width: 1; animation: retSpin 7s linear infinite; }
.ret-sweep { animation: retSpin 4.5s linear infinite; }
.ret-cross path { stroke: rgb(var(--neon-rgb) / 0.8); stroke-width: 1; }
.ret-ticks line { stroke: rgb(var(--neon-rgb) / 0.55); stroke-width: 1; }
.ret-ticks line.is-major { stroke: var(--neon); stroke-width: 1.4; }
.ret-text { font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.3em; fill: rgb(var(--neon-rgb) / 0.75); animation: retSpin 50s linear infinite reverse; }
@keyframes retSpin { to { transform: rotate(360deg); } }
.reticle.is-ping .ret-ring--seg { animation: retSpin 28s linear infinite reverse, retPing 0.7s ease-out; }
@keyframes retPing { 0% { stroke: var(--signal); stroke-width: 6; } 100% { stroke: rgb(var(--neon-rgb) / 0.7); stroke-width: 3; } }
.scene-core { z-index: 20; }

/* głos AI */
.scene-voice {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 7px 12px 7px 10px;
  border: 1px solid rgb(var(--neon-rgb) / 0.4);
  border-radius: 999px;
  background: rgb(var(--bg-rgb) / 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  will-change: transform;
}
.scene-voice__wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; flex: none; }
.scene-voice__wave b { width: 2px; height: 3px; border-radius: 1px; background: var(--neon); transition: height 0.2s ease; }
.scene-voice.is-speaking .scene-voice__wave b { animation: wave 0.6s ease-in-out infinite; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(2) { animation-delay: 0.08s; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(3) { animation-delay: 0.16s; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(4) { animation-delay: 0.24s; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(5) { animation-delay: 0.32s; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(6) { animation-delay: 0.4s; }
.scene-voice.is-speaking .scene-voice__wave b:nth-child(7) { animation-delay: 0.48s; }
@keyframes wave { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.scene-voice__text::after { content: ""; display: inline-block; width: 6px; height: 0.9em; margin-left: 3px; vertical-align: -0.1em; background: var(--neon); animation: blink 1s steps(2) infinite; }

/* namierzanie hubu */
.scene-label__lock {
  position: absolute;
  inset: -14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--neon), var(--neon)) left top / 16px 1.5px no-repeat,
    linear-gradient(var(--neon), var(--neon)) left top / 1.5px 16px no-repeat,
    linear-gradient(var(--neon), var(--neon)) right top / 16px 1.5px no-repeat,
    linear-gradient(var(--neon), var(--neon)) right top / 1.5px 16px no-repeat,
    linear-gradient(var(--neon), var(--neon)) left bottom / 16px 1.5px no-repeat,
    linear-gradient(var(--neon), var(--neon)) left bottom / 1.5px 16px no-repeat,
    linear-gradient(var(--neon), var(--neon)) right bottom / 16px 1.5px no-repeat,
    linear-gradient(var(--neon), var(--neon)) right bottom / 1.5px 16px no-repeat;
}
.scene-label.is-hit .scene-label__lock { animation: lockIn 1.1s var(--ease-out) both; }
@keyframes lockIn { 0% { opacity: 0; transform: scale(1.8); } 35% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }

/* HUD: log u góry po lewej, wskaźniki po prawej */
.hud__ticker { left: calc(var(--gutter) + 14px); right: auto; top: 28px; bottom: auto; max-width: min(44vw, 560px); }
.hud__gauges {
  position: absolute;
  right: calc(var(--gutter) + 14px);
  top: 104px;
  display: grid;
  gap: 8px;
  justify-items: end;
}
.gauge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); text-align: right; }
.gauge span { display: grid; }
.gauge b { font-weight: 500; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.gauge svg { width: 30px; height: 30px; transform: rotate(-90deg); order: 2; }
.gauge__bg { fill: none; stroke: rgb(var(--line-rgb) / 0.3); stroke-width: 3; }
.gauge__fg { fill: none; stroke: var(--neon); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 94.2; stroke-dashoffset: 94.2; transition: stroke-dashoffset 0.8s var(--ease-out); filter: drop-shadow(0 0 4px rgb(var(--neon-rgb) / 0.8)); }
.gauge__fg--signal { stroke: var(--signal); filter: drop-shadow(0 0 4px rgb(var(--signal-rgb) / 0.8)); }
.gauge__fg--ok { stroke: var(--ok); filter: drop-shadow(0 0 4px rgb(var(--ok-rgb) / 0.8)); }
.hud.is-ready .hud__gauges, .hud.is-ready .hud__tele { animation: hudFade 0.9s ease both 0.5s; }
@keyframes hudFade { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* przebieg procesu */
.flow-hud {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  width: min(760px, 56vw);
  margin-left: calc(min(760px, 56vw) / -2);
  pointer-events: none;
  font-family: var(--font-mono);
  opacity: 0;
}
.flow-hud.is-ready { animation: hudFade 0.9s ease both 0.8s; }
.flow-hud__track { position: absolute; left: 20px; right: 20px; top: 15px; height: 2px; background: rgb(var(--neon-rgb) / 0.18); }
.flow-hud__track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--neon)); box-shadow: 0 0 10px rgb(var(--neon-rgb) / 0.9); transition: width 0.55s var(--ease-out); }
.flow-hud__steps { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); list-style: none; }
.flow-step { display: grid; justify-items: center; gap: 4px; }
.flow-step__node {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgb(var(--neon-rgb) / 0.4);
  background: rgb(var(--bg-rgb) / 0.85);
  color: var(--fg-dim);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.flow-step__node .ic { width: 14px; height: 14px; }
.flow-step__name { font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); transition: color 0.3s ease; }
.flow-step__t { font-size: 0.56rem; color: var(--fg-dim); opacity: 0.7; font-variant-numeric: tabular-nums; }
.flow-step.is-done .flow-step__node { border-color: rgb(var(--ok-rgb) / 0.7); color: var(--ok); }
.flow-step.is-done .flow-step__name { color: var(--fg-muted); }
.flow-step.is-active .flow-step__node { border-color: var(--neon); color: var(--neon); box-shadow: 0 0 0 4px rgb(var(--neon-rgb) / 0.14), 0 0 22px rgb(var(--neon-rgb) / 0.7); transform: scale(1.12); }
.flow-step.is-active .flow-step__name { color: var(--fg); }
.flow-step--ai.is-active .flow-step__node { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 0 4px rgb(var(--signal-rgb) / 0.14), 0 0 22px rgb(var(--signal-rgb) / 0.7); }
.flow-hud__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.flow-hud__now { flex: 1; min-width: 0; text-align: center; color: var(--neon); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0.04em; }
.flow-hud__total b { color: var(--ok); font-weight: 500; }
.flow-hud.is-complete .flow-hud__track i { background: var(--ok); box-shadow: 0 0 12px rgb(var(--ok-rgb) / 0.9); }

@media (max-width: 1180px) {
  .flow-hud { width: min(640px, 50vw); margin-left: calc(min(640px, 50vw) / -2); bottom: 16px; }
  .flow-step__t { display: none; }
}
@media (max-width: 960px) {
  .reticle { width: 190px; height: 190px; margin: -95px 0 0 -95px; }
  .scene-voice { display: none; }
  .hud__gauges { display: none; }
  .hud__ticker { display: none; }
  .flow-hud { position: relative; left: auto; bottom: auto; width: 100%; margin-left: 0; margin-top: 10px; padding: 0 var(--gutter); }
  .flow-hud.is-ready { animation: none; opacity: 1; }
  .flow-hud__track { left: calc(var(--gutter) + 14px); right: calc(var(--gutter) + 14px); top: 14px; }
  .flow-step__node { width: 28px; height: 28px; }
  .flow-step__node .ic { width: 12px; height: 12px; }
  .flow-step__name { font-size: 0.5rem; letter-spacing: 0.06em; }
  .flow-hud__meta { font-size: 0.54rem; }
  .flow-hud__label, .flow-hud__total { display: none; }
  .flow-hud__now { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ret-ring, .ret-arc, .ret-sweep, .ret-text, .scene-core__orbit { animation: none !important; }
  .scene-voice__text::after { animation: none; }
}

/* podpowiedź w scenie scrollowanej */
.stage__hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 14px 9px 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.45);
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.8);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--fg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.stage__hint.is-idle { border-color: var(--signal); box-shadow: 0 0 0 4px rgb(var(--signal-rgb) / 0.14), 0 0 26px -6px rgb(var(--signal-rgb) / 0.8); animation: hintNudge 1.6s ease-in-out infinite; }
.stage__hint.is-done { border-color: rgb(var(--ok-rgb) / 0.6); color: var(--ok); animation: none; }
.stage__hint-mouse { position: relative; width: 16px; height: 24px; border: 1.5px solid currentColor; border-radius: 9px; flex: none; }
.stage__hint-mouse i { position: absolute; left: 50%; top: 5px; width: 3px; height: 5px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: wheel 1.4s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }
.stage__hint-arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: arrowBob 1.4s ease-in-out infinite; }
.stage__hint.is-done .stage__hint-arrow, .stage__hint.is-done .stage__hint-mouse i { animation: none; }
@keyframes arrowBob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@keyframes hintNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.stage.is-static .stage__hint { display: none; }
@media (max-width: 960px) { .stage__hint { margin-top: 12px; font-size: 0.64rem; padding: 7px 11px 7px 8px; } }

/* ---------- Scena scrollowana: pionowy pasek postępu + układ na telefonie ---------- */
.stage__rail {
  position: absolute;
  left: calc(var(--gutter) - 6px);
  top: 50%;
  z-index: 5;
  width: 28px;
  height: min(56vh, 440px);
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-mono);
}
.stage__rail-line, .stage__rail-fill {
  position: absolute;
  left: 13px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: rgb(var(--line-rgb) / 0.28);
}
.stage__rail-fill {
  background: linear-gradient(180deg, var(--accent-strong), var(--neon));
  box-shadow: 0 0 12px rgb(var(--neon-rgb) / 0.8);
  transform: scaleY(var(--p, 0));
  transform-origin: top;
  transition: transform 0.25s ease-out;
}
.stage__rail-steps { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; list-style: none; }
.rail-step { position: relative; display: flex; align-items: center; gap: 12px; height: 16px; }
.rail-step i {
  width: 10px;
  height: 10px;
  margin-left: 9px;
  border-radius: 50%;
  border: 2px solid rgb(var(--line-rgb) / 0.5);
  background: var(--bg-2);
  flex: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.rail-step span {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out), color 0.3s ease;
  white-space: nowrap;
}
.rail-step.is-done i { border-color: var(--accent); background: var(--accent); }
.rail-step.is-active i { border-color: var(--neon); background: var(--neon); box-shadow: 0 0 0 5px rgb(var(--neon-rgb) / 0.18), 0 0 18px rgb(var(--neon-rgb) / 0.9); transform: scale(1.25); }
.rail-step.is-active span { opacity: 1; transform: none; color: var(--fg); }
.rail-step--end.is-active i { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 5px rgb(var(--ok-rgb) / 0.18), 0 0 18px rgb(var(--ok-rgb) / 0.9); }
.stage__rail-pct {
  position: absolute;
  left: 2px;
  bottom: -26px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--neon);
  font-variant-numeric: tabular-nums;
}
.stage.is-static .stage__rail { display: none; }

@media (max-width: 960px) {
  .stage__rail { left: auto; right: 6px; top: 50%; height: min(44vh, 360px); width: 24px; }
  .stage__rail-line, .stage__rail-fill { left: 11px; }
  .rail-step { flex-direction: row-reverse; height: 14px; }
  .rail-step i { margin: 0 7px 0 0; width: 9px; height: 9px; }
  .rail-step span { font-size: 0.52rem; transform: translateX(6px); }
  .rail-step.is-active span { padding: 3px 7px; border-radius: 6px; background: rgb(var(--bg-rgb) / 0.85); border: 1px solid rgb(var(--neon-rgb) / 0.4); }
  .stage__rail-pct { left: auto; right: 0; bottom: -24px; }
  .stage__grid { padding-top: calc(var(--header-h) + 10px); padding-bottom: 12px; padding-right: calc(var(--gutter) + 28px); grid-template-rows: auto minmax(0, 1fr); align-content: start; gap: 8px; }
  .stage__readout { display: grid; gap: 0; }
  .stage__readout > .eyebrow { order: 1; }
  .stage__readout > .stage__hud { order: 2; }
  .stage__readout > .stage__hint { order: 3; justify-self: start; margin: 12px 0 10px; }
  .stage__readout > .stage__steps { order: 4; }
  .stage__readout > .stage__log { order: 5; }
  .stage__steps { min-height: 120px; }
  /* diagram wypełnia dokładnie to, co zostaje pod tekstem: nie może wyjść poza sekcję */
  .stage__viz { align-self: stretch; min-height: 0; display: flex; justify-content: center; align-items: flex-start; }
  .viz { height: 100%; width: auto; max-width: 100%; max-height: none; aspect-ratio: 5 / 4; margin: 0; }
  .stage__steps { min-height: 0 !important; }
  .stage__step { position: static; display: none; }
  .stage__step.is-active { display: block; }
  .stage__result { gap: 6px 22px; margin-top: 8px; }
  .stage__result b { font-size: 1.25rem; }
  .stage__result span { margin-top: 3px; font-size: 0.62rem; }
  .stage__step--done .btn { margin-top: 10px; padding: 9px 14px; font-size: 0.86rem; }
  .stage__step--done h2 { font-size: clamp(1.2rem, 4.8vw, 1.5rem); }
}
@media (max-width: 960px) and (max-height: 760px) {
  .stage__step h2 { font-size: clamp(1.15rem, 4.6vw, 1.4rem); margin-top: 4px; }
  .stage__step p { display: none; }
  .stage__hud { margin-top: 6px; }
  .stage__readout > .stage__hint { margin: 8px 0 6px; }
  .stage__result { margin-top: 6px; }
  .stage__result b { font-size: 1.1rem; }
  .stage__step--done .btn { margin-top: 8px; padding: 8px 12px; font-size: 0.82rem; }
}
@media (max-width: 960px) and (max-height: 620px) {
  .stage__grid { padding-top: calc(var(--header-h) + 4px); }
  .stage__hud { display: none; }
  .stage__result > div:last-child { display: none; }
}

/* ---------- Zgody na ciasteczka (Consent Mode v2) ---------- */
.consent {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 14px;
  width: min(820px, calc(100% - 2 * var(--gutter)));
  margin-left: calc(min(820px, calc(100% - 2 * var(--gutter))) / -2);
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgb(var(--surface-rgb) / 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -24px rgb(0 0 0 / calc(0.95 * var(--shadow-k)));
  animation: consentIn 0.5s var(--ease-out);
}
.consent[hidden] { display: none; }
@keyframes consentIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.consent > .ic { width: 22px; height: 22px; margin-top: 2px; color: var(--ok); }
.consent__body { min-width: 0; }
.consent__title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.consent__desc { margin-top: 4px; font-size: 0.86rem; line-height: 1.5; color: var(--fg-muted); }
.consent__desc a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.consent__gpc { display: block; margin-top: 4px; color: var(--ok); }
.consent__prefs { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.consent__prefs[hidden] { display: none; }
.consent__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.consent__row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__switch { position: relative; width: 38px; height: 22px; margin-top: 2px; border-radius: 999px; background: rgb(var(--line-rgb) / 0.35); transition: background-color 0.2s ease; }
.consent__switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); transition: transform 0.2s var(--ease-out); }
.consent__row input:checked + .consent__switch { background: var(--accent-strong); }
.consent__row input:checked + .consent__switch::after { transform: translateX(16px); }
.consent__row input:disabled + .consent__switch { background: rgb(var(--ok-rgb) / 0.55); cursor: default; }
.consent__row input:focus-visible + .consent__switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent__row-text b { display: block; font-size: 0.9rem; }
.consent__row-text small { display: block; font-size: 0.78rem; color: var(--fg-dim); line-height: 1.45; }
.consent__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.consent__actions .btn { padding: 10px 16px; font-size: 0.9rem; }
.consent__actions .btn[hidden] { display: none; }
.consent__btn-nec { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.consent__btn-nec:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 640px) {
  .consent { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 14px; }
  .consent__desc { font-size: 0.8rem; }
  .consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent__actions #consent-all, .consent__actions #consent-save { grid-column: 1 / -1; }
}
.magnet__consent { flex-basis: 100%; margin-top: 4px; }
.magnet__status a { white-space: nowrap; }
.site-footer .footer__h { font-family: var(--font-mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); margin: 0; }

/* ----------------------------------------------------------------------------
   Przełącznik języka (nagłówek): PL ⇄ EN, obok przycisku motywu
   ---------------------------------------------------------------------------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.lang-switch:hover,
.lang-switch:focus-visible { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) {
  .header-cta { gap: 8px; }
  .lang-switch { min-width: 38px; height: 38px; padding: 0 8px; }
}

/* ---------- Druk 3D i modelowanie (#druk-3d) + szerokie karty usług ---------- */
.service--wide { grid-column: span 2; }
.print3d { display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.6fr; gap: 28px; align-items: start; }
.print3d__art { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.print3d__svg { width: 100%; height: auto; display: block; }
.p3-shell { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.p3-glass { fill: rgb(var(--bg-rgb) / 0.55); stroke: var(--line); stroke-width: 1; }
.p3-top { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.p3-rail { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.p3-head rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.p3-head path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.p3-bed { fill: var(--line-strong); }
.p3-object rect { fill: var(--accent); opacity: 0.8; animation: p3layer 4s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 0.45s); }
.p3-foot { fill: var(--line-strong); }
.p3-spool { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.p3-wire { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 5; animation: dashflow 1.2s linear infinite; }
@keyframes p3layer { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }
.print3d__spec { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.print3d__spec span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-dim); }
.print3d__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.print3d__box { padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.print3d__box h3 { margin: 0 0 8px; font-size: 1.05rem; }
.print3d__box p, .print3d__box li { margin: 0; color: var(--fg-dim); font-size: 0.95rem; line-height: 1.55; }
.print3d__box ul, .print3d__box ol { margin: 0; padding-left: 18px; }
.print3d__box li + li { margin-top: 4px; }
.print3d__box .service__tags { margin-top: 12px; }
.print3d__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 0; color: var(--fg-dim); }
@media (max-width: 960px) { .print3d { grid-template-columns: 1fr; } .print3d__art { max-width: 420px; } }
@media (max-width: 560px) { .service--wide { grid-column: auto; } .print3d__grid { grid-template-columns: 1fr; } }

/* Logo „Terminal”: mrugający kursor */
.brand__cursor { animation: brandBlink 1.2s steps(2, end) infinite; }
@keyframes brandBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand__cursor { animation: none; } }
