/* ==========================================================================
   AssetWave — design system
   Paleta: kreda (tło), grafit (tekst), tablica (sekcja ciemna),
   żółty marker (akcent: wyłącznie „znalezione / wybrane / ważne”).
   ========================================================================== */

:root {
  --paper: #F1F2EE;
  --paper-2: #E7E9E3;
  --paper-3: #D9DDD4;
  --surface: #FAFBF8;
  --ink: #1C1F1D;
  --ink-2: #4E5550;
  --ink-3: #868D87;
  --rule: #C9CEC6;
  --accent: #FFD23F;
  --accent-deep: #E8B800;

  --board: #22302A;
  --board-2: #2C3C35;
  --board-rule: #3D4F47;
  --board-ink: #E8ECE7;
  --board-mute: #A2AFA7;

  --plan-hatch: #C9CEC6;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-s: 0.9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.15rem + 1.3vw, 2.125rem);
  --fs-2xl: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem);
  --fs-3xl: clamp(2.5rem, 1.3rem + 4.4vw, 5rem);
  --fs-hero: clamp(2.75rem, 0.9rem + 4.4vw, 5.75rem);

  --gutter: clamp(16px, 2vw, 28px);
  --margin: clamp(20px, 5vw, 80px);
  --max: 1440px;
  --section: clamp(96px, 12vw, 184px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);

  --header-h: 72px;
}

/* ---------- Reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.55;
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  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-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}

/* ---------- Typography helpers ---------- */

.section-title {
  font-size: var(--fs-2xl);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
  max-width: 18ch;
}

.section-lead {
  font-size: var(--fs-l);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.link-underline {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.4s var(--ease-out);
}
.link-underline:hover { background-size: 35% 1.5px; }

/* ---------- Buttons ---------- */

.btn {
  --mx: 0px; --my: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-size: var(--fs-s);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.5s var(--ease-out);
}
.btn.is-magnet { transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.12s linear; }
.btn:active { transform: translate3d(var(--mx), var(--my), 0) scale(0.98); }

.btn--sm { min-height: 42px; padding: 0 18px; }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: var(--fs-m); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #000; }
.btn--primary::after {
  /* żółty znacznik — odkrywany przy hoverze, jak zaznaczenie markerem */
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.35s var(--ease-spring);
  margin-right: -17px;
  margin-left: 0;
}
.btn--primary:hover::after { transform: scale(1); margin-right: 0; transition: transform 0.35s var(--ease-spring), margin 0.35s var(--ease-out); }
.btn--primary::after { transition: transform 0.25s var(--ease-out), margin 0.35s var(--ease-out); }

.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--quiet { color: var(--ink); padding-inline: 12px; }
.btn--quiet::before {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  height: 1.5px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0.999);
  transition: transform 0.45s var(--ease-out);
}
.btn--quiet:hover::before { transform: scaleX(0.3); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgb(241 242 238 / 0.92);
  box-shadow: 0 1px 0 var(--rule);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 28px; height: 28px; display: block; border-radius: 7px; transition: transform 0.3s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
@keyframes wave-draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
.brand__name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em; }

.nav__toggle { display: none; }

.nav__menu { display: flex; align-items: center; gap: 36px; }
.nav__list { display: flex; gap: 28px; }
.nav__list a {
  position: relative;
  font-size: var(--fs-s);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--ink); }
.nav__list a:hover::after, .nav__list a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- Hero ---------- */

.hero {
  overflow-x: clip;
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 104px));
  padding-bottom: clamp(64px, 8vw, 120px);
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.hero__copy {
  grid-column: 1 / span 6;
  padding-top: clamp(0px, 3vw, 48px);
  position: relative;
  z-index: 2;
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 680;
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line > span { display: block; }
@media (min-width: 641px) { .hero__title .line { white-space: nowrap; } }

.hero__lead {
  font-size: var(--fs-l);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 40ch;
  margin-bottom: 36px;
  text-wrap: pretty;
}

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 8px; margin-bottom: 28px; }

.hero__note { font-size: var(--fs-s); color: var(--ink-3); }

/* Hero load sequence: the one orchestrated moment on the page */
.js .hero__title .line > span { transform: translateY(105%); }
.js .hero__lead, .js .hero__actions, .js .hero__note { opacity: 0; transform: translateY(12px); }
.js .locator { opacity: 0; }

.is-loaded .hero__title .line > span {
  transform: none;
  transition: transform 1.1s var(--ease-out);
}
.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: 0.08s; }
.is-loaded .hero__title .line:nth-child(3) > span { transition-delay: 0.16s; }
.is-loaded .hero__lead, .is-loaded .hero__actions, .is-loaded .hero__note {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease-out) 0.45s, transform 0.8s var(--ease-out) 0.45s;
}
.is-loaded .hero__actions { transition-delay: 0.55s; }
.is-loaded .hero__note { transition-delay: 0.65s; }
.is-loaded .locator { opacity: 1; transition: opacity 1.2s var(--ease-out) 0.3s; }

/* ---------- Locator (hero product) ---------- */

