:root {
  --red: #ff0000;          /* kolor z logo */
  --red-btn: #e00000;      /* przyciski i pasy – biały tekst czytelny */
  --red-ink: #d10000;      /* czerwień do tekstu na jasnym tle */
  --red-light: #ff5a5a;    /* czerwień na ciemnym tle */
  --ink: #16181b;
  --ink-2: #4a4f57;
  --ink-3: #7a8089;
  --line: #e3e5e8;
  --paper: #ffffff;
  --paper-2: #f5f6f7;
  --surface: #ffffff;      /* karty, nagłówek, panele */
  --dark: #15171a;
  --dark-2: #23262b;
  --footer-line: transparent;
  --radius: 6px;
  --wrap: 1200px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

/* Tryb ciemny: wg systemu (bez JS) lub wybrany przełącznikiem */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red-ink: #ff5a5a;
    --ink: #eceef1;
    --ink-2: #b3b9c1;
    --ink-3: #868d96;
    --line: #2a2f36;
    --paper: #0f1114;
    --paper-2: #15181c;
    --surface: #1a1e23;
    --dark: #14171b;
    --dark-2: #262a30;
    --footer-line: #22262c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --red-ink: #ff5a5a;
  --ink: #eceef1;
  --ink-2: #b3b9c1;
  --ink-3: #868d96;
  --line: #2a2f36;
  --paper: #0f1114;
  --paper-2: #15181c;
  --surface: #1a1e23;
  --dark: #14171b;
  --dark-2: #262a30;
  --footer-line: #22262c;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.ic {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

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

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  cursor: pointer;
}
.btn .ic { width: 18px; height: 18px; transition: transform .15s; }
.btn:hover .ic { transform: translateX(3px); }
.btn-primary { background: var(--red-btn); color: #fff; }
.btn-primary:hover { background: #b80000; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-white { background: #fff; color: var(--red-ink); }
.btn-white:hover { background: var(--dark); color: #fff; }

/* ---------- Pasek górny ---------- */
.topbar { background: var(--red-btn); color: #fff; font-size: 14px; font-weight: 500; }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 42px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.topbar .ic { width: 16px; height: 16px; }
.topbar a:hover { text-decoration: underline; }
.topbar-brand { font-weight: 700; letter-spacing: .04em; }
.topbar-right { margin-left: auto; font-family: var(--mono); font-size: 13px; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 84px; }
.brand { margin-right: auto; }
.brand img { height: 44px; width: auto; }
.nav { order: 1; }
.theme-toggle { order: 2; }
.nav-toggle { order: 3; }

/* Przełącznik jasny / ciemny */
.theme-toggle {
  display: none;
  width: 44px; height: 44px; margin-left: 14px;
  align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 50%;
  cursor: pointer; transition: border-color .15s, color .15s, transform .3s;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { border-color: var(--red); color: var(--red-ink); transform: rotate(-15deg); }
.theme-toggle .ic { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 16px; font-weight: 500;
  text-decoration: none; color: var(--ink-2);
  position: relative; padding: 6px 0;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav .nav-cta {
  color: #fff; background: var(--red-btn);
  padding: 13px 24px; border-radius: var(--radius); font-weight: 600;
}
.nav .nav-cta:hover { background: #b80000; color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 12px 10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Baner ---------- */
.hero, .page-hero {
  position: relative; overflow: hidden;
  color: #fff; background: var(--dark);
  display: flex; align-items: center;
}
.hero { min-height: min(680px, 78vh); padding: 96px 0 140px; }
.page-hero { min-height: 340px; padding: 72px 0; }

.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,14,18,.88) 0%, rgba(12,14,18,.72) 40%, rgba(12,14,18,.2) 100%),
    url("../img/baner.jpg") center 35% / cover no-repeat;
  animation: heroZoom 18s ease-out both;
}
.page-hero .hero-bg {
  background:
    linear-gradient(90deg, rgba(12,14,18,.92) 0%, rgba(12,14,18,.75) 55%, rgba(12,14,18,.45) 100%),
    url("../img/baner.jpg") center 30% / cover no-repeat;
  animation: none;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero-content { position: relative; width: 100%; }
.hero-content > * { max-width: 720px; }

.eyebrow {
  font: 500 13px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 32px; height: 3px; background: var(--red); }
.hero h1 { font-size: clamp(36px, 5.4vw, 68px); font-weight: 700; letter-spacing: -0.025em; }
.page-hero h1 { font-size: clamp(36px, 4.6vw, 56px); font-weight: 700; }
.lead { margin-top: 22px; font-size: 19px; color: #d5d8dd; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.crumbs { font: 500 13px/1 var(--mono); color: #b8bcc3; margin-bottom: 18px; letter-spacing: .04em; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 8px; color: var(--red-light); }

/* Pas specjalizacji pod banerem */
.highlights {
  position: relative; z-index: 2;
  list-style: none; margin: -64px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(15,18,25,.14);
  overflow: hidden;
}
.highlights li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 28px 26px;
  border-left: 1px solid var(--line);
  position: relative;
}
.highlights li:first-child { border-left: 0; }
.highlights li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.highlights li:hover::before { transform: scaleX(1); }
.highlights .ic { width: 34px; height: 34px; color: var(--red-ink); stroke-width: 1.4; margin-top: 2px; }
.highlights b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.highlights span { display: block; font-size: 14px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }

/* ---------- Sekcje ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--paper-2); }
.section-head { margin-bottom: 48px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-no {
  font: 500 13px/1 var(--mono); color: var(--red-ink);
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-no::before { content: ""; width: 28px; height: 3px; background: var(--red); }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.section-sub { margin-top: 14px; color: var(--ink-2); max-width: 620px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--red-ink); font-weight: 600; text-decoration: none;
  margin-top: 6px;
}
.text-link:hover .ic { transform: translateX(3px); }
.text-link .ic { transition: transform .15s; }

/* O firmie */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-body { display: grid; gap: 18px; color: var(--ink-2); max-width: 560px; justify-items: start; }
.about-lead { font-size: 23px; line-height: 1.45; color: var(--ink); font-weight: 500; }

.scope { border-top: 3px solid var(--ink); margin-top: 8px; }
.scope-title {
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); padding: 18px 0 6px;
}
.scope-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.scope-list li {
  counter-increment: s;
  display: grid; grid-template-columns: 34px 26px 1fr; gap: 14px; align-items: center;
  padding: 17px 0; border-bottom: 1px solid var(--line);
  font-size: 17px; line-height: 1.4;
  transition: padding-left .2s;
}
.scope-list li:hover { padding-left: 6px; }
.scope-list li::before {
  content: counter(s, decimal-leading-zero);
  font: 500 13px/1 var(--mono); color: var(--red-ink);
}
.scope-list .ic { width: 24px; height: 24px; color: var(--ink-2); stroke-width: 1.5; }

/* ---------- Realizacje ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: transparent; box-shadow: 0 16px 40px rgba(15,18,25,.12); transform: translateY(-3px); }
.card-img {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 3; min-height: 0; padding: 0; overflow: hidden;
  background: var(--paper-2);
  -webkit-touch-callout: none; user-select: none;
}
/* Zdjęcie nie przyjmuje kliknięć – brak opcji "otwórz obraz w nowej karcie" */
.card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none; -webkit-user-drag: none;
}
.photo-credit {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 10px; line-height: 1.3; color: #fff;
  background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 3px;
  pointer-events: none;
}
.card-meta { flex: 1; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.card-meta h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.card-meta p { font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.specs {
  list-style: none; margin: auto 0 0; padding: 12px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.specs li {
  font: 500 12px/1 var(--mono);
  padding: 6px 8px;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 4px;
}
.specs li:first-child { background: var(--red-btn); border-color: var(--red-btn); color: #fff; }

.tag {
  align-self: flex-start;
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--red-ink); margin-bottom: 6px;
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  font: 500 15px/1 var(--sans);
  padding: 12px 18px;
  background: var(--surface); color: var(--ink-2);
  border: 1.5px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.filter span { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter.active span { color: var(--red-light); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 72px; align-items: start; }
.faq { border-top: 3px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line);
  font: 400 22px/1 var(--sans); color: var(--red-ink);
  transition: transform .2s, border-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); border-color: var(--red); }
.faq summary:hover { color: var(--red-ink); }
.faq details p { padding: 0 52px 24px 0; color: var(--ink-2); }
.faq details a { color: var(--red-ink); }

/* ---------- Pas kontaktowy ---------- */
.cta-band {
  background: var(--red-btn); color: #fff;
  padding: 56px 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.cta-band p { margin-top: 8px; color: #ffe1e1; font-size: 18px; }

/* ---------- Kontakt ---------- */
.section-dark { background: var(--dark); color: #fff; }
.section-dark .section-no { color: var(--red-light); }
.section-dark .section-sub { color: #b8bcc3; }
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; }
.contact-list li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid var(--dark-2);
}
.contact-list .ic { width: 24px; height: 24px; color: var(--red-light); margin-top: 2px; }
.contact-list b {
  display: block; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: #8d929a; margin-bottom: 4px;
}
.contact-list a { color: #fff; text-decoration: none; font-size: 18px; border-bottom: 1px solid #555; }
.contact-list a:hover { border-color: var(--red-light); }
.contact-list span { font-size: 18px; }

.reg { margin-top: 32px; font-size: 14px; color: #8d929a; display: grid; gap: 8px; }
.reg-title { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.reg p:last-child { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.reg b { font: 500 14px/1 var(--mono); color: #d6d9dd; margin-left: 4px; }

.map { border: 1px solid #3a3e45; background: var(--dark-2); border-radius: var(--radius); overflow: hidden; }
.map iframe { display: block; width: 100%; height: 440px; border: 0; }
.map-link {
  display: block; padding: 12px 16px;
  font: 500 13px/1 var(--mono); color: #b8bcc3; text-decoration: none;
}
.map-link:hover { color: #fff; }

/* ---------- Stopka ---------- */
.site-footer { background: #0e0f11; color: #8d929a; font-size: 15px; border-top: 1px solid var(--footer-line); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px;
  padding-top: 64px; padding-bottom: 48px;
}
.footer-brand img { margin-bottom: 18px; }
.footer-brand p { max-width: 320px; }
.footer-title {
  font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: #fff; margin-bottom: 18px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #b8bcc3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--dark-2); padding-top: 22px; padding-bottom: 22px; font-size: 13px; }

/* ---------- Animacje wejścia ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.gallery .reveal:nth-child(2) { transition-delay: .08s; }
.gallery .reveal:nth-child(3) { transition-delay: .16s; }

/* ---------- Responsywność ---------- */
@media (max-width: 1080px) {
  .topbar .topbar-addr { display: none; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .highlights li:nth-child(3) { border-left: 0; }
  .highlights li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .contact { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-inner { height: 70px; }
  .brand img { height: 38px; }
  .nav {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a::after { display: none; }
  .nav .nav-cta { margin-top: 14px; text-align: center; border: 0; }
  .gallery, .gallery-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { gap: 16px; height: 38px; font-size: 13px; }
  .topbar-brand, .topbar-right { display: none !important; }
  .hero { min-height: 0; padding: 64px 0 112px; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(12,14,18,.82) 0%, rgba(12,14,18,.78) 100%),
      url("../img/baner.jpg") 65% center / cover no-repeat;
  }
  .page-hero { min-height: 0; padding: 56px 0; }
  .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .highlights { grid-template-columns: 1fr; margin-top: -56px; }
  .highlights li { border-left: 0; border-top: 1px solid var(--line); padding: 20px; }
  .highlights li:first-child { border-top: 0; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 32px; }
  .about-lead { font-size: 20px; }
  .gallery, .gallery-3 { grid-template-columns: 1fr; }
  .filter { padding: 10px 14px; font-size: 14px; }
  .faq summary { font-size: 17px; padding: 18px 0; }
  .faq details p { padding-right: 0; }
  .cta-band { padding: 44px 0; }
  .cta-inner .btn { width: 100%; }
  .map iframe { height: 300px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
