/* ==========================================================
   Szablon: mycie i malowanie dachów
   Ciemny motyw. Kolory i czcionki zmienisz w sekcji :root poniżej.
   ========================================================== */

/* Czcionki hostowane lokalnie (folder fonts/), bez połączeń z Google */
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/archivo-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/archivo-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/public-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/public-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;

  --bg:       #0F161C;   /* tło strony */
  --bg-2:     #151F27;   /* tło co drugiej sekcji */
  --surface:  #1B2731;   /* panele */
  --line:     #2E3E4B;   /* linie i ramki */
  --text:     #E9EFF2;   /* tekst główny */
  --muted:    #A3B3BE;   /* tekst pomocniczy */
  --amber:    #F2A900;   /* przyciski główne */
  --amber-d:  #FFBE2E;   /* przycisk po najechaniu */
  --water:    #6CC0E3;   /* linki, focus */

  --font-head: 'Archivo Variable', 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Public Sans Variable', 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 6px;
  --roof: #6E3B33;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--water); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }

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

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--bg); padding: 10px 16px;
  border-radius: var(--radius); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 700 1rem/1 var(--font-body);
  border: 2px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--amber); color: var(--bg); }
.btn-primary:hover { background: var(--amber-d); }
.btn-ghost { border-color: #5B6E7C; color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); background: rgba(255,255,255,.06); }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(15, 22, 28, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.15rem/1 var(--font-head); letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.btn-call { min-height: 44px; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-2); padding: clamp(36px, 6vw, 80px) 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
h1 { font-size: clamp(2.3rem, 4.6vw + .6rem, 4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }
.h1-sub { display: block; margin-top: .3em; font-weight: 500; color: var(--muted); font-size: .5em; letter-spacing: -0.01em; line-height: 1.2; }
.lead { margin-top: 22px; font-size: 1.2rem; line-height: 1.55; max-width: 34em; color: #D2DCE2; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 30px; font-weight: 600; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px;
  border-radius: 50%; background: var(--amber);
}
.facts li::after {
  content: ""; position: absolute; left: 6px; top: calc(.32em + 4px); width: 6px; height: 9px;
  border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(40deg) scale(.85);
}

/* Interaktywny dach */
.picker {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(14px, 2.4vw, 22px);
}
.picker-title { font: 700 1.05rem/1.3 var(--font-head); margin-bottom: 12px; }
.roof-svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.roof-fill { fill: var(--roof); transition: fill .25s; }

.wash { margin-top: 12px; }
.scale { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 600; color: var(--muted); margin-top: 2px; }

input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; margin: 0; cursor: ew-resize; }
#wash { height: 34px; }
#wash::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #5B6E7C; }
#wash::-moz-range-track { height: 6px; border-radius: 3px; background: #5B6E7C; }
#wash::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px;
  border-radius: 50%; background: var(--amber); border: 3px solid var(--bg);
}
#wash::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--amber); border: 3px solid var(--bg); }

.swatches { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.swatches legend { padding: 0; font-size: .95rem; margin-bottom: 10px; color: var(--muted); }
.swatches legend strong { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-label { position: relative; display: block; cursor: pointer; }
.chip-label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip {
  display: block; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px #5B6E7C;
  transition: box-shadow .15s;
}
.chip-label input:checked + .chip { box-shadow: 0 0 0 3px var(--text); }
.chip-label input:focus-visible + .chip { outline: 3px solid var(--water); outline-offset: 5px; }
.note { margin-top: 12px; font-size: .88rem; color: var(--muted); }

/* ---------- Sekcje ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.bg-alt { background: var(--bg-2); }

h2 { font-size: clamp(1.9rem, 2.6vw + 1rem, 2.75rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.section-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--muted); text-wrap: pretty; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split > .section-head { margin-bottom: 0; position: sticky; top: 100px; }

/* Usługi */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); }
.services article { padding: 26px 0 34px; border-top: 2px solid var(--text); }
.services p { margin-top: 10px; max-width: 34em; color: #D2DCE2; }

/* Przed / po */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); }

.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 8px; background: var(--surface); user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.compare .knob {
  position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background-color: #fff; border: 2px solid #1F2A33; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M15 13 L8 20 L15 27 M25 13 L32 20 L25 27' fill='none' stroke='%231F2A33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.compare .tag {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 4px;
  background: rgba(15, 22, 28, .85); color: #fff; font-size: .85rem; font-weight: 700; pointer-events: none;
}
.tag-before { left: 12px; }
.tag-after { right: 12px; }
.compare input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; touch-action: pan-y;
}
.compare input[type="range"]::-webkit-slider-runnable-track { height: 100%; }
.compare input[type="range"]::-moz-range-track { height: 100%; }
.compare input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; }
.compare input[type="range"]::-moz-range-thumb { width: 44px; height: 44px; border: 0; }
.compare:focus-within { outline: 3px solid var(--water); outline-offset: 3px; }

/* Proces */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; padding-bottom: 30px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--amber); color: var(--bg); font: 800 1.05rem/1 var(--font-head);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px; width: 2px; background: var(--line); }
.steps h3 { padding-top: 7px; }
.steps p { margin-top: 6px; max-width: 32em; color: #D2DCE2; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.contact-info p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; max-width: 30em; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-buttons .btn-primary { min-height: 56px; font-size: 1.1rem; flex: 1 1 100%; }
.contact-buttons .btn-ghost { min-height: 52px; flex: 1 1 calc(50% - 6px); }

.details { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 4px; }
.details dt { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.details dt:first-child { margin-top: 0; }
.details dd { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.details a { color: var(--text); }
.big-phone { font: 800 clamp(1.8rem, 3vw + 1rem, 2.6rem)/1.1 var(--font-head); text-decoration: none; letter-spacing: -0.01em; }
.big-phone:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Stopka */
.site-footer { background: #0A1015; color: var(--muted); padding: 36px 0; font-size: .95rem; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.foot strong { color: var(--text); }

/* Pasek dolny na telefonie */
.callbar { display: none; }

/* Strona 404 */
.page { padding: clamp(40px, 7vw, 88px) 0; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.page p { margin-top: 1em; }
.page .btn { margin-top: 28px; }

/* ---------- Tablet i telefon ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .bar { min-height: 60px; }
  .hero-grid, .split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .split > .section-head { position: static; margin-bottom: 28px; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .btn-call { display: none; }
  .bar { justify-content: flex-start; }
  .services, .gallery { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn, .contact-buttons .btn { flex: 1 1 100%; }
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 22, 28, .96); border-top: 1px solid var(--line);
  }
}

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