/* KlajberTech - arkusz stylów strony */

/* Czcionka Archivo hostowana razem ze stroną (SIL OFL); bez zapytań do Google Fonts */
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(../assets/fonts/archivo-latin-ext.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(../assets/fonts/archivo-latin.woff2) format('woff2');
  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;
}

:root {
  --bg: #121318;
  --bg-2: #1a1c23;
  --bg-3: #22252e;
  --ink: #eef1f6;
  --ink-2: #a9b0bd;
  --ink-3: #828999;
  --line: rgba(233, 238, 247, 0.1);
  --line-2: rgba(233, 238, 247, 0.16);
  --kt-1: #0f62fe;
  --kt-2: #0090ff;
  --kt-3: #00c3ff;
  --kt-1-hover: #0a52dd;
  --danger: #ff6b6b;

  --font: "Archivo", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --wrap: 1360px;
  --radius-shell: 2rem;
  --radius-core: calc(2rem - 0.375rem);

  /* warstwy */
  --z-stage: 1;
  --z-copy: 2;
  --z-nav: 20;
  --z-menu: 19;
  --z-skip: 30;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #3a3f4b var(--bg);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, nie hidden: hidden na body w Safari na iOS robi z body osobny kontener
     przewijania, co wyłącza position: sticky i animacje sterowane przewijaniem */
  overflow-x: clip;
}

::selection { background: var(--kt-1); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #343945; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #454b59; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--kt-3);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed; left: 1rem; top: 1rem; z-index: var(--z-skip);
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typografia ---------- */

.display {
  font-stretch: 125%;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.h-xl { font-size: clamp(2.5rem, 5.6vw, 5.5rem); }
.h-lg { font-size: clamp(2.1rem, 4.2vw, 4rem); }
.h-md { font-size: clamp(1.6rem, 2.4vw, 2.25rem); line-height: 1.05; }
.h-sm { font-size: 1.3rem; font-weight: 650; font-stretch: 112%; letter-spacing: -0.015em; line-height: 1.2; }

/* ---------- Przyciski ---------- */

.btn {
  --h: 3.4rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  min-height: var(--h);
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 0;
  font: inherit; font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--kt-1); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 24px -14px rgba(0, 0, 0, 0.9);
}
.btn-primary:has(.btn-icon) { padding-right: 0.45rem; }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-sm { --h: 2.6rem; padding: 0 1.15rem; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.1rem;
  transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--kt-1-hover); }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(233, 238, 247, 0.4); }
  .btn:hover .btn-icon { transform: translate(2px, -2px) scale(1.05); }
}

/* ---------- Double bezel ---------- */

