/* PULSE — strona główna (NOIR × PULSE, proposals/final/home.png) */

@font-face {
  font-family: "Plex";
  src: url("../fonts/IBMPlexSans-Variable.woff2") format("woff2-variations"),
       url("../fonts/IBMPlexSans-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-stretch: 85% 100%;
  font-display: swap;
}

:root {
  --ink-0: #07080a;          /* hala */
  --ink-1: #0c0d10;          /* indeks modeli */
  --ink-2: #15171b;          /* panele */
  --line: rgb(236 240 246 / 0.16);
  --line-strong: rgb(236 240 246 / 0.34);
  --text: #f3f5f8;
  --text-2: #b9c0ca;
  --text-3: #8a929e;
  --cobalt: #0b46ff;
  --cobalt-hover: #2a5cff;
  --cobalt-press: #0736cc;
  --focus: #7ea0ff;

  /* jasna, chłodna powierzchnia danych (comp kategorii / decyzji) */
  --paper: #f1f3f6;
  --paper-2: #e6eaef;
  --ink-t: #0d1016;
  --ink-t2: #48505c;
  --line-d: rgb(13 16 22 / 0.13);
  --line-d-strong: rgb(13 16 22 / 0.3);
  --error: #ff8a8a;
  --section-y: clamp(72px, 8.4vw, 136px);

  --gutter: clamp(20px, 3.8vw, 64px);
  --header-h: clamp(72px, 6.8vw, 104px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Plex", "IBM Plex Sans", system-ui, sans-serif;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #3a3f47 var(--ink-0);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--cobalt); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: #2b2f36; border: 2px solid var(--ink-0); border-radius: 10px; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ico {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: square; stroke-linejoin: miter;
}
.ico-sm { width: 16px; height: 16px; }

.skip {
  position: fixed; left: var(--gutter); top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--text); color: var(--ink-0);
  transform: translateY(-160%);
  transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 22px;
  min-height: 50px; padding: 0 20px;
  font-size: 1rem; font-weight: 400; letter-spacing: 0.005em; white-space: nowrap;
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), color .25s var(--ease-out);
}
.btn .ico { transition: transform .35s var(--ease-out); }
.btn:hover .ico { transform: translateX(4px); }

.btn-primary {
  min-height: 56px; padding: 0 28px;
  background: var(--cobalt); color: #fff;
  font-size: 1.125rem;
}
.btn-primary:hover { background: var(--cobalt-hover); }
.btn-primary:active { background: var(--cobalt-press); }

.btn-outline {
  border: 1px solid rgb(243 245 248 / 0.72);
  color: var(--text);
}
.btn-outline:hover { background: var(--text); color: var(--ink-0); border-color: var(--text); }

