/* ==========================================================================
   EDUSPEKTRUM — style
   1. Fonty   2. Zmienne   3. Baza   4. Layout   5. Typografia
   6. Komponenty   7. Sekcje   8. Responsywność
   ========================================================================== */

/* 1. Fonty (lokalne, bez Google Fonts) ------------------------------------ */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Zmienne --------------------------------------------------------------- */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #16181D;
  --text: #454A54;
  --muted: #5B606B;
  --line: #E4E4DE;
  --line-strong: #CFCFC8;
  --accent: oklch(0.48 0.12 250);
  --accent-bg: oklch(0.94 0.03 250);
  --accent-ink: oklch(0.38 0.1 250);
  --inverse-text: #D9DBE0;
  --inverse-muted: #B9BCC4;

  --font-sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(64px, 9vw, 120px);
  --header-h: 72px;
}

/* 3. Baza ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, canvas { display: block; max-width: 100%; }

h1, h2, h3, p { margin: 0; }
p, h2, h3 { text-wrap: pretty; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--bg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 4. Layout ---------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

/* Elastyczna siatka: kolumny łamią się same, gdy zabraknie miejsca */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 440px)), 1fr));
  gap: var(--gap, clamp(40px, 6vw, 96px));
}

.stack { display: flex; flex-direction: column; gap: var(--gap, 20px); }

/* Siatka z cienkimi liniami między kafelkami */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* 5. Typografia ------------------------------------------------------------ */
.mono, .eyebrow, .label {
  font-family: var(--font-mono);
  font-weight: 400;
}

.eyebrow {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 20px;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.h-xl {
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.h-lg {
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.h-md {
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
}

.body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

.statement {
  font-weight: 600;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* 6. Komponenty ------------------------------------------------------------ */

/* Karta */
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(28px, 4vw, 48px);
}

/* Pigułki / tagi */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
}

/* Kafelek w siatce .tiles */
.tile {
  background: var(--bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color .2s ease;
}
.tile__title { font-weight: 600; font-size: 22px; line-height: 1.2; }
.tile p { font-size: 16px; line-height: 1.55; color: var(--text); }
.tile--dark { background: var(--ink); color: var(--bg); }
.tile--dark .label { color: var(--inverse-muted); }
.tile--dark p { color: var(--inverse-text); }

/* Numerowana lista z liniami */
.numbered {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  counter-reset: n;
}
.numbered li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.45;
}
.numbered li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 3px;
}

/* Ciemny baner */
.callout {
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(32px, 5vw, 56px);
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.callout::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  margin-top: clamp(8px, 1.2vw, 14px);
}
.callout p {
  font-weight: 600;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Panele „interfejsu” — ciemne ilustracje produktu */
.ui {
  --ui-bg: #0B0F14;
  --ui-raised: #11161D;
  --ui-line: #1F2833;
  --ui-text: #E6EAF0;
  --ui-soft: #C3C9D2;
  --ui-muted: #8A94A3;
  --ui-dim: #5D6775;
  --ui-green: #4ADE80;
  --ui-blue: #60A5FA;
  --ui-amber: #FBBF24;
  --ui-violet: #C084FC;
  --ui-teal: #5EEAD4;
  container-type: inline-size;
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 30px 60px -30px rgba(11, 15, 20, 0.45);
}
.ui__mono, .ui__bar, .ui__label, .ui__foot, .ui__pill { font-family: var(--font-mono); }
.ui__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ui-line);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-soft);
}
.ui__dim { color: var(--ui-dim); }
.ui__live { display: inline-flex; align-items: center; gap: 7px; color: var(--ui-green); }
.ui__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ui-green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
  animation: ui-pulse 2s ease-in-out infinite;
}
.ui__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted);
  white-space: nowrap;
}
.ui__pill--review { color: var(--ui-amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.06); }
.ui__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-dim);
}
.ui__foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 12px 18px;
  border-top: 1px solid var(--ui-line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ui-dim);
}
.ui .up { color: var(--ui-green); }
.ui .info { color: var(--ui-blue); }

/* Wykresy SVG rysowane przez js/main.js z atrybutów data-* */
.chart { display: block; width: 100%; height: var(--h, 48px); overflow: visible; }
.axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ui-dim);
}
.legend-ui {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ui-muted);
}
.legend-ui span { display: inline-flex; align-items: center; gap: 6px; }
.legend-ui span::before { content: ""; width: 12px; height: 2px; background: var(--c); }
.legend-ui .dashed::before { background: repeating-linear-gradient(90deg, var(--c) 0 3px, transparent 3px 5px); }

@keyframes ui-pulse { 50% { opacity: 0.35; } }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* 7. Sekcje ---------------------------------------------------------------- */