.bezel {
  display: block;
  padding: 0.375rem;
  border-radius: var(--radius-shell);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none; color: inherit;
}
.bezel-core {
  position: relative;
  height: 100%;
  border-radius: var(--radius-core);
  background: linear-gradient(180deg, #1d2028 0%, #17191f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 60px -40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* ---------- Nawigacja ---------- */

.nav {
  position: fixed; top: 1rem; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 2rem;
  height: 3.6rem;
  padding: 0 0.5rem 0 0.9rem;
  border-radius: 999px;
  background: rgba(22, 24, 30, 0.62);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  transition: background-color 300ms ease;
}
.nav.is-scrolled .nav-pill { background: rgba(22, 24, 30, 0.82); }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.sygnet { width: 2.15rem; height: 2.15rem; border-radius: 0.55rem; }
.brand-name { font-weight: 720; font-stretch: 118%; letter-spacing: -0.02em; font-size: 1.05rem; }

.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  font-size: 0.93rem; color: var(--ink-2); text-decoration: none;
  transition: color 200ms ease;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }

.burger {
  display: none;
  position: relative;
  width: 2.75rem; height: 2.75rem; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, 0.08); color: var(--ink);
  cursor: pointer;
}
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 1.1rem; height: 1.5px; margin-left: -0.55rem;
  background: currentColor; border-radius: 2px;
  transition: transform 350ms var(--ease-drawer);
}
.burger span:first-child { transform: translateY(-4px); }
.burger span:last-child { transform: translateY(4px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  padding: 6rem var(--gutter) 3rem;
  background: rgba(14, 15, 19, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu nav { display: flex; flex-direction: column; gap: 0.4rem; }
.menu nav a {
  font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 740; font-stretch: 125%; letter-spacing: -0.035em;
  text-decoration: none; line-height: 1.15;
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.menu.is-open nav a { opacity: 1; transform: none; }
.menu.is-open nav a:nth-child(2) { transition-delay: 50ms; }
.menu.is-open nav a:nth-child(3) { transition-delay: 100ms; }
.menu.is-open nav a:nth-child(4) { transition-delay: 150ms; }
.menu .btn { align-self: flex-start; }

/* ---------- Animacja wejścia (jedna, przy ładowaniu) ---------- */

.sg { transform-box: fill-box; transform-origin: center; }
html.js .sg { animation: sg-in 700ms var(--ease-out) both; }
html.js .sg-1 { animation-delay: 120ms; --from: 0 40%; }
html.js .sg-2 { animation-delay: 220ms; --from: -30% 0; }
html.js .sg-3 { animation-delay: 320ms; --from: -20% -20%; }
html.js .sg-4 { animation-delay: 420ms; --from: 0 -40%; }
@keyframes sg-in { from { opacity: 0; translate: var(--from); } }

/* Wejście sekcji startowej animuje GSAP (js/main.js): animacje CSS restartowałyby się,
   gdy GSAP przepina sekcję przy przeliczaniu. Tu tylko stan początkowy do czasu startu. */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.intro-done) .hero-title .line > span { transform: translateY(105%); }
  html.js:not(.intro-done) .hero-lede,
  html.js:not(.intro-done) .hero-actions { opacity: 0; transform: translateY(1rem); }
  html.js .hero-canvas { transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
}
/* scena 3D pojawia się, gdy pierwsza klatka jest gotowa (js/main.js dodaje scene-on) */
html.js:not(.scene-on) .hero-canvas { opacity: 0; }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(1rem); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- HERO ---------- */

/* sekcje ze sceną mają wysokość ekranu; długość przewijania i przypięcie daje GSAP (pin) */
.hero { position: relative; }
.hero-stage {
  position: relative;
  height: var(--app-h, 100vh);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 68% 52%, rgba(15, 98, 254, 0.16), transparent 70%),
    radial-gradient(40% 40% at 70% 85%, rgba(0, 195, 255, 0.06), transparent 70%),
    var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: var(--z-stage); }
/* obraz zastępczy: ten sam kadr co pierwsza klatka sceny (pełna wysokość, środek przesunięty
   o 23,5% szerokości w prawo jak w js/scene.js; na telefonie wyśrodkowany) */
.hero-poster img {
  position: absolute; top: 0; left: 73.5%; height: 100%; width: auto; max-width: none;
  transform: translateX(-50%); z-index: var(--z-stage); pointer-events: none;
}
html.scene-on .hero-poster img { opacity: 0; transition: opacity 0.4s linear 1.4s; }
html.poster-off .hero-poster { display: none; }
html.scene-instant .hero-canvas { transition: none; }
.hero.no-webgl .hero-poster { display: none; }
@media (max-width: 899.98px) { .hero-poster img { left: 50%; } }
.hero-fallback { display: none; }
.hero.no-webgl .hero-fallback {
  display: block; position: absolute; z-index: var(--z-stage);
  right: 12vw; top: 50%; width: min(34vw, 420px); aspect-ratio: 1; transform: translateY(-50%);
  background: url("../assets/sygnet.svg") center / contain no-repeat;
  border-radius: 22%;
}

.hero-copy {
  position: absolute; z-index: var(--z-copy);
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  will-change: opacity, transform;
}
.hero-copy--a { width: min(58vw, 54rem); }
.hero-title { font-size: clamp(3rem, 6.2vw, 6rem); line-height: 0.96; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .line > span { display: inline-block; }
.hero-lede {
  margin-top: 1.75rem;
  max-width: 31rem;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.hero-copy--b, .hero-copy--c { opacity: 0; pointer-events: none; }
.hero-copy--b { width: min(44rem, 44vw); }
.hero-copy--b p, .hero-copy--c p { margin-top: 1.25rem; color: var(--ink-2); max-width: 30rem; font-size: 1.1rem; }
.hero-copy--c {
  left: 50%; top: auto; bottom: 9vh;
  width: min(52rem, 88vw);
  transform: translateX(-50%);
  text-align: center;
}
.hero-copy--c p { margin-left: auto; margin-right: auto; }

.hero-labels { position: absolute; inset: 0; z-index: var(--z-copy); pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 0.6rem;
  opacity: 0;
  will-change: transform, opacity;
}
.hs-dot {
  flex: none;
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--kt-3);
  box-shadow: 0 0 0 4px rgba(0, 195, 255, 0.18);
}
.hs-line { flex: none; width: 2.5rem; height: 1px; background: rgba(0, 195, 255, 0.55); }
.hs-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.hs-text strong { font-weight: 650; font-size: 0.98rem; }
.hs-text small { font-size: 0.82rem; color: var(--ink-2); }
.hs--left { flex-direction: row-reverse; text-align: right; }
.hs--left .hs-text { align-items: flex-end; }

/* ---------- MANIFEST ---------- */

.manifest {
  padding: clamp(8rem, 18vw, 16rem) var(--gutter);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
}
.manifest-text {
  font-size: clamp(1.75rem, 3.6vw, 3.5rem);
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1.16;
  max-width: 24em;
}
.manifest-text .w { opacity: 0.16; }
.manifest-text .w.is-accent { color: var(--kt-3); }

/* ---------- PROCES ---------- */

.process { position: relative; overflow: hidden; }
.process-track {
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem);
  height: var(--app-h, 100vh);
  padding: 6rem var(--gutter) 4rem;
  width: max-content;
}
.process-intro { flex: none; width: min(46rem, 84vw); padding-right: clamp(1rem, 4vw, 5rem); }
.process-intro p { margin-top: 1.75rem; color: var(--ink-2); max-width: 30rem; font-size: 1.15rem; }

.step { flex: none; width: min(46rem, 84vw); height: min(36rem, calc(var(--app-h, 100vh) * 0.72)); }
.step .bezel { height: 100%; }
.step-core {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  gap: 1.5rem;
}
.step-num {
  grid-column: 1; grid-row: 1;
  font-size: clamp(3.5rem, 7vw, 6rem); font-weight: 800; font-stretch: 125%; letter-spacing: -0.05em; line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 238, 247, 0.28);
}
.step-visual {
  grid-column: 2; grid-row: 1 / span 2;
  display: grid; place-items: center;
  border-radius: 1.25rem;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(15, 98, 254, 0.35), transparent 70%),
    radial-gradient(40% 40% at 60% 70%, rgba(0, 195, 255, 0.18), transparent 70%),
    #13151b;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.step-visual i { font-size: clamp(6rem, 11vw, 10rem); color: var(--ink); opacity: 0.92; }
.step-body { grid-column: 1; grid-row: 2; align-self: end; }
.step-body p { margin-top: 0.9rem; color: var(--ink-2); font-size: 1rem; }
.ticks { margin-top: 1.25rem; display: grid; gap: 0.5rem; }
.ticks li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.ticks i { color: var(--kt-3); font-size: 1.05rem; }

.process-progress {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 2.25rem;
  height: 1px;
}
.process-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--kt-1), var(--kt-3));
  transform-origin: left; transform: scaleX(0);
}

