:root {
  --ink: #1b2226;
  --paper: #e9e6dc;
  --paper-2: #f4f2ea;
  --rust: #b5502c;
  --rust-dark: #8a3b1f;
  --moss: #6b7156;
  --slate: #2e4756;
  --slate-dark: #1f323d;
  --sheen: #c9a227;
  --sheen-light: #e4c463;
  --line: rgba(27, 34, 38, 0.14);
  --radius: 4px;
  --shadow: 0 18px 40px -18px rgba(27, 34, 38, 0.35);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: "Big Shoulders Display", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--slate-dark);
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-dark);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--rust);
  display: inline-block;
}
p {
  margin: 0 0 1em 0;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
section {
  position: relative;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 18px;
  padding: 16px 30px;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.btn-primary {
  background: var(--sheen);
  color: var(--ink);
  box-shadow: 0 10px 26px -10px rgba(201, 162, 39, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(201, 162, 39, 0.7);
}
.btn-outline {
  border-color: rgba(244, 242, 234, 0.55);
  color: var(--paper-2);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(244, 242, 234, 0.1);
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 3px solid var(--sheen);
  outline-offset: 3px;
}

/* ---------- Roof-seam divider (signature motif) ---------- */
.seam {
  display: block;
  width: 100%;
  height: 34px;
  line-height: 0;
}
.seam svg {
  width: 100%;
  height: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(233, 230, 220, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo span {
  color: var(--rust);
}
.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-phone {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 15px;
  display: none;
}
@media (min-width: 720px) {
  .header-phone {
    display: inline;
  }
}
.header-cta .btn {
  padding: 11px 20px;
  font-size: 14.5px;
}

/* ---------- Nav menu (desktop) ---------- */
.main-nav {
  display: none;
}
@media (min-width: 960px) {
  .main-nav {
    display: block;
  }
  .main-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .main-nav a {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    font-size: 16.5px;
    text-decoration: none;
    color: var(--ink);
    padding: 10px 4px;
    position: relative;
  }
  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 3px;
    background: var(--sheen);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
  }
  .main-nav a:hover::after,
  .main-nav a:focus-visible::after {
    transform: scaleX(1);
  }
  .main-nav a:focus-visible {
    outline: 3px solid var(--sheen);
    outline-offset: 4px;
  }
}

/* ---------- Nav toggle (hamburger, mobile) ---------- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.nav-toggle:focus-visible {
  outline: 3px solid var(--sheen);
  outline-offset: 3px;
}
.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);
}

/* ---------- Nav menu (mobile dropdown) ---------- */
.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav a {
  display: block;
  padding: 16px 28px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:focus-visible {
  outline: 3px solid var(--sheen);
  outline-offset: -3px;
  background: rgba(201, 162, 39, 0.1);
}
.mobile-nav a:active {
  background: rgba(201, 162, 39, 0.12);
}

/* Kompensacja przewijania pod sticky header */
#start,
#o-nas,
#realizacje,
#dlaczego-my,
#formularz {
  scroll-margin-top: 74px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(
    115deg,
    var(--rust-dark) 0%,
    var(--rust) 22%,
    var(--moss) 48%,
    var(--slate) 72%,
    var(--slate-dark) 100%
  );
  color: var(--paper-2);
  overflow: hidden;
  padding-top: 76px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(100deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 34px),
    radial-gradient(circle at 18% 30%, rgba(0, 0, 0, 0.18), transparent 40%),
    radial-gradient(circle at 82% 70%, rgba(255, 255, 255, 0.12), transparent 45%);
  mix-blend-mode: multiply;
  opacity: 0.9;
}
.hero-inner {
  position: relative;
  padding: 96px 0 120px;
  max-width: 760px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 0.98;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  color: var(--sheen-light);
}
.hero .lede {
  margin-top: 22px;
  font-size: 19px;
  max-width: 520px;
  color: rgba(244, 242, 234, 0.92);
}
.hero .lede strong {
  color: #fff;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero .seam {
  position: absolute;
  bottom: -1px;
  left: 0;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--slate-dark);
  color: var(--paper-2);
  padding: 56px 0 66px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 36px;
  text-align: center;
}
.stat-num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 46px);
  color: var(--sheen-light);
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: 8px;
  font-size: 14.5px;
  color: rgba(244, 242, 234, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- About ---------- */
.about {
  background: var(--paper-2);
  padding: 88px 0 96px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
  }
}
.about h2 {
  font-size: clamp(30px, 4vw, 44px);
}
.about-copy p {
  font-size: 16.5px;
  color: #3a4145;
}
.about-copy p strong {
  color: var(--slate-dark);
}
.about-figure {
  border-radius: var(--radius);
  background: repeating-linear-gradient(115deg, var(--rust) 0 14px, var(--moss) 14px 26px, var(--slate) 26px 46px);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-figure::after {
  content: "15 LAT";
  position: absolute;
  left: 22px;
  bottom: 22px;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 44px;
  color: #fff;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ---------- Gallery / Before-After ---------- */
.gallery {
  background: var(--paper);
  padding: 96px 0 0;
}
.section-head {
  max-width: 600px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
}
.section-head .sub {
  color: #4a5155;
  font-size: 16.5px;
  margin-top: 12px;
}

.ba-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.ba-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 860px) {
  .ba-item {
    grid-template-columns: 1.3fr 0.9fr;
    gap: 44px;
    align-items: center;
  }
}
.ba-item:nth-child(even) .ba-media {
  order: 2;
}
@media (min-width: 860px) {
  .ba-item:nth-child(even) .ba-media {
    order: 0;
  }
  .ba-item:nth-child(even) .ba-text {
    order: 1;
  }
}

.ba-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5/3.4;
  background: var(--ink);
  user-select: none;
  touch-action: pan-y; /* FIX: pozwala przeciągać poziomo bez blokowania pionowego scrolla na dotyku */
}
.ba-panel {
  position: absolute;
  inset: 0;
}
.ba-label {
  position: absolute;
  top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  background: rgba(27, 34, 38, 0.65);
  color: #fff;
  border-radius: 2px;
}
.ba-before .ba-label {
  left: 14px;
}
.ba-after .ba-label {
  right: 14px;
}

.ba-before {
  background: radial-gradient(circle at 20% 30%, rgba(107, 113, 86, 0.55), transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(107, 113, 86, 0.4), transparent 35%);
  background-color: var(--rust-dark);
  z-index: 2; /* FIX: warstwa "przed" na wierzchu, żeby można ją było przycinać od prawej */
  clip-path: inset(0 50% 0 0); /* FIX: domyślnie widoczna tylko lewa połowa, reszta odsłania "po" pod spodem */
}
.ba-after {
  background-color: var(--slate-dark);
  z-index: 1; /* FIX: warstwa "po" zawsze w pełni widoczna pod spodem, bez własnego clip-path — wcześniej to ona była przycinana i chowała etykietę "PO" */
}
.ba-after::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
}
/* pattern variants */
.pat-tile .ba-before {
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 26px),
    radial-gradient(circle at 20% 30%, rgba(107, 113, 86, 0.5), transparent 40%);
}
.pat-tile .ba-after {
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 26px);
}
.pat-metal .ba-before {
  background-image: repeating-linear-gradient(100deg, rgba(0, 0, 0, 0.22) 0 6px, transparent 6px 30px),
    radial-gradient(circle at 30% 65%, rgba(107, 113, 86, 0.4), transparent 35%);
}
.pat-metal .ba-after {
  background-image: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.14) 0 4px, transparent 4px 30px);
}
.pat-hall .ba-before {
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0 3px, transparent 3px 64px),
    radial-gradient(circle at 60% 40%, rgba(181, 80, 44, 0.35), transparent 45%);
}
.pat-hall .ba-after {
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 3px, transparent 3px 64px);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  pointer-events: none;
  z-index: 3; /* FIX: nad panelami (z-index 1/2), żeby uchwyt był widoczny */
}
.ba-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.ba-handle::after {
  content: "◂▸";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: #fff;
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  z-index: 4; /* FIX: input musi być NAD panelami (z-index 1/2), inaczej przechwytują kliknięcia i suwak nie reaguje */
}
.ba-text h3 {
  font-size: 24px;
  color: var(--slate-dark);
}
.ba-text p {
  color: #4a5155;
  margin-top: 10px;
  font-size: 15.5px;
}
.ba-tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px solid var(--slate);
  padding: 4px 9px;
  border-radius: 2px;
  margin-bottom: 12px;
}

