/* ==========================================================================
   Opteris - master.css

   Zasady:
   1. Wszystkie wartości (kolory, odstępy, rozmiary) pochodzą z tokenów w :root.
   2. Układ budują małe prymitywy (.container, .stack, .grid, .section), a nie
      pojedyncze reguły dla każdego elementu.
   3. Komponenty dziedziczą po elementach HTML i tokenach; osobne reguły mają
      tylko elementy jednostkowe (belka z logo, hero).

   Spis: 1 Tokeny  2 Baza  3 Układ  4 Belka  5 Hero  6 Kategorie
         7 Strona (podstrony)  8 Stopka  9 Przycisk "do góry"
   ========================================================================== */


/* 1. TOKENY ================================================================ */
:root {
  /* kolory */
  --brand:        #FFC100;       /* kolor logo; w serwisie tylko logo, belka tytułu, baner i stopka */
  --ink:          #1c2228;
  --ink-soft:     #56616b;
  --ink-inverse:  #f1f1f1;
  --ink-muted:    #a2a2a2;       /* tekst drugorzędny na ciemnym tle */
  --accent:       #1f5f99;       /* jedyny kolor akcentu poza logo i banerem: linki, ikony, kroki */
  --accent-dark:  #174a78;
  --accent-soft:  #e8f0f8;       /* tło ikon i podświetleń */
  --accent-light: #8db8e0;       /* akcent na ciemnym tle */
  --action:       #14181d;       /* główny przycisk */
  --link:         var(--accent);
  --bg:           #f2f5f7;
  --surface:      #ffffff;
  --line:         #dde3e8;
  --line-strong:  #c4ccd3;       /* obrys pól formularzy */
  --brand-dark:   #8a6500;       /* marka w wersji czytelnej na jasnym tle (etykiety) */
  --dark:         #292929;
  --dark-top:     #2C2C2C;       /* belka po zwinięciu: góra gradientu */
  --dark-bottom:  #070707;       /* belka po zwinięciu: dół gradientu */

  /* krój pisma */
  --font:         "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Didact Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;

  /* skala typograficzna (ratio 1.25, płynna) */
  --step--1: 0.875rem;
  --step-0:  1rem;
  --step-1:  clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --step-2:  clamp(1.25rem,  1.1rem  + 0.75vw, 1.5625rem);
  --step-3:  clamp(1.5rem,   1.2rem  + 1.5vw,  1.9531rem);
  --step-4:  clamp(1.875rem, 1.3rem  + 2.8vw,  2.4414rem);

  /* rytm pionowy i poziomy (skala 8 pt, w rem) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2rem;
  --space-xl:  3rem;
  --space-section: clamp(2.5rem, 6vw, 5rem);   /* odstęp między sekcjami */
  --gutter:        clamp(1rem, 4vw, 2rem);     /* margines boczny strony */
  --container:     72rem;

  /* kształt i ruch */
  --radius:   0;                 /* ostre rogi w całym serwisie; zmiana tutaj zaokrągli wszystko naraz */
  --shadow-1: 0 1px 2px rgba(16, 24, 32, 0.08), 0 1px 3px rgba(16, 24, 32, 0.06);
  --shadow-2: 0 4px 8px rgba(16, 24, 32, 0.08), 0 12px 24px rgba(16, 24, 32, 0.10);
  --ease:     cubic-bezier(0.2, 0.6, 0.2, 1);
  --speed:    0.2s;

  /* belka */
  --header-outer-height: 4rem;
  --header-inner-height: 2rem;
  --header-height-difference: calc(var(--header-outer-height) - var(--header-inner-height));
}

/* przeglądarki bez clamp(): stałe wartości zamiast płynnych */
@supports not (width: clamp(1px, 1vw, 2px)) {
  :root {
    --step-1: 1.125rem;
    --step-2: 1.375rem;
    --step-3: 1.75rem;
    --step-4: 2.125rem;
    --space-section: 3rem;
    --gutter: 1rem;
  }
}


/* 2. BAZA ================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }   /* płynne przewijanie do #top */
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  display: flex;                      /* stopka zawsze przy dole okna */
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
}

blockquote, dd, div, dl, dt, figure, form, h1, h2, h3, h4, h5, h6,
li, ol, p, pre, td, th, ul {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

ul, ol { list-style: none; }

/* pola formularzy */
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=tel],
input[type=url],
textarea {
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: var(--space-2xs) var(--space-xs);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

button,
input[type=submit] {
  font: inherit;
  cursor: pointer;
}


/* link "Przejdź do treści": widoczny dopiero po fokusie klawiaturą (pierwszy element strony) */
.skip-link {
  position: fixed;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100000;
  padding: var(--space-xs) var(--space-s);
  font-weight: 700;
  color: var(--ink);
  background: var(--brand);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; text-decoration: none; }
#cont-box:focus { outline: 0; }
.header-outer :focus-visible,
.site-footer :focus-visible,
.hero2 :focus-visible { outline-color: #fff; }

/* 3. UKŁAD ================================================================= */
#cont-box { flex: 1 0 auto; width: 100%; }

/* wyśrodkowana kolumna treści; tej samej szerokości używa belka i stopka */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

/* rytm pionowy: równy odstęp między dziećmi, bez marginesów na każdym z osobna */
.stack > * + * { margin-top: var(--stack-space, var(--space-s)); }

/* siatka: tyle kolumn, ile się zmieści (od --grid-min) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min, 15rem), 1fr));
  gap: var(--grid-gap, var(--space-m));
}
@supports not (display: grid) {
  .grid > * { margin-bottom: var(--space-m); }
}


/* 4. BELKA (menu + logo) =================================================== */
/* Zwijanie sterowane scrollem - bez JS: animacje stoją "zatrzymane" na
   początku, a przeglądarki z animation-timeline podpinają je pod scroll
   (blok @supports niżej). Pozostałe obsługuje krótki skrypt w index.volt,
   który tylko przesuwa animation-delay. */
.header-outer {
  position: sticky;
  top: calc(var(--header-height-difference) * -1);
  z-index: 99999;
  display: flex;
  align-items: center;
  height: var(--header-outer-height);
  background: linear-gradient(to bottom, var(--dark-top), var(--dark-bottom));
  border: solid transparent;
  border-width: 0.05em 0;
  border-top-color: #515151;
  border-bottom-color: var(--dark-top);
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
}

.header-inner {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: var(--header-inner-height);
}

/* jasna warstwa, która "wchodzi" na ciemną belkę podczas scrolla (belka zwinięta = jasna) */
.over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--bg);
  opacity: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.header-logo img {
  display: block;
  flex: none;                                     /* nie dajemy flexowi ściskać obrazka */
  /* Wymiary jawnie (proporcje SVG 420:125): Safari nie liczy szerokości z viewBox dla width:auto */
  height: calc(var(--header-inner-height) * 1.4);
  width: calc(var(--header-inner-height) * 1.4 * 3.36);
  transform-origin: left center;
  object-fit: contain;
}

/* menu: na telefonie rozwijany panel (checkbox + label, bez JS) */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  width: var(--header-inner-height);
  height: var(--header-inner-height);
  cursor: pointer;
  --bar-shift: calc(0.3rem + 2px);
}
.nav-burger span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(var(--bar-shift)) rotate(45deg); }
.nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(calc(var(--bar-shift) * -1)) rotate(-45deg); }
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--brand); }

