/* Poppins (SIL Open Font License), pliki na własnym serwerze */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/fonts/poppins-300-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/fonts/poppins-300-latin.woff2") format("woff2"); 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: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/poppins-400-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/poppins-400-latin.woff2") format("woff2"); 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: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/poppins-600-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/poppins-600-latin.woff2") format("woff2"); 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: "Poppins"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/poppins-800-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/poppins-800-latin.woff2") format("woff2"); 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; }

/* Układ: arkusz rysunkowy. Tekst wyrównany do lewej w jednej kolumnie,
   sekcje oddzielone liniami jak rzędne na przekroju. */
:root {
  --paper: #f1f4f3;
  --surface: #e4eae8;
  --ink: #14242b;
  --muted: #55676d;
  --rule: #c3cfcc;
  --water: #1c6883;
  --water-ink: #f1f4f3;
  --water-soft: #cde2e9;
  --earth: #977544;
  --todo: #f3e2a6;
  --ok: #2c6b3f;
  --err: #a2382b;

  --f-display: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.3rem + 2vw, 2.9rem);
  --step-4: clamp(2rem, 1.3rem + 2vw, 2.6rem);

  --measure: 66ch;
  --wrap: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1a1f; --surface: #16252c; --ink: #e1e9e9; --muted: #95a7aa;
    --rule: #2b3d44; --water: #5fb1cd; --water-ink: #0f1a1f; --water-soft: #173f4c;
    --earth: #c4a06b; --todo: #4e4420; --ok: #7cc493; --err: #ef8a7c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1a1f; --surface: #16252c; --ink: #e1e9e9; --muted: #95a7aa;
  --rule: #2b3d44; --water: #5fb1cd; --water-ink: #0f1a1f; --water-soft: #173f4c;
  --earth: #c4a06b; --todo: #4e4420; --ok: #7cc493; --err: #ef8a7c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.025em;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 20; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Nagłówek */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 18px;
}
.wordmark { text-decoration: none; color: var(--ink); display: grid; line-height: 1.15; }
.wordmark b {
  font-family: var(--f-display); font-weight: 800;
  font-size: 1.25rem; letter-spacing: -0.03em; white-space: nowrap;
}
.wordmark span { color: var(--muted); font-size: var(--step--1); font-weight: 300; }
.nav { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.97rem; padding-block: 6px; }
.nav a:hover { color: var(--water); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--water); }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.97rem;
  padding: 11px 18px; border-radius: 3px; border: 1.5px solid var(--water);
  background: var(--water); color: var(--water-ink); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--water); }
.nav .btn { color: var(--water-ink); padding: 8px 14px; }
.nav .btn:hover { color: var(--water-ink); }

