/* =========================================================
   Elektryk – wizytowka (redesign). Mobile first.
   Zasada: stan koncowy (obwod zamkniety, lampa swieci, tresc widoczna)
   jest stanem domyslnym; animacje tylko do niego dochodza.
   ========================================================= */

/* ---------- Fonty (lokalne) ---------- */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }

/* ---------- Tokeny ---------- */
:root {
  --bg: #0a0d12;
  --navy: #0c1422;
  --line: #222c39;
  --line-2: #36424f;
  --text: #eef1f4;
  --muted: #a6b0bd;
  --faint: #8a95a3;
  --amber: #ffb224;
  --amber-hi: #ffd57f;
  --amber-dim: rgb(255 178 36 / 0.32);
  --amber-ghost: rgb(255 178 36 / 0.08);
  --red: #e2553d;
  --ink: #17110a;

  --f-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: 20px;
  --maxw: 1180px;
  --radius: 8px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --topbar-h: 72px;
  --sticky-top: 0px;
  --callbar-h: calc(84px + env(safe-area-inset-bottom));

  color-scheme: dark;
}

/* ---------- Baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  padding-bottom: var(--callbar-h);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.02; }
strong { font-weight: 700; color: var(--text); }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
em { font-style: normal; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--amber); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--amber); color: var(--ink); padding: 10px 14px; border-radius: 4px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--amber); box-shadow: 0 0 0 3px var(--amber-ghost), 0 0 10px var(--amber);
}

/* Tlo granatowe na pelna szerokosc dla sekcji o ograniczonej szerokosci */
.section--navy, .story, .section--contact {
  background: var(--navy);
  box-shadow: 0 0 0 100vmax var(--navy);
  clip-path: inset(0 -100vmax);
}

/* ---------- Pasek gorny ---------- */
.topbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; min-height: 44px; }
.brand__mark { width: 32px; height: 32px; color: var(--line-2); flex: none; }
.brand__text { display: grid; min-width: 0; line-height: 1.25; }
.brand__name {
  font-weight: 800; font-stretch: 118%; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__tag { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.topbar__call {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--f-mono); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--amber);
  transition: background-color .2s, border-color .2s;
}
.topbar__call svg { width: 18px; height: 18px; }
.topbar__call:hover { border-color: var(--amber); background: var(--amber-ghost); }

/* ---------- Przyciski ---------- */
.btn {
  --h: 60px;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--f-sans); font-weight: 800; font-size: .92rem; font-stretch: 115%;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .3s, background-color .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: scale(.975); }
/* przebiegajacy blysk po najechaniu lub fokusie */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%);
  transform: translateX(-110%);
}
.btn:hover::after, .btn:focus-visible::after { transform: translateX(110%); transition: transform .8s var(--ease); }

.btn--primary {
  background: var(--amber); color: var(--ink);
  box-shadow: 0 0 0 1px rgb(255 213 127 / .55) inset, 0 12px 32px -12px rgb(255 178 36 / .6);
}
.btn--primary::after { background: linear-gradient(105deg, transparent 30%, rgb(255 250 235 / .7) 50%, transparent 70%); }
@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(255 230 170 / .8) inset, 0 18px 40px -12px rgb(255 178 36 / .85); }
}
.btn--primary:active { transform: scale(.975); }
.btn__stack { display: grid; text-align: left; line-height: 1.05; }
.btn__label { font-size: .82rem; letter-spacing: .18em; }
.btn__num { font-family: var(--f-mono); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; text-transform: none; font-variant-numeric: tabular-nums; margin-top: 4px; }

