/* ==========================================================
   Kolory jako „tokeny” (zmienne CSS).
   Jasny motyw jest domyślny (strona dla klientów), ciemny z przycisku ◐
   albo gdy system ma tryb ciemny i nikt nie wybrał inaczej.
   ========================================================== */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0f1726;
  --muted: #38455a;          /* ciemnoszary: kontrast ~10:1 na tle */
  --line: #d5dce6;
  --accent: #1d4ed8;         /* niebieski „portowy” z logo PortCyfrowy */
  --accent-soft: #e3ecfd;
  --on-accent: #ffffff;
  --header-bg: #0f2d6e;      /* granat nagłówka */
  --header-bg-2: #1d4596;    /* jaśniejszy koniec gradientu nagłówka (po prawej) */
  --term-bg: #0f1724;
  --term-text: #f1f1f5;
  --ok: #4ade80;
  --band: #dbe6fb;           /* jasnoniebieski pas sekcji naprzemiennych */
  --dot: #a6bff0;            /* kropki siatki w tle hero */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0f18;
  --surface: #121a26;
  --text: #f4f4f6;
  --muted: #c4c4cf;
  --line: #26324a;
  --accent: #8ab4ff;
  --accent-soft: #14233d;
  --on-accent: #0a0f18;
  --header-bg: #122a5c;
  --header-bg-2: #1a3a7c;
  --term-bg: #142033;
  --band: #101a2b;
  --dot: #2a3c5e;
  color-scheme: dark;
}
/* System w trybie ciemnym, a użytkownik nie kliknął „jasny” → też ciemny. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f18; --surface: #121a26; --text: #f4f4f6; --muted: #c4c4cf;
    --line: #26324a; --accent: #8ab4ff; --accent-soft: #14233d; --on-accent: #0a0f18;
    --header-bg: #122a5c; --header-bg-2: #1a3a7c; --term-bg: #142033; --band: #101a2b; --dot: #2a3c5e;
    color-scheme: dark;
  }
}

/* ==========================================================
   Podstawy
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; } /* kotwice nie chowają się pod paskiem */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.mono {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  letter-spacing: 0.04em;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--surface); padding: 10px 14px; }

/* ==========================================================
   Przyciski
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border-radius: 12px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .15s, background-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--text); color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.1rem; }

/* Sama ikona, bez ramki i tła. Pole kliknięcia zostaje 48×48 px (wygodne trafienie palcem),
   a obwódka z :focus-visible nadal pokazuje fokus przy obsłudze klawiaturą. */
.icon-btn {
  width: 48px; height: 48px; padding: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: none; color: var(--text);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  transition: color .2s, transform .3s;
}
.icon-btn:hover { color: var(--accent); }

/* Przełącznik motywu: w jasnym motywie księżyc („przełącz na ciemny”), w ciemnym słońce.
   Motyw ciemny jest wtedy, gdy wybrano go przyciskiem (data-theme="dark")
   albo gdy system jest ciemny, a przyciskiem nie wybrano jasnego. */
#theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s; }
#theme-toggle .ti-sun { display: none; }
[data-theme="dark"] #theme-toggle .ti-sun { display: block; }
[data-theme="dark"] #theme-toggle .ti-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .ti-sun { display: block; }
  :root:not([data-theme="light"]) #theme-toggle .ti-moon { display: none; }
}
/* Po najechaniu słońce obraca promienie, a księżyc lekko się przechyla. */
#theme-toggle:hover .ti-sun { transform: rotate(45deg); }
#theme-toggle:hover .ti-moon { transform: rotate(-20deg); }

/* ==========================================================
   Pasek górny
   ========================================================== */
/* Na samej górze strony pasek jest przezroczysty i zlewa się z tłem (zwykłe kolory strony).
   Po przewinięciu script.js dodaje klasę .scrolled i pasek płynnie robi się granatowy z falą.
   Granat także przy otwartym menu ☰ i bez JavaScriptu (wtedy nie ma kto przełączyć klasy). */
.site-header {
  position: sticky; top: 0; z-index: 10;
  --hdr-h: clamp(16px, 2vw, 28px);   /* wysokość fali pod paskiem */
  /* Granat z delikatnym przejściem w jaśniejszy niebieski po prawej. Ten sam gradient ma fala,
     a że oba mają pełną szerokość okna, kolory na styku pasują co do piksela. */
  --hdr-grad: linear-gradient(90deg, var(--header-bg) 0%, var(--header-bg) 35%, var(--header-bg-2) 100%);
  color: var(--text);
  transition: filter .3s;
}
/* Tło paska to osobna warstwa (::before), bo gradientu nie da się płynnie „wtopić” przez transition
   na background – za to przezroczystość (opacity) przechodzi płynnie. z-index: -1 kładzie ją pod treścią. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--hdr-grad);
  opacity: 0; transition: opacity .3s;
}
/* Stan „stały kolor”: nadpisujemy zmienne kolorów tylko wewnątrz nagłówka,
   więc menu, logo, ◐ i przyciski same biorą jasne wartości. */
