/* IQ Technik – arkusz stylów (PoC, projekt 1) */
:root {
  --navy: #1c2e4a;
  --navy-dark: #132136;
  --graphite: #2f3640;
  --text: #2a2f36;
  --muted: #5a6370;
  --line: #dde2e8;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --accent: #e8a72c;
  --accent-dark: #9a6700;
  --accent-hover: #d4951c;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(19, 33, 54, .08);
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.skip-link {
  position: absolute; left: -9999px; top: .5rem;
  background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 1000;
}
.skip-link:focus { left: .5rem; color: #fff; }

/* ---------- Pasek górny ---------- */
.topbar { background: var(--navy-dark); color: #d6dde8; font-size: .875rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: flex-end; padding-top: .4rem; padding-bottom: .4rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--accent); }
@media (max-width: 699px) { .topbar { display: none; } }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(19, 33, 54, .05);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.brand-name span { color: var(--accent-dark); }
.brand-sub { font-size: .75rem; color: var(--muted); letter-spacing: .02em; }

.header-phone {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--accent); color: var(--navy-dark);
  font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: .55rem .9rem; border-radius: var(--radius);
}
.header-phone:hover { background: var(--accent-hover); color: var(--navy-dark); }
.header-phone svg { width: 18px; height: 18px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; cursor: pointer; padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: var(--navy); position: relative; transition: transform .2s, background .2s;
}
.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; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.main-nav a {
  display: block; padding: .7rem .25rem; text-decoration: none; color: var(--navy); font-weight: 600;
  border-bottom: 1px solid var(--bg-soft);
}
.main-nav a[aria-current="page"], .main-nav a.is-active { color: var(--accent-dark); }
.main-nav .sub { padding: 0 0 0 1rem; }
.main-nav .sub a { font-weight: 500; font-size: .95rem; color: var(--graphite); }

@media (max-width: 479px) {
  .brand-sub { display: none; }
  .header-phone .num { display: none; }
  .header-phone { padding: .6rem .7rem; }
}

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; border: 0; box-shadow: none; background: none; }
  .main-nav > ul { display: flex; gap: .25rem; padding: 0; }
  .main-nav > ul > li { position: relative; }
  .main-nav a { border: 0; padding: .5rem .75rem; border-radius: var(--radius); }
  .main-nav > ul > li > a:hover { background: var(--bg-soft); }
  .main-nav .sub {
    display: none; position: absolute; top: 100%; left: 0; min-width: 300px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: .4rem;
  }
  .main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { display: block; }
  .main-nav .sub a { padding: .55rem .75rem; }
  .main-nav .sub a:hover { background: var(--bg-soft); }
  .main-nav { order: 0; }
  .header-phone { order: 1; }
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: var(--navy-dark); }
.btn-accent:hover { background: var(--accent-hover); color: var(--navy-dark); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sekcje ---------- */
.section { padding: 3.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: .5rem;
}
@media (min-width: 900px) { .section { padding: 5rem 0; } }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 2.5rem 0 3rem; }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero-img { position: relative; }
.hero-img img { border-radius: 10px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-badge {
  position: absolute; left: -0.5rem; bottom: -1rem;
  background: var(--navy); color: #fff; padding: .9rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.3;
}
.hero-badge strong { display: block; font-size: 1.5rem; color: var(--accent); }
.hero .btn-row { margin-top: 1.5rem; }
@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .hero-badge { left: -1.5rem; bottom: -1.5rem; }
}