.btn--ghost { border: 1px solid var(--line-2); color: var(--text); background: rgb(255 255 255 / .02); }
.btn--ghost svg { color: var(--amber); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn--square {
  --h: 72px; width: 72px; padding: 0; flex-direction: column; gap: 4px;
  border: 1px solid var(--line-2); color: var(--amber); background: rgb(255 255 255 / .02);
}
.btn--square:hover { border-color: var(--amber); background: var(--amber-ghost); }
.btn__mini { font-family: var(--f-mono); font-size: .66rem; font-weight: 600; letter-spacing: .16em; color: var(--muted); }

/* ---------- Etykiety i tytuly sekcji ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font-family: var(--f-mono); font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--amber);
}
.eyebrow span { color: var(--faint); font-weight: 400; }
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--amber), var(--line-2) 30%, transparent);
  transform-origin: left; transition: transform 1.2s .25s var(--ease);
}
.is-pending .eyebrow::after { transform: scaleX(0); }

.title {
  font-weight: 850; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(1.85rem, 8.4vw, 4.4rem); line-height: .98; letter-spacing: .01em;
  max-width: 16ch;
}
.title em { color: var(--amber); }
.lead { margin: 18px 0 0; color: var(--muted); max-width: 48ch; font-size: 1.05rem; }

/* ---------- Sekcje ---------- */
.section {
  position: relative;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 84px var(--gutter);
}
.section__head { margin-bottom: 36px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 6px var(--gutter) 16px;
}
.hero__bg {
  position: absolute; z-index: -1; pointer-events: none;
  inset: calc(-1 * var(--topbar-h)) calc(50% - 50vw) -40px;
  background:
    radial-gradient(60% 38% at 92% 8%, rgb(255 178 36 / .16), transparent 70%),
    radial-gradient(90% 55% at 0% 100%, rgb(28 52 92 / .55), transparent 70%),
    linear-gradient(to right, rgb(120 150 190 / .06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(to bottom, rgb(120 150 190 / .06) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, #000 70%, transparent);
  transform: translate3d(0, calc(var(--hy, 0) * .25px), 0);
}

.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-family: var(--f-mono); font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--amber);
}

/* Stos slow dopasowanych do szerokosci - jednostki kontenera (cqi), bez JS i bez skokow ukladu */
.stack { display: block; margin: 0; font-weight: 850; font-stretch: 125%; text-transform: uppercase; }
.stack__words {
  position: relative; display: block;
  padding-left: 18px;
  container-type: inline-size;
  transform: translate3d(0, calc(var(--hy, 0) * -.08px), 0);
}
/* szyna z wezlami po lewej */
.stack__words::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .25em; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--amber), rgb(255 178 36 / .25));
  box-shadow: 0 0 10px rgb(255 178 36 / .5);
  transform-origin: top;
}
.w { display: block; position: relative; letter-spacing: .02em; line-height: .9; }
.w > span { display: block; overflow: hidden; padding: .02em 0 .04em; }
.w > span > span { display: block; white-space: nowrap; }
.w::before {
  content: ""; position: absolute; left: -21px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber);
}
/* proporcje szerokosci zmierzone dla Archivo 850 / 125% / .02em (+1.5% zapasu) */
.w1 { font-size: calc((100vw - 2 * var(--gutter) - 18px) / 5.83); font-size: calc(100cqi / 5.83); }
.w2 { font-size: calc((100vw - 2 * var(--gutter) - 18px) / 8.95); font-size: calc(100cqi / 8.95); }
.w3 { font-size: calc((100vw - 2 * var(--gutter) - 18px) / 11.49); font-size: calc(100cqi / 11.49); color: #cfd6df; }

.claim { display: block; margin-top: 20px; container-type: inline-size; }
.claim__line { display: block; overflow: hidden; padding-top: .14em; }
.claim__line > span {
  display: block; white-space: nowrap;
  font-weight: 800; letter-spacing: .12em; line-height: 1.05;
  font-size: calc((100vw - 2 * var(--gutter)) / 15.75); font-size: calc(100cqi / 15.75);
}
.claim__line--amber > span { color: var(--amber); }

/* Przebieg napiecia (oscyloskop) */
.hero__energy {
  flex: 1; min-height: 110px;
  display: flex; align-items: center;
  margin-top: 8px;
  transform: translate3d(0, calc(var(--hy, 0) * .06px), 0);
}
.scope { width: 100%; height: auto; max-height: 150px; overflow: visible; }
.scope__axis { stroke: var(--line); stroke-width: 1; fill: none; }
.scope__ticks { stroke: var(--line-2); stroke-width: 1; fill: none; }
.scope__halo { fill: none; stroke: rgb(255 178 36 / .16); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.scope__wave { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.scope__spark { fill: none; stroke: #fff4d6; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 4 96; stroke-dashoffset: 100; opacity: 0; }
.scope__lamp { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linecap: round; }
.scope__glow { transform-box: fill-box; transform-origin: center; }
.scope__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; fill: var(--faint); }
.scope__label--end { text-anchor: end; }

.facts {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 18px 0 0;
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.facts b { color: var(--amber); font-weight: 600; }
.hero__foot { padding-top: 10px; }
.hero__cta { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn--call { --h: 72px; justify-content: flex-start; padding-left: 22px; }
.btn--call > svg { width: 26px; height: 26px; }
.scroll-cue {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 6px;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.scroll-cue svg { width: 16px; height: 16px; color: var(--amber); }
.scroll-cue:hover { color: var(--text); }

/* ---------- Pasek uslug (marquee) ---------- */
.marquee {
  overflow: hidden; position: relative;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  background: var(--navy);
}
.marquee__track { display: flex; align-items: center; gap: 26px; width: max-content; }
.marquee span {
  font-weight: 850; font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(1.6rem, 7vw, 3rem); line-height: 1; white-space: nowrap;
}
.marquee span.o { color: transparent; -webkit-text-stroke: 1.2px var(--muted); }
.marquee i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--amber); box-shadow: 0 0 12px var(--amber); flex: none; }

/* =========================================================
   USLUGI
   ========================================================= */
.svcs { display: grid; border-top: 1px solid var(--line); }
.svc {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-areas: "no led" "icon title" "icon text";
  column-gap: 16px;
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}
/* linia "pradu" przebiegajaca przy odslonieciu */
.svc::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: linear-gradient(90deg, var(--amber), rgb(255 178 36 / 0));
  transform-origin: left; transition: transform 1.1s var(--ease);
}
.svc__no { grid-area: no; font-family: var(--f-mono); font-size: .76rem; font-weight: 600; letter-spacing: .14em; color: var(--amber); margin-bottom: 10px; }
.svc__led {
  grid-area: led; justify-self: end; align-self: start; margin-top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber);
  transition: background-color .4s, box-shadow .4s;
}
.svc__icon { grid-area: icon; width: 48px; height: 48px; }
.svc__icon * { fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s; }
.svc__icon .dim { stroke: var(--line-2); }
.svc__icon .hot { stroke: var(--amber); }
.svc__icon .dot { stroke-width: 4.2; }
.svc__title { grid-area: title; margin-bottom: 8px; font-weight: 800; font-stretch: 112%; font-size: 1.3rem; line-height: 1.15; }
.svc__text { grid-area: text; margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.55; }

/* stan przed odslonieciem (tylko gdy JS przygotowal animacje) */
.svc[data-state="off"]::before { transform: scaleX(0); }
.svc[data-state="off"] .svc__led { background: #2d3644; box-shadow: none; }
.svc[data-state="off"] .svc__icon .hot { stroke: var(--line-2); }

@media (hover: hover) {
  .svc { transition: background-color .3s; }
  .svc:hover { background: linear-gradient(90deg, var(--amber-ghost), transparent 70%); }
  .svc:hover .svc__icon * { stroke: var(--text); }
  .svc:hover .svc__icon .hot { stroke: var(--amber-hi); }
}

.aside-note { margin: 28px 0 0; color: var(--muted); max-width: 60ch; }
.aside-note a { color: var(--amber); text-underline-offset: 3px; font-weight: 700; }

/* =========================================================
   DOSWIADCZENIE: obwod sterowany scrollem
   ========================================================= */
.story { --p1: 1; --p2: 1; --p3: 1; position: relative; }
.story__pin { padding: 84px var(--gutter) 24px; }
.story__inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 24px; }
.title--story { font-size: clamp(1.6rem, 7.4vw, 3.8rem); max-width: 20ch; }
.story__years { color: var(--amber); }

.story__board {
  position: relative;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 16px 14px;
  background:
    linear-gradient(to right, rgb(120 150 190 / .07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(to bottom, rgb(120 150 190 / .07) 1px, transparent 1px) 0 0 / 24px 24px,
    #08101b;
}
.story__svg { width: 100%; height: auto; overflow: visible; }
.story__svg text { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; fill: var(--faint); text-anchor: middle; }
.sc-src, .sc-wire, .sc-lamp, .sc-lever, .sc-fuse rect, .sc-fuse path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-src { stroke: var(--amber); }
.sc-wire { stroke: var(--line-2); }
.sc-node { fill: #08101b; stroke: var(--amber); stroke-width: 2.4; }
.sc-scan { fill: none; stroke: var(--amber-hi); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 7 93; stroke-dashoffset: calc(100 - var(--p1) * 100); opacity: 0; }
.sc-fuse rect, .sc-fuse__ok { stroke: var(--amber); }
.sc-fuse__bad { stroke: var(--red); opacity: 0; }
.sc-lever { stroke: var(--amber); transform-box: view-box; transform-origin: 192px 60px; transform: rotate(calc(var(--p2) * 26.6deg)); }
.sc-live { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p3) * 100); }
.sc-glow { opacity: var(--p3); }
.sc-lamp { stroke: var(--amber); }

/* etap 1: usterka (bezpiecznik na czerwono), etap 2: naprawa, etap 3: zasilanie */
.story[data-stage="1"] .sc-scan { opacity: 1; }
.story[data-stage="1"] .sc-fuse rect { stroke: var(--red); }
.story[data-stage="1"] .sc-fuse__bad { opacity: 1; }
.story[data-stage="1"] .sc-fuse__ok { opacity: 0; }
.story[data-stage="1"] .sc-lamp, .story[data-stage="2"] .sc-lamp { stroke: var(--line-2); }

.meter { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 0; font-family: var(--f-mono); }
.meter__label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin-right: auto; }
.meter__val { font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--amber); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.meter__unit { font-weight: 600; font-size: 1.1rem; color: var(--muted); }

.stages { display: grid; }
.stage {
  display: grid; grid-template-columns: 38px 1fr; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .98rem; line-height: 1.5;
  transition: opacity .4s, color .4s;
}
.stage__no { font-family: var(--f-mono); font-weight: 600; font-size: .8rem; letter-spacing: .1em; color: var(--amber); padding-top: .2em; }
.stage strong { color: var(--text); font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: .06em; font-size: .92rem; }

/* tryb "na zywo" (JS + ruch dozwolony + wystarczajaco wysoki ekran) */
.story--live .story__track { height: 270vh; height: 270svh; }
.story--live .story__pin {
  position: sticky; top: var(--sticky-top);
  height: calc(100vh - var(--sticky-top)); height: calc(100svh - var(--sticky-top));
  display: flex; align-items: center;
  padding-block: 20px;
}
.story--live .story__inner { width: 100%; }
.story--live .stage { opacity: .38; }
.story--live[data-stage="1"] .stage[data-step="1"],
.story--live[data-stage="2"] .stage[data-step="2"],
.story--live[data-stage="3"] .stage[data-step="3"] { opacity: 1; color: var(--text); }

.story__after { padding-top: 40px; }
.exp { display: grid; gap: 10px; }
.exp__big {
  margin: 0;
  font-weight: 850; font-stretch: 125%; line-height: .8;
  font-size: clamp(8rem, 44vw, 16rem);
  color: transparent; -webkit-text-stroke: 2px var(--amber);
}
.exp__body { color: var(--muted); max-width: 58ch; font-size: 1.05rem; }

/* =========================================================
   WSPOLPRACA
   ========================================================= */
.steps { position: relative; display: grid; gap: 34px; --p: 1; }
.steps::before, .steps::after { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; border-radius: 2px; }
.steps::before { background: var(--line); }
.steps::after { background: var(--amber); box-shadow: 0 0 10px var(--amber); transform-origin: top; transform: scaleY(var(--p)); }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; }
.step__node {
  grid-row: span 2; z-index: 1;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--amber); color: var(--amber);
  font-family: var(--f-mono); font-weight: 600; font-size: 1rem; letter-spacing: .04em;
  box-shadow: 0 0 0 6px var(--navy), 0 0 24px -4px rgb(255 178 36 / .5);
}
.step__title { font-weight: 800; font-stretch: 112%; font-size: 1.3rem; line-height: 1.15; padding-top: 6px; margin-bottom: 8px; }
.step__text { color: var(--muted); margin: 0; }

