/* ============================================================
   Mati Moto - plac aut: asfalt, sygnałowa żółć, tablica rejestracyjna jako logo
   Fonty: Barlow Condensed (nagłówki, ceny) + Barlow (tekst)
   ============================================================ */
:root {
  --asphalt: #111315;
  --tar: #1a1d20;
  --tar-2: #22262a;
  --line: #2f353b;
  --chalk: #eeece6;
  --muted: #a7acb3;
  --signal: #f6c200;
  --signal-hi: #ffd633;
  --signal-ink: #15120a;
  --stamp: #ff5a5f;
  --paper: #e8eaed;
  --paper-card: #ffffff;
  --paper-ink: #15181b;
  --paper-muted: #464c54;
  --radius: 14px;
  --hdr: 68px;
  --f-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 64px); }
body {
  margin: 0;
  background: var(--asphalt);
  color: var(--chalk);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid #111315;
  box-shadow: 0 0 0 5px var(--signal);
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--signal); color: var(--signal-ink); font-weight: 700;
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

section[id] { scroll-margin-top: calc(var(--hdr) + 60px); }

/* ===== Przyciski ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 0 24px; border-radius: 10px;
  font: 700 1rem/1.2 var(--f-body); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { background: var(--signal-hi); }
.btn-ghost { border-color: #646b73; color: var(--chalk); background: transparent; }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

/* ===== Nagłówek + menu w poziomie (widoczne zawsze, także na telefonie) ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(17, 19, 21, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s ease; }
.site-header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.header-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: var(--hdr); display: flex; align-items: center; gap: 28px; }

.brand { text-decoration: none; display: inline-flex; margin-right: auto; }
.plate { display: inline-flex; align-items: stretch; height: 44px; background: #fff; border: 2px solid #15120a; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px #3a4047; }
.plate-eu { background: #1b4fbf; color: #fff; font: 700 0.66rem/1 var(--f-body); display: flex; align-items: flex-end; padding: 0 5px 4px; letter-spacing: 0.05em; }
.plate-txt { color: #15120a; font: 800 1.4rem/1 var(--f-head); display: flex; align-items: center; padding: 0 13px 0 11px; letter-spacing: 0.07em; }
.nav-cta { min-height: 44px; padding: 0 18px; }

.nav-links { border-top: 1px solid var(--line); background: var(--tar); }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav-links a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; text-decoration: none; font: 700 1.25rem/1 var(--f-head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--chalk); border-bottom: 3px solid transparent; transition: color 0.15s ease, border-color 0.15s ease; }
.nav-links a:hover { color: var(--signal); }
.nav-links a[aria-current] { color: var(--signal); border-bottom-color: var(--signal); }
.nav-links .badge { font-size: 0.9rem; }
.nav-links a:focus-visible { outline-offset: -4px; }

@media (max-width: 600px) {
  :root { --hdr: 60px; }
  .header-in { padding: 0 16px; gap: 12px; }
  .plate { height: 38px; }
  .plate-txt { font-size: 1.2rem; padding: 0 10px 0 8px; }
  .nav-cta { min-height: 40px; padding: 0 12px; font-size: 0.92rem; }
  .nav-cta-long { display: none; }
  .nav-in { padding: 0 4px; }
  .nav-links a { padding: 0 11px; font-size: 1.08rem; min-height: 48px; }
}

/* ===== Wspólne ===== */
.section-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.kicker { font: 700 0.92rem/1.2 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); margin-bottom: 12px; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.015em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }

/* ===== Hero: prawdziwe auto z placu, całe w kadrze ===== */
.hero { position: relative; isolation: isolate; background: radial-gradient(60% 80% at 78% 45%, rgba(246, 194, 0, 0.10), rgba(17, 19, 21, 0) 70%), repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 64px); }
.hero-wrap { max-width: 1240px; margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero-photo { position: relative; grid-column: 2; grid-row: 1; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px 22px 22px 110px; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); }
.hero-in { grid-column: 1; grid-row: 1; }
.hero h1 { font-size: clamp(3rem, 6.2vw, 5.6rem); margin-bottom: 22px; }
.hero h1 span { display: block; color: var(--signal); font-size: 0.52em; margin-top: 10px; }
.lead { font-size: 1.16rem; color: #d9dce0; max-width: 32em; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-chip { position: absolute; right: 18px; bottom: 18px; background: rgba(17, 19, 21, 0.88); color: var(--chalk); font: 600 0.82rem/1 var(--f-body); padding: 8px 12px; border-radius: 99px; letter-spacing: 0.04em; }
.num.bump, .badge.bump { animation: bump 0.6s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

@media (max-width: 900px) {
  .hero-wrap { grid-template-columns: 1fr; gap: 0; padding: 0 0 48px; }
  .hero-photo { grid-column: 1; grid-row: 1; }
  .hero-photo img { border-radius: 0; border: 0; box-shadow: none; }
  .hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--asphalt) 0%, rgba(17,19,21,0) 30%); }
  .photo-chip { top: 12px; bottom: auto; right: 12px; z-index: 1; }
  .hero-in { grid-column: 1; grid-row: 2; padding: 0 16px; margin-top: -36px; position: relative; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); margin-bottom: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }
}