.locator {
  grid-column: 7 / -1;
  margin-right: calc(var(--margin) * -0.6);
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.locator__search {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 14px 0 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgb(28 31 29 / 0.04), 0 12px 32px -20px rgb(28 31 29 / 0.3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.locator__search:focus-within { border-color: var(--ink); }
.locator__search-icon { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.locator__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: var(--fs-m);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.locator__input:focus-visible { outline: none; }
.locator__input::placeholder { color: var(--ink-3); font-weight: 400; }
.locator__input::-webkit-search-cancel-button { display: none; }
.locator__kbd {
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px 7px;
}
.locator__caret {
  display: inline-block;
  width: 1.5px; height: 1.1em;
  background: var(--ink);
  vertical-align: -0.15em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.locator__chips {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.locator__stage {
  --rx: 50deg;
  --rz: -30deg;
  position: relative;
  z-index: 1;
  height: clamp(340px, 34vw, 480px);
  margin-top: -8px;
  perspective: 1900px;
  perspective-origin: 50% 30%;
  display: grid;
  place-items: center;
}

.plan {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 600 / 380;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateZ(var(--rz));
  will-change: transform;
}

.plan__slab {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--paper-3);
  transform: translateZ(-14px);
  box-shadow: 0 40px 60px -20px rgb(28 31 29 / 0.28);
}

.plan__svg {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plan__floor { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.plan__corridor { fill: var(--paper-2); }

.room rect {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.5;
  transition: fill 0.5s var(--ease-out), opacity 0.5s;
}
.room--stairs rect { fill: url(#hatch); }
.room text {
  font-size: 13px;
  font-weight: 650;
  fill: var(--ink);
  letter-spacing: -0.01em;
}
.room text.room__name { font-size: 10px; font-weight: 500; fill: var(--ink-2); letter-spacing: 0; }

.plan__furniture rect { fill: var(--paper-2); stroke: var(--rule); stroke-width: 1; transition: opacity 0.5s; }
.plan__doors path { stroke: var(--surface); stroke-width: 4; fill: none; }

.plan__route {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.plan__start { fill: var(--ink); }

.plan.has-target .room:not(.is-target) rect { fill: var(--paper); }
.plan.has-target .room--stairs:not(.is-target) rect { fill: url(#hatch); }
.room.is-target rect { fill: var(--accent); }

/* Pin — stands upright regardless of plan tilt */
.pin {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  transition: left 0.01s, top 0.01s;
}
.pin__billboard {
  position: absolute;
  left: 0; top: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
  transform: rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1));
}
.pin__body {
  position: absolute;
  left: -15px;
  bottom: 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-34px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}
.pin.is-down .pin__body {
  transform: none;
  opacity: 1;
  transition: transform 0.7s var(--ease-spring), opacity 0.2s;
}
.pin__head {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px -4px rgb(28 31 29 / 0.45);
}
.pin__head::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.pin__stem { width: 2px; height: 30px; background: var(--ink); }

.pin__pulse {
  position: absolute;
  left: -22px; top: -22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  opacity: 0;
}
.pin.is-down .pin__pulse { animation: pulse 1.6s var(--ease-out) 0.35s 2; }
@keyframes pulse {
  0% { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.locator__result {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: -12px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}
.result { transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.result.is-changing { opacity: 0; transform: translateY(6px); }
.result__name { font-size: var(--fs-l); font-weight: 650; letter-spacing: -0.02em; margin-bottom: 10px; }
.result__meta { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: var(--fs-s); }
.result__meta dt { color: var(--ink-3); font-size: var(--fs-xs); }
.result__meta dd { font-weight: 500; }
.result__time { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; max-width: 18ch; flex: none; }
.result__time span {
  display: block;
  font-size: var(--fs-l);
  font-weight: 650;
  color: var(--ink);
}

/* ---------- Problem ---------- */

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

.problem__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}
.problem__lead { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 48px); }
.problem__title {
  font-size: var(--fs-3xl);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  text-wrap: balance;
}
.problem__text { font-size: var(--fs-l); color: var(--ink-2); max-width: 40ch; text-wrap: pretty; }

.scatter {
  grid-column: 7 / -1;
  position: relative;
  min-height: 560px;
}
.scatter__item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: var(--fs-s);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transform: rotate(var(--r));
  box-shadow: 0 1px 0 var(--rule);
}
.scatter__item:nth-child(2) { background: var(--paper-2); }
.scatter__item:nth-child(4) { border-style: dashed; }
.scatter__item::before {
  /* znacznik „nie wiadomo gdzie” */
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  margin-right: 10px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 11px;
  color: var(--ink-3);
}

.statement {
  padding-top: var(--section);
  padding-bottom: var(--section);
}
.statement__text {
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 24ch;
  margin-left: calc((100% + var(--gutter)) / 12 * 3);
  text-wrap: balance;
}

/* ---------- Modules / demo ---------- */

.modules {
  background: var(--paper-2);
  padding-block: var(--section);
}
.modules__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.modules__head .section-title { grid-column: 1 / span 6; }
.modules__head .section-lead { grid-column: 8 / -1; }

.demo {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.demo__tabs {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.demo__tab {
  position: relative;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 20px 0 20px 22px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: var(--ink-3);
  transition: color 0.25s;
}
.demo__tab::before {
  content: "";
  position: absolute;
  left: 0; top: 24px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent-deep);
  transform: scale(0);
  transition: transform 0.4s var(--ease-spring);
}
.demo__tab:hover { color: var(--ink-2); }
.demo__tab[aria-selected="true"] { color: var(--ink); }
.demo__tab[aria-selected="true"]::before { transform: scale(1); }
.demo__tab-name { font-size: var(--fs-l); font-weight: 650; letter-spacing: -0.02em; }
.demo__tab-desc {
  font-size: var(--fs-s);
  line-height: 1.45;
  max-width: 34ch;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.45s var(--ease-out), opacity 0.3s;
}
.demo__tab-desc { overflow: hidden; }
.demo__tab[aria-selected="true"] .demo__tab-desc { grid-template-rows: 1fr; opacity: 1; color: var(--ink-2); }

.demo__window {
  grid-column: 6 / -1;
  margin-right: calc(var(--margin) * -1);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  box-shadow: 0 30px 60px -40px rgb(28 31 29 / 0.35);
  min-height: 520px;
  overflow: hidden;
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid var(--paper-2);
}
.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-3); }
.window__url { font-size: var(--fs-xs); color: var(--ink-3); }

.demo__panel { padding: clamp(20px, 2.4vw, 36px); }
.demo__panel:focus-visible { outline-offset: -4px; }
.demo__panel.is-entering { animation: panel-in 0.5s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

.ui__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.ui__title { font-size: var(--fs-m); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 16px; }
.ui__toolbar .ui__title { margin-bottom: 0; }
.ui__filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-chip {
  font-size: var(--fs-xs);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--paper-3);
  color: var(--ink-2);
}
.ui-chip b { font-weight: 650; color: var(--ink); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ui-chip--on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ui-chip--on b { color: var(--paper); }

.ui__table-wrap { overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.ui-table th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-3);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--paper-3);
  white-space: nowrap;
}
.ui-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--paper-2); white-space: nowrap; }
.ui-table td:first-child { color: var(--ink-3); }
.ui-table .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.ui-table tbody tr { transition: background-color 0.2s; }
.ui-table tbody tr:hover { background: var(--paper); }
.ui-table tr.is-found td:nth-child(2) { background: linear-gradient(var(--accent), var(--accent)) 0 85% / 100% 0.45em no-repeat; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-2); }
.status--ok::before { background: var(--ink); border-color: var(--ink); }
.status--wait::before { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border-color: var(--ink); }
.status--due::before { background: var(--accent); border-color: var(--accent-deep); }
.status--new::before { border-color: var(--ink-3); }

.ui--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 36px); }

.tickets { border-top: 1px solid var(--paper-3); }
.ticket {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--paper-2);
  font-size: var(--fs-s);
}
.ticket.is-active { background: var(--paper); box-shadow: inset 3px 0 0 var(--ink); }
.ticket__id { color: var(--ink-3); font-variant-numeric: tabular-nums; grid-row: span 3; }
.ticket__title { font-weight: 600; }
.ticket__place { color: var(--ink-2); font-size: var(--fs-xs); }

.ticket-detail { border-left: 1px solid var(--paper-2); padding-left: clamp(20px, 2.4vw, 36px); }
.ticket-detail__id { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 6px; }
.ticket-detail__title { font-weight: 650; font-size: var(--fs-l); line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 20px; }
.kv { display: grid; gap: 10px; margin-bottom: 24px; font-size: var(--fs-s); }
.kv dt { font-size: var(--fs-xs); color: var(--ink-3); }
.mini-log { display: grid; gap: 10px; font-size: var(--fs-s); border-left: 1.5px solid var(--paper-3); padding-left: 14px; }
.mini-log time { display: inline-block; width: 46px; color: var(--ink-3); }

.schedule { display: grid; font-size: var(--fs-xs); margin-bottom: 24px; overflow-x: auto; }
.schedule__row {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, minmax(72px, 1fr));
  border-bottom: 1px solid var(--paper-2);
  min-height: 52px;
  align-items: center;
}
.schedule__row > span { padding: 6px 6px 6px 0; }
.schedule__row--head { min-height: 32px; color: var(--ink-3); border-bottom-color: var(--paper-3); }
.schedule__row [role="rowheader"] { font-weight: 600; font-size: var(--fs-s); }
.slot {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--paper-2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid var(--ink);
}
.slot--alt { background: var(--ink); color: var(--paper); }
.requests { display: grid; gap: 0; border-top: 1px solid var(--paper-3); font-size: var(--fs-s); }
.requests li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--paper-2); }

