/* ===== CarStudio Mazurkiewicz – style (mobile-first) ===== */

:root {
  --bg: #0b0c0e;
  --bg-2: #121418;
  --bg-3: #1a1d22;
  --line: #2a2e35;
  --text: #f2f3f5;
  --muted: #9aa1ab;
  --accent: #f39221;        /* pomarańcz z logo CarStudio */
  --accent-2: #ffab4a;
  --on-accent: #0b0c0e;     /* kolor tekstu na pomarańczowym tle */
  --radius: 14px;
  --wrap: 1180px;
  --header-h: 64px;
  --callbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  padding-bottom: var(--callbar-h);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 8vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--alt { background: var(--bg-2); }
.eyebrow { display: inline-block; color: var(--accent-2); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 620px; }
.section-head { margin-bottom: 36px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: var(--text); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: #fff; }
.btn:active { transform: scale(.98); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* ---------- górna belka ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled, .header.is-open { background: rgba(11,12,14,.92); backdrop-filter: blur(12px); border-color: var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-car { width: 46px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; flex: none; }
.logo-text { font-size: 1.3rem; font-weight: 400; letter-spacing: -.01em; line-height: 1; }
.logo-text b { font-weight: 800; color: var(--accent); }
.logo-text small { display: block; margin-top: 3px; font-size: .66rem; font-style: italic; letter-spacing: .14em; color: var(--muted); }

.nav-toggle { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .25s, opacity .25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
.header.is-open .nav-toggle span { background: transparent; }
.header.is-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.header.is-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed; inset: var(--header-h) 0 0; background: var(--bg);
  padding: 24px 20px calc(var(--callbar-h) + 24px); overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.header.is-open .nav { opacity: 1; visibility: visible; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 14px 0; font-size: 1.35rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
.header-call { display: none; }

/* przyklejony pasek „Zadzwoń” na telefonie */
.callbar {
  position: fixed; inset: auto 0 0; z-index: 60; height: var(--callbar-h);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  height: calc(var(--callbar-h) + env(safe-area-inset-bottom));
  background: rgba(11,12,14,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.callbar .btn { min-height: 48px; padding: 0 12px; font-size: .95rem; }

/* ---------- baner główny ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 80%; }
.hero-media { background: #111 url("img/hero.webp") center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,12,14,.55) 0%, rgba(11,12,14,.45) 40%, rgba(11,12,14,.85) 75%, var(--bg) 100%); }
.hero .wrap { padding-top: calc(var(--header-h) + 40px); padding-bottom: 56px; }
.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p { color: #c9ced6; font-size: 1.1rem; max-width: 34ch; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.hero-badges li::before { content: "✓"; color: var(--accent-2); margin-right: 6px; font-weight: 700; }

/* ---------- usługi ---------- */
.services { display: grid; gap: 14px; }
.service {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.service:hover { border-color: #3a3f48; transform: translateY(-2px); }
.service-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(243,146,33,.12); color: var(--accent-2); margin-bottom: 16px; }
.service-icon svg { width: 24px; height: 24px; }
.service p { color: var(--muted); font-size: .95rem; flex: 1; }
.service-link { padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; font-weight: 700; color: var(--accent-2); text-decoration: none; }

/* ---------- realizacje ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.work { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--bg-3); }
.work[hidden], .work.is-extra { display: none; }
.gallery.show-all .work.is-extra:not([hidden]) { display: block; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work:hover img { transform: scale(1.04); }
.work span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-size: .8rem; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.gallery-more { text-align: center; margin-top: 24px; }
.gallery-more[hidden] { display: none; }

/* podgląd zdjęcia */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5,5,6,.96); color: var(--text); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.8); }
.lightbox figure { margin: 0; padding: 56px 12px; max-width: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); margin: 0 auto; border-radius: 8px; object-fit: contain; }
.lightbox figcaption { margin-top: 12px; color: var(--muted); font-size: .92rem; }
.lb-close, .lb-nav { position: absolute; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-close { top: 12px; right: 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* filmy */
.shorts { display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.short { scroll-snap-align: start; position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.short video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.short--link { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-decoration: none; text-align: center; padding: 20px; }
.short--link svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 8px; }
.short--link span { color: var(--muted); font-size: .88rem; }

/* ---------- jak pracujemy ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 76px; border-radius: var(--radius); background: var(--bg-3); border: 1px solid var(--line); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); position: absolute; left: 22px; top: 20px; font-size: 1.5rem; font-weight: 800; color: var(--accent-2); }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- o nas ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about-media { border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.about-media video { width: 100%; height: 100%; object-fit: cover; }
.about-points { list-style: none; margin: 20px 0 28px; padding: 0; display: grid; gap: 10px; }
.about-points li { padding-left: 28px; position: relative; color: #c4c9d1; }
.about-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 2px; background: var(--accent); }
.about p { color: #c4c9d1; }

/* ---------- opinie ---------- */
.reviews-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 20px; margin-bottom: 28px; }
.reviews-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reviews-actions .btn { min-height: 44px; font-size: .92rem; padding: 0 18px; }
.rating-summary { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; color: var(--muted); }
.rating-summary strong { font-size: 1.6rem; color: var(--text); }
.stars { color: #fbbc04; letter-spacing: 2px; font-size: 1.1rem; }
.reviews { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.reviews:empty { display: none; }
.review { scroll-snap-align: start; display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius); background: var(--bg-3); border: 1px solid var(--line); margin: 0; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(243,146,33,.15); color: var(--accent-2); font-weight: 800; }
.review-head a, .review-head strong { font-weight: 700; text-decoration: none; }
.review-head small { display: block; color: var(--muted); font-size: .8rem; }
.review blockquote { margin: 14px 0 0; color: #c4c9d1; font-size: .95rem; }
.review blockquote.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.review-more { align-self: flex-start; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent-2); font: 600 .88rem var(--font); cursor: pointer; }
.reviews-source { margin: 16px 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 300; color: var(--accent-2); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* ---------- kontakt ---------- */
.contact { display: grid; gap: 32px; }
.contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 4px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list svg { width: 22px; height: 22px; color: var(--accent-2); flex: none; margin-top: 2px; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-phone { font-size: 1.4rem; font-weight: 800 !important; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 3px 0; } .hours td + td { text-align: right; color: var(--muted); }

.map { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 20px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map p { color: var(--muted); font-size: .9rem; max-width: 34ch; margin: 0 auto 14px; }

.form { padding: 24px 20px; border-radius: var(--radius); background: var(--bg-3); border: 1px solid var(--line); }
.form h3 { font-size: 1.4rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-size: .88rem; font-weight: 600; color: #c4c9d1; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  font: 400 16px/1.4 var(--font); /* 16px – iOS nie przybliża pola */
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-2); }
.field-row { display: grid; gap: 0 14px; }
.file-drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed #3a3f48; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: .9rem; }
.file-drop svg { width: 24px; height: 24px; flex: none; color: var(--accent-2); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:focus-within { border-color: var(--accent-2); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin: 6px 0 18px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; }
.form-status { margin: 14px 0 0; font-size: .95rem; min-height: 1.5em; }
.form-status.ok { color: #4ade80; } .form-status.err { color: var(--accent-2); }

/* ---------- stopka ---------- */
.footer { padding: 48px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; gap: 24px; margin-bottom: 28px; }
.footer a { text-decoration: none; } .footer a:hover { color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; font-size: .8rem; }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.social svg { width: 18px; height: 18px; }

/* ---------- baner cookies ---------- */
.cookies {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--callbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 70;
  padding: 18px; border-radius: var(--radius); background: var(--bg-3); border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.5); font-size: .88rem; color: #c4c9d1;
}
.cookies p { margin: 0 0 12px; }
.cookies-actions { display: flex; gap: 8px; }
.cookies-actions .btn { min-height: 42px; flex: 1; font-size: .9rem; padding: 0 14px; }

/* ---------- pojawianie się przy przewijaniu ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- podstrona prawna ---------- */
.legal { padding: calc(var(--header-h) + 40px) 0 60px; }
.legal .wrap { max-width: 780px; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal p, .legal li { color: #c4c9d1; }

/* ========== tablet ========== */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .shorts { grid-auto-columns: 40%; }
  .reviews { grid-auto-columns: 46%; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cookies { left: auto; right: 20px; max-width: 420px; }
}

/* ========== komputer ========== */
@media (min-width: 960px) {
  :root { --header-h: 76px; --callbar-h: 0px; }
  .callbar { display: none; }
  .cookies { bottom: 20px; }
  .wrap { padding: 0 32px; }
  .section { padding: 112px 0; }

  .nav-toggle { display: none; }
  .nav { position: static; inset: auto; opacity: 1; visibility: visible; background: none; padding: 0; overflow: visible; }
  .nav ul { display: flex; gap: 26px; }
  .nav a { padding: 0; font-size: .92rem; font-weight: 600; border: 0; color: #c4c9d1; }
  .nav a:hover { color: #fff; }
  .header-call { display: inline-flex; min-height: 44px; padding: 0 20px; font-size: .92rem; }

  .hero { align-items: center; }
  .hero-media video { object-position: center; }
  .hero .wrap { padding-bottom: 80px; }
  .hero p { font-size: 1.25rem; }

  .services { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .shorts { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .work span { font-size: .88rem; }

  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 76px 22px 24px; }
  .step::before { top: 22px; font-size: 2rem; }

  .about { grid-template-columns: 5fr 6fr; gap: 64px; }
  .reviews { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .reviews .review:nth-child(n+4) { display: none; }
  .contact { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .form { padding: 32px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
