/* KLONEX – wersja ciemna
   Czerń jako baza, biel do tekstu, czerwień z logo jako jedyny akcent
   (czerwony kwadrat = znak rozpoznawczy, przyciski, wielki napis w stopce). */

:root {
  --black: #000000;
  --surface: #101012;
  --white: #FFFFFF;
  --dim: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.16);
  --red: #E30613;
  --red-press: #C40010;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --content: min(100vw - 2 * var(--gutter), var(--max) - 2 * var(--gutter));
  --edge: max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter));

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

html {
  background: var(--black);
  scroll-padding-top: 84px;
}
/* Gdy działa Lenis (płynne przewijanie), natywne smooth scroll musi być wyłączone */
html:not(.lenis) { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 768px) {
  body { font-size: 1.125rem; }
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
}
.skip-link:focus { left: 12px; }

/* ---------- Przyciski (pigułki jak w ICON / Mortenson) ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 8px 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pill .ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.3s var(--ease);
}
.pill:hover .ico { transform: rotate(45deg); }
.pill-red { background: var(--red); color: var(--white); }
.pill-red:hover { background: var(--red-press); }
.pill-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.pill-ghost:hover { background: var(--white); color: var(--black); }
.pill-ghost:hover .ico { background: rgba(0, 0, 0, 0.1); transform: none; }

/* ---------- Nagłówek ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
/* Bez backdrop-filter: rozmycie pod przyklejonym nagłówkiem przerysowuje się
   przy każdej klatce przewijania i to ono najbardziej szarpało. */
.site-header.is-solid {
  background: rgba(0, 0, 0, 0.92);
  border-bottom-color: var(--line);
}
.site-header.menu-open { background: var(--black); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 13px;
  height: 13px;
  background: var(--red);
}

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.82;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 1; }

.header-call { min-height: 44px; padding: 0 20px; }

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 899px) {
  .header-inner { gap: 10px; }
  .header-call { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    margin: 0;
    padding: 110px var(--gutter) 40px;
    background: var(--black);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a {
    display: block;
    padding: 6px 0;
    font-size: clamp(2.5rem, 11vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    opacity: 1;
  }
}
@media (max-width: 1099px) {
  .hide-sm { display: none; }
}
@media (max-width: 419px) {
  .brand { font-size: 1.25rem; gap: 8px; }
  .brand::before { width: 11px; height: 11px; }
  .header-call { padding: 0 16px; }
  .menu-toggle { min-width: 5.75rem; justify-content: center; padding: 0 12px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0.1) 70%);
}

.hero-content {
  width: 100%;
  padding-top: 130px;
  padding-bottom: clamp(28px, 4vw, 48px);
}

.hero h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.9375rem, 1.25vw, 1.125rem);
  font-weight: 600;
  line-height: 1.4;
}
.hero h1::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--red);
}

.display {
  margin-top: clamp(12px, 2vw, 24px);
  font-size: clamp(4rem, 15.5vw, 15.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.84;
}
.display .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.07em;
  margin-bottom: -0.07em;
}
.display .line > span { display: block; }

.hero-bottom {
  display: grid;
  gap: 24px;
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}
@media (min-width: 900px) {
  .hero-bottom {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 3vw, 56px);
  margin: 0;
}
.hero-phones dt {
  color: var(--dim);
  font-size: 0.875rem;
}
.hero-phones dd { margin: 0; }
.hero-phones a {
  font-size: clamp(1.375rem, 1.9vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.hero-phones a:hover { color: var(--red); }

@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: hero-zoom 2s var(--ease) both; }
  .display .line > span { animation: line-up 1.1s var(--ease) 0.15s both; }
  .display .line:nth-child(2) > span { animation-delay: 0.27s; }
  .hero h1,
  .hero-bottom { animation: fade-in 0.9s ease 0.6s both; }

  @keyframes hero-zoom { from { transform: scale(1.1); } to { transform: none; } }
  @keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Sekcje ---------- */

.section {
  padding-block: clamp(96px, 12vw, 176px);
  border-top: 1px solid var(--line);
}

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}
.label::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--red);
}