.deadlines { display: grid; gap: 18px; }
.deadlines li { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: var(--fs-s); }
.deadlines__days { color: var(--ink-2); font-size: var(--fs-xs); }
.deadlines__bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.deadlines__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc((60 - var(--d)) / 60 * 100%);
  background: var(--ink);
  border-radius: inherit;
}
.deadlines li:first-child .deadlines__bar::after { background: var(--accent-deep); }

.keys ul { display: grid; border-top: 1px solid var(--paper-3); }
.keys li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--paper-2); font-size: var(--fs-s); }
.keys b {
  min-width: 48px;
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 12px 4px 4px 12px;
  text-align: center;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.keys span { color: var(--ink-2); }

.bars { display: grid; gap: 16px; margin-bottom: 28px; }
.bars li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  font-size: var(--fs-s);
}
.bars b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bars i {
  grid-column: 1 / -1;
  height: 22px;
  background: var(--paper-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(calc(var(--v) / 100));
  background: var(--ink);
  transition: transform 0.9s var(--ease-out);
}
.demo__panel.is-entering .bars i::after { animation: bar-grow 0.9s var(--ease-out); }
@keyframes bar-grow { from { transform: scaleX(0); } }
.forecast {
  font-size: var(--fs-s);
  color: var(--ink-2);
  padding: 16px 18px;
  border: 1px solid var(--paper-3);
  border-radius: 6px;
  max-width: 52ch;
}
.forecast b { color: var(--ink); background: linear-gradient(var(--accent), var(--accent)) 0 88% / 100% 0.42em no-repeat; }

.modules__more { margin-top: 48px; }
.modules__more p {
  max-width: 58ch;
  font-size: var(--fs-s);
  color: var(--ink-2);
  margin-left: 0;
}

/* ---------- Fault story ---------- */

.story { padding-block: var(--section); }
.story__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.story__copy { grid-column: 1 / span 6; }
.story__copy .section-title { margin-bottom: clamp(48px, 6vw, 96px); }

.story__steps { counter-reset: step; }
.story__step {
  counter-increment: step;
  position: relative;
  min-height: 52vh;
  padding: 0 0 48px 64px;
  color: var(--ink-3);
  transition: color 0.45s var(--ease-out);
}
.story__step:last-child { min-height: 0; }
.story__step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: var(--fs-s);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.45s, color 0.45s, border-color 0.45s;
}
.story__step::after {
  content: "";
  position: absolute;
  left: 18px; top: 46px; bottom: 6px;
  width: 1.5px;
  background: var(--rule);
}
.story__step:last-child::after { display: none; }
.story__step h3 { font-size: var(--fs-xl); font-weight: 650; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 14px; max-width: 22ch; }
.story__step p { font-size: var(--fs-m); max-width: 42ch; }
.story__step.is-active { color: var(--ink); }
.story__step.is-active p { color: var(--ink-2); }
.story__step.is-active::before { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.story__device {
  grid-column: 8 / span 4;
  position: sticky;
  top: calc(50vh - 300px);
  height: 600px;
  align-self: start;
  margin-top: clamp(120px, 14vw, 200px);
}

.phone {
  width: 300px;
  height: 600px;
  margin-inline: auto;
  padding: 12px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 50px 80px -50px rgb(28 31 29 / 0.6);
}
.phone__screen {
  height: 100%;
  border-radius: 33px;
  background: var(--paper);
  padding: 46px 18px 18px;
  overflow: hidden;
}
.phone__app { font-weight: 700; font-size: 1.375rem; letter-spacing: -0.03em; margin-bottom: 16px; }
.phone__card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 10px 10px 14px;
  margin-bottom: 18px;
}
.phone__photo { border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.phone__title { font-weight: 650; letter-spacing: -0.015em; }
.phone__place { font-size: var(--fs-xs); color: var(--ink-2); margin-bottom: 14px; }
.phone__status { display: flex; flex-wrap: wrap; gap: 5px; }
.phone__pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-3);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.phone__log { display: grid; gap: 10px; font-size: var(--fs-xs); }
.phone__log li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.phone__log time { color: var(--ink-3); }