/* Nagłówek strony */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); }
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(40px, 10.6vw, 150px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}
.hero__grid {
  --min: 420px;
  --gap: 40px;
  margin-top: clamp(40px, 6vw, 72px);
  align-items: end;
}
.hero__subtitle {
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 620px;
}
.hero .lead { max-width: 560px; }

/* 01 — Problem: wykresy kropkowe */
.timelines {
  --min: 460px;
  --gap: 24px;
  margin-top: clamp(56px, 7vw, 88px);
}
.timeline {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.timeline--connected { border-color: var(--ink); }
.timeline__head { display: flex; justify-content: space-between; gap: 12px; }

.track {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  font-size: 14px;
}
.track__line {
  position: relative;
  height: 14px;
  border-bottom: 1px dashed #D6D6CF;
}

.dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  left: calc(var(--x) - 4px);
}
.track__line .dot { top: 3px; }

.scatter {
  position: relative;
  height: 118px;
  border-bottom: 1px solid var(--ink);
}
.scatter .dot { bottom: var(--y); }
.scatter__trend {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 1px;
  background: var(--ink);
  opacity: .5;
  transform: rotate(-7deg);
  transform-origin: left;
}

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

/* Kolory ścieżek terapii */
.c-si    { --c: oklch(0.62 0.11 200); }
.c-comm  { --c: oklch(0.58 0.11 235); }
.c-edu   { --c: oklch(0.52 0.12 270); }
.c-other { --c: oklch(0.55 0.08 160); }

