/* Prototyp treści — jeden plik stylów dla wszystkich stron.
   Zasada: tekst prowadzi, forma się nie wybija. Jedna rodzina krojów, jeden akcent (zieleń), bez cieni i gradientów.
   Produkcja: font hostowany lokalnie (RODO), nie z Google Fonts. */

:root {
  --ink: #15171a;
  --paper: #ffffff;
  --panel: #f1f2f4;
  --line: #dfe2e6;
  --muted: #5a606b;
  --accent: #0f6a4c;
  --accent-soft: #e4f1ea;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-section: clamp(3.5rem, 8vw, 7rem);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

@media (min-width: 60rem) { body { font-size: 1.125rem; } }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw + 1rem, 4.5rem); line-height: 1.04; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); line-height: 1.14; letter-spacing: -0.018em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.25em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose h2 { margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.6em 0 0.5em; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 0.5rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: var(--radius-s);
}
.skip:focus { left: 0.5rem; }

/* Nagłówek strony */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 0.75rem; min-height: 4.5rem; }
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin-right: auto; }
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: 1.75rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding-block: 0.5rem; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-header .header-cta { display: inline-flex; min-height: 44px; padding: 0.5rem 0.9rem; font-size: 0.95rem; }
@media (max-width: 21rem) { .site-header .header-cta { display: none; } }

.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 1rem; border: 1px solid #8a909a; border-radius: var(--radius-s); font-size: 1rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--panel); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); width: min(20rem, 88vw);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0.75rem;
}
.menu-panel ul { list-style: none; }
.menu-panel a { display: block; padding: 0.7rem 0.75rem; color: var(--ink); text-decoration: none; border-radius: var(--radius-s); }
.menu-panel a:hover { background: var(--panel); }
.menu-panel .btn { margin-top: 0.5rem; width: 100%; }

