/* warstw.ai — style strony. Bez frameworków, bez zewnętrznych zasobów. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+2212, U+2713, U+20AC;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-pl.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-017F;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+2212, U+2713, U+20AC;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-pl.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-017F;
}
/* Zastępcze kroje o tych samych metrykach: podmiana fontu nie przesuwa układu (CLS). */
@font-face {
  font-family: "Grotesk Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Roboto");
  size-adjust: 100%;
  ascent-override: 97.7%;
  descent-override: 25.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Mono Fallback";
  src: local("Courier New"), local("Liberation Mono"), local("Menlo"), local("Consolas");
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
}

:root {
  --paper: #f5f3ee;
  --paper-2: #ece8df;
  --sheet: #fffdf9;
  --ink: #101b38;
  --ink-2: #3c4859;
  --ink-3: #5d6877;
  --line: #d9d4c9;
  --line-2: #c7c0b2;

  /* Kolory z logo: niebieski z „.ai” i trzy warstwy sygnetu (od góry). */
  --blue: #1769ff;
  --blue-ink: #1157e0;
  --blue-2: #6fa0ff;
  --blue-3: #b5ceff;
  --blue-4: #e4edff;
  --l1: linear-gradient(#29c5f6, #1769ff);
  --l2: linear-gradient(#1769ff, #4023d9);
  --l3: linear-gradient(#2a2a9c, #161b70);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --check: #8a4b05;
  --check-bg: #fbeed6;
  --ok: #1d6b3c;
  --ok-bg: #e2f1e6;

  --sans: "Schibsted Grotesk", "Grotesk Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gut: clamp(16px, 4.5vw, 56px);
  --sec: clamp(64px, 8vw, 112px);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--blue-3); color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -0.022em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
code, .mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- nagłówek ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-head.up { box-shadow: 0 12px 28px -24px rgba(16, 27, 56, .55); }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; padding: 4px 0; }
.brand img { width: 117px; height: 36px; }
@media (max-width: 480px) { .brand img { width: 104px; height: 32px; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { --pad: 12px; position: relative; color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 10px var(--pad); border-radius: var(--r); transition: color .2s; }
.nav a::after {
  content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 4px; height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: left center; transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.head-mail {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--sheet);
}
.head-mail:hover { border-color: var(--blue); color: var(--blue-ink); }
.head-mail svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 900px) {
  .head-row { flex-wrap: wrap; gap: 0 12px; padding-top: 8px; }
  .head-mail { margin-left: auto; padding: 0 10px; font-size: 0.8rem; }
  .nav { order: 3; width: 100%; margin: 0 -12px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 0.9rem; padding: 10px var(--pad) 12px; }
}
@media (max-width: 400px) {
  .head-mail .full { display: none; }
}
@media (min-width: 401px) {
  .head-mail .short { display: none; }
}

/* ---------- elementy wspólne ---------- */
.label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3);
  margin-bottom: 22px;
}
.label .n { color: var(--blue-ink); }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section { padding: var(--sec) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); max-width: 20ch; }
.section-head .intro { color: var(--ink-2); font-size: 1.1rem; max-width: 46ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r);
  font: 600 1.02rem/1 var(--sans); text-decoration: none; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .3s var(--ease), transform .3s var(--ease);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); }