.phone[data-state="0"] .phone__pill[data-label="0"],
.phone[data-state="1"] .phone__pill[data-label="1"],
.phone[data-state="2"] .phone__pill[data-label="2"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.phone[data-state="3"] .phone__pill[data-label="3"] { background: var(--accent); border-color: var(--accent-deep); color: var(--ink); }

.phone[data-state="0"] [data-log="0"],
.phone[data-state="1"] [data-log="0"], .phone[data-state="1"] [data-log="1"],
.phone[data-state="2"] [data-log="0"], .phone[data-state="2"] [data-log="1"], .phone[data-state="2"] [data-log="2"],
.phone[data-state="3"] [data-log] { opacity: 1; transform: none; }

/* ---------- Origin + facts ---------- */

.origin {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}
.origin__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(56px, 7vw, 112px);
}
.origin__big { grid-column: 1 / span 6; }
.origin__figure {
  display: flex;
  align-items: flex-end;
  gap: 0.3em;
  white-space: nowrap;
  line-height: 0.82;
}
.origin__num {
  font-size: clamp(6rem, 3rem + 13vw, 15rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  margin-left: -0.06em;
}
.origin__unit { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.025em; padding-bottom: 0.2em; }
.origin__caption { font-size: var(--fs-m); color: var(--ink-2); max-width: 30ch; margin-top: 28px; }

.origin__copy { grid-column: 8 / -1; padding-top: clamp(0px, 2vw, 32px); }
.origin__title { font-size: var(--fs-xl); font-weight: 650; line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 24px; text-wrap: balance; }
.origin__copy p:not(.origin__title) { color: var(--ink-2); max-width: 46ch; margin-bottom: 16px; }

.facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  border-top: 1px solid var(--ink);
}
.fact { padding: 28px var(--gutter) 0 0; }
.fact + .fact { padding-left: var(--gutter); border-left: 1px solid var(--rule); }
.fact dt { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.03em; margin-bottom: 10px; }
.fact dd { color: var(--ink-2); font-size: var(--fs-s); max-width: 34ch; }

/* ---------- Process ---------- */

.process {
  padding-block: var(--section);
  background: var(--paper-2);
}
.process__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.process__head .section-title { grid-column: 1 / span 7; }
.process__head .section-lead { grid-column: 9 / -1; }

.timeline {
  --progress: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-top: 56px;
}
.timeline::before, .timeline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 18px;
  height: 1.5px;
  background: var(--rule);
}
.timeline::after {
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--progress));
  transition: transform 1.4s var(--ease-in-out);
}
.timeline.is-in { --progress: 1; }
.timeline__item { position: relative; padding-right: 8px; }
.timeline__num {
  position: absolute;
  top: -56px; left: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  font-size: var(--fs-s);
  font-weight: 650;
  z-index: 1;
}
.timeline__item h3 { font-size: var(--fs-l); font-weight: 650; letter-spacing: -0.02em; margin-bottom: 10px; }
.timeline__item p { font-size: var(--fs-s); color: var(--ink-2); max-width: 30ch; }

.process__aside {
  margin-top: clamp(56px, 6vw, 88px);
  margin-left: calc((100% + var(--gutter)) / 12 * 5);
  max-width: 56ch;
  padding: 24px 0 0;
  border-top: 1px solid var(--ink);
  font-size: var(--fs-m);
  color: var(--ink-2);
}
.process__aside strong { color: var(--ink); font-weight: 650; }