/* ---------- Atuty ---------- */
.features { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.feature { display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.feature svg { flex: none; width: 34px; height: 34px; color: var(--accent-dark); }
.feature h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Karty oferty ---------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: .95rem; }
.card-more { margin-top: auto; font-weight: 700; color: var(--navy); }
.card:hover .card-more { color: var(--accent-dark); }
.card-cta { background: var(--navy); color: #fff; justify-content: center; }
.card-cta .card-body { justify-content: center; }
.card-cta h3 { color: #fff; }
.card-cta p { color: #c9d3e1; }
.card-cta:hover { color: #fff; }

/* ---------- O firmie ---------- */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.split img { border-radius: 10px; box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .55rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23132136' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* ---------- Pasek CTA ---------- */
.cta-band { background: var(--navy); color: #dbe3ee; padding: 3rem 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { margin: 0; }

/* ---------- Nagłówek podstrony ---------- */
.page-head { background: var(--navy); color: #d3dbe7; padding: 2.5rem 0 2.25rem; }
.page-head h1 { color: #fff; margin-bottom: .4rem; }
.page-head p { max-width: 46em; margin: 0; font-size: 1.1rem; }
.breadcrumbs { font-size: .875rem; margin-bottom: .75rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .3rem; color: #8797ad; }
.breadcrumbs a { color: #fff; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Usługa ---------- */
.service { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .service { grid-template-columns: 1.6fr 1fr; gap: 3.5rem; align-items: start; } }
.service-aside { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; }
@media (min-width: 960px) { .service-aside { position: sticky; top: 96px; } }
.service-aside h2 { font-size: 1.3rem; }
.service-aside .btn { width: 100%; margin-bottom: .6rem; }
.service-aside .small { font-size: .9rem; color: var(--muted); margin: .5rem 0 0; }
.scope { display: grid; gap: .5rem 1.5rem; }
@media (min-width: 640px) { .scope { grid-template-columns: 1fr 1fr; } }
.other-services { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--line); padding-top: 1rem; }
.other-services li { margin-bottom: .35rem; }
.other-services h3 { font-size: 1rem; }

/* ---------- Galeria ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gallery.gallery-lg { grid-template-columns: repeat(4, 1fr); } }
.gallery li[hidden] { display: none; }
.gallery a { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, .gallery .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem .7rem .55rem;
  background: linear-gradient(transparent, rgba(19, 33, 54, .85)); color: #fff; font-size: .85rem; line-height: 1.3;
}
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters button {
  font: inherit; font-size: .95rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
}
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 26, .94);
  display: flex; align-items: center; justify-content: center; padding: 3.5rem .5rem;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: min(1000px, 100%); max-height: calc(100vh - 9rem); width: auto; height: auto; border-radius: 4px; }
.lightbox figcaption { color: #e4e9f0; margin-top: .75rem; text-align: center; font-size: .95rem; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 1.2rem; left: 1rem; color: #c3ccd8; font-size: .9rem; }
body.lb-open { overflow: hidden; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.3fr; gap: 3.5rem; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.contact-list li { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-list svg { flex: none; width: 24px; height: 24px; color: var(--accent-dark); margin-top: .15rem; }
.contact-list .label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.contact-list .value { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.contact-list a.value { text-decoration: none; }
.contact-list a.value:hover { text-decoration: underline; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .form-card { padding: 2rem; } }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); padding: .75rem .85rem; border: 1px solid #b9c2ce; border-radius: var(--radius); background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid rgba(232, 167, 44, .55); outline-offset: 0; }
.field textarea { min-height: 150px; resize: vertical; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: .5rem 0 1.25rem; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: .15rem; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--radius); font-weight: 600; }
.form-status[hidden] { display: none; }
.form-status.ok { background: #e6f4ea; color: #1d5e2f; }
.form-status.err { background: #fbeaea; color: #8a1f1f; }

/* ---------- Treść tekstowa ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--navy-dark); color: #c3cddb; font-size: .95rem; padding: 3rem 0 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-logo { width: 220px; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.1rem 0; font-size: .85rem; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Pływający przycisk tel. (mobile) ---------- */
.call-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--navy-dark);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.call-fab svg { width: 26px; height: 26px; }
@media (min-width: 980px) { .call-fab { display: none; } }

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

.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; }
@media (min-width: 700px) { .gallery.gallery-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .gallery .cap { display: none; } }