.statement {
  max-width: 21em;
  font-size: clamp(2.125rem, 5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

/* Tekst rozjaśniający się przy przewijaniu (słowa dzieli script.js) */
.reveal.is-ready .w {
  opacity: 0.2;
  transition: opacity 0.4s ease;
}
.reveal.is-ready .w.on { opacity: 1; }

/* ---------- O firmie ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: clamp(64px, 8vw, 112px) 0 0;
  border-top: 1px solid var(--line);
}
.stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--line);
}
.stats dt {
  max-width: 22ch;
  color: var(--dim);
  font-size: 0.9375rem;
}
.stats dd {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.about-grid {
  display: grid;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(64px, 8vw, 112px);
}
@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }
}
.about-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.about-photo figcaption,
.cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  color: var(--dim);
  font-size: 0.9375rem;
}
.about-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.about-text p { max-width: 52ch; color: var(--dim); }
.about-text p:first-child { color: var(--white); font-size: 1.25rem; line-height: 1.45; }

.facts {
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--dim); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- Usługi ---------- */

.svc-wrap {
  display: grid;
  gap: 48px;
  margin-top: clamp(48px, 6vw, 96px);
}
@media (min-width: 1024px) {
  .svc-wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
}

.svc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.svc {
  padding: clamp(22px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  outline-offset: 6px;
}
.svc h3 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(1.75rem, 3.3vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  transition: color 0.35s ease;
}
.svc p {
  max-width: 48ch;
  margin-top: 10px;
  color: var(--dim);
}
.svc-thumb {
  width: 100%;
  margin-top: 18px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.svc-preview { display: none; }

@media (min-width: 1024px) {
  .svc { cursor: default; }
  .svc h3 { color: var(--faint); }
  .svc h3::before {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    background: var(--red);
    transform: scale(0);
    transition: transform 0.35s var(--ease);
  }
  .svc p { color: var(--faint); transition: color 0.35s ease; }
  .svc.is-active h3 { color: var(--white); }
  .svc.is-active h3::before { transform: none; }
  .svc.is-active p { color: var(--dim); }
  .svc-thumb { display: none; }

  .svc-preview {
    display: block;
    position: sticky;
    top: 112px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface);
  }
  .svc-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.5s ease, transform 1.2s var(--ease);
  }
  .svc-preview img.is-active {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Realizacje ---------- */

.projects-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.projects-head .statement { max-width: 14em; }

.car-nav {
  display: flex;
  gap: 10px;
}
.round {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.round:hover { background: var(--white); color: var(--black); }
.round:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--white); }

.track {
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  margin: clamp(40px, 5vw, 72px) 0 0;
  padding: 0 var(--edge) 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  list-style: none;
}
.track::-webkit-scrollbar { display: none; }

.card {
  flex: none;
  scroll-snap-align: start;
}
.card .tile {
  display: block;
  text-decoration: none;
  cursor: zoom-in;
}
.card .ph {
  display: block;
  height: clamp(320px, 66vh, 660px);
  max-width: 84vw;
  aspect-ratio: var(--ar, 4 / 3);
  overflow: hidden;
  background: var(--surface);
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.card .tile:hover img { transform: scale(1.04); }
.cap b { color: var(--white); font-weight: 600; }
.card .cap { max-width: 84vw; }

@media (max-width: 599px) {
  .card .ph { height: auto; width: 84vw; max-width: none; }
  .card[style*="3 / 4"] .ph { width: 70vw; }
}

/* ---------- Kontakt ---------- */

.contact-grid {
  display: grid;
  gap: 72px;
  margin-top: clamp(48px, 6vw, 96px);
}
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(64px, 7vw, 120px);
    align-items: start;
  }
}
.contact-side {
  display: grid;
  gap: 48px;
}

/* ---------- Formularz ---------- */

.form {
  display: grid;
  gap: 32px;
}
.hp { display: none; }

.field-row {
  display: grid;
  gap: 32px;
}
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field label,
.field legend {
  padding: 0;
  color: var(--dim);
  font-size: 0.9375rem;
}
.opt { color: var(--faint); }

.field input,
.field textarea {
  width: 100%;
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 132px;
  line-height: 1.5;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--white);
  box-shadow: 0 1px 0 var(--white);
}
.field.is-invalid input,
.field.is-invalid textarea {
  border-bottom-color: #FF5A63;
  box-shadow: 0 1px 0 #FF5A63;
}

.topics legend { margin-bottom: 14px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip span:hover { border-color: var(--white); }
.chip input:checked + span {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.consent {
  max-width: 62ch;
  color: var(--dim);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
button.pill {
  font-family: inherit;
  cursor: pointer;
}
button.pill:disabled { opacity: 0.6; cursor: progress; }
.form-status {
  max-width: 44ch;
  font-weight: 600;
}
.form-status[data-state="ok"] { color: var(--white); }
.form-status[data-state="error"] { color: #FF5A63; }

.people {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.people .name {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-weight: 500;
}
.people a {
  font-size: clamp(2.5rem, 4.6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.people a:hover { color: var(--red); }

.details {
  margin: 0;
  border-top: 1px solid var(--line);
}
.details div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.details dt {
  color: var(--dim);
  font-size: 0.9375rem;
}
.details dd {
  margin: 4px 0 0;
  font-weight: 600;
}
.details address { font-style: normal; }
.details a {
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.map-link {
  display: inline-block;
  margin-top: 10px;
}

/* ---------- Stopka z wielkim znakiem ---------- */

.site-footer {
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  color: var(--dim);
  font-size: 0.9375rem;
}
.footer-sign {
  display: block;
  margin-top: clamp(40px, 6vw, 88px);
  color: var(--red);
  font-size: calc(var(--content) * 0.184);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  line-height: 0.74;
  white-space: nowrap;
  user-select: none;
  padding-bottom: 0.06em;
}

/* ---------- Podgląd zdjęć ---------- */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--black);
  color: var(--white);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }

.lb-top,
.lb-nav {
  display: flex;
  justify-content: space-between;
  padding: 14px var(--gutter);
}
.lb-top { justify-content: flex-end; }
.lb-nav { padding-bottom: 22px; }

.lb-figure {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 0;
  padding: 0 var(--gutter);
}
.lb-figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 200px);
  object-fit: contain;
}
.lb-caption { width: min(100%, 900px); }

.lb-btn {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.lb-btn:hover { background: var(--white); color: var(--black); }

@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