@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex; font: inherit; font-weight: 600; background: none;
    color: var(--ink); border: 1.5px solid var(--rule); border-radius: 3px; padding: 7px 12px; cursor: pointer;
  }
  .site-head .wrap { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding-block: 12px; border-top: 1px solid var(--rule); }
  .nav .btn { justify-content: center; margin-top: 12px; padding-block: 12px; border-top: 0; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sekcje */
main { display: block; }
.section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
.section:first-child { border-top: 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.section-head p { color: var(--muted); font-weight: 300; font-size: 1.08rem; }
.lead { font-size: var(--step-1); font-weight: 300; line-height: 1.55; color: var(--muted); max-width: 54ch; }
.page-head { padding-block: clamp(40px, 6vw, 72px) 0; display: grid; gap: 16px; max-width: 820px; }
.page-head .lead { margin-top: 4px; }

/* Nagłówek strony głównej */
.hero { padding-block: clamp(40px, 6vw, 80px); }
.hero-text { display: grid; gap: 22px; min-width: 0; max-width: 820px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
/* Liczby */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; }
.facts div { border-top: 2px solid var(--ink); padding-top: 12px; display: grid; gap: 4px; align-content: start; }
.facts dt { order: 2; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }
.facts dd {
  order: 1; margin: 0; font-family: var(--f-display); font-weight: 800;
  font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Usługi */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.service { padding-block: 22px; border-top: 1px solid var(--rule); display: grid; gap: 8px; min-width: 0; }
.service p { color: var(--muted); }
.service .tools { font-size: var(--step--1); color: var(--ink); }
@media (max-width: 760px) { .services { grid-template-columns: minmax(0, 1fr); } }
.more { margin-top: 28px; }

/* Realizacje wyróżnione */
.featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.work { display: grid; gap: 12px; align-content: start; min-width: 0; margin: 0; }
.work .ph { aspect-ratio: 3 / 2; width: 100%; max-width: 100%; object-fit: cover; background: var(--surface); border-radius: 2px; }
.work .meta { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.work p { color: var(--muted); }
.work img.ph { filter: grayscale(1) contrast(1.08); transition: filter .5s ease; }
@media (hover: none) { .work img.ph { filter: none; } }
.work:hover img.ph, .work:focus-within img.ph { filter: none; }
@media (max-width: 760px) { .featured { grid-template-columns: minmax(0, 1fr); } }

/* Mapa */
.map-box {
  border: 1px solid var(--rule); background: var(--surface); border-radius: 3px;
  padding: clamp(20px, 4vw, 36px); display: grid; gap: 14px; justify-items: start;
}
.map-box p { color: var(--muted); max-width: 60ch; }
.map-frame { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border: 0; border-radius: 3px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Kontakt — pas na dole */
.cta-band { background: var(--water); color: var(--water-ink); }
.cta-band .wrap { padding-block: clamp(44px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.cta-band h2 { color: var(--water-ink); }
.cta-band p { opacity: 0.9; margin-top: 12px; }
.cta-band .contact-lines { display: grid; gap: 6px; font-size: var(--step-1); }
.cta-band a { color: var(--water-ink); }
.cta-band .btn { background: var(--water-ink); color: var(--water); border-color: var(--water-ink); justify-self: start; margin-top: 10px; }
@media (max-width: 760px) { .cta-band .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Stopka */
.site-foot { border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { padding-block: 32px 40px; display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); }

/* Lista usług na podstronie */
.svc-group { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 16px 48px; padding-block: 32px; border-top: 1px solid var(--rule); }
.svc-group > div { display: grid; gap: 10px; min-width: 0; }
.svc-group > div > p { color: var(--muted); }
@media (max-width: 760px) { .svc-group { grid-template-columns: minmax(0, 1fr); } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 2px; background: var(--water); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 12px; display: grid; gap: 6px; }
.steps li::before { content: counter(s); font-family: var(--f-display); font-weight: 800; font-size: var(--step-2); line-height: 1; color: var(--water); }
.steps p { color: var(--muted); font-size: 0.97rem; }

/* Tabele */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: var(--step--1); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 20px; }
tfoot td { font-weight: 600; border-bottom: 0; border-top: 2px solid var(--ink); }

/* Lista realizacji */
.cat { border-top: 1px solid var(--rule); }
.cat summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding-block: 20px; font-family: var(--f-display); font-weight: 600; font-size: var(--step-1);
}
.cat summary::-webkit-details-marker { display: none; }
.cat summary .count { font-family: var(--f-body); font-weight: 400; font-size: var(--step--1); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat summary::after { content: "+"; font-family: var(--f-body); font-weight: 400; color: var(--water); font-size: 1.4rem; line-height: 1; }
.cat[open] summary::after { content: "−"; }
.cat .cat-body { padding-bottom: 28px; display: grid; gap: 16px; max-width: 900px; }
.cat .cat-body > p { color: var(--muted); }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { padding-block: 9px; border-bottom: 1px dashed var(--rule); }
.plist li:last-child { border-bottom: 0; }
.plist .tag { color: var(--muted); font-size: var(--step--1); }

/* O mnie */
.about { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--surface); border: 1px dashed var(--rule); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: var(--step--1); padding: 16px; border-radius: 2px; }
.portrait b { display: block; font-family: var(--f-display); font-size: 3rem; color: var(--rule); }
.about-text { display: grid; gap: 18px; max-width: var(--measure); min-width: 0; }
.portrait-img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; background: var(--surface); }
.about picture { display: block; min-width: 0; }
@media (max-width: 760px) { .about { grid-template-columns: minmax(0, 1fr); } .portrait, .portrait-img, .about picture { max-width: 240px; } }

/* Kontakt */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-data { display: grid; gap: 22px; min-width: 0; }
.contact-data dl { margin: 0; display: grid; gap: 14px; }
.contact-data dt { color: var(--muted); font-size: var(--step--1); }
.contact-data dd { margin: 0; font-size: var(--step-1); }
.copy { font: inherit; font-size: var(--step--1); margin-left: 8px; padding: 2px 8px; border: 1px solid var(--rule); background: transparent; color: var(--water); border-radius: 3px; cursor: pointer; }
.form { display: grid; gap: 16px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--muted); font-size: var(--step--1); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: 3px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--water); box-shadow: 0 0 0 3px var(--water-soft); }
textarea { min-height: 150px; resize: vertical; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.93rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--water); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 12px 14px; border-radius: 3px; border: 1px solid currentColor; font-weight: 600; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* Artykuły */
.posts { list-style: none; padding: 0; margin: 0; display: grid; max-width: 820px; }
.posts li { border-top: 1px solid var(--rule); padding-block: 26px; display: grid; gap: 8px; }
.posts time { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.posts p { color: var(--muted); }
.posts h2 { font-size: var(--step-2); }
.posts h2 a { color: var(--ink); text-decoration: none; }
.posts h2 a:hover { color: var(--water); }

.prose { max-width: var(--measure); display: grid; gap: 1.1em; padding-block: 32px 72px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 0.45em; }
.prose h2 { font-size: var(--step-2); margin-top: 0.8em; }
.prose figure { margin: 0.6em 0; display: grid; gap: 8px; }
.prose figure img { border-radius: 2px; }
.prose figcaption { color: var(--muted); font-size: var(--step--1); }
.prose .formula { font-family: var(--f-body); font-size: 1.15rem; padding: 14px 18px; background: var(--surface); border-radius: 3px; overflow-x: auto; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 980px; }
.gallery figure { margin: 0; display: grid; gap: 8px; min-width: 0; }
.gallery a { display: block; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 2px; }
.gallery figcaption { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 600px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.byline { color: var(--muted); font-size: var(--step--1); }
.back { font-size: 0.95rem; }

/* Miejsca do uzupełnienia przez właściciela */
.todo { color: var(--ink); background: var(--todo); outline: 1px dashed var(--earth); padding: 0 4px; border-radius: 2px; }

/* Brak zdjęcia w podglądzie */
.ph-missing { aspect-ratio: 3 / 2; max-width: 100%; display: grid; place-items: center; padding: 16px; text-align: center; background: var(--surface); color: var(--muted); font-size: var(--step--1); border: 1px dashed var(--rule); border-radius: 2px; }

/* Baner podglądu */
.preview-note { background: var(--surface); border-bottom: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); }
.preview-note .wrap { padding-block: 10px; }