/* 03 — Przypadki użycia */
.cases { display: flex; flex-direction: column; gap: 24px; }
.case { --min: 400px; --gap: clamp(32px, 5vw, 64px); }
.case__note { font-size: 14px; color: var(--muted); max-width: 340px; line-height: 1.5; }
.case__aside { display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; }
.case__aside .chip { min-height: 36px; padding: 4px 14px; }
.case__conclusion {
  padding-top: 24px;
  border-top: 1px solid var(--ink);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Wizualizacja SI — dashboard (baza: panele .ui w sekcji 6) */
.si-visual { grid-column: 1 / -1; }
.si-dash { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.si-visual__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1A1F26;
}
.si-visual__media img,
.si-visual__media canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.si-visual__media img { object-fit: cover; }
.si-visual__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(11, 15, 20, 0.72);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #CFFAF0;
}
.si-visual__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5EEAD4;
}
.si-dash__side {
  border-left: 1px solid var(--ui-line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ui-line);
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  overflow: hidden;
}
.metric {
  background: var(--ui-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.metric__name { font-size: 12px; color: var(--ui-muted); }
.metric__value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 19px;
}
.metric__value small { font-size: 11px; }
.metric__bar { height: 3px; background: var(--ui-line); border-radius: 2px; overflow: hidden; }
.metric__bar::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--v);
  background: var(--c);
}
.si-dash__chart { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.si-dash__chart .chart { --h: 96px; }

@container (max-width: 820px) {
  .si-dash { grid-template-columns: 1fr; }
  .si-dash__side { border-left: 0; border-top: 1px solid var(--ui-line); }
}

/* Cross-therapy analysis */
.xt { grid-column: 1 / -1; --from: 42%; --to: 76%; }
.xt__grid { padding: 6px 18px 0; }
.xt__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border-bottom: 1px solid var(--ui-line);
}
.xt__row--axis { border-bottom: 0; }
.xt__name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 13px;
  color: var(--ui-soft);
}
.xt__name::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}
.xt__track { position: relative; min-height: 44px; }
.xt__track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from);
  width: calc(var(--to) - var(--from));
  background: rgba(96, 165, 250, 0.07);
  border-left: 1px dashed rgba(96, 165, 250, 0.35);
  border-right: 1px dashed rgba(96, 165, 250, 0.35);
}
.xt__track .dot { top: 50%; margin-top: -4px; }
.xt__row--axis .xt__track { min-height: 0; padding: 6px 0; }
.xt__row--axis .xt__track::before { display: none; }
.xt__band {
  margin: 0 -18px;
  padding: 9px 18px;
  background: rgba(96, 165, 250, 0.06);
  border-bottom: 1px solid rgba(96, 165, 250, 0.22);
  color: var(--ui-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.xt__row--trend { border-bottom: 0; }
.xt__row--trend .xt__name { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; color: var(--ui-text); }
.xt__row--trend .xt__name::before { display: none; }
.xt__row--trend .xt__name small { font-family: var(--font-mono); font-size: 10.5px; color: var(--ui-dim); }
.xt__row--trend .xt__track { min-height: 92px; padding: 12px 0; }
.xt__row--trend .chart { --h: 68px; position: relative; }

@container (max-width: 560px) {
  .xt__row { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .xt__name { font-size: 12px; }
}

/* 04 — Druga warstwa */
.second-layer__text { justify-content: flex-end; }
.signals { --min: 240px; margin-top: clamp(40px, 6vw, 64px); }
.signals .tile { padding: 28px; gap: 28px; min-height: 160px; justify-content: space-between; }
.signals .tile__title { font-size: 21px; line-height: 1.25; }

/* 05 — Wdrożenia */
.impl-intro { margin-bottom: clamp(40px, 6vw, 64px); }
.impl-intro .lead { align-self: end; }
.partners { --min: 420px; --gap: 24px; }
.partner {
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.partner__logo { height: 120px; display: flex; align-items: center; }
.partner__logo img { width: auto; height: 100%; }
.partner__logo--wide img { height: 88px; max-width: 100%; object-fit: contain; object-position: left; margin-left: -12px; }
.partner__title {
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.partner__focus {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stages-wrap {
  --min: 380px;
  --gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(56px, 8vw, 96px);
  align-items: start;
}
.stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stage {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 4px;
}
.stage + .stage { margin-top: 36px; position: relative; }
.stage + .stage::before {
  content: "↓";
  position: absolute;
  left: 50%;
  top: -31px;
  transform: translateX(-50%);
  font-size: 18px;
  color: var(--muted);
}
.stage--dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stage__name { font-weight: 600; font-size: 18px; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li:not(:last-child)::after { content: "→"; opacity: .5; }

/* Multimodal progress analysis (pod hero) */
.mm { margin-top: clamp(48px, 7vw, 88px); }
.mm__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--ui-line);
  font-size: 12px;
  color: var(--ui-muted);
}
.mm__meta b { color: var(--ui-text); font-weight: 500; }
.mm__flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
.mm__col {
  position: relative;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.mm__col + .mm__col { border-left: 1px solid var(--ui-line); }
.mm__col + .mm__col::before {
  content: "→";
  position: absolute;
  z-index: 1;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ui-line);
  border-radius: 50%;
  background: var(--ui-bg);
  color: var(--ui-blue);
  font-size: 12px;
}
.mm__col--ai { background: var(--ui-raised); }
.mm__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mm__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ui-line);
}
.mm__list li:last-child { border-bottom: 0; }
.mm__src { display: inline-flex; align-items: center; gap: 9px; }
.mm__src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.mm__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--ui-muted); white-space: nowrap; }
.mm__steps li { justify-content: flex-start; font-family: var(--font-mono); font-size: 12px; color: var(--ui-soft); }
.mm__steps li::before { content: "✓"; width: 14px; color: var(--ui-green); }
.mm__steps li.is-running { color: var(--ui-text); }
.mm__steps li.is-running::before { content: "◌"; display: inline-block; color: var(--ui-blue); animation: ui-spin 1.4s linear infinite; }
.mm__progress { height: 2px; margin-top: auto; background: var(--ui-line); border-radius: 2px; overflow: hidden; }
.mm__progress span { display: block; width: 40%; height: 100%; background: var(--ui-blue); animation: ui-load 2.4s ease-in-out infinite; }
.mm__engine { font-family: var(--font-mono); font-size: 11px; color: var(--ui-dim); }
.mm__headline { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.mm__out li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 12px; }
.mm__out b { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; text-align: right; }
.mm__out .chart { --h: 22px; }

@container (max-width: 860px) {
  .mm__flow { grid-template-columns: 1fr; }
  .mm__col + .mm__col { border-left: 0; border-top: 1px solid var(--ui-line); }
  .mm__col + .mm__col::before { content: "↓"; left: 50%; top: -12px; transform: translateX(-50%); }
}

/* Układ „tekst + panel” */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.split + .split { margin-top: clamp(64px, 9vw, 120px); }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--rev .split__text { order: 2; }
.split__text { display: flex; flex-direction: column; gap: 18px; }
.split__text .eyebrow { margin-bottom: 0; }
.facts { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
}
.facts li span:last-child { font-family: var(--font-mono); font-size: 13px; color: var(--ink); text-align: right; }

@media (max-width: 1000px) {
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev .split__text { order: 0; }
}

/* 3D movement analysis */
.m3d__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 0.9fr); }
.m3d__view {
  position: relative;
  min-height: 360px;
  background: radial-gradient(ellipse at 50% 72%, #131B26 0%, var(--ui-bg) 70%);
}
.m3d__view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.m3d__view .legend-ui { position: absolute; left: 14px; bottom: 12px; }
.t-hand { --c: #FBBF24; }
.t-foot { --c: #C084FC; }
.m3d__params {
  border-left: 1px solid var(--ui-line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.params { width: 100%; border-collapse: collapse; }
.params th,
.params td { padding: 9px 0; border-bottom: 1px solid var(--ui-line); vertical-align: baseline; }
.params tr:last-child th,
.params tr:last-child td { border-bottom: 0; }
.params th { text-align: left; font-weight: 400; font-size: 12.5px; color: var(--ui-muted); }
.params td { text-align: right; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; padding-left: 12px; }

@container (max-width: 620px) {
  .m3d__body { grid-template-columns: 1fr; }
  .m3d__view { min-height: 300px; }
  .m3d__params { border-left: 0; border-top: 1px solid var(--ui-line); }
}

/* Longitudinal progress */
.lp__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ui-line); }
.lp__stats div { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.lp__stats div + div { border-left: 1px solid var(--ui-line); }
.lp__stats b { font-family: var(--font-mono); font-weight: 500; font-size: 26px; letter-spacing: -0.02em; }
.lp__stats span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ui-dim); }
.lp__charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ui-line);
  border-bottom: 1px solid var(--ui-line);
}
.lp__chart { background: var(--ui-bg); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lp__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--ui-soft); }
.lp__head b { font-family: var(--font-mono); font-weight: 500; font-size: 12px; white-space: nowrap; }
.lp__chart .chart { --h: 58px; }
.lp__patterns { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 6px; }
.patterns { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.patterns li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--ui-line);
  counter-increment: n;
}
.patterns li:first-child { border-top: 0; }
.patterns li::before {
  content: counter(n, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ui-dim);
}
.patterns p { font-size: 14px; line-height: 1.4; color: var(--ui-text); }
.patterns small { grid-column: 2; font-family: var(--font-mono); font-size: 11px; color: var(--ui-muted); }
.patterns .ui__pill { grid-column: 3; grid-row: 1; }