/* ---------- USŁUGI (bento) ---------- */

.services { padding: clamp(8rem, 14vw, 12rem) 0; }
.services-title { max-width: 22ch; margin-bottom: clamp(3rem, 6vw, 5rem); }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(15rem, auto);
  grid-auto-flow: dense;
  gap: 1rem;
}
.tile--a { grid-column: span 4; grid-row: span 2; }
.tile--b, .tile--c { grid-column: span 2; }
.tile--d, .tile--e { grid-column: span 3; }
.tile .bezel { height: 100%; }

.tile-core {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}
.tile-core p { color: var(--ink-2); font-size: 0.98rem; max-width: 34rem; }
.tile-icon { font-size: 2.6rem; color: var(--kt-3); margin-bottom: auto; }

.tile-core--lit {
  justify-content: space-between;
  background:
    radial-gradient(80% 70% at 75% 20%, rgba(15, 98, 254, 0.28), transparent 65%),
    radial-gradient(50% 50% at 20% 0%, rgba(0, 195, 255, 0.1), transparent 70%),
    linear-gradient(180deg, #1c1f27, #15171d);
}
.tile-art--hw {
  position: relative;
  flex: 1;
  min-height: 15rem;
  display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem);
}
.tile-art--hw i { color: var(--ink); line-height: 1; transition: transform 700ms var(--ease-out); }
.tile-art--hw i:nth-child(1) { font-size: clamp(7rem, 13vw, 12rem); }
.tile-art--hw i:nth-child(2) { font-size: clamp(5rem, 9vw, 8.5rem); color: var(--ink-2); }
.tile-art--hw i:nth-child(3) { font-size: clamp(3.5rem, 6vw, 5.5rem); color: var(--ink-3); }
.tile-text h3 { margin-bottom: 0.8rem; }