/* ---------- Security (tablica) ---------- */

.security {
  background: var(--board);
  color: var(--board-ink);
  padding-block: var(--section);
}
.security :focus-visible { outline-color: var(--accent); }
.security__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(64px, 8vw, 120px);
}
.security__copy { grid-column: 1 / span 5; }
.security__title {
  font-size: var(--fs-2xl);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.security__lead { color: var(--board-mute); font-size: var(--fs-l); max-width: 40ch; margin-bottom: 32px; }
.security .link-underline { color: var(--board-ink); }

.tenants {
  grid-column: 7 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: clamp(16px, 2vw, 32px);
  align-self: center;
}
.tenants__box {
  border: 1px solid var(--board-rule);
  border-radius: 6px;
  padding: 24px;
  background: var(--board-2);
  transition: transform 0.6s var(--ease-out);
}
.tenants:hover .tenants__box:first-child { transform: translateX(-6px); }
.tenants:hover .tenants__box:last-of-type { transform: translateX(6px); }
.tenants__name { font-weight: 650; letter-spacing: -0.015em; margin-bottom: 20px; min-height: 2.6em; }
.tenants__box ul { display: grid; gap: 8px; font-size: var(--fs-s); color: var(--board-mute); }
.tenants__box li { padding-top: 8px; border-top: 1px solid var(--board-rule); }
.tenants__wall {
  width: 2px;
  background: repeating-linear-gradient(var(--board-mute) 0 6px, transparent 6px 12px);
  position: relative;
}
.tenants__wall::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--board);
}
.tenants figcaption { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--board-mute); margin-top: 8px; }

.security__list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  border-top: 1px solid var(--board-rule);
}
.security__list li { padding: 28px var(--gutter) 32px 0; border-bottom: 1px solid var(--board-rule); }
.security__list h3 { font-size: var(--fs-m); font-weight: 650; margin-bottom: 8px; }
.security__list p { font-size: var(--fs-s); color: var(--board-mute); max-width: 36ch; }

/* ---------- Pricing ---------- */

.pricing { padding-block: var(--section); }
.pricing__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 88px);
}

.billing {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
}
.billing__opt {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: var(--fs-s);
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.3s;
  white-space: nowrap;
}
.billing__opt[aria-checked="true"] { color: var(--paper); }
.billing__save { font-weight: 500; opacity: 0.8; }
.billing__thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.5s var(--ease-spring);
}
.billing.is-yearly .billing__thumb { transform: translateX(100%); }

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.plan-col {
  display: flex;
  flex-direction: column;
  padding: 32px clamp(20px, 2.6vw, 40px) 40px;
  border-right: 1px solid var(--rule);
}
.plan-col:first-child { padding-left: 0; }
.plan-col:last-child { border-right: 0; padding-right: 0; }
.plan-col--pro {
  position: relative;
  background: var(--surface);
  border-right: 0;
  margin-top: -1px;
  box-shadow: inset 0 4px 0 var(--accent);
}
.plan-col__name { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.03em; margin-bottom: 8px; }
.plan-col__for { color: var(--ink-2); font-size: var(--fs-s); max-width: 32ch; min-height: 3em; margin-bottom: 32px; }
.plan-col__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; min-height: 4rem; }
.plan-col__from { font-size: var(--fs-s); color: var(--ink-2); }
.plan-col__amount {
  display: inline-block;
  font-size: clamp(2.75rem, 2rem + 2.4vw, 4rem);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s, transform 0.3s var(--ease-out);
}
.plan-col__amount.is-swapping { opacity: 0; transform: translateY(-8px); }
.plan-col__amount--text { font-size: var(--fs-xl); letter-spacing: -0.025em; padding-top: 1rem; }
.plan-col__unit { font-size: var(--fs-s); color: var(--ink-2); }
.plan-col__billing { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 32px; min-height: 1.4em; }
.plan-col__list { display: grid; gap: 12px; margin-bottom: 40px; font-size: var(--fs-s); flex: 1; }
.plan-col__list li { position: relative; padding-left: 22px; }
.plan-col__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 10px; height: 6px;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}
.plan-col .btn { align-self: flex-start; }

.pricing__foot { margin-top: 40px; font-size: var(--fs-s); color: var(--ink-2); max-width: 60ch; }

/* ---------- Partners ---------- */

.partners {
  padding-bottom: var(--section);
}
.partners__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  padding-top: var(--section);
  border-top: 1px solid var(--rule);
}
.partners__tags {
  grid-column: 1 / span 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.partners__tags span {
  /* naklejka inwentarzowa */
  position: relative;
  aspect-ratio: 5 / 3;
  padding: 10px 12px;
  border: 1px solid var(--ink-3);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, var(--ink-2) 0 1px, transparent 1px 3px, var(--ink-2) 3px 5px, transparent 5px 6px, var(--ink-2) 6px 7px, transparent 7px 10px) 12px calc(100% - 10px) / calc(100% - 24px) 30% no-repeat,
    var(--surface);
  font-size: var(--fs-xs);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: transform 0.5s var(--ease-spring), background-color 0.3s, border-color 0.3s;
}
.partners__tags span:hover {
  transform: rotate(-3deg) translateY(-4px);
  border-color: var(--accent-deep);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px, var(--ink) 3px 5px, transparent 5px 6px, var(--ink) 6px 7px, transparent 7px 10px) 12px calc(100% - 10px) / calc(100% - 24px) 30% no-repeat,
    var(--accent);
  color: var(--ink);
}
.partners__copy { grid-column: 8 / -1; }
.partners__copy .section-title { font-size: var(--fs-xl); line-height: 1.15; margin-bottom: 20px; max-width: 24ch; }
.partners__copy p { color: var(--ink-2); max-width: 44ch; margin-bottom: 24px; }

