/* =========================================================
   Mateusz Borowy · Projekty
   Układ: jedna myśl na sekcję. Sekcje na przemian białe i jasnoszare,
   jedna czarna (dla rekrutera). Projekty jak karty produktów:
   nazwa, jedno zdanie, duży obraz, trzy liczby. Jeden akcent: niebieski.
   Kolory i rozmiary zmieniasz w zmiennych poniżej.
   ========================================================= */

/* ---------- Fonty (Inter, lokalnie, licencja OFL – assets/fonts) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.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: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/inter-latin-500-normal.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: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/inter-latin-600-normal.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: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/inter-latin-700-normal.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: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-700-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokeny ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0068d1;
  --link: #0066cc;
  --on-accent: #ffffff;
  --mark-bg: rgba(255, 196, 0, 0.30);
  --token-bg: rgba(0, 113, 227, 0.10);
  --token-text: #0059b8;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.22), 0 10px 24px -12px rgba(0, 0, 0, 0.08);
  --focus: #0071e3;
  --ok: #248a3d;
  --bad: #d70015;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, Menlo, monospace;

  /* skala typografii */
  --fs-hero: clamp(40px, 7.4vw, 88px);
  --fs-display: clamp(34px, 6vw, 64px);
  --fs-product: clamp(40px, 6.6vw, 76px);
  --fs-lead: clamp(19px, 2.1vw, 24px);
  --fs-body: 17px;
  --fs-small: 14px;

  --radius-lg: 28px;
  --radius: 18px;
  --nav-h: 52px;
  --gutter: 24px;
  --maxw: 1040px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #101012;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: #3a3a3c;
    --link: #2997ff;
    --mark-bg: rgba(255, 196, 0, 0.26);
    --token-bg: rgba(41, 151, 255, 0.18);
    --token-text: #6cb4ff;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.9);
    --focus: #2997ff;
    --ok: #30d158;
    --bad: #ff453a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --line: #3a3a3c;
  --link: #2997ff;
  --mark-bg: rgba(255, 196, 0, 0.26);
  --token-bg: rgba(41, 151, 255, 0.18);
  --token-text: #6cb4ff;
  --nav-bg: rgba(22, 22, 23, 0.8);
  --shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.9);
  --focus: #2997ff;
  --ok: #30d158;
  --bad: #ff453a;
  color-scheme: dark;
}

/* Sekcja zawsze ciemna */
.theme-dark {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --line: #3a3a3c;
  --link: #2997ff;
  --focus: #2997ff;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Płynne przewijanie tylko po kliknięciu linku do sekcji (klasę „smooth” dodaje script.js).
   Wejście z linku #rekruter albo odświeżenie od razu pokazuje sekcję, bez przelatywania strony. */
html.smooth { scroll-behavior: smooth; }
html {
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: -0.014em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: var(--fs-small);
}
.skip-link:focus { top: calc(8px + env(safe-area-inset-top, 0px)); text-decoration: none; }

.wrap {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.center { text-align: center; }

/* ---------- Typografia ---------- */
.hero-title, .display, .product-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero-title { font-size: var(--fs-hero); max-width: 12em; margin-inline: auto; }
.display { font-size: var(--fs-display); }
.product-name { font-size: var(--fs-product); }
.lead {
  margin: 20px auto 0;
  max-width: 32em;
  font-size: var(--fs-lead);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-2);
}
.eyebrow { margin: 0 0 10px; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); letter-spacing: -0.005em; }
.accent-text { color: var(--accent); }
.fineprint { margin: 20px 0 0; font-size: 13px; color: var(--text-2); }