.tile-core--grid {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(0, 195, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #1b1e25, #15171d);
}
.tile-core--row { flex-direction: row; align-items: flex-end; gap: 1.5rem; }
.tile-core--row .tile-icon { margin-bottom: 0; flex: none; }
.tile-core--row h3 { margin-bottom: 0.35rem; }
.tile-core--blue {
  color: #fff;
  background: linear-gradient(135deg, #0b55e6 0%, #0a4ccc 60%, #0b43b0 100%);
}
.tile-core--blue p { color: rgba(255, 255, 255, 0.86); }
.tile-core--blue .tile-icon { color: #fff; }
.tile-arrow { margin-left: auto; flex: none; background: rgba(255, 255, 255, 0.18); }
.tile-link { transition: transform 160ms var(--ease-out); }
.tile-link:active { transform: scale(0.985); }

.tile .bezel-core::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 195, 255, 0.1), transparent 45%);
  opacity: 0;
  transition: opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover .bezel-core::after { opacity: 1; }
  .tile--a:hover .tile-art--hw i:nth-child(1) { transform: translateY(-6px) scale(1.03); }
  .tile--a:hover .tile-art--hw i:nth-child(3) { transform: translateY(-4px); }
  .tile-link:hover .tile-arrow { transform: translate(2px, 2px) scale(1.05); }
}

/* ---------- ERP ---------- */