@container (max-width: 560px) {
  .lp__charts { grid-template-columns: 1fr; }
  .lp__stats b { font-size: 22px; }
  .lp__stats div { padding: 12px 14px; }
  .patterns li { grid-template-columns: 24px minmax(0, 1fr); }
  .patterns .ui__pill { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 4px; }
}

/* 06 — Co robimy */
.areas { --min: 260px; }
.areas .tile { padding: 32px 28px 40px; gap: 20px; min-height: 280px; }
.areas .tile:hover { background: var(--surface); }
.areas .tile__title { letter-spacing: -0.01em; }

/* 07 — FAQ */
.faq { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); align-items: flex-start; }
.faq__title { flex: 1 1 240px; }
.faq__list { flex: 2 1 480px; min-width: 0; border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  min-height: 44px;
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.3;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 20px;
  text-align: right;
  color: var(--muted);
}
.faq__item[open] summary::after { content: "−"; }
.faq__item summary:hover { color: var(--accent); }
.faq__item p {
  padding: 0 44px 26px 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  max-width: 760px;
}

/* Stopka */
.site-footer {
  padding: clamp(56px, 7vw, 88px) 0 40px;
  border-top: 1px solid var(--line);
}
.footer-grid { --min: 240px; --gap: 40px; }
.footer-company { font-weight: 700; font-size: 18px; }
.footer-city { color: var(--muted); font-size: 16px; }
.footer-mail { font-size: 18px; overflow-wrap: anywhere; }
.footer-doc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.footer-doc:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.footer-doc__title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.footer-doc__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.footer-ids {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  align-content: start;
}
.footer-ids dt { color: var(--muted); }
.footer-ids dd { margin: 0; }
.footer-bottom {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* 8. Responsywność --------------------------------------------------------- */

/* Tablet i telefon: menu chowa się pod przyciskiem */
@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: grid; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 18px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .nav a {
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-child { border-bottom: 0; }

  .nav-open .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
}

/* Telefon */
@media (max-width: 560px) {
  .lead { font-size: 17px; }
  .body { font-size: 16px; }

  .card { padding: 24px 20px; }
  .case .si-visual { margin: -24px -20px 0; border-radius: 0; border-width: 0 0 1px; }

  .timeline { padding: 20px; }
  .track { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; font-size: 13px; }

  .tile { padding: 24px 20px; }
  .areas .tile { min-height: 0; padding: 24px 20px 28px; }
  .signals .tile { min-height: 0; gap: 16px; padding: 24px 20px; }

  .partner__logo { height: 96px; }
  .partner__logo--wide img { height: 72px; }

  .faq__item summary { padding: 18px 0; }
  .faq__item p { padding-right: 0; }

  .footer-bottom { margin-top: 48px; }
}

/* Ograniczenie animacji dla osób, które tego potrzebują */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
