:root {
  --navy: #253449;
  --navy-light: #3d4c62;
  --copper: #d4977e;
  --copper-dark: #b5705a;
  --cream: #f6eeeb;
  --white: #ffffff;
  --wrap: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
/* bez pojedynczych słów w ostatniej linii akapitu; nagłówki łamane równo */
p, li, label { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- HEADER ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding: 44px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); }
.logo img { width: 240px; height: auto; }
.nav { display: flex; align-items: center; gap: 56px; margin-left: auto; margin-right: 32px; }
.nav a { color: var(--white); text-decoration: none; font-size: 19px; font-weight: 400; }
.nav a:hover { color: var(--copper); }
.btn-outline {
  color: var(--white); text-decoration: none; font-size: 19px;
  border: 2px solid var(--white); border-radius: 6px; padding: 13px 22px;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--white); color: var(--navy); }

/* ---------- DARK AREA (hero + o nas) ---------- */
.dark {
  /* clip zamiast hidden: hidden da się przewinąć przez kotwicę (#o-nas) i hero "ucieka" pod nagłówek */
  position: relative; overflow: hidden; overflow: clip;
  color: var(--white);
  background: var(--navy) url("../img/tlo.png") no-repeat center top;
  background-size: max(100%, 1443px) auto;
}

.hero { position: relative; padding: 220px 0 120px; }
.hero .wrap { display: block; }
.hero-text { padding-left: 50px; padding-top: 60px; min-width: 0; }
.hero .wrap > *, .site-footer .wrap > * { min-width: 0; }
.hero h1 {
  margin: 0; font-size: 54px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em;
}
.hero-line { width: 680px; max-width: 100%; height: 3px; background: var(--copper); margin: 26px 0 12px; }
.hero-lead { margin: 0; font-size: 22px; font-weight: 400; line-height: 1.55; width: 880px; max-width: calc(100vw - 48px); position: relative; z-index: 1; }


/* pola formularza z pływającymi etykietami */
.field { position: relative; margin-bottom: 18px; }
.field input, .field textarea {
  width: 100%; border: 2px solid transparent; border-radius: 6px; background: var(--cream);
  font: inherit; font-size: 17px; color: var(--navy);
  padding: 28px 18px 10px; display: block;
  transition: border-color .2s;
}
.field textarea { height: 180px; resize: vertical; padding-top: 32px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--copper); }
.field label {
  position: absolute; left: 20px; top: 20px; pointer-events: none;
  font-size: 17px; color: var(--navy); opacity: .75;
  transform-origin: left top; transition: transform .2s ease, opacity .2s ease, color .2s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-11px) scale(.72); opacity: 1; font-weight: 600;
}
.field input:focus + label, .field textarea:focus + label { color: var(--copper-dark); }
.contact-form .btn-copper { margin-top: 8px; padding: 16px; font-size: 18px; }
.btn-copper {
  width: 100%; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--copper); color: var(--white);
  font: inherit; font-size: 17px; font-weight: 700; padding: 9px 16px;
  transition: background .2s;
}
.btn-copper:hover { background: var(--copper-dark); }

.about { position: relative; padding: 60px 0 80px; }
.about .wrap { position: relative; z-index: 1; }
/* obracające się koło (img/kolo.png) */
.wheel {
  --size: clamp(420px, 60vw, 820px);
  position: absolute; z-index: 0; pointer-events: none;
  width: var(--size); height: var(--size);
  left: calc(16% - var(--size) / 2);
  top: calc(335px - var(--size) / 2);
  animation: wheel-spin 60s linear infinite;
}
@keyframes wheel-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wheel { animation: none; } }
.about-inner { margin-left: 50%; max-width: 620px; padding-left: 0; }
.about h2 { margin: 0 0 48px; font-size: 48px; font-weight: 700; line-height: 1; }
.about h3 { margin: 0 0 30px; font-size: 46px; font-weight: 700; line-height: 1.28; color: var(--copper); }
.about p { margin: 0; font-size: 22px; line-height: 1.64; font-weight: 400; max-width: 600px; }