.header-navigation {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: var(--space-2xs) 0;
  background: var(--dark-bottom);
  box-shadow: var(--shadow-2);
}
.nav-toggle:checked ~ .header-navigation { display: flex; }

.header-navigation a,
.header-navigation .active {
  position: relative;
  display: block;
  padding: var(--space-xs) var(--gutter);
  font-size: 1.25rem;
  font-weight: 500;
  color: #d0d0d0;
}
.header-navigation a:hover { text-decoration: none; }
.header-navigation .active { cursor: context-menu; font-weight: 700; }

/* podkreślenie rośnie od lewej po najechaniu */
.header-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}
.header-navigation a:hover::after { transform: scaleX(1); }

@media (min-width: 50rem) {
  .nav-burger { display: none; }

  .header-navigation,
  .nav-toggle:checked ~ .header-navigation {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;                          /* linki i przyciski narzędzi w jednej osi */
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .header-navigation a,
  .header-navigation .active {
    padding: 0;
    margin-left: var(--space-m);
  }
}

/* narzędzia w belce: język i ułatwienia dostępu (<details>, bez JS) */
.nav-tools { display: flex; gap: var(--space-3xs); padding: var(--space-xs) var(--gutter); }
.tool { position: relative; }
.tool > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.4rem;
  list-style: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #d0d0d0;
}
.tool > summary::-webkit-details-marker { display: none; }
.tool > summary:hover,
.tool[open] > summary { background: rgba(128, 128, 128, 0.28); }
.tool > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tool .ic { width: 1.25rem; height: 1.25rem; }
.tool-panel {
  display: block;
  min-width: 13rem;
  margin: var(--space-3xs) 0 0;
  padding: var(--space-3xs) 0;
  list-style: none;
  background: var(--dark-bottom);
  color: #d0d0d0;
  box-shadow: var(--shadow-2);
}
.tool-item {
  display: block;
  width: 100%;
  padding: var(--space-2xs) var(--space-s);
  border: 0;
  background: none;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  text-align: left;
}
button.tool-item { cursor: pointer; }
button.tool-item:hover { background: rgba(255, 255, 255, 0.1); }
button.tool-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
button.tool-item[aria-pressed="true"]::after { content: " \2713"; font-weight: 700; }
.tool-item.is-current { font-weight: 700; color: #fff; }
.tool-item.is-off { opacity: 0.55; }
.tool-item small { font-size: 0.75rem; }
@media (min-width: 50rem) {
  .nav-tools { padding: 0; margin-left: var(--space-s); }
  .tool-panel { position: absolute; right: 0; top: 100%; z-index: 5; }
}

/* ułatwienia dostępu (klasy na <html>, ustawia przycisk w belce) */
html.a11y-big { font-size: 125%; }
html.a11y-contrast {
  --ink: #000; --ink-soft: #1c1c1c; --accent: #003a75; --accent-dark: #002a55; --link: #003a75;
  --bg: #fff; --line: #000; --line-strong: #000;
}
html.a11y-contrast a { text-decoration: underline; }
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after { transition: none !important; }
html.a11y-calm .hero2-slide { animation: none; }
html.a11y-calm .hero2-slide:first-child { opacity: 1; visibility: visible; }
html.a11y-calm .hero2-dots { display: none; }

/* animacje belki: postęp 0 = góra strony, 1 = belka zwinięta */
@keyframes hdr-outer  { from { border-top-color: #515151; border-bottom-color: var(--dark-top); }
                        to   { border-top-color: #808080; border-bottom-color: var(--bg); } }
@keyframes hdr-over   { from { opacity: 0; } to { opacity: 1; } }
@keyframes hdr-link   { from { color: #d0d0d0; font-size: 1.25rem; } to { color: #444444; font-size: 1rem; } }
@keyframes hdr-active { from { color: #ffffff; font-size: 1.25rem; } to { color: #000000; font-size: 1rem; } }
@keyframes hdr-panel  { from { background-color: var(--dark-bottom); } to { background-color: var(--bg); } }
@keyframes hdr-logo   { from { transform: scale(1);   filter: grayscale(0%)   contrast(1)   brightness(1); }
                        to   { transform: scale(0.5); filter: grayscale(100%) contrast(1.2) brightness(0.4); } }

.header-outer              { animation: hdr-outer  1s linear both paused; }
.over                      { animation: hdr-over   1s linear both paused; }
.header-navigation a,
.tool > summary,
.nav-burger                { animation: hdr-link   1s linear both paused; }
.header-navigation .active { animation: hdr-active 1s linear both paused; }
.header-logo img           { animation: hdr-logo   1s linear both paused; }
@media (max-width: 49.99rem) {
  .header-navigation       { animation: hdr-panel  1s linear both paused; }   /* panel menu na telefonie */
}

@supports (animation-timeline: scroll()) {
  .header-outer,
  .over,
  .header-navigation,
  .header-navigation a,
  .header-navigation .active,
  .tool > summary,
  .nav-burger,
  .header-logo img {
    animation-play-state: running;
    animation-timeline: scroll(root block);
    animation-range: 0px var(--header-height-difference);   /* 0 .. 2rem */
  }
}

/* przeglądarki bez position:sticky: belka stała, bez zwijania */
@supports not (position: sticky) {
  .header-outer { position: fixed; top: 0; left: 0; width: 100%; }
  #cont-box { padding-top: var(--header-outer-height); }
}


/* 5. STRONA GŁÓWNA: HERO ================================================== */
.eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero2 { position: relative; overflow: hidden; color: #fff; background: #030817; }
.hero2::before {                                  /* tło zapasowe (bez JS / starsze przeglądarki): gwiazdy i poświata globu */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #030817 var(--hero) center / cover no-repeat;
}
.hero2::after {                                   /* przyciemnienie pod tekstem (lewa strona), nad globem */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, rgba(3, 8, 23, 0.92) 0%, rgba(3, 8, 23, 0.7) 34%, rgba(3, 8, 23, 0) 62%);
  pointer-events: none;
}
.hero2-inner { position: relative; z-index: 1; padding-top: clamp(4rem, 9vw, 7.5rem); padding-bottom: clamp(4.5rem, 9vw, 7.5rem); }
.hero2 .eyebrow { color: var(--accent-light); }
.hero2-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero2--live::before { opacity: 0; }                /* gdy działa animacja, tło zapasowe znika (rysuje je canvas) */

/* hasła: cztery slajdy w jednej komórce siatki (wysokość = najwyższy); zmiana co 8 s (cykl 32 s), czysty CSS */
.hero2-slides { display: grid; }
.hero2-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  animation: hero2-cycle 32s linear infinite both;
  animation-delay: calc(var(--i) * 8s);
}
@keyframes hero2-cycle {
  0%    { opacity: 0; visibility: hidden;  transform: translateY(18px); }
  2.25% { opacity: 1; visibility: visible; transform: none; }
  22.5% { opacity: 1; visibility: visible; transform: none; }
  25%   { opacity: 0; visibility: hidden;  transform: translateY(-12px); }
  100%  { opacity: 0; visibility: hidden;  transform: translateY(-12px); }
}
.hero-title {
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.3rem + 4.8vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero2-lead { max-width: 38rem; margin-top: var(--space-m); font-size: var(--step-1); color: #cfd6dc; }
.hero2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); margin-top: var(--space-l); }
.hero2 .more { color: #fff; }

/* kropki postępu synchronizowane z hasłami */
.hero2-dots { display: flex; gap: var(--space-2xs); margin-top: var(--space-l); }
.hero2-dots li { width: 2rem; height: 3px; background: rgba(255, 255, 255, 0.22); }
.hero2-dots li::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent-light);
  transform: scaleX(0);
  transform-origin: left;
  animation: hero2-dot 32s linear infinite both;
  animation-delay: calc(var(--i) * 8s);
}
@keyframes hero2-dot {
  0%     { transform: scaleX(0); }
  25%    { transform: scaleX(1); }
  25.1%  { transform: scaleX(0); }
  100%   { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {          /* bez ruchu: tylko pierwsze hasło, bez kropek */
  .hero2-slide { animation: none; }
  .hero2-slide:first-child { opacity: 1; visibility: visible; }
  .hero2-dots { display: none; }
}
@media (max-width: 49.99rem) {                    /* telefon: glob na dole, tekst nad nim */
  .hero2::before { background-position: 72% 100%; background-size: auto 130%; }
  .hero2::after { background: linear-gradient(180deg, rgba(3, 8, 23, 0.85) 0%, rgba(3, 8, 23, 0.55) 60%, rgba(3, 8, 23, 0.1) 100%); }
}

/* 6. KATEGORIE (wstęp + kafle ze zdjęciem) ================================ */
/* elementy wielokrotnego użytku */
.ic {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-box {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;                           /* kółka zostają okrągłe */
  color: var(--accent);
  background: var(--accent-soft);
}
.btn {
  display: inline-block;
  padding: var(--space-xs) var(--space-l);
  font-weight: 600;
  color: #fff;
  background: var(--action);
  border: 1px solid var(--action);
  border-radius: var(--radius);
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.btn:hover { color: #fff; text-decoration: none; background: #000; border-color: #000; }
.btn-light { color: var(--ink); background: #fff; border-color: #fff; }       /* na ciemnym tle */
.btn-light:hover { color: var(--ink); background: #e3e9ee; border-color: #e3e9ee; }
.btn-ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.more { font-weight: 500; }
.more::after {                                    /* strzałka → */
  content: "\2192";
  display: inline-block;
  margin-left: var(--space-2xs);
  transition: transform var(--speed) var(--ease);
}
a:hover .more::after,
.more:hover::after { transform: translateX(var(--space-2xs)); }

/* wstęp po lewej, treść po prawej; wstęp "przykleja się" przy przewijaniu */
.split { display: grid; gap: var(--space-l); }
.intro p { max-width: 34ch; }
.intro h2 { font-family: var(--font-display); font-weight: 400; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); }
@media (min-width: 64rem) {
  .split { grid-template-columns: 1fr 2fr; align-items: start; gap: var(--space-xl); }
  .intro { position: sticky; top: calc(var(--header-inner-height) + var(--space-l)); }
}

/* nagłówek sekcji strony głównej: etykieta, tytuł, wstęp i link po prawej */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-m); margin-bottom: var(--space-l); }
.sec-head h2,
.h-display { font-family: var(--font-display); font-size: var(--step-4); font-weight: 400; line-height: 1.1; }
.sec-head p { max-width: 46ch; margin-top: var(--space-xs); font-size: var(--step-1); color: var(--ink-soft); }
.sec-head p.eyebrow { max-width: none; margin: 0 0 var(--space-xs); font-size: 0.8125rem; color: var(--accent); }

/* pasek zaufania pod hero */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-list { display: grid; gap: var(--space-m); padding: var(--space-l) 0; }
.trust-item { display: flex; gap: var(--space-s); align-items: flex-start; }
.trust-item strong { display: block; }
.trust-item p { font-size: 0.9375rem; color: var(--ink-soft); }
@media (min-width: 50rem) { .trust-list { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); } }

/* karty usług (strona główna): siatka 1 / 2 / 4 kolumny, ostatnia karta zaprasza do rozmowy */
.svc-grid { display: grid; gap: var(--space-s); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .svc-grid { grid-template-columns: repeat(4, 1fr); } }
.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 15rem;
  padding: var(--space-m);
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--speed), box-shadow var(--speed);
}
.svc:hover { color: inherit; text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-2); }
.svc h3 { font-size: var(--step-1); }
.svc p { font-size: 0.9375rem; color: var(--ink-soft); }
.svc .more { margin-top: auto; padding-top: var(--space-s); color: var(--accent); }
/* telefon: zwarte karty katalogów (bez wymuszonej wysokości i z mniejszymi odstępami), tekst bez zmian */
@media (max-width: 39.99rem) {
  .svc { min-height: 0; padding: var(--space-s); gap: var(--space-3xs); }
  .svc .more { padding-top: var(--space-2xs); }
}
.svc-cta { color: #fff; background: var(--ink); border-color: var(--ink); }
.svc-cta:hover { color: #fff; background: #000; }
.svc-cta p { color: #c4ccd3; }
.svc-cta .more { color: #fff; }

/* "Dlaczego Opteris": zdjęcie obok tekstu z listą punktów */
.why { display: grid; gap: var(--space-l); align-items: center; }
.why-img { width: 100%; height: 100%; min-height: 18rem; max-height: 30rem; object-fit: cover; }
.why .checks { margin: var(--space-m) 0; }
.why p.lead { margin-top: var(--space-xs); }
@media (min-width: 64rem) { .why { grid-template-columns: 1fr 1fr; gap: var(--space-xl); } }

/* lista punktów z "ptaszkiem" (strona główna i bloki podstron) */
.checks li { position: relative; padding-left: 1.75rem; color: var(--ink-soft); }
.checks li + li { margin-top: var(--space-xs); }
.checks li::before { content: "\2713"; position: absolute; left: 0; font-weight: 700; color: var(--accent); }


/* 6b. JAK PRACUJEMY (kroki) ================================================ */
.band { background: var(--surface); }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); margin-bottom: var(--space-l); }
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-l) var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.step {
  counter-increment: step;
  position: relative;
  padding-top: var(--space-m);
  border-top: 2px solid var(--line);
  --stack-space: var(--space-2xs);
}
.step::before {                                   /* żółty akcent na linii */
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: var(--space-xl);
  height: 2px;
  background: var(--accent);
}
.step .ic-box { margin-bottom: var(--space-2xs); }
.step h3::before {                                /* numer kroku liczony w CSS */
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-0);
  color: var(--ink-soft);
}
.step p { color: var(--ink-soft); }


/* 6c. DLA KOGO (karty z ikoną) ============================================= */
.feats {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.feat {
  padding: var(--space-m);
  background: var(--surface);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  --stack-space: var(--space-xs);
}
.feat { display: block; color: inherit; }   /* karta informacyjna, nieklikalna: bez efektu najechania */
.feat h3 { font-size: var(--step-1); }
.feat p { color: var(--ink-soft); font-size: 0.9375rem; }


/* 6d. PYTANIA I ODPOWIEDZI (akordeon na <details>, bez JS) ================= */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-s) var(--space-xs);
  font-size: var(--step-1);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background var(--speed);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface); }
.faq summary::after {                             /* plus -> krzyżyk po otwarciu */
  content: "+";
  margin-left: auto;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--ink); }
.faq details[open] summary { font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.faq details > p {
  padding: 0 var(--space-xs) var(--space-m);
  max-width: 60ch;
  color: var(--ink-soft);
}


/* 6e. BANER Z WEZWANIEM DO KONTAKTU ======================================== */
.cta { padding: var(--space-xl) 0; color: var(--ink); background: var(--bg); }
.cta .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}
.cta h2 { font-size: var(--step-4); }
.cta mark {                                       /* zakreślacz pod kluczowymi słowami */
  padding: 0 0.15em;
  color: inherit;
  background: linear-gradient(transparent 60%, var(--brand) 60%);
}
.cta p { margin-top: var(--space-2xs); font-size: var(--step-1); color: var(--ink-soft); }
.cta .btn { padding: var(--space-s) var(--space-l); font-size: var(--step-1); color: var(--ink); background: var(--brand); border-color: var(--brand); box-shadow: var(--shadow-1); }
.cta .btn:hover { color: var(--ink); background: var(--brand); border-color: var(--brand); filter: brightness(1.08); }


/* 7. PODSTRONY ============================================================= */
/* Pasek tytułu (jasny, żeby nie zlewał się z ciemną belką) zwija się i "przykleja"
   pod belką tą samą techniką co belka: zewnętrzny pojemnik o stałej wysokości
   (--ph-outer) + wewnętrzny, który zostaje widoczny (--ph-inner). Zawiera
   okruszki (ścieżkę do podstrony) i tytuł bieżącej strony; po zwinięciu
   okruszki znikają, a tytuł się zmniejsza. Zwinięty pasek rozwija się do pełnego rozmiaru po najechaniu
   myszką (komputer) albo dotknięciu (telefon) i zwija po opuszczeniu / dotknięciu poza nim. Zwijanie zaczyna się po zwinięciu belki. */
.page-header {
  --ph-outer: 6rem;
  --ph-inner: 2.5rem;
  --ph-total: calc(var(--header-height-difference) + var(--ph-outer) - var(--ph-inner));
  position: sticky;
  top: calc(var(--header-inner-height) + var(--ph-inner) - var(--ph-outer));
  z-index: 99998;                                 /* tuż pod belką */
  display: flex;
  align-items: center;
  height: var(--ph-outer);
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.08);
}
.page-header-inner {
  position: sticky;
  top: var(--header-inner-height);
  display: flex;
  align-items: center;
  height: var(--ph-inner);
}
.crumbs {                                         /* nad tytułem, poza obiegiem (nie przesuwa tytułu po zwinięciu) */
  position: absolute;
  top: -1.3rem;
  left: var(--gutter);
  white-space: nowrap;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li + li::before { content: "\203A"; margin: 0 var(--space-2xs); }   /* › */
.crumbs a { color: inherit; }
.crumbs .ic { width: 1em; height: 1em; vertical-align: -0.1em; }
.crumbs a:hover { color: var(--ink); }
.page-header h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  white-space: nowrap;
  transform-origin: left center;
}
.page-header h1::after {                          /* żółty akcent pod tytułem (poza obiegiem, znika po zwinięciu) */
  content: "";
  position: absolute;
  left: 0;
  bottom: calc(-1 * var(--space-xs));
  width: var(--space-l);
  height: 0.15rem;
  background: var(--brand);
}
/* telefon: długi tytuł zawija się do dwóch linii zamiast wychodzić poza ekran */
@media (max-width: 49.99rem) {
  .page-header h1 { white-space: normal; font-size: var(--step-2); line-height: 1.15; }
  .crumbs { max-width: calc(100% - 2 * var(--gutter)); overflow: hidden; text-overflow: ellipsis; }
}
@keyframes ph-title  { from { transform: scale(1); }   to { transform: scale(0.6); } }
@keyframes ph-fade   { from { opacity: 1; }            to { opacity: 0; } }
.page-header h1          { animation: ph-title 1s linear both paused; }
.page-header h1::after,
.crumbs                  { animation: ph-fade  1s linear both paused; }

/* strzałka rozwijania (komputer i telefon; na telefonie wypada pod hamburgerem): po zwinięciu paska wskazuje w dół (rozwiń),
   po rozwinięciu w górę (zwiń); na górze strony, gdzie pasek jest i tak rozwinięty, jest niewidoczna */
.ph-check { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
@keyframes ph-arrow { from { opacity: 0; } to { opacity: 1; } }
.ph-toggle {
  position: absolute;
  right: var(--gutter);                           /* pole 2rem: środek strzałki pod środkiem hamburgera */
  top: 50%;
  width: 2rem;
  height: 2rem;
  margin-top: -1rem;
  cursor: pointer;
  opacity: 0;
  animation: ph-arrow 1s linear both paused;
}
.ph-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  margin: -0.5rem 0 0 -0.325rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease), margin-top 0.2s var(--ease);
}
.ph-check:focus-visible + .page-header .ph-toggle { outline: 2px solid var(--brand); }
.ph-check:checked + .page-header .ph-toggle::after { transform: rotate(-135deg); margin-top: -0.15rem; }

@supports (animation-timeline: scroll()) {
  .page-header h1,
  .page-header h1::after,
  .ph-toggle,
  .crumbs {
    animation-play-state: running;
    animation-timeline: scroll(root block);
    animation-range: 0px var(--ph-total);
  }
}

/* Rozwijanie zwiniętego paska: pasek przykleja się pod belką w pełnej wysokości (top = wysokość zwiniętej belki),
   a animacje przewijania są wyłączone, więc widać okruszki (linki do stron nadrzędnych) i pełny tytuł.
   Na górze strony pasek i tak jest rozwinięty, więc rozwinięcie nic nie zmienia.
   Komputer: najechanie myszką. Wszędzie: strzałka (label + checkbox, bez JS); mały skrypt tylko zwija po przewinięciu
   i kliknięciu poza paskiem. :hover na dotyku "przykleja się", dlatego nie jest tam używany. */
.page-header { transition: top 0.2s var(--ease); }
.ph-check:checked + .page-header,
.page-header:focus-visible,
.page-header:has(:focus-visible) { top: var(--header-inner-height); }
.ph-check:checked + .page-header h1,
.ph-check:checked + .page-header h1::after,
.ph-check:checked + .page-header .crumbs,
.page-header:focus-visible h1,
.page-header:focus-visible h1::after,
.page-header:focus-visible .crumbs,
.page-header:has(:focus-visible) h1,
.page-header:has(:focus-visible) h1::after,
.page-header:has(:focus-visible) .crumbs { animation: none; }
@media (hover: hover) {
  .page-header:hover { top: var(--header-inner-height); }
  .page-header:hover h1,
  .page-header:hover h1::after,
  .page-header:hover .crumbs { animation: none; }
  .page-header:hover .ph-toggle::after { transform: rotate(-135deg); margin-top: -0.15rem; }
}
.page-header:focus { outline: 0; }


/* 7a. PASEK TYTUŁU Z HERO ================================================= */
/* Wariant "hero" wspólnego paska tytułu (.page-header + .page-header--hero, strony poziomu 1): ten sam komponent,
   więc markup i zachowanie po zwinięciu (strzałka, najechanie, fokus, checkbox) są takie same jak na pozostałych podstronach.
   Fazy przewijania (HD = różnica wysokości belki):
   1) 0 .. HD+9rem     hero jedzie w górę razem ze stroną (15rem -> 6rem); wstęp blaknie
   2) HD+9 .. HD+12    pasek stoi (6rem), grafika zanika
   3) 12rem .. HD+15.5 zwykłe kurczenie paska 6rem -> 2.5rem (te same animacje co na innych podstronach) */
.page-header--hero {
  --ph-outer: 15rem;
  --ph-hold: 3rem;
  --ph-bar: 6rem;
  align-items: flex-start;
  padding-top: 3.5rem;
  top: calc(var(--header-inner-height) + var(--ph-inner) - var(--ph-outer) - var(--ph-hold));
}
.ph-hero { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.ph-hero-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--ph-img) right center / cover no-repeat; }
.ph-hero-bg--flip { transform: scaleX(-1); }   /* grafika odbita lustrzanie, gdy obiekt stoi po lewej */
.ph-hero-body { position: absolute; left: 0; right: 0; top: 6.75rem; }
.ph-hero-body > * { max-width: 34rem; }