/* ---------- Why us ---------- */
.why {
  background: var(--slate-dark);
  color: var(--paper-2);
  padding: 92px 0 100px;
}
.why .section-head h2 {
  color: #fff;
}
.why .section-head .sub {
  color: rgba(244, 242, 234, 0.75);
}
.why .eyebrow {
  color: var(--sheen-light);
}
.why .eyebrow::before {
  background: var(--sheen-light);
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 760px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.why-card {
  background: rgba(244, 242, 234, 0.06);
  border: 1px solid rgba(244, 242, 234, 0.14);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.why-icon {
  font-size: 30px;
  margin-bottom: 16px;
  display: block;
}
.why-card h3 {
  color: #fff;
  font-size: 21px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.why-card .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--sheen-light);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.why-card p {
  color: rgba(244, 242, 234, 0.8);
  font-size: 15px;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--paper-2);
  padding: 96px 0 120px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }
}
.contact-info h2 {
  font-size: clamp(30px, 4vw, 42px);
}
.contact-info .sub {
  margin-top: 14px;
  font-size: 16.5px;
  color: #4a5155;
  max-width: 420px;
}
.phone-block {
  margin-top: 30px;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 14px;
}
.phone-block .num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 20px;
  color: var(--slate-dark);
}
.phone-block .lbl {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #767c7f;
}

