/* ==========================================================================
   DONART Serwis Samochodowy — styl strony (kolorystyka Warsztat24: czerń, grafit, szarość, czerwony akcent)
   ========================================================================== */

@font-face { font-family: "Jakarta"; font-weight: 400 800; font-display: swap; src: url("../fonts/jakarta-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; font-weight: 400 800; font-display: swap; src: url("../fonts/jakarta-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --black: #0e0f11;
  --ink: #17191c;
  --graphite: #23262b;
  --graphite-2: #33373d;
  --gray: #54595f;
  --gray-2: #8a8f96;
  --line: #e3e5e8;
  --light: #f3f4f6;
  --white: #fff;
  --red: #e50102;
  --red-2: #ff2a2b;
  --red-dark: #b80001;
  --r: 10px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --hdr: 76px;
  --f: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; overflow-x: clip; font: 400 17px/1.6 var(--f); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r); background: var(--red); color: #fff; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 8px; border: 2px solid transparent;
  font: 700 15px/1 var(--f); letter-spacing: .01em; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--light); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgb(127 127 127 / .12); }

/* ---------- Nagłówek ---------- */
.hdr { position: sticky; top: 0; z-index: 30; height: var(--hdr); background: var(--black); color: #fff; border-bottom: 4px solid var(--red); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 100%; }
.logo { display: grid; line-height: 1; }
.logo-znak { font-weight: 800; font-size: 26px; letter-spacing: .06em; }
.logo-znak::first-letter { color: var(--red); }
.logo-pod { margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--gray-2); }
.menu { display: flex; gap: 4px; margin-left: auto; }
.menu a { position: relative; padding: 10px 12px; font-weight: 600; font-size: 15px; color: #d7d9dc; transition: color .2s; }
.menu a:hover { color: var(--red-2); }
.hdr-akcje { display: flex; gap: 10px; }
.hdr-akcje .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.hdr-tel { color: #fff; border-color: rgb(255 255 255 / .35); }

/* ---------- Pierwszy ekran ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vh, 110px) 0 clamp(56px, 10vh, 120px); color: #fff; background: var(--graphite); }
.hero-in { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-kicker { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: #c9ccd0; }
.hero-kicker .i { width: 18px; height: 18px; color: var(--red-2); }
.hero h1 { margin-top: 20px; font-size: clamp(38px, 5.6vw, 68px); font-weight: 800; }
.hero h1 .h1-l { display: block; }
.hero h1 .h1-b { display: block; margin-top: 6px; font-size: .52em; font-weight: 700; letter-spacing: 0; color: #c9ccd0; }
.hero-lead { max-width: 58ch; margin-top: 22px; font-size: clamp(16px, 1.3vw, 19px); color: #c9ccd0; }
.hero-akcje { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-fakty { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 32px; }
.hero-fakty li { display: flex; align-items: flex-start; gap: 10px; }
.hero-fakty .i { width: 22px; height: 22px; color: var(--red-2); }
.hero-fakty b { display: block; font-size: 15px; }
.hero-fakty small { display: block; font-size: 14px; color: #aeb2b8; }
.hero-fakty a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.status-on { color: #4ade80; }
.status-off { color: #fca5a5; }

/* Karta „rezerwacji” — ilustracja w pierwszym ekranie */
.hero-karta { display: block; padding: 26px; border-radius: 12px; background: #fff; color: var(--ink); transition: box-shadow .2s; }
.hero-karta:hover { box-shadow: 0 0 0 3px var(--red); }
.hero-karta:hover .hk-btn { background: var(--red-dark); }
.hk-gora { font-size: 15px; font-weight: 600; color: var(--gray); }
.hk-tytul { margin: 12px 0 16px; font-size: 22px; font-weight: 800; line-height: 1.2; }
.hk-lista { display: grid; gap: 8px; }
.hk-lista li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; background: var(--light); font-weight: 600; font-size: 15px; }
.hk-lista .i { width: 18px; height: 18px; color: var(--red); stroke-width: 2.4; }
.hk-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 700; transition: background-color .2s; }

/* ---------- Sekcje ---------- */
.sek { padding: clamp(64px, 9vw, 110px) 0; }
.sek-szara { background: var(--light); }
.sek-ciemna { background: var(--ink); color: #fff; }
.sek-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.sek-head h2, .k-info h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.sek-head p { margin-top: 16px; font-size: 18px; color: var(--gray); }
.sek-ciemna .sek-head p { color: #aeb2b8; }

/* Usługi */
.usl-siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.usl { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; transition: border-color .2s; }
.usl:hover { border-color: var(--red); }
.usl-i { width: 32px; height: 32px; color: var(--red); stroke-width: 1.7; }
.usl h3 { margin-top: 6px; font-size: 19px; font-weight: 800; }
.usl p { color: var(--gray); font-size: 15px; line-height: 1.55; }
.tagi { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tagi li { padding: 4px 10px; border-radius: 999px; background: var(--light); color: var(--graphite-2); font-size: 12.5px; font-weight: 600; }

/* Kroki */
.kroki { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: krok; }
.kroki li { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 26px; border-radius: var(--r); background: var(--graphite); border: 1px solid rgb(255 255 255 / .08); }
.kroki h3 { font-size: 21px; font-weight: 800; }
.kroki p { flex: 1; color: #b9bdc2; font-size: 15.5px; }
.kroki .btn-ghost { color: #fff; border-color: rgb(255 255 255 / .35); }
.kroki li:first-child { background: var(--red); border-color: var(--red); }
.kroki li:first-child p { color: #fff; }
.kroki li:first-child .btn-red { background: #fff; color: var(--red); }
.kroki li:first-child .btn-red:hover { background: var(--light); }

/* Godziny i kontakt */
.kontakt > *, .faq > * { min-width: 0; }
.kontakt { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.k-godz { margin-top: 28px; padding: 20px 22px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.k-status { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.k-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.k-status.on { background: #dcfce7; color: #166534; }
.k-status.off { background: #fee2e2; color: #991b1b; }
.godz { width: 100%; border-collapse: collapse; }
.godz th, .godz td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 16px; }
.godz tr:last-child th, .godz tr:last-child td { border-bottom: 0; }
.godz th { font-weight: 600; }
.godz td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.godz tr.dzis th, .godz tr.dzis td { color: var(--red); }
.k-lista { display: grid; gap: 16px; margin-top: 26px; }
.k-lista li { display: flex; gap: 14px; }
.k-lista .i { width: 22px; height: 22px; margin-top: 2px; color: var(--red); }
.k-lista small { display: block; font-size: 14px; color: var(--gray); }
.k-lista a { font-weight: 700; color: var(--ink); }
.k-lista a:hover { color: var(--red); }
.k-akcje { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.k-akcje .btn-ghost { color: var(--ink); }
.k-mapa { position: relative; overflow: hidden; border-radius: var(--r); background: #e5e7eb; border: 1px solid var(--line); }
.k-mapa iframe { display: block; width: 100%; height: 460px; border: 0; }
.k-mapa-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.k-mapa-link:hover { color: var(--red); }
.k-mapa-link .i { width: 16px; height: 16px; }

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.qas { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e50102' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .25s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa[open] h3 { color: var(--red); }
.qa h3 { font-size: 18px; font-weight: 700; }
.qa p { padding: 0 44px 20px 0; color: var(--gray); }

/* CTA */
.cta { padding: clamp(56px, 8vw, 90px) 0; color: #fff; text-align: center; background: var(--red); }
.cta-in { display: grid; justify-items: center; gap: 14px; }
.cta h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; }
.cta p { font-size: 18px; color: #fff; }
.cta p a { color: #fff; font-weight: 800; white-space: nowrap; }
.cta .btn-red { margin-top: 10px; background: var(--black); }
.cta .btn-red:hover { background: var(--graphite-2); }

/* Stopka */
.stopka { padding: 56px 0 28px; background: var(--black); color: #aeb2b8; font-size: 15px; }
.stopka-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.stopka h2 { margin-bottom: 10px; color: #fff; font-size: 16px; font-weight: 700; }
.stopka a { color: #e7e8ea; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .3); text-underline-offset: 3px; }
.stopka a:hover { color: var(--red-2); }
.logo-st { margin-bottom: 12px; color: #fff; }
.stopka-linki { margin-top: 10px; }
.stopka-dol { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .1); font-size: 13.5px; }

.dock { display: none; }

/* ---------- RWD ---------- */
@media (max-width: 1080px) {
  .menu { display: none; }
  .hdr-akcje { margin-left: auto; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-karta { max-width: 460px; transform: none; }
  .kroki { grid-template-columns: 1fr; }
  .kontakt, .faq { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --hdr: 64px; }
  body { font-size: 16px; }
  .logo-znak { font-size: 22px; }
  .logo-pod { font-size: 12px; }
  .hdr-tel { display: none; }
  .hdr-akcje .btn { min-height: 42px; padding: 0 14px; }
  .hero { padding: 36px 0 48px; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .hero-akcje .btn { flex: 1 1 100%; }
  .usl-siatka { grid-template-columns: 1fr; }
  /* Karta wizytówki Google pojawia się od 400 px szerokości: mapa ma 400 px i jest zmniejszana do ekranu (main.js) */
  .k-mapa iframe { width: 400px; height: 400px; transform-origin: 0 0; }
  .stopka-in { grid-template-columns: 1fr; }
  .stopka { padding-bottom: 96px; }
  /* Pasek szybkich akcji u dołu ekranu */
  .dock { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: 1fr 1.3fr 1fr; padding-bottom: env(safe-area-inset-bottom); background: var(--black); border-top: 1px solid rgb(255 255 255 / .1); }
  .dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; color: #fff; font-size: 13px; font-weight: 700; }
  .dock .i { width: 22px; height: 22px; }
  .dock .dock-rez { background: var(--red); }
}
@media (max-width: 380px) {
  .hdr-akcje .btn span { display: none; }
  .hdr-akcje .btn { width: 44px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ==========================================================================
   Wersja premium: animacje (tylko gdy działa JS i użytkownik nie wyłączył ruchu)
   ========================================================================== */
:root { interpolate-size: allow-keywords; --ease: cubic-bezier(.2, .8, .2, 1); }

/* Belka nagłówka jako pasek postępu przewijania */
.hdr { border-bottom: 0; }
.hdr::after { content: ""; position: absolute; inset: auto 0 -4px; height: 4px; background: var(--red-dark); }
.hdr-postep { position: absolute; inset: auto 0 -4px; z-index: 1; height: 4px; background: var(--red-2); transform-origin: 0 50%; transform: scaleX(var(--postep, 0)); }
.hdr.przewiniety { background: rgb(14 15 17 / .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Felga w tle pierwszego ekranu: kręci się przy przewijaniu */
.hero-felga { position: absolute; right: -120px; top: 50%; width: min(78vw, 860px); height: auto; color: #fff; opacity: .06; transform: translateY(-50%) rotate(var(--obrot, 0deg)); pointer-events: none; }
.hero-in { z-index: 1; }

/* Przyciski: ikona lekko w prawo, wciśnięcie */
.btn .i { transition: transform .25s var(--ease); }
.btn:hover .i { transform: translateX(2px); }
.btn:active { transform: scale(.98); }

/* Taśma usług */
.tasma { overflow: hidden; background: var(--black); color: #e7e8ea; border-block: 1px solid rgb(255 255 255 / .08); }
.tasma-in { display: flex; width: max-content; }
.tasma span { display: inline-flex; align-items: center; gap: 12px; padding: 18px 28px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.tasma .i { width: 22px; height: 22px; color: var(--red-2); }
.tasma:hover .tasma-in { animation-play-state: paused; }


/* FAQ: płynne rozwijanie */
.qa::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
.qa[open]::details-content { height: auto; }

@media (prefers-reduced-motion: no-preference) {
  /* Wejście pierwszego ekranu */
  .js .h1-l { display: block; overflow: hidden; padding-bottom: .06em; }
  .js .h1-a, .js .h1-b { display: block; transform: translateY(105%); animation: wjazd .9s var(--ease) forwards; }
  .js .h1-b { animation-delay: .12s; }
  .js .hero-kicker, .js .hero-lead, .js .hero-akcje, .js .hero-fakty { opacity: 0; transform: translateY(14px); animation: pojaw .8s var(--ease) forwards; }
  .js .hero-kicker { animation-delay: .05s; }
  .js .hero-lead { animation-delay: .3s; }
  .js .hero-akcje { animation-delay: .42s; }
  .js .hero-fakty { animation-delay: .54s; }
  .js .hero-karta { opacity: 0; transform: translateX(40px); animation: karta 1s var(--ease) .35s forwards; }
  .js .hk-lista li { opacity: 0; transform: translateX(-10px); animation: pojaw .5s var(--ease) forwards; }
  .js .hk-lista li:nth-child(1) { animation-delay: .9s; } .js .hk-lista li:nth-child(2) { animation-delay: 1.05s; }
  .js .hk-lista li:nth-child(3) { animation-delay: 1.2s; } .js .hk-lista li:nth-child(4) { animation-delay: 1.35s; }
  .js .hk-lista .i { stroke-dasharray: 26; stroke-dashoffset: 26; animation: ptaszek .45s var(--ease) forwards; }
  .js .hk-lista li:nth-child(1) .i { animation-delay: 1.15s; } .js .hk-lista li:nth-child(2) .i { animation-delay: 1.3s; }
  .js .hk-lista li:nth-child(3) .i { animation-delay: 1.45s; } .js .hk-lista li:nth-child(4) .i { animation-delay: 1.6s; }
  .js .hk-btn { animation: pojaw .6s var(--ease) 1.7s backwards; }

  /* Taśma jedzie w kółko */
  .tasma-in { animation: tasma 45s linear infinite; }

  /* Odsłanianie przy przewijaniu */
  .js [data-pokaz] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js [data-pokaz].widoczne { opacity: 1; transform: none; }
  .js [data-pokaz-dzieci] > * { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .2s; transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-pokaz-dzieci].widoczne > * { opacity: 1; transform: none; }
  .js .kroki > li:nth-child(2) { --i: 1; } .js .kroki > li:nth-child(3) { --i: 2; }
  .js .k-mapa-box[data-pokaz] { transform: none; }
  .js .k-mapa-box[data-pokaz] .k-mapa { clip-path: inset(0 0 100% 0 round var(--r)); transition: clip-path 1.1s var(--ease) .1s; }
  .js .k-mapa-box[data-pokaz].widoczne .k-mapa { clip-path: inset(0 0 0 0 round var(--r)); }
}
@keyframes wjazd { to { transform: none; } }
@keyframes pojaw { to { opacity: 1; transform: none; } }
@keyframes karta { to { opacity: 1; transform: none; } }
@keyframes ptaszek { to { stroke-dashoffset: 0; } }
@keyframes tasma { to { transform: translateX(-50%); } }

@media (max-width: 1080px) {
  .hero-felga { right: -35%; top: 6%; width: 120vw; transform: rotate(var(--obrot, 0deg)); }
}
@media (max-width: 720px) {
  .tasma span { padding: 14px 20px; font-size: 14px; }
}