.link-line {
  display: inline-flex; align-items: center; gap: 18px;
  font-size: 1rem;
  padding-block: 6px;
  position: relative;
}
.link-line::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: calc(100% - 34px); height: 1px; background: currentColor;
  transform-origin: left; transition: opacity .3s var(--ease-out);
}
.link-line:hover::after { opacity: 0.6; }
.link-line .ico { transition: transform .35s var(--ease-out); }
.link-line:hover .ico { transform: translateX(4px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  color: var(--text);
  border-radius: 2px;
  transition: color .2s;
}
.icon-btn:hover { color: #fff; }

/* ---------- Nagłówek ---------- */

.site-header {
  position: absolute; inset: 0 0 auto; z-index: 20;
}
.bar {
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { flex: none; display: block; padding: 8px 0; }
.brand img { width: clamp(104px, 8.9vw, 136px); height: auto; }

.primary { margin-left: clamp(32px, 9.8vw - 24px, 150px); }
.primary-list { display: flex; gap: clamp(24px, 2.5vw, 40px); }
.has-menu { position: relative; }

.nav-link {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px;
  font-size: 1rem; font-weight: 400;
  color: var(--text);
  position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }
.chev { transition: transform .3s var(--ease-out); }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }

.tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.divider { width: 1px; height: 22px; background: var(--line-strong); margin-inline: 6px; }
.lang-btn { font-size: 0.875rem; gap: 8px; padding-inline: 6px; }
.tools .btn-outline { margin-left: 18px; }
.burger { display: none; }

/* rozwijane menu */
.menu {
  position: absolute; top: calc(100% + 14px); left: -24px;
  background: rgb(21 23 27 / 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: menu-in .35s var(--ease-out);
}
.menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

.menu-models { width: min(560px, 80vw); padding: 12px; }
.menu-models ul { display: grid; gap: 2px; }
.menu-models li a {
  display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 20px;
  padding: 10px 14px;
  transition: background-color .2s;
}
.menu-models li a:hover { background: rgb(255 255 255 / 0.05); }
.menu-models img { width: 148px; aspect-ratio: 3 / 1; object-fit: contain; object-position: center bottom; }
.menu-models strong { display: block; font-weight: 500; font-size: 1.0625rem; }
.menu-models small, .drawer-models small {
  display: block; margin-top: 2px;
  font-size: 0.6875rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2);
}
.menu-all {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding: 16px 14px 8px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  transition: color .2s;
}
.menu-all:hover { color: var(--text); }

.menu-lang { left: auto; right: -8px; min-width: 150px; padding: 6px; }
.menu-lang a { display: block; padding: 10px 14px; font-size: 0.9375rem; color: var(--text-2); }
.menu-lang a:hover { background: rgb(255 255 255 / 0.05); color: var(--text); }
.menu-lang a[aria-current] { color: var(--text); }
.menu-lang a[aria-current]::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; background: var(--cobalt); vertical-align: middle; }

/* wyszukiwarka */
.search {
  position: absolute; inset: 0 0 auto;
  min-height: var(--header-h);
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7);
  animation: menu-in .35s var(--ease-out);
}
.search[hidden] { display: none; }
.search-inner {
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 16px;
}
.search-inner > .ico { color: var(--text-2); }
.search input {
  flex: 1; min-width: 0;
  height: 48px;
  background: transparent; border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text); caret-color: var(--cobalt);
  font: inherit; font-size: clamp(1.125rem, 1.6vw, 1.5rem); font-weight: 300;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-bottom-color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search-results { padding: 0 var(--gutter) 20px; display: grid; gap: 2px; }
.search-results:empty { display: none; }
.search-results a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0 14px calc(22px + 16px);
  border-bottom: 1px solid var(--line);
}
.search-results a:hover, .search-results a:focus-visible { color: #fff; }
.search-results small { font-size: 0.6875rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }
.search-results .empty { padding: 14px 0 14px calc(22px + 16px); color: var(--text-2); }

/* szuflada mobilna */
.drawer {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--ink-0);
  overflow-y: auto;
  animation: drawer-in .45s var(--ease-out);
}
.drawer[hidden] { display: none; }
@keyframes drawer-in { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }
.drawer-top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.drawer-top .icon-btn { margin-right: -10px; }
.drawer-label { margin-top: 16px; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3); }
.drawer-models { margin-top: 8px; }
.drawer-models a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawer-models span { font-size: 1.75rem; font-weight: 300; letter-spacing: -0.01em; }
.drawer-links { margin-top: 28px; display: grid; }
.drawer-links a { display: block; padding: 11px 0; font-size: 1.125rem; color: var(--text-2); }
.drawer-links a:hover { color: var(--text); }
.drawer-cta { margin-top: auto; width: 100%; justify-content: space-between; }
.drawer nav { padding-bottom: 32px; }

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(600px, 71.1svh, 900px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) clamp(120px, 14vh, 200px);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 22%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(7 8 10 / 0.72) 0%, rgb(7 8 10 / 0.35) 34%, rgb(7 8 10 / 0) 56%),
    linear-gradient(180deg, rgb(7 8 10 / 0.55) 0%, rgb(7 8 10 / 0) 18%, rgb(7 8 10 / 0) 78%, var(--ink-1) 100%);
}
.hero-copy { position: relative; z-index: 1; }