/* ---------- FAQ ---------- */

.faq { padding-block: var(--section); background: var(--paper-2); }
.faq__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 48px;
}
.faq__grid .section-title { grid-column: 1 / span 4; font-size: var(--fs-xl); line-height: 1.15; }
.faq__list { grid-column: 6 / -1; border-top: 1px solid var(--ink); }

.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 24px 48px 24px 0;
  font-size: var(--fs-l);
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before, .faq__item summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 14px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0); }
.faq__item summary:hover { color: var(--ink-2); }
.faq__body { padding: 0 48px 28px 0; }
.faq__body p { color: var(--ink-2); max-width: 60ch; }
.faq__item[open] .faq__body { animation: faq-in 0.4s var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Contact ---------- */

.contact { padding-block: var(--section); }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 56px;
}
.contact__copy { grid-column: 1 / span 5; }
.contact__title {
  font-size: var(--fs-2xl);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.contact__copy p { color: var(--ink-2); max-width: 40ch; margin-bottom: 20px; }
.contact__direct { font-size: var(--fs-s); padding-top: 20px; border-top: 1px solid var(--rule); }
.contact__direct a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.contact__copy .contact__lead { color: var(--ink); font-weight: 600; margin-bottom: 14px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.person { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.person__photo { position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; }
.person__photo span { font-weight: 700; font-size: 1.25rem; color: var(--ink-3); }
.person__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact__copy .person__name { margin: 0 0 2px; color: var(--ink); font-weight: 700; font-size: var(--fs-s); }
.contact__copy .person__role { margin: 0 0 4px; color: var(--ink-3); font-size: var(--fs-xs); }
.person__body a { overflow-wrap: anywhere; }

.form {
  grid-column: 7 / -1;
  display: grid;
  gap: 20px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: var(--fs-s); font-weight: 600; }
.field__opt { font-weight: 400; color: var(--ink-3); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  font-size: var(--fs-m);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
}
.field.is-invalid input { border-color: #A3271B; }
.field__error { font-size: var(--fs-xs); color: #A3271B; font-weight: 500; }

.field--choice { border: 0; padding: 0; margin: 0; }
.field--choice legend { margin-bottom: 8px; padding: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  font-size: var(--fs-s);
  font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.segmented small { font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.segmented input:hover + span { border-color: var(--ink-3); }
.segmented input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px var(--accent); }

.field--hp { position: absolute; left: -9999px; }

.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 4px 12px; }
.field--check input {
  appearance: none;
  width: 20px; height: 20px;
  margin: 2px 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.field--check input::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform 0.25s var(--ease-spring);
}
.field--check input:checked { background: var(--accent); }
.field--check input:checked::after { transform: rotate(-45deg) translateY(-1px) scale(1); }
.field--check label { font-weight: 400; font-size: var(--fs-s); color: var(--ink-2); }
.field--check .field__error { grid-column: 2; }

.form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form__status { font-size: var(--fs-s); font-weight: 500; }
.form__status.is-error { color: #A3271B; }
.form.is-sending .btn { opacity: 0.6; pointer-events: none; }

.form-done {
  grid-column: 7 / -1;
  align-self: center;
  padding: 40px 0;
  border-top: 1px solid var(--ink);
}
.form-done h3 { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.025em; margin-bottom: 12px; }
.form-done p { color: var(--ink-2); max-width: 44ch; }
.form-done h3::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 12px;
  vertical-align: 0.05em;
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--rule); padding-block: 48px 40px; font-size: var(--fs-s); }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
}
.footer__brand { grid-column: 1 / span 4; color: var(--ink-2); }
.footer__name { font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-size: var(--fs-l); margin-bottom: 8px; }
.footer__nav { grid-column: 7 / span 5; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer__nav ul { display: grid; gap: 8px; }
.footer__nav a { color: var(--ink-2); text-decoration: none; }
.footer__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__legal { grid-column: 1 / -1; color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- Reveal (used sparingly) ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(20px); }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

/* Scroll-driven drift for scattered notes — compositor-only, no JS */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .scatter__item {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .scatter__item:nth-child(odd) { --dy: -60px; }
    .scatter__item:nth-child(even) { --dy: 50px; }
    .scatter__item:nth-child(3n) { --dy: -100px; }
    @keyframes drift {
      from { translate: 0 calc(var(--dy) * -0.5); }
      to { translate: 0 calc(var(--dy) * 0.5); }
    }
  }
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1100px) {
  .hero__copy { grid-column: 1 / span 7; }
  .locator { grid-column: 1 / -1; margin-right: 0; margin-top: 56px; }
  .locator__stage { height: clamp(320px, 52vw, 460px); }

  .demo__tabs { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--rule); margin-bottom: 24px; scrollbar-width: none; }
  .demo__tabs::-webkit-scrollbar { display: none; }
  .demo__tab { padding: 14px 18px 14px 0; border-bottom: 0; flex: none; }
  .demo__tab::before { top: auto; bottom: -5px; left: 0; }
  .demo__tab-desc { display: none; }
  .demo__tab-name { font-size: var(--fs-m); }
  .demo__window { grid-column: 1 / -1; margin-right: 0; border-right: 1px solid var(--rule); border-radius: 10px; }

  .story__copy { grid-column: 1 / span 7; }
  .story__device { grid-column: 8 / -1; }

  .security__copy { grid-column: 1 / -1; }
  .tenants { grid-column: 1 / -1; }
  .security__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .faq__grid .section-title { grid-column: 1 / -1; }
  .faq__list { grid-column: 1 / -1; }

  .contact__copy { grid-column: 1 / -1; }
  .form, .form-done { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 4px 0 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    font-size: var(--fs-s);
    font-weight: 600;
    position: relative;
    z-index: 2;
  }
  .nav__toggle-icon { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); }
  .nav__toggle-icon i {
    position: absolute;
    left: 10px; right: 10px;
    height: 1.5px;
    background: var(--paper);
    transition: transform 0.35s var(--ease-out);
  }
  .nav__toggle-icon i:first-child { top: 13px; }
  .nav__toggle-icon i:last-child { top: 18px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-icon i:first-child { transform: translateY(2.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-icon i:last-child { transform: translateY(-2.5px) rotate(-45deg); }

  .nav__menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 32px;
    padding: calc(var(--header-h) + 24px) var(--margin) 40px;
    background: var(--paper);
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.6s var(--ease-in-out), visibility 0s 0.6s;
  }
  .nav__menu.is-open {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.6s var(--ease-in-out);
  }
  .nav__list { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }
  .nav__list li { border-bottom: 1px solid var(--rule); }
  .nav__list a {
    display: block;
    padding: 18px 0;
    font-size: var(--fs-xl);
    font-weight: 650;
    letter-spacing: -0.025em;
    color: var(--ink);
  }
  .nav__list a::after { display: none; }
  .nav__cta { min-height: 56px; }
  .nav-open { overflow: hidden; }
  .nav-open .site-header { background: var(--paper); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }

  .problem__lead { grid-column: 1 / -1; position: static; }
  .scatter { grid-column: 1 / -1; min-height: 0; margin-top: 48px; display: flex; flex-wrap: wrap; gap: 10px; }
  .scatter__item { position: static; white-space: normal; }
  .statement__text { margin-left: 0; }

  .modules__head .section-title, .modules__head .section-lead { grid-column: 1 / -1; }
  .modules__head { row-gap: 20px; }

  /* Mobile story: phone first, steps update it while it stays pinned at top */
  .story__grid { display: flex; flex-direction: column; }
  .story__copy { display: contents; }
  .story__copy .section-title { order: 0; margin-bottom: 40px; }
  .story__steps { order: 2; }
  .story__device {
    order: 1;
    position: sticky;
    top: calc(var(--header-h) + 8px);
    height: auto;
    margin: 0 0 32px;
    z-index: 2;
  }
  .phone {
    width: 100%;
    height: auto;
    max-width: 420px;
    padding: 0;
    border-radius: 14px;
    background: none;
    box-shadow: 0 20px 40px -32px rgb(28 31 29 / 0.6);
  }
  .phone__screen { border-radius: 14px; padding: 14px; border: 1px solid var(--rule); background: var(--surface); }
  .phone__app, .phone__photo, .phone__log { display: none; }
  .phone__card { margin: 0; border: 0; padding: 0; background: none; }
  .story__step { min-height: 0; padding-bottom: 56px; }
  .story__step h3 { font-size: var(--fs-l); }

  .origin__big, .origin__copy { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .fact { padding: 24px 0; }

  .process__head .section-title, .process__head .section-lead { grid-column: 1 / -1; }
  .process__head { row-gap: 20px; }
  .timeline { grid-template-columns: 1fr; padding-top: 0; padding-left: 60px; row-gap: 40px; }
  .timeline::before, .timeline::after { left: 18px; right: auto; top: 0; bottom: 0; width: 1.5px; height: auto; }
  .timeline::after { transform-origin: top; transform: scaleY(var(--progress)); }
  .timeline__num { top: -4px; left: -60px; }
  .process__aside { margin-left: 0; }

  .plans { grid-template-columns: 1fr; border-top: 0; }
  .plan-col, .plan-col:first-child, .plan-col:last-child { padding: 32px 0 40px; border-right: 0; border-top: 1px solid var(--ink); }
  .plan-col--pro { padding-inline: 20px !important; margin-inline: -20px; }
  .plan-col__for { min-height: 0; }

  .partners__tags, .partners__copy { grid-column: 1 / -1; }
  .partners__tags { margin-bottom: 40px; }

  .footer__brand, .footer__nav { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { padding-top: calc(var(--header-h) + 32px); }
  .hero__copy { grid-column: 1 / -1; }
  .hero__title { letter-spacing: -0.04em; }
  .hero__actions .btn--primary { flex: 1 1 100%; }
  .locator { margin-top: 48px; }
  .locator__search { height: 54px; }
  .locator__kbd { display: none; }
  .locator__chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scrollbar-width: none; }
  .locator__chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .locator__stage { --rx: 40deg; --rz: -18deg; height: 260px; margin-top: 4px; perspective: 1200px; }
  .plan { width: 94%; }
  .room text.room__name { display: none; }
  .room text { font-size: 16px; }
  .locator__result { flex-direction: column; align-items: flex-start; margin-top: 0; }
  .result__time { text-align: left; max-width: none; }
  .result__time span { display: inline; font-size: var(--fs-m); margin-right: 4px; }

  .ui-table th:nth-child(4), .ui-table td:nth-child(4),
  .ui-table th:nth-child(1), .ui-table td:nth-child(1) { display: none; }
  .ui--split { grid-template-columns: 1fr; }
  .ticket-detail { border-left: 0; padding-left: 0; border-top: 1px solid var(--paper-2); padding-top: 20px; }
  .demo__window { min-height: 0; }

  .security__list { grid-template-columns: 1fr; }
  .tenants { grid-template-columns: 1fr; }
  .tenants__wall { width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--board-mute) 0 6px, transparent 6px 12px); margin-block: 8px; }

  .partners__tags { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .partners__tags span { padding: 6px; font-size: 10px; }

  .form__row { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
  .form__submit .btn { width: 100%; }

  .faq__item summary { font-size: var(--fs-m); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}


/* ── podstrony: logowanie, dokumenty ─────────────────────── */
.nav__login { font-weight: 600; text-decoration: none; color: inherit; padding: .5rem .25rem; margin-right: .5rem; white-space: nowrap; }
.nav__login:hover { text-decoration: underline; text-underline-offset: 4px; }
.subpage main { min-height: 60vh; padding-top: clamp(96px, 14vh, 140px); padding-bottom: 80px; }
.login-pick { display: grid; place-items: center; }
.login-pick__card { width: min(560px, 100%); }
.login-pick h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -0.035em; margin: .4rem 0 .8rem; }
.login-pick__lead { color: var(--ink-2, #4E5550); margin: 0 0 1.6rem; }
.login-pick__form { display: grid; gap: .7rem; }
.login-pick__form label { font-weight: 650; font-size: .9rem; }
.login-pick__field { display: flex; align-items: center; border: 1.5px solid currentColor; border-radius: 10px; background: var(--paper, #FAFBF8); overflow: hidden; }
.login-pick__field span { padding: 0 .6rem; opacity: .55; font-size: .95rem; white-space: nowrap; }
.login-pick__field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; font-weight: 600; padding: .85rem 0; outline: none; }
.login-pick__field:focus-within { box-shadow: 0 0 0 4px rgb(255 210 63 / .55); }
.login-pick__err { color: #B42318; margin: 0; font-size: .9rem; }
.login-pick__form .btn { justify-self: start; margin-top: .4rem; }
.login-pick__help { font-size: .92rem; opacity: .75; margin: 1.2rem 0 0; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.035em; margin: .4rem 0 .4rem; }
.doc__meta { opacity: .65; margin: 0 0 2rem; }
.doc h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; letter-spacing: -0.015em; }
.doc p, .doc li { line-height: 1.65; }
.doc ul { padding-left: 1.2rem; }
mark.todo { background: #FFD23F; padding: 0 .25em; border-radius: 3px; }
@media (min-width: 901px) and (max-width: 1240px) {
  .nav__menu { gap: 18px; }
  .nav__list { gap: 18px; }
  .nav__login { margin-right: 0; }
}
@media (max-width: 900px) {
  .nav__login { display: block; padding: 0; font-size: var(--fs-l, 1.25rem); font-weight: 650; }
}


/* ---------- Sprzedaż: cena w hero, sekcja „dla kogo”, wybór celu w formularzu ---------- */
.hero__eyebrow { font-size: var(--fs-s); font-weight: 650; letter-spacing: 0.01em; color: var(--ink-2); margin-bottom: 18px; }
.hero__eyebrow::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); margin-right: 10px; vertical-align: 0; }
.hero__price { font-size: var(--fs-m); color: var(--ink-2); margin: -16px 0 28px; }
.hero__price b { color: var(--ink); font-size: var(--fs-l); font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(transparent 62%, var(--accent) 62%); }
.hero__price a { color: var(--ink); text-underline-offset: 3px; }
.js .hero__eyebrow, .js .hero__price { opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease-out) 0.35s, transform 0.8s var(--ease-out) 0.35s; }
.is-loaded .hero__eyebrow, .is-loaded .hero__price { opacity: 1; transform: none; }
.pricing { padding-block: clamp(64px, 8vw, 120px) var(--section); }
.pricing__head .section-lead { margin-top: 14px; }

.roles { padding-block: var(--section); }
.roles__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: clamp(40px, 5vw, 72px); }
.role { padding: 28px clamp(16px, 2vw, 32px) 8px 0; }
.role + .role { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--rule); }
.role h3 { font-size: var(--fs-l); font-weight: 650; letter-spacing: -0.02em; margin-bottom: 10px; }
.role p { color: var(--ink-2); font-size: var(--fs-s); max-width: 34ch; }
.roles__cta { margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 900px) {
  .roles__grid { grid-template-columns: 1fr 1fr; }
  .role:nth-child(3) { padding-left: 0; border-left: 0; }
  .role:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .roles__grid { grid-template-columns: 1fr; }
  .role + .role { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}
.segmented--2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- dokumenty RODO ---------- */
.doc__table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: var(--fs-s); }
.doc__table th, .doc__table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc__table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.doc ol, .doc ul { padding-left: 22px; } .doc li { margin-bottom: 8px; }
.doc__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 56px 0 24px; text-align: center; color: var(--ink-2); }
@media print { .site-header, .footer, .skip-link { display: none !important; } .doc { padding: 0 !important; } mark.todo { background: #fff3a8; } }
.doc ul { list-style: disc; } .doc ol { list-style: decimal; }

/* ---------- poradniki ---------- */
.doc__crumbs { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 18px; } .doc__crumbs a { color: var(--ink-2); }
.doc__lead { font-size: var(--fs-l); line-height: 1.55; color: var(--ink-2); margin-bottom: 28px; }
.doc__cta { margin: 36px 0; padding: 22px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); }
.doc__cta p { margin: 0 0 14px; } .doc__cta .btn { margin: 4px 8px 0 0; }
.doc h3 { font-size: var(--fs-m); margin: 22px 0 6px; }

/* stopka: trzy kolumny (strony, dokumenty, poradniki) */
.footer__nav { grid-column: 5 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .footer__nav { grid-template-columns: 1fr 1fr; } }
