/* DUKTAR, duktar.pl
   Układ: telefon domyślnie, od 900 px wersja dwukolumnowa.
   Rozmiary płynne przez clamp(telefon, telefon + różnica * var(--skala), desktop):
   pierwsza wartość obowiązuje przy 390 px, ostatnia przy 1440 px. */

:root {
  /* Kolory z marka/tokens.json */
  --surface: #F4F2EE;
  --surface-raised: #FFFFFF;
  --ink: #16191C;
  --ink-muted: #545A61;
  --line: #D6D2CA;
  --petrol: #1F5F7A;
  --petrol-tint: #DCE8EC;
  --petrol-light: #7FB3C6;
  --white: #FFFFFF;

  /* Odcienie na ciemnym tle ink, wzięte z referencji projektu (w tokens.json ich nie ma) */
  --on-ink-muted: #A9B0B6;
  --on-ink-field: #22272B;
  --on-ink-field-border: #6B7278; /* w referencji #3A4046, rozjaśnione do kontrastu 3:1 */
  --on-ink-line: #2E3439;

  /* Typografia */
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;

  /* Odstępy i promienie z tokens.json */
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-10: 40px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Układ. --skala rośnie od 0 przy 390 px do 1px przy 1440 px szerokości ekranu */
  --skala: calc((100vw - 390px) / 1050);
  --max: 1440px;
  --gutter: clamp(24px, 24px + 56 * var(--skala), 80px);
  --sekcja-y: clamp(64px, 64px + 48 * var(--skala), 112px);
  --focus: var(--petrol);
}

/* Podstawy */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.ciemne { background: var(--ink); color: var(--white); --focus: var(--petrol-light); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Tekst widoczny tylko w jednej wersji układu */
@media (max-width: 899.98px) { .tylko-desktop { display: none !important; } }
@media (min-width: 900px) { .tylko-mobile { display: none !important; } }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--petrol-light);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn--jasny { background: var(--petrol-light); color: var(--ink); }
.btn--jasny:hover { background: var(--white); }
.btn--ciemny { background: var(--ink); color: var(--white); box-shadow: inset 0 -3px 0 var(--petrol-light); }
.btn--ciemny:hover { background: var(--petrol); }
@media (min-width: 900px) {
  .btn { min-height: 56px; padding: 0 28px; font-size: 17px; }
  .btn--ciemny { min-height: 50px; padding: 0 22px; font-size: 16px; }
  .btn--maly { min-height: 44px; padding: 0 20px; font-size: 15px; }
}

/* Nagłówek strony */
.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { position: relative; z-index: 2; display: flex; }
.logo img { width: auto; height: 26px; }
.nav { display: none; }
.nav__link {
  padding-bottom: 6px;
  color: var(--on-ink-muted);
  text-decoration: none;
}
.nav__link:hover { color: var(--white); }
.nav__link[aria-current="page"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--petrol-light); }

.menu-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--white); transition: transform 0.2s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 104px var(--gutter) 40px;
  overflow-y: auto;
  background: var(--ink);
}
.menu-panel[hidden] { display: none; }
.menu-panel__link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--on-ink-line);
  color: var(--white);
  font-size: 28px;
  font-weight: 300;
  line-height: 36px;
  text-decoration: none;
}
.menu-panel__link[aria-current="page"] { color: var(--petrol-light); }
.menu-panel .btn { margin-top: 32px; }
html.menu-otwarte { overflow: hidden; }

@media (min-width: 900px) {
  .site-header__inner { height: 100px; }
  .logo img { height: 30px; }
  .nav { display: flex; align-items: center; gap: 44px; }
  .menu-toggle, .menu-panel { display: none; }
}

