/* ==========================================================================
   Auto Tański – arkusz stylów
   ========================================================================== */

/* Fonty (hostowane lokalnie – bez zapytań do Google, zgodnie z RODO) */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/unbounded-v12-latin_latin-ext-700.woff2") format("woff2");
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/unbounded-v12-latin_latin-ext-800.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin_latin-ext-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin_latin-ext-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin_latin-ext-600.woff2") format("woff2");
}

/* Zmienne */
:root {
  --c-red: #c4161c;
  --c-red-bright: #ff3b36;
  --c-red-text-dark: #ff5a52; /* czerwony tekst na ciemnym tle (kontrast AA) */
  --c-red-text-light: #b3141a; /* czerwony tekst na jasnym tle (kontrast AA) */
  --c-ink: #141619;
  --c-ink-2: #1c1f23;
  --c-line-dark: rgba(255, 255, 255, 0.12);
  --c-grey-100: #eceef0;
  --c-grey-200: #e0e3e6;
  --c-grey-300: #d5d8dc;
  --c-grey-500: #a9aeb4;
  --c-grey-600: #6b7178;
  --c-grey-700: #50555c;
  --c-white: #fff;

  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 24px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(72px, 10vw, 112px);
  --header-h: 84px;
}

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

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

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-white);
  background: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 3px solid var(--c-red-bright);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--c-white);
  color: var(--c-ink);
  border-radius: var(--radius-s);
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

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

/* Typografia */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-red-text-light);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 36px;
  height: 2px;
  background: var(--c-red);
}
.eyebrow--dark { color: var(--c-red-text-dark); }

.section-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--c-red);
  color: var(--c-white);
  box-shadow: 0 12px 30px -12px rgba(196, 22, 28, 0.75);
}
.btn--primary:hover { background: #d81d24; }
.btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-white);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--c-white); }
.btn--dark { background: var(--c-ink); color: var(--c-white); }
.btn--small { min-height: 46px; padding: 0 20px; font-size: 0.9375rem; }
.btn--block { width: 100%; }

/* Pasek informacyjny */
.topbar {
  background: var(--c-ink);
  border-bottom: 2px solid var(--c-red);
  font-size: 0.875rem;
  color: #c7cbd0;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
}
.topbar__list { display: flex; align-items: center; gap: 24px; }
.topbar__list li,
.topbar__list a { display: inline-flex; align-items: center; gap: 8px; }
.topbar__list a { min-height: 42px; text-decoration: none; color: var(--c-white); font-weight: 500; }
.topbar__list a:hover { color: var(--c-red-text-dark); }
.topbar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--c-red-text-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 640px) {
  .topbar__hide-sm { display: none !important; }
  .topbar__list { gap: 16px; }
}

/* Nagłówek strony */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-white);
  color: var(--c-ink);
  box-shadow: 0 1px 0 var(--c-grey-200);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.site-header__logo img { width: auto; height: 40px; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav__list { display: flex; gap: 30px; font-weight: 500; }
.site-nav__list a { text-decoration: none; padding: 8px 0; }
.site-nav__list a:hover { color: var(--c-red-text-light); }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--c-grey-100);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--c-ink);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .site-header__logo img { height: 30px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--c-white);
    box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.4);
  }
  .site-nav:not(.is-open) { display: none; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--c-grey-200); }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(760px, calc(100svh - var(--header-h)));
  overflow: hidden;
  isolation: isolate;
}
.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 22, 25, 0) 70%, var(--c-ink) 100%),
    linear-gradient(90deg, rgba(20, 22, 25, 0.94) 0%, rgba(20, 22, 25, 0.78) 45%, rgba(20, 22, 25, 0.3) 100%);
}
.hero__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-block: clamp(64px, 10vw, 112px);
}
.hero__content {
  display: flex;
  flex: 1 1 520px;
  min-width: 0;
  max-width: 660px;
  flex-direction: column;
  gap: 28px;
}

.hero-card {
  display: flex;
  flex: 0 1 380px;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-l);
  background: rgba(20, 22, 25, 0.55);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.hero-card__status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero-card__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-grey-500);
}
.hero-card__status.is-open .hero-card__dot {
  background: #3ddc6f;
  box-shadow: 0 0 0 4px rgba(61, 220, 111, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(61, 220, 111, 0); } }
