/* =====================================================================
   Satus Energo — v2.1
   Rytm ciemnych i jasnych sekcji, szklana nawigacja, konsola rozruchu
   z procesami uruchamianymi przyciskami. Bez przypinania sekcji.
   ===================================================================== */

:root {
  --black: #000;
  --ink: #1d1d1f;
  --gray-bg: #f5f5f7;
  --white: #fff;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;

  --accent: #2f66ff;
  --accent-hover: #4a7bff;
  --accent-dark: #7b97ff;
  --live: #7b97ff;
  --ok: #30d158;
  --warn: #ffd60a;
  --closed: #ff453a;
  --open: #30d158;
  --danger: #ff3b30;

  --grad: linear-gradient(92deg, #8fb0ff 0%, #a98bff 45%, #5fd4ff 100%);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-swift: cubic-bezier(.2, .8, .2, 1);

  --nav-h: 52px;
  --container: 1120px;
  --radius-xl: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* Telefon: natychmiastowe kliknięcie i brak zaznaczania tekstu kontrolek przy przytrzymaniu */
a, button, select, [role="button"] { touch-action: manipulation; }
button, .btn, .proc, .nav__cta { -webkit-user-select: none; user-select: none; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: clip;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
address { font-style: normal; }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.br-wide { display: none; }
@media (min-width: 900px) { .br-wide { display: inline; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------------
   Logo
   --------------------------------------------------------------------- */
.logo { position: relative; display: inline-flex; align-items: flex-end; padding-bottom: 11px; line-height: 1; color: currentColor; }
.logo__bolt { width: 13px; height: 30px; fill: currentColor; margin-right: 1px; transform: translateY(5px); }
.logo__word { font-family: "Tomorrow", var(--font); font-weight: 500; font-size: 22px; letter-spacing: .02em; line-height: .8; }
.logo__sub { position: absolute; left: 25px; bottom: -3px; font-family: "Caveat", cursive; font-size: 16px; font-weight: 600; letter-spacing: 0; }
.logo__sub b { color: var(--accent-dark); font-weight: 600; }
.logo--dark .logo__sub b { color: var(--accent); }

/* ---------------------------------------------------------------------
   Nawigacja
   --------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  color: var(--on-dark);
  transition: color .4s ease;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color .4s ease;
}
.nav[data-theme="light"] { color: var(--ink); }
.nav[data-theme="light"]::before { background: rgba(245, 245, 247, .74); }
.nav__inner { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { font-size: 14px; letter-spacing: -0.01em; opacity: .82; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__links .nav__cta {
  opacity: 1; padding: 6px 14px; border-radius: 980px;
  background: var(--accent); color: #fff; font-weight: 500;
  transition: background-color .2s, transform .1s;
}
.nav__links .nav__cta:hover { background: var(--accent-hover); }
.nav__links .nav__cta:active { transform: scale(.96); }

.nav__burger { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.nav__burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-swift), top .35s var(--ease-swift); }
.nav__burger span:first-child { top: 18px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* ---------------------------------------------------------------------
   Przyciski i linki
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 0; border-radius: 980px;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer;
  transition: background-color .2s ease, transform .1s ease-out;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--block { width: 100%; }

.more { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; color: var(--accent-dark); }
.more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.more:hover svg { transform: translateX(3px); }

.kicker { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); margin-bottom: 12px; }
.kicker--dark { color: var(--accent-dark); }

.head { max-width: 820px; margin-bottom: 64px; }
.head h2 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -0.035em; }
.head__lead { margin-top: 20px; max-width: 36em; font-size: 21px; line-height: 1.4; letter-spacing: -0.02em; color: var(--text-2); }
.head--dark h2 { color: var(--on-dark); }
.head--dark .head__lead { color: var(--on-dark-2); }

/* ---------------------------------------------------------------------
   Wejście i pojawianie się — tylko transform + opacity, krótko
   --------------------------------------------------------------------- */
.js .in { opacity: 0; transform: translateY(var(--y, 16px)); }
.js.is-loaded .in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .9s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms + 80ms);
}
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--nav-h) + 6vh) 24px 72px;
  background:
    radial-gradient(70% 45% at 50% 78%, rgba(47, 102, 255, .22), transparent 70%),
    radial-gradient(120% 70% at 50% 120%, #0b1430 0%, #000 60%);
  color: var(--on-dark);
  text-align: center;
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; max-width: 1040px; }
.hero__eyebrow { --y: 0px; font-size: 17px; font-weight: 600; color: var(--on-dark-2); margin-bottom: 18px; }
.hero__title {
  --y: 26px;
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 1.04; letter-spacing: -0.04em; font-weight: 700;
  text-wrap: balance;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { --y: 18px; margin: 26px auto 0; max-width: 36em; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.42; letter-spacing: -0.02em; color: var(--on-dark-2); text-wrap: pretty; }
.hero__cta { --y: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: 34px; }

/* ---------------------------------------------------------------------
   KONSOLA ROZRUCHU
   --------------------------------------------------------------------- */
.console {
  --y: 40px;
  position: relative; z-index: 2;
  width: 100%; max-width: 1040px; margin-top: 72px;
  text-align: left;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(22, 27, 40, .92), rgba(8, 10, 16, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 60px 140px -50px rgba(47, 102, 255, .45),
    0 30px 60px -30px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.console__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 13px; color: var(--on-dark-2);
}
.console__title { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.console__title i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.console__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 980px;
  background: rgba(255, 255, 255, .06); color: var(--on-dark);
  font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background-color .3s ease, color .3s ease;
}
.console__status .spin { display: none; }
.console[data-state="run"] .console__status { background: rgba(123, 151, 255, .16); color: var(--accent-dark); }
.console[data-state="run"] .console__status .spin { display: inline-block; }
.console[data-state="done"] .console__status { background: rgba(48, 209, 88, .14); color: var(--ok); }

.spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.6px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.console__body { display: grid; grid-template-columns: 1.55fr 1fr; }
.console__viz { position: relative; padding: 26px 24px 76px 28px; }
.console__side {
  position: relative;
  padding: 26px 26px 24px;
  border-left: 1px solid rgba(255, 255, 255, .07);
  display: flex; flex-direction: column;
}
.console__side-title { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 14px; }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.log li {
  display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 10px;
  padding: 9px 0; font-size: 15px; letter-spacing: -0.015em; color: var(--on-dark);
  animation: log-in .45s var(--ease-out) both;
}
.log li + li { border-top: 1px solid rgba(255, 255, 255, .06); }
.log__ico { position: relative; width: 20px; height: 20px; display: grid; place-items: center; color: var(--accent-dark); }
.log__ico .spin { width: 14px; height: 14px; }
.log__ico svg { display: none; width: 20px; height: 20px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.log li.is-done .log__ico .spin { display: none; }
.log li.is-done .log__ico svg { display: block; animation: pop .35s var(--ease-out) both; }
.log li.is-done { color: var(--on-dark-2); }
@keyframes log-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }

.console__badge {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 980px;
  background: rgba(48, 209, 88, .14); color: var(--ok);
  font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(6px) scale(.96);
  transition: opacity .3s ease, transform .45s var(--ease-out);
}
.console__badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.console__badge.is-on { opacity: 1; transform: none; }

.readout {
  position: absolute; left: 28px; right: 24px; bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 6px 32px;
}
.readout div { display: flex; align-items: baseline; gap: 6px; }
.readout span { font-size: 14px; color: var(--on-dark-2); }
.readout small { font-size: 13px; color: var(--on-dark-2); }
.readout b { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; transition: color .4s ease; }
.flowing .readout b { color: var(--accent-dark); }

/* Przyciski procesów */
.console__controls {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .25);
}
.proc-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.proc-group--3 { grid-template-columns: repeat(3, 1fr); }
.proc-group__title { margin: 2px 4px 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--on-dark-2); }
.proc-group + .proc-group__title { margin-top: 14px; }
.proc {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 0; border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  text-align: left; cursor: pointer;
  transition: background-color .25s ease, transform .12s ease-out, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .proc:hover { background: rgba(255, 255, 255, .09); } }
.proc:active { transform: scale(.97); }
.proc__ico {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(123, 151, 255, .14); color: var(--accent-dark);
  transition: background-color .25s ease, color .25s ease;
}
.proc__ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.proc__txt { display: grid; gap: 1px; min-width: 0; }
.proc__txt b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--on-dark); }
.proc__txt small { font-size: 13px; color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease-out); }
.proc[aria-pressed="true"] { background: rgba(123, 151, 255, .14); box-shadow: inset 0 0 0 1px rgba(123, 151, 255, .35); }
.proc[aria-pressed="true"] .proc__ico { background: var(--accent); color: #fff; }

/* Schemat */
.pd { width: 100%; height: auto; overflow: visible; }
.pd path, .pd rect, .pd circle { stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.draw { stroke: rgba(245, 245, 247, .72); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke .45s ease; }
.is-drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset .7s var(--ease-out) var(--dd, 0ms), stroke .45s ease; }
.live-a { stroke: var(--live); }
.k1 .live-b { stroke: var(--live); transition-delay: 60ms; }
.k1 .live-c { stroke: var(--live); transition-delay: 140ms; }
.kn .live-n, .kn .live-q0 { stroke: var(--live); transition-delay: 80ms; }
.k2 .live-d { stroke: var(--live); }
.k3 .live-e { stroke: var(--live); }
.pd-earth .draw { stroke: rgba(245, 245, 247, .5); }
.pd-sec .draw { stroke: rgba(123, 151, 255, .45); stroke-width: 1.2; }
.pv-panel { transition: fill .5s ease, stroke .45s ease; fill: transparent; }
.pv-sync .pv-panel { fill: rgba(123, 151, 255, .25); }

.pulse { stroke: #fff; stroke-width: 2.6; stroke-dasharray: .12 1; stroke-dashoffset: .12; opacity: 0; filter: drop-shadow(0 0 4px rgba(123, 151, 255, .9)); }
.pulse--trip { stroke: #ffb3ad; filter: drop-shadow(0 0 4px rgba(255, 69, 58, .9)); }

.ct-ring { fill: none; stroke: var(--warn); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ct-on .ct-ring { animation: ring 1s ease-out infinite; }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

.pd-relay, .pd-sae { opacity: 0; transition: opacity .6s ease; }
.is-drawn .pd-relay, .is-drawn .pd-sae { opacity: 1; transition-delay: .25s; }
.pd-sae__case { stroke: rgba(255, 255, 255, .28); fill: #0a1020; }
.pd-sae text { stroke: none; font-family: var(--font); }
.pd-sae__name { font-size: 14px; font-weight: 700; fill: #fff; letter-spacing: .02em; }
.pd-sae__sub { font-size: 11px; font-weight: 500; fill: var(--on-dark-2); }
.pd-sae__led { fill: #253047; stroke: none; transition: fill .2s ease; }
.tm-on .pd-sae__led { fill: var(--ok); animation: blink .6s steps(1) infinite; }
.pd-relay .pd-relay__name { font-size: 12px; font-weight: 600; fill: var(--on-dark-2); letter-spacing: .04em; }
.pd-relay__case { stroke: rgba(255, 255, 255, .28); fill: #0a1020; }
.pd-relay__screen { stroke: rgba(123, 151, 255, .35); stroke-width: 1; fill: rgba(123, 151, 255, .1); }
.pd-relay text { font-family: var(--font); font-size: 11.5px; font-weight: 600; fill: var(--accent-dark); letter-spacing: .03em; }
.pd-relay__line { stroke: rgba(255, 255, 255, .12); }
.pd-led { fill: #253047; stroke: none; transition: fill .2s ease; }
.pd-led--ok { fill: var(--ok); }
.led-pick .pd-led--pick { fill: var(--warn); animation: blink .5s steps(1) infinite; }
.led-trip .pd-led--trip { fill: var(--closed); }
@keyframes blink { 50% { opacity: .3; } }

.pd-scada { stroke: var(--accent-dark); opacity: .55; transition: opacity .3s ease; }
.pd-scada circle { fill: var(--accent-dark); stroke: none; }
.tm-on .pd-scada { opacity: 1; animation: tm 1.2s ease-in-out infinite; }
@keyframes tm { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.pd-flow path { stroke: #fff; stroke-width: 1.8; stroke-dasharray: 3 10; opacity: 0; transition: opacity .3s ease; }
.fl-pv .f-pv, .fl-busl .f-busl, .fl-busr .f-busr, .fl-bess .f-bess, .fl-grid .f-grid { opacity: .9; animation: flow .8s linear infinite; }
.bess-box { transition: fill .5s ease, stroke .45s ease; fill: transparent; }
.fl-bess .bess-box { fill: rgba(48, 209, 88, .2); }
@keyframes flow { to { stroke-dashoffset: -13; } }

.sw { opacity: 0; transition: opacity .5s ease; }
.is-drawn .sw { opacity: 1; transition-delay: .3s; }
.sw__body { fill: var(--open); stroke: none; transition: fill .25s ease; }
.sw__blade { stroke: #fff; stroke-width: 2.2; transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(32deg); transition: transform .4s var(--ease-swift); }
.sw.on .sw__body { fill: var(--closed); }
.sw.on .sw__blade { transform: rotate(0deg); }
/* Znak łącznika na stałym styku: X = wyłącznik, kreska = odłącznik */
.sw__mark { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.sw__mark--o, .lg-o { fill: #0b1020; stroke-width: 1.8; }
.cable { stroke: rgba(123, 151, 255, .6); stroke-dasharray: 2 4; opacity: 0; transition: opacity .6s ease; }
.is-drawn .cable { opacity: 1; transition-delay: .4s; }

.pd-legend { opacity: 0; transition: opacity .6s ease; }
.is-drawn .pd-legend { opacity: 1; transition-delay: .45s; }
.pd-legend text { font-family: var(--font); font-size: 12px; font-weight: 500; fill: var(--on-dark-2); stroke: none; }
.lg-mark, .lg-earth { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.lg-earth { stroke-width: 1.5; }
.lg-closed { fill: var(--closed); stroke: none; }
.lg-open { fill: var(--open); stroke: none; }

.pd-lbl { opacity: 0; transition: opacity .6s ease; }
.is-drawn .pd-lbl { opacity: 1; transition-delay: .3s; }
.pd-lbl text { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .04em; fill: var(--text-3); stroke: none; }
.pd-lbl .k { fill: #fff; }
.pd-lbl .val { font-size: 12.5px; fill: var(--accent-dark); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------------------------------------------------------------------
   MANIFEST
   --------------------------------------------------------------------- */
.statement { background: var(--black); padding: clamp(48px, 8vh, 96px) 24px clamp(64px, 10vh, 112px); }
.statement__text {
  max-width: 1000px; margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.8vw, 64px); font-weight: 650;
  line-height: 1.12; letter-spacing: -0.035em;
  color: var(--on-dark);
  text-wrap: balance;
}
.statement__text .w { opacity: .18; transition: opacity .25s linear; }
.statement__text .hl .w { color: var(--accent-dark); }

/* ---------------------------------------------------------------------
   USŁUGI — bento
   --------------------------------------------------------------------- */
.services { background: var(--gray-bg); padding: 112px 0; }
.services .head h2 { color: var(--ink); }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 40px 36px;
  background: var(--white);
  border-radius: var(--radius-xl);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(47, 102, 255, .09), transparent 65%);
  transition: opacity .4s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .25); }
  .card:hover::before { opacity: 1; }
}
.card__head { margin-bottom: 32px; }
.card__kicker { font-size: 14px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.card h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -0.03em; }

.card--feature {
  grid-column: 1 / -1;
  padding: 56px 48px 52px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(47, 102, 255, .35), transparent 55%),
    radial-gradient(60% 90% at 0% 100%, rgba(169, 139, 255, .18), transparent 60%),
    #050608;
  color: var(--on-dark);
}
.card--feature::before { background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(123, 151, 255, .16), transparent 65%); }
.card--feature .card__kicker { color: var(--accent-dark); }
.card--feature h3 { font-size: clamp(32px, 4vw, 48px); }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.items--3 { grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.items li { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 4px; align-content: start; }
.items .ico {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(47, 102, 255, .08); color: var(--accent);
}
.items .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.items h4 { font-family: var(--font); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.items p { font-size: 15px; line-height: 1.45; letter-spacing: -0.01em; color: var(--text-2); }
.card--feature .ico { background: rgba(123, 151, 255, .14); color: var(--accent-dark); }
.card--feature .items p { color: var(--on-dark-2); }

/* ---------------------------------------------------------------------
   NA OBIEKCIE — zdjęcie rozszerza się, gdy przewijasz (bez przypinania)
   --------------------------------------------------------------------- */
.photo { position: relative; background: var(--black); }
.photo__sticky { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.photo__frame {
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(var(--iy, 12%) var(--ix, 14%) round var(--ir, 32px));
}
.photo__frame img {
  position: absolute; top: 0; left: var(--img-x, 0);
  height: 131%; width: auto; min-width: 100%; max-width: none;
  object-fit: cover; object-position: left top;
  transform: scale(var(--is, 1.12)); transform-origin: 40% 30%;
  filter: saturate(.92) contrast(1.05);
}
.photo__shade {
  position: absolute; inset: 0; opacity: var(--so, .3);
  background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 62%, rgba(0, 0, 0, .9) 100%);
}
.photo__cap {
  position: absolute; left: 0; right: 0; bottom: 9vh; z-index: 2;
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px;
  color: var(--on-dark);
  opacity: var(--co, 0); transform: translateY(calc((1 - var(--co, 0)) * 24px));
}
.photo__cap h2 { font-size: clamp(36px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.04em; }
.photo__cap p:not(.kicker) { margin-top: 18px; max-width: 34em; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.42; color: rgba(245, 245, 247, .82); }

/* ---------------------------------------------------------------------
   JAK PRACUJEMY
   --------------------------------------------------------------------- */
.process { background: var(--black); padding: 112px 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; }
.step { position: relative; padding-top: 34px; color: var(--on-dark); }
.step::before { content: ""; position: absolute; left: 0; right: -28px; top: 5px; height: 1px; background: rgba(255, 255, 255, .14); }
.step:last-child::before { right: 0; }
.step::after {
  content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-dark); box-shadow: 0 0 0 5px rgba(123, 151, 255, .15);
}
.step__n { display: block; font-size: 13px; font-weight: 600; color: var(--on-dark-2); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 22px; letter-spacing: -0.025em; }
.step p { margin-top: 8px; font-size: 16px; line-height: 1.45; color: var(--on-dark-2); }

/* ---------------------------------------------------------------------
   DLA KOGO
   --------------------------------------------------------------------- */
.audience { background: var(--white); padding: 112px 0; }
.audience .head h2 { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { padding: 32px 28px 34px; border-radius: var(--radius-xl); background: var(--gray-bg); transition: transform .5s var(--ease-out); }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); } }
.tile__ico {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 28px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #2f66ff, #8a6dff);
  box-shadow: 0 12px 30px -12px rgba(47, 102, 255, .6);
}
.tile__ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 10px; }
.tile p { font-size: 15px; line-height: 1.45; color: var(--text-2); }

/* ---------------------------------------------------------------------
   KONTAKT
   --------------------------------------------------------------------- */
.contact { background: var(--gray-bg); padding: 112px 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: start; }
.contact h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.06; letter-spacing: -0.035em; }

.clinks { margin-top: 44px; display: grid; gap: 8px; }
.clink { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin: 0 -16px; border-radius: 16px; transition: background-color .2s ease; }
a.clink:hover { background: rgba(0, 0, 0, .04); }
a.clink:active { background: rgba(0, 0, 0, .07); }
.clink__ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.clink__ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clink__label { display: block; font-size: 13px; color: var(--text-2); }
.clink__value { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
a.clink:hover .clink__value { color: var(--accent); }

.form { display: grid; gap: 14px; padding: 32px; border-radius: var(--radius-xl); background: var(--white); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .25); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; }
.field input, .field select, .field textarea {
  display: block; width: 100%;
  padding: 26px 16px 10px;
  font: inherit; font-size: 17px; letter-spacing: -0.02em; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; }
.field label {
  position: absolute; left: 17px; top: 17px;
  font-size: 17px; color: var(--text-3); pointer-events: none;
  transform-origin: left top;
  transition: transform .2s var(--ease-swift), color .2s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field--select label { transform: translateY(-9px) scale(.76); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47, 102, 255, .14); }
.field select { padding-right: 44px; cursor: pointer; }
.field__chev { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); pointer-events: none; }
.field .invalid { border-color: var(--danger); }
.field .invalid:focus { box-shadow: 0 0 0 4px rgba(255, 59, 48, .14); }
.form .btn { margin-top: 6px; }

/* ---------------------------------------------------------------------
   STOPKA
   --------------------------------------------------------------------- */
.footer { background: var(--gray-bg); color: var(--text-2); padding: 0 0 48px; font-size: 12px; letter-spacing: -0.01em; }
.footer .container { border-top: 1px solid var(--line); padding-top: 28px; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.footer .logo { color: var(--ink); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__nav a { color: var(--ink); opacity: .8; }
.footer__nav a:hover { opacity: 1; text-decoration: underline; }
.footer__legal { line-height: 1.6; }

/* ---------------------------------------------------------------------
   Responsywność
   --------------------------------------------------------------------- */
@media (max-width: 1068px) {
  .items--3 { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 44px 28px; }
  .step:nth-child(2)::before { right: 0; }
  .contact__grid { grid-template-columns: .9fr 1.1fr; gap: 40px; }
  .console__body { grid-template-columns: 1fr; }
  .console__side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .07); min-height: 250px; }
}

@media (max-width: 834px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px 32px;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    visibility: hidden; opacity: 0;
    transition: opacity .3s ease, visibility .3s;
  }
  .nav[data-theme="dark"] .nav__links { background: rgba(0, 0, 0, .92); }
  .nav[data-theme="light"] .nav__links { background: rgba(245, 245, 247, .96); }
  .nav__links a, .nav__links .nav__cta {
    padding: 14px 0; border-radius: 0; background: none; color: inherit;
    font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em;
    transform: translateY(-8px); opacity: 0;
    transition: transform .45s var(--ease-out), opacity .3s ease;
  }
  .nav__links .nav__cta { color: var(--accent-dark); }
  .nav[data-theme="light"] .nav__links .nav__cta { color: var(--accent); }
  .nav.is-open .nav__links { visibility: visible; opacity: 1; }
  .nav.is-open .nav__links a { transform: none; opacity: 1; transition-delay: calc(var(--i, 0) * 35ms + 40ms); }

  .bento { grid-template-columns: 1fr; }
  .card, .card--feature { padding: 32px 24px; }
}

@media (max-width: 734px) {
  .container { padding: 0 16px; }
  .nav__inner { padding: 0 16px; }
  .hero { padding: calc(var(--nav-h) + 7vh) 16px 80px; }
  .hero__sub { font-size: 17px; }
  .console { margin-top: 48px; border-radius: 24px; }
  .console__bar { padding: 12px 16px; font-size: 12px; }
  .console__viz { padding: 16px 12px 96px; }
  .readout { left: 16px; right: 12px; bottom: 12px; gap: 4px 18px; }
  .readout b { font-size: 22px; }
  .console__side { padding: 18px 16px; min-height: 230px; }
  .log li { font-size: 14px; padding: 8px 0; }
  .console__controls { padding: 10px; }
  .proc-group, .proc-group--3 { grid-template-columns: 1fr; gap: 8px; }
  .proc { padding: 12px 14px; border-radius: 16px; }
  .statement { padding: 48px 16px 64px; }
  .services, .audience, .contact, .process { padding: 96px 0; }
  .head { margin-bottom: 44px; }
  .head__lead { font-size: 19px; }
  .items--3 { grid-template-columns: 1fr; gap: 26px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 36px 32px; }
  .step::before { left: 5px; right: auto; top: 14px; bottom: 0; width: 1px; height: auto; }
  .step:last-child::before { display: none; }
  .step::after { top: 4px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .tile { padding: 26px 22px; }
  .tile__ico { margin-bottom: 20px; }
  .photo__frame img { left: var(--img-x, -38%); }
  .photo__cap { bottom: 7vh; padding: 0 16px; }
  .form { padding: 22px 18px; }
  .form__row { grid-template-columns: 1fr; }
  .clink__value { font-size: 17px; }
}

/* ---------------------------------------------------------------------
   Dostępność
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .in, .js .reveal { transform: none; }
  .js.is-loaded .in, .js .reveal.is-visible { transition: opacity .3s ease; transition-delay: 0ms; }
  .pd-flow path, .tm-on .pd-sae__led, .tm-on .pd-scada, .ct-on .ct-ring, .led-pick .pd-led--pick, .log li, .log li.is-done .log__ico svg { animation: none; }
  .card, .tile, .btn, .proc, .sw__blade, .console__badge { transition: none; }
  .is-drawn .draw { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav::before { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav[data-theme="light"]::before { background: var(--gray-bg); }
}

/* =====================================================================
   v2.2 — formularz Netlify, sekcja „Dlaczego my”, układ średnich szerokości
   ===================================================================== */

/* Formularz */
.form-wrap { position: relative; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field__err { margin: 6px 4px 0; font-size: 13px; line-height: 1.35; color: var(--danger); }
.field__err:empty { display: none; }
.form__error {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 59, 48, .08); color: #c4261b;
  font-size: 14px; line-height: 1.45;
}
.form__error a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.form .btn:disabled { opacity: .6; cursor: default; transform: none; }

.form-done {
  display: grid; justify-items: center; gap: 10px;
  padding: 56px 32px; border-radius: var(--radius-xl); background: var(--white);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .25);
  text-align: center; outline: none;
  animation: done-in .6s var(--ease-out) both;
}
.form-done[hidden], .form[hidden], .form__error[hidden] { display: none; }
.form-done__ico { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: rgba(48, 209, 88, .14); color: #1f9d48; }
.form-done__ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-done h3 { font-size: 32px; letter-spacing: -0.03em; }
.form-done p { font-size: 19px; color: var(--text-2); }
@keyframes done-in { from { opacity: 0; transform: translateY(12px); } }

/* Stopka: miejsce na plakietkę hostingu w prawym dolnym rogu */
.footer { padding-bottom: 88px; }

/* Usługi 02–04 na średnich ekranach: 2 kolumny, „Serwis” na całą szerokość */
@media (max-width: 1200px) and (min-width: 835px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--last { grid-column: 1 / -1; }
  .card--last .items { grid-template-columns: repeat(3, 1fr); gap: 24px 32px; }
}

/* Kontakt: dwie kolumny do 900 px, niżej jedna pod drugą */
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .form-done { animation: none; }
  .pd-flow path { animation: none !important; }
}

/* =====================================================================
   Konsola v3 — schemat po lewej, scenariusze i przebieg po prawej
   ===================================================================== */
.console { max-width: 1120px; margin-top: 44px; }
.console__body { grid-template-columns: minmax(0, 1fr) 360px; }
.console__viz { padding: 20px 24px 82px; display: flex; flex-direction: column; justify-content: center; }
.pd--full { display: block; width: 100%; height: auto; max-height: min(600px, 58vh); }
.pd--mini { display: none; }
.console__side { padding: 0; min-height: 0; border-left: 1px solid rgba(255, 255, 255, .07); border-top: 0; display: flex; flex-direction: column; }

.console__controls { border: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); background: rgba(0, 0, 0, .22); padding: 16px 16px 14px; }
.console__controls .proc-group { grid-template-columns: 1fr; gap: 6px; }
.console__controls .proc-group--duo { grid-template-columns: 1fr 1fr; }
.console__controls .proc { padding: 9px 10px; gap: 10px; border-radius: 14px; }
.console__controls .proc__ico { width: 32px; height: 32px; border-radius: 10px; }
.console__controls .proc__ico svg { width: 17px; height: 17px; }
.console__controls .proc__txt b { font-size: 15px; }
.console__controls .proc__txt small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__controls .proc-group__title { margin: 0 2px 8px; }
.console__controls .proc-group + .proc-group__title { margin-top: 12px; }

.console__run { flex: 1; display: flex; flex-direction: column; padding: 16px 20px 18px; min-height: 0; }
.console__run .log li { padding: 7px 0; font-size: 14px; }
.console__run .console__badge { margin-top: 14px; }

/* Wąsko: schemat na całą szerokość, scenariusze jako przewijany pasek chipów */
@media (max-width: 900px) {
  .console__body { grid-template-columns: 1fr; }
  .console__side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .07); }
  .pd--full { max-height: none; }
  .console__controls {
    display: flex; gap: 8px; padding: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .console__controls::-webkit-scrollbar { display: none; }
  .console__controls .proc-group, .console__controls .proc-group--duo { display: contents; }
  .console__controls .proc-group__title { display: none; }
  .console__controls .proc { flex: none; scroll-snap-align: start; border-radius: 980px; padding: 6px 14px 6px 6px; }
  .console__controls .proc__ico { width: 30px; height: 30px; border-radius: 50%; }
  .console__controls .proc__txt b { font-size: 14px; white-space: nowrap; }
  .console__controls .proc__txt small { display: none; }
  .console__controls .proc__bar { height: 2px; }
  .console__run { padding: 14px 16px 16px; }
}
@media (max-width: 600px) {
  .pd--full { display: none; }
  .pd--mini { display: block; width: 100%; height: auto; }
  .console__viz { padding: 12px 12px 96px; }
  .pd--mini .pd-lbl text, .pd--mini .pd-legend text { font-size: 12px; }
  .pd--mini .pd-lbl .val { font-size: 13px; }
  .pd--mini .pd-relay text { font-size: 11px; }
  .pd--mini .pd-relay .pd-relay__name { font-size: 12px; }
  .pd--mini .pd-sae__name { font-size: 14px; }
}
/* Kolumny konsoli mogą się zwężać — przewijany pasek chipów nie rozpycha siatki */
.console__viz, .console__side, .console__controls { min-width: 0; }
@media (max-width: 900px) { .console__body { grid-template-columns: minmax(0, 1fr); } }

/* Logo odrysowane z oryginału (kształty z pliku logo klienta) */
.logo { padding-bottom: 0; --logo-n: var(--accent-dark); }
.logo__svg { display: block; width: 57px; height: 38px; }
.nav[data-theme="light"] .logo, .logo--dark { --logo-n: var(--accent); }

/* Telefon: ten sam pełny schemat co na komputerze, w czytelnym rozmiarze, przesuwany w bok */
.viz-hint { display: none; }
@media (max-width: 600px) {
  .viz-scroll {
    margin: 0 -12px; padding: 0 12px;
    overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; touch-action: pan-x pan-y;
  }
  .viz-scroll::-webkit-scrollbar { display: none; }
  .pd--full { display: block; width: 620px; max-width: none; max-height: none; }
  .viz-hint { display: block; margin-top: 6px; text-align: center; font-size: 12px; color: var(--on-dark-2); }
}

/* Telefon: cały schemat naraz + pełnoekranowe powiększenie (zastępuje przewijanie w bok) */
.viz-zoom { display: none; }
@media (max-width: 600px) {
  .viz-scroll { margin: 0; padding: 0; overflow: visible; }
  .pd--full { width: 100%; }
  .viz-hint { display: none; }
  .viz-zoom {
    display: inline-flex; align-items: center; gap: 6px;
    position: absolute; top: 10px; right: 10px; z-index: 3;
    padding: 7px 12px; border: 0; border-radius: 980px;
    background: rgba(255, 255, 255, .12); color: #f5f5f7;
    font-size: 13px; font-weight: 600; cursor: pointer;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    transition: transform .1s ease-out, background-color .2s ease;
  }
  .viz-zoom:active { transform: scale(.96); }
  .viz-zoom svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}
.console__viz.is-zoomed {
  position: fixed; inset: 0; z-index: 300; display: block;
  padding: calc(60px + env(safe-area-inset-top, 0px)) 0 calc(92px + env(safe-area-inset-bottom, 0px));
  background: #05070d;
}
.console__viz.is-zoomed .viz-scroll {
  height: 100%; overflow: auto; padding: 0 16px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: auto;
}
.console__viz.is-zoomed .pd--full { width: 980px; max-width: none; max-height: none; }
.console__viz.is-zoomed .viz-zoom { display: inline-flex; position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }
.console__viz.is-zoomed .readout { position: fixed; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
/* Na czas powiększenia schemat przykrywa całą stronę, także nawigację */
.viz-zoomed .nav { visibility: hidden; }
.viz-zoomed .hero, .viz-zoomed .console { z-index: 400; }
.nav .logo__svg { width: 69px; height: 46px; }
.footer .logo__svg { width: 72px; height: 48px; }