/* ===== Katalog ===== */
.catalog { padding: 8px 0 88px; background: linear-gradient(180deg, var(--asphalt), var(--tar) 220px); }
.sec-head { margin-bottom: 8px; }

.tabs { display: none; }
.js .tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 30px; }
.tab { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; background: var(--tar-2); color: var(--chalk); border: 2px solid var(--line); border-radius: 12px; font: 700 1.3rem/1 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.tab:hover { border-color: #646b73; }
.tab[aria-selected="true"] { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.badge { display: inline-block; min-width: 28px; padding: 3px 8px; text-align: center; background: #343a41; color: var(--chalk); border-radius: 99px; font: 800 1rem/1 var(--f-head); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .badge { background: var(--signal-ink); color: var(--signal); }

.lot { container-type: inline-size; }
.lot:not([hidden]) ~ .lot:not([hidden]) { margin-top: 64px; }
.lot-title { font-size: 2rem; margin-bottom: 6px; }
.js .lot-title { font-size: 1.7rem; }
.lot-sub { color: var(--muted); margin-bottom: 26px; max-width: 40em; }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.lot-empty a { color: var(--signal); font-weight: 700; }
.lot-empty { margin-top: 8px; padding: 28px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.car { position: relative; display: flex; flex-direction: column; background: var(--tar-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; }
.car:hover { border-color: #5a6169; transform: translateY(-3px); }
.car-photo { position: relative; }
.car-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0c0d0f; transition: filter 0.4s ease; }
.car-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.car-name { font-size: 1.7rem; margin-bottom: 12px; }
.car-gen { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 8px; margin-bottom: 20px; }
.specs li { font-size: 0.9rem; font-weight: 600; padding: 4px 10px; background: #2c3238; border-radius: 6px; color: #dfe1e4; }
.car-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.plate-price { display: inline-flex; align-items: baseline; gap: 6px; background: var(--signal); color: var(--signal-ink); padding: 7px 18px 7px 14px; font-family: var(--f-head); font-weight: 800; line-height: 1; border-radius: 4px 4px 4px 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 11px 100%, 0 calc(100% - 11px)); }
.pp-num { font-size: 2.2rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.pp-cur { font-size: 1.15rem; }
.price-tel { font: 700 1.25rem/1.1 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; color: var(--signal); }
.price-soon { font: 700 1.15rem/1.2 var(--f-head); letter-spacing: 0.05em; text-transform: uppercase; color: var(--signal); }
.btn-ask { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid #646b73; border-radius: 10px; font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: border-color 0.15s ease, color 0.15s ease; }
.btn-ask:hover { border-color: var(--signal); color: var(--signal); }

.stamp, .soon-tag { display: none; }
.list-wkrotce .soon-tag { display: block; position: absolute; top: 12px; left: 12px; background: rgba(17, 19, 21, 0.92); color: var(--signal); border: 1px solid var(--signal); font: 700 0.85rem/1 var(--f-body); letter-spacing: 0.04em; padding: 8px 12px; border-radius: 8px; }
.list-sprzedane .stamp { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-9deg); border: 4px solid var(--stamp); color: var(--stamp); background: rgba(17, 19, 21, 0.72); font: 800 2.5rem/1 var(--f-head); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 18px 4px; border-radius: 8px; pointer-events: none; }
.list-sprzedane .car-photo img { filter: grayscale(0.9) brightness(0.78); }
.list-sprzedane .plate-price { background: #414850; color: #cdd1d5; text-decoration: line-through; text-decoration-thickness: 2px; }
.list-sprzedane .btn-ask { display: none; }
.list-sprzedane .car:hover { transform: none; }

@container (min-width: 1100px) {
  .lot-grid[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lot-grid[data-n="4"] .car-name { font-size: 1.45rem; }
  .lot-grid[data-n="4"] .car-body { padding: 16px 16px 18px; }
  .lot-grid[data-n="4"] .pp-num { font-size: 1.9rem; }
  .lot-grid[data-n="4"] .stamp { font-size: 2rem; }
}

.car.flash { animation: flash 1s ease-out 2; }
@keyframes flash { from { box-shadow: 0 0 0 0 rgba(246, 194, 0, 0.95); } to { box-shadow: 0 0 0 22px rgba(246, 194, 0, 0); } }

/* ===== O nas ===== */
.about { padding: 88px 0; background: var(--asphalt); border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.about-copy p { color: #cfd2d6; max-width: 34em; margin-top: 18px; }
.about-copy h2 { margin-top: 2px; }
.steps { counter-reset: krok; display: grid; gap: 22px; }
.steps li { counter-increment: krok; position: relative; padding: 0 0 0 76px; min-height: 56px; }
.steps li::before { content: counter(krok); position: absolute; left: 0; top: 0; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--signal); color: var(--signal-ink); font: 800 2rem/1 var(--f-head); border-radius: 6px 6px 6px 0; }
.steps h3 { font-size: 1.55rem; margin-bottom: 4px; }
.steps p { color: var(--muted); }

@media (max-width: 880px) {
  .about { padding: 64px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== Kontakt + wizytówka Google ===== */
.contact { padding: 88px 0 104px; background: var(--tar); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.big-tel { display: inline-block; margin: 14px 0 22px; font: 800 clamp(3.4rem, 10vw, 6.4rem)/1 var(--f-head); letter-spacing: 0.02em; color: var(--signal); text-decoration: none; font-variant-numeric: tabular-nums; }
.big-tel:hover { color: var(--signal-hi); text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.addr { font-style: normal; font-size: 1.15rem; font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.route { color: var(--signal); font-weight: 700; text-underline-offset: 4px; }
.route:hover { color: var(--signal-hi); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--tar-2); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(0.35) contrast(1.05); }
.gbp { padding: 26px; background: var(--tar-2); border: 1px solid var(--line); border-radius: var(--radius); }
.gbp h3 { font-size: 1.8rem; margin-bottom: 10px; }
.gbp p { color: #cfd2d6; margin-bottom: 16px; }
.gbp-list { display: grid; gap: 10px; }
.gbp-list li { position: relative; padding-left: 26px; font-weight: 500; }
.gbp-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; background: var(--signal); border-radius: 3px 3px 3px 0; }

@media (max-width: 880px) {
  .contact { padding: 64px 0 96px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ===== Stopka ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--asphalt); padding: 26px 0 96px; color: var(--muted); font-size: 0.95rem; }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.site-footer a { color: var(--chalk); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--signal); }


/* ===== Dolny pasek kontaktu (telefon) ===== */
.dock { display: none; }
@media (max-width: 760px) {
  .dock { display: grid; grid-template-columns: 1.4fr 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--asphalt); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .dock a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; text-decoration: none; font-weight: 700; border: 2px solid #646b73; }
  .dock a:first-child { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
}

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

@media (max-width: 600px) {
  .js .tabs { gap: 6px; flex-wrap: nowrap; }
  .tab { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 5px; padding: 0 7px; font-size: 0.98rem; letter-spacing: 0.03em; min-height: 48px; }
  .tab .badge { min-width: 22px; padding: 3px 5px; font-size: 0.85rem; }
}

/* logo klienta 27.10 zamiast tablicy rejestracyjnej */
.logo { display: block; height: 58px; width: auto; }
.hours { color: #cfd2d6; max-width: 30em; margin-bottom: 14px; }
@media (max-width: 640px) { .logo { height: 46px; } }

/* ===== Sprzedaj swoje auto ===== */
.sell { padding: 88px 0; background: var(--tar-2); border-top: 1px solid var(--line); }
.sell-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.sell-copy p { color: #cfd2d6; max-width: 32em; margin-top: 14px; }
.sell-points { display: grid; gap: 10px; margin-top: 22px; }
.sell-points li { position: relative; padding-left: 26px; font-weight: 500; }
.sell-points li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; background: var(--signal); border-radius: 3px 3px 3px 0; }
.sell-form { background: var(--asphalt); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
.f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-row { display: grid; gap: 6px; }
.f-row label { font-weight: 700; font-size: 0.95rem; }
.f-row label span { color: var(--signal); }
.f-row input, .f-row textarea { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--tar); color: var(--chalk); border: 2px solid var(--line); border-radius: 10px; font: 500 1rem/1.4 var(--f-body); }
.f-row textarea { resize: vertical; }
.f-row input::placeholder, .f-row textarea::placeholder { color: #7d848c; }
.f-row input:focus-visible, .f-row textarea:focus-visible, .sell-form button:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-color: var(--signal); }
.f-row input[aria-invalid="true"] { border-color: var(--stamp); }
.f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-note { color: var(--muted); font-size: 0.85rem; }
.f-status { min-height: 1.4em; font-weight: 700; }
.f-status.ok { color: var(--signal-hi); }
.f-status.err { color: var(--stamp); }
@media (max-width: 880px) {
  .sell { padding: 64px 0; }
  .sell-grid { grid-template-columns: 1fr; gap: 32px; }
  .sell-form { padding: 20px; }
  .f-2 { grid-template-columns: 1fr; }
}