/* ---------- USŁUGI ---------- */
.section-title { margin: 0 0 18px; font-size: 48px; font-weight: 700; color: var(--copper); line-height: 1.2; }
.services { padding: 50px 0 58px; }
.services .wrap { max-width: 1360px; }
.services .section-title { margin-bottom: 30px; padding-left: 14px; color: var(--navy); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 27px; }
.service {
  background: var(--navy); color: var(--white); text-align: center;
  min-height: 260px; padding: 40px 12px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.service h3 { margin: 0 0 28px; font-size: 23px; font-weight: 600; line-height: 1.25; }
.service p { margin: 0; font-size: 22px; font-weight: 300; line-height: 1.32; }

/* ---------- LICZBY I FAKTY ---------- */
.facts { position: relative; padding: 0 0 90px; }
.facts .section-title { position: relative; max-width: 1360px; margin: 0 auto 30px; padding: 0 38px; }
.facts-band { position: relative; padding-top: 50px; }
.facts-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 430px; background: var(--cream);
}
.facts-grid {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 57px;
  max-width: 1360px;
}
.fact {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: var(--copper-dark); color: var(--white); text-align: center;
  padding: 110px 30px 40px;
}
/* animowane fasety - 3 klatki (img/animacja-1..3.png): tło elementu, ::before, ::after */
.fact {
  --fact-bg: #b16d5a;
  /* przygaszenie klatek: im wyższa wartość alfa, tym delikatniejsza animacja */
  --fact-dim: linear-gradient(rgba(177, 109, 90, .7), rgba(177, 109, 90, .7));
  background-color: var(--fact-bg);
  background-image: var(--fact-dim), url("../img/animacja-1.png");
  background-size: 100% 100%;
}
.fact::before, .fact::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-color: var(--fact-bg); background-size: 100% 100%;
  opacity: 0; transition: opacity .5s ease;
}
.fact::before {
  background-image: var(--fact-dim), url("../img/animacja-2.png");
}
.fact::after {
  background-image: var(--fact-dim), url("../img/animacja-3.png");
}
/* klatkę wybiera losowo js/main.js przez atrybut data-frame */
.fact[data-frame="2"]::before, .fact[data-frame="3"]::after { opacity: 1; }
.fact > * { position: relative; z-index: 1; }
.fact h3 { margin: 0 0 28px; font-size: 23px; font-weight: 600; line-height: 1.25; }
.fact p { margin: 0; font-size: 23px; font-weight: 300; line-height: 1.27; }

/* ---------- KONTAKT ---------- */
.contact { padding: 40px 0 100px; background: var(--white); }
.contact .wrap { max-width: 1360px; display: grid; grid-template-columns: 1fr 560px; gap: 72px; align-items: stretch; }
.contact .wrap > * { min-width: 0; }
.contact .section-title { padding-left: 14px; }
.contact-info { padding-left: 14px; display: flex; flex-direction: column; }
.contact-info .section-title { padding-left: 0; }
.contact-lead { margin: 0 0 40px; font-size: 22px; text-wrap: balance; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.linkedin { width: 56px; height: 56px; display: block; }
.linkedin:hover { opacity: .85; }
.contact-cols { display: flex; flex-wrap: wrap; gap: 28px 56px; margin-bottom: 40px; }
.contact-cols p { white-space: nowrap; }
.contact-cols h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--copper); }
.contact-cols p { margin: 0; font-size: 18px; line-height: 1.6; }
.contact-cols a { text-decoration: none; }
.contact-reg { flex-basis: 100%; }
.contact-reg p { white-space: normal; display: flex; flex-wrap: wrap; gap: 4px 0; }
.contact-reg span { white-space: nowrap; }
.contact-reg span + span::before { content: "|"; margin: 0 14px; color: var(--copper); }
.contact-cols a:hover { color: var(--copper); }
/* mapa Google przefiltrowana do kolorystyki strony; po najechaniu wraca do oryginału */
.map { position: relative; flex: 1; min-height: 300px; border-radius: 6px; overflow: hidden; background: var(--navy); isolation: isolate; }
.map iframe {
  width: 100%; height: 100%; border: 0; display: block;
  filter: grayscale(1) contrast(1.1) brightness(.95);
  transition: filter .4s ease;
}
.map::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--navy); mix-blend-mode: color; opacity: .9;
  transition: opacity .4s ease;
}
.map::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 3px var(--copper); border-radius: 6px; opacity: 0;
  transition: opacity .4s ease;
}
.map:hover iframe { filter: none; }
.map:hover::after { opacity: 0; }
.map:hover::before { opacity: 1; }