/* Sekcja nagłówka strony (hero) */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; padding-top: 40px; padding-bottom: 196px; }
.hero-mark {
  position: absolute;
  right: -110px;
  bottom: -30px;
  width: 220px;
  height: 220px;
  pointer-events: none;
}
.hero-mark path { fill: none; stroke: var(--petrol); stroke-width: 0.9; }
.hero-mark circle { fill: var(--petrol-light); }
.hero-tresc { position: relative; }
.hero h1 {
  /* Poniżej 390 px nagłówek maleje razem z ekranem, żeby żadne słowo nie zostało samo w linii */
  font-size: min(8.718vw, clamp(34px, 34px + 28 * var(--skala), 62px));
  font-weight: 300;
  line-height: min(10.256vw, clamp(40px, 40px + 32 * var(--skala), 72px));
  letter-spacing: -0.02em;
}
.h1-zdanie { display: block; text-wrap: balance; }
.lead {
  max-width: 620px;
  margin-top: clamp(20px, 20px + 16 * var(--skala), 36px);
  color: var(--on-ink-muted);
  font-size: clamp(17px, 17px + 4 * var(--skala), 21px);
  line-height: clamp(27px, 27px + 5 * var(--skala), 32px);
}
.hero-akcje { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.tel-link { color: var(--petrol-light); text-decoration: none; }
.tel-link:hover { text-decoration: underline; }
.hero-akcje .tel-link { line-height: 20px; text-align: center; }
.hero-nota {
  max-width: 240px;
  margin-top: 40px;
  color: var(--on-ink-muted);
  font-size: clamp(13px, 13px + 2 * var(--skala), 15px);
  line-height: 1.5;
}
@media (min-width: 900px) {
  .hero .wrap { padding-top: 88px; padding-bottom: 112px; }
  /* Jak w projekcie 1440 px: znak zaczyna się 736 px od lewej. Na węższym ekranie ucina go prawa krawędź. */
  .hero-mark {
    top: 200px;
    right: auto;
    bottom: auto;
    left: 736px;
    width: 640px;
    height: 640px;
  }
  .hero h1 { letter-spacing: -0.03em; }
  .hero-akcje { flex-direction: row; align-items: center; gap: 28px; margin-top: 44px; }
  .hero-akcje .tel-link { font-size: 17px; }
  .hero-nota { max-width: 560px; margin-top: 72px; }
}

/* Sekcje treści */
.sekcja { padding-block: var(--sekcja-y); }
.sekcja--tint { background: var(--petrol-tint); }
.sekcja--bez-gory { padding-top: 0; }
.sekcja-tytul {
  margin-bottom: 28px;
  font-size: clamp(30px, 30px + 18 * var(--skala), 48px);
  font-weight: 300;
  line-height: clamp(36px, 36px + 18 * var(--skala), 54px);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
@media (min-width: 900px) {
  .uklad { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(48px, 5.556vw, 80px); }
  .sekcja-tytul { margin-bottom: 0; letter-spacing: -0.025em; }
}

/* Lista pozycji z kropką */
.pozycja {
  position: relative;
  display: block;
  padding: 0 0 32px 24px;
  color: var(--ink);
  text-decoration: none;
}
.pozycja::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--petrol);
}
.pozycja__tytul {
  display: block;
  font-size: clamp(21px, 21px + 6 * var(--skala), 27px);
  font-weight: 300;
  line-height: clamp(29px, 29px + 7 * var(--skala), 36px);
}
.pozycja:hover .pozycja__tytul { color: var(--petrol); }
.pozycja__opis {
  display: block;
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: clamp(15px, 15px + 2 * var(--skala), 17px);
  line-height: clamp(24px, 24px + 3 * var(--skala), 27px);
}
@media (min-width: 900px) {
  .pozycja {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 3.889vw, 56px);
    padding: 8px 0 44px 36px;
  }
  .pozycja::before { top: 20px; width: 12px; height: 12px; }
  .pozycja__tytul { letter-spacing: -0.01em; }
  .pozycja__opis { margin-top: 0; padding-top: 6px; }
}

/* Dwa zakresy usług (strona główna) */
.zakresy { display: grid; gap: 48px; }
.zakres { display: flex; flex-direction: column; gap: 16px; }
.zakres__tytul {
  font-size: clamp(28px, 28px + 12 * var(--skala), 40px);
  font-weight: 300;
  line-height: 1.17;
  letter-spacing: -0.025em;
}
.zakres__opis, .punkty li { font-size: clamp(16px, 16px + 2 * var(--skala), 18px); line-height: 1.56; }
.zakres__opis { color: var(--ink-muted); }
.punkty { margin-top: 4px; }
.punkty li { position: relative; padding: 0 0 12px 22px; }
.punkty li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--petrol);
}
@media (min-width: 900px) {
  .zakresy { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6.667vw, 96px); }
  .zakres { gap: 24px; }
  .punkty { margin-top: 8px; }
  .punkty li { padding: 0 0 18px 26px; }
  .punkty li::before { top: 10px; width: 9px; height: 9px; }
  .zakres .btn { align-self: flex-start; }
}

/* Akapit w sekcji z tłem */
.tekst p {
  max-width: 720px;
  color: var(--ink-muted);
  font-size: clamp(16px, 16px + 4 * var(--skala), 20px);
  line-height: 1.6;
}
.tekst p + p { margin-top: 16px; font-size: 16px; line-height: 1.625; }
/* Na telefonie oba akapity czytają się jako jeden, jak w referencji mobilnej */
@media (max-width: 899.98px) { .tekst p { display: inline; } }

/* Kroki: Jak zaczynamy */
.kroki { display: flex; flex-direction: column; gap: 28px; }
.krok { display: grid; grid-template-columns: 56px 1fr; gap: 12px; }
.krok__nr {
  color: var(--petrol);
  font-size: 36px;
  font-weight: 300;
  line-height: 40px;
}
.krok__tytul { font-size: clamp(19px, 19px + 3 * var(--skala), 22px); font-weight: 600; line-height: 1.37; }
.krok__opis {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: clamp(15px, 15px + 2 * var(--skala), 17px);
  line-height: 1.6;
}
@media (min-width: 900px) {
  .kroki { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 48px; }
  .krok { grid-template-columns: 1fr; }
  .krok__nr { font-size: clamp(44px, 3.889vw, 56px); line-height: 1; letter-spacing: -0.03em; }
  .krok__tytul { padding-top: 8px; }
  .krok__opis { margin-top: 12px; }
}

