/* ============================================================
   TECHNOMET — style (premium, inspirowane Porsche)
   Paleta: biel / grafit / stalowy metalik
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f5;
  --dark:      #0e0e0e;
  --dark-2:    #1a1a1a;
  --text:      #1a1a1a;
  --text-2:    #6e6e6e;
  --steel:     #8e8e8e;
  --steel-2:   #9aa0a6;
  --line:      #e0e0e0;
  --line-dark: #2a2a2a;

  --container: 1280px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

h1, h2, h3 { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 18px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 34px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: #000; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }
.btn-ghost-dark { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost-dark:hover { border-color: var(--text); }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
  background: rgba(14, 14, 14, 0);
}
/* po przewinięciu: matowe szkło, które przejmuje ton tła (nie czysta biel) */
.site-header.scrolled {
  background: rgba(255, 255, 255, .68);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
/* nad ciemną sekcją: ciemne matowe szkło + jasne napisy */
.site-header.scrolled.over-dark {
  background: rgba(16, 16, 16, .5);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
/* logo bliżej lewej, nawigacja bliżej prawej krawędzi */
.site-header .container {
  max-width: 100%;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  transition: height .4s var(--ease);
}
.site-header.scrolled .header-inner { height: 68px; }

/* logo (SVG metalik z własnym cieniem).
   Nad ciemnym filmem (header bez .scrolled) pokazujemy jasną wersję,
   żeby logo było czytelne. Po przewinięciu (jasne tło) — oryginał metalik. */
/* logo: dwie wersje (jasna + metalik) leżą jedna na drugiej, przełączamy je
   płynnie przez opacity. Cień ma już wbudowany sam plik SVG (logo-light.svg). */
.logo { position: relative; display: inline-flex; }
.logo img {
  height: 46px; width: auto; display: block;
  transition: height .4s var(--ease), opacity .35s var(--ease);
}
/* metalik leży na jasnej wersji i domyślnie jest ukryty */
.logo .logo-metal { position: absolute; top: 0; left: 0; opacity: 0; }
.logo .logo-light { opacity: 1; }
/* po przewinięciu na jasne tło (nie nad ciemną sekcją) — pokazujemy metalik */
.site-header.scrolled:not(.over-dark) .logo-light { opacity: 0; }
.site-header.scrolled:not(.over-dark) .logo-metal { opacity: 1; }
.site-header.scrolled .logo img { height: 40px; }

.nav { display: flex; align-items: center; gap: 38px; margin-left: auto; margin-right: 1.5cm; }
.nav a {
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 500;
  color: #fff;
  position: relative;
  padding: 6px 0;
  transition: color .3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--steel);
  transition: width .3s var(--ease);
}
.nav a:hover::after { width: 100%; }
.site-header.scrolled .nav a { color: var(--text); }

.header-right { display: flex; align-items: center; gap: 22px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 600;
  color: rgba(255,255,255,.7);
}
.site-header.scrolled .lang-switch { color: var(--text-2); }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  font: inherit; color: inherit;
  letter-spacing: 0.04em;
  transition: color .25s var(--ease);
  padding: 2px;
}
.lang-switch button.active { color: #fff; }
.site-header.scrolled .lang-switch button.active { color: var(--text); }
.lang-switch button:not(.active):hover { color: var(--steel-2); }

/* burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: #fff; transition: all .3s var(--ease); }
.site-header.scrolled .burger span { background: var(--text); }

/* nad ciemną sekcją (po przewinięciu) napisy znów jasne */
.site-header.scrolled.over-dark .nav a { color: #fff; }
.site-header.scrolled.over-dark .lang-switch { color: rgba(255,255,255,.72); }
.site-header.scrolled.over-dark .lang-switch button.active { color: #fff; }
.site-header.scrolled.over-dark .burger span { background: #fff; }
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* lekkie przybliżenie kadru filmu */
  transform: scale(1.12);
  transform-origin: center;
  z-index: 1;
}
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.4) 40%, rgba(0,0,0,.6) 100%);
}
/* maska zakrywająca znak wodny w prawym dolnym rogu filmu w tle */
.hero::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 230px; height: 90px;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 130% at 100% 100%, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,0) 78%);
}
.hero-content { position: relative; z-index: 3; color: #fff; max-width: 1180px; }
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 22px;
  max-width: 22ch;
  opacity: 0;
  transform: translateY(28px);
  animation: heroIn 1s var(--ease) .2s forwards;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 400;
  color: rgba(255,255,255,.92);
  max-width: 50ch;
  margin-bottom: 38px;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(28px);
  animation: heroIn 1s var(--ease) .4s forwards;
}
.hero-cta {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0;
  transform: translateY(28px);
  animation: heroIn 1s var(--ease) .6s forwards;
}
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 32px;
  transform: translateX(-50%);
  z-index: 3;
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 14px;
}
.hero-scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  background: #fff;
  border-radius: 2px;
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80%,100% { opacity: 0; transform: translateY(14px); } }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(70px, 10vw, 140px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.section-lead { color: var(--text-2); font-size: 1.08rem; margin-top: 18px; }

/* reveal animation — ukryte tylko gdy JS aktywny (klasa .js na <html>).
   Bez JS treść jest od razu widoczna (brak „mgły"). */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- O NAS ---------- */
/* Tło sekcji = animowany pokaz slajdów (zamiast białego tła) */
.about { position: relative; overflow: hidden; color: #fff; background: var(--dark); }
/* niższy odstęp sekcji: o 3 mm z góry i z dołu */
.about.section {
  padding-top: max(20px, calc(clamp(70px, 10vw, 140px) - 3mm));
  padding-bottom: max(20px, calc(clamp(70px, 10vw, 140px) - 3mm));
}
.about-bg { position: absolute; inset: 0; z-index: 0; }
/* statyczna podkładka (1. zdjęcie) — żeby nigdy nie prześwitywał czarny ekran */
.about-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: url('../img/o-nas-back-1.webp') center / cover no-repeat;
  filter: blur(5px);
}
.about-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  /* delikatniejsze rozmycie niż wcześniej — zdjęcia bardziej czytelne,
     a tekst na wierzchu pozostaje dobrze widoczny dzięki ciemniejszej nakładce */
  filter: blur(5px);
  opacity: 0;
  will-change: opacity;
  /* 4 kadry × 3 s = 12 s pełnego cyklu, efekt: łagodne przenikanie (fade) */
  animation: aboutFade 12s ease-in-out infinite;
}
.about-slide:nth-child(1) { animation-delay: 0s; }
.about-slide:nth-child(2) { animation-delay: 3s; }
.about-slide:nth-child(3) { animation-delay: 6s; }
.about-slide:nth-child(4) { animation-delay: 9s; }
/* nakładka dla kontrastu tekstu — nieco ciemniejsza, bo rozmycie jest mniejsze */
.about-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.68) 0%, rgba(10,10,10,.58) 50%, rgba(10,10,10,.72) 100%);
}
/* każdy kadr pojawia się przez przenikanie NA poprzednim i zostaje widoczny,
   aż następny go zakryje — dzięki temu nigdy nie ma czarnej przerwy
   (cykl 12 s: 3 s na kadr; fade-in ~1 s zapewnia płynność) */