.form-card {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 560px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 242, 234, 0.7);
}
.field input[type="text"],
.field input[type="tel"],
.field select {
  background: rgba(244, 242, 234, 0.06);
  border: 1px solid rgba(244, 242, 234, 0.25);
  color: #fff;
  padding: 13px 14px;
  border-radius: 2px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
}
.field input::placeholder {
  color: rgba(244, 242, 234, 0.4);
}
.field select {
  appearance: none;
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--sheen);
  outline-offset: 1px;
}
.range-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.range-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.range-val {
  font-family: "IBM Plex Mono", monospace;
  color: var(--sheen-light);
  font-weight: 600;
  font-size: 15px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(244, 242, 234, 0.25);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sheen);
  cursor: pointer;
  border: 2px solid var(--ink);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sheen);
  border: 2px solid var(--ink);
  cursor: pointer;
}
.form-submit {
  width: 100%;
  margin-top: 6px;
}
.form-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: rgba(244, 242, 234, 0.55);
  text-align: center;
}
.form-success {
  display: none;
  text-align: center;
  color: #fff;
  padding: 30px 10px;
}
.form-success .check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sheen);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(244, 242, 234, 0.6);
  padding: 34px 0;
  font-size: 13.5px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Mobile sticky action bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  background: var(--ink);
  border-top: 1px solid rgba(244, 242, 234, 0.14);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}
.mobile-bar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mobile-bar .btn {
  font-size: 15px;
  padding: 13px 10px;
}
@media (max-width: 720px) {
  .mobile-bar {
    display: block;
  }
  .about,
  .why,
  .contact {
    padding-bottom: 130px;
  }
  .contact {
    padding-bottom: 150px;
  }
}

/* reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .btn-outline {
    transition: none;
  }
}