/* Pytania */
.pytanie { padding-bottom: 28px; }
.pytanie__tytul {
  margin-bottom: 8px;
  font-size: clamp(19px, 19px + 3 * var(--skala), 22px);
  font-weight: 600;
  line-height: 1.36;
}
.pytanie p {
  max-width: 720px;
  color: var(--ink-muted);
  font-size: clamp(15px, 15px + 3 * var(--skala), 18px);
  line-height: 1.58;
}
@media (min-width: 900px) {
  .pytanie { padding-bottom: 40px; }
  .pytanie__tytul { margin-bottom: 10px; }
}

/* Kontakt */
.kontakt .wrap {
  padding-top: clamp(64px, 64px + 56 * var(--skala), 120px);
  padding-bottom: clamp(48px, 48px + 56 * var(--skala), 104px);
}
.kontakt__uklad { display: flex; flex-direction: column; gap: 24px; }
.kontakt__intro { display: flex; flex-direction: column; gap: 24px; }
.kontakt__tytul {
  font-size: clamp(36px, 36px + 20 * var(--skala), 56px);
  font-weight: 300;
  line-height: clamp(42px, 42px + 20 * var(--skala), 62px);
  letter-spacing: -0.02em;
}
.kropka { color: var(--petrol-light); }
.kontakt__intro p {
  max-width: 420px;
  color: var(--on-ink-muted);
  font-size: clamp(16px, 16px + 3 * var(--skala), 19px);
  line-height: 1.57;
}
.kontakt__dane {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: clamp(18px, 18px + 2 * var(--skala), 20px);
  line-height: 1.5;
}

.formularz { position: relative; display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.pole { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pole__etykieta { padding: 0; color: var(--on-ink-muted); font-size: 14px; line-height: 20px; }
fieldset.pole .pole__etykieta { padding-bottom: 10px; }
.pole__pole {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--on-ink-field-border);
  border-radius: var(--radius-md);
  background: var(--on-ink-field);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
}
textarea.pole__pole { height: auto; padding: 12px 14px; line-height: 24px; resize: none; }
.pole__pole:focus { border-color: var(--petrol-light); }
.pole__pole[aria-invalid="true"] { border-color: var(--petrol-light); box-shadow: inset 0 0 0 1px var(--petrol-light); }
.pole__blad { color: var(--white); font-size: 14px; line-height: 20px; }
.pole__blad:empty { display: none; }
.opcje { display: flex; flex-direction: column; gap: 10px; }
.opcja { display: flex; align-items: center; gap: 8px; color: var(--white); font-size: 16px; line-height: 20px; cursor: pointer; }
.opcja input { width: 16px; height: 16px; margin: 0; accent-color: var(--petrol-light); }
.pole-ukryte { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.formularz__stopka { display: flex; flex-direction: column-reverse; gap: 18px; }
.formularz__nota { color: var(--on-ink-muted); font-size: 13px; line-height: 20px; }
.formularz .btn { width: 100%; }
.formularz .btn[disabled] { opacity: 0.7; cursor: progress; }
.formularz__status {
  color: var(--white);
  font-size: 16px;
  line-height: 24px;
}
.formularz__status:empty { display: none; }

@media (min-width: 900px) {
  .kontakt__uklad { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(48px, 6.667vw, 96px); }
  .kontakt__tytul { letter-spacing: -0.025em; }
  .kontakt__dane { gap: 6px; padding-top: 8px; }
  .formularz { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; padding-top: 0; }
  .pole--szerokie, .formularz__stopka, .formularz__status { grid-column: 1 / -1; }
  .pole__pole { padding: 0 16px; }
  textarea.pole__pole { padding: 14px 16px; }
  .opcje { flex-direction: row; align-items: center; gap: 28px; }
  .formularz__stopka { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding-top: 8px; }
  .formularz__nota { font-size: 14px; }
  .formularz .btn { width: auto; flex: none; }
}

/* Stopka */
.site-footer {
  border-top: 1px solid var(--on-ink-line);
  color: var(--on-ink-muted);
  font-size: 12px;
  line-height: 19px;
}
.site-footer .wrap { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; padding-bottom: 40px; }
.site-footer img { align-self: flex-start; width: auto; height: 26px; }
.site-footer address { font-style: normal; }
@media (min-width: 900px) {
  .site-footer { font-size: 13px; line-height: 21px; }
  .site-footer .wrap {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 56px;
  }
  .site-footer img { height: 30px; }
  .site-footer address { text-align: right; }
}

/* Strona 404: krótka treść, ciemne tło do samego dołu okna */
.strona-bledu { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.strona-bledu main { display: flex; flex: 1; flex-direction: column; background: var(--ink); }
.strona-bledu .hero { flex: 1; }

/* Tryb wysokiego kontrastu w Windows: kreski menu i kropki list rysowane tłem zniknęłyby */
@media (forced-colors: active) {
  .menu-toggle span, .pozycja::before, .punkty li::before { background: CanvasText; forced-color-adjust: none; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span { transition: none; }
}