.contact-form {
  background: var(--navy); color: var(--white); border-radius: 0; padding: 48px 44px;
  margin-top: 76px;
}
.contact-form h3 { margin: 0 0 28px; font-size: 26px; font-weight: 600; }
.contact-form .cf-turnstile { margin-bottom: 0; }
.form-error { margin: 0 0 16px; color: #f2b3a3; font-size: 15px; }
.form-note { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .65); }
.contact-form .btn-copper:disabled { opacity: .6; cursor: wait; }
.contact-form.is-sent { display: flex; align-items: center; justify-content: center; text-align: center; }
.form-success:focus { outline: none; }
.form-success h3 { margin: 0 0 16px; }
.form-success p { margin: 0; font-size: 18px; line-height: 1.5; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .75); padding: 36px 0; font-size: 14px; }
.site-footer .wrap { max-width: 1360px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 40px; }
.footer-logo { width: 170px; height: auto; }
.site-footer .contact-actions { gap: 14px; }
.site-footer .linkedin, .site-footer .linkedin svg { width: 44px; height: 44px; }
.site-footer p { margin: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .nav { margin-right: 12px; gap: 36px; }
  .hero h1 { font-size: 46px; }
  .about-inner { margin-left: 42%; }
  .contact .wrap { grid-template-columns: 1fr 460px; gap: 48px; }
}
@media (max-width: 960px) {
  .site-header { padding: 24px 0; }
  .nav { display: none; }
  .logo img { width: 180px; }
  .hero { padding: 150px 0 70px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero-text { padding: 0; }
  .hero h1 { font-size: 38px; line-height: 1.3; }
  .hero-lead { width: auto; max-width: none; font-size: 18px; }
  .about-inner { margin-left: 0; }
  .wheel { opacity: .35; left: calc(100% - var(--size) / 2); }
  .about h2, .section-title { font-size: 38px; }
  .about h3 { font-size: 34px; }
  .about p { font-size: 18px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .facts-grid { grid-template-columns: 1fr; gap: 24px; max-width: 480px; }
  .facts-band::before { height: 50%; }
  .fact { aspect-ratio: auto; padding: 70px 30px; }
  .contact .wrap { grid-template-columns: 1fr; gap: 40px; }
  .contact-form { margin-top: 0; }
  .map { margin-left: -14px; } /* mapa na pełną szerokość, równo z formularzem */
  .contact-lead { font-size: 18px; }
}
@media (max-width: 560px) {
  .btn-outline { padding: 10px 14px; font-size: 14px; }
  .hero h1 { font-size: 31px; }
  .service-grid { grid-template-columns: 1fr; }
  .service { min-height: 200px; }
  .service p, .fact p, .fact h3, .service h3 { font-size: 19px; }
  .contact-cols { gap: 24px; }
  .contact-lead { margin-bottom: 28px; }
  .contact-reg p { flex-direction: column; gap: 0; }
  .contact-reg span + span::before { content: none; }
  .contact-form { padding: 28px 20px; }
    .facts .section-title { padding: 0 24px; }
}