.site-header.scrolled, .site-header.menu-open, html:not(.js) .site-header {
  /* Miękki cień pod paskiem razem z falą – drop-shadow idzie po kształcie, a nie po prostokącie. */
  filter: drop-shadow(0 8px 14px rgba(6, 18, 48, .22));
  --text: #ffffff;
  --muted: #d3defa;                  /* menu: jasnoniebieskawy, kontrast ~9.6:1 na granacie */
  --accent: #8ab4ff;                 /* „Cyfrowy”, klamry logo, bieżąca strona, fokus: ~6.2:1 */
  --accent-soft: rgba(255, 255, 255, .14);   /* tło najechanej / bieżącej pozycji menu */
}
/* Zamienione kolory przechodzą płynnie razem z tłem. */
.site-header .brand, .site-header .brand-logo, .site-header .brand-logo * { transition: color .3s, stroke .3s; }
.site-header .brand b { transition: color .3s; }
/* Zamiast prostej linii nagłówek kończy się falą – ten sam kształt co dół sekcji (--wave-bottom):
   przedłużenie tła nagłówka o --hdr-h, przycięte maską do kształtu fali. Na górze strony fala jest ukryta. */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--hdr-h); pointer-events: none;
  background: var(--hdr-grad);
  -webkit-mask: var(--wave-bottom) 0 0 / 100% 100% no-repeat;
          mask: var(--wave-bottom) 0 0 / 100% 100% no-repeat;
  opacity: 0; transition: opacity .3s;
}
.site-header.scrolled::before, .site-header.menu-open::before, html:not(.js) .site-header::before,
.site-header.scrolled::after, .site-header.menu-open::after, html:not(.js) .site-header::after { opacity: 1; }
/* Kotwica w logo lekko się kołysze po najechaniu. */
.brand-logo { transition: transform .3s; transform-origin: 50% 25%; }
.brand:hover .brand-logo { transform: rotate(-8deg); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.35rem; }
.brand b { color: var(--accent); }
/* Logo jak napis obok: kotwica („Port”) w kolorze tekstu, klamry („Cyfrowy”) w akcencie. */
.brand-logo { flex: none; fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo .bl-k { stroke: var(--accent); }
.main-nav { display: flex; gap: 6px; margin-inline: auto; }
.main-nav a {
  white-space: nowrap;
  padding: 8px 12px; border-radius: 10px;
  text-decoration: none; font-weight: 600; color: var(--muted);
  transition: color .15s;
  position: relative;
}
/* Bez tła: zakładki zmieniają tylko kolor tekstu. Najechana – biała. */
.main-nav a:hover { color: var(--text); }
/* Podkreślenie, które „rozjeżdża się” od środka: scaleX(0) → scaleX(1).
   Bieżąca strona ma je na stałe, więc widać ją nie tylko po kolorze. */
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transition: transform .2s;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Bieżąca podstrona: aria-current="page" (czytnik ekranu mówi „bieżąca strona”), CSS barwi ją na niebiesko. */
.main-nav a[aria-current="page"] { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; } /* do prawej, też bez menu */

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding: clamp(48px, 9vw, 112px) 0; position: relative; overflow: hidden; isolation: isolate; }
/* Siatka kropek: jedna kropka (radial-gradient) powtarzana co 26 px.
   Maska z gradientem eliptycznym chowa kropki ku krawędziom, więc wzór nie konkuruje z tekstem. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(var(--dot) 1.9px, transparent 2.1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 20px; padding: 6px 12px;
  border-radius: 999px; background: var(--surface); color: var(--text);
  border: 2px solid var(--accent);   /* obwódka daje kontrast 5:1+ na każdym tle, także w pasie */
  font-size: 0.9rem; text-transform: uppercase;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.03em;
}
h1 em { font-style: normal; color: var(--accent); }
.lead { margin: 0 0 32px; font-size: 1.25rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 0.95rem; }
.trust li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Karta „terminal” – zawsze ciemna, jak prawdziwa konsola. */
.hero-card {
  background: var(--term-bg); color: var(--term-text);
  border-radius: 18px; padding: 0 0 20px;
  box-shadow: 0 24px 60px -20px rgba(15, 45, 110, 0.45);
  transform: rotate(1.5deg);
}
.card-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #27344b; }
.card-bar i { width: 12px; height: 12px; border-radius: 50%; background: #34425a; }
.card-bar i:first-child { background: #ff5f57; }
.card-bar span { margin-left: 8px; font-size: 0.85rem; color: #a9a9b8; }
.checklist { list-style: none; margin: 0; padding: 16px 22px 0; font-size: 1.05rem; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checklist .ok { color: var(--ok); font-weight: 700; }
.checklist .run { color: #8ab4ff; font-weight: 700; }
.checklist .tag {
  margin-left: auto; padding: 2px 10px; border-radius: 999px;
  background: #1c2a42; color: #cfe0ff; font-size: 0.85rem;
}
.cursor { display: inline-block; width: 10px; height: 1.2em; margin-left: 2px; background: #8ab4ff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }


/* ==========================================================
   Ilustracja portu w hero
   Każdy kształt ma klasę, a kolor ze zmiennej motywu (fill: var(--…)).
   ========================================================== */
/* Teraz to tło: leży pod tekstem (z-index -1 w izolowanym .hero), przygaszone opacity
   i wygaszone maską ku prawej, żeby nie wchodziło pod kartę terminala. */
.hero-bg {
  position: absolute; z-index: -1; pointer-events: none;
  left: -2%; top: 12px; width: min(980px, 72vw); height: auto;   /* od góry: wierzchołek dźwigu zawsze widać, a dół (woda) i tak zanika */
  opacity: .13;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 85%);
          mask-image: linear-gradient(to right, #000 45%, transparent 85%);
}
.il-sun { fill: var(--accent-soft); }
.il-water-back { fill: var(--band); }
.il-water { fill: var(--accent); fill-opacity: .24; }
.il-foam { fill: none; stroke: var(--accent); stroke-opacity: .6; stroke-width: 3; stroke-linecap: round; }
.il-quay { fill: var(--line); }
.il-crane rect, .il-trolley { fill: var(--text); }
.il-brace { fill: none; stroke: var(--text); stroke-width: 4; stroke-linejoin: round; }
.il-cable { fill: none; stroke: var(--text); stroke-width: 2.5; }
.il-hull { fill: var(--text); }
.il-deck { stroke: var(--accent); stroke-width: 4; }
.il-box rect { fill: #1d4ed8; }            /* stałe kolory: białe ikony muszą być czytelne w obu motywach */
.il-box-dark rect { fill: #1e3a8a; }
.il-rib { stroke: #ffffff; stroke-opacity: .28; stroke-width: 2; }
.il-ico { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Ruch: ładunek kołysze się na linie, statek buja na wodzie. Bardzo wolno i o kilka pikseli. */
.il-load { transform-box: view-box; transform-origin: 262px 92px; animation: sway 5s ease-in-out infinite; }
.il-ship { animation: bob 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ==========================================================
   Sekcje (na razie zaślepki) i stopka
   ========================================================== */
.section { padding: 72px 0; }

/* Subtelne linie fal w tle zwykłych sekcji (nie w pasach).
   Ten sam trik co przy falach: kształt z maski SVG, kolor ze zmiennej --dot.
   Na przemian: prawy górny róg, a po pasie – lewy (odbicie lustrzane). */
.section:not(.section-alt) { position: relative; isolation: isolate; }
.section:not(.section-alt)::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 24px; right: 0; width: min(620px, 55%); height: 190px;
  background: var(--dot); opacity: .55;
  -webkit-mask: var(--wave-lines) right top / 100% 100% no-repeat;
          mask: var(--wave-lines) right top / 100% 100% no-repeat;
}
.section-alt + .section::before { right: auto; left: 0; transform: scaleX(-1); }

/* ---------- Fale ----------
   Kształt fali to SVG w maskach CSS (mask-image), a kolor bierze się z background-color.
   Dzięki temu ta sama fala działa w jasnym i ciemnym motywie: zmienia się tylko zmienna --band.
   preserveAspectRatio='none' rozciąga falę na całą szerokość ekranu. */
:root {
  --wave-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C180 56 360 56 540 34 S900 4 1080 22 S1320 46 1440 26 V56 H0 Z'/%3E%3C/svg%3E");
  --wave-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H1440 V22 C1260 0 1080 4 900 26 S540 56 360 40 S120 20 0 32 Z'/%3E%3C/svg%3E");
  --wave-h: clamp(28px, 4vw, 56px);
  --wave-lines: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 190' preserveAspectRatio='none' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 32.0 L25 31.8 L30 31.5 L35 31.1 L40 30.7 L45 30.3 L50 29.9 L55 29.5 L60 29.1 L65 28.8 L70 28.5 L75 28.3 L80 28.3 L85 28.3 L90 28.5 L95 28.8 L100 29.2 L105 29.8 L110 30.4 L115 31.2 L120 32.1 L125 33.1 L130 34.1 L135 35.2 L140 36.2 L145 37.3 L150 38.4 L155 39.3 L160 40.2 L165 41.0 L170 41.6 L175 42.1 L180 42.4 L185 42.5 L190 42.4 L195 42.1 L200 41.7 L205 41.0 L210 40.1 L215 39.0 L220 37.7 L225 36.4 L230 34.9 L235 33.2 L240 31.6 L245 29.9 L250 28.2 L255 26.5 L260 24.9 L265 23.5 L270 22.1 L275 20.9 L280 19.9 L285 19.1 L290 18.5 L295 18.2 L300 18.1 L305 18.2 L310 18.7 L315 19.3 L320 20.2 L325 21.3 L330 22.6 L335 24.0 L340 25.6 L345 27.3 L350 29.1 L355 30.9 L360 32.7 L365 34.4 L370 36.2 L375 37.8 L380 39.2 L385 40.6 L390 41.7 L395 42.7 L400 43.4 L405 43.9 L410 44.2 L415 44.3 L420 44.1 L425 43.7 L430 43.1 L435 42.4 L440 41.5 L445 40.4 L450 39.2 L455 37.9 L460 36.6 L465 35.3 L470 33.9 L475 32.6 L480 31.4 L485 30.2 L490 29.2 L495 28.2 L500 27.4 L505 26.8 L510 26.2 L515 25.9 L520 25.7 L525 25.7 L530 25.8 L535 26.0 L540 26.3 L545 26.8 L550 27.3 L555 27.8 L560 28.4 L565 29.0 L570 29.6 L575 30.2 L580 30.7 L585 31.2 L590 31.6 L595 31.9 L600 32.1 L605 32.2 L610 32.2 L615 32.2 L620 32.0'/%3E%3Cpath d='M90 74.0 L95 73.8 L100 73.6 L105 73.5 L110 73.6 L115 73.8 L120 74.0 L125 74.4 L130 74.9 L135 75.5 L140 76.1 L145 76.8 L150 77.5 L155 78.2 L160 78.9 L165 79.6 L170 80.2 L175 80.7 L180 81.1 L185 81.4 L190 81.5 L195 81.5 L200 81.2 L205 80.8 L210 80.3 L215 79.5 L220 78.6 L225 77.6 L230 76.4 L235 75.0 L240 73.6 L245 72.2 L250 70.7 L255 69.2 L260 67.7 L265 66.3 L270 65.0 L275 63.8 L280 62.8 L285 62.0 L290 61.3 L295 60.9 L300 60.7 L305 60.8 L310 61.1 L315 61.7 L320 62.4 L325 63.4 L330 64.7 L335 66.0 L340 67.6 L345 69.3 L350 71.0 L355 72.8 L360 74.7 L365 76.5 L370 78.3 L375 80.0 L380 81.5 L385 82.9 L390 84.2 L395 85.2 L400 86.0 L405 86.6 L410 87.0 L415 87.1 L420 87.0 L425 86.6 L430 86.0 L435 85.2 L440 84.2 L445 83.1 L450 81.8 L455 80.5 L460 79.1 L465 77.6 L470 76.1 L475 74.7 L480 73.3 L485 72.0 L490 70.9 L495 69.8 L500 68.9 L505 68.2 L510 67.6 L515 67.2 L520 67.0 L525 66.9 L530 67.0 L535 67.3 L540 67.6 L545 68.1 L550 68.7 L555 69.3 L560 70.0 L565 70.7 L570 71.3 L575 72.0 L580 72.6 L585 73.1 L590 73.6 L595 73.9 L600 74.1 L605 74.3 L610 74.3 L615 74.2 L620 74.0'/%3E%3Cpath d='M170 116.0 L175 116.5 L180 117.0 L185 117.4 L190 117.9 L195 118.2 L200 118.5 L205 118.6 L210 118.6 L215 118.5 L220 118.3 L225 117.9 L230 117.3 L235 116.6 L240 115.8 L245 114.9 L250 113.8 L255 112.8 L260 111.6 L265 110.5 L270 109.4 L275 108.4 L280 107.4 L285 106.6 L290 105.9 L295 105.3 L300 105.0 L305 104.8 L310 104.9 L315 105.2 L320 105.8 L325 106.5 L330 107.5 L335 108.7 L340 110.0 L345 111.5 L350 113.2 L355 114.9 L360 116.7 L365 118.5 L370 120.2 L375 122.0 L380 123.6 L385 125.1 L390 126.4 L395 127.5 L400 128.5 L405 129.2 L410 129.6 L415 129.8 L420 129.8 L425 129.5 L430 128.9 L435 128.1 L440 127.1 L445 125.9 L450 124.6 L455 123.1 L460 121.6 L465 120.0 L470 118.4 L475 116.8 L480 115.2 L485 113.8 L490 112.4 L495 111.2 L500 110.2 L505 109.3 L510 108.7 L515 108.2 L520 107.9 L525 107.8 L530 107.9 L535 108.2 L540 108.6 L545 109.1 L550 109.8 L555 110.5 L560 111.3 L565 112.1 L570 112.9 L575 113.6 L580 114.3 L585 115.0 L590 115.5 L595 115.9 L600 116.2 L605 116.3 L610 116.3 L615 116.2 L620 116.0'/%3E%3Cpath d='M260 158.0 L265 157.6 L270 157.1 L275 156.5 L280 155.8 L285 155.2 L290 154.5 L295 153.8 L300 153.2 L305 152.7 L310 152.4 L315 152.1 L320 152.1 L325 152.2 L330 152.6 L335 153.1 L340 153.9 L345 154.8 L350 155.9 L355 157.1 L360 158.5 L365 160.0 L370 161.5 L375 163.1 L380 164.6 L385 166.1 L390 167.4 L395 168.7 L400 169.7 L405 170.6 L410 171.2 L415 171.6 L420 171.8 L425 171.6 L430 171.2 L435 170.6 L440 169.7 L445 168.6 L450 167.2 L455 165.8 L460 164.1 L465 162.4 L470 160.7 L475 158.9 L480 157.1 L485 155.5 L490 153.9 L495 152.5 L500 151.2 L505 150.2 L510 149.3 L515 148.7 L520 148.4 L525 148.2 L530 148.3 L535 148.6 L540 149.0 L545 149.7 L550 150.4 L555 151.3 L560 152.2 L565 153.2 L570 154.2 L575 155.1 L580 155.9 L585 156.7 L590 157.3 L595 157.8 L600 158.2 L605 158.4 L610 158.4 L615 158.3 L620 158.0'/%3E%3C/svg%3E");
}
.section-alt, .site-footer { position: relative; }
.section-alt::before, .section-alt::after, .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; height: var(--wave-h);
  pointer-events: none;
  -webkit-mask: var(--wave-top) center / 100% 100% no-repeat;
          mask: var(--wave-top) center / 100% 100% no-repeat;
}
/* Fala wchodzi w dolny margines poprzedniej sekcji (−1px, żeby nie było szczeliny). */
.section-alt::before { bottom: calc(100% - 1px); background: var(--band); }
.section-alt::after {
  top: calc(100% - 1px); background: var(--band);
  -webkit-mask-image: var(--wave-bottom); mask-image: var(--wave-bottom);
}
.site-footer::before { bottom: calc(100% - 1px); background: var(--term-bg); }
/* Po fali pod pasem następna sekcja potrzebuje trochę więcej oddechu. */
.section-alt + .section { padding-top: calc(72px + var(--wave-h) / 2); }
h2 { margin: 0 0 12px; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.section-lead { margin: 0 0 40px; font-size: 1.2rem; color: var(--muted); max-width: 40em; }

/* ==========================================================
   Usługi: siatka kart
   auto-fit + minmax: tyle kolumn, ile się zmieści (4 → 2 → 1), bez media queries.
   ========================================================== */
/* Subgrid: każda karta ma 4 wiersze (ikona, tytuł, opis, „Co dokładnie?”) i dzieli je
   z sąsiadkami w rzędzie. Opisy mają więc wspólną wysokość, przyciski stoją w jednej linii,
   a rozwinięcie listy powiększa tylko ostatni wiersz – w innych kartach nic nie skacze. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0;
  align-content: start;
  background: var(--surface);
  border: 2px solid var(--line); border-radius: 18px;
  padding: 28px 24px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon {
  width: 52px; height: 52px; padding: 11px; margin-bottom: 16px;
  border-radius: 14px; background: var(--accent-soft);
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin: 0 0 8px; font-size: 1.35rem; }
.card > p { margin: 0 0 16px; color: var(--muted); }

/* „Zobacz więcej”: link na podstronę. Jego ::after rozciąga się na całą kartę
   („stretched link”), więc kliknąć można w dowolne miejsce karty, a w HTML nadal jest jeden link. */
.card { position: relative; }
.card-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; color: var(--accent); text-decoration: none;
}
.card-link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link::after { content: "→"; transition: transform .15s; }
.card:hover .card-link::after { transform: translateX(4px); }
.card:focus-within { border-color: var(--accent); }
.cards-note { margin: 32px 0 0; font-size: 1.15rem; }
.cards-note a { color: var(--accent); font-weight: 700; }
.section .eyebrow { margin-bottom: 12px; }

/* Krótka niebieska kreska pod tytułem sekcji. */
.section .wrap > h2:not(.other-h)::after, .eyebrow + h2::after {
  content: ""; display: block; width: 56px; height: 5px; margin-top: 14px;
  border-radius: 3px; background: var(--accent);
}

/* ==========================================================
   Jak pracujemy: kroki z numerami i linią łączącą
   ========================================================== */
.section-alt { background: var(--band); }
.steps {
  counter-reset: step;               /* licznik CSS zaczyna od 0 */
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  position: relative;
}
/* Pozioma linia za kółkami (na desktopie). */
.steps::before {
  /* Kończy się na środku ostatniego kółka: szerokość kolumny = (100% − 4 przerwy) / 5. */
  content: ""; position: absolute; left: 28px; right: calc((100% - 96px) / 5 - 28px); top: 27px;
  height: 3px; background: var(--line);
}
.step { counter-increment: step; position: relative; }
.step::before {
  content: counter(step, decimal-leading-zero);   /* 01, 02, 03… */
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  border: 6px solid var(--surface);   /* „wycina” linię wokół kółka */
  box-sizing: content-box; margin-left: -6px; margin-top: -6px;
  font: 700 1.1rem ui-monospace, Consolas, monospace;
  position: relative;
}
/* ==========================================================
   Realizacje
   ========================================================== */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  padding: 24px;
}
.project-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.85rem; text-transform: uppercase; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .2); }
.status-wip::before { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); } /* bursztynowa: jeszcze nie online */
.project h3 { margin: 14px 0 16px; font-size: 1.6rem; }
/* dl/dt/dd: lista „etykieta → opis”, pasuje do Problem / Rozwiązanie / Efekt. */
.pse { margin: 0 0 20px; display: grid; gap: 4px; }
.pse dt { font-weight: 700; color: var(--accent); margin-top: 8px; }
.pse dd { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 0; list-style: none; font-size: 0.85rem; }
.tags li { padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text); }

/* Karta-zaproszenie: przerywana ramka, cała klikalna. */
.project-cta {
  border-style: dashed; text-decoration: none; justify-content: center; text-align: center; align-items: center;
  background: transparent; transition: border-color .15s, background-color .15s;
}
.project-cta:hover { border-color: var(--accent); background: var(--accent-soft); }
.project-cta .plus {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 2.2rem; font-weight: 300;
}
.project-cta h3 { margin: 18px 0 8px; font-size: 1.4rem; }
.project-cta p { margin: 0 0 16px; color: var(--muted); }
.cta-link { font-weight: 700; color: var(--accent); }

/* ==========================================================
   Zespół
   ========================================================== */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.person {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  background: var(--bg); border: 2px solid var(--line); border-radius: 18px; padding: 28px;
}
.avatar {
  display: grid; place-items: center;
  width: 88px; height: 88px; border-radius: 24px;
  background: var(--accent); color: var(--on-accent);
  font: 700 1.8rem ui-monospace, Consolas, monospace;
  transform: rotate(-4deg);          /* lekko przekrzywiona „naklejka”, jak logo w portfolio */
}
.avatar-alt { background: var(--text); color: var(--bg); transform: rotate(4deg); }
.person h3 { margin: 0 0 4px; font-size: 1.45rem; }
.person .role { margin: 0 0 12px; font-size: 0.9rem; text-transform: uppercase; color: var(--accent); }
.person p { margin: 0 0 16px; color: var(--muted); }
/* Tekst karty jako kolumna: tagi z margin-top:auto lądują na dole, więc w obu kartach są w jednej linii. */
.person > div:not(.avatar) { display: flex; flex-direction: column; height: 100%; } /* awatar to też <div>, więc go wykluczamy */
.person .tags { margin: auto 0 0; }

/* ==========================================================
   Kontakt i formularz
   ========================================================== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; margin: 0; font-size: 1.15rem; }
.contact-list dt { color: var(--muted); text-transform: uppercase; font-size: 0.85rem; padding-top: 4px; }
.contact-list dd { margin: 0; font-weight: 600; }
.contact-list a { color: var(--accent); text-underline-offset: 4px; }

.contact-form {
  display: grid; gap: 18px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 28px;
}
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-weight: 700; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font: inherit;                          /* pola formularza domyślnie mają małą czcionkę systemową */
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.consent { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 1rem; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.contact-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.1rem; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 600; min-height: 1.6em; }
.form-status[data-kind="ok"] { color: #15803d; }
.form-status[data-kind="error"] { color: #b91c1c; }
:root[data-theme="dark"] .form-status[data-kind="ok"] { color: #4ade80; }
:root[data-theme="dark"] .form-status[data-kind="error"] { color: #fca5a5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status[data-kind="ok"] { color: #4ade80; }
  :root:not([data-theme="light"]) .form-status[data-kind="error"] { color: #fca5a5; }
}

.step h3 { margin: 0 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }

/* Link do polityki w zgodzie pod formularzem. */
.consent a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* ==========================================================
   Polityka prywatności: wąska kolumna tekstu (ok. 70 znaków w linii czyta się najlepiej)
   ========================================================== */
.legal { max-width: 760px; }

/* Strona 404: krótki komunikat w stylu terminala z hero i dwa wyjścia. */
.notfound { max-width: 760px; min-height: 52vh; }
.notfound h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 20px; }
.nf-term {
  display: inline-block; margin: 0 0 24px; padding: 14px 18px; border-radius: 12px;
  background: var(--term-bg); color: #e6edf7; font-size: 1rem; line-height: 1.7;
}
.nf-term span { color: #ff9b8a; }   /* „błąd” jak w terminalu – jasna czerwień, kontrast ok. 7:1 na tle */
.notfound .section-lead { margin-bottom: 28px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.legal-date { color: var(--muted); margin: 0 0 40px; }
.legal h2 { font-size: 1.45rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.legal strong { color: var(--text); }
/* ==========================================================
   Podstrony usług
   ========================================================== */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 0.95rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 10px; color: var(--accent); font-weight: 700; }
.crumbs a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--text); }
/* Nagłówek podstrony: tekst po lewej, grafika usługi po prawej (jak port na stronie głównej). */
.svc-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.svc-art { width: 100%; max-width: 440px; height: auto; justify-self: center; overflow: visible; }

/* Grafiki usług: każda klasa sa-* bierze kolor ze zmiennej motywu. */
.sa-blob { fill: var(--accent-soft); }
.sa-panel { fill: var(--surface); stroke: var(--text); stroke-width: 3; stroke-linejoin: round; }
.sa-stroke { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sa-accent { fill: var(--accent); }
.sa-soft { fill: var(--accent-soft); }
.sa-soft-stroke { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.sa-muted, .sa-dot { fill: var(--muted); opacity: .3; }
.sa-badge { fill: #1d4ed8; }                 /* stały granat: biała ikona czytelna w obu motywach */
.sa-ico { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sa-ring-bg { fill: none; stroke: var(--surface); stroke-width: 10; }
.sa-ring { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100; transform: rotate(-90deg); transform-origin: 166px 150px; animation: sa-ring 4s ease-in-out infinite; }
.sa-check { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.sa-led { fill: var(--accent); animation: sa-blink 2s ease-in-out var(--d, 0s) infinite; }
.sa-typing { fill: #fff; animation: sa-blink 1.2s ease-in-out var(--d, 0s) infinite; }
.sa-wave { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; animation: sa-blink 2.4s ease-in-out var(--d, 0s) infinite; }
/* Linia „przepływu danych”: kropki z dasharray, przesuwane przez dashoffset. */
.sa-link { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 12; animation: sa-flow 1.4s linear infinite; }

/* Ruch: wolny i o kilka pikseli, jak statek na stronie głównej. */
.sa-float { animation: sa-float 6s ease-in-out infinite; }
.sa-late { animation-delay: -3s; }
.sa-plane { animation: sa-fly 5s ease-in-out infinite; }
@keyframes sa-float { 50% { transform: translateY(-6px); } }
@keyframes sa-fly { 50% { transform: translate(6px, -8px); } }
@keyframes sa-flow { to { stroke-dashoffset: -26; } }
@keyframes sa-blink { 50% { opacity: .35; } }
@keyframes sa-ring { 0% { stroke-dashoffset: 100; } 45%, 100% { stroke-dashoffset: 0; } }
.svc-hero .lead { max-width: 40em; }

/* „Co obejmuje”: kafelki z ✓ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 32px 0 0; padding: 0; list-style: none; }
.feature { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 24px; }
.feature h3 { display: flex; gap: 10px; margin: 0 0 8px; font-size: 1.2rem; line-height: 1.35; }
.feature h3::before { content: "✓"; color: var(--accent); font-weight: 800; }
.feature p { margin: 0; color: var(--muted); }

/* „Przykładowe projekty” (podstrona WWW): karta = ramka przeglądarki z makietą strony + podpis.
   .demo-screen trzyma proporcje ekranu 16:10 (aspect-ratio), a makieta w środku skaluje się w cqw (blok demo-art niżej).
   Siatka: 3 karty w rzędzie na komputerze (3×2), 2 na tablecie, 1 na telefonie.
   Karta ma min. 320 px, więc przy pełnej szerokości (1180 px) mieszczą się 3, a 4 już nie.
   min(100%, 320px) nie pozwala karcie wyjść poza bardzo wąski ekran. */
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 36px 28px; margin: 0; padding: 0; list-style: none; }
/* Kafelek bez własnej ramki: kształt daje samo „okno przeglądarki”, nazwa i przycisk stoją pod nim. */
.demo-frame { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 14px 30px -18px rgba(15, 45, 110, .35); }
.demo-bar { display: flex; gap: 6px; align-items: center; height: 28px; padding: 0 12px; border-bottom: 2px solid var(--line); }
.demo-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo-screen { aspect-ratio: 16 / 10; overflow: hidden; }
.demo h3 { margin: 14px 4px 0; font-size: 1.3rem; }

/* Kafelek z pełną stroną demo: miniatura to ta sama strona w <iframe> 1280×800, pomniejszona.
   transform: scale() zmniejsza obraz, ale nie miejsce w układzie – dlatego .demo-screen ma overflow: hidden.
   --k (skalę) ustawia script.js; bez JS zostaje 0.27, czyli mniej więcej szerokość kafelka. */
.demo-live { width: 1280px; height: 800px; border: 0; background: #fff; transform: scale(var(--k, .27)); transform-origin: 0 0; pointer-events: none; }
/* Pod miniaturą: nazwa po lewej, przycisk „Podgląd” po prawej. Klikalny i podświetlany jest
   tylko przycisk – sam kafelek to zwykła ilustracja. */
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 4px 0; }
.demo-head h3 { margin: 0; }
.demo > h3 { min-height: 44px; display: flex; align-items: center; }   /* nazwy w jednej linii z kafelkami z przyciskiem */
.demo-open {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem; font-weight: 700; text-decoration: none;
  transition: background .15s, color .15s;
}
.demo-open::after { content: "\00a0→"; transition: transform .15s; }
.demo-open:hover, .demo-open:focus-visible { background: var(--accent); color: var(--on-accent); }
.demo-open:hover::after, .demo-open:focus-visible::after { transform: translateX(3px); }
.demo-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Okno podglądu: natywny <dialog> otwierany przez showModal(), w stylu karty „terminal” z hero
   (ciemne tło, trzy kropki, ścieżka w monospace, migający kursor). ::backdrop to przyciemnienie pod oknem.
   body:has(dialog[open]) blokuje przewijanie strony pod spodem, póki okno jest otwarte. */
.demo-dialog {
  width: min(1440px, 100vw - 32px); height: calc(100vh - 32px); height: calc(100dvh - 32px);
  max-width: none; max-height: none; padding: 0; border: 1px solid #27344b; border-radius: 18px; overflow: hidden;
  background: var(--term-bg); color: var(--term-text);
  box-shadow: 0 24px 60px -20px rgba(15, 45, 110, 0.45);
}
.demo-dialog[open] { display: flex; flex-direction: column; }
.demo-dialog::backdrop { background: rgb(5 10 20 / .72); }
body:has(.demo-dialog[open]) { overflow: hidden; }
.dd-bar { display: flex; align-items: center; gap: 12px 16px; padding: 12px 14px 12px 20px; }
.dd-dots { display: flex; gap: 8px; }
.dd-dots i { width: 12px; height: 12px; border-radius: 50%; background: #34425a; }
.dd-dots i:first-child { background: #ff5f57; }
.dd-title { margin: 0 auto 0 4px; font-size: 1.05rem; font-weight: 400; color: var(--term-text); }
.dd-title::after { display: none; }              /* bez niebieskiej kreski spod nagłówków sekcji */
.dd-path { color: #a9a9b8; }
.dd-name { color: #8ab4ff; font-weight: 700; }
.dd-view { display: flex; gap: 6px; }
/* Przyciski jak plakietki „online / v1.0” z karty terminala; wybrany świeci na niebiesko. */
.dd-view button, .dd-close {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: #1c2a42; color: #cfe0ff; font: 700 0.95rem ui-monospace, Consolas, monospace; cursor: pointer;
}
.dd-view button[aria-pressed="true"] { background: #8ab4ff; color: #0a0f18; }
.dd-view button:hover { outline: 2px solid #8ab4ff; outline-offset: -2px; }
.dd-close:hover { background: #ff5f57; color: #fff; }
/* Strona demo siedzi w „ekranie” terminala z zaokrąglonymi rogami.
   Rogów NIE robimy przycinaniem <iframe> (border-radius / clip-path): przewijana strona w środku
   ma w Chrome własną warstwę (compositing) i przycięcie ją omija – w rogu prześwituje kawałek strony.
   Zamiast tego .dd-device::after to nakładka NAD ramką: zaokrąglony prostokąt z grubym cieniem
   (box-shadow ze „spread”), który zamalowuje ostre rogi kolorem tła. pointer-events: none
   przepuszcza kliknięcia i przewijanie do strony pod spodem. */
.dd-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 0 14px 14px; }
.dd-device { position: relative; width: 100%; height: 100%; overflow: hidden; }
.dd-device::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border: 1px solid #27344b; border-radius: 10px; box-shadow: 0 0 0 12px var(--term-bg);
}
.dd-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
/* Widok „Telefon”: ta sama strona w telefonie 390 px na środku okna; nakładka w kolorze obudowy. */
.demo-dialog[data-view="mobile"] .dd-device {
  width: 390px; max-width: 100%; padding: 10px; border-radius: 32px; background: #34425a;
}
.demo-dialog[data-view="mobile"] .dd-device::after {
  inset: 10px; border: 0; border-radius: 22px; box-shadow: 0 0 0 12px #34425a;
}
@media (max-width: 700px) {
  .demo-dialog { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .dd-bar { flex-wrap: wrap; padding: 10px 10px 10px 16px; }
  .dd-title { flex: 1; font-size: .95rem; }
  .dd-path { display: none; }
  .dd-view { order: 3; width: 100%; }
  .dd-stage { padding: 0; }
  .dd-device, .demo-dialog[data-view="mobile"] .dd-device { width: 100%; padding: 0; border-radius: 0; }
  .dd-device::after { display: none; }               /* pełny ekran telefonu – rogów nie ma */
}
/* demo-art:start – wygenerowane przez gen_services.py z demo_art.py, nie edytuj ręcznie */
.demo-frame { container-type: inline-size; }   /* kontener dla jednostek cqw w makietach */
.demo-screen { position: relative; }
.dm { position: absolute; inset: 0; overflow: hidden; line-height: 1.2; text-align: left; font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
.dm p { margin: 0; }
.dm i { display: block; }

/* 1. Minimalizm */
.dm-minimal { background: #fafaf8; color: #111; }
.dm-minimal .dm-nav { display: flex; justify-content: space-between; align-items: baseline; padding: 3.64cqw 4.85cqw; font-size: 3.94cqw; font-weight: 800; }
.dm-minimal .dm-nav span { font-size: 3.33cqw; font-weight: 400; color: #666; word-spacing: 2.42cqw; }
.dm-minimal .dm-h { padding: 1.21cqw 4.85cqw; font-size: 8.18cqw; font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.dm-minimal .dm-link { padding: 1.82cqw 4.85cqw; font-size: 3.33cqw; color: #666; }
.dm-minimal .dm-grid { position: absolute; left: 4.85cqw; right: 4.85cqw; bottom: 4.24cqw; height: 15.76cqw; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.82cqw; }
.dm-minimal .dm-grid i:nth-child(1) { background: #d9d9d4; }
.dm-minimal .dm-grid i:nth-child(2) { background: #e8e8e3; }
.dm-minimal .dm-grid i:nth-child(3) { background: #111; }

/* 2. Elegancja nocą */
.dm-luxury { background: #0e0e0e; color: #c9a45c; text-align: center; }
.dm-luxury .dm-nav { display: flex; justify-content: center; gap: 4.24cqw; padding: 3.64cqw; font-size: 3.33cqw; color: #8a8a8a; }
.dm-luxury .dm-kicker { margin-top: 3.64cqw; font-size: 3.33cqw; letter-spacing: .3em; }
.dm-luxury .dm-h { margin: 1.82cqw 0; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 10.30cqw; color: #f3e9d2; }
.dm-luxury .dm-rule { width: 13.33cqw; height: 1px; margin: 2.42cqw auto 4.24cqw; background: #c9a45c; }
.dm-luxury .dm-btn { display: inline-block; padding: 1.82cqw 4.24cqw; border: 1px solid #c9a45c; font-size: 3.33cqw; letter-spacing: .15em; }

/* 3. Firmowy i rzeczowy */
.dm-corporate { background: #fff; color: #0f2a5c; }
.dm-corporate .dm-nav { display: flex; justify-content: space-between; align-items: center; padding: 2.73cqw 4.24cqw; background: #0f2a5c; color: #fff; font-size: 3.64cqw; font-weight: 800; }
.dm-corporate .dm-nav span { font-size: 3.33cqw; font-weight: 400; color: #b9c6e3; word-spacing: 2.42cqw; }
.dm-corporate .dm-body { width: 52%; padding: 4.85cqw 4.24cqw; }
.dm-corporate .dm-h { margin-bottom: 3.03cqw; font-size: 6.36cqw; font-weight: 800; line-height: 1.1; }
.dm-corporate .dm-line { height: 1.52cqw; margin-bottom: 1.52cqw; border-radius: 0.91cqw; background: #dfe4ee; }
.dm-corporate .dm-btn { display: inline-block; margin-top: 1.82cqw; padding: 1.82cqw 3.03cqw; border-radius: 1.82cqw; background: #1e40af; color: #fff; font-size: 3.33cqw; }
.dm-corporate .dm-card { position: absolute; right: 4.24cqw; top: 15.76cqw; width: 33.94cqw; padding: 3.03cqw; border: 1px solid #e3e8f2; border-radius: 2.42cqw; }
.dm-corporate .dm-num { font-size: 6.06cqw; font-weight: 800; color: #1e40af; }
.dm-corporate .dm-cap { margin-bottom: 1.82cqw; font-size: 3.33cqw; color: #667; }

/* 4. Gazeta i magazyn */
.dm-editorial { background: #f5f0e6; color: #1a1a1a; font-family: Georgia, "Times New Roman", serif; }
.dm-editorial .dm-mast { margin: 3.64cqw 4.24cqw 0; padding: 1.21cqw 0; text-align: center; border-block: 0.91cqw double #1a1a1a; }
.dm-editorial .dm-h { font-size: 7.58cqw; font-weight: 600; }
.dm-editorial .dm-kicker { font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 3.33cqw; letter-spacing: .2em; }
.dm-editorial .dm-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3.64cqw; padding: 3.64cqw 4.24cqw; }
.dm-editorial .dm-title { margin-bottom: 2.12cqw; font-size: 4.85cqw; font-weight: 600; line-height: 1.1; }
.dm-editorial .dm-line { height: 1.52cqw; margin-bottom: 1.82cqw; border-radius: 0.91cqw; background: #cfc6b4; }
.dm-editorial .dm-img { height: 13.33cqw; margin-bottom: 2.12cqw; background: #cfc6b4; }

/* 5. Lokalny fachowiec: biel + „roboczy” pomarańcz, telefon zawsze na wierzchu */
.dm-trade { background: #fff; color: #1f2937; }
.dm-trade .dm-top { display: flex; justify-content: space-between; padding: 1.21cqw 4.24cqw; background: #1f2937; color: #d1d5db; font-size: 3.33cqw; }
.dm-trade .dm-nav { display: flex; justify-content: space-between; align-items: center; padding: 2.42cqw 4.24cqw; border-bottom: 1px solid #e5e7eb; font-size: 4.24cqw; font-weight: 800; }
.dm-trade .dm-nav b { display: flex; align-items: center; gap: 1.82cqw; }
.dm-trade .dm-logo { width: 3.64cqw; height: 3.64cqw; border-radius: 0.91cqw; background: #f59e0b; }
.dm-trade .dm-call { padding: 1.52cqw 3.03cqw; border-radius: 1.82cqw; background: #f59e0b; font-size: 3.33cqw; }
.dm-trade .dm-body { padding: 3.03cqw 4.24cqw 0; }
.dm-trade .dm-h { font-size: 5.15cqw; font-weight: 800; }
.dm-trade .dm-sub { margin: 2px 0 1.82cqw; font-size: 3.64cqw; color: #4b5563; }
.dm-trade .dm-check { font-size: 3.33cqw; line-height: 1.4; color: #374151; }
.dm-trade .dm-rating { position: absolute; right: 4.24cqw; top: 20cqw; width: 30.30cqw; padding: 2.12cqw 3.03cqw; border: 1px solid #f59e0b; border-radius: 2.42cqw; background: #fff7e6; }
.dm-trade .dm-score { font-size: 5.45cqw; font-weight: 800; }
.dm-trade .dm-score span { font-size: 3.33cqw; color: #f59e0b; letter-spacing: 1px; }
.dm-trade .dm-cap { font-size: 3.33cqw; color: #6b7280; }
.dm-trade .dm-tiles { position: absolute; left: 4.24cqw; right: 4.24cqw; bottom: 3.03cqw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.82cqw; }
.dm-trade .dm-tiles span { padding: 2.12cqw 0; border-radius: 1.82cqw; background: #f3f4f6; text-align: center; font-size: 3.33cqw; font-weight: 700; }

/* 6. Glamour: pudrowy róż, różowe złoto, szeryf z kursywą, łuk jak lustro w salonie, iskierki */
.dm-glamour { background: #f7ebe8; color: #3b2a2a; font-family: Georgia, "Times New Roman", serif; }
.dm-glamour .dm-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 3.64cqw 4.24cqw; }
.dm-glamour .dm-links { font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 3.33cqw; color: #8a6b68; word-spacing: 2.42cqw; }
.dm-glamour .dm-nav b { font-size: 4.24cqw; font-weight: 400; letter-spacing: .35em; }
.dm-glamour .dm-book { justify-self: end; padding: 1.21cqw 3.33cqw; border-radius: 302.73cqw; background: #b76e79; color: #fff; font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 3.33cqw; }
.dm-glamour .dm-body { padding: 3.64cqw 4.85cqw; }
.dm-glamour .dm-kicker { margin-bottom: 1.82cqw; font-size: 3.33cqw; font-style: italic; color: #b76e79; }
.dm-glamour .dm-h { font-size: 8.48cqw; line-height: 1.05; }
.dm-glamour .dm-h em { color: #b76e79; }
.dm-glamour .dm-more { display: inline-block; margin-top: 3.64cqw; padding-bottom: 2px; border-bottom: 1px solid #b76e79; font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 3.33cqw; letter-spacing: .05em; }
.dm-glamour .dm-arch { position: absolute; right: 9.09cqw; top: 15.15cqw; bottom: 0; width: 33.94cqw; overflow: hidden; border-radius: 302.73cqw 302.73cqw 0 0; background: #ead0ca; }
.dm-glamour .dm-face { position: absolute; left: 10.30cqw; top: 10.30cqw; width: 13.33cqw; height: 16.36cqw; border-radius: 50%; background: #d9b2aa; }
.dm-glamour .dm-neck { position: absolute; left: 4.85cqw; top: 29.09cqw; width: 24.24cqw; height: 24.24cqw; border-radius: 12.12cqw 12.12cqw 0 0; background: #d9b2aa; }
.dm-glamour .dm-spark { position: absolute; background: #c9a27e; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.dm-glamour .dm-s1 { right: 6.67cqw; top: 13.94cqw; width: 5.45cqw; height: 5.45cqw; }
.dm-glamour .dm-s2 { right: 45.45cqw; top: 18.79cqw; width: 3.33cqw; height: 3.33cqw; }
.dm-glamour .dm-s3 { right: 4.24cqw; top: 36.36cqw; width: 2.73cqw; height: 2.73cqw; }
.dm-glamour .dm-chip { position: absolute; right: 16.97cqw; bottom: 3.03cqw; padding: 1.82cqw 3.64cqw; border-radius: 302.73cqw; background: #fff; color: #3b2a2a; font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 3.33cqw; white-space: nowrap; }
.dm-glamour .dm-chip b { color: #b76e79; }
/* demo-art:end */

/* FAQ: akordeon na <details> */
.faq { max-width: 860px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 12px 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 46em; }

/* Ciemny pas z zaproszeniem do kontaktu (jak karta terminala) */
.cta-band {
  /* Linie jak na mapie morskiej (izobaty): SVG w tle, rozciągnięte na cały pas. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 240' preserveAspectRatio='none' fill='none' stroke='%238ab4ff' stroke-opacity='.16' stroke-width='1.5'%3E%3Cpath d='M380 0 C470 60 560 40 640 90 S760 170 800 150'/%3E%3Cpath d='M440 0 C520 50 600 40 680 80 S770 140 800 120'/%3E%3Cpath d='M320 0 C420 80 520 70 600 120 S740 220 800 200'/%3E%3Cpath d='M260 0 C370 100 480 100 560 150 S700 240 760 240'/%3E%3Cpath d='M520 0 C580 30 640 30 700 60 S780 100 800 90'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
  padding: clamp(28px, 5vw, 48px); border-radius: 24px;
  background-color: var(--term-bg); color: var(--term-text);   /* nie „background:” – skrót skasowałby obrazek linii */
}
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { margin: 0; color: #c9c9d4; max-width: 34em; }
.cta-band .btn-ghost { border-color: #f1f1f5; color: #f1f1f5; }
.cta-band .btn-ghost:hover { background: #1c2a42; }

/* Inne usługi: trzy kafelki-linki */
.other-h { margin: 56px 0 20px; font-size: 1.5rem; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.other-card {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); font-weight: 700; text-decoration: none;
}
.other-card .card-icon { flex: none; margin: 0; }
.other-card::after { content: "→"; margin-left: auto; color: var(--accent); }
.other-card:hover { border-color: var(--accent); }

/* Stopka: zawsze ciemna (jak karta terminala), domyka stronę wizualnie. */
/* Stopka: jeden ciemny pasek. flex-wrap sam przenosi elementy do kolejnej linii na wąskim ekranie. */
.site-footer { background: var(--term-bg); color: #c9c9d4; }
.site-footer a { color: #f1f1f5; text-decoration: none; }
.site-footer a:hover { color: #8ab4ff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer b { color: #8ab4ff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
  padding: 22px 0 26px; font-size: 0.95rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }

/* ==========================================================
   Drobne ikony „kodowo-morskie” rozsiane w pustych miejscach, 3 na sekcję.
   Czysta dekoracja: aria-hidden w HTML, nie łapią kliknięć, blade i małe.
   Kreska bierze kolor z currentColor (= --muted), akcent (.d-a) z --accent, więc działają w obu motywach.
   Każda ikona ma w style="" własne zmienne: --s rozmiar, --r obrót, --d przesunięcie animacji,
   oraz pozycję: --x/--y wprost albo (klasa .dz-head) --f = ułamek wolnego pola obok nagłówka.
   ========================================================== */
.section > .wrap { position: relative; }   /* punkt odniesienia dla position: absolute */
.deco {
  position: absolute; left: var(--x, 0); top: var(--y, 0);
  width: var(--s, 56px); height: var(--s, 56px);
  rotate: var(--r, 0deg);                  /* osobna właściwość, więc nie gryzie się z transform animacji */
  pointer-events: none;
  color: var(--muted); opacity: .5;
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  animation: sa-float 7s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.deco .d-a { stroke: var(--accent); }
/* Pole obok nagłówka zaczyna się za tekstem (opis ma max ~770 px) i kończy przy prawej krawędzi.
   --f: 0 to początek pola, 1 to koniec – więc ikona zostaje w pustym miejscu przy każdej szerokości. */
.dz-head { left: calc(800px + var(--f) * (100% - 800px - var(--s, 56px))); }

/* ==========================================================
   Responsywność (RWD): mniejsze ekrany
   ========================================================== */

/* Menu mieści się obok logo od ok. 1120 px (zmierzone: PL potrzebuje 1086 px treści + 32 px marginesu),
   więc menu schodzi do drugiego wiersza wcześniej niż reszta układu. */
@media (max-width: 1120px) {
  .header-row { flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; }
  .header-tools { margin-left: auto; }
  .main-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  html { scroll-padding-top: 140px; }
}

/* ---------- Menu ☰ na węższych ekranach ----------
   Działa tylko z JavaScriptem (klasa .js na <html>). Bez JS zostaje menu w drugim wierszu jak wyżej. */
.menu-btn { display: none; }
@media (max-width: 1120px) {
  .js .header-row { padding: 6px 0; }
  .js .menu-btn {
    display: inline-grid; align-content: center; justify-items: center; gap: 5px;
  }
  .js .menu-btn:hover { transform: none; }          /* bez obrotu z .icon-btn – ☰ ma własną animację */
  .menu-btn span {
    display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor;
    transition: transform .2s, opacity .2s;
  }
  /* Otwarte menu: górna i dolna kreska zjeżdżają do środka i obracają się w ✕, środkowa znika. */
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .js .main-nav { display: none; }
  .js .site-header.menu-open .main-nav {
    display: flex; flex-direction: column; gap: 0; overflow: visible;
    padding: 4px 0 10px;
  }
  .js .site-header.menu-open .main-nav a::after { display: none; }   /* w liście ☰ wystarczą linie między pozycjami */
  .js .site-header.menu-open .main-nav a {
    padding: 14px 4px; font-size: 1.15rem; border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, .14);   /* cienkie linie między pozycjami */
  }
  .js { scroll-padding-top: 90px; }   /* niższy pasek – kotwice (#kontakt itd.) nie chowają się pod nim */
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; max-width: 520px; }
  .svc-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .svc-art { max-width: 340px; }
  .hero-bg { width: 120vw; left: -20vw; opacity: .09; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  html { scroll-padding-top: 140px; }
  .deco { display: none; }   /* w jednej kolumnie nie ma już pustych miejsc – ikony tylko by przeszkadzały */

  /* Kroki pionowo: kółko po lewej, linia w dół. */
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { left: 32px; right: auto; top: 34px; bottom: 34px; width: 3px; height: auto; }
  .step { padding-left: 84px; min-height: 56px; }
  .step::before { position: absolute; left: 0; top: 0; margin: 0; }
}
@media (max-width: 560px) {
  .section:not(.section-alt)::before { width: 80%; height: 120px; opacity: .4; }
  .header-tools .btn { padding-inline: 14px; }   /* węższe przyciski w pasku, żeby zmieściły się na 375 px */
  /* Na telefonie usługi zawijają się do dwóch linii zamiast chować się za krawędzią ekranu. */
  .main-nav { flex-wrap: wrap; overflow: visible; gap: 4px; }
  .main-nav a { padding: 6px 10px; }
  html:not(.js) .brand span { display: none; }   /* bez JS menu zajmuje miejsce – chowamy napis; z ☰ się mieści */
  .btn-lg { width: 100%; justify-content: center; }
  .people { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; padding: 22px; }   /* awatar nad tekstem */
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
  .contact-form .btn { justify-self: stretch; }
}

/* Pojawianie się przy przewijaniu: klasę .reveal dodaje script.js, .is-visible – gdy element wjedzie na ekran. */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Kto ma wyłączone animacje w systemie – nie migamy i nie przesuwamy. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .il-load, .il-ship, .cursor,
  .svc-art *, .deco { animation: none; }
  .btn { transition: none; }
  #theme-toggle:hover svg, .brand:hover .brand-logo, .btn:hover, .card:hover, .icon-btn:hover, .demo-open:hover::after, .demo-open:focus-visible::after { transform: none; }
  .card, .card-link::after, .demo-open, .demo-open::after { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================
   Zmiana motywu: koło rozchodzące się od przycisku (script.js, View Transitions API)
   ========================================================== */
/* Wyłączamy domyślne przenikanie zrzutów – całą animację robi rosnące koło (clip-path) z script.js. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