.erp { position: relative; }
.erp-stage {
  position: relative;
  height: var(--app-h, 100vh);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 2rem;
  padding: 5rem var(--gutter) 2rem;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  overflow: hidden;
}
.erp-copy { position: relative; min-height: 26rem; }
.erp-phase { position: absolute; inset: auto 0 auto 0; top: 50%; transform: translateY(-50%); }
.erp-phase p { margin-top: 1.4rem; color: var(--ink-2); max-width: 30rem; font-size: 1.1rem; }
.erp-phase--b { opacity: 0; }
.erp-list { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.erp-list li {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
}

.erp-diagram {
  position: relative;
  width: 100%;
  max-width: calc(var(--app-h, 100vh) - 7rem);
  aspect-ratio: 1;
  justify-self: center;
}
.erp-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.erp-lines .ring { fill: none; stroke: rgba(233, 238, 247, 0.07); stroke-width: 1; }
.erp-lines .link { fill: none; stroke: url(#erpGrad); stroke-width: 2; stroke-linecap: round; }
.erp-lines .pulse { fill: var(--kt-3); opacity: 0; transition: opacity 400ms ease; }
.erp.is-live .erp-lines .pulse { opacity: 1; }

.erp-glow {
  position: absolute; left: 50%; top: 50%;
  width: 70%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 98, 254, 0.45) 0%, rgba(0, 195, 255, 0.12) 35%, transparent 65%);
  opacity: 0;
  pointer-events: none;
}
.erp-core {
  position: absolute; left: 50%; top: 50%;
  width: 26%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; align-content: center; gap: 0.5rem;
  border-radius: 28%;
  background: radial-gradient(circle at 50% 30%, #262a35, #15171d 70%);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 0 rgba(15, 98, 254, 0);
  text-align: center;
}
.erp-core svg { width: 42%; }
.erp-core span { font-size: clamp(0.62rem, 0.9vw, 0.85rem); color: var(--ink-2); line-height: 1.2; padding: 0 0.5rem; }

.erp-mod {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.05rem 0.7rem 0.8rem;
  border-radius: 999px;
  background: rgba(30, 33, 41, 0.92);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 40px -20px rgba(0, 0, 0, 0.8);
  font-size: clamp(0.78rem, 1vw, 0.95rem); font-weight: 560;
  white-space: nowrap;
  will-change: transform, opacity;
}
.erp-mod i { font-size: 1.25rem; color: var(--kt-3); }

/* ---------- FINAŁ ---------- */

.finale { position: relative; }
.finale-stage {
  position: relative;
  height: var(--app-h, 100vh);
  display: grid; place-items: center;
  padding: 0 var(--gutter);
  overflow: hidden;
  background: radial-gradient(50% 45% at 50% 55%, rgba(15, 98, 254, 0.2), transparent 70%);
}
.finale-text {
  font-size: clamp(2.6rem, 7.4vw, 6rem);
  text-align: center;
  max-width: 12em;
  will-change: transform, opacity;
}

/* ---------- KONTAKT ---------- */

.contact { padding: clamp(4rem, 8vw, 7rem) 0 clamp(6rem, 12vw, 10rem); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact-info p { margin-top: 1.4rem; color: var(--ink-2); max-width: 28rem; font-size: 1.1rem; }
.contact-data { margin: 2.75rem 0 0; display: grid; gap: 1.4rem; }
.contact-data div { display: grid; gap: 0.2rem; }
.contact-data dt { font-size: 0.88rem; color: var(--ink-3); }
.contact-data dd { margin: 0; font-size: 1.2rem; font-weight: 560; }
.contact-data a { text-decoration: none; }
.contact-data a:hover { color: var(--kt-3); }

.contact-form { display: grid; gap: 1.25rem; padding: clamp(1.5rem, 3vw, 2.5rem); }
.field { display: grid; gap: 0.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { font-size: 0.92rem; font-weight: 560; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  border: 0;
  background: #121419;
  color: var(--ink);
  font: inherit; font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line-2);
  caret-color: var(--kt-3);
  transition: box-shadow 200ms ease;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:hover, .field select:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px rgba(233, 238, 247, 0.28); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--kt-3), 0 0 0 4px rgba(0, 195, 255, 0.14);
}
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger) !important; }
.field-error { font-size: 0.86rem; color: var(--danger); }
.select { position: relative; }
.select i { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ink-2); }
.select select { padding-right: 2.75rem; cursor: pointer; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 0.75rem; }
.field-check input {
  appearance: none;
  width: 1.3rem; height: 1.3rem; margin: 0.1rem 0 0;
  border-radius: 0.4rem;
  background: #121419;
  box-shadow: inset 0 0 0 1px rgba(233, 238, 247, 0.32);
  display: grid; place-items: center;
  cursor: pointer;
}
.field-check input::after {
  content: "";
  width: 0.65rem; height: 0.35rem;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px) scale(0.6);
  opacity: 0;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
}
.field-check input:checked { background: var(--kt-1); box-shadow: none; }
.field-check input:checked::after { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.field-check label { font-weight: 400; color: var(--ink-2); }
.field-check .field-error { grid-column: 2; }
.form-status { font-size: 0.95rem; color: var(--ink-2); min-height: 1.5em; }
.form-status.is-ok { color: var(--kt-3); }

[data-placeholder] { text-decoration: underline dotted rgba(0, 195, 255, 0.6); text-underline-offset: 0.25em; }

/* ---------- STOPKA ---------- */

.footer { padding: 3rem 0 3.5rem; box-shadow: inset 0 1px 0 var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--ink); }
.footer-legal { display: flex; gap: 1.5rem; color: var(--ink-3); font-size: 0.88rem; }

/* ---------- Responsywność ---------- */