.hero-card__label {
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b5bac0;
}
.hero-card__phone {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.hero-card__phone:hover { color: var(--c-red-bright); }
.hero-card__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-card__list li {
  position: relative;
  padding-left: 30px;
  color: #d5d8dc;
}
.hero-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

@media (max-width: 960px) {
  .hero-card { flex-basis: 100%; }
}
.hero__headline {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__headline span { color: var(--c-red-bright); }
.hero__lead { max-width: 500px; font-size: 1.1875rem; color: #d5d8dc; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Pasek z usługami */
.ticker { overflow: hidden; background: var(--c-red); }
.ticker__track {
  display: flex;
  width: max-content;
  padding-block: 20px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: ticker 32s linear infinite;
}
.ticker__track span { padding-right: 40px; word-spacing: 0.4em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Sekcje */
.section { padding-block: var(--section-y); }
.section--light { background: var(--c-grey-100); color: var(--c-ink); }
.section--white { background: var(--c-white); color: var(--c-ink); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}
.section-head > div { display: flex; flex-direction: column; gap: 16px; }
.section-head__note { max-width: 400px; font-size: 1.0625rem; color: var(--c-grey-700); }

/* Dekoracje z motywem logo */
.section--decor { position: relative; overflow: hidden; isolation: isolate; }
.section--decor > .container { position: relative; }

/* Logo jako znak wodny: powiększone, przekoszone, ledwo widoczne */
.watermark {
  position: absolute;
  z-index: -1;
  top: 34%;
  left: 50%;
  width: max(1500px, 125%);
  aspect-ratio: 1600 / 248;
  background: url("../img/logo-znak-wodny.png") center / contain no-repeat;
  opacity: 0.06;
  transform: translate(-50%, -50%) rotate(-7deg) skewX(-14deg);
  pointer-events: none;
}

/* Prędkościomierz z logo w tle sekcji – wskazówka "wkręca się" po przewinięciu */
.gauge-decor {
  position: absolute;
  z-index: -1;
  right: -120px;
  bottom: -60px;
  width: min(900px, 110vw);
  height: auto;
  pointer-events: none;
}
.gauge-decor__arc { fill: none; stroke: rgba(255, 255, 255, 0.05); }
.gauge-decor__needle {
  fill: rgba(196, 22, 28, 0.45);
  transform-box: view-box;
  transform-origin: 100px 100px;
  transform: rotate(-85deg);
  transition: transform 2.2s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.gauge-decor__hub { fill: var(--c-ink); }
.gauge-decor.is-active .gauge-decor__needle {
  transform: rotate(58deg);
  animation: needle-idle 3s ease-in-out 2.2s infinite;
}
@keyframes needle-idle {
  0%, 100% { transform: rotate(58deg); }
  50% { transform: rotate(52deg); }
}

/* Usługi */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--c-grey-200);
  border-radius: var(--radius-m);
  background: var(--c-white);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.service:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 50px -28px rgba(20, 22, 25, 0.45);
}
.service__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.service__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--c-ink);
}
.service__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--c-white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service__num { font-family: var(--f-display); font-weight: 700; font-size: 0.875rem; color: var(--c-red-text-light); }
.service__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  text-transform: uppercase;
}
.service p { color: var(--c-grey-700); }

/* Jak pracujemy */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.split__media {
  position: relative;
  flex: 1 1 380px;
  min-width: 0;
  height: clamp(320px, 40vw, 460px);
  overflow: hidden;
  border: 1px solid var(--c-line-dark);
  border-radius: var(--radius-l);
  background: var(--c-ink-2);
}
.split__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--c-red);
}
.split__media video { width: 100%; height: 100%; object-fit: cover; }
.split__content { display: flex; flex: 1 1 480px; min-width: 0; flex-direction: column; gap: 16px; }
.steps { margin-top: 24px; }
.step { display: flex; gap: 28px; padding-block: 26px; border-top: 1px solid var(--c-line-dark); }
.step--last { border-bottom: 1px solid var(--c-line-dark); }
.step__num {
  min-width: 56px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--c-grey-600);
}
.step--last .step__num { color: var(--c-red-bright); }
@media (max-width: 480px) {
  .step { gap: 16px; }
  .step__num { min-width: 40px; font-size: 1.375rem; }
}
.step__title { margin-bottom: 8px; font-size: 1.3125rem; font-weight: 600; line-height: 1.3; }
.step p { color: var(--c-grey-500); }

/* Kontakt */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact__info { display: flex; flex: 1 1 420px; min-width: 0; flex-direction: column; gap: 16px; }
.contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-block: 16px;
}
.contact__item { padding-left: 16px; border-left: 2px solid var(--c-grey-300); }
.contact__item--accent { border-left-color: var(--c-red); }
.contact__item dt {
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-grey-700);
}
.contact__item dd { font-size: 1.0625rem; }
.contact__item--accent dd { font-size: 1.375rem; font-weight: 600; }
.contact__item a { text-decoration: none; }
.contact__item a:hover { color: var(--c-red-text-light); }

.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 300px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--c-grey-200);
  border-radius: var(--radius-m);
  background: var(--c-grey-100);
  text-align: center;
  color: var(--c-grey-700);
}
.map__text { max-width: 320px; font-size: 0.9375rem; }
.map__link { font-size: 0.9375rem; color: var(--c-ink); }
.map.is-loaded { padding: 0; }
.map iframe { width: 100%; height: 300px; border: 0; }

/* Formularz */
.form {
  display: flex;
  flex: 1 1 420px;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 5vw, 40px);
  border-radius: var(--radius-l);
  background: var(--c-ink);
  color: var(--c-white);
}
.form__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.625rem;
  text-transform: uppercase;
}
.form__intro { font-size: 0.9375rem; color: var(--c-grey-500); }
.form__status { padding: 14px 16px; border-radius: var(--radius-s); font-weight: 500; }
.form__status.is-success { background: rgba(46, 160, 67, 0.18); color: #9be7a9; }
.form__status.is-error { background: rgba(255, 59, 54, 0.15); color: var(--c-red-text-dark); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c7cbd0;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid #3a3f45;
  border-radius: var(--radius-s);
  background: var(--c-ink-2);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #8a9097; }
.field input:focus,
.field textarea:focus { border-color: var(--c-red-bright); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--c-red-bright); }

.field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field--check input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--c-red); }
.field--check label {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-grey-500);
}

.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Stopka */
.site-footer { border-top: 3px solid var(--c-red); font-size: 0.875rem; color: var(--c-grey-500); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 40px;
}
.site-footer__brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-white);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--c-white); }

/* Ograniczony ruch */
@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;
  }
}