/* =========================================================
   OBSZAR i naglowek kontaktu: slowa dopasowane do szerokosci
   ========================================================= */
.fit-stack {
  display: block; margin: 0; max-width: 860px; container-type: inline-size;
  font-weight: 850; font-stretch: 125%; text-transform: uppercase; letter-spacing: .02em; line-height: .9;
}
.f { display: block; white-space: nowrap; }
.f-koz { font-size: calc((100vw - 2 * var(--gutter)) / 7.48); font-size: calc(100cqi / 7.48); }
.f-rad { font-size: calc((100vw - 2 * var(--gutter)) / 5.17); font-size: calc(100cqi / 5.17); color: var(--amber); }
.f-oko { font-size: calc((100vw - 2 * var(--gutter)) / 6.83); font-size: calc(100cqi / 6.83); color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.fit-stack--contact { max-width: 760px; }
.f-call { font-size: calc((100vw - 2 * var(--gutter)) / 7.43); font-size: calc(100cqi / 7.43); }

.area { display: grid; gap: 28px; }
.area__map { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--navy); }
.area__map svg { width: 100%; height: auto; }
.area__map figcaption { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.map__river { fill: none; stroke: rgb(70 120 190 / .45); stroke-width: 7; stroke-linecap: round; }
.map__riverlabel { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; fill: rgb(120 160 215 / .8); }
.map__ring { fill: rgb(255 178 36 / .05); stroke: var(--amber-dim); stroke-width: 1.2; stroke-dasharray: 3 5; }
.map__ring--soft { fill: none; stroke: rgb(255 178 36 / .14); }
.map__route { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-linejoin: round; }
.map__pulse { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s .3s cubic-bezier(.6, 0, .3, 1); }
.area__map[data-state="off"] .map__pulse { stroke-dashoffset: 100; }
.map__city circle { fill: var(--bg); stroke: var(--amber); stroke-width: 2.4; }
.map__city .core { fill: var(--amber); stroke: none; }
.map__city text { font-family: var(--f-sans); font-weight: 800; font-size: 15px; font-stretch: 110%; fill: var(--text); text-anchor: middle; }
.area__body { color: var(--muted); max-width: 52ch; font-size: 1.08rem; }
.area__when {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--f-mono); font-size: .85rem; color: var(--text);
}