@media (max-width: 1100px) {
  .nav-links { gap: 1.1rem; }
  .nav-pill { gap: 1.25rem; }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .nav-pill { width: 100%; max-width: 40rem; justify-content: space-between; gap: 1rem; }

  .hero-copy--a { width: auto; right: var(--gutter); top: auto; bottom: 6vh; transform: none; }
  .hero-title { font-size: clamp(2.75rem, 11vw, 4.5rem); }
  .hero-lede { margin-top: 1.1rem; }
  .hero-actions { margin-top: 1.5rem; }
  .hero-copy--b { width: auto; right: var(--gutter); top: auto; bottom: 7vh; transform: none; }
  .hero-copy--c { bottom: 7vh; }
  .hero-copy--b p, .hero-copy--c p { font-size: 1rem; }
  .hs-text small { display: none; }
  .hs-line { width: 1.25rem; }
  .hero.no-webgl .hero-fallback { right: 50%; top: 30%; transform: translate(50%, -50%); width: 50vw; }

  .step-core { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .step-num { grid-column: 1; grid-row: 1; }
  .step-visual { grid-column: 1; grid-row: 2; }
  .step-body { grid-column: 1; grid-row: 3; }
  .step-visual i { font-size: 5rem; }
  .ticks { display: none; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile--a, .tile--b, .tile--c, .tile--d, .tile--e { grid-column: auto; grid-row: auto; }
  .tile-core { min-height: 13rem; }
  .tile-art--hw { min-height: 11rem; }
  .tile-core--row { flex-direction: column; align-items: flex-start; }
  .tile-arrow { margin-left: 0; }

  .erp-stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding-top: 5.5rem; gap: 0.5rem; }
  .erp-diagram { grid-row: 1; width: 100%; max-width: 26rem; }
  .erp-copy { grid-row: 2; min-height: 15rem; }
  .erp-phase { top: 0; transform: none; }
  .erp-phase p { font-size: 1rem; margin-top: 0.9rem; }
  .erp-list { display: none; }
  .erp-mod { padding: 0.45rem 0.7rem 0.45rem 0.55rem; gap: 0.35rem; }
  .erp-mod i { font-size: 1rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Ograniczony ruch ---------- */

/* Animacje sterowane przewijaniem zostają (ruch wywołuje użytkownik);
   wyłączamy ruch samoczynny: wejścia, przejścia i pulsowanie. */
@media (prefers-reduced-motion: reduce) {
  html.js .sg { animation: none; }
  .menu, .menu nav a, .btn, .burger span, .curtain { transition: none; }
}

/* ---------- Doprecyzowania ---------- */

.erp-phase h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); }
@media (max-width: 600px) {
  .hero-labels { display: none; }
}

/* ---------- Telefon i tablet w pionie ---------- */

@media (max-width: 900px) {
  /* krótsze odcinki przewijania w sekcjach z animacją */
  .manifest { padding-top: 6rem; padding-bottom: 6rem; }
  .services { padding: 5rem 0; }
  .contact { padding-top: 3rem; }

  /* proces: karty jedna pod drugą, przyklejane u góry i nakładane */
  .process { overflow: clip; }
  .process-track {
    width: auto; height: auto;
    flex-direction: column; align-items: stretch;
    gap: 1.25rem;
    padding: 2rem var(--gutter) 4rem;
  }
  .process-intro { width: auto; padding: 0 0 1.5rem; }
  .step {
    position: sticky;
    top: calc(5.5rem + var(--i, 0) * 0.85rem);
    width: 100%; height: auto;
  }
  .step .bezel { height: auto; background: #17191e; transform-origin: 50% 0; }
  .step-core { grid-template-rows: auto 10.5rem auto; gap: 1.1rem; }
  .step-num { font-size: 3rem; }
  .step-visual i { font-size: 5.5rem; }
  .ticks { display: grid; margin-top: 1rem; }
  .process-progress { display: none; }

  /* ERP: diagram na całą szerokość ekranu */
  .erp-stage { padding-left: 0.5rem; padding-right: 0.5rem; }
  .erp-copy { padding: 0 calc(var(--gutter) - 0.5rem); }
  .erp-diagram { max-width: 26rem; }  /* telefon: rozmiar od szerokości, nie od wysokości */
  .erp-mod { font-size: 0.74rem; padding: 0.4rem 0.65rem 0.4rem 0.5rem; }
  .erp-core { width: 22%; }
  .erp-core span { font-size: 0.56rem; }
}

/* Kurtyna przy dalekich skokach z menu (pod nawigacją, nad treścią) */
.curtain {
  position: fixed; inset: 0;
  z-index: 18;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}
.curtain.is-on { opacity: 1; }

/* Przycisk "Na początek" */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: var(--z-nav);
  display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 1.3rem;
  text-decoration: none;
  background: rgba(22, 24, 30, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), background-color 200ms ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: rgba(15, 98, 254, 0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* Sceny nigdy niższe niż ekran, nawet przy zaniżonym odczycie wysokości (svh: mały widok iOS) */
.hero-stage, .erp-stage, .finale-stage { min-height: 100svh; }

/* Ikony (symbole SVG w index.html): rozmiar i kolor jak przy czcionce z ikonami (1em, currentColor) */
.ico { display: inline-block; width: 1em; height: 1em; line-height: 0; vertical-align: -0.125em; flex: none; }
.ico svg { width: 100%; height: 100%; fill: currentColor; }