@keyframes aboutFade {
  0%      { opacity: 0; z-index: 2; }   /* pojawia się na wierzchu (fade in ~1 s) */
  8.33%   { opacity: 1; z-index: 2; }   /* w pełni widoczny */
  9%      { opacity: 1; z-index: 1; }   /* warstwa spoczynkowa */
  33.33%  { opacity: 1; z-index: 1; }   /* trzyma, aż następny w pełni przeniknie */
  33.34%  { opacity: 0; z-index: 0; }   /* schowany pod spodem — znika */
  100%    { opacity: 0; z-index: 0; }
}

.about .container { position: relative; z-index: 2; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.about-text { max-width: 1080px; }
/* tekst jak w sekcji Hero — płaski (bez efektu 3D), z miękkim cieniem dla czytelności */
.about-text { text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.about-text .eyebrow { color: var(--steel-2); text-shadow: 0 1px 10px rgba(0,0,0,.35); font-size: clamp(.9rem, 1.45vw, 1.12rem); letter-spacing: 0.2em; margin-bottom: 20px; }
/* nagłówek — identyczny rozmiar jak h1 w Hero */
.about-text h2 { font-size: clamp(1.45rem, 2.7vw, 2.35rem); line-height: 1.18; margin-bottom: 20px; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
/* oba akapity — ten sam rozmiar jak podtytuł w Hero */
.about-text > p,
.about-intro > p { color: #fff; font-size: clamp(.96rem, 1.42vw, 1.16rem); font-weight: 400; margin-bottom: 20px; max-width: 64ch; }
.about-text > p.about-body-2,
.about-intro > p.about-body-2 { font-size: clamp(.96rem, 1.42vw, 1.16rem); color: rgba(255,255,255,.9); margin-bottom: 0; }
/* przezroczysta, prostokątna ramka wokół tekstu wprowadzającego */
.about-intro {
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  padding: clamp(14px, 1.9vw, 24px);
  margin-bottom: 44px;
  max-width: 70ch;
  background: transparent;
}
.about-intro > p:last-child { margin-bottom: 0; }

.advantages { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; }
.advantages li { display: flex; gap: 16px; align-items: flex-start; }
.advantages svg {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  stroke: var(--steel-2); fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.advantages span { font-size: 1.02rem; font-weight: 500; padding-top: 3px; color: rgba(255,255,255,.94); }
.advantages .adv-text { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.advantages .adv-text span { padding-top: 0; }
.advantages .adv-sub { font-size: .88rem; font-weight: 400; color: rgba(255,255,255,.74); line-height: 1.45; }
.advantages li.visible { transition-delay: .05s; }

/* ---------- PASEK LOGO KLIENTÓW (marquee) ---------- */
/* mniejszy odstęp górny rekompensuje większy tytuł — tło sekcji nie rośnie */
.trust { position: relative; z-index: 2; margin-top: clamp(26px, 4.4vw, 50px); }
.trust-title {
  text-align: center;
  color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
}
/* okno przewijania — z miękkim zanikiem po bokach */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(28px, 3.4vw, 56px);
  animation: trustMarquee 55s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
/* biała plytka o stałym rozmiarze; logo wewnątrz powiększone, biały margines przycięty */
.trust-logo {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: clamp(132px, 14vw, 178px);
  height: clamp(58px, 6vw, 80px);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.trust-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* przybliżenie — przycięcie białego tła wokół logo */
  transform: scale(1.42);
}
/* przesunięcie o połowę toru = bezszwowa pętla (zestaw zdublowany w HTML) */
@keyframes trustMarquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- PRODUKTY ---------- */
.products { background: var(--bg-soft); }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3/4;
  display: block;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.product-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.7) 100%);
  transition: background .4s var(--ease);
}
.product-card:hover img { transform: scale(1.06); }
.product-card:hover::after { background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.78) 100%); }
.product-card-label { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 30px; }
.product-card-label h3 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ---------- PROCES ---------- */
/* Tło sekcji = film fon.webm (lekko rozmyty) zamiast białego tła */
.process { position: relative; overflow: hidden; color: #fff; }
/* niższy odstęp: u góry o 14 mm, u dołu o 4 mm */
.process.section {
  padding-top: max(20px, calc(clamp(70px, 10vw, 140px) - 14mm));
  padding-bottom: max(20px, calc(clamp(70px, 10vw, 140px) - 4mm));
}
.process-bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(4px);
  transform: scale(1.06) translateZ(0); /* lekkie powiększenie ukrywa rozmyte krawędzie; własna warstwa GPU */
  will-change: transform;
  backface-visibility: hidden;
}
.process-bg-overlay {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,14,14,.45) 0%, rgba(14,14,14,.32) 50%, rgba(14,14,14,.5) 100%);
}
.process .container { position: relative; z-index: 2; max-width: 1400px; }
.process .section-head { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.process .section-head .eyebrow { color: var(--steel-2); }
/* nagłówek bez ramki, w jednej linii (poziomo), nieco większy tekst */
.process .section-head h2.process-title {
  display: inline-block;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  white-space: nowrap;
}
/* animacja pojawienia po wejściu sekcji w widok */
.process .section-head.visible h2.process-title {
  animation: processTitleIn .75s var(--ease) .1s both;
}
@keyframes processTitleIn {
  from { opacity: 0; transform: translateY(20px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 3.6vw, 50px); align-items: stretch; }
/* karta procesu = biały, półprzezroczysty prostokąt z zaokrąglonymi rogami */
.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(42,44,48,.82);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: clamp(18px, 2.2vw, 28px) clamp(26px, 3vw, 40px);
  color: #fff;
  /* warstwowy cień + wewnętrzne podświetlenie = efekt głębi (objętości) */
  box-shadow:
    0 24px 55px rgba(0,0,0,.40),
    0 6px 16px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.18);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.process-step:hover {
  transform: translateY(-6px) scale(1.035);
  box-shadow:
    0 34px 70px rgba(0,0,0,.46),
    0 10px 22px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(0,0,0,.18);
}
.process-img { position: relative; overflow: hidden; border-radius: 10px; margin: 14px 0 16px; aspect-ratio: 4/5; box-shadow: 0 20px 44px rgba(0,0,0,.4); }
/* lekki, neutralny filtr przyciemniający (kolory zdjęcia bez zmian) */
.process-img::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.14) 0%, rgba(0,0,0,.24) 100%);
}
.process-img img { width: 100%; height: 100%; object-fit: cover; }
.process-num {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--steel-2);
  margin-bottom: 8px;
}
.process-step h3 { font-size: 1.4rem; margin-bottom: 4px; color: #fff; }
/* opis tuż pod zdjęciem (równo we wszystkich kartach) */
.process-step p { color: rgba(255,255,255,.78); font-size: 0.98rem; }

/* ---------- REALIZACJE / PREZENTACJA (SLIDER) ---------- */
/* tło = rozmyty gradient w kolorystyce aktywnego slajdu; sekcja krótsza o 5 mm z góry i z dołu */
.realizacje.section {
  position: relative; overflow: hidden;
  /* górny odstęp większy od wysokości sticky-headera — pasek nawigacji leży
     na tle sekcji, nad tekstem (nie zachodzi na nagłówek) */
  /* duży górny odstęp utrzymuje nagłówek pod sticky-headerem, więc sekcja
     dojeżdża do samej góry (y=0) i przezroczysty pasek leży na JEJ tle */
  padding-top: calc(clamp(46px, 6vw, 80px) + 10px);
  padding-bottom: calc(clamp(46px, 6vw, 80px) + 8px);
  background: #0d1722;
  color: #fff;
}
.realizacje .container { position: relative; z-index: 1; max-width: 1760px; }
.realizacje .section-head { margin-bottom: clamp(10px, 1.5vw, 18px); }
.realizacje .eyebrow { color: var(--steel-2); }

/* rozmyte tło sekcji — zdjęcie aktywnego slajdu mocno rozmyte (kolorowy gradient) */
.r-ambient { position: absolute; inset: 0; z-index: 0; }
.r-ambient::after { content: ""; position: absolute; inset: 0; background: rgba(13,23,34,.45); }
.r-ambient-layer {
  position: absolute; inset: -12%;
  background-size: cover; background-position: center;
  filter: blur(72px) saturate(1.35);
  transform: scale(1.25) translateZ(0);
  opacity: 0;
  /* BUGFIX: bez will-change przeglądarka nie promowała tej (mocno rozmytej,
     dużej) warstwy do osobnej warstwy kompozytora z wyprzedzeniem — przez to
     w momencie startu przenikania (co 5 s) dochodziło do przeliczenia/malowania
     „na żywo" i klatkarz (widoczne szarpnięcie) w całym slajderze. */
  will-change: opacity;
  transition: opacity .9s var(--ease);
}
.r-ambient-layer.is-active { opacity: .92; }

.r-slider { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
/* tor: wszystkie slajdy w rzędzie; przesuwa się w bok (z prawej na lewą) */
.r-viewport {
  position: relative;
  aspect-ratio: 21/9.5;
  display: flex;
  transition: transform .7s var(--ease);
}
.r-slide { position: relative; flex: 0 0 100%; height: 100%; }
.r-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
/* przyciemnienie po lewej, by tekst był czytelny */
.r-slide-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,8,8,.86) 0%, rgba(8,8,8,.66) 42%, rgba(8,8,8,.2) 78%, rgba(8,8,8,.05) 100%);
}
.r-slide-content {
  position: absolute; inset: 0;
  z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 5vw, 70px);
  padding-left: calc(clamp(28px, 5vw, 70px) + 8mm);
  max-width: 760px;
}
.r-loc {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-2); margin-bottom: 12px;
}
.r-title {
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.1; color: #fff;
  margin-bottom: 16px; text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.r-sub { font-size: clamp(.95rem, 1.4vw, 1.12rem); font-style: italic; color: var(--steel-2); margin-bottom: 20px; }
.r-sub-strong { font-style: normal; font-weight: 600; color: #fff; margin-bottom: 14px; }
.r-stats { display: flex; flex-direction: column; gap: clamp(8px, 1.2vw, 14px); }
.r-stats li { display: grid; grid-template-columns: minmax(120px, 0.34fr) 1fr; gap: 8px 22px; align-items: baseline; }
.r-stats-list li { grid-template-columns: 1fr; }
.r-num { font-size: clamp(1.05rem, 1.8vw, 1.5rem); font-weight: 700; color: #fff; white-space: nowrap; }
.r-num-sm { font-size: clamp(.95rem, 1.3vw, 1.12rem); font-weight: 600; color: var(--steel-2); }
.r-desc { font-size: clamp(.9rem, 1.25vw, 1.02rem); color: rgba(255,255,255,.9); line-height: 1.4; }
/* punktowane pozycje bez liczby */
.r-bullet { grid-template-columns: 1fr !important; }
.r-bullet .r-desc { position: relative; padding-left: 18px; }
.r-bullet .r-desc::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--steel-2);
}

/* strzałki: subtelne, okrągłe przyciski po bokach, wyśrodkowane w pionie */
.r-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 52px; height: 76px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.r-arrow:hover { background: rgba(255,255,255,.34); border-color: rgba(255,255,255,.85); }
.r-arrow:active { transform: translateY(-50%) scale(.93); }
.r-arrow svg {
  display: block; width: 26px; height: 26px;
  fill: none; stroke: #fff; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.r-prev { left: clamp(6px, 1vw, 14px); }
.r-next { right: clamp(6px, 1vw, 14px); }

/* kropki nawigacyjne */
.r-dots {
  position: absolute; bottom: clamp(14px, 2vw, 22px); left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; gap: 10px;
}
.r-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.4); cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.r-dots button.is-active { background: #fff; transform: scale(1.25); }

/* ---------- MATERIAŁY ---------- */
.materials-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.material-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
  background: #fff;
}
.material-card:hover { border-color: var(--steel); transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.06); }
.material-card svg {
  width: 42px; height: 42px;
  stroke: var(--steel); fill: none;
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  margin: 0 auto 20px;
}
.material-card h3 { font-size: 1.12rem; font-weight: 600; }
.materials-note {
  display: flex; align-items: center; gap: 18px;
  margin-top: 36px;
  padding: 26px 32px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.materials-note svg { flex: 0 0 auto; width: 34px; height: 34px; stroke: var(--steel); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.materials-note p { color: var(--text-2); font-size: 1rem; }

/* ---------- CERTYFIKATY ---------- */
.certyfikaty {
  position: relative;
  overflow: hidden;
  /* obniżona sekcja + 18 mm wysokości (po 9 mm góra/dół) */
  padding: calc(clamp(35px, 5vw, 70px) + 9mm) 0;
}
/* lekko rozmyte zdjęcie w tle (cerf.webp) */
.certyfikaty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/cerf.webp') center / cover no-repeat;
  filter: blur(5px);
  transform: scale(1.18);
  z-index: 0;
}
/* ciemny filtr dla czytelności treści na tle zdjęcia */
.certyfikaty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 0;
}
.certyfikaty .container { position: relative; z-index: 1; }
/* na ciemnym tle nagłówek sekcji jest jasny */
.certyfikaty .section-head h2,
.certyfikaty .section-lead { color: #fff; }
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: stretch; max-width: 1120px; margin-top: clamp(28px, 4vw, 48px); }
/* prostokąty identyczne jak w sekcji „Jak pracujemy", tylko mniejsze i w poziomie */
.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(42,44,48,.82);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: clamp(18px, 2vw, 26px) clamp(20px, 2.2vw, 30px);
  color: #fff;
  box-shadow:
    0 24px 55px rgba(0,0,0,.40),
    0 6px 16px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.18);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.cert-card:hover {
  transform: translateY(-6px) scale(1.035);
  box-shadow:
    0 34px 70px rgba(0,0,0,.46),
    0 10px 22px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(0,0,0,.18);
}
.cert-card h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.38; color: #fff; }
.cert-code { font-size: .9rem; font-weight: 700; letter-spacing: 0.05em; color: var(--steel-2); }
/* przycisk pobierania (na razie bez akcji — plik PDF dojdzie później) */
.cert-btn {
  margin-top: 16px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.cert-btn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.6); }