.hero-copy { max-width: 48rem; margin-top: -2vh; }
.hero h1 {
  font-size: clamp(2.75rem, 5.75vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero h1 span { display: block; }
.hero h1 .light { font-weight: 300; }
.hero h1 .bold { font-weight: 700; letter-spacing: -0.035em; margin-top: 0.08em; }
.lede {
  margin-top: clamp(20px, 2.2vw, 30px);
  font-size: clamp(1.0625rem, 1.56vw, 1.5rem);
  font-weight: 300;
  color: #e3e7ed;
  max-width: 40ch;
}
.hero-actions {
  margin-top: clamp(32px, 3.4vw, 48px);
  display: flex; align-items: center; flex-wrap: wrap; gap: 20px clamp(28px, 2.6vw, 40px);
}

.hero-note {
  position: absolute; z-index: 1;
  top: calc(var(--header-h) + 3vw);
  right: clamp(150px, 11.5vw, 190px);
  padding: 6px 0 22px 12px;
  border-left: 1px solid var(--line-strong);
  font-size: 0.6875rem; font-weight: 400;
  line-height: 1.7; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-2);
}

/* jedyny autorski moment: hala rozświetla się, auto dojeżdża do kadru */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-media img {
    animation: hall-light 1.8s var(--ease-out) both;
  }
  .js .hero-copy { animation: copy-in 1.1s .25s var(--ease-out) both; }
  .js .hero-note { animation: note-in 1.2s .7s var(--ease-out) both; }
}
@keyframes hall-light {
  from { filter: brightness(0.35) saturate(0.6); transform: scale(1.06) translateX(1.5%); }
  to   { filter: none; transform: none; }
}
@keyframes copy-in { from { opacity: 0.001; transform: translateY(14px); } }
@keyframes note-in { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }

/* ---------- Indeks modeli ---------- */

.models {
  background: var(--ink-1);
  padding: clamp(40px, 3.6vw, 56px) var(--gutter) clamp(44px, 4vw, 64px);
  scroll-margin-top: 0;
}
.models-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
}
.models h2 {
  font-size: clamp(1.75rem, 2.3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.model-list {
  margin-top: clamp(20px, 2.6vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.model { border-left: 1px solid var(--line); }
.model a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "img img" "text arrow";
  align-items: end;
  row-gap: clamp(12px, 1.4vw, 22px);
  padding: 6px clamp(28px, 4vw, 64px) 8px clamp(24px, 2.6vw, 40px);
  height: 100%;
  transition: background-color .35s var(--ease-out);
}
.model a:hover { background: linear-gradient(180deg, rgb(255 255 255 / 0) 30%, rgb(255 255 255 / 0.03)); }
.model-img {
  grid-area: img;
  display: block;
  aspect-ratio: 3.4 / 1;
  position: relative;
}
.model-img::after {
  /* cień kontaktowy pod kołami */
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -4%; height: 16%;
  background: radial-gradient(50% 50% at 50% 50%, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0));
  z-index: 0;
}
.model-img img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
  transition: transform .7s var(--ease-out);
}
.model-img--tall img { transform: scale(1); }
.model a:hover .model-img img { transform: translateX(10px); }
.model-text { grid-area: text; display: grid; gap: 4px; min-width: 0; }
.model-name { font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); font-weight: 500; letter-spacing: 0.005em; }
.model-type {
  font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-2);
}
.model-arrow { grid-area: arrow; margin-bottom: 10px; transition: transform .35s var(--ease-out); }
.model a:hover .model-arrow { transform: translateX(5px); }

/* ---------- Wspólne: nagłówki sekcji, jasna powierzchnia ---------- */