.more {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; padding: 10px 0;
  background: linear-gradient(currentColor, currentColor) left calc(100% - 7px) / 0 1.5px no-repeat;
  transition: background-size .35s var(--ease);
}
.more::after { content: "→"; content: "→" / ""; transition: transform .3s var(--ease); }
.more:hover { background-size: calc(100% - 1.4em) 1.5px; }
.more:hover::after { transform: translateX(4px); }
/* Mikrointerakcje: przycisk unosi się nad dwie warstwy w kolorach logo, a wciśnięty wraca na nie. */
@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover { box-shadow: 3px 3px 0 var(--blue-3), 6px 6px 0 var(--blue-4); transform: translate(-1px, -1px); }
  .btn-ghost:hover { box-shadow: 3px 3px 0 var(--blue-4); transform: translate(-1px, -1px); }
  .btn:active { box-shadow: 0 0 0 transparent; transform: translate(1px, 1px); transition-duration: .08s; }
  .btn:hover svg { transform: translateX(1px) rotate(-6deg); }
}
.tag { display: inline-block; font-family: var(--mono); font-size: 0.75rem; padding: 3px 8px; border-radius: 3px; white-space: nowrap; }
.tag-check { background: var(--check-bg); color: var(--check); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-example { background: var(--ink); color: #fff; letter-spacing: 0.04em; text-transform: uppercase; }

/* „warstwy” — miniatura sygnetu: trzy płytki w rzucie izometrycznym, kolory jak w logo */
.layers-mark { position: relative; display: inline-block; flex: none; width: 24px; height: 24px; }
.layers-mark i {
  --lift: 0px;
  position: absolute; left: 3.5px; width: 17px; height: 17px; border-radius: 3.5px;
  transform: translateY(var(--lift)) scaleY(.57735) rotate(45deg);
  transition: transform .45s var(--ease), opacity .45s;
}
.layers-mark i:nth-child(1) { top: -1px; z-index: 3; background: linear-gradient(105deg, #29c5f6, #1769ff); }
.layers-mark i:nth-child(2) { top: 4.5px; z-index: 2; background: linear-gradient(105deg, #1769ff, #4023d9); }
.layers-mark i:nth-child(3) { top: 10px; z-index: 1; background: linear-gradient(105deg, #2a2a9c, #161b70); }

/* ---------- hero ---------- */
.hero { position: relative; overflow-x: clip; }
.hero-fig { margin: 0; min-width: 0; }
.hero-pin { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 22px; display: flex; gap: 12px; align-items: center; }
/* Hasło marki nad nagłówkiem: zdanie, nie etykieta, więc bez wersalików i bez kroju mono. */
.eyebrow.tagline { font-family: var(--sans); font-size: clamp(1rem, 1.25vw, 1.12rem); font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--ink); gap: 14px; }
.hero h1 { text-wrap: wrap; font-size: clamp(2.25rem, 4.4vw, 3.9rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 750; }
.hero h1 .l1, .hero h1 .l2 { display: block; }
.hero h1 .l2 { color: var(--blue); }
.lead { font-size: clamp(1.1rem, 1.4vw, 1.22rem); color: var(--ink-2); max-width: 34em; margin: 24px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-mail { font-family: var(--mono); font-size: 0.95rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); list-style: none; font-size: 0.93rem; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 7px; height: 7px; background: var(--blue); transform: rotate(45deg); flex: none; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Scena: rozrzucone dokumenty układają się w warstwy.
   --p = 0 (bałagan) … 1 (warstwy). Bez JS i przy ograniczonym ruchu zostaje 1. */
.stage {
  --p: 1;
  --raw: clamp(0, calc(1 - (var(--p) - 0.3) * 3.2), 1);
  --clean: clamp(0, calc((var(--p) - 0.52) * 3.2), 1);
  --q: calc(1 - var(--p));
  position: relative; width: 100%; max-width: 560px; height: 520px; margin: 0 auto;
}
.stage-rail {
  position: absolute; left: 22px; top: 40px; bottom: 40px; width: 2px; background: var(--blue);
  transform-origin: top; transform: scaleY(clamp(0, calc((var(--p) - 0.55) * 2.6), 1)); will-change: transform;
}
.layer {
  position: absolute; left: 0; right: 0;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(15, 27, 45, .04), 0 8px 22px rgba(15, 27, 45, .09);
  transform: translate(calc(var(--mx) * var(--q)), calc(var(--my) * var(--q))) rotate(calc(var(--mr) * var(--q)));
  will-change: transform;
  overflow: hidden;
}
.layer::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--edge);
  transform-origin: left; transform: scaleX(var(--p)); will-change: transform;
}
.layer-1 { top: 0;   height: 150px; z-index: 3; --edge: var(--l1); --mx: 26px;  --my: 46px;  --mr: -7deg; margin-left: 46px; }
.layer-2 { top: 166px; height: 150px; z-index: 2; --edge: var(--l2); --mx: -38px; --my: -40px; --mr: 5deg; margin-left: 46px; }
.layer-3 { top: 332px; height: 188px; z-index: 1; --edge: var(--l3); --mx: 18px; --my: -126px; --mr: -2.5deg; margin-left: 46px; }
.knot {
  position: absolute; left: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--blue);
  opacity: var(--clean); transform: scale(var(--clean)); will-change: transform, opacity;
}
.knot-1 { top: 66px; } .knot-2 { top: 232px; } .knot-3 { top: 417px; background: #161b70; border-color: #161b70; }
.face { will-change: opacity; position: absolute; inset: 0; padding: 14px 18px 14px 22px; font-size: 0.85rem; line-height: 1.45; }
.face.raw { opacity: var(--raw); }
.face.clean { opacity: var(--clean); }
.face-k { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.face-k b { color: var(--blue-ink); font-weight: 400; }
.mail-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.mail-body { margin-top: 6px; color: var(--ink); font-size: 0.84rem; }
.inv { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-family: var(--mono); font-size: 0.74rem; }
.inv dt { color: var(--ink-3); }
.inv dd { margin: 0; text-align: right; }
.inv .total { font-weight: 400; color: var(--ink); border-top: 1px dashed var(--line-2); padding-top: 4px; }
.csv { font-family: var(--mono); font-size: 0.72rem; white-space: pre; color: var(--ink-2); line-height: 1.6; margin: 0; }
.csv mark { background: var(--check-bg); color: var(--check); padding: 0 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 0.72rem; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 8px; background: var(--paper); }
.chips + p { margin-top: 10px; color: var(--ink-2); font-size: 0.8rem; }
.rules { list-style: none; font-family: var(--mono); font-size: 0.73rem; display: grid; gap: 3px; }
.rules li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.rules li span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.mini-table th { text-align: left; font-weight: 400; color: var(--ink-3); padding: 0 6px 6px 0; border-bottom: 1px solid var(--line-2); }
.mini-table td { padding: 7px 6px 7px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mini-table .r { text-align: right; }
.stage-note { display: grid; gap: 4px; max-width: 560px; margin: 14px auto 0; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }
.stage-note .hint { display: none; color: var(--blue-ink); }
.motion .stage-note .hint, .soft .stage-note .hint { display: inline; }
.motion .stage, .soft .stage { --p: 0; }
@media (max-width: 520px) {
  .layer { margin-left: 34px !important; }
  .stage-rail { left: 15px; }
  .knot { left: 7px; }
  .face { padding: 12px 12px 12px 18px; }
  .hide-sm, .face-k b, .chips + p { display: none; }
  .chip { font-size: 0.68rem; padding: 3px 6px; }
  .mail-body { font-size: 0.8rem; }
  .stage { height: 500px; }
  .layer-1 { height: 136px; }
  .layer-2 { top: 150px; height: 150px; }
  .layer-3 { top: 314px; height: 186px; }
  .knot-1 { top: 59px; } .knot-2 { top: 216px; } .knot-3 { top: 398px; }
}

/* Przypięcie hero na dużych ekranach — tylko gdy działa JS i ruch jest dozwolony. */
@media (min-width: 961px) and (min-height: 800px) and (prefers-reduced-motion: no-preference) {
  .motion .hero { height: 165vh; }
  .motion .hero-pin { position: sticky; top: 68px; min-height: calc(100vh - 68px); display: flex; align-items: center; padding: 24px 0; }
  .motion .hero-pin > .wrap { width: 100%; }
}

/* ---------- 01 lista czynności ---------- */
.work { list-style: none; border-top: 1px solid var(--ink); }
.work li { display: grid; grid-template-columns: 64px minmax(0, 5fr) minmax(0, 6fr); gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.work .num { font-family: var(--mono); font-size: 0.85rem; color: var(--blue-ink); padding-top: 6px; }
.work h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -0.02em; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); margin-top: 12px; }
.flow .arrow { color: var(--blue); }
.flow span:not(.arrow) { background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px; }
.work p { color: var(--ink-2); padding-top: 4px; }
.work-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; align-items: baseline; margin-top: 36px; }
.work-foot p { font-size: 1.15rem; max-width: 40em; margin: 0; }
@media (max-width: 760px) {
  .work li { grid-template-columns: 40px minmax(0, 1fr); }
  .work li > p { grid-column: 2; }
}

/* ---------- 02 kroki ---------- */
/* Niebieska linia procesu: skrypt wypełnia ją przy przewijaniu (--rp 0…1). Bez JS jest pełna. */
.steps { --rp: 1; position: relative; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); counter-reset: s; }
.steps::after {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--blue);
  transform-origin: left center; transform: scaleX(var(--rp)); will-change: transform;
}
.steps li { position: relative; padding: 26px 22px 8px 0; counter-increment: s; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--blue-ink); margin-bottom: 18px; }
/* Węzeł na linii: mała płytka jak w sygnecie, zapala się, gdy dojdzie do niej linia. */
.steps li::after {
  content: ""; position: absolute; z-index: 1; top: -8px; left: -6.5px; width: 13px; height: 13px; border-radius: 3px;
  background: var(--blue); box-shadow: 0 0 0 2px var(--blue);
  transform: scaleY(.57735) rotate(45deg);
}
.steps.rail li.on::after { animation: knot-on .5s var(--ease); }
@keyframes knot-on { from { transform: scale(.4) scaleY(.57735) rotate(45deg); } }
.steps li:first-child::after { left: 0; }
.steps.rail li:not(.on)::after { background: var(--paper); box-shadow: 0 0 0 2px var(--line-2); }
.steps h3 { font-size: 1.2rem; margin-bottom: 10px; letter-spacing: -0.015em; }
.steps p { font-size: 0.97rem; color: var(--ink-2); }
.steps li:last-child h3 { color: var(--blue-ink); }
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; }
  .steps::after { left: 3px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform-origin: center top; transform: scaleY(var(--rp)); }
  .steps li, .steps li + li { display: grid; grid-template-columns: 70px minmax(0, 1fr); padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .steps li::before { grid-row: span 2; margin: 3px 0 0; padding-left: 26px; }
  .steps li::after, .steps li:first-child::after { top: 27px; left: -2.5px; }
}
.aside-note { margin-top: 40px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; max-width: 760px; padding: 22px 24px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.aside-note p { margin: 0; color: var(--ink-2); }
.aside-note strong { color: var(--ink); }

/* ---------- 03 dokument diagnozy ---------- */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .doc-wrap { grid-template-columns: 1fr; } }
.doc {
  position: relative; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px;
  padding: clamp(22px, 4vw, 48px); box-shadow: 8px 8px 0 var(--blue-4), 16px 16px 0 var(--blue-3);
  margin: 0 16px 16px 0;
}
.doc-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; align-items: center; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); }
.doc-top .mono { color: var(--ink-3); font-size: 0.8rem; }
.doc h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 6px; }
.doc .sub { color: var(--ink-3); font-size: 0.95rem; margin-bottom: 26px; }
.doc-sec { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.doc-sec > h4, .doc-sec > .dh { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-ink); padding-top: 4px; line-height: 1.4; }
.doc-sec p, .doc-sec li { color: var(--ink); font-size: 0.98rem; }
.doc-sec ol, .doc-sec ul { padding-left: 1.2em; display: grid; gap: 6px; }
@media (max-width: 600px) { .doc-sec { grid-template-columns: 1fr; } }
.calc { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.calc td { padding: 7px 0; border-bottom: 1px dashed var(--line-2); vertical-align: top; }
.calc td:last-child { text-align: right; font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; padding-left: 16px; }
.calc tr.sum td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 650; padding-top: 10px; }
.calc tr.sum td:last-child { color: var(--blue-ink); font-weight: 400; }
.calc tr.pay td { border-bottom: 0; padding-top: 6px; font-size: 0.86rem; color: var(--ink-3); }
.calc tr.pay td:last-child { font-size: 0.8rem; }
.doc-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-3); }
.side-points { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.side-points li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.side-points strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.side-points span { color: var(--ink-2); font-size: 0.97rem; }

/* ---------- 04 ceny ---------- */
.crumbs, .page-head { box-sizing: border-box; }
/* Przykłady rozwiązań (dopisek 8): jedno zrobione narzędzie i propozycje, wyraźnie oznaczone. */
.ex-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 48px; align-items: start; padding: clamp(22px, 3.5vw, 36px) clamp(22px, 4vw, 40px); background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px; }
.ex-main h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 10px; }
.ex-main > div > p { color: var(--ink-2); }
.ex-points { list-style: none; display: grid; gap: 8px; margin-top: 16px; color: var(--ink-2); font-size: 0.96rem; }
.ex-points li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; }
.ex-points li::before { content: ""; width: 7px; height: 7px; margin-top: 0.6em; background: var(--blue); transform: rotate(45deg); }
.ex-try { margin-top: 22px; display: grid; gap: 10px; justify-items: start; }
.ex-try p { font-size: 0.85rem; color: var(--ink-3); max-width: 42ch; }
.ex-shot { margin: 0; }
.ex-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 10px 26px -18px rgba(16, 27, 56, .5); }
.ex-shot figcaption { margin-top: 8px; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }
.ex-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: 40px; border-top: 1px solid var(--ink); }
.ex-list li { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.ex-list h3 { font-size: 1.12rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.ex-list p:not(.ex-k) { color: var(--ink-2); font-size: 0.95rem; }
.ex-k { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 8px; }
@media (max-width: 960px) { .ex-main { grid-template-columns: 1fr; } .ex-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ex-list { grid-template-columns: 1fr; } }

/* Pakiety o stałej cenie (zadanie 013). Cena jest częścią nagłówka, żeby zdanie „pakiet: kwota”
   było całe w jednym miejscu dla czytelnika, Google i asystentów AI. */
.pk-list { border-top: 1px solid var(--ink); }
.pk { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.pk h2, .pk h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 40px; font-size: clamp(1.08rem, 1.6vw, 1.28rem); letter-spacing: -0.015em; line-height: 1.25; }
.pk-name { flex: 1 1 30ch; max-width: 52ch; }
.pk-price { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: 0.92em; letter-spacing: 0; color: var(--blue-ink); white-space: nowrap; }
.pk-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 40px; margin-top: 8px; }
.pk-body p { flex: 1 1 36ch; max-width: 66ch; color: var(--ink-2); }
.pk-body .pk-term { flex: 0 0 auto; margin-left: auto; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; }
.pk-more { margin-top: 22px; }
.pk-intro { color: var(--ink-2); max-width: 62ch; margin-bottom: 26px; font-size: 1.05rem; }
.adv .pk-price { display: block; margin: 8px 0 0; font-size: 0.62em; }
@media (max-width: 600px) {
  .pk-price, .pk-body .pk-term { margin-left: 0; }
  .pk-body .pk-term { order: -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .pk-price { transition: color .25s; }
  .pk:hover .pk-price { color: var(--blue); }
}
.after-pay {
  margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center;
  background: var(--ink); color: #fff; border-radius: 6px; padding: clamp(24px, 4vw, 40px);
}
.after-pay h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 10px; }
.after-pay p { color: #c9d0db; margin: 0; max-width: 52ch; }
.after-pay .btn-ghost { color: #fff; border-color: #56637a; }
.after-pay .btn-ghost:hover { border-color: #fff; box-shadow: 3px 3px 0 #2d3d6c; }
@media (max-width: 760px) { .after-pay { grid-template-columns: 1fr; } }

/* ---------- o mnie ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); }
.about .big { font-size: clamp(1.45rem, 2.6vw, 2.1rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.about .big strong { font-weight: 700; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.rules-list { list-style: none; counter-reset: r; border-top: 1px solid var(--ink); }
.rules-list li { counter-increment: r; display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 18px 0; border-bottom: 1px solid var(--line); }
.rules-list li::before { content: counter(r, decimal-leading-zero); font-family: var(--mono); font-size: 0.8rem; color: var(--blue-ink); padding-top: 4px; }
.mt { margin-top: 20px; }
.rules-list strong { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.rules-list span { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ink); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 16px; align-items: center;
  padding: 22px 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 650; letter-spacing: -0.015em;
  transition: color .2s;
}
.faq summary:hover { color: var(--blue-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 14px; height: 14px; justify-self: end; margin-right: 6px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg) translate(-3px, -3px); transition: transform .4s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq .ans { padding: 0 44px 24px 0; color: var(--ink-2); max-width: 70ch; }
.faq details[open] .ans { animation: ans-in .5s var(--ease); }
@keyframes ans-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- kontakt ---------- */
.contact { background: var(--sheet); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact h2 { font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -0.03em; }
.contact .intro { color: var(--ink-2); font-size: 1.12rem; margin: 22px 0 32px; max-width: 40ch; }
.mail-big {
  display: inline-block; font-family: var(--mono); font-size: clamp(1.15rem, 3.4vw, 1.9rem); color: var(--blue-ink);
  text-decoration: none; padding-bottom: 6px; word-break: break-all;
  background: linear-gradient(var(--blue-3), var(--blue-3)) left bottom / 100% 2px no-repeat;
}
.mail-big:hover { background-image: linear-gradient(var(--blue), var(--blue)); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.copy-btn { display: none; }
.js .copy-btn { display: inline-flex; }
.copy-btn.done { border-color: var(--ok); color: var(--ok); }
.copy-btn.done span { animation: ans-in .4s var(--ease); }
.reply-time { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; font-size: 0.97rem; color: var(--ink-2); max-width: 52ch; }
.reply-time::before { content: ""; width: 8px; height: 8px; margin-top: 0.55em; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); flex: none; }
.template { background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; padding: 22px 24px; }
.template .face-k { margin-bottom: 14px; }
.template ol { list-style: none; counter-reset: t; display: grid; gap: 12px; }
.template li { counter-increment: t; display: grid; grid-template-columns: 26px minmax(0, 1fr); font-size: 0.98rem; }
.template li::before { content: counter(t) "."; font-family: var(--mono); color: var(--blue-ink); font-size: 0.85rem; padding-top: 2px; }
.template li em { display: block; font-style: normal; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }
.template .note { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 0.88rem; color: var(--ink-3); }

/* ---------- stopka ---------- */
.site-foot { background: var(--ink); color: #c9d0db; padding: 64px 0 32px; font-size: 0.95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 36px 48px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-slogan { margin-top: 18px; max-width: 24ch; color: #fff; font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.foot-tag { margin-top: 8px; max-width: 30ch; }
.foot-h { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8d99ab; margin: 0 0 14px; font-weight: 400; }
.foot-list { list-style: none; display: grid; gap: 8px; }
.foot-list .mono { font-size: 0.92rem; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 52px; padding-top: 22px; border-top: 1px solid #2a384d; font-size: 0.85rem; color: #8d99ab; }

/* ---------- podstrony ---------- */
.crumbs { padding-top: 28px; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); }
.page-head { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(48px, 7vw, 88px); }
.page-head h1 { font-size: clamp(2.4rem, 5.8vw, 4.8rem); letter-spacing: -0.032em; line-height: 1; max-width: 16ch; }
.page-head .lead { margin-bottom: 0; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 18px; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; margin-bottom: 1em; }
.area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px clamp(28px, 5vw, 72px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.area:first-of-type { border-top: 1px solid var(--ink); }
@media (max-width: 900px) { .area { grid-template-columns: 1fr; } }
.area .num { font-family: var(--mono); font-size: 0.85rem; color: var(--blue-ink); display: block; margin-bottom: 12px; }
.area h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 16px; }
.area .desc { color: var(--ink-2); }
.area dl { display: grid; gap: 14px; margin: 22px 0 0; }
.area dt { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.area dd { margin: 2px 0 0; color: var(--ink); }
.sample { background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; align-self: start; }
.sample-bar { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.sample-io { display: grid; grid-template-columns: minmax(0, 1fr); }
.sample-io > div { padding: 16px; }
.sample-io > div + div { border-top: 1px dashed var(--line-2); background: color-mix(in srgb, var(--blue-4) 45%, var(--sheet)); }
.sample-io .k { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-ink); margin-bottom: 8px; }
.sample pre { margin: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.sample .mini-table { font-size: 0.74rem; }
.scroll-x { overflow-x: auto; }
.cta-band { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); background: var(--sheet); }
.cta-band .inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 22ch; }
.cta-band p { color: var(--ink-2); margin-top: 10px; }
.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--ink); list-style: none; }
.next-links a { display: block; padding: 22px 20px 22px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.next-links a span { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.next-links a strong { font-size: 1.15rem; }
.next-links a:hover strong { color: var(--blue-ink); }

.notfound { padding: clamp(64px, 12vw, 160px) 0; }
.notfound .code { font-family: var(--mono); color: var(--blue-ink); margin-bottom: 18px; }

/* Ograniczony ruch (np. Windows: wyłączone „Efekty animacji”): nic się nie przesuwa ani nie skaluje.
   Zostają łagodne przejścia przezroczystości i koloru, a sceny w trybie .soft tylko przenikają. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: opacity, color, background-color, border-color !important; }
}
.soft .layer, .soft .knot { transform: none; }
.soft .layer::before { transform: none; opacity: var(--p); }
.soft .stage-rail { transform: none; opacity: clamp(0, calc((var(--p) - 0.55) * 2.6), 1); }
.soft .chore { --e: 0; --q: 1; }
.soft .steps::after { transform: none; opacity: var(--rp); }
.soft .rv, .soft .label.rv, .soft .label.rv::after, .soft .scale.rv::before { transform: none; }
.soft .rv .layers-mark i { --lift: 0px; }
.soft .rv .sample-io > div + div { clip-path: none; }
.soft .rv .mail-big { background-size: 100% 2px; }
.soft .doc.rv { box-shadow: 8px 8px 0 var(--blue-4), 16px 16px 0 var(--blue-3); }
@media print {
  .site-head, .site-foot, .cta-row, .contact-actions { display: none; }
  body { background: #fff; }
  .rv { opacity: 1 !important; transform: none !important; }
  .stage, .proc { --p: 1 !important; }
  .steps { --rp: 1 !important; }
}

/* Znaczniki list w Chrome używają cyfr tabelarycznych; w tym kroju kropka robi się wtedy szeroka. */
li::marker { font-variant-numeric: proportional-nums; }
@media (max-width: 600px) { .calc td:last-child { font-size: 0.8rem; padding-left: 10px; } }

/* Blok: złożone integracje, wycena indywidualna */
.adv { margin-top: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 24px; align-items: start; padding: clamp(22px, 3.5vw, 36px) clamp(22px, 4vw, 40px); background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px; }
.adv .layers-mark { margin-top: 6px; }
.adv-k { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-ink); margin-bottom: 8px; }
.adv h2, .adv h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 12px; max-width: 30ch; }
.adv p:not(.adv-k) { color: var(--ink-2); max-width: 68ch; }
.adv a.mono { font-size: 0.92em; }
@media (max-width: 520px) { .adv { grid-template-columns: 1fr; } .adv .layers-mark { display: none; } }

/* Blok: większe zlecenia i optymalizacja procesów (sekcja 01).
   Krawędź z trzech odcieni niebieskiego to te same warstwy co w logo i w hero. */
.scale {
  position: relative; overflow: hidden;
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 28px clamp(32px, 5vw, 64px);
  padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 44px) clamp(24px, 4vw, 44px) calc(clamp(20px, 4vw, 44px) + 8px);
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 6px;
}
.scale::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: var(--l1) top / 100% 33.34% no-repeat, var(--l2) center / 100% 33.33% no-repeat, var(--l3) bottom / 100% 33.34% no-repeat;
  transform-origin: left top; transition: transform .45s var(--ease);
}
.scale h3 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); margin-bottom: 14px; max-width: 22ch; }
.scale-main > p:not(.adv-k) { color: var(--ink-2); max-width: 60ch; }
.scale-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.scale-cta .mono { font-size: 0.92rem; }
.scale-list { list-style: none; border-top: 1px solid var(--ink); align-self: start; }
.scale-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.scale-list strong { display: block; font-size: 1.08rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.scale-list span { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 900px) { .scale { grid-template-columns: 1fr; } }

/* Telefony: pięć linków nawigacji mieści się w jednym wierszu, bez uciętego ostatniego. */
@media (max-width: 480px) {
  .nav { justify-content: space-between; width: calc(100% + 18px); margin: 0 -9px; gap: 0; }
  .nav a { --pad: 9px; font-size: 0.88rem; }
}

/* ---------- 02: scena „ręczna praca → warstwy” ----------
   --p = 0: rozrzucone karteczki i skróty klawiszowe; 1: trzy płytki sygnetu z opisami.
   Karteczki lądują po kolei (dolna warstwa, środkowa, górna), kładą się w rzucie izometrycznym
   i znikają, gdy pod nimi pojawia się płytka. Bez JS i przy ograniczonym ruchu zostaje --p: 1. */
.section-head.has-fig { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
.section-head.has-fig .intro { margin-top: 22px; }
@media (max-width: 860px) { .section-head.has-fig { grid-template-columns: 1fr; } }
.proc-fig { margin: 0; min-width: 0; }
.proc { --p: 1; position: relative; width: 100%; max-width: 460px; aspect-ratio: 440 / 270; margin: 0 0 0 auto; }
@media (max-width: 860px) { .proc { margin: 6px 0 0; } }
.proc-note { max-width: 460px; margin: 14px 0 0 auto; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }
@media (max-width: 860px) { .proc-note { margin-left: 0; } }
.proc-now {
  position: absolute; left: 0; top: 0; font: 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3);
  opacity: calc(1 - clamp(0, (var(--p) - 0.06) / 0.12, 1));
}
.pl { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: opacity; }
.pl-2 { opacity: clamp(0, calc((var(--p) - 0.36) / 0.06), 1); }
.pl-1 { opacity: clamp(0, calc((var(--p) - 0.64) / 0.06), 1); }
.pl-0 { opacity: clamp(0, calc((var(--p) - 0.89) / 0.06), 1); }
.pl .lead { fill: none; stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pl .lead-dot { fill: var(--ink); }
.pl-label { will-change: opacity; position: absolute; left: 61.5%; transform: translateY(-0.65em); font: 0.8rem/1.3 var(--mono); color: var(--ink); white-space: nowrap; }
.pl-label .n { color: var(--blue-ink); }
.pl-label small { display: block; font-size: 0.7rem; color: var(--ink-3); }
.pl-label-2 { opacity: clamp(0, calc((var(--p) - 0.42) / 0.1), 1); }
.pl-label-1 { opacity: clamp(0, calc((var(--p) - 0.7) / 0.1), 1); }
.pl-label-0 { opacity: clamp(0, calc((var(--p) - 0.92) / 0.08), 1); }
.chore {
  --t: clamp(0, calc((var(--p) - var(--d)) / 0.3), 1);
  --e: calc(var(--t) * var(--t) * (3 - 2 * var(--t)));
  --q: calc(1 - var(--e));
  position: absolute; left: var(--x); top: var(--y); width: 14.89%; aspect-ratio: 1;
  display: grid; place-items: center; text-align: center; white-space: nowrap;
  font: 0.74rem/1 var(--mono); color: var(--ink-2); letter-spacing: -0.01em;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 12%;
  box-shadow: 0 1px 0 rgba(16, 27, 56, .05), 0 10px 18px -12px rgba(16, 27, 56, .4);
  will-change: transform, opacity; backface-visibility: hidden;
  transform: translate(calc(var(--dx) * var(--q)), calc(var(--dy) * var(--q))) scaleY(calc(1 - 0.42265 * var(--e))) rotate(calc(var(--r) * var(--q) + var(--a) * var(--e)));
  opacity: calc(1 - clamp(0, (var(--p) - var(--f)) / 0.07, 1));
}
.chore-key { background: #fff; color: var(--ink); border-bottom-width: 4px; border-radius: 14%; }
.chore-note { background: var(--check-bg); color: var(--check); border-color: #f1dcb4; }
@media (max-width: 480px) {
  .chore { font-size: 0.6rem; letter-spacing: -0.03em; }
  .pl-label { font-size: 0.72rem; }
  .pl-label small { font-size: 0.62rem; }
}

/* ---------- wejścia przy przewijaniu ----------
   Klasę .rv skrypt dodaje tylko elementom, które przy wczytaniu są poniżej ekranu,
   więc nic, co już widać, nie znika ani nie przeskakuje (CLS i LCP bez zmian).
   Bez JS, przy ograniczonym ruchu i w druku wszystko jest widoczne od razu. */
.rv { opacity: 0; transform: translateY(24px); }
.rv:not(.in), .rv:not(.in) *, .rv:not(.in)::before, .rv:not(.in)::after { transition: none !important; }
.rv.in {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease) var(--rv-d, 0s), transform 1s var(--ease) var(--rv-d, 0s), box-shadow 1s var(--ease) calc(var(--rv-d, 0s) + .35s);
}
.label.rv { transform: translateX(-10px); }
.label.rv.in { transform: none; }
.label.rv::after { transform: scaleX(0); transform-origin: left center; }
.label.rv.in::after { transform: none; transition: transform 1.2s var(--ease) calc(var(--rv-d, 0s) + .1s); }
.doc.rv { box-shadow: 0 0 0 var(--blue-4), 0 0 0 var(--blue-3); }
.doc.rv.in { box-shadow: 8px 8px 0 var(--blue-4), 16px 16px 0 var(--blue-3); }
.scale.rv::before { transform: scaleY(0); }
.scale.rv.in::before { transform: none; transition: transform 1.1s var(--ease) calc(var(--rv-d, 0s) + .25s); }
.rv .layers-mark i { --lift: -10px; opacity: 0; }
.rv.in .layers-mark i { --lift: 0px; opacity: 1; transition: transform .7s var(--ease), opacity .4s; }
.rv.in .layers-mark i:nth-child(3) { transition-delay: calc(var(--rv-d, 0s) + .2s); }
.rv.in .layers-mark i:nth-child(2) { transition-delay: calc(var(--rv-d, 0s) + .32s); }
.rv.in .layers-mark i:nth-child(1) { transition-delay: calc(var(--rv-d, 0s) + .44s); }
.rv .sample-io > div + div { clip-path: inset(0 100% 0 0); }
.rv.in .sample-io > div + div { clip-path: inset(0); transition: clip-path 1.1s var(--ease) calc(var(--rv-d, 0s) + .35s); }
.rv .mail-big { background-size: 0 2px; }
.rv.in .mail-big { background-size: 100% 2px; transition: background-size 1s var(--ease) calc(var(--rv-d, 0s) + .3s); }
.rv.in .reply-time::before { animation: ping 1.4s var(--ease) .7s; }
@keyframes ping { 45% { box-shadow: 0 0 0 9px rgba(29, 107, 60, .14); } }

/* Mikrointerakcje kart: warstwy rozsuwają się pod kursorem. */
@media (prefers-reduced-motion: no-preference) {
  .doc { transition: box-shadow .5s var(--ease); }
  .doc:hover { box-shadow: 10px 10px 0 var(--blue-4), 20px 20px 0 var(--blue-3); }
  .scale:hover::before { transform: scaleX(1.5); }
  .adv:hover .layers-mark i:nth-child(1), .aside-note:hover .layers-mark i:nth-child(1) { --lift: -3px; }
  .adv:hover .layers-mark i:nth-child(3), .aside-note:hover .layers-mark i:nth-child(3) { --lift: 3px; }
  .next-links a strong::after { content: "→"; content: "→" / ""; display: inline-block; margin-left: .4em; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .4s var(--ease); }
  .next-links a:hover strong::after { opacity: 1; transform: none; }
  /* Miniatura sygnetu w hero: płytki kładą się po kolei przy wczytaniu strony. */
  .motion .eyebrow .layers-mark i { animation: tile-in .9s var(--ease) both; }
  .motion .eyebrow .layers-mark i:nth-child(3) { animation-delay: .1s; }
  .motion .eyebrow .layers-mark i:nth-child(2) { animation-delay: .22s; }
  .motion .eyebrow .layers-mark i:nth-child(1) { animation-delay: .34s; }
}
@keyframes tile-in { from { opacity: 0; transform: translateY(-12px) scaleY(.57735) rotate(45deg); } }