/* Animacje: podstawa (wstrzymane, "napędza" je skrypt zapasowy na dole strony); przeglądarki z CSS scroll-driven animations
   uruchamiają je same, przez animation-timeline (blok @supports niżej). */
@keyframes ph-hold   { 0%, 0.1% { transform: none; } 46.15%, 100% { transform: translateY(3rem); } }
/* grafika ciemna (.page-header--dark): tekst startuje jasny i ciemnieje razem z zanikiem grafiki (ten sam zakres, ta sama animacja paska) */
@keyframes ph-hold-dark { 0%, 0.1% { transform: none; color: #fff; } 46.15%, 100% { transform: translateY(3rem); color: var(--ink); } }
.page-header--hero.page-header--dark { animation-name: ph-hold-dark; }
@keyframes ph-bgfade { 0% { opacity: 1; } 46.15%, 100% { opacity: 0; } }
@keyframes ph-itop   { 0% { top: calc(var(--header-inner-height) + 1.75rem); }
                       46.15% { top: calc(var(--header-inner-height) - 1.25rem); }
                       100% { top: calc(var(--header-inner-height) - 3rem); } }
@keyframes ph-body   { from { opacity: 1; } to { opacity: 0; } }
.page-header--hero                    { animation: ph-hold   1s linear both paused; }
.ph-hero-bg                           { animation: ph-bgfade 1s linear both paused; }
.page-header--hero .page-header-inner { animation: ph-itop   1s linear both paused; }
.ph-hero-body                         { animation: ph-body   1s linear both paused; }
@supports (animation-timeline: scroll()) {
  .page-header--hero,
  .ph-hero-bg,
  .page-header--hero .page-header-inner,
  .ph-hero-body { animation-play-state: running; animation-timeline: scroll(root block); }
  .page-header--hero,
  .ph-hero-bg,
  .page-header--hero .page-header-inner { animation-range: calc(var(--header-height-difference) + 9rem) calc(var(--header-height-difference) + 15.5rem); }
  .ph-hero-body { animation-range: 0px calc(var(--header-height-difference) + 4rem); }
  /* zwykłe kurczenie paska (tytuł, akcent, strzałka) dopiero w fazie 3 */
  .page-header--hero h1,
  .page-header--hero h1::after,
  .page-header--hero .ph-toggle { animation-range: 12rem calc(var(--header-height-difference) + 15.5rem); }
}

/* Stare przeglądarki (hack): bez position: sticky (IE11, bardzo stare Safari) hero jest zwykłym, nieprzyklejonym banerem;
   bez zmiennych CSS cały serwis i tak się nie wyświetli, więc nie ma tu dalszych obejść. */
.page-header--hero { position: -webkit-sticky; position: sticky; }
@supports not ((position: sticky) or (position: -webkit-sticky)) {
  .page-header--hero, .page-header--hero .page-header-inner { position: relative; top: auto; animation: none; }
  .ph-hero-body { animation: none; }
  .page-header--hero .ph-toggle { display: none; }
}

/* rozwinięcie zwiniętego paska (strzałka / najechanie / fokus): ten sam pasek 6rem co na innych podstronach */
.ph-check:checked + .page-header--hero,
.page-header--hero:focus-visible,
.page-header--hero:has(:focus-visible) { top: calc(var(--header-inner-height) + var(--ph-bar) - var(--ph-outer) - var(--ph-hold)); }
.ph-check:checked + .page-header--hero .page-header-inner,
.page-header--hero:focus-visible .page-header-inner,
.page-header--hero:has(:focus-visible) .page-header-inner { animation: none; top: calc(var(--header-inner-height) + 1.75rem - var(--ph-hold)); }
@media (hover: hover) {
  .page-header--hero:hover { top: calc(var(--header-inner-height) + var(--ph-bar) - var(--ph-outer) - var(--ph-hold)); }
  .page-header--hero:hover .page-header-inner { animation: none; top: calc(var(--header-inner-height) + 1.75rem - var(--ph-hold)); }
}
@media (max-width: 49.99rem) { .ph-hero-bg { background-position: 70% center; opacity: .5; } }


/* 7b. FORMULARZE I KONTAKT ================================================= */
/* Pływające etykiety w czystym CSS: etykieta leży w polu, a po fokusie albo
   wpisaniu tekstu (:placeholder-shown) przesuwa się do góry i maleje.
   Pole musi mieć placeholder=" " i etykietę zaraz za sobą. */
.form { display: grid; gap: var(--space-s) var(--space-m); grid-template-columns: 1fr; }
@media (min-width: 40rem) {
  .form { grid-template-columns: 1fr 1fr; }
  .form .full { grid-column: 1 / -1; }
}
.field { position: relative; }
.field > input,
.field > textarea {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 1.5rem 0 0.5rem;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
  transition: border-color var(--speed);
}
.field > textarea { min-height: 7rem; resize: vertical; }
.field > label {
  position: absolute;
  left: 0;
  top: 1.05rem;
  color: var(--ink-soft);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.22s var(--ease), color 0.22s;
}
.field > input:focus + label,
.field > input:not(:placeholder-shown) + label,
.field > textarea:focus + label,
.field > textarea:not(:placeholder-shown) + label { transform: translateY(-0.9rem) scale(0.78); }
.field > input:focus + label,
.field > textarea:focus + label { color: var(--accent-dark); }
.field::after {                                   /* żółta linia rośnie od lewej przy fokusie */
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }

.consent { display: flex; gap: var(--space-xs); align-items: flex-start; font-size: 0.9375rem; color: var(--ink-soft); }
.consent input { margin-top: 0.25rem; accent-color: var(--accent); }
.form .btn { border: 0; cursor: pointer; }

/* strona Kontakt: ciemna karta z danymi + biały formularz */
.contact { display: grid; box-shadow: var(--shadow-2); }
.contact-card {
  padding: var(--space-l);
  color: #fff;
  background: linear-gradient(to bottom, var(--dark-bottom), var(--dark-top));
}
.contact-card h2 { font-family: var(--font-display); font-weight: 400; }
.contact-card h2::after {                         /* żółty akcent pod tytułem */
  content: "";
  display: block;
  width: var(--space-l);
  height: 0.15rem;
  margin-top: var(--space-xs);
  background: var(--accent-light);
}
.contact-card p { color: #c9ced3; }
.contact-form { padding: var(--space-l); background: var(--surface); }
.contact-form h2 { margin-bottom: var(--space-m); font-family: var(--font-display); font-weight: 400; }
.info { display: grid; gap: var(--space-s); }
.info li { display: flex; gap: var(--space-s); align-items: center; }
.info .ic-box { width: 2.75rem; height: 2.75rem; }
.contact-card .ic-box { color: #fff; background: rgba(255, 255, 255, 0.14); }
@media (min-width: 50rem) { .contact { grid-template-columns: 20rem 1fr; } }


/* Kontakt wizytówki: jeden zwarty panel, bez formularza. */
.contact-compact {
  display: grid;
  gap: var(--space-l);
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.contact-compact-intro h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); }
.contact-compact-intro > p:not(.eyebrow) { margin-top: var(--space-s); max-width: 35ch; color: var(--ink-soft); }
.contact-compact-intro .eyebrow { margin-bottom: var(--space-xs); }
.contact-compact-intro .contact-location { display: flex; align-items: flex-start; gap: var(--space-xs); margin-top: var(--space-l); font-size: var(--step--1); }
.contact-location .ic { color: var(--accent); width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; }
.contact-methods { align-self: center; min-width: 0; }
.contact-method {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m) 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.contact-method:first-child { padding-top: 0; }
.contact-method:last-child { padding-bottom: 0; border-bottom: 0; }
.contact-method > span:last-child { min-width: 0; }
.contact-method-label { display: block; margin-bottom: var(--space-3xs); color: var(--ink-soft); font-size: var(--step--1); }
.contact-method strong { font-size: clamp(1rem, 1.8vw, 1.25rem); font-weight: 600; overflow-wrap: anywhere; }
.contact-method:hover { color: var(--accent-dark); text-decoration: none; }
.contact-method:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 50rem) {
  .contact-compact { grid-template-columns: 1fr 1.15fr; gap: var(--space-xl); }
}
@media (max-width: 29.99rem) {
  .contact-method { gap: var(--space-xs); }
  .contact-method .ic-box { width: 2rem; height: 2rem; }
  .contact-method .ic { width: 1.2rem; height: 1.2rem; }
}


/* 7c. STRONY SEKCJI I SZCZEGÓŁOWE (drzewo stron) ============================ */
.lead { max-width: 60ch; font-size: var(--step-1); color: var(--ink-soft); }

/* lista podstron: tytuł i jedno zdanie pod spodem */
.list { margin-top: var(--space-l); border-top: 1px solid var(--line); }
.lead + .list { margin-top: var(--space-l); }
.list-item {
  display: block;
  padding: var(--space-s) var(--space-xs);
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background var(--speed), padding-left var(--speed) var(--ease), box-shadow var(--speed);
}
.list-item h3 { font-size: var(--step-1); }
.list-item p { margin-top: var(--space-3xs); color: var(--ink-soft); }
.list-item:hover,
.list-item:focus-visible {
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  padding-left: var(--space-m);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* strona kategorii / tematu: treść + panel boczny */
.detail { display: grid; gap: var(--space-l); }
.detail-main { max-width: 70ch; --stack-space: var(--space-m); }
.detail-main h2 { margin-top: var(--space-l); font-size: var(--step-2); }
.detail-main .list { max-width: none; margin-top: var(--space-s); }
.detail-img { width: 100%; max-height: 18rem; object-fit: cover; }
.detail-aside { display: none; }                      /* na telefonie spis treści jest zwijany pod wstępem (.toc-mobile) */
.aside-box {
  padding: var(--space-m);
  background: var(--surface);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-1);
  --stack-space: var(--space-xs);
}
.aside-box h3 { font-size: var(--step-1); margin-bottom: var(--space-xs); }
.aside-box p { color: var(--ink-soft); }
.aside-links li + li { margin-top: var(--space-2xs); }
@media (min-width: 64rem) {
  .detail { grid-template-columns: 2fr 1fr; align-items: start; gap: var(--space-xl); }
  .detail-main { max-width: none; }
  .detail-main > p, .detail-main > .lead { max-width: 70ch; }
  .detail-aside { display: grid; gap: var(--space-m); align-content: start; position: sticky; top: 6.5rem; }
  .toc-mobile { display: none; }
}


/* 7d. O NAS I DOKUMENTY ==================================================== */
.intro-wide { max-width: 44rem; }
.about-img { height: 100%; max-height: 24rem; min-height: 14rem; }

/* dokument (polityka prywatności): numerowane sekcje i spis treści */
.legal { counter-reset: sec; }
.legal h2 { counter-increment: sec; scroll-margin-top: 7rem; }   /* nagłówek nie chowa się pod belką */
.legal h2::before { content: counter(sec) ". "; color: var(--accent); }
.toc { counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li::before { content: counter(toc) ". "; color: var(--ink-soft); }


/* 7e. STRONY SEKCJI (Usługi, Rozwiązania, Technologie) ====================== */
/* wstęp strony: jedno zdanie opisu i przycisk (bez zdjęcia); używany też na stronach kategorii i tematów */
.page-intro { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-l); margin-bottom: var(--space-xl); padding-bottom: var(--space-l); border-bottom: 1px solid var(--line); }
.page-intro .lead { flex: 1 1 24rem; max-width: 46rem; margin: 0; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }

/* siatka kategorii na stronach sekcji: karty .svc z strony głównej, trzy w rzędzie na szerokim ekranie */
@media (min-width: 64rem) { .svc-grid.cols3 { grid-template-columns: repeat(3, 1fr); } }
.svc h2 { font-size: var(--step-1); }

/* home: grupy narzędzi z listą produktów jako chipy */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--space-l) var(--space-m); }
.tool-group h3 { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--step-0); }
.tool-group h3 a { color: var(--ink); }
.tool-group h3 .ic { width: 1.25rem; height: 1.25rem; color: var(--accent); }
.chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin: var(--space-xs) 0; }
.chips a {
  display: inline-block;
  padding: var(--space-3xs) var(--space-xs);
  font-size: 0.875rem;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  transition: background var(--speed), border-color var(--speed);
}
.chips a:hover { text-decoration: none; background: var(--accent-soft); border-color: var(--accent); }