.surface-light {
  background: var(--paper);
  color: var(--ink-t);
  color-scheme: light;
}
.surface-light ::selection { background: var(--cobalt); color: #fff; }
.surface-light :focus-visible { outline-color: var(--cobalt); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px;
  flex-wrap: wrap;
}
.section-intro { max-width: 44rem; }
.section-intro h2, .service h2 {
  font-size: clamp(2.125rem, 4.2vw, 4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-intro p, .section-lede {
  margin-top: clamp(14px, 1.4vw, 20px);
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 56ch;
}
.surface-light .section-intro p { color: var(--ink-t2); }
.section-lede { color: #d6dbe2; }

.note {
  position: absolute;
  padding: 6px 0 22px 12px;
  border-left: 1px solid rgb(236 240 246 / 0.4);
  font-size: 0.6875rem; line-height: 1.7; letter-spacing: 0.3em; text-transform: uppercase;
  color: #d5dae1;
  margin: 0;
}

.text-btn {
  color: var(--cobalt);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.text-btn:hover { text-decoration-thickness: 2px; }

/* segmentowy wybór (filtr, temat) — jak w compie kategorii */
.segmented, .topic {
  display: inline-flex; flex-wrap: wrap; align-items: center;
  margin: 0; padding: 0; border: 0; min-width: 0;
}
.segmented legend, .topic legend {
  float: left; margin-right: 16px;
  font-size: 0.9375rem;
}
.segmented label, .topic label { position: relative; }
.segmented input, .topic input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer;
}
.segmented span, .topic span {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 16px;
  font-size: 0.875rem;
  border: 1px solid var(--line-d);
  margin-left: -1px;
  transition: background-color .2s, color .2s, border-color .2s;
}
.segmented label:first-of-type span, .topic label:first-of-type span { margin-left: 0; border-radius: 3px 0 0 3px; }
.segmented label:last-of-type span, .topic label:last-of-type span { border-radius: 0 3px 3px 0; }
.segmented span { color: var(--ink-t2); background: #fff; }
.segmented label:hover span { color: var(--ink-t); }
.segmented input:checked + span, .topic input:checked + span {
  background: var(--cobalt); border-color: var(--cobalt); color: #fff;
  position: relative; z-index: 1;
}
.segmented input:focus-visible + span, .topic input:focus-visible + span {
  outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 2;
}
.surface-light .segmented input:focus-visible + span { outline-color: var(--ink-t); }

/* ---------- Samochody używane ---------- */

.used { padding: var(--section-y) var(--gutter); }

.filter-bar {
  margin-top: clamp(32px, 3.4vw, 48px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-d);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.filter-count { font-size: 0.9375rem; color: var(--ink-t2); font-variant-numeric: tabular-nums; }
.filter-count span:first-child { color: var(--ink-t); font-weight: 500; }

.used-row {
  display: grid;
  grid-template-columns: clamp(180px, 16vw, 250px) minmax(150px, 1.1fr) minmax(300px, 2fr) auto auto;
  align-items: center;
  column-gap: clamp(20px, 3vw, 48px);
  padding: clamp(18px, 2vw, 28px) 0;
  border-bottom: 1px solid var(--line-d);
  position: relative;
  transition: background-color .3s var(--ease-out);
}
.used-row[hidden] { display: none; }
.used-row:hover { background: linear-gradient(90deg, rgb(255 255 255 / 0), #fff 30%, rgb(255 255 255 / 0)); }
.used-img {
  width: 100%; aspect-ratio: 3 / 1;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 10px 8px rgb(13 16 22 / 0.18));
  transition: transform .7s var(--ease-out);
}
.used-row:hover .used-img { transform: translateX(8px); }
.used-name h3 { margin: 0; font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 500; letter-spacing: -0.01em; }
.used-name p { margin-top: 4px; font-size: 0.875rem; color: var(--ink-t2); }

.used-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.used-data div { border-left: 1px solid var(--line-d); padding-left: 14px; }
.used-data dt, .used-price small {
  display: block;
  font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-t2);
}
.used-data dd { margin: 4px 0 0; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.used-price { text-align: right; }
.used-price strong { display: block; margin-top: 2px; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.used-link {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-d-strong);
  font-size: 0.9375rem; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s;
}
.used-link::after { content: ""; position: absolute; inset: 0; } /* cały wiersz klikalny */
.used-link:hover, .used-row:hover .used-link { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.used-link .ico { transition: transform .35s var(--ease-out); }
.used-row:hover .used-link .ico { transform: translateX(4px); }
.used-empty { padding: 40px 0; font-size: 1.0625rem; color: var(--ink-t2); }

/* ---------- Serwis ---------- */

.service {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--ink-0);
}
.service-media { position: relative; margin: 0; min-height: 100%; overflow: hidden; }
.service-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 46% 55%;
}
.service-media .note { top: clamp(32px, 4vw, 56px); right: clamp(24px, 3.4vw, 56px); border-color: rgb(255 255 255 / 0.55); color: #fff; }
.service-body { padding: var(--section-y) var(--gutter) var(--section-y) clamp(32px, 5vw, 96px); }
.service h2 { max-width: 14ch; }

.service-list { margin-top: clamp(32px, 3.4vw, 52px); border-top: 1px solid var(--line); }
.service-list li {
  display: grid; grid-template-columns: minmax(180px, 0.9fr) 1.3fr; gap: 8px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-list h3 { margin: 0; font-size: 1.0625rem; font-weight: 500; }
.service-list p { margin: 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.55; }
.section-actions {
  margin-top: clamp(32px, 3.4vw, 48px);
  display: flex; align-items: center; flex-wrap: wrap; gap: 20px 36px;
}

/* ---------- Gwarancja: oś czasu ---------- */

.warranty { padding: var(--section-y) var(--gutter); }

.ruler {
  --label-w: clamp(200px, 20vw, 280px);
  margin-top: clamp(40px, 4.4vw, 64px);
}
.ruler-axis, .ruler-row {
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  column-gap: clamp(20px, 3vw, 48px);
}
.ruler-axis { padding-bottom: 12px; border-bottom: 1px solid var(--line-d-strong); }
.ruler-axis .ruler-label { font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-t2); align-self: end; }
.ruler-scale { position: relative; height: 1.25rem; }
.ruler-scale span {
  position: absolute; left: calc(var(--y) / 12 * 100%); bottom: 0;
  transform: translateX(-50%);
  font-size: 0.75rem; color: var(--ink-t2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ruler-scale span:first-child { transform: none; }
.ruler-scale span:last-child { transform: translateX(-100%); }

.ruler-row { padding: 22px 0; border-bottom: 1px solid var(--line-d); align-items: center; }
.ruler-label strong { display: block; font-size: 1.0625rem; font-weight: 500; }
.ruler-label small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--ink-t2); }

.ruler-track {
  position: relative;
  padding-top: 30px;
  /* podziałka co rok */
  background-image: linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
  background-size: calc(100% / 12) 20px;
  background-position: -0.5px 100%;
  background-repeat: repeat-x;
}
.ruler-track::after { content: ""; position: absolute; right: 0; bottom: 0; height: 20px; width: 1px; background: var(--line-d); }
.ruler-bar {
  position: relative; display: block;
  margin-left: calc(var(--from, 0) / 12 * 100%);
  width: calc((var(--years) - var(--from, 0)) / 12 * 100%);
  height: 12px;
  margin-bottom: 4px;
  background: var(--ink-t);
}
.ruler-value {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  font-size: 1.0625rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ruler-value em { font-style: normal; font-weight: 400; color: var(--ink-t2); }
.ruler-row--ext .ruler-bar { background: transparent; border: 1px solid var(--ink-t); border-left-style: dashed; }

/* ---------- Kontakt ---------- */

.contact { background: var(--ink-0); }
.contact-band { position: relative; height: clamp(180px, 19vw, 300px); overflow: hidden; }
.contact-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.contact-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(7 8 10 / 0) 55%, var(--ink-0));
}
.contact-band .note { top: clamp(28px, 3.6vw, 56px); right: clamp(36px, 7vw, 120px); z-index: 1; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 112px);
  padding: clamp(48px, 5vw, 80px) var(--gutter) var(--section-y);
}
.contact h2 {
  font-size: clamp(2.25rem, 4.4vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.03em;
  text-wrap: balance;
}
.contact h2 .light { font-weight: 300; }
.contact h2 .bold { font-weight: 700; letter-spacing: -0.035em; }

.contact-lines { margin: clamp(32px, 3.4vw, 48px) 0 0; border-top: 1px solid var(--line); }
.contact-lines div {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.contact-lines dt { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); padding-top: 3px; }
.contact-lines dd { margin: 0; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.contact-lines a { text-decoration: underline; text-decoration-color: rgb(243 245 248 / 0.3); text-underline-offset: 5px; transition: text-decoration-color .2s; }
.contact-lines a:hover { text-decoration-color: currentColor; }

.contact-form {
  align-self: start;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 44px);
  display: grid; gap: 20px;
}
.topic legend { float: none; display: block; margin: 0 0 12px; font-size: 0.9375rem; color: var(--text-2); }
.topic span { border-color: var(--line-strong); color: var(--text-2); background: transparent; }
.topic label:hover span { color: var(--text); }

.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; }
.field input, .select select {
  width: 100%; height: 52px; padding: 0 16px;
  background: rgb(7 8 10 / 0.5);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--text); caret-color: var(--cobalt);
  font: inherit; font-size: 1rem;
  transition: border-color .2s;
}
.field input::placeholder { color: var(--text-3); }
.field input:hover, .select select:hover { border-color: rgb(236 240 246 / 0.55); }
.field input:focus, .select select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.select { position: relative; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select option { background: var(--ink-2); color: var(--text); }
.select .ico { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-2); }
.field-error { font-size: 0.875rem; color: var(--error); margin: -2px 0 0; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; position: relative; }
.check input { position: absolute; left: 0; top: 0; width: 24px; height: 24px; opacity: 0; margin: 0; cursor: pointer; }
.check .box {
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 2px;
  color: transparent; transition: background-color .2s, border-color .2s, color .2s;
}
.check input:checked + .box { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check input[aria-invalid="true"] + .box { border-color: var(--error); }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.form-submit { width: 100%; justify-content: space-between; margin-top: 4px; }
.form-submit[aria-busy="true"] { pointer-events: none; opacity: 0.75; }
.form-note { font-size: 0.8125rem; color: var(--text-3); text-align: right; }
.form-success {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  padding: 20px; border: 1px solid var(--cobalt); background: rgb(11 70 255 / 0.1);
}
.form-success[hidden] { display: none; }
.form-success > .ico { color: #8fb0ff; }
.form-success strong { font-weight: 600; }
.form-success p { margin-top: 4px; color: var(--text-2); font-size: 0.9375rem; }
.form-success .text-btn { color: #a9c0ff; }
.contact-form.is-sent > :not(.form-success) { display: none; }

/* ---------- Stopka ---------- */

.site-footer {
  background: #050608;
  padding: clamp(56px, 6vw, 96px) var(--gutter) max(28px, env(safe-area-inset-bottom));
  color: var(--text-2);
  font-size: 0.9375rem;
}
.site-footer h2 { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.site-footer a { transition: color .2s; }
.site-footer a:not(.btn):hover { color: var(--text); }

.footer-top {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr); gap: 48px;
  padding-bottom: clamp(40px, 4.4vw, 64px);
}
.footer-brand img { width: clamp(136px, 11vw, 168px); height: auto; }
.footer-brand p { margin: 18px 0 28px; max-width: 28ch; }
.footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-nav ul { display: grid; gap: 10px; }
.footer-nav a { color: var(--text); }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.footer-places {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  padding: clamp(32px, 3.4vw, 48px) 0;
  border-top: 1px solid var(--line);
}
.footer-places address { font-style: normal; }
.footer-places p + p { margin-top: 12px; }
.footer-places p { line-height: 1.6; }
.footer-places a { color: var(--text); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); font-size: 0.875rem; }

.footer-mark {
  aspect-ratio: 10169 / 1700;
  margin-top: clamp(16px, 2vw, 32px);
  background: linear-gradient(180deg, #1b1e24, #0c0e12 85%);
  -webkit-mask: url("../logo/pulse-wordmark-white.svg") center / contain no-repeat;
  mask: url("../logo/pulse-wordmark-white.svg") center / contain no-repeat;
}

.footer-legal {
  margin-top: clamp(20px, 2.4vw, 36px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap;
  font-size: 0.8125rem; color: var(--text-3);
}
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- Nowe sekcje: układ responsywny ---------- */

@media (max-width: 1180px) {
  .used-row {
    grid-template-columns: clamp(160px, 20vw, 220px) 1fr auto;
    grid-template-areas: "img name price" "img data link";
    row-gap: 14px;
  }
  .used-img { grid-area: img; }
  .used-name { grid-area: name; }
  .used-data { grid-area: data; }
  .used-price { grid-area: price; }
  .used-link { grid-area: link; justify-self: end; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .service { grid-template-columns: 1fr; }
  .service-media { aspect-ratio: 16 / 9; min-height: 0; }
  .service-body { padding: clamp(48px, 7vw, 72px) var(--gutter) var(--section-y); }
  .service h2 { max-width: 18ch; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-places { grid-template-columns: 1fr 1fr; }
  .footer-company { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .section-head { align-items: flex-start; flex-direction: column; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .segmented legend { float: none; display: block; width: 100%; margin: 0 0 10px; }
  .segmented { display: block; white-space: nowrap; overflow-x: auto; max-width: 100%; }
  .segmented label { display: inline-block; }

  .used-row {
    grid-template-columns: 40% 1fr;
    grid-template-areas: "img name" "data data" "price link";
    column-gap: 16px; row-gap: 16px;
  }
  .used-data { gap: 8px; }
  .used-data div { padding-left: 10px; }
  .used-data dd { font-size: 0.9375rem; }
  .used-price { text-align: left; }
  .used-link { padding: 0 14px; }

  .service-media { aspect-ratio: 4 / 3; }
  .service-list li { grid-template-columns: 1fr; }

  .ruler { --label-w: 1fr; }
  .ruler-axis { grid-template-columns: 1fr; }
  .ruler-axis .ruler-label { display: none; }
  .ruler-row { grid-template-columns: 1fr; row-gap: 12px; }
  .ruler-value { font-size: 0.9375rem; }

  .contact-band .note { right: var(--gutter); }
  .contact-lines div { grid-template-columns: 1fr; gap: 4px; }
  .topic { display: flex; }
  .topic label { flex: 1 1 50%; }
  .topic span { width: 100%; justify-content: center; margin: -1px 0 0 -1px; border-radius: 0 !important; }

  .footer-nav { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .footer-places { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; }
}

/* ---------- Tablet ---------- */

/* desktop: auto mniejsze i bardziej w prawo, jak w compie — lewa krawędź zdjęcia wtapia się w halę */
@media (min-width: 1025px) {
  .hero { background: #0a0a0b; }
  .hero-media {
    left: clamp(120px, 14vw, 260px);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  }
  .hero-media img { object-position: 70% 30%; }
}

@media (max-width: 1180px) {
  .primary { margin-left: 16px; }
  .hero-note { right: var(--gutter); }
}

@media (max-width: 1024px) {
  .primary, .divider, .lang, .tools .btn-outline { display: none; }
  .burger { display: inline-grid; margin-right: -10px; }
  .tools { gap: 4px; }
  .hero-note { display: none; }
  .model-list { grid-template-columns: 1fr; }
  .model { border-left: 0; border-top: 1px solid var(--line); }
  .model:last-child { border-bottom: 1px solid var(--line); }
  .model a {
    grid-template-columns: minmax(180px, 38%) 1fr auto;
    grid-template-areas: "img text arrow";
    align-items: center;
    column-gap: clamp(20px, 4vw, 40px);
    padding: 18px 0;
  }
  .model-arrow { margin-bottom: 0; }
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .hero {
    min-height: max(640px, 100svh);
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: 48px;
  }
  .hero-media img { object-position: 50% 100%; }
  .hero::before {
    background:
      linear-gradient(180deg, rgb(7 8 10 / 0.6) 0%, rgb(7 8 10 / 0.15) 40%, rgb(7 8 10 / 0) 60%, var(--ink-1) 100%);
  }
  .hero-copy { margin-top: 0; width: 100%; }
  .hero h1 { font-size: clamp(2rem, 9.6vw, 3.25rem); }
  .lede { max-width: 26ch; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-actions .btn-primary { width: 100%; justify-content: space-between; }

  .models-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .model a { grid-template-columns: 44% 1fr auto; column-gap: 16px; padding: 14px 0; }
  .model-type { font-size: 0.6875rem; letter-spacing: 0.14em; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .hero { min-height: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