/* =========================================================
   KONTAKT
   ========================================================= */
.section--contact { isolation: isolate; padding-bottom: 80px; }
.section--contact::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 20% 30%, rgb(255 178 36 / .12), transparent 70%),
    linear-gradient(to right, rgb(120 150 190 / .05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(to bottom, rgb(120 150 190 / .05) 1px, transparent 1px) 0 0 / 32px 32px;
}
.contact__phone { display: inline-grid; margin: 4px 0 26px; text-decoration: none; }
.contact__phone-label { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.contact__phone-num {
  font-family: var(--f-mono); font-weight: 600;
  font-size: clamp(2.3rem, 11.5vw, 5.2rem);
  letter-spacing: .01em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 100% 3px no-repeat;
  padding-bottom: 8px;
  transition: color .2s;
}
.contact__phone:hover .contact__phone-num { color: var(--amber-hi); }
.contact__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 32px; max-width: 540px; }
.contact__actions .btn { padding-inline: 12px; gap: 8px; white-space: nowrap; }
.contact__meta { display: grid; border-top: 1px solid var(--line); max-width: 640px; }
.contact__meta > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact__meta dt { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding-top: .25em; }
.contact__meta dd { overflow-wrap: anywhere; }
.contact__meta a { color: var(--amber); text-underline-offset: 3px; }
.contact__hint { margin: 20px 0 0; color: var(--muted); max-width: 52ch; }
.safety {
  margin-top: 28px; padding: 14px 16px; max-width: 640px;
  border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px;
  background: rgb(226 85 61 / .06); font-size: .93rem; color: var(--muted);
}
.safety p { margin: 0; }
.safety a { color: var(--text); font-weight: 700; }

/* ---------- Stopka ---------- */
.footer {
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  color: var(--faint); font-size: .9rem;
}
.footer p { margin: 0 0 4px; }
.footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text); font-weight: 800; font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.footer__brand .brand__mark { width: 28px; height: 28px; }
.footer__small { font-size: .8rem; }