.cert-btn:active { transform: scale(.97); }
.cert-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- KONTAKT + STOPKA (jedna sekcja na tle img/fon.webp) ---------- */
.contact-footer {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: url('../img/fon.webp') center / cover no-repeat;
  padding: clamp(80px, 11vw, 150px) 0 34px;
}
/* przyciemnienie tła, by tekst był czytelny */
.contact-footer-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12,12,12,.82) 0%, rgba(12,12,12,.62) 45%, rgba(12,12,12,.86) 100%);
}
.contact-footer .container { position: relative; z-index: 1; }

/* lewa część: dane kontaktowe */
.cf-top { margin-bottom: clamp(60px, 9vw, 110px); }
.cf-contact { max-width: 720px; }
.cf-contact .eyebrow { color: var(--steel-2); }
.cf-contact h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 40px; }

/* osoby kontaktowe — siatka 2×2, by nie rozciągać tła sekcji w pionie */
.cf-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 48px;
  margin-bottom: 34px;
}
.cf-person {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 16px;
}
.cf-person-name { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.cf-person-role {
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--steel-2); margin-bottom: 9px;
}
.cf-person a {
  font-size: 1.02rem; font-weight: 500; line-height: 1.5;
  transition: color .3s var(--ease);
}
.cf-person a:hover { color: var(--steel-2); }