/* ---------- Przyciski i linki ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: center; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: 980px;
  background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-body); font-weight: 500;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn[hidden] { display: none; }
.btn-small { min-height: 38px; padding: 0 18px; font-size: 15px; }
.more { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--fs-body); color: var(--link); white-space: nowrap; }
.more::after {
  content: "\203A"; content: "\203A" / "";
  margin-left: 5px; font-size: 1.3em; line-height: 1;
  transition: transform .2s ease;
}
.more:hover::after { transform: translateX(3px); }

/* ---------- Nawigacja ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-inner {
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; height: var(--nav-h);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { color: var(--text); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; padding: 8px 0; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 6px 12px; border-radius: 980px;
  color: var(--text); opacity: .75; font-size: 13px; letter-spacing: -0.005em;
  transition: opacity .2s ease, background-color .2s ease;
}
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links a[aria-current="true"], .nav-links a[aria-current="page"] { opacity: 1; background: var(--bg-alt); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav-toggle { display: none; }
.nav-end { display: flex; align-items: center; gap: 10px; }

/* Przełącznik języka PL / EN */
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; min-height: 28px; padding: 0 10px; border-radius: 980px;
  color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .05em;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s ease;
}
.lang:hover { text-decoration: none; background: var(--bg-alt); }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-right: -10px; padding: 0 11px;
    background: none; border: 0; cursor: pointer; color: var(--text);
  }
  .nav-toggle .bar { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .25s ease; }
  .nav-toggle[aria-expanded="true"] .bar-top { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar-bottom { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; gap: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 24px max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-radius: 0; opacity: 1; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
  .nav-links a[aria-current="true"], .nav-links a[aria-current="page"] { background: none; color: var(--link); }
}

/* ---------- 1. Hero ---------- */
.hero { padding-block: clamp(80px, 13vw, 160px) clamp(80px, 12vw, 144px); text-align: center; }
.hero .eyebrow { margin-bottom: 18px; font-size: 15px; }

/* ---------- Sekcje ---------- */
.section { padding-block: clamp(88px, 12vw, 152px); }
.alt { background: var(--bg-alt); }
.section-head { padding-block: clamp(88px, 12vw, 152px) 0; }

/* ---------- 2. Jak to działa ---------- */
.demo {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 860px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* Bez JavaScriptu przełącznik jest ukryty, a trzy kroki stoją jeden pod drugim. */
.steps-switch { display: none; }
.js .steps-switch {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.steps-switch button {
  appearance: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 12px;
  background: transparent; color: var(--text-2);
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color .2s ease, box-shadow .2s ease;
}
.steps-switch button + button { border-left: 1px solid var(--line); }
.steps-switch button:hover { color: var(--text); }
.steps-switch button[aria-pressed="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.steps-switch .n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line);
}
.steps-switch button[aria-pressed="true"] .n { background: var(--accent); color: var(--on-accent); box-shadow: none; }

.demo-stage {
  padding: clamp(28px, 5vw, 52px) clamp(22px, 5vw, 56px) clamp(28px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 36px;
}
.demo-step { display: flex; flex-direction: column; justify-content: center; }
.demo-step + .demo-step { padding-top: 36px; border-top: 1px solid var(--line); }
.demo-label {
  margin: 0 0 14px; text-align: center;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
}
.js .demo-stage { display: grid; gap: 0; min-height: 260px; }
.js .demo-step { grid-area: 1 / 1; animation: appear .4s ease; }
.js .demo-step + .demo-step { padding-top: 0; border-top: 0; }
.js .demo-label { display: none; }
.demo-step[hidden] { display: none; }
.demo-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 30px);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.demo-text mark, .try-text mark {
  background: var(--mark-bg); color: inherit;
  padding: 0 .15em; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.demo-text .tok, .try-text .tok, .tokens .tok {
  font-family: var(--mono); font-size: .8em; font-weight: 600; letter-spacing: 0;
  color: var(--token-text); background: var(--token-bg);
  padding: .08em .4em; border-radius: 8px; white-space: nowrap;
}
.demo-caption {
  margin: 24px auto 0; max-width: 34em;
  font-size: var(--fs-body); color: var(--text-2); text-align: center;
}

/* ---------- 3. Projekty ---------- */
.strip {
  margin: clamp(40px, 6vw, 56px) auto 0; max-width: 880px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.strip a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 20px 8px; text-align: center; color: var(--text);
}
.strip a:hover { text-decoration: none; }
.strip a:hover strong { color: var(--link); }
.strip strong { font-size: var(--fs-body); font-weight: 600; letter-spacing: -0.015em; transition: color .2s ease; }
.strip span { font-size: 13px; color: var(--text-2); }

.product { padding-block: clamp(88px, 12vw, 144px); }
.product.alt { background: var(--bg-alt); }
.product-head { text-align: center; }
.product-head .eyebrow { margin-bottom: 8px; }
.tagline {
  margin: 16px auto 0; max-width: 30em;
  font-size: var(--fs-lead); line-height: 1.4; font-weight: 500; letter-spacing: -0.015em;
  color: var(--text-2);
}
.shot {
  margin: clamp(48px, 7vw, 72px) auto 0; max-width: 960px;
  border-radius: 20px; overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: 1px solid var(--line);
  outline: 1px solid color-mix(in srgb, var(--line) 55%, transparent); outline-offset: -1px;
}
.shot img { width: 100%; }

.facts {
  list-style: none; padding: 0;
  margin: clamp(48px, 6vw, 64px) auto 0; max-width: 880px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.facts li { padding: 0 clamp(12px, 2.5vw, 28px); text-align: center; }
.facts li + li { border-left: 1px solid var(--line); }
.facts strong {
  display: block;
  font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.1; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.facts span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--text-2); }

/* ---------- 4. Dla rekrutera ----------
   Jak specyfikacja techniczna: dwie tabele jedna pod drugą, z tą samą kolumną etykiet,
   więc wszystkie wiersze obu rubryk stoją na tych samych liniach. */
.recruit {
  max-width: 880px;
  margin: clamp(48px, 7vw, 72px) auto 0;
  display: grid; gap: clamp(48px, 6vw, 64px);
  text-align: left;
}
.recruit-col { min-width: 0; }
.col-title { margin: 0 0 14px; font-size: 21px; letter-spacing: -0.02em; }
.stack, .links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.stack > div, .links > li {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 32px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.stack dt, .links a { font-size: 16px; font-weight: 600; }
.stack dt { color: var(--text); }
.stack dd, .links > li > span { margin: 0; font-size: 16px; color: var(--text-2); }
#rekruter .cta-row, #recruiters .cta-row { margin-top: clamp(48px, 6vw, 64px); }

/* ---------- 5. Kontakt ---------- */
.mail {
  margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
}
.mail a { min-width: 0; max-width: 100%; font-family: var(--font-display); font-size: clamp(18px, 5vw, 32px); font-weight: 600; letter-spacing: -0.02em; overflow-wrap: break-word; }
.copy {
  border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  min-height: 32px; padding: 4px 14px; border-radius: 980px;
  background: var(--bg-alt); color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transition: background-color .2s ease;
}
.copy:hover { background: var(--line); background: color-mix(in srgb, var(--text) 14%, transparent); }
#kontakt .cta-row, #contact .cta-row { margin-top: 20px; }
.notfound-en { margin-top: clamp(56px, 8vw, 88px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }

/* ---------- Demo w przeglądarce (demo/, en/demo/) ---------- */
.try-hero { padding-block: clamp(64px, 10vw, 120px) clamp(40px, 6vw, 64px); }
.try { background: var(--bg-alt); padding-block: clamp(40px, 6vw, 72px) clamp(72px, 10vw, 120px); }
.try-wrap { max-width: 860px; display: grid; gap: 20px; }
.try-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.try-state {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 8px 16px; border-radius: 980px; background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text-2);
}
.try-state .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.try-state[data-state="ready"] .dot { background: var(--ok); }
.try-state[data-state="failed"] .dot { background: var(--bad); }
.try-state[data-state="loading"] .dot { animation: pulse 1.2s ease-in-out infinite; }
/* Bez JavaScriptu zostaje tylko komunikat z <noscript>. */
html:not(.js) #try-state, html:not(.js) .needs-js { display: none; }

.panel {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -18px rgba(0, 0, 0, 0.18);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.panel-title {
  margin: 0 auto 0 0; display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
}
.panel-title .n {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 700;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500;
  min-height: 32px; padding: 4px 14px; border-radius: 980px; color: var(--text);
  background: var(--bg-alt); background: color-mix(in srgb, var(--text) 7%, transparent);
  transition: background-color .2s ease, color .2s ease;
}
.chips button:hover { background: color-mix(in srgb, var(--text) 13%, transparent); }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.try-input {
  display: block; width: 100%; min-height: 6.6em; field-sizing: content; resize: vertical;
  margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 17px; line-height: 1.5; letter-spacing: -0.01em;
}
#try-answer { min-height: 4.6em; }
.try-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; border-radius: 14px; }
.panel-note { margin: 12px 0 0; font-size: 14px; color: var(--text-2); }
.panel-note code {
  font-family: var(--mono); font-size: .9em; color: var(--token-text); background: var(--token-bg);
  padding: .05em .35em; border-radius: 6px; white-space: nowrap;
}
.count {
  font-size: 13px; font-weight: 600; color: var(--token-text); background: var(--token-bg);
  padding: 4px 10px; border-radius: 980px; white-space: nowrap;
}
.count:empty { display: none; }
.copy:disabled { opacity: .45; cursor: default; }
.try-text {
  min-height: 1.6em; margin: 0;
  font-size: 19px; line-height: 1.6; letter-spacing: -0.015em;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.try-subtitle {
  margin: 28px 0 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
}
.try-subtitle span { font-weight: 500; letter-spacing: 0; text-transform: none; }
.tokens { width: 100%; border-collapse: collapse; font-size: 15px; }
.tokens th { padding: 0 0 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tokens td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; overflow-wrap: anywhere; }
.tokens td:first-child, .tokens th:first-child { width: 44%; padding-right: 16px; }
.tokens .tok { font-size: 14px; }
.try-notes { list-style: none; margin: 8px auto 0; padding: 0; max-width: 40em; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); text-align: center; }
.install {
  font-family: var(--mono); font-size: clamp(16px, 4.4vw, 24px); font-weight: 600; letter-spacing: 0;
  padding: 10px 18px; border-radius: 14px; background: var(--bg-alt);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Stopka ---------- */
.footer {
  background: var(--bg-alt); color: var(--text-2); font-size: 12px;
  padding-block: 22px calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer p { margin: 0; }

/* ---------- Ruch ---------- */
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* Delikatne wejście przy przewijaniu; bez obsługi w przeglądarce wszystko jest widoczne od razu. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html.smooth { scroll-behavior: auto; }
  .demo-step { animation: none; }
  .try-state[data-state="loading"] .dot { animation: none; }
  .chips button { transition: none; }
  .btn, .more::after, .strip strong { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .stack > div, .links > li { grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 680px) {
  :root { --gutter: 20px; }
  .strip { grid-template-columns: minmax(0, 1fr); border-top: 0; max-width: 420px; }
  .strip a { flex-direction: row; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left; }
  .strip a::after { content: "\203A"; content: "\203A" / ""; color: var(--text-2); font-size: 22px; line-height: 1; margin-left: auto; padding-left: 12px; }
  .strip span { margin-left: 12px; }
  .facts { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .facts li { padding: 20px 0; }
  .facts li + li { border-left: 0; border-top: 1px solid var(--line); }
  .steps-switch button { flex-direction: column; gap: 6px; min-height: 72px; font-size: 13px; }
  .js .demo-stage { min-height: 300px; }
  .stack > div, .links > li { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .shot { border-radius: 14px; }
}

/* ---------- Tryb wysokiego kontrastu (Windows) ---------- */
@media (forced-colors: active) {
  .steps-switch button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -5px; }
  .steps-switch .n { border: 1px solid CanvasText; }
  .nav-links a[aria-current="true"] { text-decoration: underline; }
  .btn, .copy, .lang { border: 1px solid ButtonText; }
  .demo-text mark { forced-color-adjust: none; background: Mark; color: MarkText; }
  .demo-text .tok { border: 1px solid CanvasText; }
  .shot, .demo, .panel { border: 1px solid CanvasText; }
  .try-text mark { forced-color-adjust: none; background: Mark; color: MarkText; }
  .try-text .tok, .tokens .tok, .count { border: 1px solid CanvasText; }
  .chips button { border: 1px solid ButtonText; }
  .chips button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: 1px; }
}

/* ---------- Druk ---------- */
@media print {
  /* papier jest zawsze biały: jasne kolory także dla osób z ciemnym motywem i w ciemnej sekcji */
  :root, .theme-dark {
    --bg: #fff !important; --bg-alt: #fff !important; --surface: #fff !important;
    --text: #000 !important; --text-2: #444 !important; --line: #ccc !important;
    --link: #000 !important; --accent: #000 !important; --on-accent: #000 !important;
    --mark-bg: #eee !important; --token-bg: #eee !important; --token-text: #000 !important;
    color-scheme: light;
  }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .nav, .skip-link, .steps-switch, .copy, .shot, .strip, .try-top, .chips { display: none !important; }
  .panel { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  .try { background: #fff !important; }
  .btn, .more { display: inline !important; min-height: 0; padding: 0; background: none !important; color: #000 !important; }
  .more::after { margin: 0; }
  .js .demo-stage { display: flex !important; flex-direction: column; gap: 16px; min-height: 0; }
  .js .demo-step { grid-area: auto; animation: none; }
  .demo-step[hidden] { display: flex !important; }
  .js .demo-label { display: block !important; }
  .theme-dark, .alt, .demo { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .section, .product, .section-head, .hero { padding-block: 24px !important; }
  a { color: #000; text-decoration: underline; }
  /* adres przy każdym linku zewnętrznym, żeby wydruk dało się wykorzystać */
  a[href^="http"]::after, a[href^="mailto"]::after {
    content: " (" attr(href) ")" !important;
    font-size: .8em; font-weight: 400; margin: 0; transform: none; color: #444;
  }
  .reveal { animation: none !important; }
}

/* ---------- Artykuły (artykuly/) ---------- */
.article { max-width: calc(46rem + 2 * var(--gutter)); padding-block: clamp(56px, 8vw, 96px) clamp(72px, 10vw, 120px); }
.article-head { text-align: center; }
.article-head .hero-title { font-size: clamp(34px, 5.4vw, 58px); max-width: 15em; }
.article-meta { margin: 20px 0 0; font-size: var(--fs-small); color: var(--text-2); }
.article-body { margin-top: clamp(40px, 6vw, 64px); font-size: 18px; line-height: 1.68; }
.article-body > h2 {
  margin: 2.4em 0 .55em; scroll-margin-top: calc(var(--nav-h) + 16px);
  font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -0.025em;
}
.article-body > h3 {
  display: flex; align-items: center; gap: 12px; margin: 1.9em 0 .5em; scroll-margin-top: calc(var(--nav-h) + 16px);
  font-family: var(--font-display); font-size: 21px; line-height: 1.3; letter-spacing: -0.015em;
}
.article-body p, .article-body ul, .article-body ol { margin: 0 0 1em; }
.article-body ul { padding-left: 1.2em; }
.article-body li + li { margin-top: .5em; }
.article-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body .btn, .article-body .more { text-decoration: none; }
.article-body code {
  font-family: var(--mono); font-size: .84em; padding: .1em .35em; border-radius: 6px;
  background: var(--bg-alt); overflow-wrap: anywhere;
}
.article-body mark { background: var(--mark-bg); color: inherit; padding: 0 .15em; border-radius: 4px; }
.article-body .n {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.article-body .tok {
  font-family: var(--mono); font-size: .84em; font-weight: 600; letter-spacing: 0;
  color: var(--token-text); background: var(--token-bg); padding: .06em .38em; border-radius: 6px; white-space: nowrap;
}

/* ramka „W skrócie” */
.box { margin: 0 0 2.4em; padding: 24px 28px; border-radius: var(--radius); background: var(--bg-alt); }
.box-title { margin: 0 0 10px; font-size: var(--fs-small); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.box ul { margin: 0; }

/* przykład w czterech krokach */
.exchange { margin: 1.4em 0 1.2em; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.exchange li { margin: 0; padding: 16px 22px 18px; }
.exchange li + li { margin-top: 0; border-top: 1px solid var(--line); }
.exchange .exchange-model { background: var(--bg-alt); }
.exchange-step { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
.exchange-step .n { width: 22px; height: 22px; font-size: 12px; }

/* RODO w trzech punktach */
.points { padding: 0; list-style: none; counter-reset: point; }
.points li { position: relative; padding-left: 40px; counter-increment: point; }
.points li + li { margin-top: .9em; }
.points li::before {
  content: counter(point); position: absolute; left: 0; top: .15em;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; line-height: 1;
}
.article-note { font-size: var(--fs-small); color: var(--text-2); }

/* trzy karty */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 1.2em 0 1.4em; }
.card { padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }

/* bloki kodu */
.code { margin: 0 0 1.2em; border-radius: 14px; background: var(--bg-alt); overflow: hidden; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 4px 8px 4px 18px;
  border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2);
}
.code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.code pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }

/* porównanie z Presidio */
.cmp { margin: 1.4em 0; padding: 24px 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp-group + .cmp-group { margin-top: 22px; }
.cmp-title { margin: 0 0 10px !important; font-size: 16px; font-weight: 600; line-height: 1.4; }
.cmp-title span { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.cmp-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) 52px; align-items: center; gap: 12px; font-size: 14px; }
.cmp-line + .cmp-line { margin-top: 6px; }
.cmp-name { color: var(--text-2); font-weight: 500; }
.cmp-line b { text-align: right; font-variant-numeric: tabular-nums; }
.cmp-track { height: 12px; border-radius: 6px; background: var(--bg-alt); overflow: hidden; }
.cmp-fill { display: block; height: 100%; border-radius: 6px; background: var(--text-2); opacity: .55; }
.cmp-fill.is-ours { background: var(--accent); opacity: 1; }
.cmp-fill.w16 { width: 16.5%; }
.cmp-fill.w66 { width: 66%; }
.cmp-fill.w71 { width: 71%; }
.cmp-fill.w90 { width: 90%; }
.cmp-fill.w100 { width: 100%; }
.cmp figcaption { margin-top: 18px; font-size: 13px; line-height: 1.55; color: var(--text-2); }

/* częste pytania */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0;
  cursor: pointer; list-style: none; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; line-height: 1; color: var(--text-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: -4px 0 18px; color: var(--text-2); }

/* zakończenie */
.article-cta { margin-top: 3em; padding: 32px 28px; border-radius: var(--radius); background: var(--bg-alt); text-align: center; }
.article-cta p { margin: 0; }
.article-cta-title { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.02em; }
.article-cta .cta-row { justify-content: center; margin-top: 18px; }
.article-cta .article-note { margin-top: 16px; }

@media (max-width: 680px) {
  .article-body { font-size: 17px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .box, .cmp { padding: 20px; }
  .cmp-line { grid-template-columns: 64px minmax(0, 1fr) 46px; gap: 8px; }
  .exchange li { padding: 14px 16px 16px; }
}

/* tekst artykułu wyrównany do obu krawędzi, z dzieleniem wyrazów; na telefonie do lewej */
@media (min-width: 681px) {
  .article-body > p, .article-body .points li, .article-body .box li {
    text-align: justify; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3;
  }
}