@media (min-width: 56rem) {
  .nav { display: block; }
  .site-header .wrap { gap: 2rem; }
  .site-header .header-cta { padding: 0.75rem 1.35rem; font-size: 1rem; }
  .menu { display: none; }
}

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.35rem;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  border-radius: var(--radius-s); font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #000; text-decoration: none; }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--light:hover { background: var(--panel); }
.link-strong { font-weight: 600; color: var(--ink); display: inline-block; padding-block: 0.6rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

/* Hero */
.hero { padding-block: clamp(2rem, 7vw, 6.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero h1 { max-width: 18ch; }
.hero-lead { font-size: clamp(1.15rem, 0.6vw + 1rem, 1.375rem); line-height: 1.5; color: var(--muted); max-width: 46ch; margin-top: 1.5rem; }
.crumbs { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); display: inline-block; padding-block: 0.6rem; }

/* „W skrócie”: 2–4 fakty pod hero (czas, cena, forma) */
.facts {
  display: grid; gap: 1.25rem 2rem; margin: 3rem 0 0; padding-top: 1.5rem;
  border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.facts div { margin: 0; }
.facts dt { font-size: 0.95rem; color: var(--muted); }
.facts dd { margin: 0.2rem 0 0; font-weight: 600; }

/* Sekcje */
.section { padding-block: var(--space-section); }
.section + .section { padding-top: 0; }
.section--panel { background: var(--panel); }
.section--panel + .section, .section + .section--panel { padding-top: var(--space-section); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head .lead { margin-top: 1rem; color: var(--muted); font-size: 1.15rem; max-width: 60ch; }

@media (min-width: 60rem) {
  .section--split > .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
  .section--split .section-head { position: sticky; top: 7rem; margin-bottom: 0; }
}

/* Wiersze: sytuacje, zakres, zasady */
.rows { list-style: none; }
.rows > li { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin-bottom: 0.5rem; }
.rows p { color: var(--muted); max-width: 62ch; }
@media (min-width: 48rem) {
  .rows--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .rows--two > li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
}

/* Mapa problemów: zdanie klienta → usługa */
.paths { list-style: none; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .paths { grid-template-columns: 1fr 1fr; } }
.paths a {
  display: block; height: 100%; padding: 1.35rem 1.5rem; border: 1px solid var(--line);
  border-radius: var(--radius-m); color: var(--ink); text-decoration: none;
}
.paths a:hover { border-color: var(--ink); }
.paths-problem { display: block; font-size: 1.15rem; line-height: 1.4; }
.paths-answer { display: block; margin-top: 0.6rem; color: var(--accent); font-weight: 600; font-size: 1rem; }

/* Kroki (tylko gdy kolejność naprawdę ma znaczenie) */
.steps { list-style: none; counter-reset: step; display: grid; gap: 2rem; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 0 1rem; }
.steps > li::before {
  content: counter(step); grid-row: span 3; font-weight: 600; font-size: 1.1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.steps h3 { margin-bottom: 0.25rem; }
.steps-time { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.5rem; }

/* Drabina współpracy: 4 poziomy */
.ladder { list-style: none; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .ladder { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .ladder { grid-template-columns: repeat(4, 1fr); } }
.ladder > li {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.5rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.section--panel .ladder > li { border-color: transparent; }
.ladder-step { font-size: 0.95rem; color: var(--muted); }
.ladder-price { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.ladder-meta { font-size: 0.95rem; color: var(--muted); }
.ladder > li > :last-child { margin-top: auto; padding-top: 0.5rem; }

/* Lista „co dostajesz” */
.checks { list-style: none; display: grid; gap: 0.85rem; }
.checks > li { position: relative; padding-left: 2rem; }
.checks > li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.45em; width: 0.9rem; height: 0.5rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
@media (min-width: 48rem) { .checks--two { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* Tabela cen */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prices { width: 100%; border-collapse: collapse; }
.prices caption { text-align: left; color: var(--muted); font-size: 0.95rem; padding-bottom: 0.75rem; }
.prices th, .prices td { text-align: left; vertical-align: top; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); }
.prices thead th { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.prices td:last-child { font-weight: 600; padding-right: 0; }
.prices th:last-child { padding-right: 0; }
.prices--plain td:last-child { font-weight: 400; }
@media (min-width: 48rem) { .prices td:last-child { min-width: 10rem; } .prices--plain td:last-child { min-width: 0; } }
.prices thead th:last-child { font-weight: 400; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0; font-weight: 600; font-size: 1.1rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq-a { padding-bottom: 1.5rem; max-width: 64ch; color: var(--ink); }

/* Powiązane usługi */
.related { list-style: none; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .related { grid-template-columns: repeat(3, 1fr); } }
.related a { display: block; height: 100%; padding: 1.25rem; border-radius: var(--radius-m); background: var(--panel); color: var(--ink); text-decoration: none; }
.related a:hover { background: var(--accent-soft); }
.related strong { display: block; margin-bottom: 0.35rem; }
.related span { color: var(--muted); font-size: 1rem; }

/* Notka w tekście */
.note { padding: 1.25rem 1.5rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; max-width: 62ch; }

/* Wezwanie na końcu strony */
.cta { padding-block: 0 var(--space-section); }
.cta-box { background: var(--ink); color: var(--paper); border-radius: var(--radius-l); padding: clamp(2rem, 5vw, 4rem); }
.cta-box h2 { max-width: 24ch; }
.cta-box p { color: #c9ccd2; max-width: 56ch; margin-top: 1rem; }
.cta-box .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-box .btn:hover { background: var(--panel); }
.cta-box a:not(.btn) { color: var(--paper); }

/* Formularz */
.form { display: grid; gap: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: 0.4rem; }
.field label, .field legend { font-weight: 600; font-size: 1rem; }
.field .hint { font-size: 0.95rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid #8a909a; border-radius: var(--radius-s); padding: 0.75rem 0.9rem; min-height: 48px; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }

/* Znaczniki prototypu: brakujące fakty i decyzje właściciela */
mark.todo, mark.decide { color: var(--ink); padding: 0.05em 0.35em; border-radius: 4px; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.todo { background: #fff0a3; }
mark.decide { background: #e6ecfb; outline: 1px dashed #7b8fd1; }

/* Stopka */
.site-footer { background: var(--panel); padding-block: 4rem 2.5rem; font-size: 1rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; display: grid; gap: 0; }
.site-footer a { color: var(--ink); text-decoration: none; display: inline-block; padding-block: 0.55rem; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }

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

/* Akapit pod tabelą nie przykleja się do niej */
.table-scroll + p { margin-top: 1.25rem; }

/* Telefon: tabela cen jako lista bloków, cena zawsze widoczna */
@media (max-width: 47.99rem) {
  .prices, .prices tbody, .prices tr, .prices th, .prices td { display: block; width: 100%; }
  .prices thead { display: none; }
  .prices caption { display: block; width: 100%; }
  .prices tr { padding-block: 1rem; border-bottom: 1px solid var(--line); }
  .prices th, .prices td { border: 0; padding: 0.15rem 0; }
  .prices tbody th[scope="row"], .prices tbody th[scope="rowgroup"] { font-weight: 600; }
  .prices th[scope="rowgroup"] { padding-top: 0.25rem; font-size: 1.1rem; }
  .prices td:last-child { margin-top: 0.35rem; }
}

/* Telefon: w hero najpierw „W skrócie” (cena, czas), potem przyciski — cena na pierwszym ekranie */
@media (max-width: 47.99rem) {
  .hero .wrap { display: flex; flex-direction: column; }
  .hero .facts { order: 1; margin-top: 1.5rem; padding-top: 1.25rem; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
  .hero .actions { order: 2; margin-top: 1.5rem; }
  .hero .toc { order: 3; }
  .hero-lead { margin-top: 1rem; }
}

/* Spis treści strony (kotwice pod hero) */
.toc { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.toc a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.95rem;
  border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-size: 0.95rem;
}
.toc a:hover { border-color: var(--ink); }
