/* ==========================================================================
   SofSolar — fotowoltaika Pabianice
   Motyw ciemny. Bez zależności zewnętrznych (poza Google Fonts).
   ========================================================================== */

/* ---------- 1. Tokeny ---------- */
:root {
  --bg:            #080d16;
  --bg-alt:        #0b1220;
  --surface:       #0f1a2b;
  --surface-2:     #131f33;
  --line:          #1d2c44;
  --line-strong:   #2a3d5c;

  --text:          #e8eef7;
  --text-muted:    #9fb0c7;
  --text-dim:      #7688a1;
  --ink:           #06121f;      /* tekst na jasnym tle */

  --accent:        #38bdf8;
  --accent-2:      #0ea5e9;
  --accent-soft:   rgba(56, 189, 248, .12);
  --accent-ring:   rgba(56, 189, 248, .38);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow:     0 18px 40px -24px rgba(0, 0, 0, .9);
  --shadow-glow: 0 14px 34px -14px rgba(14, 165, 233, .55);

  --header-h: 64px;
  --container: 1140px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* odstępy sekcji — mniejsze na telefonie (poprawka: dużo pustych ekranów) */
  --section-pad: clamp(3rem, 8vw, 6rem);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: dark;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 clamp(1rem, .97rem + .2vw, 1.0625rem)/1.65 var(--font-body);
  overflow-x: hidden;              /* poprawka: brak poziomego przewijania */
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }               /* blokada tła pod menu */
img, svg, iframe { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0; }
p, ul, ol, dl { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

/* widoczny focus dla klawiatury */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}
.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 200; padding: .65rem 1.1rem; background: var(--accent); color: var(--ink);
  font-weight: 600; border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: transform .18s;
}
.skip-link:focus { transform: translate(-50%, 0); text-decoration: none; }

/* ---------- 3. Layout ---------- */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }

.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(2rem, 6vw, 3.5rem); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font: 600 .8rem/1 var(--font-body);
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 3px; height: 1.1em; border-radius: 2px; background: var(--accent);
}
.section__title {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.section__title .accent { color: var(--accent); }
.section__lead {
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
/* poprawka: długie akapity do lewej, nie wyśrodkowane */
.about { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.about__text { max-width: 62ch; }
.about__figure { margin: 0; position: relative; }
.about__figure img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.about__figure figcaption {
  margin-top: .75rem; color: var(--text-dim); font-size: .9rem; text-align: center;
}

.prose p { color: var(--text-muted); margin-bottom: 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); }

/* ---------- 4. Przyciski ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.35rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  cursor: pointer; text-align: center;
  transition: transform .15s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: .55rem 1rem; font-size: .95rem; }
.btn--lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn .ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --btn-fg: var(--ink);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { box-shadow: 0 18px 40px -14px rgba(14, 165, 233, .7); }

/* POPRAWKA (wideo 00:34): przycisk dodatkowy ma zawsze czytelny kontrast.
   Wcześniej: biały tekst na białym tle. Teraz obrys + jawny kolor tekstu
   w każdym stanie (hover/active/focus). */
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  --btn-bg: #ffffff;
  --btn-fg: var(--ink);
  border-color: #ffffff;
}
.btn--ghost:active { --btn-bg: #e6eef8; --btn-fg: var(--ink); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 13, 22, .82);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
@supports (backdrop-filter: blur(12px)) {
  .site-header { backdrop-filter: blur(14px) saturate(140%); }
}
.site-header.is-scrolled {
  background: rgba(8, 13, 22, .95);
  border-bottom-color: var(--line);
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__mark svg { width: 100%; height: 100%; }
.logo__text {
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.logo__text strong { font-weight: 700; }
.logo__text span { color: var(--accent); }
.logo--sm .logo__text { font-size: 1.1rem; }

.nav-desktop { display: none; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav-desktop a:not(.btn) {
  color: var(--text-muted); font-weight: 500; padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.nav-desktop a:not(.btn):hover,
.nav-desktop a:not(.btn).is-active {
  color: var(--text); border-bottom-color: var(--accent); text-decoration: none;
}

.burger {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
}
.burger__box { width: 20px; height: 14px; position: relative; display: block; }
.burger__box span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .22s, opacity .18s, top .22s;
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
.burger[aria-expanded="true"] .burger__box span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__box span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__box span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- 6. Menu mobilne ----------
   POPRAWKA (wideo 00:50): panel jest w pełni nieprzezroczysty (nie widać
   przez niego mapy), zajmuje wysokość ekranu, a tło jest przygaszone
   i zablokowane przed przewijaniem. */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0;
  z-index: 99;
  max-height: calc(100vh - var(--header-h));          /* fallback iOS < 15.4 */
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-alt);                  /* pełne krycie */
  border-bottom: 1px solid var(--line);
  padding: 1.25rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .95);
  transform: translateY(-8px); opacity: 0;
  transition: transform .22s ease, opacity .18s ease;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { transform: translateY(0); opacity: 1; }

.mobile-menu__nav { display: grid; }
.mobile-menu__nav a {
  color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 1.25rem;
  padding: .95rem .25rem; border-bottom: 1px solid var(--line);
}
.mobile-menu__nav a:hover { color: var(--accent); text-decoration: none; }
.mobile-menu__actions { display: grid; gap: .7rem; margin-top: 1.5rem; }
.mobile-menu__meta { margin-top: 1.25rem; color: var(--text-dim); font-size: .9rem; }

.menu-backdrop {
  position: fixed; inset: 0; z-index: 98;
  background: rgba(4, 8, 14, .72);
  opacity: 0; transition: opacity .2s;
}
.menu-backdrop[hidden] { display: none; }
.menu-backdrop.is-open { opacity: 1; }

/* ---------- 7. Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,13,22,.62) 0%, rgba(8,13,22,.84) 55%, var(--bg) 100%),
    linear-gradient(100deg, rgba(8,13,22,.78) 0%, rgba(8,13,22,.25) 60%, transparent 100%),
    url("../img/foto/hero-800.webp") center / cover no-repeat,
    var(--bg-alt);
}
@media (min-width: 601px)  { .hero__bg { background-image:
    linear-gradient(180deg, rgba(8,13,22,.62) 0%, rgba(8,13,22,.84) 55%, var(--bg) 100%),
    linear-gradient(100deg, rgba(8,13,22,.78) 0%, rgba(8,13,22,.25) 60%, transparent 100%),
    url("../img/foto/hero-1200.webp"); } }
@media (min-width: 1281px) { .hero__bg { background-image:
    linear-gradient(180deg, rgba(8,13,22,.62) 0%, rgba(8,13,22,.84) 55%, var(--bg) 100%),
    linear-gradient(100deg, rgba(8,13,22,.78) 0%, rgba(8,13,22,.25) 60%, transparent 100%),
    url("../img/foto/hero-1920.webp"); } }
.hero__inner {
  padding-block: clamp(2.5rem, 9vw, 6rem) clamp(3rem, 9vw, 6rem);
  max-width: 900px;
}
.hero__badges { display: grid; gap: .5rem; margin-bottom: clamp(1.5rem, 4vw, 2.25rem); }
.hero__badges li a { color: inherit; }
.hero__badges li a:hover { text-decoration: underline; }
.hero__badges li:has(a):hover { background: rgba(56, 189, 248, .2); }
.hero__badges li {
  justify-self: start;
  padding: .5rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font: 600 .78rem/1.2 var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
}

/* POPRAWKA (wideo 00:00): nagłówek nie łamie wyrazu „FOTOWOLTAIKA".
   Rozmiar skaluje się z szerokością ekranu, łamanie tylko między wyrazami. */
.hero__title {
  /* min(..., 10.5vw) to bezpiecznik: najdłuższy wyraz („FOTOWOLTAIKA", 12 znaków)
     zawsze mieści się w szerokości kontenera, więc przeglądarka nie ma powodu
     go łamać ani ucinać — nawet na ekranie 320 px. */
  font-size: min(clamp(2.1rem, 1.1rem + 7.2vw, 4.6rem), 10.5vw);
  letter-spacing: -.025em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}
.hero__title-line { display: block; }
.hero__title-line--accent { color: var(--accent); }

.hero__lead {
  color: var(--text-muted); max-width: 54ch;
  font-size: clamp(1rem, .95rem + .35vw, 1.15rem);
  margin-bottom: clamp(1.75rem, 5vw, 2.5rem);
}
.hero__actions { display: grid; gap: .75rem; }
.hero__scroll {
  display: none; margin: 2.5rem auto 0; width: 40px; height: 40px;
  place-items: center; color: var(--text-dim);
}
.hero__scroll svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- 8. Atuty ---------- */
.highlights { display: grid; gap: clamp(1.75rem, 5vw, 2.5rem); text-align: center; }
.highlight { display: grid; gap: .5rem; justify-items: center; }
.highlight__big {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 8vw, 3.2rem);
  line-height: 1; color: var(--accent);
}
.highlight__link {
  display: grid; gap: .5rem; justify-items: center; color: inherit;
  padding: .5rem .75rem; border-radius: var(--radius); border: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
.highlight__link:hover, .highlight__link:focus-visible {
  text-decoration: none; border-color: var(--accent-ring); background: var(--accent-soft);
}
.highlight__label { color: var(--text-muted); line-height: 1.45; }
.highlight__label span { color: var(--text-dim); font-size: .9rem; }
.highlight__ico { width: 34px; height: 34px; color: var(--accent); }
.highlight__ico svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- 9. Karty usług ---------- */
.cards { display: grid; gap: 1rem; }
.card {
  display: grid; gap: .7rem; align-content: start;
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s, background-color .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card--featured {
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%);
  border-color: var(--accent-ring);
}
/* POPRAWKA (wideo 00:28): plakietka jest elementem karty, nie wystaje za krawędź */
.card__badge {
  justify-self: start;
  padding: .4rem .9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink);
  font: 700 .72rem/1 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.card__ico {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--accent);
}
.card__ico svg { width: 24px; height: 24px; fill: currentColor; }
.card__title { font-size: 1.2rem; }
.card__text { color: var(--text-muted); }

.checklist { display: grid; gap: .5rem; margin-top: .25rem; }
.checklist li {
  display: grid; grid-template-columns: 1.25rem 1fr; gap: .5rem;
  color: var(--text-muted); font-size: .97rem;
}
.checklist li::before {
  content: "✓"; color: var(--accent); font-weight: 700; line-height: 1.5;
}

/* ---------- 10. Cennik ---------- */
.price-list { display: grid; gap: 1rem; }
.price {
  display: grid; gap: .55rem;
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.price--popular { border-color: var(--accent-ring); background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%); }
.price__badge {
  justify-self: start;
  padding: .35rem .85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink);
  font: 700 .7rem/1 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.price__title { font-size: 1.1rem; }
.price__value { color: var(--text-muted); font-size: 1.05rem; }
.price__num {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2rem); color: var(--accent);
  line-height: 1; vertical-align: -.05em;
}
.price__text { color: var(--text-dim); font-size: .97rem; }

.cta-box {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta-box__text { color: var(--text-muted); max-width: 44ch; margin: 0 auto 1.5rem; }
.cta-box__actions { display: grid; gap: .75rem; justify-content: center; }

/* ---------- 11. Kontakt ---------- */
.contact-grid { display: grid; gap: 1rem; }
.contact-card {
  display: grid; gap: .4rem; justify-items: center; text-align: center;
  padding: clamp(1.5rem, 4vw, 2rem) 1.25rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s;
}
.contact-card:hover { border-color: var(--accent-ring); transform: translateY(-2px); text-decoration: none; }
.contact-card__ico {
  width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: .5rem;
  background: var(--accent-soft); border-radius: 50%; color: var(--accent);
}
.contact-card__ico--fb { background: rgba(59, 89, 152, .18); color: #4c7bf0; }
.contact-card__ico svg { width: 28px; height: 28px; fill: currentColor; }
.contact-card__label {
  font: 600 .8rem/1 var(--font-body); letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim);
}
.contact-card__value { font-weight: 600; font-size: 1.05rem; }
.contact-card__value--sm { font-size: .98rem; word-break: break-word; }
.contact-card__hint { color: var(--text-dim); font-size: .88rem; }

.contact-note {
  margin-top: 1.5rem; color: var(--text-muted); text-align: center;
}
.info-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.info-box {
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.info-box__title {
  font: 600 .82rem/1 var(--font-body); letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.info-box__text { color: var(--text-muted); }
.hours { display: grid; gap: .5rem; }
.hours > div {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.hours > div:last-child { border-bottom: 0; padding-bottom: 0; }
.hours dt { color: var(--text-muted); }
.hours dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 12. Mapa ---------- */
.map { margin: 1.5rem 0 0; }
.map iframe {
  width: 100%; height: clamp(260px, 45vw, 400px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); display: block;
}
.map__caption { margin: .75rem 0 0; font-size: .95rem; }

/* ---------- 13. Stopka ---------- */
.site-footer {
  background: var(--bg-alt); border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  /* zapas na przycisk „zadzwoń" na telefonie */
  padding-bottom: calc(clamp(2.5rem, 6vw, 4rem) + 4.5rem + env(safe-area-inset-bottom));
}
.site-footer__inner { display: grid; gap: 2rem; }
.site-footer__tagline { color: var(--text-muted); margin-top: 1rem; max-width: 42ch; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.site-footer__nav a { color: var(--text-muted); font-weight: 500; }
.site-footer__nav a:hover { color: var(--accent); }
.site-footer__legal { color: var(--text-dim); font-size: .9rem; display: grid; gap: .35rem; }

/* ---------- 14. Pływający przycisk telefonu ----------
   POPRAWKA (wideo 00:06, 00:24, 00:56): pojawia się dopiero po hero,
   chowa się przy przewijaniu w dół, a stopka ma zapas, więc nie zasłania treści. */
.fab {
  position: fixed;
  right: clamp(.9rem, 3vw, 1.5rem);
  bottom: calc(clamp(.9rem, 3vw, 1.5rem) + env(safe-area-inset-bottom));
  z-index: 90;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink); border-radius: 50%;
  box-shadow: var(--shadow-glow);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.fab svg { width: 26px; height: 26px; fill: currentColor; }
.fab.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.fab.is-hidden { opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9); }
.fab:hover { text-decoration: none; }

/* ---------- 15. Breakpointy ---------- */
@media (min-width: 480px) {
  .hero__badges { display: flex; flex-wrap: wrap; }
  .hero__actions { display: flex; flex-wrap: wrap; }
  .hero__actions .btn { flex: 1 1 auto; min-width: 220px; }
  .cta-box__actions { display: flex; flex-wrap: wrap; justify-content: center; }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .price-list { grid-template-columns: repeat(2, 1fr); }
  .price--popular { grid-column: 1 / -1; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .highlights { grid-template-columns: repeat(4, 1fr); }
  .hero__scroll { display: grid; }
}

@media (min-width: 992px) {
  :root { --header-h: 76px; }
  .nav-desktop { display: flex; }
  .burger, .mobile-menu, .menu-backdrop { display: none !important; }
  .fab { display: none; }                          /* na desktopie zbędny */
  .site-footer { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
  .cards { grid-template-columns: repeat(3, 1fr); }   /* 6 kart = równe 3×2 */
  /* zdjęcie szersze niż kolumna z tekstem — pokazujemy kadr w całości,
     bez docinania boków; wyrównane do środka wysokości akapitów */
  .about { grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); }
  /* podpis wyjęty z układu, żeby nie wliczał się do wysokości figury —
     inaczej wyśrodkowanie „figura + podpis" spycha samo zdjęcie
     o pół wysokości podpisu w górę względem środka tekstu */
  .about__figure figcaption {
    position: absolute; left: 0; right: 0; top: calc(100% + .75rem);
    margin-top: 0;
  }
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.4fr) auto;
    align-items: start; row-gap: 2.5rem;
  }
  .site-footer__nav { justify-content: flex-end; }
  .site-footer__legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; }
}

/* offset dla kotwic pod przyklejonym nagłówkiem */
:target { scroll-margin-top: calc(var(--header-h) + 12px); }
section[id], span[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- 16. Dostępność / preferencje ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  :root { --text-muted: #d3ddea; --text-dim: #b9c6d6; --line: #35496a; }
}
@media print {
  .site-header, .mobile-menu, .menu-backdrop, .fab, .hero__bg, .map { display: none !important; }
  body { background: #fff; color: #000; }
  .section--alt, .card, .price, .contact-card, .info-box { background: #fff; border-color: #ccc; }
}


/* ==========================================================================
   17. Galeria realizacji
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.45rem, 1.6vw, .9rem);
}
.gallery__item { margin: 0; }
.gallery__item--big { grid-column: span 2; grid-row: span 2; }

.gallery__link {
  position: relative; display: block; height: 100%; overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
}
.gallery__link:hover { text-decoration: none; }
.gallery__link img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), filter .3s;
}
.gallery__link:hover img,
.gallery__link:focus-visible img { transform: scale(1.05); filter: brightness(1.05); }

.gallery__overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: flex-end;
  padding: clamp(.6rem, 2vw, 1rem);
  background: linear-gradient(to top, rgba(4, 10, 18, .88) 0%, rgba(4, 10, 18, .35) 42%, transparent 72%);
  opacity: 0; transition: opacity .28s;
}
.gallery__link:hover .gallery__overlay,
.gallery__link:focus-visible .gallery__overlay { opacity: 1; }
.gallery__caption {
  color: #fff; font-size: clamp(.78rem, .72rem + .3vw, .95rem); line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
/* na urządzeniach dotykowych podpis widoczny od razu — nie ma najechania */
@media (hover: none) {
  .gallery__overlay { opacity: 1; background: linear-gradient(to top, rgba(4, 10, 18, .85) 0%, transparent 55%); }
}
.gallery__more { margin-top: 1.25rem; color: var(--text-muted); font-size: .95rem; }

@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 18. Lightbox ---------- */
.lightbox {
  padding: 0; border: 0; max-width: none; max-height: none;
  width: 100%; height: 100%;
  background: transparent; color: var(--text);
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(3, 7, 13, .93); }
@supports (backdrop-filter: blur(4px)) { .lightbox::backdrop { backdrop-filter: blur(6px); } }
.lightbox__inner {
  height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 1rem;
  padding: clamp(1rem, 4vw, 2rem);
  padding-bottom: calc(clamp(1rem, 4vw, 2rem) + env(safe-area-inset-bottom));
}
.lightbox__stage { display: grid; place-items: center; min-height: 0; }
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
  background: var(--surface);
}
.lightbox__bar { display: grid; gap: .4rem; justify-items: center; text-align: center; }
.lightbox__caption { color: var(--text); font-size: 1rem; max-width: 70ch; }
.lightbox__count { color: var(--text-dim); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lightbox__btn {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: rgba(15, 26, 43, .92); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
}
.lightbox__btn:hover { background: var(--surface-2); border-color: var(--accent-ring); }
.lightbox__btn svg { width: 22px; height: 22px; fill: currentColor; }
.lightbox__close { position: absolute; top: clamp(.75rem, 3vw, 1.5rem); right: clamp(.75rem, 3vw, 1.5rem); z-index: 3; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav[hidden] { display: none; }

/* ==========================================================================
   19. Linki do profili społecznościowych (sekcja „Kontakt")
   ========================================================================== */
.socials {
  display: grid; gap: 1rem;
  margin-top: 1.5rem;
}
.social-pill {
  display: flex; align-items: center; gap: 1rem;
  height: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s, background-color .2s, box-shadow .2s;
}
.social-pill:hover, .social-pill:focus-visible {
  text-decoration: none; transform: translateY(-2px);
}
.social-pill__ico {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px; color: #fff;
}
.social-pill__ico svg { width: 26px; height: 26px; fill: currentColor; }
.social-pill__text { display: grid; gap: .15rem; min-width: 0; }
.social-pill__text strong { font-family: var(--font-head); font-size: 1.05rem; }
.social-pill__text span {
  color: var(--text-dim); font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.social-pill__arrow {
  width: 22px; height: 22px; margin-left: auto; flex: none;
  fill: var(--text-dim); transition: transform .2s, fill .2s;
}
.social-pill:hover .social-pill__arrow { transform: translateX(3px); fill: var(--text); }

/* Instagram — gradient marki */
.social-pill--ig .social-pill__ico {
  background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 45%, #6228d7 100%);
}
.social-pill--ig:hover, .social-pill--ig:focus-visible {
  border-color: rgba(238, 42, 123, .55);
  background: linear-gradient(120deg, rgba(238, 42, 123, .13), rgba(98, 40, 215, .10) 60%, var(--surface));
  box-shadow: 0 16px 34px -22px rgba(238, 42, 123, .8);
}
/* Facebook */
.social-pill--fb .social-pill__ico { background: linear-gradient(135deg, #4c7bf0, #1877f2); }
.social-pill--fb:hover, .social-pill--fb:focus-visible {
  border-color: rgba(24, 119, 242, .55);
  background: linear-gradient(120deg, rgba(24, 119, 242, .14), var(--surface) 70%);
  box-shadow: 0 16px 34px -22px rgba(24, 119, 242, .8);
}

@media (min-width: 640px) { .socials { grid-template-columns: repeat(2, 1fr); } }

/* sprite SVG poza układem strony */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