/* ---------- Przypiety przycisk polaczenia (telefon) ---------- */
.callbar {
  position: fixed; z-index: 20;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; padding: 6px;
  border-radius: 14px;
  background: rgb(12 18 28 / .95);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px -12px #000, 0 0 0 1px rgb(0 0 0 / .5);
  transition: transform .4s var(--ease), opacity .25s;
}
.callbar a { display: flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 10px; min-height: 52px; }
.callbar svg { width: 22px; height: 22px; flex: none; }
.callbar__call { flex: 1; gap: 10px; background: var(--amber); color: var(--ink); font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; }
.callbar__num { font-family: var(--f-mono); font-weight: 600; text-transform: none; letter-spacing: .03em; margin-left: 4px; font-size: 1rem; }
.callbar__sms { width: 52px; flex: none; color: var(--amber); border: 1px solid var(--line-2); }
.callbar.is-hidden { transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom))); opacity: 0; pointer-events: none; }

/* ---------- Odslanianie przy scrollu (tylko z JS) ---------- */
[data-reveal] { transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-pending { opacity: 0; transform: translate3d(0, 28px, 0); }

/* ---------- Animacje (tylko gdy ruch jest dozwolony) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 36s linear infinite; }
  .marquee.is-paused .marquee__track { animation-play-state: paused; }

  .kicker { animation: fade .6s .05s both; }
  .stack__words::before { animation: grow-y .9s .1s var(--ease) both; }
  .w1 > span > span { animation: rise-mask .95s .1s var(--ease) both; }
  .w2 > span > span { animation: rise-mask .95s .22s var(--ease) both; }
  .w3 > span > span { animation: rise-mask .95s .34s var(--ease) both; }
  .w::before { animation: node-on .5s var(--ease) both; }
  .w1::before { animation-delay: .4s; }
  .w2::before { animation-delay: .52s; }
  .w3::before { animation-delay: .64s; }
  .claim__line > span { animation: rise-mask .9s var(--ease) both; }
  .claim__line:nth-child(1) > span { animation-delay: .5s; }
  .claim__line:nth-child(2) > span { animation-delay: .6s; }

  .scope__wave { animation: draw 1.1s .55s cubic-bezier(.6, 0, .3, 1) both; }
  .scope__halo { animation: fade 1s 1.1s both; }
  .scope__spark { animation: spark 3.2s 1.7s linear infinite; }
  .scope__glow { animation: lamp-on .9s 1.45s var(--ease) both; }
  .scope__lamp { animation: lamp-stroke .9s 1.45s both; }
  .hero.is-paused .scope__spark { animation-play-state: paused; }

  .facts { animation: fade .8s .7s both; }
  .btn--call { animation: power-on 1.3s 1.5s both; }
  .scroll-cue svg { animation: nudge 2.4s 2.4s ease-in-out infinite; }
  .kicker .led, .area__when .led { animation: blink 2.8s 1.8s infinite; }
}

@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes rise-mask { from { transform: translate3d(0, 110%, 0); } }
@keyframes node-on { from { transform: scale(0); opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 100; } }
@keyframes spark {
  0% { stroke-dashoffset: 100; opacity: 0; }
  5% { opacity: 1; }
  45% { stroke-dashoffset: 0; opacity: 1; }
  50%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
/* rozjarzenie bez migotania - migajaca lampa kojarzy sie z usterka */
@keyframes lamp-on { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes lamp-stroke { 0% { stroke: var(--line-2); } 35%, 100% { stroke: var(--amber); } }
@keyframes power-on {
  0% { box-shadow: 0 0 0 1px rgb(255 213 127 / .55) inset, 0 0 0 0 rgb(255 178 36 / .7); }
  40% { box-shadow: 0 0 0 1px rgb(255 213 127 / .55) inset, 0 0 0 12px rgb(255 178 36 / 0), 0 12px 50px -6px rgb(255 178 36 / .9); }
}
@keyframes blink { 0%, 86%, 100% { opacity: 1; } 90% { opacity: .25; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Wieksze telefony ---------- */
@media (min-width: 420px) {
  :root { --gutter: 24px; }
}

/* ---------- Tablet ---------- */
@media (min-width: 720px) {
  :root { --gutter: 40px; }
  .section { padding-block: 112px; }
  .hero__main, .hero__energy, .hero__foot { max-width: 640px; }
  .scope { max-height: none; }
  .svcs { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .area { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
  .exp { grid-template-columns: auto 1fr; align-items: end; gap: 40px; }
  .story__board { padding: 24px 24px 18px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  :root { --topbar-h: 76px; --sticky-top: 76px; }
  body { --callbar-h: 0px; }
  .callbar { display: none; }
  .topbar { position: sticky; top: 0; }
  .topbar::before {
    content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
    background: rgb(10 13 18 / .9); border-bottom: 1px solid var(--line);
  }
  .topbar__call { padding-inline: 18px; }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: 1fr auto;
    column-gap: 64px;
    padding-top: 32px; padding-bottom: 48px;
  }
  .hero__main { grid-column: 1; grid-row: 1 / span 2; align-self: center; max-width: none; }
  .claim { width: 80%; margin-top: 28px; }
  .hero__energy { grid-column: 2; grid-row: 1; margin: 0; align-self: center; max-width: none; }
  .scope { max-height: none; }
  .hero__foot { grid-column: 2; grid-row: 2; align-self: end; max-width: none; }

  .svcs { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .svc { grid-template-columns: 1fr; grid-template-areas: "no" "icon" "title" "text"; padding: 28px 0 36px; }
  .svc__led { position: absolute; right: 0; top: 30px; margin: 0; }
  .svc__icon { width: 60px; height: 60px; margin: 10px 0 22px; }
  .svc__title { font-size: 1.5rem; }

  .story__inner { grid-template-columns: 1fr 1fr; grid-template-areas: "head board" "stages board"; column-gap: 64px; align-items: center; }
  .story__head { grid-area: head; align-self: end; }
  .story__board { grid-area: board; }
  .stages { grid-area: stages; align-self: start; }
  .meter__val { font-size: 3.4rem; }

  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .steps::before, .steps::after { left: 28px; right: 28px; top: 27px; bottom: auto; width: auto; height: 2px; }
  .steps::after { transform-origin: left; transform: scaleX(var(--p)); }
  .step { grid-template-columns: 1fr; row-gap: 22px; }
  .step__node { grid-row: auto; }

  .contact__phone-num { font-size: clamp(3.6rem, 6.4vw, 5.6rem); }
}

/* ---------- Ograniczony ruch ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