/* adres */
.cf-address {
  display: flex; flex-direction: column; gap: 6px;
  max-width: 480px;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 18px;
}
.cf-address .contact-label { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel-2); }
.cf-address span:not(.contact-label) { font-size: 1.15rem; font-weight: 500; line-height: 1.5; }

/* dolny pasek: logo + linki prawne + copyright */
.cf-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 44px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.cf-brand img { height: 46px; width: auto; margin-bottom: 16px; }
.cf-brand p { font-size: 0.95rem; max-width: 32ch; color: rgba(255,255,255,.8); }
.cf-legal { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: rgba(255,255,255,.8); }
.cf-legal a:hover, .cf-legal button:hover { color: #fff; }
.cf-legal button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.cf-copy { font-size: 0.85rem; color: rgba(255,255,255,.55); }

/* ---------- MIĘKKIE PRZEJŚCIA NA STYKACH SEKCJI ---------- */
/* element o zerowej wysokości między sekcjami; rozmywa pas dokładnie na linii styku */
.seam { position: relative; height: 0; z-index: 60; }
.seam::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -18px; height: 36px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* rozmycie najmocniejsze na samej linii, zanika ku górze i dołowi — bez nowych krawędzi */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
}

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(14,14,14,.97);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 22px var(--pad);
  box-shadow: 0 -6px 30px rgba(0,0,0,.3);
}
.cookie-inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.cookie-inner p { font-size: 0.92rem; max-width: 62ch; color: rgba(255,255,255,.85); }
.cookie-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cookie-link { font-size: 0.9rem; text-decoration: underline; color: rgba(255,255,255,.75); }
.cookie-link:hover { color: #fff; }
.cookie-banner .btn { padding: 11px 24px; font-size: 0.86rem; }
.cookie-banner .btn-ghost-dark { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie-banner .btn-ghost-dark:hover { border-color: #fff; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(8,8,8,.94);
  display: flex; align-items: center; justify-content: center;
  padding: 5vw;
}
/* atrybut hidden musi mieć pierwszeństwo nad display:flex — inaczej lightbox zasłania stronę */
.lightbox[hidden] { display: none; }
.cookie-banner[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: var(--radius); animation: lbIn .4s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lightbox button { position: absolute; background: none; border: none; color: rgba(255,255,255,.8); cursor: pointer; transition: color .25s; }
.lightbox button:hover { color: #fff; }
.lightbox-close { top: 24px; right: 32px; font-size: 2.6rem; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 10px 20px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  /* na węższych ekranach slajd nieco wyższy, by tekst się zmieścił */
  .r-viewport { aspect-ratio: 16/9; }
}

@media (max-width: 980px) {
  .cf-bottom { grid-template-columns: 1fr 1fr; }
  .cf-brand { grid-column: 1 / -1; }
  .materials-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    margin: 0;
    flex-direction: column;
    gap: 8px;
    background: rgba(14,14,14,.98);
    backdrop-filter: blur(10px);
    padding: 110px 32px 40px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 90;
  }
  .nav.open { transform: none; }
  .nav a { color: #fff !important; font-size: 1.1rem; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
  .nav a::after { display: none; }
  .burger { display: flex; z-index: 95; }

  .process-grid { grid-template-columns: 1fr; gap: 20px; }
  .process .section-head h2.process-title { white-space: normal; }
  .advantages { grid-template-columns: 1fr; }
  /* slider realizacji: na telefonie wyższy kadr i statystyki w jednej kolumnie */
  .r-viewport { aspect-ratio: 3/4; }
  .r-slide-bg::after { background: linear-gradient(180deg, rgba(8,8,8,.55) 0%, rgba(8,8,8,.78) 100%); }
  .r-stats li { grid-template-columns: 1fr; gap: 2px; }
  .r-num { font-size: 1.15rem; }
  .r-arrow { width: 44px; height: 62px; }
  .r-arrow svg { width: 23px; height: 23px; }
  .r-prev { left: clamp(6px, 2vw, 12px); }
  .r-next { right: clamp(6px, 2vw, 12px); }
  .cf-people { grid-template-columns: 1fr; gap: 22px; }
  .cf-bottom { grid-template-columns: 1fr; gap: 30px; }
  /* mobil: sekcja jest dużo wyższa niż szeroka, więc background-size:cover kadruje
     wg WYSOKOŚCI — piony (Y) praktycznie nie ma tu znaczenia, liczy się tylko X.
     38% pokazywało kawałek budynku bez czytelnej wywieszki. Dobrane empirycznie
     (przycięcia testowe pod proporcje sekcji) 58% centruje budynek z podświetloną
     tablicą/wywieszką TECHNOMET przy wejściu. Do dostrojenia w razie potrzeby —
     to jedna liczba, im wyżej (bliżej 0%), tym kadr idzie w lewą część zdjęcia. */
  .contact-footer { background-position: 58% center; }
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .hero { height: 92vh; }
}

@media (max-width: 420px) {
  .materials-grid, .cert-grid { grid-template-columns: 1fr; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
}

/* dostępność: redukcja ruchu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  /* bez animacji pokazujemy jeden statyczny kadr tła */
  .about-slide { opacity: 0 !important; }
  .about-slide:nth-child(1) { opacity: 1 !important; }
}