/* 7f. BLOKI TREŚCI STRON KATEGORII I TEMATÓW ================================ */
/* strony bez bocznego spisu treści: sama kolumna tekstu */
.detail-aside--always { display: grid; gap: var(--space-m); }   /* strona prywatności: spis treści także na telefonie */
.toc-mobile { margin-bottom: var(--space-l); background: var(--surface); border: 1px solid var(--line); }
.toc-mobile summary { padding: var(--space-s) var(--space-m); font-weight: 700; cursor: pointer; }
.toc-mobile .toc { padding: 0 var(--space-m) var(--space-s); }
.feats-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
@media (min-width: 64rem) { .feats-3 { grid-template-columns: repeat(3, 1fr); } }
.block-chips { margin-top: var(--space-s); }
.chips-label { font-size: var(--step--1); color: var(--ink-soft); }
.detail.no-aside { display: block; }
.detail.no-aside .detail-main { max-width: 70ch; }

.block { scroll-margin-top: 7rem; }                       /* kotwica nie chowa się pod belką i paskiem */
.block + .block { margin-top: var(--space-xl); }
.section-blocks { max-width: 56rem; }
.block > h2 { margin-bottom: var(--space-s); font-size: var(--step-2); }
.block > h2::after {                                      /* żółty akcent pod tytułem bloku */
  content: "";
  display: block;
  width: var(--space-l);
  height: 0.15rem;
  margin-top: var(--space-2xs);
  background: var(--accent);
}
.block > p { max-width: 70ch; color: var(--ink-soft); }
.block > p + p { margin-top: var(--space-s); }
.block .steps { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.block .feats { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.block .list { margin-top: var(--space-s); }


/* DRUK: tylko treść strony, bez belki, paska, banera, stopki i panelu bocznego */
@media print {
  .skip-link, .header-outer, .page-header, .cta, .site-footer, .top-btn, .detail-aside, .page-intro .btn { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding: 0; }
  a { color: inherit; text-decoration: underline; }
  .block { break-inside: avoid; }
}


/* 8. STOPKA ================================================================ */
.site-footer {
  flex-shrink: 0;
  padding-top: var(--space-xl);
  color: var(--ink-muted);
  background: var(--dark);
  border-top: 1px solid #fff;                     /* wyraźne odgraniczenie od strony */
  box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, 0.12), 0 -2px 5px 0 rgba(0, 0, 0, 0.16);   /* głębia */
}
.site-footer h3 {
  margin-bottom: var(--space-s);
  font-size: var(--step-1);
  color: var(--ink-inverse);
}
.site-footer a { color: var(--ink-muted); }
.site-footer h3 a { color: inherit; }                /* nagłówki kolumn (linki do sekcji) zostają białe */
.site-footer a:hover,
.site-footer a:focus { color: #fff; text-decoration: none; }
.site-footer li + li,
.site-footer p + form { margin-top: var(--space-2xs); }

.footer-top { --grid-min: 10rem; --grid-gap: var(--space-l); }
.footer-wide { grid-column: 1 / -1; }                    /* tablet: pełna szerokość pod kolumnami; newsletter i social jedno pod drugim */
.footer-wide > * + * { margin-top: var(--space-l); }
@media (min-width: 64rem) { .footer-wide { grid-column: span 2; } }   /* komputer: dwie kolumny obok pozostałych */

.version { margin-top: var(--space-s); font-size: var(--step--1); color: rgba(255, 255, 255, 0.55); }

.subscribe {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-s);
}
.subscribe input[type=text] {
  flex: 1;
  color: var(--ink-muted);
  background: #1f1f1f;
  border-color: #444;
}
.subscribe input[type=submit] {
  padding: 0 var(--space-m);
  font-weight: 700;
  color: var(--ink);
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  transition: filter var(--speed) var(--ease);
}
.subscribe input[type=submit]:hover { filter: brightness(1.1); }

/* ikony społecznościowe: kolor marki w --c, wspólna reguła dla wszystkich */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-s);
}
.social li + li { margin-top: 0; }
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;                           /* kółka zostają okrągłe */
  background: #303030;
  opacity: 0.75;
  transition: background var(--speed), opacity var(--speed);
}
.social a:hover { opacity: 1; background: rgb(var(--c, 255, 255, 255)); }
.social svg { width: auto; height: 1.4rem; }
.social a:hover svg { filter: brightness(0) invert(1); }
.rss      { --c: 255, 102, 0; }
.twitter  { --c: 85, 172, 238; }
.facebook { --c: 59, 89, 152; }
.github   { --c: 0, 0, 0; }
.linkedin { --c: 0, 123, 181; }
.youtube  { --c: 255, 0, 0; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xs) var(--space-m);
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  padding-bottom: var(--space-s);
  /* linia tylko na szerokości treści (bez bocznych marginesów kontenera) */
  background: linear-gradient(#3a3a3a, #3a3a3a) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); }
.footer-bottom li + li { margin-top: 0; }
.footer-bottom .active { color: #fff; }

.opteris {                                        /* logo w stopce (proporcje 3,36 : 1) */
  display: inline-block;
  width: 4.2rem;
  height: 1.25rem;
  vertical-align: middle;
  background: url("../imgs/opteris.svg.php") center / contain no-repeat;
}
.gray-logo { filter: grayscale(100%); }
.opteris:hover { filter: none; }


/* 9. PRZYCISK "DO GÓRY" ==================================================== */
/* Domyślnie (fallback) skrypt dodaje klasę .sticky2; nowoczesne przeglądarki
   pokazują przycisk czystym CSS po przescrollowaniu 1/3 ekranu. */
.top-btn {
  position: fixed;
  right: 1%;
  bottom: -5%;
  z-index: 9999;
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  visibility: hidden;
  transition: all 0.3s ease;
}
.top-btn.sticky2 {
  visibility: visible;
  right: 3%;
  bottom: 3%;
  transform: rotate(1080deg);
}

@supports (animation-timeline: scroll()) {
  @keyframes topbtn-in {
    from { visibility: hidden;  opacity: 0; transform: rotate(0deg)   scale(0.2); }
    to   { visibility: visible; opacity: 1; transform: rotate(360deg) scale(1); }
  }
  .top-btn {
    visibility: visible;
    right: 3%;
    bottom: 3%;
    transition: none;
    animation: topbtn-in 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 33vh calc(33vh + 8rem);
  }
}
