/* Ambit v2026: szablon. Kolory z logo: biel, czerwień #ED1C24, czerń. */

@font-face { font-family: "Kanit"; font-weight: 700; font-display: swap; src: url("../fonts/kanit-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Kanit"; font-weight: 700; font-display: swap; src: url("../fonts/kanit-700-latinext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Kanit"; font-weight: 900; font-display: swap; src: url("../fonts/kanit-900-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Kanit"; font-weight: 900; font-display: swap; src: url("../fonts/kanit-900-latinext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --red: #ED1C24;
  --red-dark: #C8141B;
  --black: #000;
  --ink: #1A1A1A;
  --grey: #6B6B6B;
  --line: #E4E4E4;
  --paper: #F5F5F4;
  --white: #fff;
  /* tryb jasny/ciemny: --fg tekst i nagłówki, --bg tło strony; --black/--white to stałe kolory ciemnych sekcji */
  --fg: #000;
  --bg: #fff;
  --header-bg: rgba(255,255,255,.96);
  --field-line: #cfcfcf;

  --display: "Kanit", "Arial Black", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--fg); }
p { margin: 0 0 1em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--grey); }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--black); color: var(--white); padding: 10px 16px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(720px + 2 * var(--gutter)); }

.test-bar { background: var(--black); color: #bdbdbd; font-size: .8125rem; text-align: center; padding: 6px 16px; }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 2px solid transparent; border-radius: 2px; font: 700 1rem/1 var(--display); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: var(--white); color: #000; border-color: var(--white); }
.btn-line { border-color: var(--fg); color: var(--fg); }
.btn-line:hover { background: var(--fg); color: var(--bg); }

/* Nagłówek */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s, color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; color: var(--fg); }
.brand:hover { color: var(--fg); }
.logo { display: block; width: 116px; height: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav ul a { font-weight: 600; text-decoration: none; padding: 6px 0; background: linear-gradient(var(--red), var(--red)) left bottom / 0 2px no-repeat; transition: background-size .3s var(--ease); }
.nav ul a:hover, .nav ul a[aria-current] { color: inherit; background-size: 100% 2px; }
.nav-cta { min-height: 42px; padding: 0 18px; }
.nav-toggle { display: none; }

/* Strona główna: nagłówek nad zdjęciem */
.page-home .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; width: 48px; height: 48px; margin-right: -12px; background: none; border: 0; color: inherit; cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 24px; padding: 24px var(--gutter) 32px; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .25s var(--ease); }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav ul a { display: block; padding: 10px 0; font: 700 1.5rem/1.2 var(--display); }
  .page-home .site-header.nav-open { background: var(--bg); color: var(--fg); }
}

/* ---------- HERO: zdjęcie rodziny rośnie z kadru do pełnego tła ---------- */
.hero { --p: 0; position: relative; height: 210vh; margin-top: calc(-1 * var(--header-h)); }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.hero-photo {
  position: absolute; inset: 0;
  clip-path: inset(calc((var(--header-h) + 24px) * (1 - var(--p))) calc(var(--gutter) * (1 - var(--p))) calc(32px * (1 - var(--p))) calc(48% * (1 - var(--p))) round calc(4px * (1 - var(--p))));
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transform: scale(calc(1.12 - .12 * var(--p))); filter: brightness(calc(1 - .45 * var(--p))) saturate(calc(1 + .1 * var(--p))); }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); opacity: calc(1 - var(--p) * 2.2); transform: translateY(calc(var(--p) * -60px)); }
.hero-title { font-size: clamp(2.75rem, 5.4vw, 5.75rem); font-weight: 900; line-height: .95; letter-spacing: -.025em; max-width: 9.5ch; margin-bottom: .35em; }
@media (min-width: 901px) { .hero-copy > * { max-width: min(36rem, calc(48vw - var(--gutter) - 32px)); } }
.hero-line { display: block; }
.hero-lead { max-width: 34ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.hero-actions .btn-ghost { color: var(--fg); }
.hero-actions .btn-ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.hero-after { position: absolute; left: 0; right: 0; bottom: 14vh; z-index: 2; margin: 0 auto; color: var(--white); font: 700 clamp(1.75rem, 4.4vw, 3.75rem)/1.05 var(--display); letter-spacing: -.015em; opacity: calc((var(--p) - .55) * 3); transform: translateY(calc((1 - var(--p)) * 40px)); }
.hero-roof { position: absolute; left: 50%; bottom: 0; z-index: 3; width: min(560px, 80vw); height: auto; transform: translateX(-50%); overflow: visible; }
.hero-roof path { fill: none; stroke: var(--red); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); }

/* Tekst i nagłówek nad zdjęciem po stronie desktop: lewa połowa biała */
@media (min-width: 901px) {
  .page-home .site-header:not(.is-scrolled) { color: var(--fg); }
}
.page-home .site-header.on-photo:not(.nav-open) { color: var(--white); background: transparent; border-bottom-color: transparent; }
.page-home .site-header.on-photo .brand { color: var(--white); }
.page-home .site-header.on-photo .nav-cta { background: var(--white); color: var(--black); }

/* Hero mobile: zdjęcie u góry, tekst pod nim */
@media (max-width: 900px) {
  .hero { height: 190vh; }
  .hero-photo { clip-path: inset(calc(var(--header-h) * (1 - var(--p))) calc(var(--gutter) * (1 - var(--p))) calc(56% * (1 - var(--p))) calc(var(--gutter) * (1 - var(--p))) round calc(4px * (1 - var(--p)))); }
  .hero-photo img { height: calc(44% + 56% * var(--p)); object-position: 50% 72%; }
  .hero-copy { justify-content: flex-end; padding-bottom: 5vh; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.25rem); }
  .hero-lead { font-size: 1rem; line-height: 1.5; }
  .hero-actions .btn { padding: 0 16px; min-height: 44px; font-size: .9375rem; }
}

/* ---------- Historia w liczbach ---------- */
.story { position: relative; padding: clamp(80px, 12vw, 160px) 0 40px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.story-counter { position: relative; }
.counter-inner { position: sticky; top: calc(var(--header-h) + 8vh); }
.counter-roof { width: clamp(120px, 14vw, 180px); height: auto; overflow: visible; margin-bottom: 8px; }
.counter-roof path { fill: none; stroke-width: 3; stroke-linejoin: miter; }
.roof-track { stroke: var(--line); }
.roof-fill { stroke: var(--red); stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--progress, 0)); transition: stroke-dashoffset .8s var(--ease); }
.counter-num { font: 900 clamp(4.5rem, 12vw, 11rem)/.85 var(--display); letter-spacing: -.04em; color: var(--fg); margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter-unit { font: 700 clamp(1.75rem, 3.6vw, 3rem)/1 var(--display); color: var(--red); margin: .15em 0 .4em; }
.counter-cap { max-width: 26ch; font-size: 1.125rem; color: var(--grey); min-height: 3.3em; }
.counter-num.is-tick, .counter-unit.is-tick, .counter-cap.is-tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: 0; transform: translateY(14px); } }

.story-text { padding-bottom: 20vh; }
.chapter { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.6; max-width: 34em; opacity: .28; transition: opacity .5s; }
.chapter.is-active { opacity: 1; }
.chapter:first-child { min-height: 60vh; justify-content: flex-start; }
.chapter-title { font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.1; margin-bottom: .6em; }
.chapter strong { color: var(--fg); font-weight: 700; }
.chapter-stat { display: none; }
html:not(.js) .chapter { opacity: 1; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-counter { display: none; }
  .chapter { min-height: 0; opacity: 1; padding: 40px 0; border-top: 1px solid var(--line); }
  .chapter:first-child { border-top: 0; padding-top: 0; min-height: 0; }
  .chapter-stat { display: block; margin-bottom: .4em; }
  .chapter-stat strong { display: block; font: 900 clamp(3rem, 15vw, 4.5rem)/.95 var(--display); letter-spacing: -.03em; }
  .chapter-stat { color: var(--grey); font-size: 1rem; }
  .story-text { padding-bottom: 0; }
}

/* Podsumowanie */
.summary { padding: clamp(48px, 8vw, 120px) 0; }
.summary-line { margin: 0; font: 900 clamp(2.25rem, 6.4vw, 6rem)/1 var(--display); letter-spacing: -.03em; color: var(--fg); }
.summary-line span { display: block; }
.summary-line span:nth-child(2) { padding-left: 1.2em; }
.summary-line span:nth-child(3) { padding-left: 2.4em; color: var(--red); }
@media (max-width: 640px) { .summary-line span:nth-child(n) { padding-left: 0; } }

/* Początek: zdjęcie przechodzi z szarości do koloru */
.origin { --o: 0; position: relative; min-height: 100vh; display: grid; align-items: end; overflow: hidden; background: var(--black); color: var(--white); }
.origin-photo { position: absolute; inset: 0; }
.origin-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: grayscale(calc(1 - var(--o))) brightness(calc(.45 + .2 * var(--o))); transform: scale(calc(1.15 - .15 * var(--o))); }
.origin::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.origin-copy { position: relative; z-index: 1; padding-block: 18vh 12vh; }
.origin-text { max-width: 15ch; margin: 0; font: 700 clamp(2.25rem, 5.6vw, 5rem)/1.02 var(--display); letter-spacing: -.02em; color: var(--white); }
.origin-four { color: inherit; box-shadow: inset 0 -.12em 0 var(--red); }

/* Nagłówki sekcji */
.section-head { max-width: 40rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
.section-head p { font-size: 1.125rem; color: var(--grey); margin: 0; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }
.link-more { font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* Oferta: wiersze */
.offer { padding: clamp(80px, 11vw, 160px) 0; }
.offer-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.offer-list a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 40px; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.offer-list a::before { content: ""; position: absolute; inset: 0; background: var(--red); transform: translateY(101%); transition: transform .45s var(--ease); z-index: -1; }
.offer-list li { position: relative; z-index: 0; }
.offer-name { font: 700 clamp(1.5rem, 3vw, 2.5rem)/1.05 var(--display); color: var(--fg); transition: color .3s, transform .45s var(--ease); }
.offer-desc { color: var(--grey); transition: color .3s; }
.offer-arrow { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .45s var(--ease); }
.offer-list a:hover, .offer-list a:focus-visible { color: var(--white); }
.offer-list a:hover::before, .offer-list a:focus-visible::before { transform: none; }
.offer-list a:hover .offer-name, .offer-list a:focus-visible .offer-name { color: var(--white); transform: translateX(16px); }
.offer-list a:hover .offer-desc, .offer-list a:focus-visible .offer-desc { color: var(--white); }
.offer-list a:hover .offer-arrow { transform: translateX(-8px); }
@media (max-width: 700px) {
  .offer-list a { grid-template-columns: 1fr 28px; gap: 4px 12px; padding: 20px 0; }
  .offer-desc { grid-column: 1; }
  .offer-arrow { grid-row: 1 / span 2; grid-column: 2; }
}

/* Konsultacja */
.consult { padding: 0 0 clamp(80px, 11vw, 160px); }
.consult-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.consult-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.consult-copy h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.consult-copy > p { font-size: 1.125rem; max-width: 34em; }
.steps { list-style: none; counter-reset: s; margin: 32px 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 56px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; font: 900 1.75rem/1 var(--display); color: var(--red); }
@media (max-width: 800px) { .consult-grid { grid-template-columns: 1fr; } .consult-photo img { aspect-ratio: 4 / 3; } }

/* Porady: kafle */
.tips { padding: clamp(72px, 9vw, 128px) 0; background: var(--paper); }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.tip { border-top: 3px solid var(--fg); padding-top: 20px; transition: border-color .3s; }
.tip:hover { border-top-color: var(--red); }
.tip h3 { font-size: 1.5rem; line-height: 1.15; }
.tip h3 a { text-decoration: none; }
.tip h3 a::after { content: ""; position: absolute; inset: 0; }
.tip { position: relative; }
.tip p:last-child { color: var(--grey); margin: 0; }
.tip-cat { font-size: .9375rem; font-weight: 700; color: var(--red); margin-bottom: .6em; }
@media (max-width: 860px) { .tips-grid { grid-template-columns: 1fr; } }

/* Oddziały */
.branches { padding: clamp(72px, 9vw, 128px) 0; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--fg); }
.branch-list li { padding: 20px 16px 24px 0; border-bottom: 1px solid var(--line); }
.branch-city { display: block; font: 700 1.375rem/1.2 var(--display); color: var(--fg); margin-bottom: 4px; }
.branch-list a { text-decoration: none; color: var(--grey); }
.branch-list a:hover { color: var(--red); }
@media (max-width: 860px) { .branch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Stopka */
.site-footer { background: var(--black); color: #c9c9c9; padding: 72px 0 32px; font-size: .9375rem; }
.site-footer .brand, .site-footer .brand:hover { color: var(--white); }
.site-footer .logo { width: 132px; margin-bottom: 16px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid #2c2c2c; }
.footer-brand p { max-width: 26ch; }
.footer-nav h2 { color: var(--white); font-size: 1.0625rem; margin-bottom: 14px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--white); }
.footer-branches span { display: inline-block; min-width: 7.5em; color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; color: #8a8a8a; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Podstrony ---------- */
.crumbs { font-size: .9375rem; color: var(--grey); margin-bottom: 24px; }
.crumbs a { text-decoration: none; }
.crumbs span[aria-hidden] { margin: 0 6px; color: #b5b5b5; }
.page-hero { position: relative; padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.page-hero-plain { padding-bottom: clamp(40px, 5vw, 64px); }
.page-title { font-size: clamp(2.75rem, 7vw, 6rem); font-weight: 900; line-height: .95; letter-spacing: -.03em; max-width: 14ch; }
.page-lead { max-width: 38em; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); color: var(--ink); margin: 0; }
.page-hero-roof { position: absolute; right: -8vw; bottom: -2px; width: 48vw; aspect-ratio: 2.4; background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .95; z-index: -1; transform: translateY(calc(var(--sy, 0) * .15px)); }
@media (max-width: 760px) { .page-hero-roof { width: 80vw; right: -20vw; opacity: .12; } }

/* Oferta */
.cats { padding-bottom: clamp(72px, 9vw, 128px); }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.cat { background: var(--bg); }
.cat a { display: flex; flex-direction: column; height: 100%; min-height: 220px; padding: 28px; text-decoration: none; transition: background .3s, color .3s; }
.cat a:hover { background: var(--fg); color: var(--bg); }
.cat a:hover .cat-name { color: var(--bg); }
.cat a:hover .cat-desc { color: #bdbdbd; }
.cat-name { font: 700 1.625rem/1.1 var(--display); color: var(--fg); margin-top: auto; margin-bottom: 8px; transition: color .3s; }
.cat-desc { color: var(--grey); transition: color .3s; }
.cat-feat { grid-row: span 2; }
.cat-feat a { min-height: 460px; background: var(--black); color: var(--white); position: relative; overflow: hidden; }
.cat-feat .cat-name { color: var(--white); font-size: 2.25rem; position: relative; }
.cat-feat .cat-desc { color: #c9c9c9; position: relative; }
.cat-img { position: absolute; inset: 0; background: url("../img/dachowki/klassik-01-01.png") 0 0 / 49px 100px; opacity: .5; transform: rotate(-8deg) scale(1.3); transition: opacity .4s, transform 1.2s var(--ease); }
.cat-feat a:hover .cat-img { opacity: .75; transform: rotate(-8deg) scale(1.4); }
.cat-feat a:hover { background: var(--black); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr 1fr; } .cat-feat { grid-column: span 2; grid-row: auto; } .cat-feat a { min-height: 320px; } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } .cat-feat { grid-column: auto; } .cat a { min-height: 0; } }

.compare { padding: 0 0 clamp(72px, 9vw, 128px); }
.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 1.0625rem; }
.compare-table th, .compare-table td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font: 700 1.25rem/1.2 var(--display); color: var(--fg); border-bottom: 2px solid var(--fg); }
.compare-table tbody th { font-weight: 600; color: var(--grey); width: 26%; }

.process { padding: clamp(72px, 9vw, 128px) 0; background: var(--black); color: #d0d0d0; }
.process .section-head h2 { color: var(--white); }
.process-list { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.process-list li { counter-increment: p; border-top: 2px solid #333; padding-top: 20px; position: relative; }
.process-list li::before { content: counter(p); display: block; font: 900 3.5rem/1 var(--display); color: var(--red); margin-bottom: 12px; }
.process-list li::after { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--red); transition: width 1s var(--ease) .2s; }
.process-list li.is-in::after { width: 100%; }
.process-list h3 { color: var(--white); font-size: 1.5rem; }
@media (max-width: 860px) { .process-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process-list { grid-template-columns: 1fr; } }

.brands { padding: clamp(64px, 8vw, 112px) 0; }
.brands-title { font-size: 1.25rem; color: var(--grey); font-family: var(--body); font-weight: 600; }
.brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 40px; font: 700 clamp(1.5rem, 3.2vw, 2.5rem)/1.3 var(--display); color: var(--fg); }
.brand-list li { transition: color .2s; }
.brand-list li:hover { color: var(--red); }

.cta-band { position: relative; overflow: hidden; background: var(--black); color: var(--white); }
.cta-photo { position: absolute; inset: 0; }
.cta-photo img { width: 100%; height: 130%; object-fit: cover; object-position: 50% 30%; opacity: .45; transform: translateY(calc(var(--py, 0) * 1px)); }
.cta-copy { position: relative; padding-block: clamp(96px, 14vw, 200px); }
.cta-copy h2 { color: var(--white); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; }
.cta-copy p { font-size: 1.1875rem; max-width: 30em; }

/* Produkt */
.product { padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 8vw, 112px); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.product-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.roof-preview { aspect-ratio: 1; background: var(--tile) 0 0 / 49px 100px; border-radius: 2px; position: relative; overflow: hidden; transition: background-image .2s; clip-path: polygon(0 28%, 50% 0, 100% 28%, 100% 100%, 0 100%); animation: roof-in 1.2s var(--ease) both; }
.roof-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.18), transparent 45%, rgba(0,0,0,.28)); }
.roof-preview.is-swap { animation: swap .5s var(--ease); }
@keyframes roof-in { from { clip-path: polygon(0 100%, 50% 100%, 100% 100%, 100% 100%, 0 100%); } }
@keyframes swap { from { filter: brightness(1.6) blur(2px); } }
.roof-note { font-size: .875rem; color: var(--grey); margin-top: 12px; }
.product-brand { font-weight: 700; color: var(--red); margin-bottom: 4px; }
.product-title { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; letter-spacing: -.03em; line-height: .9; }
.product-lead { font-size: 1.1875rem; }
.swatches { border: 0; margin: 28px 0; padding: 0; }
.swatches legend { padding: 0; margin-bottom: 12px; font-weight: 600; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch img { width: 49px; height: 100px; object-fit: cover; border-radius: 2px; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .2s; }
.swatch:hover img { transform: translateY(-3px); }
.swatch input:checked + img { outline-color: var(--fg); }
.swatch input:focus-visible + img { outline-color: var(--red); }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.specs { margin: 0; border-top: 2px solid var(--fg); }
.specs div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--grey); }
.specs dd { margin: 0; font-weight: 600; }
.product-more { padding: clamp(64px, 8vw, 112px) 0; background: var(--paper); }
.product-more-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.downloads h2 { font-size: 1.5rem; }
.downloads ul { list-style: none; margin: 0 0 12px; padding: 0; border-top: 2px solid var(--fg); }
.downloads a { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.downloads small { color: var(--red); font-weight: 700; }
@media (max-width: 860px) { .product-grid, .product-more-grid { grid-template-columns: 1fr; } .product-visual { position: static; } .roof-preview { aspect-ratio: 4 / 3; } }

/* Treść długa */
.prose { font-size: 1.125rem; line-height: 1.7; }
.prose h2 { font-size: clamp(1.625rem, 2.6vw, 2.125rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--red); }
.prose blockquote { margin: 2em 0; padding: 0 0 0 28px; border-left: 4px solid var(--red); font: 700 clamp(1.375rem, 2.4vw, 1.75rem)/1.3 var(--display); color: var(--fg); }
.prose blockquote p { margin: 0; }

/* Lista artykułów */
.list { padding-bottom: clamp(72px, 9vw, 128px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.chip { min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); font: 600 .9375rem/1 var(--body); color: var(--ink); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.lead-article { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: 56px; position: relative; }
.lead-img { display: block; overflow: hidden; border-radius: 2px; }
.lead-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 65%; transition: transform 1.2s var(--ease); }
.lead-article:hover .lead-img img { transform: scale(1.04); }
.lead-copy h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
.lead-copy h2 a { text-decoration: none; }
.lead-copy h2 a::after { content: ""; position: absolute; inset: 0; }
.article-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.article-list li { border-top: 1px solid var(--line); padding: 28px 0; }
.article-list article { position: relative; }
.article-list h2 { font-size: 1.625rem; line-height: 1.15; }
.article-list h2 a { text-decoration: none; }
.article-list h2 a::after { content: ""; position: absolute; inset: 0; }
.article-list p { margin-bottom: .5em; }
.article-list li:hover h2 { color: var(--red); }
.lead-article[hidden], .article-list li[hidden] { display: none; }
.empty { font-size: 1.125rem; }
@media (max-width: 760px) { .lead-article, .article-list { grid-template-columns: 1fr; } }

/* Artykuł */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.read-progress span { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }
.article-head { padding: clamp(32px, 5vw, 56px) 0 40px; }
.article-title { font-size: clamp(2.25rem, 5.2vw, 4rem); font-weight: 900; letter-spacing: -.025em; line-height: 1; }
.article-lead { font-size: 1.3125rem; color: var(--ink); }
.author { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.author p { margin: 0; font-size: .9375rem; }
.author-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--black); flex: none; }
.author-mark svg { width: 24px; fill: none; stroke: var(--red); stroke-width: 3.5; }
.article-figure { margin: 0 auto 56px; max-width: 1400px; padding-inline: var(--gutter); }
.article-figure img { width: 100%; max-height: 72vh; object-fit: cover; object-position: 50% 60%; }
.article-body { padding-bottom: 72px; }
.callout { margin-top: 56px; padding: 32px; background: var(--black); color: #d0d0d0; border-radius: 2px; }
.callout h2 { color: var(--white); margin-top: 0; }
.related { padding: clamp(64px, 8vw, 112px) 0; background: var(--paper); }
.related h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 32px; }

/* Kontakt */
.contact { padding-bottom: clamp(72px, 9vw, 128px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-sub { font-size: 1.25rem; font-family: var(--body); font-weight: 600; color: var(--grey); }
.contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--fg); }
.contact-list li { padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); }
.contact-list h3 { font-size: 1.5rem; margin-bottom: 6px; }
.contact-list p { margin: 0 0 2px; }
.contact-list a { text-decoration: none; }
.contact-list p:nth-of-type(1) a { font-weight: 700; font-size: 1.125rem; }
.contact-list .muted { font-size: .875rem; margin-top: 6px; }
.form-wrap { position: sticky; top: calc(var(--header-h) + 24px); }
.form { background: var(--paper); padding: clamp(24px, 3vw, 40px); border-top: 4px solid var(--red); }
.form h2 { font-size: 2rem; margin-bottom: .2em; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field-line); border-radius: 2px; background: var(--bg); font: inherit; color: var(--ink); transition: border-color .2s; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(237,28,36,.25); }
.field-err { display: none; color: var(--red-dark); font-size: .9375rem; margin: 6px 0 0; }
.is-invalid .field-err, .field-err.is-shown { display: block; }
.is-invalid input, .is-invalid select, .is-invalid textarea { border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; margin: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.form .btn { width: 100%; margin-top: 16px; }
.form-ok { margin: 16px 0 0; padding: 12px 16px; background: var(--bg); border-left: 4px solid var(--fg); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .form-wrap { position: static; } }
@media (max-width: 520px) { .contact-list { grid-template-columns: 1fr; } }

/* Pojawianie się elementów */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .summary-line[data-reveal] { opacity: 1; transform: none; }
.js .summary-line span { opacity: 0; transform: translateX(-40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .summary-line.is-in span { opacity: 1; transform: none; }
.js .summary-line.is-in span:nth-child(2) { transition-delay: .15s; }
.js .summary-line.is-in span:nth-child(3) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .summary-line span { opacity: 1; transform: none; }
  .hero { height: auto; }
  .hero-stage { position: relative; }
}
@media (min-width: 901px) { .hero-copy > .hero-title { max-width: 8.2ch; } }

/* Dachówki w układzie mijankowym: druga warstwa przesunięta o pół dachówki */
.roof-preview { background: var(--tile) 24.5px 50px / 49px 100px, var(--tile) 0 0 / 49px 100px, #2b211c; }
.cat-img { background: url("../img/dachowki/klassik-01-01.png") 24.5px 50px / 49px 100px, url("../img/dachowki/klassik-01-01.png") 0 0 / 49px 100px; }
.cat-feat a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 20%, rgba(0,0,0,.85)); }
.cat-feat .cat-name, .cat-feat .cat-desc { z-index: 1; }

/* Historia: większe zdanie wiodące w rozdziale */
.chapter-lead { font: 700 clamp(1.625rem, 2.8vw, 2.5rem)/1.15 var(--display); letter-spacing: -.01em; color: var(--fg); margin-bottom: .5em; }
.chapter-lead strong { color: var(--red); }

/* Rozdział z rodziną: pod daszkiem rysunek zamiast liczby */
.counter-family { display: none; width: clamp(240px, 26vw, 380px); height: auto; margin-top: -6px; color: var(--fg); }
.story-counter.is-family .counter-family { display: block; }
.story-counter.is-family .counter-num, .story-counter.is-family .counter-unit, .story-counter.is-family .counter-cap { display: none; }
.family .fam > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.family .fam > *:nth-child(n+5) { transition-delay: .25s; }
.family .fam > *:nth-child(n+8) { transition-delay: .45s; }
.family .fam > *:nth-child(n+11) { transition-delay: .65s; }
.story-counter.is-family .counter-family .fam > *, .is-in .chapter-family-svg .fam > *, .chapter-family-svg.is-in .fam > * { stroke-dashoffset: 0; }
.fam-roof { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.is-in .fam-roof { stroke-dashoffset: 0; }
.chapter-family-svg { width: min(300px, 80%); height: auto; color: var(--fg); }
.chapter-family .chapter-lead { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
@media (prefers-reduced-motion: reduce) { .family .fam > *, .fam-roof { stroke-dashoffset: 0; } }

/* Początki: trzy kadry nasuwające się na siebie */
.origins { position: relative; }
.origins .origin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
.origin-photo-old img { object-position: 50% 55%; filter: grayscale(calc(1 - var(--o))) sepia(calc(.35 * (1 - var(--o)))) brightness(calc(.42 + .18 * var(--o))); }
.origin-dream .origin-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.dream { margin: 0; color: var(--white); }
.dream-here { display: block; margin-top: .25em; padding-left: 2.2%; font: 700 clamp(1.75rem, 4.2vw, 3.75rem)/1 var(--display); letter-spacing: -.02em; }
.counter-roof { transition: width .6s var(--ease); }
.story-counter.is-family .counter-roof { width: clamp(240px, 26vw, 380px); margin-bottom: -18px; }
.origins .origin { align-items: center; }
.origins .origin-copy { padding-block: calc(var(--header-h) + 4vh) 4vh; }
.origins .origin::after { inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.1) 70%); }
.origins .origin::after { background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.05) 85%); }
.origins .origin-text { text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.origins .origin-dream { align-items: start; }
.origins .origin-dream::after { background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,0) 60%); }
.origin-dream .origin-photo img { object-position: 50% 78%; }
.origins .origin-dream .origin-copy { padding-top: calc(var(--header-h) + 6vh); }
@media (min-width: 901px) {
  .origins .origin-dream { align-items: center; background: var(--black); }
  .origin-dream .origin-photo { left: 46%; }
  .origin-dream .origin-photo img { object-position: 50% 70%; }
  .origins .origin-dream::after { background: linear-gradient(90deg, var(--black) 46%, rgba(0,0,0,0) 62%); }
  .origins .origin-dream .origin-copy { padding-top: var(--header-h); }
}

/* Panoramiczne zdjęcie rodziny (2000×788): rodzina stoi w ok. 40% szerokości kadru */
@media (min-width: 901px) {
  .hero-photo img { object-position: 40% 70%; }
  .origins .origin-dream { align-items: start; justify-items: end; }
  .origin-dream .origin-photo { left: 0; }
  .origin-dream .origin-photo img { object-position: 40% 75%; }
  .origins .origin-dream::after { background: linear-gradient(250deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 65%); }
  .origins .origin-dream .origin-copy { padding-top: calc(var(--header-h) + 10vh); align-items: flex-end; text-align: right; }
  .origin-dream .dream-here { padding-left: 0; }
}
.lead-img img { object-position: 40% 70%; }
.article-figure img { object-position: 40% 65%; }
@media (min-width: 901px) {
  /* Na starcie widać tylko prawą połowę ekranu: przesuwamy panoramę, by rodzina była w kadrze */
  .hero-photo img { object-position: calc(40% * var(--p)) 70%; transform: translateX(calc(12vw * (1 - var(--p)))) scale(calc(1.12 - .12 * var(--p))); }
}

/* Wyróżnienia na czerwono w tekście historii */
.red { color: var(--red); font-style: normal; }
.chapter strong.red { color: var(--red); }

/* Hero: dłuższe hasło w trzech liniach */
.hero-title { font-size: clamp(2.5rem, 4.6vw, 5rem); }
@media (min-width: 901px) { .hero-copy > .hero-title { max-width: 11ch; } }
@media (max-width: 900px) { .hero-title { font-size: clamp(2rem, 9vw, 3rem); } }

/* Sylwetka rodziny: wyłania się spod daszka */
.family .fam { fill: var(--fg); }
.family .fam .fam-gap { display: none; }
.family .fam-holes .fam-gap { fill: #000; }
.family .fam > * { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
.family .fam { opacity: 0; transform: translateY(6%); transition: opacity .5s var(--ease) .2s, transform .6s var(--ease) .2s; }
.story-counter.is-family .counter-family .fam, .is-in .chapter-family-svg .fam { opacity: 1; transform: none; }
.counter-family { margin-top: -10px; }
.story-counter.is-family .counter-roof { margin-bottom: -4px; }
@media (prefers-reduced-motion: reduce) { .family .fam { opacity: 1; transform: none; } }

/* Kadry ze zdjęciami: jaśniej, tekst czytelny dzięki cieniowi */
.origin-photo-old img { filter: grayscale(calc(1 - var(--o))) sepia(calc(.3 * (1 - var(--o)))) brightness(calc(.8 + .2 * var(--o))); }
.origin-dream .origin-photo img { filter: none; transform: scale(calc(1.08 - .08 * var(--o))); }
.origins .origin::after { background: linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.18) 40%, rgba(0,0,0,0) 70%); }
.origins .origin-text, .dream { text-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 40px rgba(0,0,0,.45); }
@media (min-width: 901px) {
  .origins .origin-dream::after { background: linear-gradient(250deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,0) 65%); }
}
@media (max-width: 900px) {
  .origins .origin-dream::after { background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.1) 45%, rgba(0,0,0,0) 60%); }
}
@media (min-width: 901px) {
  .hero-copy > .hero-title { max-width: none; font-size: clamp(2.25rem, 3.9vw, 4.25rem); }
  .hero-line { white-space: nowrap; }
}

/* Rodzina z własnym daszkiem: zamiast małego daszka licznika */
.story-counter.is-family .counter-roof { display: none; }
.counter-family { width: clamp(280px, 30vw, 440px); margin-top: 0; }
.fam-roof { stroke-width: 6; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.story-counter.is-family .fam-roof { stroke-dashoffset: 0; }
.chapter-family-svg { width: min(320px, 86%); }

/* Hero (desktop): zdjęcie układane w ramce zamiast przycinania. Ramka rośnie z prawej połowy
   do pełnego ekranu, a kadr trzyma rodzinę (ok. 41% szerokości panoramy) w polu widzenia. */
@media (min-width: 901px) {
  .hero-photo { clip-path: none; }
  .hero-photo img {
    position: absolute; width: auto; height: auto;
    top: calc((var(--header-h) + 24px) * (1 - var(--p)));
    left: calc(48% * (1 - var(--p)));
    right: calc(var(--gutter) * (1 - var(--p)));
    bottom: calc(32px * (1 - var(--p)));
    border-radius: calc(4px * (1 - var(--p)));
    object-position: 41% 72%;
    transform: none;
  }
  /* Hasło zawsze mieści się w lewej połowie: najdłuższa linia ma ok. 7,8 em */
  .hero-copy > .hero-title { font-size: max(2rem, min(4.25rem, calc((48vw - var(--gutter) - 40px) / 7.8))); }
}
@media (min-width: 901px) { .hero-photo img { object-position: calc(36% + 5% * var(--p)) 72%; } }
@media (min-width: 901px) {
  .hero-photo img {
    width: calc(100% - 48% * (1 - var(--p)) - var(--gutter) * (1 - var(--p)));
    height: calc(100% - (var(--header-h) + 24px + 32px) * (1 - var(--p)));
    right: auto; bottom: auto;
  }
}
@media (min-width: 901px) {
  /* Szerokość lewej kolumny liczona od faktycznego początku tekstu (kontener jest wyśrodkowany) */
  .hero-copy > .hero-title { font-size: max(2rem, min(4.25rem, calc((48vw - max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter)) - 48px) / 7.8))); }
}
@media (min-width: 901px) {
  /* Podpis po rozwinięciu zdjęcia: po prawej, żeby nie zasłaniał rodziny */
  .hero-after { text-align: right; text-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 40px rgba(0,0,0,.35); }
}
@media (min-width: 901px) { .hero-after { font-size: clamp(1.5rem, 2.6vw, 2.75rem); padding-left: 45vw; } }
@media (min-width: 901px) { .hero-after { padding-left: 36vw; } }
@media (min-width: 901px) {
  /* Podpis: stała szerokość, dosunięty do prawej krawędzi treści, niezależnie od szerokości ekranu */
  .hero-after {
    left: auto; right: max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter));
    width: min(36rem, 44vw); max-width: none; margin: 0; padding: 0;
  }
}
@media (min-width: 901px) { .hero-after { width: min(42rem, 46vw); } }
@media (min-width: 901px) { .hero-after { width: min(46rem, 50vw); font-size: clamp(1.5rem, 2.1vw, 2.25rem); } }
@media (min-width: 901px) { .hero-after { bottom: auto; top: calc(var(--header-h) + 12vh); } }

/* Przejście liczba ⇄ rodzina: dwie warstwy w tym samym miejscu, przenikanie zamiast przełączania */
.counter-inner { display: grid; }
.counter-numbers, .counter-inner > .counter-family { grid-area: 1 / 1; align-self: start; }
.counter-numbers { transition: opacity .45s var(--ease), transform .45s var(--ease); }
.story-counter.is-family .counter-numbers { opacity: 0; transform: translateY(-14px); }
.story-counter.is-family .counter-numbers .counter-roof { display: block; }
.story-counter.is-family .counter-numbers .counter-num,
.story-counter.is-family .counter-numbers .counter-unit,
.story-counter.is-family .counter-numbers .counter-cap { display: block; }

.counter-inner > .counter-family { display: block; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }
.counter-family .fam { opacity: 0; transform: translateY(8%); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.counter-family .fam-roof { stroke-dashoffset: 1; transition: stroke-dashoffset .3s var(--ease); }
.story-counter.is-family .counter-inner > .counter-family { opacity: 1; visibility: visible; transition: opacity .3s var(--ease) .2s; }
.story-counter.is-family .counter-family .fam-roof { stroke-dashoffset: 0; transition: stroke-dashoffset .6s var(--ease) .1s; }
/* rodzina pojawia się razem z dachem (wcześniej po 0,9 s, więc przy szybkim przewijaniu można było ją minąć) */
.story-counter.is-family .counter-family .fam { opacity: 1; transform: none; transition: opacity .5s var(--ease) .3s, transform .6s var(--ease) .3s; }
@media (prefers-reduced-motion: reduce) { .counter-family .fam, .counter-family .fam-roof, .counter-numbers { transition: none; } }
.story-counter.is-family .counter-numbers .counter-roof { width: clamp(120px, 14vw, 180px); margin-bottom: 8px; }
.chapter-aside { display: block; margin-bottom: .2em; font: 700 1.125em/1.2 var(--display); color: var(--red); }
/* Rozdział z rodziną: łamanie wierszy jest ręczne, więc krój dopasowuje się do szerokości kolumny */
.story-text { container-type: inline-size; }
.chapter-family .chapter-lead { font-size: max(1.125rem, min(2.25rem, 5.1cqi)); }
/* Rozdział „co 3. dach”: liczba w kolorze antracytu */
.story-counter[data-tone="anthracite"] .counter-num { color: #383E42; }
/* Hero: ręczne łamanie wierszy tylko na szerszych ekranach */
@media (min-width: 901px) { .hero-copy > .hero-lead { max-width: none; white-space: nowrap; font-size: clamp(1rem, 1.35vw, 1.25rem); } }
@media (max-width: 900px) { .br-wide { display: none; } }
/* Pierwszy rozdział: wjeżdża z dołu i dosuwa się na miejsce wraz z przewijaniem */
@media (min-width: 901px) {
  .chapter:first-child { padding-top: 10vh; transform: translateY(calc(var(--enter, 1) * 140px)); opacity: calc(.25 + .75 * (1 - var(--enter, 1))); transition: none; }
}
@media (prefers-reduced-motion: reduce) { .chapter:first-child { transform: none; opacity: 1; } }
/* „1/3 dachów” mniejsze niż pozostałe liczby */
.story-counter[data-tone="anthracite"] .counter-num { font-size: clamp(3.5rem, 8vw, 7.5rem); }
/* Pierwszy rozdział: podwójne obniżenie (start i miejsce docelowe) */
@media (min-width: 901px) {
  .chapter:first-child { padding-top: 20vh; transform: translateY(calc(var(--enter, 1) * 280px)); }
}

/* =====================================================================
   Komponenty serwisu (oferta, produkty, listy, kontakt, formularze)
   ===================================================================== */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-tight { padding-top: 8px; }
.section-paper { background: var(--paper); }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.25rem); margin: 0 0 24px; }
.wrap-mid { max-width: calc(880px + 2 * var(--gutter)); }
.center { text-align: center; margin-top: 32px; }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.empty { font-size: 1.0625rem; padding: 24px 0; }
.page-kicker { font-weight: 700; color: var(--red); margin-bottom: 8px; }
.page-lead p:last-child { margin-bottom: 0; }
.page-lead { max-width: 46em; }
.lang-note { margin: 16px 0 0; padding: 12px 16px; background: var(--paper); border-left: 4px solid var(--red); font-size: .9375rem; }

/* Nagłówek: narzędzia, język */
.nav-tools { display: flex; align-items: center; gap: 14px; }
.nav-search { display: grid; place-items: center; width: 40px; height: 40px; color: inherit; }
.nav-search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; font: 700 .9375rem/1 var(--display); padding: 10px 8px; border: 1.5px solid currentColor; border-radius: 2px; min-width: 44px; text-align: center; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; list-style: none; margin: 0; padding: 8px 0; min-width: 170px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.lang-switch li a { display: block; padding: 8px 16px; text-decoration: none; background: none !important; }
.lang-switch li a[aria-current] { color: var(--red); font-weight: 700; }
.nav ul a { white-space: nowrap; }
@media (max-width: 1180px) { .nav ul { gap: 18px; } .nav { gap: 20px; } .nav-cta { display: none; } }
@media (max-width: 900px) {
  .nav-tools { justify-content: space-between; flex-wrap: wrap; }
  .nav-cta { display: inline-flex; }
  .lang-switch ul { position: static; box-shadow: none; display: flex; flex-wrap: wrap; border: 0; padding: 8px 0 0; }
}

/* Kafle */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.card { background: var(--bg); }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); transition: background .25s, color .25s; }
.card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cards-products .card-img img { object-fit: contain; padding: 12px; background: var(--bg); }
.card-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, transparent 49.5%, var(--line) 50%, transparent 50.5%) 0 0 / 28px 28px; }
.card-title { display: block; padding: 16px 18px 6px; font: 700 1.1875rem/1.2 var(--display); color: var(--fg); }
.card-lead { display: block; padding: 0 18px 18px; color: var(--grey); font-size: .9375rem; }
.card a:hover .card-img img, .card a:focus-visible .card-img img { transform: scale(1.05); }
.card a:hover .card-title { color: var(--red); }
.cards-small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cards-small .card-title { font-size: 1.0625rem; padding-bottom: 16px; }

/* Kategoria */
.cat-layout { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.cat-side { position: sticky; top: calc(var(--header-h) + 20px); font-size: .9688rem; }
.cat-back { display: inline-block; margin-bottom: 14px; font-weight: 700; text-decoration: none; }
.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree > li { border-top: 1px solid var(--line); }
.cat-tree > li > a { display: block; padding: 10px 0; text-decoration: none; font-weight: 600; }
.cat-tree li.is-current > a { color: var(--red); }
.cat-tree ul { padding: 0 0 10px 14px; border-left: 2px solid var(--red); margin-bottom: 8px; }
.cat-tree ul a { display: block; padding: 5px 0; text-decoration: none; color: var(--grey); }
.cat-tree ul a:hover { color: var(--red); }
.cat-main > * + * { margin-top: 40px; }
.cat-body { max-width: 50em; }
@media (max-width: 860px) { .cat-layout { grid-template-columns: 1fr; } .cat-side { position: static; } }

/* Produkt */
.product-visual { min-width: 0; }
.gallery-main { margin: 0; background: var(--bg); border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; cursor: zoom-in; overflow: hidden; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.gallery-thumbs button { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 2px solid var(--line); background: var(--bg); cursor: pointer; overflow: hidden; }
.gallery-thumbs button[aria-current] { border-color: var(--fg); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { aspect-ratio: 1; background: var(--paper) linear-gradient(135deg, transparent 49.5%, var(--line) 50%, transparent 50.5%) 0 0 / 34px 34px; }
.product-logo { height: 56px; width: auto; margin-bottom: 16px; }
.product-title-sm { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.05; }
.product-lead { margin: 16px 0 24px; }
.product-back { margin-top: 20px; }
.product-back a { font-weight: 700; text-decoration: none; }
.product-sections > * + * { margin-top: 40px; }
.product-section.has-img { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: start; }
.product-section img { width: 100%; border-radius: 2px; }
@media (max-width: 760px) { .product-section.has-img { grid-template-columns: 1fr; } }
.price { font: 700 1.5rem/1 var(--display); color: var(--red); }

/* Treść z CMS */
.prose img { max-width: 100%; height: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .9688rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper); }
.prose a { color: var(--red-dark); }
.prose iframe { max-width: 100%; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose h3 { font-size: 1.375rem; margin-top: 1.4em; }

/* Pliki */
.downloads ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.downloads li a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.downloads small { color: var(--red); font-weight: 700; white-space: nowrap; }

/* Listy */
.list { padding: 0 0 clamp(64px, 8vw, 112px); }
.list-intro { max-width: 46em; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
a.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9375rem; color: var(--ink); }
a.chip:hover { border-color: var(--fg); color: var(--ink); }
a.chip[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-top: 1px solid var(--line); padding: 28px 0; }
.article-list article { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px; position: relative; align-items: start; }
.article-list article:not(:has(.al-img)) { grid-template-columns: 1fr; }
.al-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 2px; }
.article-list h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.15; margin-bottom: .4em; }
.article-list h2 a { text-decoration: none; }
.article-list h2 a::after { content: ""; position: absolute; inset: 0; }
.article-list li:hover h2 { color: var(--red); }
.article-list li.lead-item article { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.article-list li.lead-item h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
@media (max-width: 700px) { .article-list article, .article-list li.lead-item article { grid-template-columns: 1fr; } }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 32px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 700; }
.pager span[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pager .gap { border: 0; }
.home-news-head { margin-top: clamp(48px, 6vw, 80px); }

/* Outlet */
.outlet-search, .search-form { display: flex; gap: 10px; margin: 0 0 16px; max-width: 640px; }
.outlet-search input, .search-form input { flex: 1; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field-line); border-radius: 2px; font: inherit; }
.outlet-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.outlet-table th, .outlet-table td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.outlet-table thead th { font: 700 1rem/1.2 var(--display); border-bottom: 2px solid var(--fg); }
.outlet-table tbody th { font-weight: 600; }
.outlet-table tbody th a { text-decoration: none; }
.outlet-table td:nth-child(2) { font-weight: 700; color: var(--red-dark); }
.table-scroll { overflow-x: auto; }
/* filtr na żywo (main.js dodaje .is-live): bez przycisku „Szukaj”, z własnym przyciskiem czyszczenia pola */
.outlet-field { position: relative; display: flex; flex: 1; min-width: 0; }
.outlet-field input { width: 100%; min-width: 0; }
.outlet-search.is-live .outlet-submit { display: none; }
.outlet-search.is-live input { padding-right: 52px; }
.outlet-search.is-live input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.outlet-clear { position: absolute; top: 50%; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--grey); font: 400 1.75rem/1 var(--body); cursor: pointer; transform: translateY(-50%); transition: color .2s, background-color .2s; }
.outlet-clear:hover { color: var(--red); background: color-mix(in srgb, currentColor 9%, transparent); }
.outlet-clear span { margin-top: -2px; }
.outlet-count { margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.outlet-empty { max-width: 640px; margin: 8px 0 0; padding: 20px 24px; background: var(--paper); border-left: 4px solid var(--red); animation: outlet-in .3s var(--ease); }
.outlet-empty .empty { margin: 0; padding: 0; color: var(--fg); font-weight: 600; overflow-wrap: anywhere; }
.outlet-empty .empty + p { margin: 16px 0 0; }
.outlet-more { margin: 28px 0 0; }
.outlet-clear[hidden], .outlet-empty[hidden], .outlet-more[hidden], .outlet-list .pager[hidden] { display: none; }
@keyframes outlet-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 520px) { .outlet-empty { padding: 16px 18px; } .outlet-more .btn { width: 100%; } }

/* Mapa */
.map-box { position: relative; }
.map { height: var(--map-h, 520px); min-height: 320px; background: #e9eef0; border-radius: 2px; overflow: hidden; z-index: 0; }
.map-fallback { padding: 24px; }
.map-pin { background: none; border: 0; }
.map-pin svg { display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.map-all { background: var(--bg); border: 2px solid var(--fg); font: 700 .875rem/1 var(--display); padding: 9px 12px; cursor: pointer; }
.map-panel { position: absolute; left: 16px; bottom: 16px; z-index: 500; width: min(340px, calc(100% - 32px)); background: var(--bg); padding: 20px 22px 16px; box-shadow: 0 16px 40px rgba(0,0,0,.2); border-top: 4px solid var(--red); }
.map-panel h3 { font-size: 1.5rem; margin: 0 0 4px; }
.map-panel p { margin: 0 0 6px; }
.map-panel a { text-decoration: none; }
.map-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px !important; }
.map-panel-actions .btn { min-height: 40px; padding: 0 14px; font-size: .875rem; }
.map-panel .dlg-close { top: 6px; right: 6px; }
.leaflet-container { font: inherit; }

/* Kontakt */
.contact-map-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact-sub { font: 700 1.25rem/1.2 var(--display); margin: 0 0 12px; }
.contact-places .contact-sub:not(:first-child) { margin-top: 28px; }
.place-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.place-list a { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.place-list strong { font: 700 1.125rem/1.2 var(--display); color: var(--fg); }
.place-list span { color: var(--grey); font-size: .9375rem; }
.place-list a:hover strong { color: var(--red); }
.place-list-partners strong { font-size: 1rem; }
.person-box { max-width: 52em; margin-bottom: 28px; }
.traders { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.traders li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; background: var(--bg); padding: 18px; }
.traders img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.trader-region { font-weight: 700; color: var(--red); margin-bottom: 4px; }
.place-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.place-card { border-top: 4px solid var(--red); background: var(--paper); padding: 24px; }
.place-addr { font-size: 1.0625rem; }
.place-tel a { display: inline-block; margin: 0 14px 6px 0; font-weight: 700; font-size: 1.125rem; text-decoration: none; }
/* punkt partnerski 4D Grupa */
.place-4d { float: right; margin: 0 0 12px 16px; line-height: 0; }
.place-4d img { width: 96px; height: auto; }
.place-www a { font-weight: 700; overflow-wrap: anywhere; }
.contact-4d { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--grey); font-size: .875rem; }
.contact-4d img { width: 64px; height: auto; flex: none; }
.contact-4d { margin: 0 0 12px; }
.place-region { border-bottom: 1px solid var(--line); }
.place-region summary { padding: 10px 0; cursor: pointer; font-weight: 700; }
.place-region summary span { color: var(--grey); font-weight: 400; }
.place-region .place-list { border-top: 0; margin-bottom: 8px; }
.gmap { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
@media (max-width: 860px) { .contact-map-grid, .place-grid { grid-template-columns: 1fr; } .gmap { min-height: 320px; } }

/* Formularze i okna */
.form { background: var(--paper); padding: clamp(22px, 3vw, 36px); border-top: 4px solid var(--red); }
.dlg .form { background: none; padding: 0; border: 0; }
.form h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input:not([type=checkbox]), .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field-line); border-radius: 2px; background: var(--bg); font: inherit; color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(237,28,36,.25); }
.field-err { color: var(--red-dark); font-size: .9375rem; margin: 6px 0 0; }
.field-err:empty { display: none; }
.is-invalid input, .is-invalid textarea, .is-invalid select { border-color: var(--red) !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[type=submit] { width: 100%; margin-top: 8px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-top: 4px solid var(--red); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(0,0,0,.55); }
.dlg-in { padding: clamp(24px, 4vw, 40px); }
.dlg-in h2 { font-size: clamp(1.5rem, 3vw, 2rem); padding-right: 32px; }
.dlg-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--fg); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox img { width: min(92vw, 90vh); max-width: 92vw; height: auto; max-height: 90vh; object-fit: contain; display: block; } /* także miniatura przed wczytaniem dużej wersji jest powiększona */
.lightbox .dlg-close { color: var(--white); position: fixed; top: 12px; right: 16px; }

/* Poznaj nas */
.subnav { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 28px; flex-wrap: wrap; }
.subnav a { display: block; padding: 14px 0; text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; }
.subnav a[aria-current] { border-color: var(--red); color: var(--fg); }
.about-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: 32px 0; border-top: 1px solid var(--line); }
.about-block:first-child { border-top: 0; }
.about-block.is-rev > :first-child { order: 2; }
.about-img { width: 100%; border-radius: 2px; }
.video { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s; }
.video:hover img { opacity: 1; }
.video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--red); }
.video-play::after { content: ""; position: absolute; left: 31px; top: 23px; border-left: 22px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
@media (max-width: 800px) { .about-block { grid-template-columns: 1fr; } .about-block.is-rev > :first-child { order: 0; } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 3px solid var(--red); }
.timeline li { position: relative; padding: 0 0 40px 20px; }
.timeline li::before { content: ""; position: absolute; left: -38px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--red); }
.timeline-year { font: 900 clamp(2rem, 4vw, 3rem)/1 var(--display); color: var(--fg); margin-bottom: 8px; }
.timeline img { margin-top: 12px; max-width: 420px; width: 100%; }
.accordion { border-top: 2px solid var(--fg); }
.job { border-bottom: 1px solid var(--line); }
.job summary { cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; font: 700 1.25rem/1.2 var(--display); }
.job summary small { font: 400 .9375rem/1.4 var(--body); color: var(--grey); white-space: nowrap; }
.job .prose { padding-bottom: 20px; }

/* Referencje */
.ref { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); padding: 40px 0; border-top: 1px solid var(--line); align-items: start; }
.ref:first-child { border-top: 0; padding-top: 0; }
.ref h2 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.ref-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ref-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; }
.ref-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ref-gallery a:hover img { transform: scale(1.06); }
@media (max-width: 800px) { .ref { grid-template-columns: 1fr; } }

/* Mapa serwisu, wyniki */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.sitemap-grid h2 { font-size: 1.375rem; margin-top: 1.4em; }
.sitemap-grid h2:first-child { margin-top: 0; }
.sitemap-grid ul { padding-left: 1.1em; margin: 0; }
.sitemap-grid li { margin: 4px 0; }
.sitemap-grid a { text-decoration: none; }
.sitemap-grid a:hover { text-decoration: underline; }
.sitemap-offer ul ul { font-size: .9375rem; }
@media (max-width: 900px) { .sitemap-grid { grid-template-columns: 1fr; } }
.results { list-style: none; margin: 24px 0 0; padding: 0; }
.results li { padding: 16px 0; border-top: 1px solid var(--line); }
.results a { text-decoration: none; font-size: 1.125rem; }
.results p { margin: 6px 0 0; color: var(--grey); }
.result-type { display: inline-block; font-size: .8125rem; font-weight: 700; color: var(--red); margin-right: 6px; }

/* Logotypy, stopka */
.logos { padding: 0 0 clamp(64px, 8vw, 112px); }
.logo-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; align-items: center; }
.logo-strip li { display: grid; place-items: center; height: 72px; padding: 8px; border: 1px solid var(--line); }
.logo-strip img { height: 44px; width: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.logo-strip li:hover img { filter: none; opacity: 1; }
.footer-wide .footer-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; gap: 6px 16px; }
.footer-branches li { display: flex; flex-direction: column; }
.footer-tel { color: #8a8a8a; font-size: .875rem; }
.footer-cta { margin-top: 16px; }
.footer-top { grid-template-columns: 1.3fr 1fr 1.6fr; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* Strona główna: lista oferty z kategorii */
.offer .section-head-row p { margin: 8px 0 0; }
.branch-list .branch-city { text-decoration: none; }
.branch-list .branch-city:hover { color: var(--red); }

.product-title { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1; overflow-wrap: anywhere; }
.product-logo { display: block; max-width: 200px; object-fit: contain; object-position: left center; }

/* Rozdział z rodziną: zwykła grubość, wyróżnione tylko „bezpiecznym dachem” */
.chapter-family .chapter-lead { font-family: var(--body); font-weight: 400; letter-spacing: 0; line-height: 1.35; font-size: max(1.125rem, min(1.75rem, 4.3cqi)); }
.chapter-family .chapter-lead .red { font-weight: 700; }

.chapter-family .chapter-title { margin-bottom: .4em; }

/* =====================================================================
   Strona dla dekarzy, newsletter, baner cookies
   ===================================================================== */
.nav-roofer { min-height: 42px; padding: 0 16px; }
.nav-roofer[aria-current] { background: var(--fg); color: var(--bg); }
@media (max-width: 1180px) { .nav-roofer { padding: 0 12px; } }

.roofer-hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; background: var(--black); color: var(--white); overflow: hidden; }
.roofer-hero-photo { position: absolute; inset: 0; }
.roofer-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; opacity: .62; }
.roofer-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.1) 100%); }
.roofer-hero-copy { position: relative; z-index: 1; padding-block: 48px clamp(56px, 9vh, 96px); }
.roofer-hero .crumbs, .roofer-hero .crumbs a { color: #cfcfcf; }
.roofer-title { color: var(--white); font-size: clamp(2.4rem, 5.6vw, 5rem); font-weight: 900; line-height: .98; letter-spacing: -.025em; margin: 0 0 .4em; max-width: 14ch; }
.roofer-title span { display: block; }
.roofer-title span:last-child { color: var(--red); }
.roofer-lead { max-width: 40em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); color: #ececec; }
.btn-ghost-light { border-color: var(--white); color: var(--white); }
.btn-ghost-light:hover { background: var(--white); color: #000; }

.roofer-story-title { font-size: clamp(2rem, 4.4vw, 3.5rem); max-width: 18ch; }
.roofer-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 80px); }
.roofer-point { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.roofer-key { font: 900 1.0625rem/1.2 var(--display); color: var(--red); text-transform: none; padding-top: 4px; }
.roofer-point h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); margin-bottom: .35em; }
.roofer-point p { margin: 0; color: var(--ink); }
@media (max-width: 900px) { .roofer-points { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .roofer-point { grid-template-columns: 1fr; gap: 6px; } }

.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.benefits li { position: relative; padding: 18px 18px 18px 52px; background: var(--bg); font-weight: 600; border-left: 4px solid var(--red); }
.benefits li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 18px; height: 10px; border-left: 3px solid var(--fg); border-bottom: 3px solid var(--fg); transform: rotate(-45deg); }

.loyalty-grid, .badge-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.loyalty-mark svg, .badge { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.loyalty-grid h2, .badge-grid h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.loyalty-text { font-size: 1.1875rem; max-width: 40em; }
.badge-section { background: var(--bg); }
.badge-grid h3 { font-size: 1.25rem; margin-top: 1.4em; }
.badge { filter: drop-shadow(0 12px 24px rgba(0,0,0,.18)); transform: rotate(-6deg); }
.checks { list-style: none; margin: 0 0 28px; padding: 0; }
.checks li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 14px; height: 8px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }
@media (max-width: 800px) { .loyalty-grid, .badge-grid { grid-template-columns: 1fr; } .loyalty-mark svg, .badge { max-width: 220px; } }

/* Newsletter */
.newsletter-band { background: var(--black); color: #e6e6e6; }
.newsletter-band h2 { color: var(--white); font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.newsletter-band .page-kicker { color: var(--red); }
.newsletter-band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.newsletter { background: var(--bg); color: var(--ink); padding: clamp(20px, 3vw, 32px); border-top: 4px solid var(--red); }
.newsletter-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.newsletter .btn[type=submit] { width: 100%; margin-top: 4px; }
.footer-newsletter { padding: clamp(40px, 6vw, 64px) 0; border-bottom: 1px solid #2c2c2c; margin-bottom: 56px; }
.footer-newsletter h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
.footer-newsletter p { color: #bdbdbd; }
.site-footer { padding-top: 0; }
.site-footer > .wrap { padding-top: 56px; }
.footer-newsletter + .wrap { padding-top: 0; }
@media (max-width: 860px) { .newsletter-band-grid, .newsletter-row { grid-template-columns: 1fr; } }

/* Baner cookies */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 760px; margin: 0 auto; background: var(--bg); color: var(--ink); border-top: 4px solid var(--red); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.cookie-in { padding: 20px 24px; max-height: calc(100vh - 32px); overflow: auto; }
.cookie-banner h2 { font-size: 1.375rem; margin-bottom: .4em; }
.cookie-banner p { font-size: .9375rem; }
.cookie-opts { margin: 8px 0 12px; display: grid; gap: 8px; font-size: .9375rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { min-height: 42px; padding: 0 16px; font-size: .9375rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.gmap-gate { display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px; background: var(--paper) linear-gradient(135deg, transparent 49.5%, var(--line) 50%, transparent 50.5%) 0 0 / 34px 34px; }
.gmap-gate p { margin: 0; font-weight: 600; }

.nav-cta, .nav-roofer { white-space: nowrap; }
@media (max-width: 1320px) and (min-width: 901px) { .nav ul { gap: 16px; } .nav ul a { font-size: .9375rem; } .nav { gap: 18px; } .nav-tools { gap: 8px; } }

/* Poprawki 2026-10-04 */
/* Daszek w hero rysuje się dopiero, gdy tekst i przyciski już zniknęły (nie nachodzi na przyciski) */
.hero-roof path { stroke-dashoffset: calc(1 - clamp(0, (var(--p) - .46) / .5, 1)); }
.hero-roof { opacity: clamp(0, (var(--p) - .46) * 8, 1); }
/* Łamanie wiersza tylko na wąskich ekranach */
@media (min-width: 901px) { .br-narrow { display: none; } }
@media (max-width: 900px) { .hero-copy > .hero-title { max-width: none; } }
/* Kolbudy: zdjęcie stoi, napisy przewijają się po nim – drugi po dłuższym odstępie */
.origins .origin.origin-scroll { position: relative; top: auto; display: block; height: auto; min-height: 0; overflow: clip; }
.origins .origin.origin-scroll::after { content: none; }
.origin-scroll .origin-photo { position: sticky; inset: auto; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.origin-scroll .origin-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.18) 40%, rgba(0,0,0,0) 70%); }
.origins .origin-scroll .origin-scroll-copy { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100svh; padding-block: 85vh 35vh; padding-block: 85svh 35svh; }
.origin-scroll .origin-text-more { margin-top: 95vh; margin-top: 95svh; }
/* Twój dach na pokolenia – dlaczego Ambit (pod hero) */
.why { padding: clamp(72px, 9vw, 128px) 0 clamp(56px, 7vw, 96px); }
.why-sub { font-size: clamp(1.25rem, 2vw, 1.625rem); margin: 0 0 clamp(20px, 3vw, 32px); }
.why-list { list-style: none; margin: 0 0 clamp(32px, 4vw, 48px); padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.why-list li { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 2px solid var(--fg); }
.why-list strong { font: 700 1.125rem/1.2 var(--display); }
.why-list span { color: var(--grey); font-size: .9375rem; line-height: 1.5; }
.why-icon { width: 40px; height: 40px; fill: none; stroke: var(--red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
#konsultacja { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (max-width: 1100px) { .why-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .why-list { grid-template-columns: 1fr; gap: 0; }
  .why-list li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; row-gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
  .why-list .why-icon { grid-row: span 2; margin: 0; }
  .why .btn { width: 100%; justify-content: center; }
}
.why + .offer { padding-top: clamp(32px, 4vw, 64px); }
/* Oferta na wąskim ekranie: po najechaniu opis odsuwa się od krawędzi tak jak nazwa */
@media (max-width: 700px) {
  .offer-desc { transition: color .3s, padding-left .45s var(--ease); }
  .offer-list a:hover .offer-desc, .offer-list a:focus-visible .offer-desc { padding-left: 16px; }
}
.chapter-note { display: block; font-size: .875rem; line-height: 1.5; color: var(--grey); }
/* Opinie klientów: pasek przewijany w bok (strona główna) i lista (O nas > Opinie) */
.reviews-strip { padding: clamp(72px, 9vw, 128px) 0 clamp(24px, 3vw, 40px); overflow: hidden; }
.reviews-track { list-style: none; margin: 0; padding: 4px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); scrollbar-width: none; overscroll-behavior-x: contain; }
.reviews-track::-webkit-scrollbar { display: none; }
.reviews-track .review-card { flex: 0 0 min(360px, 82vw); scroll-snap-align: start; }
.review-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--paper); border-top: 3px solid var(--red); }
.review-card blockquote { margin: 0; flex: 1; }
.review-card blockquote p { margin: 0 0 .6em; font-size: 1.0625rem; line-height: 1.55; }
.reviews-track .review-card blockquote p { font: 700 1.1875rem/1.35 var(--display); }
.review-stars { margin: 0; color: var(--red); letter-spacing: .12em; font-size: 1.125rem; }
.review-meta { margin: 0; color: var(--grey); font-size: .875rem; }
.reviews-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.reviews-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--fg); background: var(--bg); cursor: pointer; }
.reviews-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.reviews-btn:hover, .reviews-btn:focus-visible { background: var(--fg); color: var(--bg); }
.reviews-strip + .why { padding-top: clamp(56px, 7vw, 96px); }
.reviews-summary { display: grid; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.reviews-avg { margin: 0; font: 900 clamp(3rem, 7vw, 5rem)/1 var(--display); }
.reviews-avg span { color: var(--red); }
.reviews-places { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.reviews-places strong { color: var(--fg); }
.reviews-list { list-style: none; margin: 0; padding: 0; columns: 3 320px; column-gap: 20px; }
.reviews-list .review-card { break-inside: avoid; margin-bottom: 20px; }
.section-alt { background: var(--paper); }
.reviews-quality { font: 700 clamp(1.375rem, 2.6vw, 1.875rem)/1.3 var(--display); margin: 0 0 32px; }
.reviews-form { background: var(--bg); padding: clamp(20px, 4vw, 40px); }
.review-stars { color: #F5B400; }
.reviews-track .review-card { padding: 0; }
.review-link { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 28px; color: inherit; text-decoration: none; }
.review-link:hover blockquote p, .review-link:focus-visible blockquote p { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .2em; }
.review-meta strong { color: var(--fg); }
.review-more { margin-top: auto; font-weight: 700; font-size: .875rem; color: var(--red); }
.reviews-list .review-card:target { outline: 3px solid #F5B400; outline-offset: 4px; }
.reviews-list .review-card { scroll-margin-top: calc(var(--header-h) + 24px); }
.reviews-avg span { color: #F5B400; }
.reviews-source { margin: 0 0 clamp(24px, 3vw, 40px); }
.cards-logos .card-img { background: var(--bg); }
.cards-logos .card-img img { object-fit: contain; padding: 14% 12%; }
/* Porady ekspertów: przełącznik widoku (kafelki / lista) */
.view-switch { display: flex; justify-content: flex-end; gap: 8px; margin: -12px 0 20px; }
.view-switch[hidden] { display: none; }
.view-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); background: var(--bg); font: 600 .9375rem/1 var(--body); color: var(--ink); cursor: pointer; }
.view-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.view-btn:hover { border-color: var(--fg); }
.view-btn[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.article-list.view-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.article-list.view-grid article { grid-template-columns: 1fr; gap: 14px; }
.article-list.view-grid li.lead-item { grid-column: 1 / -1; }
.article-list.view-grid li.lead-item article { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; }
.article-list.view-list { display: block; }
.article-list.view-list article, .article-list.view-list li.lead-item article { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; }
.article-list.view-list li.lead-item h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.article-list.view-list .al-img img { aspect-ratio: 4 / 3; }
@media (max-width: 900px) { .article-list.view-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .article-list.view-grid { grid-template-columns: 1fr; }
  .article-list.view-grid li.lead-item article { grid-template-columns: 1fr; }
  .article-list.view-list article, .article-list.view-list li.lead-item article { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .article-list.view-list h2 { font-size: 1.125rem; }
  .article-list.view-list .al-copy > p:last-child { display: none; }
}
/* Dla dekarzy: logotypy producentów z oferty */
.brand-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.brand-grid a { display: grid; place-items: center; height: 110px; padding: 18px 22px; background: var(--bg); text-decoration: none; transition: background .2s; }
.brand-grid a:hover, .brand-grid a:focus-visible { background: var(--paper); }
.brand-grid img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.brand-name { font: 700 1.125rem/1.1 var(--display); color: var(--fg); text-align: center; }
@media (max-width: 560px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } .brand-grid a { height: 92px; } }
.logo-strip li { padding: 0; }
.logo-strip a { display: grid; place-items: center; width: 100%; height: 100%; padding: 8px; text-decoration: none; }
.logo-strip .brand-name { font-size: .9375rem; color: var(--grey); }
.logo-strip li:hover .brand-name { color: var(--fg); }
/* Stopka: przynależność do 4D Grupy */
.footer-group { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; color: inherit; text-decoration: none; font-size: .875rem; max-width: 30ch; opacity: .9; }
.footer-group img { width: 200px; height: auto; flex: none; }
.footer-group:hover { opacity: 1; text-decoration: underline; }

/* O nas > Opinie: wyróżnione opinie (duży cytat-nagłówek) i uproszczona lista pozostałych */
.reviews-heading { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 0 0 clamp(24px, 3vw, 40px); }
.reviews-top { list-style: none; margin: 0 0 clamp(64px, 8vw, 112px); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.review-top figure { margin: 0; height: 100%; display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3vw, 36px); background: var(--paper); border-top: 4px solid var(--red); scroll-margin-top: calc(var(--header-h) + 24px); }
.review-top:target figure { outline: 3px solid #F5B400; outline-offset: 4px; }
.review-headline { margin: 0; font: 700 clamp(1.375rem, 2.2vw, 1.75rem)/1.2 var(--display); color: var(--fg); text-wrap: balance; }
.review-top blockquote { margin: 0; flex: 1; }
.review-top blockquote p { margin: 0 0 .6em; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.review-top .review-meta .review-stars { margin-right: 6px; }
.review-lead { grid-column: 1 / -1; }
.review-lead figure { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px clamp(32px, 5vw, 80px); align-items: start; padding: clamp(28px, 5vw, 64px); background: var(--black); color: var(--white); border-top: 0; }
.review-lead .review-headline { grid-row: span 2; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.05; color: var(--white); }
.review-lead blockquote p { color: rgba(255, 255, 255, .78); font-size: 1.0625rem; }
.review-lead .review-meta, .review-lead .review-meta strong { color: rgba(255, 255, 255, .7); }
.review-lead .review-meta strong { color: var(--white); }
.reviews-simple { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); align-items: start; }
.reviews-simple.is-masonry { grid-auto-rows: 4px; grid-auto-flow: row dense; }
@media (max-width: 1000px) { .reviews-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reviews-simple { grid-template-columns: 1fr; } }
.review-item { break-inside: avoid; margin: 0; padding: 20px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.review-item blockquote { margin: 0 0 8px; }
.review-item blockquote p { margin: 0 0 .5em; font-size: .9375rem; line-height: 1.55; }
.review-item .review-meta { font-size: .8125rem; }
.review-item .review-stars { font-size: .8125rem; letter-spacing: .08em; margin-right: 4px; }
.review-item:target { background: #FFF8E1; outline: 3px solid #F5B400; outline-offset: 6px; }
@media (max-width: 760px) {
  .reviews-top { grid-template-columns: 1fr; }
  .review-lead figure { grid-template-columns: 1fr; }
  .review-lead .review-headline { grid-row: auto; }
}
/* opinie przetłumaczone: przełącznik oryginału */
.review-orig { margin: 0 0 10px; font-size: .8125rem; }
.review-orig summary { cursor: pointer; color: var(--grey); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .2em; list-style: none; display: inline-block; }
.review-orig summary::-webkit-details-marker { display: none; }
.review-orig summary:hover, .review-orig summary:focus-visible { color: var(--red); text-decoration-color: currentColor; }
.review-orig[open] summary { margin-bottom: 8px; }
.review-orig blockquote { margin: 0; padding-left: 12px; border-left: 2px solid var(--line); font-style: italic; }
.review-orig blockquote p { font-size: .875rem !important; color: var(--grey) !important; margin: 0 0 .4em; }
.review-lead .review-orig summary { color: rgba(255, 255, 255, .6); text-decoration-color: rgba(255, 255, 255, .3); }
.review-lead .review-orig blockquote { border-color: rgba(255, 255, 255, .2); }
.review-lead .review-orig blockquote p { color: rgba(255, 255, 255, .6) !important; }

/* ===== Tryb ciemny (przełącznik w nagłówku; domyślnie jasny) =====
   Grafit z ciepłym odcieniem zamiast czystej czerni, warstwy: strona → sekcje „paper” → ciemne sekcje (--black) najgłębiej.
   Czerwień Ambit zostaje akcentem, tło ożywia delikatna czerwona poświata. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --fg: #F4F2EE;
  --bg: #141417;
  --ink: #DDDBD6;
  --grey: #A2A1A8;
  --line: #2D2D33;
  --paper: #1C1C21;
  --black: #0B0B0D;
  --red: #F0282F;
  --red-dark: #D11A21;
  --header-bg: rgba(20, 20, 23, .9);
  --field-line: #3A3A41;
}
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), fill .35s var(--ease) !important; }
@media (prefers-reduced-motion: reduce) { .theme-anim, .theme-anim * { transition: none !important; } }

/* przełącznik */
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 50%; transition: background-color .2s; }
.theme-toggle:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .theme-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; color: #F5B400; }
.theme-toggle:hover svg { transform: rotate(-18deg); }

/* tło: poświata czerwieni u góry strony i przy stopce */
[data-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 88% -120px, rgba(240, 40, 47, .13), transparent 70%),
    radial-gradient(900px 480px at 0% 30%, rgba(255, 255, 255, .025), transparent 70%),
    var(--bg);
}
[data-theme="dark"] .hero-stage { background: transparent; }
[data-theme="dark"] .site-header.is-scrolled { border-bottom-color: var(--line); }
[data-theme="dark"] .test-bar { background: #08080A; color: #8d8c93; }

/* sekcje „paper” i ciemne: delikatne obramowanie, żeby warstwy były czytelne */
[data-theme="dark"] .section-alt, [data-theme="dark"] .tips, [data-theme="dark"] .product-more, [data-theme="dark"] .related {
  background: linear-gradient(180deg, #1D1D22, #19191D);
  border-block: 1px solid var(--line);
}
[data-theme="dark"] .site-footer, [data-theme="dark"] .process, [data-theme="dark"] .newsletter-band, [data-theme="dark"] .callout { border-top: 1px solid #222227; }
[data-theme="dark"] .site-footer { background: radial-gradient(800px 360px at 100% 100%, rgba(240, 40, 47, .10), transparent 70%), var(--black); }
[data-theme="dark"] .review-lead figure { background: radial-gradient(700px 400px at 0% 0%, rgba(240, 40, 47, .16), transparent 65%), var(--black); box-shadow: inset 0 0 0 1px #26262c; }

/* karty: lekko jaśniejsze od tła, z cienką linią */
[data-theme="dark"] .card { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="dark"] .card a:hover { background: #222228; }
[data-theme="dark"] .review-card, [data-theme="dark"] .review-top figure { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="dark"] .review-item:target { background: rgba(245, 180, 0, .08); }
[data-theme="dark"] .cookie-banner, [data-theme="dark"] .dlg, [data-theme="dark"] .lang-switch ul, [data-theme="dark"] .map-panel { background: #1E1E23; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 0 0 1px var(--line); }
[data-theme="dark"] .page-home .site-header.nav-open { background: var(--bg); }

/* formularze */
[data-theme="dark"] .field input:not([type=checkbox]), [data-theme="dark"] .field select, [data-theme="dark"] .field textarea,
[data-theme="dark"] .outlet-search input, [data-theme="dark"] .search-form input { background: #101013; color: var(--fg); }
[data-theme="dark"] .reviews-form { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }

/* logotypy producentów: na jasnych „kafelkach”, żeby zachowały kolory marek */
[data-theme="dark"] .logo-strip li { background: #ECEAE5; border-color: #ECEAE5; }
[data-theme="dark"] .logo-strip .brand-name { color: #55545a; }
[data-theme="dark"] .brand-grid { background: #26262b; border-color: #26262b; }
[data-theme="dark"] .brand-grid a { background: #ECEAE5; }
[data-theme="dark"] .brand-grid a:hover, [data-theme="dark"] .brand-grid a:focus-visible { background: #fff; }
[data-theme="dark"] .brand-grid .brand-name { color: #1A1A1A; }
[data-theme="dark"] .cards-logos .card-img { background: #ECEAE5; }

/* mapa: ciemne kafelki */
[data-theme="dark"] .map { background: #1b1f22; }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
[data-theme="dark"] .leaflet-control a, [data-theme="dark"] .leaflet-bar a { background: #1E1E23; color: var(--fg); border-color: var(--line); }

/* zdjęcia w treści lekko przygaszone, by nie raziły na ciemnym tle */
[data-theme="dark"] .prose img:not([src$=".svg"]) { filter: brightness(.94); }
[data-theme="dark"] .story-counter[data-tone="anthracite"] .counter-num { color: #9AA3A8; }
/* zdjęcia produktów (zwykle na białym tle) na jasnym polu */
[data-theme="dark"] .cards-products .card-img, [data-theme="dark"] .cards-products .card-img img, [data-theme="dark"] .gallery-main, [data-theme="dark"] .gallery-thumbs button { background: #F1EFEA; }
/* przyciski <button> bez własnego tła dostają w ciemnym schemacie szare tło systemowe */
[data-theme="dark"] button.btn-ghost:not(:hover), [data-theme="dark"] button.btn-line:not(:hover) { background: transparent; }

/* outlet: cena sprzed przeceny i rabat */
.price-old { color: var(--grey); font-weight: 400; margin-right: .25em; }
.price-cut { color: var(--red); font-weight: 700; white-space: nowrap; }
.outlet-table td.nowrap .price-old { display: block; font-size: .875em; margin: 0; }
.price-now { color: #1B7F3B; font-weight: 700; }
[data-theme="dark"] .price-now { color: #4ADE80; }
.price-cut { display: inline-block; }

/* mapy OpenStreetMap: szare kafelki (jak w panelu 4D/Enigmie), czerwone pinezki zostają w kolorze */
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
[data-theme="dark"] .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.9) contrast(.9); }
.place-osm { height: 100%; min-height: 380px; background: #e9e9e7; border-radius: 2px; z-index: 0; }
[data-theme="dark"] .place-osm { background: #1b1b1f; }
.place-map { display: flex; flex-direction: column; }
.place-map .place-osm { flex: 1; }
.qty-alt { color: #1B7F3B; white-space: nowrap; }
[data-theme="dark"] .qty-alt { color: #4ADE80; }
.outlet-table td.outlet-where { width: 1%; white-space: nowrap; font-size: .9375rem; }

/* strona produktu: ramka „dostępny w wyprzedaży” (cena po kliknięciu, <details>) */
.outlet-sale { margin: 24px 0 8px; border: 2px solid var(--red); background: var(--bg); }
.outlet-sale summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; cursor: pointer; list-style: none; }
.outlet-sale summary::-webkit-details-marker { display: none; }
.outlet-sale-title { font: 700 1.125rem/1.25 var(--display); color: var(--fg); }
.outlet-sale[open] .outlet-sale-btn { display: none; }
.outlet-sale-body { padding: 0 20px 18px; }
.outlet-sale-body p { margin: 0 0 10px; }
.outlet-sale-price { font-size: 1.25rem; }
.outlet-for { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 0 0 16px; }
a.price-cut { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a.price-cut:hover { color: var(--red-dark); }
.price-ask { display: inline-block; font-weight: 700; color: var(--red); white-space: nowrap; }
.outlet-table .price-ask { display: block; font-size: .875em; margin-top: 2px; }

/* outlet: osobna kolumna z wezwaniem (napis, po najechaniu wygląda jak przycisk) */
.outlet-table td.outlet-cta-cell { width: 1%; white-space: nowrap; vertical-align: top; }
.outlet-cta { display: inline-block; padding: 8px 12px; margin: -8px 0; border: 2px solid transparent; border-radius: 2px;
  font-weight: 700; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.outlet-cta.price-cut { color: var(--red); }
.outlet-cta.price-ask { color: var(--fg); margin-top: -8px; font-size: inherit; }
.outlet-cta:hover, .outlet-cta:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.outlet-cta.price-ask:hover, .outlet-cta.price-ask:focus-visible { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.price-now { color: #1B7F3B; font-weight: 700; }
[data-theme="dark"] .price-now { color: #4ADE80; }
.outlet-table a.outlet-cta { text-decoration: none; }
.outlet-table a.outlet-cta.price-cut:hover, .outlet-table a.outlet-cta.price-cut:focus-visible { color: #fff; background: var(--red); border-color: var(--red); }
.outlet-table a.outlet-cta.price-ask:hover, .outlet-table a.outlet-cta.price-ask:focus-visible { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* Strona główna, „Ambit w liczbach”: pod liczbami ołówkowy szkic domu ze zdjęcia rodziny (ta sama perspektywa);
   kreski rysują się podczas przewijania, a na końcu zdjęcie płynnie zastępuje rysunek */
.counter-inner > .house-sketch { grid-area: 2 / 1; margin-top: clamp(16px, 3vh, 32px); aspect-ratio: 430 / 400; height: auto;
  width: max(180px, min(100%, 440px, calc((100vh - var(--header-h) - 8vh - 330px) * 1.075))); overflow: hidden; border-radius: 2px; }
.house-sketch svg { display: block; width: 100%; height: 100%; }
.house-sketch .sk { fill: none; stroke: #9A9A9A; stroke-width: 1.5; stroke-opacity: .85; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.house-sketch .sk-guide { stroke: #DADADA; stroke-width: .8; }
.house-sketch .sk-roofline { stroke: #7A7A7A; stroke-width: 1.9; }
.house-sketch .sk-photo { opacity: 0; }
[data-theme="dark"] .house-sketch .sk { stroke: #9A9AA0; }
[data-theme="dark"] .house-sketch .sk-guide { stroke: #4A4A50; }
[data-theme="dark"] .house-sketch .sk-roofline { stroke: #C8C8CC; }
@media (max-width: 900px) { .counter-inner > .house-sketch { display: none; } }
@media (prefers-reduced-motion: reduce) { .house-sketch .sk-photo { opacity: 1; } .house-sketch .sk-lines { display: none; } }

/* Strona główna: dom ze zdjęcia rodziny rysowany ołówkiem w tle liczb (to samo miejsce i perspektywa co na zdjęciu),
   na końcu zdjęcie płynnie zastępuje rysunek w sekcji „Twój dach marzeń”. Położenie szkicu liczy main.js
   z prostokąta zdjęcia i object-position, więc trafia w dom przy każdej rozdzielczości. */
.house-reveal { position: relative; }
.house-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.house-bg-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.house-photo { position: absolute; inset: 0; opacity: 0; }
.house-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 75%; }
.house-sketch-svg { position: absolute; left: 0; top: 0; display: none; overflow: visible; }
.house-sketch-svg .sk { fill: none; stroke: #9A9A9A; stroke-width: 1.5; stroke-opacity: .9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.house-sketch-svg .sk-guide { stroke: #DADADA; stroke-width: .8; }
.house-sketch-svg .sk-roofline { stroke: #7A7A7A; stroke-width: 1.9; }
[data-theme="dark"] .house-sketch-svg .sk { stroke: #9A9AA0; }
[data-theme="dark"] .house-sketch-svg .sk-guide { stroke: #4A4A50; }
[data-theme="dark"] .house-sketch-svg .sk-roofline { stroke: #C8C8CC; }
.house-reveal > .story, .house-reveal > .summary { position: relative; z-index: 1; background: transparent; }
.house-reveal .origins-dream { position: relative; z-index: 1; }
.house-reveal .origins-dream .origin-dream { position: relative; top: auto; height: 100vh; height: 100svh; background: transparent; }
/* bez animacji szkic domu zostaje, ale zmienia się skokami (main.js) */

/* cień pod logo „Twój dach marzeń” jak pod tekstem „jest właśnie tutaj” (text-shadow nie działa na SVG) */

/* „Twój dach marzeń” na wspólnym zdjęciu: bez ciemnego pasa gradientu (czytelność daje cień tekstu i logo) */
.house-reveal .origin-dream::after { content: none; }

/* Zdjęcie startowe: rodzina przy kominku; kadr na rodzinie. Czerwona linia dachu jest przypięta do zdjęcia
   (położenie liczy main.js z prostokąta zdjęcia i object-position), więc rysuje się nad rodziną przy każdej rozdzielczości. */
.hero-roof { left: 0; top: 0; bottom: auto; width: 0; height: 0; transform: none; }
.hero-roof path { stroke-width: 4; }

/* napis na zdjęciu startowym w dolnej części ekranu; czerwony daszek nad rodziną wyłączony */
@media (min-width: 901px) { .hero-after { top: auto; bottom: 10vh; } }
.hero-roof { display: none !important; }

/* ilustracje kreską pod tekstami „Ambit w liczbach” (boisko ×1900, drużyny z ławkami, mapa Polski) */
.chapter-illus { margin: 18px 0 0; max-width: 420px; }
.chapter-illus svg { display: block; width: 100%; height: auto; overflow: visible; }
.chapter-illus .il { fill: none; stroke: #8A8A8A; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.chapter-illus .il-thin { stroke-width: 1.1; stroke: #B0B0B0; }
.chapter-illus .il-a { stroke: var(--red); }
.chapter-illus .il-b { stroke: #4A4A4A; }
.chapter-illus .il-map { stroke: #6E6E6E; stroke-width: 2.2; transition-duration: 2.6s; }
.chapter-illus .il-text { font: 700 34px var(--display); fill: var(--red); opacity: 0; transition: opacity .8s var(--ease) 1.2s; }
.chapter-illus.is-drawn .il { stroke-dashoffset: 0; }
.chapter-illus.is-drawn .il-text { opacity: 1; }
[data-theme="dark"] .chapter-illus .il { stroke: #A0A0A6; }
[data-theme="dark"] .chapter-illus .il-b { stroke: #D0D0D4; }
[data-theme="dark"] .chapter-illus .il-a { stroke: var(--red); }
@media (prefers-reduced-motion: reduce) { .chapter-illus .il { stroke-dashoffset: 0; transition: none; } .chapter-illus .il-text { opacity: 1; } }

/* szkic domu: ciemne dachówki układane na końcu (od prawego dołu w górę i w lewo) */
.house-sketch-svg .tile { fill: #34373C; stroke: #5B5F66; stroke-width: .6; opacity: 0; transition: opacity .25s ease; }
.house-sketch-svg .tile.on { opacity: 1; }
[data-theme="dark"] .house-sketch-svg .tile { fill: #4A4E55; stroke: #6E737B; }

.chapter-illus .il-thick { stroke-width: 3; }
.chapter-illus .il-text-dark { fill: var(--fg); font-size: 58px; }
.chapter-illus .il-roof { stroke-width: 6; stroke-linejoin: miter; stroke-linecap: square; }
.chapter-illus .il-dot { fill: var(--red); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: opacity .4s ease, transform .4s ease; }
.chapter-illus.is-drawn .il-dot { opacity: 1; transform: none; }
.chapter-illus .il-logo { color: var(--red); opacity: 0; transition: opacity .8s ease 1.2s; }
.chapter-illus.is-drawn .il-logo { opacity: 1; }
.chapter-illus .il-roof { transition-duration: .5s; }
.chapter-illus .il-roof { transition-duration: .3s; }
.chapter-illus .il-logo { color: #111; }
.chapter-illus .il-wheel { fill: #4A4A4A; opacity: 0; transition: opacity .6s ease .6s; }
.chapter-illus .il-hub { fill: #D8D8D8; opacity: 0; transition: opacity .6s ease .6s; }
.chapter-illus.is-drawn .il-wheel, .chapter-illus.is-drawn .il-hub { opacity: 1; }
.chapter-illus .il-fig { stroke: #3A3A3A; stroke-width: 7; }
.chapter-illus .il-fill-a, .chapter-illus .il-fill-b { opacity: 0; transition: opacity .6s ease 1s; }
.chapter-illus .il-fill-a { fill: var(--red); }
.chapter-illus .il-fill-b { fill: #3A3A3A; }
.chapter-illus.is-drawn .il-fill-a, .chapter-illus.is-drawn .il-fill-b { opacity: 1; }
[data-theme="dark"] .chapter-illus .il-logo { color: #ddd; }
.house-sketch-svg .tile.on { opacity: .3; }
.summary-line span + span { margin-top: .4em; }
.chapter-illus .il-note { font: 600 17px var(--body); fill: #8A8A8A; letter-spacing: .04em; opacity: 0; transition: opacity .8s var(--ease) 1.4s; }
.chapter-illus.is-drawn .il-note { opacity: 1; }
.chapter-illus-truck { max-width: 294px; }
.chapter-illus .il-solid { fill: #2B2B2B; stroke: var(--bg); stroke-width: 2.2; stroke-linejoin: round; opacity: 0; transform: translateY(8px); transition: opacity .9s var(--ease) .5s, transform .9s var(--ease) .5s; }
.chapter-illus .il-solid .helm { fill: var(--red); }
.chapter-illus.is-drawn .il-solid { opacity: 1; transform: none; }
[data-theme="dark"] .chapter-illus .il-solid { fill: #D0D0D4; }
/* Hero na tablecie i telefonie: zdjęcie rodziny na cały ekran, hasło na zdjęciu */
@media (max-width: 900px) {
  .hero-photo { clip-path: none; }
  .hero-photo img { height: 100%; object-position: 50% 35%; transform: none; }
  .hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.8) 100%); }
  .hero-copy { justify-content: flex-end; padding-bottom: max(6vh, 32px); color: #fff; }
  .hero-copy .hero-title, .hero-copy .hero-lead { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
  .hero-actions .btn-ghost { color: #fff; border-color: #fff; background: transparent; }
  .hero-actions .btn-ghost:hover { background: #fff; color: #111; }
}
/* Ilustracje liczb na węższych ekranach: mniejsze, po prawej */
@media (max-width: 900px) {
  .chapter-illus, .chapter-illus-truck { max-width: 46%; margin-left: auto; margin-top: 4px; }
  .chapter-illus-calendar { max-width: 32%; }
}
.origins-dream .origin-copy { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.chapter-illus-calendar { max-width: 200px; }
@media (max-width: 900px) { .chapter-illus-calendar { max-width: 28%; } }
.chapter-illus-roof232 { max-width: 240px; }
@media (max-width: 900px) { .chapter-illus-roof232 { max-width: 34%; } }
.chapter-illus-pitch { max-width: 340px; }
@media (max-width: 900px) { .chapter-illus-pitch { max-width: 52%; } }
.chapter-illus .il-dot { transform-origin: 50% 100%; }
.chapter-illus-teams { max-width: 300px; }
@media (max-width: 900px) { .chapter-illus-teams { max-width: 44%; } }
.chapter-illus .il-text-dark { fill: #8A8A8A; }
.chapter-big { display: block; font: 700 clamp(1.375rem, 2.1vw, 1.75rem)/1.3 var(--display); color: var(--fg); }
/* Ramka z artykułem „Twój pierwszy dach” pod opiniami */
.first-roof { padding: 0 0 clamp(56px, 7vw, 96px); }
.first-roof-card { display: grid; grid-template-columns: minmax(160px, 30%) 1fr; border: 1.5px solid var(--line); border-left: 4px solid var(--red); border-radius: 4px; overflow: hidden; color: inherit; text-decoration: none; background: var(--bg); transition: border-color .3s, box-shadow .3s; }
.first-roof-card:hover { border-color: var(--red); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.first-roof-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.first-roof-body { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3.5vw, 48px); }
.first-roof-label { font: 700 .8125rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.first-roof-title { font: 800 clamp(1.5rem, 2.6vw, 2.25rem)/1.15 var(--display); color: var(--fg); }
.first-roof-lead { color: var(--grey); line-height: 1.55; max-width: 46em; }
.first-roof-cta { margin-top: 8px; font: 700 1rem/1 var(--display); color: var(--red); }
.first-roof-card:hover .first-roof-cta { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 640px) { .first-roof-card { grid-template-columns: 1fr; } .first-roof-img { aspect-ratio: 16 / 9; } }
/* Długie tytuły stron (np. Eksport): mniejszy krój, szersza kolumna */
.page-title-long { font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: 1.05; max-width: 22ch; }
/* Górne menu na średnich ekranach: mniejsze odstępy, żeby zmieściły się wszystkie pozycje i przyciski */
@media (min-width: 901px) and (max-width: 1600px) { .nav { gap: 20px; } .nav ul { gap: 18px; } .nav ul a { font-size: .9375rem; } }
@media (min-width: 901px) and (max-width: 1320px) { .nav { gap: 14px; } .nav ul { gap: 12px; } .nav ul a { font-size: .875rem; } .nav-cta { padding: 0 12px; } }
@media (min-width: 901px) { .nav ul a { white-space: nowrap; } }
@media (min-width: 901px) and (max-width: 1600px) { html[lang="fr"] .nav ul, html[lang="is"] .nav ul, html[lang="de"] .nav ul { gap: 12px; } html[lang="fr"] .nav ul a, html[lang="is"] .nav ul a, html[lang="de"] .nav ul a { font-size: .8125rem; } html[lang="fr"] .nav, html[lang="is"] .nav, html[lang="de"] .nav { gap: 12px; } }
@media (min-width: 901px) and (max-width: 1600px) { html[lang="uk"] .nav ul { gap: 12px; } html[lang="uk"] .nav ul a { font-size: .8125rem; } html[lang="uk"] .nav { gap: 12px; } }
@media (min-width: 901px) and (max-width: 1460px) { html[lang="uk"] .nav ul, html[lang="fr"] .nav ul { gap: 9px; } html[lang="uk"] .nav ul a, html[lang="fr"] .nav ul a { font-size: .75rem; } html[lang="uk"] .nav-cta, html[lang="fr"] .nav-cta { padding: 0 10px; font-size: .8125rem; } }
@media (min-width: 901px) and (max-width: 1600px) { html[lang="es"] .nav ul { gap: 12px; } html[lang="es"] .nav ul a { font-size: .8125rem; } html[lang="es"] .nav { gap: 12px; } }
@media (min-width: 901px) and (max-width: 1460px) { html[lang="es"] .nav ul { gap: 9px; } html[lang="es"] .nav ul a { font-size: .75rem; } html[lang="es"] .nav-cta { padding: 0 10px; font-size: .8125rem; } }

/* Menu nie mieści się w poziomie (długie etykiety w danym języku) → przełącz na menu rozwijane */
html.nav-compact .nav-toggle { display: grid; place-items: center; width: 48px; height: 48px; margin-right: -12px; background: none; border: 0; color: inherit; cursor: pointer; }
html.nav-compact .nav-toggle-bars, html.nav-compact .nav-toggle-bars::before, html.nav-compact .nav-toggle-bars::after { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
html.nav-compact .nav-toggle-bars { position: relative; }
html.nav-compact .nav-toggle-bars::before, html.nav-compact .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
html.nav-compact .nav-toggle-bars::before { top: -7px; }
html.nav-compact .nav-toggle-bars::after { top: 7px; }
html.nav-compact .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
html.nav-compact .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
html.nav-compact .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }
html.nav-compact .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 24px; padding: 24px var(--gutter) 32px; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s; }
html.nav-compact .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .25s var(--ease); }
html.nav-compact .nav ul { flex-direction: column; gap: 4px; }
html.nav-compact .nav ul a { display: block; padding: 10px 0; font: 700 1.5rem/1.2 var(--display); }
html.nav-compact .page-home .site-header.nav-open { background: var(--bg); color: var(--fg); }
.ref-gallery-single { grid-template-columns: 1fr; }
.ref-gallery-single a { aspect-ratio: auto; }
.ref-gallery-single img { height: auto; max-height: 80vh; }
html.nav-compact .nav-tools { justify-content: space-between; flex-wrap: wrap; }
html.nav-compact .nav-cta { display: inline-flex; padding: 0 18px; font-size: 1rem; }
html.nav-compact .lang-switch ul { position: static; box-shadow: none; display: flex; flex-wrap: wrap; border: 0; padding: 8px 0 0; }
html.nav-fit .nav ul a { font-size: var(--nav-fs) !important; }
html.nav-fit .nav ul { gap: calc(var(--nav-fs) * .75) !important; }
html.nav-fit .nav, html.nav-fit .nav-tools { gap: 10px !important; }
html.nav-fit .nav-cta, html.nav-fit .nav-roofer { padding: 0 10px !important; font-size: var(--nav-fs) !important; }
html.nav-compact .page-home .site-header:not(.on-photo) .nav-toggle { color: var(--fg); }
/* Twój pierwszy dach: pół na pół, zdjęcie | czerwony blok */
.first-roof-card { grid-template-columns: 1fr 1fr; border: 0; border-radius: 0; background: var(--red); color: #fff; min-height: clamp(320px, 34vw, 480px); }
.first-roof-card:hover { box-shadow: 0 18px 44px rgba(0,0,0,.18); }
.first-roof-img { overflow: hidden; }
.first-roof-img img { transition: transform .8s var(--ease); }
.first-roof-card:hover .first-roof-img img { transform: scale(1.04); }
.first-roof-body { justify-content: center; gap: 18px; padding: clamp(28px, 4.5vw, 72px); }
.first-roof-label { color: rgba(255,255,255,.8); }
.first-roof-title { color: #fff; font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
.first-roof-lead { color: rgba(255,255,255,.92); font-size: 1.0625rem; }
.first-roof-cta { align-self: flex-start; margin-top: 12px; padding: 14px 22px; background: #fff; color: var(--red); border-radius: 2px; }
.first-roof-card:hover .first-roof-cta { text-decoration: none; background: #111; color: #fff; }
@media (max-width: 760px) { .first-roof-card { grid-template-columns: 1fr; } .first-roof-img { aspect-ratio: 3 / 2; } }
.first-roof-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 0; align-items: stretch;
  background: linear-gradient(135deg, #7E1F24 0%, #A23A36 38%, #B8524A 52%, #9A3332 66%, #6F1A1F 100%); }
.first-roof-img { aspect-ratio: 3 / 2; }
.first-roof-img img { height: 100%; object-fit: cover; object-position: center; }
.first-roof-cta { color: #8E2A2C; }
@media (min-width: 761px) { .first-roof-body { padding-left: clamp(84px, 13.5vw, 216px); } }
.first-roof-card { grid-template-columns: minmax(0, 1.15fr) minmax(400px, 1fr); }
.first-roof-img { display: block; aspect-ratio: auto; min-height: 100%; }
.first-roof-img img { position: relative; height: 100%; min-height: 360px; }
@media (min-width: 761px) { .first-roof-body { padding: clamp(36px, 4vw, 64px) clamp(36px, 4.5vw, 72px) clamp(36px, 4vw, 64px) clamp(56px, 7vw, 120px); } }
.first-roof-title { margin: 0; }
.first-roof-lead { margin: 0; }
.first-roof-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.first-roof-cta { display: inline-flex; align-items: center; margin: 0; border: 1.5px solid #fff; font: 700 1rem/1 var(--display); cursor: pointer; text-decoration: none; transition: background .25s, color .25s; }
.first-roof-cta:hover { background: #111; border-color: #111; color: #fff; }
.first-roof-cta-alt { background: transparent; color: #fff; }
.first-roof-cta-alt:hover { background: #fff; color: #8E2A2C; border-color: #fff; }
.origin-big .origin-photo img { object-position: 50% 40%; }
@media (max-width: 1100px) and (min-width: 761px) { .first-roof-card { grid-template-columns: 1fr 1fr; } }
.first-roof-card:hover .first-roof-cta:not(:hover) { background: #fff; color: #8E2A2C; border-color: #fff; }
.first-roof-card:hover .first-roof-cta-alt:not(:hover) { background: transparent; color: #fff; }
.origin-text:has(.origin-small) { max-width: none; }
.origin-small { display: block; font-size: clamp(1.75rem, 3.9vw, 3.6rem); white-space: nowrap; }
@media (max-width: 600px) { .origin-small { white-space: normal; } }
.origin-four { box-shadow: none; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: .1em; text-underline-offset: .08em; }
/* Menu mobilne: przewijane, gdy wyższe niż ekran; języki w siatce */
@media (max-width: 900px) {
  .nav { max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
  .nav ul a { padding: 7px 0; font-size: 1.3rem; }
  .lang-switch ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
  .lang-switch li a { padding: 8px 4px; }
}
html.nav-compact .nav { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
@media (max-width: 900px) {
  .first-roof-card { grid-template-columns: 1fr; }
  .first-roof-img { aspect-ratio: 3 / 2; min-height: 0; }
  .first-roof-img img { min-height: 0; }
  .first-roof-body { padding: 28px 24px 32px; }
}
.why-cta-note { margin: 0 0 14px; color: var(--red); font: 700 clamp(1.125rem, 1.6vw, 1.375rem)/1.3 var(--display); }
/* Poznaj nas: kafelki z liczbami */
.stats-tiles { padding: clamp(40px, 6vw, 80px) 0; }
.stats-tiles-title { margin: 0 0 24px; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.stats-tiles-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stats-tile { display: flex; flex-direction: column; gap: 6px; padding: 28px 24px; background: var(--soft, #F4F3F1); border-top: 3px solid var(--red); }
.stats-tile strong { font: 900 clamp(2.25rem, 3.6vw, 3.25rem)/1 var(--display); letter-spacing: -.02em; color: var(--fg); }
.stats-tile-unit { font: 700 1.125rem/1.2 var(--display); color: var(--red); }
.stats-tile-cap { color: var(--grey); line-height: 1.4; }
[data-theme="dark"] .stats-tile { background: #1E1E23; }
.stats-tile strong { white-space: nowrap; }
/* Strona dla profesjonalistów: ciąg wyceniasz → potwierdzasz → realizujesz → wsparcie */
.roofer-points { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2.4vw, 32px); counter-reset: none; }
.roofer-point { grid-template-columns: 1fr; gap: 14px; padding: 24px 0 0; border-top: 3px solid var(--line); position: relative; }
.roofer-point::after { content: "→"; position: absolute; top: -17px; right: calc(-1 * clamp(16px, 2.4vw, 32px) / 2 - 10px); width: 20px; text-align: center; color: var(--red); font: 900 1.25rem/1 var(--display); background: var(--bg); }
.roofer-point:last-child::after { content: none; }
.roofer-point:first-child { border-top-color: var(--red); }
.roofer-key { display: flex; flex-direction: column; gap: 4px; padding: 0; }
.roofer-step { font: 700 .8125rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 1000px) { .roofer-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } .roofer-point::after { content: none; } }
@media (max-width: 600px) { .roofer-points { grid-template-columns: 1fr; } }
.roofer-quote { margin: 0 auto; max-width: 860px; text-align: center; }
.roofer-quote blockquote { margin: 12px 0 18px; }
.roofer-quote blockquote p { margin: 0; font: 700 clamp(1.5rem, 2.8vw, 2.25rem)/1.3 var(--display); color: var(--fg); }
.roofer-quote figcaption { color: var(--grey); }
.roofer-quote .stars { color: var(--red); letter-spacing: .1em; margin-right: 6px; }
.roofer-extra-head { padding-top: clamp(48px, 6vw, 80px); }
.roofer-extra-head .page-kicker { margin: 0; font-size: 1rem; }
.roofer-point { align-content: start; } .roofer-point h3 { margin-top: 0; }
.roofer-quote-link { display: block; color: inherit; text-decoration: none; }
.roofer-quote-more { display: inline-block; margin-top: 16px; font: 700 1rem/1 var(--display); color: var(--red); }
.roofer-quote-link:hover .roofer-quote-more { text-decoration: underline; text-underline-offset: .2em; }
.roofer-quote-link:hover blockquote p { color: var(--red); }
.roofer-quotes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.roofer-quote-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 28px 26px; background: var(--bg); border-top: 3px solid var(--red); color: inherit; text-decoration: none; transition: box-shadow .3s, transform .3s; }
.roofer-quote-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.roofer-quote-card blockquote { margin: 0; flex: 1; }
.roofer-quote-card blockquote p { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--fg); }
.roofer-quote-card .stars { color: var(--red); letter-spacing: .1em; }
.roofer-quote-by { color: var(--grey); font-size: .9375rem; }
@media (max-width: 1000px) { .roofer-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .roofer-quotes { grid-template-columns: 1fr; } }
/* Jak wygląda współpraca: podświetlenie kroku po najechaniu */
.roofer-point { transition: border-color .2s ease, background-color .2s ease; }
.roofer-point h3 { transition: color .2s ease; }
@media (hover: hover) {
  .roofer-points:hover .roofer-point:first-child:not(:hover) { border-top-color: var(--line); }
  .roofer-point:hover { border-top-color: var(--red); background: linear-gradient(rgba(200, 40, 40, .06), transparent 70%); }
  .roofer-point:hover h3 { color: var(--red); }
}
/* Przyciski w nagłówku: czytelna, stała wielkość liter (nie zmniejszamy ich razem z menu) */
@media (min-width: 901px) {
  .nav-cta, .nav-roofer, html.nav-fit .nav-cta, html.nav-fit .nav-roofer,
  html[lang] .nav-cta { font-size: .9375rem !important; padding: 0 16px !important; min-height: 44px; }
}
@media (min-width: 901px) { html.nav-fit .nav-cta, html.nav-fit .nav-roofer { font-size: .875rem !important; padding: 0 12px !important; } }
/* Jaśniejsze zdjęcia: Bazylika na stronie głównej i hero strony dla profesjonalistów */
.origin-big .origin-photo img { filter: grayscale(calc(1 - var(--o))) brightness(calc(.75 + .2 * var(--o))); }
.origins .origin-big::after { background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 40%, transparent 75%); }
.roofer-hero-photo img { opacity: .9; }
.roofer-hero::after { background: linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.25) 50%, transparent 85%); }
/* Historia w liczbach: tekst startuje na wysokości licznika, krótsze odstępy, ilustracje nieaktywnych rozdziałów gasną */
@media (min-width: 901px) {
  .chapter { min-height: 64vh; }
  .chapter:first-child { min-height: 54vh; padding-top: 6vh; transform: translateY(calc(var(--enter, 1) * 80px)); }
  .story-text { padding-bottom: 0; }
  .chapter-family:last-child { justify-content: center; }
  .chapter-illus { transition: opacity .45s ease; }
  .chapter:not(.is-active) .chapter-illus { opacity: 0; }
}
/* Bazylika: zdjęcie bez szarości, przyciemnienia i powiększenia; tekst oddzielony miękkim cieniem */
.origins .origin-big .origin-photo img { filter: none; transform: none; object-position: 50% 45%; }
.origins .origin-big::after { background: radial-gradient(ellipse 55% 45% at 22% 55%, rgba(0,0,0,.45) 0%, rgba(0,0,0,.2) 55%, transparent 80%); }
.origins .origin-big .origin-text { text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 2px 18px rgba(0,0,0,.5), 0 0 60px rgba(0,0,0,.35); }
/* „7 dachów” w jednej linii na czarno, pod spodem czerwone „dziennie” */
.story-counter[data-layout="inline"] .counter-num, .story-counter[data-layout="inline"] .counter-unit { display: inline-block; vertical-align: baseline; }
.story-counter[data-layout="inline"] .counter-unit { color: var(--fg); margin: 0 0 0 .25em; }
.story-counter[data-layout="inline"] .counter-cap { font: 700 clamp(1.75rem, 3.6vw, 3rem)/1 var(--display); color: var(--red); margin-top: .15em; min-height: 0; }
.story-counter[data-layout="inline"] .counter-roof { display: block; }
/* Hero dla profesjonalistów: pełne zdjęcie, cień pod tekstem */
.roofer-hero-photo img { opacity: 1; object-position: 60% 35%; }
.roofer-hero-copy { text-shadow: 0 1px 3px rgba(0,0,0,.5), 0 2px 20px rgba(0,0,0,.45); }
.roofer-hero .crumbs, .roofer-hero .crumbs a { color: #e6e6e6; }
/* Jak wygląda współpraca: po najechaniu cały krok jest czerwonym blokiem z białym tekstem */
@media (min-width: 1001px) { .roofer-point { padding: 24px 20px 28px; } }
.roofer-point, .roofer-point * { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
@media (hover: hover) {
  .roofer-point:hover { background: var(--red); border-top-color: var(--red); }
  .roofer-point:hover, .roofer-point:hover h3, .roofer-point:hover p, .roofer-point:hover .roofer-step, .roofer-point:hover * { color: #fff; }
}
/* Hero dla profesjonalistów: zdjęcie na całą szerokość, kadr na postaciach, przyciemnienie pod tekstem */
@media (min-width: 1200px) {
  .roofer-hero-photo img { object-position: 72% 42%; }
  .roofer-hero::after { background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 35%, rgba(0,0,0,.15) 62%, rgba(0,0,0,0) 80%); }
  .roofer-lead { max-width: 640px; }
}

/* ===== Dla profesjonalistów (2026-10-14): historia współpracy, rzemiosło, PSD, podstrony ===== */
.pro-hero-note { margin: 18px 0 0; max-width: 34em; font-size: .9375rem; color: #d6d6d6; }
.page-roofer .subnav, .page-roofer-program .subnav, .page-roofer-badge .subnav, .page-crew .subnav { margin-bottom: 0; background: var(--bg); }

/* historia: przyklejony nagłówek z listą kroków + rozdziały */
.pro-story-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.pro-story-head { position: sticky; top: calc(var(--header-h) + 32px); }
.pro-story-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; letter-spacing: -.02em; max-width: 13ch; }
.pro-story-intro { font-size: 1.125rem; max-width: 30em; }
.pro-story-steps { list-style: none; margin: 28px 0 0; padding: 0; border-left: 3px solid var(--line); }
.pro-story-steps li { position: relative; padding: 7px 0 7px 18px; font: 700 1rem/1.3 var(--display); color: var(--grey); transition: color .35s var(--ease); }
.pro-story-steps li span { display: inline-block; min-width: 2.4em; color: inherit; }
.pro-story-steps li::before { content: ""; position: absolute; left: -3px; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease); }
.pro-story-steps li.is-current { color: var(--fg); }
.pro-story-steps li.is-current::before { transform: none; }
.pro-chapters { list-style: none; margin: 0; padding: 0; }
.pro-chapter { padding: clamp(28px, 5vh, 52px) 0; border-top: 1px solid var(--line); }
.pro-chapter:first-child { border-top: 0; padding-top: 0; }
.pro-chapter-key { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; font: 700 .875rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.pro-chapter-n { font: 900 2.75rem/1 var(--display); letter-spacing: -.02em; color: var(--line); transition: color .45s var(--ease); }
.pro-chapter.is-current .pro-chapter-n { color: var(--red); }
.pro-chapter h3 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 900; letter-spacing: -.015em; max-width: 20ch; }
.pro-chapter p:last-child { margin: 0; max-width: 36em; font-size: 1.0625rem; color: var(--ink); }
@media (max-width: 900px) {
  .pro-story-grid { grid-template-columns: 1fr; gap: 24px; }
  .pro-story-head { position: static; }
  .pro-story-steps { display: none; }
  .pro-chapter-n { color: var(--red); }
}

/* rzemiosło: dwa równorzędne bloki, przyciski wyrównane do dołu */
.pro-craft-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.pro-craft-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; letter-spacing: -.02em; }
.pro-craft-head p { font-size: 1.125rem; margin: 0; }
.pro-craft-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.pro-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 3.4vw, 44px); background: var(--paper); border-top: 4px solid var(--red); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.pro-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.08); }
.pro-card-mark { width: 112px; height: 112px; margin-bottom: 22px; }
.pro-card-mark svg { width: 100%; height: 100%; display: block; }
.pro-card-mark .badge { max-width: none; transform: rotate(-6deg); filter: drop-shadow(0 8px 14px rgba(0,0,0,.16)); }
.pro-card .page-kicker { margin-bottom: 6px; }
.pro-card h3 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 900; letter-spacing: -.015em; }
.pro-card p:not(.page-kicker) { max-width: 34em; margin-bottom: 28px; }
.pro-card-cta { margin-top: auto; }
@media (max-width: 760px) { .pro-craft-cards { grid-template-columns: 1fr; } }

/* PSD: czarny blok pod blokami rzemiosła */
.pro-psd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 72px); align-items: center; margin-bottom: clamp(16px, 2.4vw, 32px); padding: clamp(32px, 4.4vw, 56px); background: var(--black); color: #e6e6e6; }
.pro-psd h2 { color: var(--white); font-size: clamp(1.625rem, 3vw, 2.5rem); font-weight: 900; letter-spacing: -.015em; max-width: 22ch; }
.pro-psd-lead { color: var(--white); font-size: 1.1875rem; font-weight: 700; max-width: 36em; }
.pro-psd p { max-width: 40em; }
.pro-psd-link { display: inline-block; margin-top: 4px; color: var(--white); font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.pro-psd-link:hover { color: var(--red); }
.pro-psd-logo { display: block; padding: 20px; border: 1px solid #333; line-height: 0; }
.pro-psd-logo img { width: 135px; height: 135px; }
@media (max-width: 760px) { .pro-psd { grid-template-columns: 1fr; } .pro-psd-logo { justify-self: start; } }

/* kontakt */
.pro-final-head { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.pro-final-head p { max-width: 44em; margin-bottom: 0; }
.pro-final-head .hero-actions { margin: 0; }
@media (max-width: 900px) { .pro-final-head { grid-template-columns: 1fr; } }

/* podstrony: hero bez zdjęcia ze znakiem obok */
.pro-sub-hero { min-height: 0; background: var(--black); }
.pro-sub-hero::after { content: none; }
.pro-sub-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(32px, 6vw, 96px); align-items: center; padding-top: 40px; }
.pro-sub-hero .roofer-title { max-width: 18ch; }
.pro-sub-hero-mark { margin: 0; }
.pro-sub-hero-mark svg { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.pro-sub-hero-mark .loyalty-svg circle { stroke: #333; stroke-width: 2; }
.pro-emblem figcaption { margin-top: 18px; text-align: center; font: 700 .875rem/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #cfcfcf; }
@media (max-width: 800px) { .pro-sub-hero-grid { grid-template-columns: 1fr; } .pro-sub-hero-mark svg { max-width: 200px; margin: 0; } .pro-emblem figcaption { text-align: left; } }

.pro-section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.pro-section-head h2 { font-size: clamp(1.875rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -.02em; }
.pro-section-head p { font-size: 1.125rem; margin: 0; }
.pro-steps, .pro-traits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.pro-steps li, .pro-traits li { padding: 24px 0 28px; border-top: 3px solid var(--line); transition: border-color .3s var(--ease); }
.pro-steps li:hover, .pro-traits li:hover { border-top-color: var(--red); }
.pro-steps .pro-chapter-n, .pro-traits .pro-chapter-n { display: block; margin-bottom: 14px; color: var(--red); font-size: 2.25rem; }
.pro-steps h3, .pro-traits h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 900; }
.pro-steps p, .pro-traits p { margin: 0; }
@media (max-width: 900px) { .pro-steps, .pro-traits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pro-steps, .pro-traits { grid-template-columns: 1fr; } }

.pro-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.pro-duo-item { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 3.4vw, 44px); background: var(--bg); }
.pro-duo-item h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 900; }
.pro-duo-item p { margin-bottom: 28px; }
.pro-duo-item .btn { margin-top: auto; }
@media (max-width: 760px) { .pro-duo { grid-template-columns: 1fr; } }

.pro-intro-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.pro-intro-in h2 { font-size: clamp(1.875rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -.02em; }
.pro-intro-in p { font-size: 1.125rem; }
.pro-pride { font: 700 1.25rem/1.4 var(--display); color: var(--fg); border-left: 4px solid var(--red); padding-left: 18px; }
@media (max-width: 800px) { .pro-intro-in { grid-template-columns: 1fr; } }

.pro-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.pro-split h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); font-weight: 900; letter-spacing: -.015em; }
.pro-split p { font-size: 1.0625rem; max-width: 36em; }
.pro-car-visual { margin: 0; }
.badge-van { width: 100%; height: auto; display: block; }
.badge-van .badge { transform: none; filter: none; }
.pro-car-visual figcaption { margin-top: 12px; font: 900 1.25rem/1.3 var(--display); color: var(--fg); }
@media (max-width: 800px) { .pro-split { grid-template-columns: 1fr; } .pro-split-rev > :last-child { order: -1; } }

.pro-browser { background: var(--bg); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.08); max-width: 440px; margin-inline: auto; }
.pro-browser-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pro-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pro-browser-body { display: grid; gap: 12px; padding: 24px; }
.pro-browser-line { height: 12px; background: var(--paper); }
.pro-browser-line.short { width: 60%; }
.pro-browser-badge { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.pro-browser-badge svg { width: 84px; height: 84px; transform: rotate(-6deg); }
.pro-browser-badge b { font: 700 .9375rem/1.2 var(--display); color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .3em; }

.pro-verify-list-t { font-size: 1.25rem; margin-top: 8px; }
.pro-crews { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.pro-crews a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.pro-crews em, .pro-crew-data dd.is-active, .pro-crew-data dd.is-inactive { font-style: normal; font-weight: 700; }
.pro-crews em.is-active, .pro-crew-data dd.is-active { color: #1a7f37; }
.pro-crews em.is-inactive, .pro-crew-data dd.is-inactive { color: var(--grey); }
@media (max-width: 600px) { .pro-crews a { grid-template-columns: 1fr; gap: 2px; } }

.pro-final-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.pro-final-in h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); font-weight: 900; }
.pro-final-in p { max-width: 44em; margin: 0; }
.pro-nl-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.pro-nl-in p { margin: 0; max-width: 44em; }
@media (max-width: 800px) { .pro-final-in, .pro-nl-in { grid-template-columns: 1fr; align-items: start; } .pro-final-in .btn, .pro-nl-in .btn { justify-self: start; } }

.pro-crew-hero .roofer-title { font-size: clamp(2rem, 4.4vw, 3.75rem); }
.pro-crew-status.is-active { color: var(--white); font-weight: 700; }
.pro-crew-status.is-inactive { color: #cfcfcf; }
.pro-crew-note { color: #cfcfcf; max-width: 40em; }
.pro-crew-data { margin: 0 0 32px; border-top: 2px solid var(--fg); }
.pro-crew-data > div { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pro-crew-data dt { font-weight: 700; color: var(--fg); }
.pro-crew-data dd { margin: 0; }
@media (max-width: 600px) { .pro-crew-data > div { grid-template-columns: 1fr; gap: 2px; } }

[data-theme="dark"] .pro-psd { border: 1px solid #222227; }
.pro-final-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; letter-spacing: -.02em; }
.pro-browser-badge svg { margin: 0; flex: none; }
.pro-chapter-n { color: #cfcfcf; }
.pro-chapter.is-current .pro-chapter-n { color: var(--red); }

/* Dla profesjonalistów: aktualności dla dekarzy */
.pro-news-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.pro-news-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--fg); }
.pro-news-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.pro-news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pro-news-card:hover .pro-news-img img { transform: scale(1.04); }
.pro-news-date { margin-top: 6px; font-size: .875rem; color: var(--grey); }
.pro-news-title { font: 700 1.125rem/1.3 var(--display); }
.pro-news-card:hover .pro-news-title { color: var(--red); }
@media (max-width: 1000px) { .pro-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pro-news-grid { grid-template-columns: 1fr; } }

/* opinia wskazana z kafla (?opinia=…): zaznaczona bez przewijania */
.reviews-list .review-card.is-picked, .review-top.is-picked figure { outline: 3px solid #F5B400; outline-offset: 4px; }
.review-item.is-picked { background: #FFF8E1; outline: 3px solid #F5B400; outline-offset: 6px; }
[data-theme="dark"] .review-item.is-picked { background: rgba(245, 180, 0, .08); }

/* objaśnienie hasła „Twój dach marzeń” w wersjach obcojęzycznych */
.dream-gloss { margin: .6em 0 1.2em; padding-left: 2.2%; color: #f0f0f0; font-size: clamp(1rem, 1.4vw, 1.1875rem); text-shadow: 0 2px 6px rgba(0,0,0,.5); }
@media (max-width: 760px) { .dream-gloss { padding-left: 0; } }

/* zdjęcie przy rozdziale o dostawach (strona dla profesjonalistów) */
.pro-chapter-photo { margin: 24px 0 0; }
.pro-chapter-photo img { width: 100%; height: auto; display: block; }
.pro-chapter-photo figcaption { margin-top: 10px; font: 700 1rem/1.35 var(--display); color: var(--fg); }

/* logotyp programu Ambitny Dekarz */
.pro-card-logo { width: 190px; height: auto; }
.pro-card-logo img { width: 100%; height: auto; display: block; }
.pro-ad-logo { background: #fff; padding: clamp(18px, 2.4vw, 32px); border-radius: 4px; }
.pro-ad-logo img { width: 100%; height: auto; display: block; }
@media (max-width: 800px) { .pro-ad-logo { max-width: 280px; } }

/* podstrony dla profesjonalistów: zdjęcie w szerokości treści, stałe proporcje (twarze w kadrze) */
.pro-photo-band { margin: clamp(32px, 5vw, 64px) 0; }
.pro-photo-band img { width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; object-position: 50% 28%; display: block; }

/* strona dla profesjonalistów: „Teraz Ty” – zachęta do kontaktu po opiniach */
.pro-join-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.pro-join-photo img { width: 100%; height: auto; display: block; }
.pro-join-copy h2 { font-size: clamp(2.75rem, 6vw, 5rem); font-weight: 900; line-height: .95; letter-spacing: -.025em; margin-bottom: .5em; }
.pro-join-copy h2 span { display: block; margin-top: .35em; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.15; letter-spacing: -.01em; color: var(--red); }
@media (max-width: 800px) { .pro-join-grid { grid-template-columns: 1fr; } }

.pro-photo-band-badge img { aspect-ratio: 7 / 5; object-position: 50% 0%; }

/* logo „AMBIT | Rekomendowana ekipa dekarska” (poziome) */
.crew-logo { display: block; width: 100%; height: auto; color: #111; }
.pro-card-crew { width: 300px; max-width: 100%; height: auto; padding-top: 30px; }
.pro-crew-panel { background: #fff; padding: clamp(20px, 2.6vw, 34px) clamp(18px, 2.4vw, 30px); border-radius: 4px; }
.pro-sub-hero-mark .pro-crew-panel svg { max-width: none; }
.pro-browser-badge .crew-logo { width: 220px; height: auto; transform: none; }
.badge-van .crew-logo { width: 100%; height: 100%; }

/* artykuły: zdjęcie główne bez przycinania (całe postaci w kadrze), w szerokości nieco większej niż tekst; zdjęcia w treści na pełną szerokość kolumny */
.article-figure { max-width: calc(1040px + 2 * var(--gutter)); margin: 0 auto clamp(32px, 5vw, 56px); }
.article-figure img { width: 100%; height: auto; max-height: none; object-fit: initial; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; height: auto; display: block; }
.prose figure figcaption { margin-top: 8px; font-size: .9375rem; color: var(--grey); }

/* bloki „Ambitny Dekarz” i „Rekomendowana ekipa”: cały blok jest odnośnikiem (rozciągnięty link przycisku) */
.pro-card { position: relative; cursor: pointer; }
.pro-card-cta::after { content: ""; position: absolute; inset: 0; }
.pro-card:hover .pro-card-cta { background: var(--red-dark); }

/* standard rekomendowanej ekipy: ptaszek obok nagłówka (jasnoczerwony kwadrat, czerwony ptaszek rysowany przy pojawieniu się) */
.pro-trait-h { display: flex; align-items: flex-start; gap: 14px; }
.pro-check { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-top: -3px; border-radius: 10px; background: rgba(237, 28, 36, .1); }
.pro-check svg { width: 22px; height: 22px; display: block; }
.pro-check path { fill: none; stroke: var(--red); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .55s var(--ease) .2s; }
.pro-chapter.is-in .pro-check path, html:not(.js) .pro-check path { stroke-dashoffset: 0; }
.pro-chapter.is-current .pro-check { background: var(--red); }
.pro-chapter.is-current .pro-check path { stroke: #fff; }
[data-theme="dark"] .pro-check { background: rgba(237, 28, 36, .18); }
@media (prefers-reduced-motion: reduce) { .pro-check path { stroke-dashoffset: 0; transition: none; } }

/* „Budujesz taki standard?” zaraz pod standardem: oddzielenie od szarej sekcji */
.pro-final-after-standard { padding-top: 0; }

/* zdjęcia w pasach podstron: zaokrąglone rogi */
.pro-photo-band img { border-radius: 14px; }

/* standard rekomendowanej ekipy w układzie historii: lista cech z ptaszkami po lewej, aktualnie czytana podświetlona */
.pro-standard .pro-story-head h2 { max-width: 16ch; }
.pro-standard-steps li { display: flex; align-items: center; gap: 10px; }
.pro-check-mini { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(0,0,0,.06); transition: background .35s var(--ease); }
.pro-check-mini svg { width: 15px; height: 15px; }
.pro-check-mini path { fill: none; stroke: var(--grey); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s var(--ease); }
.pro-standard-steps li.is-current .pro-check-mini { background: var(--red); }
.pro-standard-steps li.is-current .pro-check-mini path { stroke: #fff; }
.pro-standard .pro-chapter h3 { font-size: clamp(1.375rem, 2.2vw, 1.875rem); }
.pro-standard .pro-chapter p { padding-left: 50px; }
@media (max-width: 900px) { .pro-standard .pro-chapter p { padding-left: 0; } }

/* „Na zaufanie pracujesz każdym dachem.”: tekst ze zdjęciem obok */
.pro-intro-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.pro-intro-split h2 { font-size: clamp(1.875rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -.02em; }
.pro-intro-split p { font-size: 1.125rem; }
.pro-intro-photo { margin: 0; }
.pro-intro-photo img { width: 100%; height: auto; display: block; border-radius: 14px; }
@media (max-width: 800px) { .pro-intro-split { grid-template-columns: 1fr; } }
/* mały ptaszek na liście cech: bez szerokości po dawnych numerach */
.pro-story-steps li .pro-check-mini { display: grid; place-items: center; min-width: 0; }

/* artykuły: spójny układ redakcyjny – tekst 720 px, wszystkie zdjęcia 1040 px (równo wysunięte po obu stronach kolumny), zaokrąglone rogi */
.article-figure { max-width: calc(1040px + 2 * var(--gutter)); margin: 0 auto clamp(36px, 5vw, 64px); }
.article-figure img, .article-body figure img { border-radius: 14px; }
.article-body figure { margin: clamp(36px, 5vw, 56px) 0; }
@media (min-width: 1120px) { .article-body figure { margin-inline: -160px; } }

/* nagłówek rekomendacji: większe logo „Rekomendowana ekipa dekarska” (kolumna 450 px zamiast 300 px) */
.pro-sub-hero-grid:has(.pro-crew-panel) { grid-template-columns: minmax(0, 1fr) minmax(0, 450px); }
.pro-crew-panel { padding: clamp(26px, 3.2vw, 44px) clamp(22px, 3vw, 40px); }
@media (max-width: 800px) { .pro-sub-hero-grid:has(.pro-crew-panel) { grid-template-columns: 1fr; } .pro-crew-panel { max-width: 420px; } }

/* aktualności: zdjęcia z Facebooka (ok. 600 px) – zdjęcie główne bez powiększania, galeria miniatur pod tekstem, źródło zdjęć */
.article-figure-small { max-width: calc(720px + 2 * var(--gutter)); }
.article-figure-small img { width: auto; max-width: 100%; margin: 0 auto; }
.article-gallery { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.article-gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--paper); }
.article-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.article-gallery a:hover img { transform: scale(1.04); }
.article-credit { margin-top: 12px; font-size: .875rem; color: var(--grey); }
@media (max-width: 560px) { .article-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.prose .article-gallery { padding: 0; margin-left: 0; margin-right: 0; }
.prose .article-gallery li { margin: 0; padding: 0; }
.prose .article-gallery li::before { content: none; }

/* Pełnoekranowe kadry na telefonie: wysokość „dużego” ekranu (lvh), więc po schowaniu paska adresu Chrome zdjęcie
   nadal wypełnia ekran i nie odsłania czarnego tła; tekst na dole hero odsuwamy o wysokość paska (lvh − svh) */
@supports (height: 100lvh) {
  .hero-stage, .origins .origin, .origin-scroll .origin-photo, .house-bg-stick, .house-reveal .origins-dream .origin-dream { height: 100lvh; }
  .origins .origin-scroll .origin-scroll-copy { margin-top: -100lvh; }
  .hero-copy { padding-bottom: calc(100lvh - 100svh); }
}
@media (max-width: 900px) { @supports (height: 100lvh) { .hero-copy { padding-bottom: calc(max(6vh, 32px) + 100lvh - 100svh); } } }

/* Telefon w poziomie (niski ekran): mniejsze hasła, żeby mieściły się między nagłówkiem a dołem ekranu */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-copy { justify-content: flex-end; padding-bottom: calc(16px + 100lvh - 100svh); }
  .hero-copy > * { max-width: min(30rem, 55vw); }
  .hero-title { font-size: clamp(1.75rem, 10svh, 2.75rem); margin-bottom: .2em; }
  .hero-lead { font-size: .9375rem; line-height: 1.4; max-width: 44ch; }
  .hero-actions { margin-top: 8px; }
  .hero-actions .btn { min-height: 40px; padding: 0 14px; font-size: .875rem; }
  .origins .origin-copy, .origins .origin-dream .origin-copy { padding-block: calc(var(--header-h) + 12px) 16px; }
  .origin-text { font-size: clamp(1.5rem, 9svh, 2.5rem); max-width: 22ch; }
  .origin-dream .origin-copy { gap: 12px; }
  .dream-here { font-size: clamp(1.25rem, 8svh, 2rem); }
  .hero-after { font-size: clamp(1.25rem, 8svh, 2rem); }
}

/* Nagłówek chowany przy przewijaniu w dół, wraca przy przewijaniu w górę */
.site-header { transition: border-color .3s, background .3s, color .3s, transform .3s var(--ease); }
.site-header.is-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

/* Tekst historii na białym tle: jasna poświata wokół liter (sześć warstw koloru tła po 6 px) oddziela tekst od szkicu domu */
.story .chapter, .counter-numbers, .summary-text { text-shadow: 0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg); }

/* Stopka: profile w mediach społecznościowych */
.footer-social { display: flex; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: var(--white); transition: background .2s, color .2s, border-color .2s; }
.footer-social a:hover, .footer-social a:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.footer-social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* szkic domu: rynny z rurami spustowymi (rozdział o rynnach) i rodzina kreską w miejscu rodziny ze zdjęcia */
.house-sketch-svg .sk-gutter { stroke: #6A6A6A; stroke-width: 1.4; }
.house-sketch-svg .sk-fam .sk { stroke: #7A7A7A; stroke-width: var(--fw, 12); }
[data-theme="dark"] .house-sketch-svg .sk-gutter, [data-theme="dark"] .house-sketch-svg .sk-fam .sk { stroke: #C8C8CC; }

/* pierwszy kadr historii: doradca z inwestorami, kadr na rozmowie; krótsze zdanie pod hasłem */
.origin-advice .origin-photo img { object-position: 58% 50%; }
.origin-advice .origin-text { max-width: 19ch; font-size: clamp(2rem, 4.4vw, 4rem); }
.origin-sub { max-width: 34ch; margin: .9em 0 0; font: 500 clamp(1.15rem, 1.9vw, 1.6rem)/1.35 var(--body); color: var(--white); text-shadow: 0 2px 6px rgba(0,0,0,.55), 0 0 30px rgba(0,0,0,.45); }
@media (max-aspect-ratio: 1/1) { .origin-advice .origin-photo img { object-position: 47% 50%; } }

/* podsumowanie historii: zaproszenie zamiast powtórzonych liczb (hasło + zdanie pod nim) */
.summary-text { max-width: 22ch; font-size: clamp(2rem, 4.6vw, 4.4rem); line-height: 1.05; }
.summary-line.summary-text span:nth-child(n) { padding-left: 0; color: var(--fg); }
.summary-line.summary-text span:nth-child(2) { max-width: 40ch; margin-top: .9em; font: 500 clamp(1.15rem, 1.9vw, 1.6rem)/1.4 var(--body); letter-spacing: 0; }

/* rynna i rury spustowe od razu ciemne, pełną kreską (grubość jak na zdjęciu), z kolankami */
.house-sketch-svg .sk-gutter, .house-sketch-svg .sk-pipe { stroke: #2E3136; stroke-opacity: 1; stroke-linecap: butt; }
.house-sketch-svg [data-variant="pano"] .sk-gutter, .house-sketch-svg[data-variant="pano"] .sk-gutter { stroke-width: 4.5; }
.house-sketch-svg[data-variant="pano"] .sk-pipe { stroke-width: 3.6; }
.house-sketch-svg[data-variant="portrait"] .sk-gutter { stroke-width: 7; }
.house-sketch-svg[data-variant="portrait"] .sk-pipe { stroke-width: 6; }
[data-theme="dark"] .house-sketch-svg .sk-gutter, [data-theme="dark"] .house-sketch-svg .sk-pipe { stroke: #C8C8CC; }

/* podsumowanie wjeżdża dopiero, gdy „Lubimy te liczby” zdąży się przeczytać i zniknąć; w tym czasie rysuje się rodzina */
.house-reveal > .summary { padding-top: 55vh; padding-top: 55svh; }
.summary-text em { font-style: normal; }
.summary-text em.red { color: var(--red); }
.house-sketch-svg[data-variant="pano"] .sk-gutter { stroke-width: 6; }
.house-sketch-svg[data-variant="portrait"] .sk-gutter { stroke-width: 9; }
.summary-text { max-width: none; font-size: clamp(1.9rem, 3.3vw, 3.4rem); }
.house-reveal > .summary { padding-top: 80vh; padding-top: 80svh; }
.house-sketch-svg[data-variant="portrait"] .sk-gutter { stroke-width: 9.5; }

/* frazy, które mają zostać w jednej linii (na telefonie łamią się normalnie, bo by się nie zmieściły) */
@media (min-width: 700px) { .origin-text .nw, .summary-text .nw { white-space: nowrap; } }
.summary-line.summary-text span.nw { display: inline; max-width: none; margin: 0; font: inherit; letter-spacing: inherit; }

/* Tujsk: miejsce i rok mniejszym pismem pod hasłem; czerwone słowo bez kursywy */
.origin-text em.red { font-style: normal; color: var(--red); }
.origin-place { display: block; margin-top: .45em; font-size: .5em; letter-spacing: 0; }
/* większy odstęp między podsumowaniem a „Twój dach marzeń” */
.house-reveal > .summary { padding-bottom: 45vh; padding-bottom: 45svh; }

/* podsumowanie: zdanie pod hasłem w jednej linii, gdy się mieści */
@media (min-width: 700px) { .summary-line.summary-text span:nth-child(2) { max-width: none; white-space: nowrap; } }

/* logo Ambit przy „Twój dach marzeń”: na komputerze po lewej na wysokości hasła, na telefonie małe nad hasłem;
   przezroczystość ustawia main.js (--brand), żeby logo nie wchodziło na postacie rodziny */
.dream-brand { color: #111; opacity: var(--brand, 1); transition: opacity .35s ease; } /* oryginalne logo: czarny napis, czerwony daszek */
.dream-brand .logo { display: block; width: 100%; height: auto; }
@media (min-width: 901px) {
  .origins .origin-dream .origin-copy { position: relative; }
  .dream-brand { position: absolute; left: var(--gutter); top: calc(var(--header-h) + 10vh); width: clamp(170px, 16vw, 280px); }
}
@media (max-width: 900px) { .dream-brand { align-self: flex-end; width: 110px; margin-bottom: 4px; } }
.ref-video { margin-top: 20px; }

/* Galeria referencji: realizacje z filmem na górze, wyróżnione jasnym tłem i czerwoną kreską; najpierw film, pod nim miniatury */
.ref-media { display: grid; gap: 12px; min-width: 0; }
.ref-media .ref-video { margin-top: 0; }
.ref.ref-featured { padding: clamp(20px, 3vw, 40px); margin-bottom: 24px; background: var(--soft, #F4F3F1); border-top: 3px solid var(--red); }
.ref.ref-featured + .ref.ref-featured { margin-top: 0; }
.ref.ref-featured + .ref:not(.ref-featured) { border-top: 0; }
[data-theme="dark"] .ref.ref-featured { background: rgba(255,255,255,.05); }
@media (max-width: 800px) { .ref-featured .ref-media { order: -1; } } /* na telefonie film na samej górze realizacji */

/* ===== Ułatwienia dostępu: panel w nagłówku (razem z trybem ciemnym) ===== */
.a11y-menu { position: relative; }
.a11y-menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: background-color .2s; }
.a11y-menu summary::-webkit-details-marker { display: none; }
.a11y-menu summary:hover, .a11y-menu[open] summary { background: color-mix(in srgb, currentColor 10%, transparent); }
.a11y-menu summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a11y-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 290px; padding: 14px 16px 12px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.12); font-size: .9375rem; line-height: 1.3; }
[data-theme="dark"] .a11y-panel { background: #1E1E23; box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px var(--line); }
.a11y-h { margin: 0 0 6px; font: 700 1rem/1.2 var(--display); color: var(--fg); }
.a11y-row, .a11y-size { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 6px 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.a11y-size { cursor: default; }
.a11y-switch { flex: none; position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--field-line); transition: background-color .2s; }
.a11y-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.a11y-row[aria-pressed="true"] .a11y-switch { background: var(--red); }
.a11y-row[aria-pressed="true"] .a11y-switch::after { transform: translateX(16px); }
.a11y-size-btns { display: flex; gap: 4px; }
.a11y-size-btns button { min-width: 44px; height: 36px; padding: 0 6px; border: 1.5px solid var(--line); border-radius: 2px; background: none; color: var(--fg); font: 700 .9375rem/1 var(--display); cursor: pointer; }
.a11y-size-btns button[aria-pressed="true"] { border-color: var(--red); background: var(--red); color: #fff; }
.a11y-info { display: block; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--fg); font-size: .875rem; }
.a11y-row:focus-visible, .a11y-size-btns button:focus-visible, .a11y-menu summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* menu zwinięte (telefon i ciasny nagłówek): panel w treści menu, nie wysuwany */
@media (max-width: 900px) { .a11y-panel { position: static; width: auto; margin-top: 8px; box-shadow: none; } }
html.nav-compact .a11y-panel { position: static; width: auto; margin-top: 8px; box-shadow: none; }

/* Większy tekst: cała strona liczona w rem rośnie razem z korzeniem */
html[data-text="115"] { font-size: 115%; }
html[data-text="130"] { font-size: 130%; }

/* Wysoki kontrast: pełna czerń/biel tekstu, ciemniejsze linie i szarości, bez wyblakłych rozdziałów historii */
html.a11y-contrast { --ink: #000; --grey: #222; --line: #555; --field-line: #555; }
html.a11y-contrast[data-theme="dark"] { --ink: #fff; --fg: #fff; --grey: #ddd; --line: #aaa; --field-line: #aaa; --bg: #000; }
html.a11y-contrast .chapter, html.a11y-contrast .muted { opacity: 1; }
html.a11y-contrast .chapter-illus .il-thin { stroke: #555; }

/* Podkreślone linki */
html.a11y-links main a:not(.btn), html.a11y-links footer a:not(.btn), html.a11y-links .nav ul a { text-decoration: underline; text-underline-offset: .15em; }

/* Bez animacji (wybór w panelu; te same zasady co przy systemowym ograniczeniu ruchu) */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.js.reduce-motion [data-reveal], html.js.reduce-motion .summary-line span { opacity: 1; transform: none; }
html.reduce-motion .hero { height: auto; }
html.reduce-motion .hero-stage { position: relative; }
html.reduce-motion .family .fam > *, html.reduce-motion .fam-roof { stroke-dashoffset: 0; }
html.reduce-motion .family .fam { opacity: 1; transform: none; }
html.reduce-motion .chapter:first-child { transform: none; opacity: 1; }
html.reduce-motion .house-sketch .sk-photo { opacity: 1; }
html.reduce-motion .house-sketch .sk-lines { display: none; }
html.reduce-motion .chapter-illus .il { stroke-dashoffset: 0; }
html.reduce-motion .chapter-illus .il-text { opacity: 1; }
html.reduce-motion .pro-check path { stroke-dashoffset: 0; }
/* zdjęcia historii od razu w kolorze (bez przewijania nie nabierają koloru) */
html.reduce-motion .origin { --o: 1; }
@media (prefers-reduced-motion: reduce) { .origin { --o: 1; } }

/* Telefon: krótsza przerwa przed podsumowaniem, logo przy „Twój dach marzeń” po lewej, zdjęcie z biura z doradczynią */
@media (max-width: 900px) {
  .house-reveal > .summary { padding-top: 30svh; padding-bottom: 25svh; }
  .dream-brand { align-self: flex-start; }
}
@media (max-aspect-ratio: 1/1) { .origin-advice .origin-photo img { object-position: 66% 50%; } }

/* stopka: małe logo coztego.pl */
.footer-bottom { flex-wrap: wrap; align-items: center; }
.footer-coztego { display: block; opacity: .75; transition: opacity .2s; }
.footer-coztego:hover, .footer-coztego:focus-visible { opacity: 1; }
.footer-coztego svg { display: block; width: auto; height: 30px; }

/* menu na telefonie: otwarty panel ułatwień na całą szerokość menu */
@media (max-width: 900px) { .a11y-menu[open] { flex: 1 1 100%; } }
html.nav-compact .a11y-menu[open] { flex: 1 1 100%; }
@media (max-aspect-ratio: 1/1) { .origin-advice .origin-photo img { object-position: 47% 50%; } } /* telefon: kadr na parze klientów */

/* rodzina pod czerwonym daszkiem: ta sama kreska co w szkicu na zdjęciu, rysuje się, gdy pojawia się „Lubimy te liczby” */
.family .fam-line path { fill: none; stroke: var(--fg); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .25s; }
.story-counter.is-family .counter-family .fam-line path, .is-in .chapter-family-svg .fam-line path, .chapter-family-svg.is-in .fam-line path { stroke-dashoffset: 0; }
.counter-family .fam-line path { transition: stroke-dashoffset .3s var(--ease); }
.story-counter.is-family .counter-family .fam-line path { transition: stroke-dashoffset 1.4s var(--ease) .3s; }
@media (prefers-reduced-motion: reduce) { .family .fam-line path { stroke-dashoffset: 0; } }
html.reduce-motion .family .fam-line path { stroke-dashoffset: 0; }

/* ===== Wysoki kontrast (panel ułatwień): wyraźnie mocniejszy niż zwykły wygląd ===== */
html.a11y-contrast { --ink: #000; --fg: #000; --grey: #000; --line: #000; --field-line: #000; }
html.a11y-contrast[data-theme="dark"] { --ink: #fff; --fg: #fff; --grey: #fff; --line: #fff; --field-line: #fff; --bg: #000; --paper: #000; }
/* jasnoszare napisy na ciemnych tłach (stopka, ciemne sekcje, opinie na zdjęciu) w pełnej bieli */
html.a11y-contrast .footer-bottom, html.a11y-contrast .footer-tel, html.a11y-contrast .footer-newsletter p, html.a11y-contrast .test-bar,
html.a11y-contrast .process, html.a11y-contrast .callout, html.a11y-contrast .cat a:hover .cat-desc,
html.a11y-contrast .review-lead blockquote p, html.a11y-contrast .review-lead .review-meta, html.a11y-contrast .review-lead .review-meta strong,
html.a11y-contrast .review-lead .review-orig summary, html.a11y-contrast .review-lead .review-orig blockquote p,
html.a11y-contrast .first-roof-label, html.a11y-contrast .first-roof-lead { color: #fff !important; }
/* napisy na zdjęciach: zdjęcie mocno przyciemnione pod tekstem (zamiast bloków, które przy łamaniu wierszy
   wychodziły poza tekst), napisy białe z wyraźnym cieniem */
html.a11y-contrast .origins .origin::after, html.a11y-contrast .origin-scroll .origin-photo::after,
html.a11y-contrast .house-reveal .origin-dream::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.62) !important; }
html.a11y-contrast .origin-text, html.a11y-contrast .origin-sub, html.a11y-contrast .dream-here, html.a11y-contrast .dream-gloss, html.a11y-contrast .hero-after {
  color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; }
html.a11y-contrast .dream-brand { color: #fff; }
/* teksty historii i podsumowania na pełnym tle strony (nie giną na szkicu ani zdjęciu), wszystkie w pełni widoczne */
html.a11y-contrast .story .chapter > *, html.a11y-contrast .summary-text > span {
  background: var(--bg); text-shadow: none; padding: .1em .25em; }
html.a11y-contrast .chapter { opacity: 1; }
html.a11y-contrast .house-sketch-svg .sk { stroke: #000; stroke-opacity: 1; }
html.a11y-contrast[data-theme="dark"] .house-sketch-svg .sk { stroke: #fff; }
html.a11y-contrast .chapter-illus .il, html.a11y-contrast .chapter-illus .il-thin { stroke: var(--fg); }
/* wyraźna obwódka zaznaczenia z klawiatury */
html.a11y-contrast :focus-visible { outline: 3px solid var(--fg) !important; outline-offset: 3px; }
html.a11y-contrast .btn-line { border-width: 2px; }

/* przycisk panelu: ludzik | księżyc w jednej pigułce */
.a11y-menu summary { display: flex; align-items: center; gap: 6px; width: auto; height: 40px; padding: 0 10px; border: 1.5px solid currentColor; border-radius: 20px; }
.a11y-menu summary svg { width: 20px; height: 20px; }
.a11y-sep { width: 1.5px; height: 18px; background: currentColor; opacity: .45; }
.a11y-menu summary .theme-sun { display: none; }
[data-theme="dark"] .a11y-menu summary .theme-moon { display: none; }
[data-theme="dark"] .a11y-menu summary .theme-sun { display: block; color: #F5B400; }

/* ---------- Opinie o produktach ---------- */
/* Gwiazdki: złoto zamiast czerwieni (czerwień to akcent marki i błędy); kontrast gwiazdek ≥ 3:1 (grafika), tekstu ≥ 4,5:1 */
:root {
  --star: #B57A00;
  --star-off: #8A8A8A;
  --prv-ok: #0F6B2F;
  --prv-tag-public-bg: transparent;
  --prv-tag-private-bg: var(--ink);
  --prv-tag-private-fg: var(--bg);
}
:root[data-theme="dark"] { --star: #FFC233; --star-off: #777; --prv-ok: #6EE7A0; }

.prv [hidden] { display: none !important; }
.prv-item, .prv-form, .prv-dlg { overflow-wrap: anywhere; }   /* długie słowa i adresy nie rozpychają strony na telefonie */
.prv fieldset { min-width: 0; }                               /* fieldset domyślnie nie zwęża się poniżej treści */

/* gwiazdki oceny: pięć znaków ★, wypełnienie proporcjonalne do --prv (np. 4.6) */
.prv-stars { display: inline-block; line-height: 1; white-space: nowrap; vertical-align: middle; }
.prv-stars > span { display: inline-block; letter-spacing: .08em; background: linear-gradient(90deg, var(--star) calc(var(--prv) / 5 * 100%), var(--star-off) 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prv-stars-sm { font-size: 1rem; }
.prv-stars-md { font-size: 1.25rem; }
.prv-stars-lg { font-size: 1.75rem; }

/* pod nazwą produktu */
.prv-mini { margin: -.1em 0 0; }
.prv-mini a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-weight: 600; }
.prv-mini a:hover .prv-mini-avg, .prv-mini a:hover > :last-child { text-decoration: underline; }
.prv-mini a[data-prv-write] { text-decoration: underline; text-decoration-color: var(--red); }

/* sekcja */
.prv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.prv-head .section-title { margin: 0; }
.prv-status { margin: 0 0 24px; }
.prv-summary { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 420px); gap: 16px 48px; align-items: center; margin-bottom: 24px; }
.prv-avg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.prv-avg-num { font: 900 clamp(2.5rem, 5vw, 3.5rem)/1 var(--display); color: var(--fg); }
.prv-count { color: var(--grey); font-weight: 600; }
.prv-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prv-dist li { display: grid; grid-template-columns: 3em minmax(0, 1fr) 2.5em; align-items: center; gap: 10px; font-size: .9375rem; }
.prv-dist-n { white-space: nowrap; }
.prv-dist-c { text-align: right; color: var(--grey); }
.prv-bar { display: block; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.prv-bar > span { display: block; height: 100%; background: var(--fg); border-radius: 4px; }
.prv-empty { font-size: 1.125rem; margin-bottom: 16px; }
.prv-omnibus { max-width: 60em; }
.prv-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 16px; }
.prv-sort label { font-weight: 600; }
.prv-sort select { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--field-line); border-radius: 2px; background: var(--bg); color: var(--ink); font: inherit; max-width: 100%; }
.prv-sort .btn { min-height: 44px; }

/* lista opinii */
.prv-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.prv-item { border-top: 1px solid var(--line); padding: 24px 0; }
.prv-item:focus { outline: none; }
.prv-item:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.prv-item:target { background: color-mix(in srgb, var(--star) 8%, transparent); }
.prv-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 6px; }
.prv-item-title { font-size: 1.25rem; line-height: 1.25; margin: 0; }
.prv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 10px; font-size: .875rem; color: var(--grey); }
.prv-author { font-weight: 700; color: var(--fg); }
.prv-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--prv-ok); font-weight: 700; }
.prv-badge svg { flex: none; }
.prv-body p { margin: 0 0 .7em; }
.prv-body p:last-child { margin-bottom: 0; }
.prv-photos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.prv-photos a { display: block; border-radius: 2px; overflow: hidden; }
.prv-photos img { width: 96px; height: 96px; object-fit: cover; background: var(--paper); transition: transform .3s var(--ease); }
.prv-photos a:hover img { transform: scale(1.04); }
.prv-reply { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--red); background: var(--paper); }
.prv-reply-h { margin: 0 0 4px; font-size: .875rem; color: var(--grey); }
.prv-reply-h strong { color: var(--fg); }
.prv-reply-body p { margin: 0 0 .6em; }
.prv-reply-body p:last-child { margin-bottom: 0; }
.prv-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.prv-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.prv-vote-q { font-size: .875rem; color: var(--grey); }
.prv-vote-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--fg); border-radius: 22px; background: transparent; color: var(--fg); font: 600 .9375rem/1 var(--body); cursor: pointer; transition: background .2s, color .2s; }
.prv-vote-btn:hover { background: var(--fg); color: var(--bg); }
.prv-vote-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); cursor: default; opacity: 1; }
.prv-vote-btn[aria-pressed="true"] .prv-thumb path { fill: currentColor; }
.prv-vote-btn:disabled:not([aria-pressed="true"]) { opacity: .6; cursor: progress; }
.prv-vote-n { font-variant-numeric: tabular-nums; }
.prv-report-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; color: var(--grey); }
.prv-more-wrap { margin: 24px 0 0; }

/* formularz opinii */
.prv-write { margin-top: 32px; }
.prv-write > summary { list-style: none; width: max-content; max-width: 100%; }
.prv-write > summary::-webkit-details-marker { display: none; }
.prv-write[open] > summary { margin-bottom: 16px; }
.prv-form { max-width: 760px; }
.prv-form > .btn[type=submit] { width: auto; min-width: 240px; }
.prv-fs { margin: 0 0 20px; padding: 16px clamp(14px, 3vw, 24px) 4px; border-radius: 2px; }
.prv-fs-public { border: 1px solid var(--line); background: var(--bg); }
.prv-fs-private { border: 2px dashed var(--field-line); background: var(--paper); }
.prv-fs > legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 6px; font-weight: 700; color: var(--fg); }
.prv-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; line-height: 1.3; }
.prv-tag-public { background: var(--prv-tag-public-bg); color: var(--fg); border: 1.5px solid var(--fg); }
.prv-tag-private { background: var(--prv-tag-private-bg); color: var(--prv-tag-private-fg); border: 1.5px solid var(--prv-tag-private-bg); }
.prv-tag svg { flex: none; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.prv .field input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 2px; flex: none; accent-color: var(--red); }
.prv-counter { margin: 4px 0 0; text-align: right; }
.prv-form .field .small { margin: 6px 0 0; }
.prv-form > .small, .prv-fs > .small { margin: 0 0 14px; }

/* ocena gwiazdkami: przyciski radio ukryte, ale dostępne z klawiatury (strzałki); wybrana gwiazdka i wszystkie przed nią pełne,
   pozostałe puste (kształt, nie tylko kolor) */
.prv-stars-input { position: relative; display: inline-flex; gap: 0; }
.prv .prv-stars-input input[type=radio] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.prv-stars-input label { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: transparent; -webkit-text-stroke: 1.5px var(--star-off); transition: color .15s, -webkit-text-stroke-color .15s; }
.prv-stars-input input:focus-visible + label { outline: 3px solid var(--red); outline-offset: -2px; border-radius: 4px; }
.prv-stars-input:has(input[value="1"]:checked) label:nth-of-type(-n+1),
.prv-stars-input:has(input[value="2"]:checked) label:nth-of-type(-n+2),
.prv-stars-input:has(input[value="3"]:checked) label:nth-of-type(-n+3),
.prv-stars-input:has(input[value="4"]:checked) label:nth-of-type(-n+4),
.prv-stars-input:has(input[value="5"]:checked) label:nth-of-type(-n+5),
.prv-stars-input label:hover, .prv-stars-input label:has(~ label:hover) { color: var(--star); -webkit-text-stroke-color: var(--star); }
.prv .prv-stars-input:hover label:hover ~ label:nth-of-type(n) { color: transparent; -webkit-text-stroke-color: var(--star-off); }
.prv-rating-out { display: block; min-height: 1.5em; font-weight: 600; color: var(--fg); }
.prv-rating.is-invalid .prv-stars-input { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

/* zgłoszenie opinii: okno i strona */
.prv-report-about { font-weight: 700; color: var(--fg); }
.prv-report-about:empty { display: none; }
.prv-report-form .btn[type=submit] { width: 100%; }
.prv-page-title { font-size: clamp(2rem, 5vw, 3.5rem); max-width: 22ch; overflow-wrap: anywhere; }
.prv-page .prv-report-form { margin-top: 24px; }
.prv-orig { margin: 10px 0 0; }
/* moderacja linkiem dla marketingu (/opinia/moderuj) */
.prv-mod-done { padding: 10px 14px; border-left: 3px solid var(--red); background: var(--paper); }
.prv-mod-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 20px 0; font-size: .9375rem; }
.prv-mod-facts dt { color: var(--grey); }
.prv-mod-facts dd { margin: 0; overflow-wrap: anywhere; }
.prv-mod-review { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prv-mod-review .prv-photos li { display: flex; flex-direction: column; gap: 4px; }
.prv-mod-review .prv-photos img { width: 160px; height: 120px; object-fit: cover; }
.prv-mod-form { margin-top: 20px; }
.prv-mod-form textarea { width: 100%; }
.prv-mod-form .hero-actions { flex-wrap: wrap; gap: 10px; }
.prv-mod-help { font-size: .8125rem; color: var(--grey); max-width: 70ch; }
@media (max-width: 520px) { .prv-mod-facts { grid-template-columns: 1fr; } .prv-mod-facts dt { margin-top: 6px; } }
.prv-report-review { margin-top: 20px; }
.prv-report-quote { margin: 8px 0 0; padding: 10px 16px; border-left: 3px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
.prv-confirm-err { display: block; margin: 16px 0 0; }

/* kafle produktów: średnia ocena pod nazwą */
.card-rating { display: flex; align-items: center; gap: 6px; padding: 0 18px 14px; margin-top: -4px; font-size: .875rem; color: var(--grey); }
.cards-small .card-rating { margin-top: -10px; }
.prv-card-note { margin: 10px 0 0; }

/* telefon (360 px): podsumowanie w kolumnie, przyciski na całą szerokość */
@media (max-width: 640px) {
  .prv-summary { grid-template-columns: minmax(0, 1fr); }
  .prv-head .btn, .prv-write > summary, .prv-more-wrap .btn, .prv-form > .btn[type=submit] { width: 100%; min-width: 0; }
  .prv-actions { align-items: flex-start; }
  .prv-photos img { width: 72px; height: 72px; }
  .prv-stars-input label { width: 44px; }
}

/* wymuszone kolory systemu (Windows): wypełnienie proporcjonalne do oceny kolorami systemu (pełne = CanvasText,
   puste = sam obrys), więc 1/5 nie wygląda jak 5/5; w formularzu puste gwiazdki obrysem, wybrane w kolorze Highlight */
@media (forced-colors: active) {
  .prv-stars > span { forced-color-adjust: none; background: linear-gradient(90deg, CanvasText calc(var(--prv) / 5 * 100%), Canvas 0); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px CanvasText; }
  .prv-stars-input label { forced-color-adjust: none; color: Canvas; -webkit-text-stroke-color: CanvasText; }
  .prv .prv-stars-input:hover label:hover ~ label:nth-of-type(n) { color: Canvas; -webkit-text-stroke-color: CanvasText; }
  .prv-stars-input label:hover, .prv-stars-input label:has(~ label:hover),
  .prv-stars-input:has(input[value="1"]:checked) label:nth-of-type(-n+1),
  .prv-stars-input:has(input[value="2"]:checked) label:nth-of-type(-n+2),
  .prv-stars-input:has(input[value="3"]:checked) label:nth-of-type(-n+3),
  .prv-stars-input:has(input[value="4"]:checked) label:nth-of-type(-n+4),
  .prv-stars-input:has(input[value="5"]:checked) label:nth-of-type(-n+5) { color: Highlight; -webkit-text-stroke-color: Highlight; }
  .prv-stars-input input:focus-visible + label { outline-color: Highlight; }
  .prv-bar { border: 1px solid CanvasText; }
  .prv-bar > span { background: CanvasText; forced-color-adjust: none; }
}

/* tryb ciemny */
[data-theme="dark"] .prv-fs-public { background: transparent; }
[data-theme="dark"] .prv-photos img { background: #1E1E23; }
[data-theme="dark"] .prv-sort select { background: #101013; color: var(--fg); }

/* wysoki kontrast: gwiazdki w kolorze tekstu, puste z obrysem (szarość w tym trybie jest czarna), grubsze ramki */
html.a11y-contrast .prv, html.a11y-contrast .card-rating, html.a11y-contrast .prv-mini { --star: var(--fg); --star-off: var(--bg); --prv-ok: var(--fg); }
html.a11y-contrast .prv-stars > span { -webkit-text-stroke: 1px var(--fg); }
html.a11y-contrast .prv-stars-input label { -webkit-text-stroke: 2px var(--fg); }
html.a11y-contrast .prv-fs, html.a11y-contrast .prv-fs-private { border-width: 2px; border-color: var(--fg); }
html.a11y-contrast .prv-tag, html.a11y-contrast .prv-vote-btn { border-width: 2px; }
html.a11y-contrast .prv-tag-private { background: var(--fg); color: var(--bg); border-color: var(--fg); }
html.a11y-contrast .prv-bar { background: var(--bg); box-shadow: inset 0 0 0 1px var(--fg); }
html.a11y-contrast .prv-stars-input input:focus-visible + label { outline-color: var(--fg); }
html.a11y-contrast[data-theme="dark"] .prv, html.a11y-contrast[data-theme="dark"] .card-rating, html.a11y-contrast[data-theme="dark"] .prv-mini { --star: #fff; --star-off: #000; --prv-ok: #fff; }
html.a11y-contrast[data-theme="dark"] .prv-fs-private { background: #000; }

/* bez animacji: panel ułatwień i ustawienie systemu */
html.reduce-motion .prv *, html.reduce-motion .prv-mini * { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .prv *, .prv-mini * { transition: none; animation: none; } }

/* strona główna: „Wykonujesz następny dach?” pod „pierwszym dachem”: ten sam układ (zdjęcie | blok), niebieski zamiast czerwonego; dekarz patrzy w stronę tekstu */
.first-roof-pro .first-roof-card { background: linear-gradient(135deg, #12304F 0%, #1D4A74 38%, #2A5E8C 52%, #1C456D 66%, #102A45 100%); }
.first-roof-pro .first-roof-img img { object-position: 35% 30%; }
.first-roof-pro .first-roof-cta { color: #1D4A74; }
.first-roof-pro .first-roof-cta:hover { background: #111; border-color: #111; color: #fff; }
.first-roof-pro .first-roof-card:hover .first-roof-cta:not(:hover) { background: #fff; color: #1D4A74; border-color: #fff; }
/* „Pierwszy dach” obok siebie: najpierw czerwony blok, potem zdjęcie (na telefonie bez zmian: zdjęcie nad tekstem) */
@media (min-width: 901px) {
  .first-roof:not(.first-roof-pro) .first-roof-card { grid-template-columns: minmax(400px, 1fr) minmax(0, 1.15fr); }
  .first-roof:not(.first-roof-pro) .first-roof-img { order: 2; }
  .first-roof:not(.first-roof-pro) .first-roof-body { padding: clamp(36px, 4vw, 64px) clamp(56px, 7vw, 120px) clamp(36px, 4vw, 64px) clamp(36px, 4.5vw, 72px); }
}
@media (max-width: 1100px) and (min-width: 901px) { .first-roof:not(.first-roof-pro) .first-roof-card { grid-template-columns: 1fr 1fr; } }
/* strona główna: nadtytuł nad hasłem w hero */
.hero-eyebrow { font: 700 .8125rem/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 1em; }
@media (max-width: 900px) { .hero-copy .hero-eyebrow { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); } }
.section-head p a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
.section-head p a:hover { color: var(--red); }
/* oklejenie aut ekip rekomendowanych: główne zdjęcie i dwa mniejsze (grafiki na białym tle) */
.pro-cars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; align-items: end; }
.pro-cars img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.pro-cars img:first-child { grid-column: 1 / -1; }
[data-theme="dark"] .pro-cars img { mix-blend-mode: normal; background: #fff; border-radius: 10px; }
/* telefon: kadr Bazyliki Mariackiej przesunięty tak, żeby przy prawej krawędzi był fragment dużej wieży */
@media (max-width: 700px) and (orientation: portrait) { .origins .origin-big .origin-photo img { object-position: 72% 45%; } }
/* telefon: panorama prezentacji blach powoli przesuwa się od pary klientów do doradcy i z powrotem (bez ruchu przy ograniczeniu animacji) */
@keyframes origin-pan { from { object-position: 22% 50%; } to { object-position: 68% 50%; } }
@media (max-aspect-ratio: 1/1) and (prefers-reduced-motion: no-preference) {
  html:not(.reduce-motion) .origin-advice .origin-photo img { animation: origin-pan 14s ease-in-out infinite alternate; }
}

/* podpis zdjęcia bazyliki: krój i wielkość jak .origin-sub, zawsze w jednej linii (na telefonie mniejszy) */
.origin-caption { display: block; margin-top: .9em; font: 500 min(clamp(1.15rem, 1.9vw, 1.6rem), 3.9vw)/1.35 var(--body); letter-spacing: 0; white-space: nowrap; }
/* krótkie cytaty z opinii Google na zdjęciach strony głównej */
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/playfair-500i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/playfair-500i-latinext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Playfair Display"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/playfair-500i-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* gwiazdki, cytat kursywą szeryfową, autor i źródło coraz mniejszym krojem bezszeryfowym */
.review-quote { margin: 0; color: var(--white); text-shadow: 0 2px 6px rgba(0,0,0,.55), 0 0 30px rgba(0,0,0,.45); }
.review-quote-stars { margin: 0; color: #f5b400; letter-spacing: .12em; font-size: clamp(1rem, 1.4vw, 1.3rem); }
.review-quote blockquote { margin: .3em 0 .55em; }
.review-quote blockquote p { margin: 0; font: italic 500 clamp(1.6rem, 2.8vw, 2.6rem)/1.2 "Playfair Display", Georgia, "Times New Roman", serif; letter-spacing: 0; }
.review-quote q:lang(pl) { quotes: "„" "”" "«" "»"; }
.review-quote-meta { display: block; font: 500 clamp(1rem, 1.3vw, 1.2rem)/1.35 var(--body); }
.review-quote-src { display: block; margin-top: .15em; font: 400 clamp(.8rem, .95vw, .9rem)/1.35 var(--body); opacity: .85; }
.origin-review { margin-top: 1.6em; }
.hero-review { position: absolute; left: 50%; top: 50%; z-index: 2; width: min(40rem, calc(100vw - 2 * var(--gutter))); text-align: center; opacity: calc((var(--p) - .55) * 3); transform: translate(-50%, calc(-50% + (1 - var(--p)) * 40px)); pointer-events: none; }
html.a11y-contrast .review-quote { color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; }
/* Oferta na stronie głównej: miniatura kategorii po lewej */
.offer-list a.has-thumb { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.1fr) 40px; padding: 18px 0; }
.offer-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; background: var(--paper); transition: transform .45s var(--ease); }
.offer-list a:hover .offer-thumb, .offer-list a:focus-visible .offer-thumb { transform: scale(1.04); }
@media (max-width: 700px) {
  .offer-list a.has-thumb { grid-template-columns: 72px 1fr 28px; gap: 4px 14px; padding: 14px 0; }
  .offer-list a.has-thumb .offer-thumb { grid-row: 1 / span 2; width: 72px; height: 72px; }
  .offer-list a.has-thumb .offer-desc { grid-column: 2; }
  .offer-list a.has-thumb .offer-arrow { grid-column: 3; }
}
/* Oferta: pod kaflami kategorii logotypy producentów (jak na stronie głównej) */
.offer-producers { padding-top: 0; }
.offer-producers .section-title a { color: inherit; text-decoration: none; }
.offer-producers .section-title a:hover { color: var(--red); }
/* Oferta: 9 kategorii w siatce 3 × 3 (na telefonie 2 albo 1 kolumna) */
.cards-offer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .cards-offer { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .cards-offer { grid-template-columns: 1fr; } }
/* logotypy producentów z małą nazwą pod spodem (strona główna, oferta) */
.logo-strip li { height: auto; min-height: 72px; }
.logo-strip a { grid-template-rows: 44px auto; gap: 6px; padding: 10px 8px 8px; }
.logo-name { font-size: .75rem; line-height: 1.2; color: var(--grey); text-align: center; overflow-wrap: anywhere; }
.logo-strip a:hover .logo-name, .logo-strip a:focus-visible .logo-name { color: var(--fg); text-decoration: underline; }
.logo-strip { align-items: stretch; }
.logo-strip a { align-content: center; }
@media (max-width: 560px) { .logo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .logo-strip img { height: 34px; } .logo-strip a { grid-template-rows: 34px auto; padding: 8px 4px 6px; } }
/* opinia Piotra: do prawej krawędzi głównej kolumny (nie do krawędzi ekranu) */
.origin-review { width: fit-content; max-width: 100%; margin-left: auto; text-align: right; }
/* telefon: większy cytat opinii na zdjęciu startowym */
@media (max-width: 700px) {
  .hero-review blockquote p { font-size: clamp(1.9rem, 8.4vw, 2.4rem); }
  .hero-review .review-quote-stars { font-size: 1.2rem; }
  .hero-review .review-quote-meta { font-size: 1.1rem; }
  .hero-review .review-quote-src { font-size: .9rem; }
}
/* telefon: pytanie pod zdjęciem startowym w 3 wierszach (podział <br class="br-narrow">), każdy mieści się w kolumnie */
@media (max-width: 700px) { .hero-after { font-size: min(2rem, 5.7vw); } }
/* opinia Piotra niżej, z większym odstępem od „Najpierw trzeba dobrać materiały…” */
.origin-review { margin-top: 3em; }
/* telefon: opinia Piotra większa i dalej od nagłówka */
@media (max-width: 700px) {
  .origin-review { margin-top: 4.5em; }
  .origin-review blockquote p { font-size: clamp(1.7rem, 7.2vw, 2.2rem); }
  .origin-review .review-quote-stars { font-size: 1.2rem; }
  .origin-review .review-quote-meta { font-size: 1.1rem; }
  .origin-review .review-quote-src { font-size: .9rem; }
}
/* telefon: „I zaraz potem czterech / kolejnych w Kolbudach.” w dwóch wierszach, a zdjęcie z Kolbud powoli przesuwa się w bok */
@media (max-width: 700px) {
  .origin-scroll .origin-text { font-size: min(2.25rem, 8.1vw); max-width: none; }
  .origin-scroll .origin-text .nw { white-space: nowrap; }
}
@media (max-aspect-ratio: 1/1) and (prefers-reduced-motion: no-preference) {
  html:not(.reduce-motion) .origin-photo-old img { animation: origin-pan 16s ease-in-out infinite alternate; }
}
/* „Twój dach marzeń” tekstem (zamiast SVG): rozmiar jak dawne logo, „dach” biały na czerwonym prostokącie */
.dream .tdm { display: block; font: 700 clamp(1.79rem, 5.3vw, 4.6rem)/1.2 var(--display); letter-spacing: 0; white-space: nowrap; color: var(--white); }
.tdm-dach { display: inline-block; padding: .1em .21em .14em; line-height: .96; background: #EC1C24; color: #fff; text-shadow: none; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
@media (min-width: 901px) { .origin-dream .dream .tdm { font-size: clamp(1.9rem, 4.08vw, 3.83rem); } }
@media (max-width: 900px) {
  /* telefon: logo Ambit w jednym wierszu z hasłem, tej samej wysokości co czerwony prostokąt pod „dach” */
  .dream-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
  .dream-row .dream-brand { flex: none; align-self: flex-start; width: auto; margin: 0; font-size: clamp(1.79rem, 5.3vw, 4.6rem); }
  .dream-row .dream-brand .logo { width: auto; height: 1.2em; }
  .dream-row .dream { text-align: right; }
}
@media (orientation: landscape) and (max-height: 500px) { .dream .tdm, .origin-dream .dream .tdm, .dream-row .dream-brand { font-size: min(4.5vw, 11.2svh); } }
/* telefon: „Nasza historia zaczęła się / od pierwszego dachu.” i „Dla wszystkich pokoleń.” bez łamania wewnątrz wiersza */
@media (max-width: 700px) {
  .origin-text .nw { white-space: nowrap; }
  .origin:not(.origin-scroll):not(.origin-advice) .origin-text { font-size: min(2.25rem, 7.4vw); max-width: none; }
}
/* telefon/tablet: oddziały na całą szerokość stopki, numer telefonu w jednym wierszu; logo coztego obok linków, nie pod nimi */
@media (max-width: 900px) {
  .footer-top .footer-wide { grid-column: 1 / -1; }
  .footer-tel { white-space: nowrap; }
  .footer-bottom { flex-wrap: wrap; align-items: flex-end; }
  .footer-bottom > p:first-child { flex: 1 0 100%; }
  .footer-bottom > p:nth-child(2) { flex: 1 1 0; min-width: 0; }
  .footer-bottom .footer-made { flex: none; margin-left: auto; }
}
/* „Wyceń dach” zawsze widoczny w górnej belce: w pełnym menu jako .nav-cta, przy menu rozwijanym jako .header-cta obok przycisku menu */
.header-cta { display: none; white-space: nowrap; }
@media (min-width: 901px) { html:not(.nav-compact) .nav-cta { display: inline-flex; } }
@media (max-width: 900px) {
  .nav-cta { display: none; }
  .header-cta { display: inline-flex; margin-left: auto; min-height: 40px; padding: 0 14px; font-size: .9375rem; }
  .header-in { gap: 12px; }
}
html.nav-compact .nav-cta { display: none; }
html.nav-compact .header-cta { display: inline-flex; margin-left: auto; min-height: 42px; padding: 0 18px; }
.page-home .site-header.on-photo .header-cta { background: var(--white); color: var(--black); }
/* Rolki YouTube (pion 9:16): miniatura z /assets/img/yt, odtwarzacz po kliknięciu (parts/yt.php) */
.video-short { aspect-ratio: 9 / 16; border-radius: 12px; }
.video-short .video-play { width: 58px; height: 58px; }
.video-short .video-play::after { left: 23px; top: 17px; border-left-width: 17px; border-top-width: 12px; border-bottom-width: 12px; }
.video-frame-short { aspect-ratio: 9 / 16; border-radius: 12px; background: #000; }
.pro-media-video .video, .pro-media-video .video-frame { border-radius: 14px; }
.shorts { display: grid; gap: 16px; }
/* referencje: cztery rolki obok siebie, na telefonie przewijane w bok */
.refs-shorts { padding-bottom: 0; }
.refs-shorts-title { margin: 0 0 20px; font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
.shorts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .shorts-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .shorts-row > * { scroll-snap-align: start; }
}
/* dla profesjonalistów: dwie rolki obok opinii fachowców */
.roofer-proof-grid { margin-top: 32px; }
.roofer-proof-grid .roofer-quotes { margin: 0; }
.roofer-proof-grid.has-shorts { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.roofer-proof-grid.has-shorts .roofer-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roofer-proof-shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1000px) {
  .roofer-proof-grid.has-shorts { grid-template-columns: 1fr; }
  .roofer-proof-shorts { position: static; max-width: 440px; }
}
@media (max-width: 640px) { .roofer-proof-grid.has-shorts .roofer-quotes { grid-template-columns: 1fr; } }
/* zajawka i podstrona „Pokażmy Twoją pracę” */
.pro-media-teaser h2 { margin-top: 6px; }
.pro-media-teaser .btn { margin-top: 8px; }
.pro-sub-hero-grid.pro-media-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); }
.pro-media-hero-video .video { box-shadow: 0 18px 40px rgba(0,0,0,.45); }
@media (max-width: 800px) { .pro-sub-hero-grid.pro-media-hero { grid-template-columns: 1fr; } .pro-media-hero-video { max-width: 220px; } }
.pro-media-intro { font-size: 1.25rem !important; font-weight: 600; margin-bottom: 28px; }
.pro-media-who-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(32px, 6vw, 88px); align-items: start; }
.pro-media-who-text { display: grid; gap: clamp(28px, 4vw, 48px); }
.pro-media-who-text h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 900; letter-spacing: -.015em; }
.pro-media-who-text p { font-size: 1.0625rem; max-width: 40em; }
.pro-media-shorts { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 800px) { .pro-media-who-grid { grid-template-columns: 1fr; } .pro-media-shorts { position: static; max-width: 260px; } }
.pro-media-web .pro-split { align-items: start; }
.pro-media-contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(32px, 6vw, 88px); align-items: center; }
.pro-media-contact-grid h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); font-weight: 900; letter-spacing: -.015em; }
.pro-media-contact-grid p { font-size: 1.0625rem; max-width: 38em; }
.pro-media-contact-grid .btn { margin-top: 8px; }
.pro-person { margin: 0; }
.pro-person img { display: block; width: 100%; height: auto; border-radius: 14px; }
.pro-person figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.pro-person-name { font: 700 1.25rem/1.2 var(--display); }
.pro-person-role { color: var(--grey); }
.pro-person-reach { margin-top: 10px; font-weight: 700; }
.pro-person-mail { color: var(--red); font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 800px) { .pro-media-contact-grid { grid-template-columns: 1fr; } .pro-person { max-width: 340px; } }
/* Galeria referencji: filtry, realizacje wyróżnione (z filmem) i siatka pozostałych; każda realizacja ma podstronę */
.refs { padding-top: clamp(32px, 4vw, 48px); }
.refs-filter { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.refs-filter .filters { margin: 0; }
.chip-n { opacity: .55; font-weight: 400; margin-left: 2px; }
.refs-group + .refs-group { margin-top: clamp(40px, 5vw, 64px); }
.refs-group-title { margin: 0 0 20px; font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
.refs-featured { display: grid; gap: 24px; }
.refs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
@media (max-width: 1000px) { .refs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .refs-grid { grid-template-columns: 1fr; } }
.ref-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ref-card[hidden], .refs-group[hidden] { display: none; }
.ref-card-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ref-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.ref-card h3 a { color: inherit; text-decoration: none; }
.ref-card h3 a:hover { color: var(--red); }
.ref-date { margin: 0; color: var(--grey); font-size: .875rem; }
.ref-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: .875rem; }
.ref-tags a { color: var(--red); text-decoration: none; font-weight: 600; }
.ref-tags a:hover { text-decoration: underline; }
.ref-excerpt { margin: 0; color: var(--fg); font-size: .9375rem; line-height: 1.55; }
.ref-link { margin-top: auto; font: 700 .9375rem/1.3 var(--display); color: var(--red); text-decoration: none; }
.ref-link::after { content: " →"; }
.ref-link:hover { text-decoration: underline; text-underline-offset: .2em; }
/* miniatury: 1–3 zdjęcia w rzędzie, przy większej liczbie trzeci kafel z „+N” prowadzi do podstrony */
.ref-thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ref-thumbs-2 { grid-template-columns: 1fr 1fr; }
.ref-thumbs-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 2.6; }
.ref-thumbs-3 li:first-child { grid-row: 1 / 3; }
.ref-thumbs li { min-height: 0; }
.ref-thumbs a { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 6px; background: var(--line); }
.ref-thumbs-1 a, .ref-thumbs-2 a { aspect-ratio: 4 / 3; }
.ref-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.ref-card:hover .ref-thumbs img { transform: scale(1.04); }
.ref-more::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.ref-more span { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #fff; font: 900 clamp(1.25rem, 2vw, 1.75rem)/1 var(--display); }
/* wyróżnione: film obok opisu */
.ref-card-video { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "video copy" "thumbs copy"; gap: 16px clamp(24px, 3.5vw, 48px);
  padding: clamp(18px, 2.6vw, 32px); background: var(--paper, #F4F3F1); border-top: 3px solid var(--red); align-items: start; }
.ref-card-video .ref-card-video-box { grid-area: video; }
.ref-card-video .ref-thumbs { grid-area: thumbs; }
.ref-card-video .ref-card-copy { grid-area: copy; }
.ref-card-video .ref-thumbs-3 { aspect-ratio: auto; grid-template-columns: repeat(3, 1fr); grid-template-rows: none; }
.ref-card-video .ref-thumbs-3 li:first-child { grid-row: auto; }
.ref-card-video .ref-thumbs-3 a { aspect-ratio: 4 / 3; }
.ref-card-video h3 { font-size: clamp(1.375rem, 2.2vw, 1.875rem); }
.ref-card-video .video { border-radius: 8px; }
@media (max-width: 800px) { .ref-card-video { grid-template-columns: 1fr; grid-template-areas: "video" "copy" "thumbs"; } }
[data-theme="dark"] .ref-card-video { background: rgba(255,255,255,.05); }
/* podstrona realizacji */
.ref-page-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 20px; }
.ref-page-grid { display: grid; gap: clamp(24px, 4vw, 56px); }
.ref-page-grid.has-video { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.ref-page-video .video { border-radius: 10px; }
@media (max-width: 800px) { .ref-page-grid.has-video { grid-template-columns: 1fr; } }
.ref-page-text { max-width: 46em; }
.ref-page-photos-t { margin: clamp(32px, 4vw, 48px) 0 16px; font-size: clamp(1.25rem, 2vw, 1.625rem); text-transform: capitalize; }
.ref-page .ref-gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ref-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: clamp(36px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); }
.ref-pager a:not(.btn) { color: inherit; text-decoration: none; font-weight: 600; }
.ref-pager a:not(.btn):hover { color: var(--red); }
.ref-pager span { display: block; color: var(--grey); font-size: .8125rem; font-weight: 400; }
.ref-next { text-align: right; }
@media (max-width: 640px) { .ref-pager { grid-template-columns: 1fr 1fr; } .ref-pager .btn { grid-column: 1 / -1; grid-row: 2; justify-self: center; } }
/* Artykuł o renowacjach: realizacje jako karty (podstrony galerii), Piotr Budrewicz, kontakt z formularzem */
.reno-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .reno-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reno-cards { grid-template-columns: 1fr; } }
.reno-card { display: flex; flex-direction: column; height: 100%; background: var(--bg); color: inherit; text-decoration: none; border-top: 3px solid var(--red); transition: box-shadow .3s, transform .3s; }
a.reno-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.reno-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.reno-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reno-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; flex: 1; }
.reno-card-body strong { font: 700 1.1875rem/1.25 var(--display); }
.reno-card-body span { font-size: .9375rem; line-height: 1.55; }
.reno-card-body em { margin-top: auto; font: 700 .9375rem/1.3 var(--display); font-style: normal; color: var(--red); }
.reno-card-body em::after { content: " →"; }
.reno-piotr { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(28px, 5vw, 72px); align-items: center; }
.reno-piotr-photo { margin: 0; }
.reno-piotr-photo img { width: 100%; height: auto; border-radius: 50%; display: block; }
@media (max-width: 700px) { .reno-piotr { grid-template-columns: 1fr; } .reno-piotr-photo { max-width: 160px; order: -1; } }
.reno-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.reno-contact h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); font-weight: 900; letter-spacing: -.015em; }
.reno-person { display: flex; gap: 16px; align-items: center; margin: 24px 0; }
.reno-person img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.reno-person span { display: flex; flex-direction: column; gap: 2px; }
.reno-person a { color: var(--red); font-weight: 600; }
@media (max-width: 900px) { .reno-contact { grid-template-columns: 1fr; } }
/* kategoria: zajawka artykułu pod kategorią (np. Dachy z historią) */
.cat-article { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); margin-bottom: 40px; background: var(--paper); border-top: 3px solid var(--red); color: inherit; text-decoration: none; transition: box-shadow .3s; }
.cat-article:hover { box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.cat-article-img { overflow: hidden; min-height: 220px; }
.cat-article-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-article-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(20px, 3vw, 36px); }
.cat-article-body strong { font: 900 clamp(1.375rem, 2.2vw, 1.875rem)/1.15 var(--display); }
.cat-article-body em { font-style: normal; margin-top: 4px; }
@media (max-width: 700px) { .cat-article { grid-template-columns: 1fr; } .cat-article-img { min-height: 0; aspect-ratio: 16 / 9; } }
/* „Pokażmy Twoją pracę”: tekst i wizytówka Magdaleny obok formularza (zgłoszenie do Działu Marketingu) */
.pro-media-contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.pro-media-contact-grid .pro-person { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; max-width: none; margin-top: 28px; }
.pro-media-contact-grid .pro-person figcaption { margin-top: 0; }
.pro-media-form .form { background: var(--bg); padding: clamp(20px, 3vw, 32px); border-top: 3px solid var(--red); }
.pro-media-form .form h2 { font-size: 1.5rem; margin: 0 0 6px; }
@media (max-width: 900px) { .pro-media-contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .pro-media-contact-grid .pro-person { grid-template-columns: 110px minmax(0, 1fr); } }
/* Kontakt: Piotr Budrewicz wyśrodkowany, przedstawiciele mobilni, partnerzy 4D Grupa osobno według województw */
.contact-lead-in { text-align: center; }
.contact-lead-in h3 { font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.25; margin-top: 0; }
.contact-lead-in img { display: block; width: 180px; height: 180px; object-fit: cover; border-radius: 50%; margin: 28px auto 8px; }
.contact-lead-cta { margin-top: 24px; }
.contact-partners-jump { margin: 18px 0 0; font-weight: 700; }
.contact-partners-jump a { color: var(--red); text-decoration: none; }
.traders li { grid-template-columns: 96px 1fr; padding: 22px; border-top: 3px solid var(--red); background: var(--paper); }
.traders img { width: 96px; height: 96px; }
.trader-region { color: var(--fg); }
.trader-region strong { display: block; color: var(--red); font: 700 1.125rem/1.2 var(--display); }
.trader-region span { display: block; font-weight: 400; font-size: .875rem; color: var(--grey); margin-top: 2px; }
.contact-partners-head { max-width: 760px; margin-bottom: 24px; }
.contact-partners-head .contact-4d { display: flex; gap: 14px; align-items: center; }
.partner-regions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; align-items: start; }
@media (max-width: 900px) { .partner-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .partner-regions { grid-template-columns: 1fr; } }
.prose .contact-lead-cta .btn, .contact-lead-cta .btn { color: #fff; text-decoration: none; }
.cat-article { overflow: hidden; }
.cat-article-img { position: relative; }
.cat-article-img img { position: absolute; inset: 0; }
/* wsparcie: pionowe zdjęcie z biura przy „Masz do kogo zadzwonić” */
.pro-chapter-photo-tall { max-width: 440px; }
.pro-chapter-photo-tall img { border-radius: 10px; }
/* opinie fachowców: rolki jedna pod drugą (obok siebie były za małe) */
.roofer-proof-grid.has-shorts { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; }
.roofer-proof-shorts { grid-template-columns: 1fr; gap: 20px; position: static; }
@media (max-width: 1000px) { .roofer-proof-grid.has-shorts { grid-template-columns: 1fr; } .roofer-proof-shorts { max-width: 360px; } }
/* udostępnianie strony (nagłówek) */
.nav-share { padding: 0; border: 0; background: none; cursor: pointer; }
.nav-share svg { width: 21px; height: 21px; }
.share-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; margin: 0; padding: 12px 20px; border-radius: 999px; background: var(--fg); color: var(--bg); font: 600 .9375rem/1.3 var(--body); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.share-toast[hidden] { display: none; }
/* łapki pod opiniami o nas; powyżej 10 łapek serduszko */
.rv-like { margin: 12px 0 0; }
.rv-like-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); font: 600 .875rem/1 var(--body); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.rv-like-btn:hover:not(:disabled) { border-color: var(--fg); }
.rv-like-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.rv-like-btn .rv-heart { display: none; }
.rv-like-btn.is-heart .rv-thumb { display: none; }
.rv-like-btn.is-heart .rv-heart { display: block; color: var(--red); }
.rv-like-btn[aria-pressed="true"] { border-color: var(--red); color: var(--red); cursor: default; }
.rv-like-btn[aria-pressed="true"] svg { fill: currentColor; }
.rv-like-btn.is-pop svg { animation: rv-pop .35s var(--ease); }
@keyframes rv-pop { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .rv-like-btn.is-pop svg { animation: none; } }
.review-top .rv-like { margin-top: -4px; }
/* „Masz do kogo zadzwonić”: mniejsze zdjęcie z biura obok tekstu */
.pro-chapter-side { display: grid; grid-template-columns: minmax(0, 1fr) 200px; column-gap: 28px; align-items: start; }
.pro-chapter-side > :not(figure) { grid-column: 1; }
.pro-chapter-side > figure { grid-column: 2; grid-row: 1 / span 3; margin: 0; max-width: none; }
@media (max-width: 560px) { .pro-chapter-side { grid-template-columns: 1fr; } .pro-chapter-side > figure { grid-column: 1; grid-row: auto; margin-top: 20px; max-width: 220px; } }
/* opinie fachowców: wyróżniona opinia jako wysoka ciemna karta (3 wiersze) obok pozostałych */
.roofer-proof-grid.has-shorts .roofer-quote-big { grid-row: span 3; }
.roofer-quote-big .roofer-quote-card { background: var(--black); color: #fff; border-top-color: var(--red); justify-content: center; padding: clamp(28px, 3vw, 44px); }
.roofer-quote-big .roofer-quote-card blockquote { flex: 0 1 auto; }
.roofer-quote-big .roofer-quote-card blockquote p { color: #fff; font: 700 clamp(1.375rem, 2vw, 1.875rem)/1.3 var(--display); }
.roofer-quote-big .roofer-quote-by { color: rgba(255,255,255,.72); }
.roofer-quote-big .roofer-quote-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.25); }
@media (max-width: 640px) { .roofer-proof-grid.has-shorts .roofer-quote-big { grid-row: auto; } }
/* kontakt: Piotr – tekst po lewej, portret i dane kontaktowe po prawej */
.contact-lead-in { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: clamp(28px, 5vw, 72px); align-items: center; max-width: 1000px; text-align: left; }
.contact-lead-text h2 { margin: 0 0 18px; font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.25; }
.contact-lead-text p { font-size: 1.0625rem; line-height: 1.65; max-width: 40em; }
.contact-lead-person { margin: 0; }
.contact-lead-person img { display: block; width: 210px; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 30%; border-radius: 12px; margin: 0; }
.contact-lead-person figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.contact-lead-person strong { font: 700 1.125rem/1.2 var(--display); }
.contact-lead-person a { color: var(--red); font-weight: 600; }
@media (max-width: 700px) { .contact-lead-in { grid-template-columns: 1fr; } .contact-lead-person { order: -1; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; } .contact-lead-person img { width: 120px; } .contact-lead-person figcaption { margin-top: 0; } }
/* „Pokażmy Twoją pracę”: nagłówek cały biały, „Dobra robota” na czerwonym bloku */
.pro-media-hero .roofer-title span:last-child { color: var(--white); }
.pro-media-hero .roofer-title span:first-child { display: table; padding: .06em .18em .12em; margin: 0 0 .12em -.18em; background: var(--red); color: #fff; }
/* zgody w formularzach: kratka w jednym wierszu z początkiem tekstu (.field > label ustawiało display: block) */
.field > label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 8px 0; line-height: 1.5; }
.field > label.check input { margin-top: 1px; }
.field input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--red); }
.prose figure img { display: block; width: 100%; border-radius: 8px; }
/* dla profesjonalistów: zajawka artykułu o renowacjach */
.pro-reno-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; }
.pro-reno-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.pro-reno-img:hover img { transform: scale(1.03); }
/* po wysłaniu formularza zostaje samo podziękowanie */
.form.is-sent > :not([data-form-ok]) { display: none !important; }
.form.is-sent .form-ok { margin: 0; padding: 28px 24px; border-left: 0; border-top: 3px solid var(--red); background: var(--paper); font: 700 1.25rem/1.4 var(--display); text-align: center; outline: none; }
.form.is-sent .form-ok::before { content: "✓"; display: block; margin: 0 auto 10px; width: 48px; height: 48px; line-height: 48px; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.5rem; }
.dlg-in:has(.form.is-sent) > p.muted { display: none; }
/* Safari na iOS: bez natywnego wyglądu przycisków (systemowy niebieski tekst/tło); kolory zawsze ze stylów strony */
button, input[type=submit], input[type=button], input[type=reset] { -webkit-appearance: none; appearance: none; color: inherit; background-color: transparent; border-radius: 0; -webkit-tap-highlight-color: transparent; }
.btn { border-radius: 2px; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=file]::file-selector-button, input[type=file]::-webkit-file-upload-button { -webkit-appearance: none; appearance: none; margin-right: 12px; padding: 8px 14px; border: 1.5px solid var(--fg); border-radius: 2px; background: var(--bg); color: var(--fg); font: 600 .875rem/1 var(--body); cursor: pointer; }
/* przycisk dostępności w belce (telefon, menu rozwijane): sama ikona, panel rozwija się pod belką */
.a11y-menu.a11y-in-bar { margin-left: auto; }
.a11y-menu.a11y-in-bar + .header-cta { margin-left: 0; }
.a11y-in-bar summary { width: 40px; height: 40px; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; justify-content: center; }
.a11y-in-bar summary .a11y-sep, .a11y-in-bar summary .theme-moon, .a11y-in-bar summary .theme-sun { display: none !important; }
.a11y-in-bar summary .a11y-ico { width: 22px; height: 22px; }
.header-in > .a11y-in-bar .a11y-panel { position: absolute; right: auto; left: 50%; transform: translateX(-60%); top: calc(100% + 12px); width: min(320px, calc(100vw - 24px)); margin: 0; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.page-home .site-header.on-photo .a11y-in-bar summary { color: var(--white); }
@media (max-width: 400px) { .header-in { gap: 8px; } .header-cta { padding: 0 11px; font-size: .875rem; } }
/* panel dostępności: ikonki przy etykietach */
.a11y-label { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.a11y-row-ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
/* panel otwarty z belki (telefon): pod belką na całą szerokość ekranu, bez rozpychania belki */
.a11y-menu.a11y-in-bar[open] { flex: none; }
.header-in > .a11y-in-bar .a11y-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); transform: none; width: auto; max-width: 420px; margin: 0 0 0 auto; }
/* menu rozwijane (telefon, zwinięte menu): „Dekarz & Inwestycje” jako zwykła pozycja menu, nie przycisk */
@media (max-width: 900px) {
  .nav-tools .nav-roofer { order: -1; flex: 1 1 100%; justify-content: flex-start; min-height: 0; padding: 10px 0 !important; border: 0; background: none; color: var(--fg); font: 700 1.5rem/1.2 var(--display) !important; }
  .nav-tools .nav-roofer:hover { background: none; color: var(--red); }
}
html.nav-compact .nav-tools .nav-roofer { order: -1; flex: 1 1 100%; justify-content: flex-start; min-height: 0; padding: 10px 0 !important; border: 0; background: none; color: var(--fg); font: 700 1.5rem/1.2 var(--display) !important; }
/* telefon: menu podstron w dwóch wierszach (mniejsza czcionka; „Ambitny Dekarz” domyka pierwszy wiersz) */
@media (max-width: 560px) {
  .subnav ul { gap: 0 14px; }
  .subnav a { padding: 10px 0 9px; font-size: .8125rem; letter-spacing: -.01em; white-space: nowrap; }
  .subnav-pro li { order: 3; }
  .subnav-pro li:nth-child(-n+2) { order: 1; }
  .subnav-pro li:nth-child(4) { order: 2; } /* Ambitny Dekarz (renowacje są teraz ostatnie) */
}
@media (max-width: 420px) { .subnav a { font-size: .75rem; } .subnav ul { gap: 0 11px; } }
/* przycisk dostępności kwadratowy, jak przełącznik języka */
.a11y-menu summary { border-radius: 2px; }
.a11y-in-bar summary { width: 40px; height: 40px; border-radius: 2px; }
.a11y-size-cycle { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.a11y-size-cycle:hover { color: var(--red); }
@media (max-width: 370px) { .subnav a { font-size: .71875rem; letter-spacing: -.015em; } .subnav ul { gap: 0 9px; } }
/* telefon: cytaty opinii na stronie głównej o 15% większe (jak przy powiększeniu A+), reszta bez zmian */
@media (max-width: 700px) {
  .hero-review blockquote p { font-size: clamp(2.185rem, 9.66vw, 2.76rem); }
  .origin-review blockquote p { font-size: clamp(1.955rem, 8.28vw, 2.53rem); }
}
/* oferta na stronie głównej: odstęp miniatury od krawędzi (widoczny na czerwonym tle po najechaniu) */
.offer-list a.has-thumb { padding-left: 16px; padding-right: 12px; }
@media (max-width: 700px) { .offer-list a.has-thumb { padding-left: 12px; padding-right: 8px; } }
.article-subtitle { display: block; margin-top: .4em; font-size: .45em; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--grey); }
/* artykuł: zakończenie z linkiem do oddziałów i lista oddziałów z telefonami */
.callout-link { margin: 14px 0 0; font-size: .9375rem; }
.article-branches { margin-top: clamp(32px, 4vw, 48px); }
.article-branches h2 { margin-top: 0; }
/* strona główna: zapowiedź artykułu o współpracy pod „Twój dach marzeń jest właśnie tutaj” */
.dream-lead { max-width: 34em; margin: .6em 0 1.2em; color: #f4f4f4; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.article-about { margin-top: clamp(40px, 5vw, 64px); }
/* belka: przyciski dostępności, języka, „Dekarz & Inwestycje” i „Wyceń dach” tej samej wysokości (44 px) */
@media (min-width: 901px) {
  html:not(.nav-compact) .nav-tools .a11y-menu summary { height: 44px; }
  html:not(.nav-compact) .nav-tools .lang-switch summary { display: grid; place-items: center; box-sizing: border-box; height: 44px; padding: 0 10px; }
  html:not(.nav-compact) .nav-tools .nav-roofer, html:not(.nav-compact) .nav-tools .nav-cta { height: 44px; min-height: 44px; }
}
.article-branches p a { font-weight: 700; }
/* telefon: przycisk pod „Twój dach marzeń” na dole zdjęcia (na wysokości sukienki), hasło zostaje u góry */
@media (max-width: 700px) and (orientation: portrait) {
  .origins .origin-dream .origin-copy { min-height: 100vh; min-height: 100svh; }
  .origin-dream .origin-copy > .btn { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 11vh; bottom: 11svh; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
  .origin-dream .origin-copy > .btn[data-reveal] { opacity: 1 !important; transform: none !important; } /* nisko na ekranie: bez animacji pojawiania się */
}
/* strona główna w innych językach: hasło „Twój dach marzeń” w języku strony (zwykły tekst, łamany) */
.dream.dream-local { max-width: 13ch; margin: 0; font: 700 clamp(1.9rem, 5.3vw, 4.6rem)/1.08 var(--display); color: var(--white); text-shadow: 0 2px 14px rgba(0,0,0,.45); }
@media (max-width: 900px) { .dream-row .dream.dream-local { max-width: 11ch; font-size: clamp(1.7rem, 7.4vw, 2.6rem); } }
/* galeria: liczba zdjęć obok przycisku realizacji */
.ref-link-row { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ref-photos { color: var(--grey); font-size: .8125rem; }
.prose blockquote p + p { margin-top: .6em; font: 400 1.0625rem/1.6 var(--body); color: var(--ink); }
/* Pierwszy rozdział historii: wjazd z dołu najwyżej o 26% wysokości ekranu (na niskim ekranie 280 px przesunięcia
   przekraczało zakres pomiaru, rozdział zostawał szary i nachodził na następny) */
@media (min-width: 901px) { .chapter:first-child { transform: translateY(calc(var(--enter, 1) * min(280px, 26vh))); } }
/* Telefon w poziomie: opinia w lewej połowie zdjęcia startowego, pytanie w prawej, bez nachodzenia;
   logo Ambit w jednym wierszu z „Twój dach marzeń”, na tej samej wysokości */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-review { left: var(--gutter); width: calc(44vw - var(--gutter)); transform: translate(0, calc(-50% + (1 - var(--p)) * 40px)); }
  .hero-review blockquote p { font-size: clamp(1.25rem, 7.5svh, 2rem); }
  .hero-review .review-quote-meta { font-size: .9375rem; }
  .hero-after { left: auto; right: var(--gutter); top: auto; bottom: 12svh; width: calc(54vw - var(--gutter)); max-width: none; margin: 0; padding: 0;
    text-align: right; font-size: min(1.75rem, 6.5svh, 2.6vw); text-wrap: balance; text-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 40px rgba(0,0,0,.35); }
  .hero-after .br-narrow { display: inline; }
  .hero-after .br-wide { display: none; }
  .dream-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
  .dream-row .dream-brand { position: static; flex: none; align-self: flex-start; width: auto; margin: 0; }
  .dream-row .dream-brand .logo { width: auto; height: 1.2em; }
  .dream-row .dream { text-align: right; }
}
/* telefon: na stronie rekomendacji najpierw nagłówek i tekst, potem zdjęcia aut */
@media (max-width: 800px) { .pro-car .pro-split > :last-child { order: -1; } }
/* cytaty opinii na stronie głównej: Spectral 500 kursywa (wybrana na /font-test, nr 10), pliki lokalne */
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/spectral-500i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/spectral-500i-latinext.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: "Spectral"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/spectral-500i-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; }
.review-quote blockquote p { font-family: "Spectral", Georgia, "Times New Roman", serif; font-weight: 500; }
/* telefon: cytat na zdjęciu startowym w 3 wierszach (najdłuższy wiersz „od tych typowych wrażeń” ≈ 10,3 em w Spectral) */
@media (max-width: 700px) { .hero-review blockquote p { font-size: min(2.76rem, calc((100vw - 2 * var(--gutter)) / 10.8)); } }

/* Film YouTube startujący sam (bez dźwięku) z przyciskiem włączenia dźwięku */
.video-auto { position: relative; }
.video-auto .video-frame { box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.video-unmute { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-family: inherit; font-size: .9375rem; font-weight: 700; line-height: 1; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.35); cursor: pointer; }
.video-unmute::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.video-unmute:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Pokażmy Twoją pracę: film w tle nagłówka, przyciemniony pod napisami */
.pro-media-bg-hero .roofer-hero-photo video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pro-media-bg-hero::after { content: ""; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.66) 50%, rgba(0,0,0,.42) 100%); }
@media (max-width: 800px) { .pro-media-bg-hero::after { background: rgba(0,0,0,.68); } }
.pro-media-bg-hero { min-height: min(82svh, 760px); }
.pro-sub-hero-grid.pro-media-hero { grid-template-columns: minmax(0, 1fr); }
/* Pokażmy Twoją pracę: oba teksty z jedną rolką z prawej, wyśrodkowaną w pionie */
.pro-media-who-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: center; }
.pro-media-who-grid .pro-media-shorts { position: static; }
@media (max-width: 800px) { .pro-media-who-grid { grid-template-columns: 1fr; } .pro-media-who-grid .pro-media-shorts { max-width: none; width: min(100%, 320px); justify-self: center; } }
/* rolka YouTube w treści porady (wstawiona w bazie, kod jak parts/yt.php) */
.article-body .article-short { width: min(100%, 320px); margin: clamp(28px, 4vw, 44px) auto; }

/* Dla profesjonalistów: blok PSD pod kartami Ambitny Dekarz i Rekomendowane ekipy */
.pro-craft-cards + .pro-psd { margin: clamp(16px, 2.4vw, 32px) 0 0; }

/* Pasek opinii nad formularzem kontaktu (oddział, Kontakt): kafelki bez odnośników, ostatni z przyciskiem do wszystkich opinii */
.reviews-form-strip { padding: clamp(32px, 4vw, 56px) 0 clamp(8px, 1.5vw, 16px); }
.reviews-form-strip .section-head { margin-bottom: clamp(20px, 2.6vw, 32px); }
.reviews-form-strip h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 900; letter-spacing: -.02em; }
.reviews-form-sum { margin: .4em 0 0; color: var(--grey); }
.reviews-form-strip .reviews-track .review-card { padding: 28px; }
.reviews-form-strip .review-card-more { justify-content: center; align-items: flex-start; border-top-color: var(--black); }
.reviews-form-strip .review-card-more p { margin: 0; font: 700 1.1875rem/1.35 var(--display); }
.reviews-form-strip + #formularz { padding-top: clamp(32px, 4vw, 56px); }

/* „Oceń nas” na stronie oddziału: najpierw same gwiazdki, reszta pól po wybraniu oceny (albo przy błędzie) */
.plrv { padding-top: clamp(24px, 3vw, 40px); }
.plrv-form { max-width: 720px; margin: 0 auto; padding: clamp(24px, 3.4vw, 40px); background: var(--paper); border-top: 4px solid var(--star); text-align: center; }
.plrv-form h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 900; letter-spacing: -.015em; }
.plrv-lead { margin: 0 auto 8px; max-width: 34em; color: var(--grey); }
.plrv-rating { border: 0; padding: 0; margin: 0 0 4px; }
.plrv .prv-stars-input input[type=radio] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.plrv .prv-stars-input label { width: 52px; height: 52px; font-size: 2.5rem; }
.plrv-more { display: none; gap: 4px; margin-top: 12px; text-align: left; }
.plrv-form:has(input[name=rating]:checked) .plrv-more, .plrv-form.is-open .plrv-more { display: grid; }
.plrv-more .btn { justify-self: start; }
.plrv-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 600px) { .plrv-row { grid-template-columns: 1fr; } }
.plrv-msg { margin: 12px 0 0; font-weight: 700; }
.plrv-msg:empty { display: none; }
.plrv-msg-ok { color: var(--fg); }
.plrv-msg-err { color: var(--red-dark); }
.plrv-form.is-sent .plrv-rating, .plrv-form.is-sent .plrv-more, .plrv-form.is-sent .plrv-lead { display: none; }

/* Formularze: termin rozmowy zwinięty pod „Chcę wskazać dogodny termin” */
.field-more { margin: 0 0 16px; }
.field-more summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; }
.field-more[open] summary { margin-bottom: 8px; }
.field[hidden] { display: none; }

/* Kontakt: skróty na górze i karty oddziałów (adres, godziny, telefon, działania); mapa pod kartami */
.contact-jumps { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 clamp(24px, 3vw, 36px); }
.branch-cards { list-style: none; margin: 0 0 clamp(24px, 3vw, 40px); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.branch-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--paper); border-top: 3px solid var(--red); }
.branch-card h3 { margin: 0; font: 900 1.375rem/1.15 var(--display); }
.branch-card p { margin: 0; }
.branch-addr { color: var(--fg); }
.branch-hours { color: var(--grey); font-size: .9375rem; }
.branch-tel a { font-weight: 700; font-size: 1.0625rem; color: var(--fg); }
.branch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto !important; padding-top: 10px; }
.branch-actions .btn { min-height: 40px; padding: 0 14px; font-size: .875rem; }
@media (max-width: 600px) { .contact-map .gmap, .contact-map [data-map] { height: 360px !important; min-height: 0; } }
/* Strona oddziału: dojazd i „Napisz do oddziału” obok siebie */
.place-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.branch-more { margin-top: 6px !important; }
.branch-more a { font-weight: 700; font-size: .9375rem; color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; }

/* Mapa na stronie Kontakt: filtry (naprawdę ukrywają punkty) i legenda */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 12px; }
.map-filter { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.map-filter button { min-height: 40px; padding: 0 14px; border: 2px solid var(--fg); background: var(--bg); color: var(--fg); font: 700 .875rem/1 var(--display); cursor: pointer; }
.map-filter button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .875rem; color: var(--grey); }
.map-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.map-legend-ambit::before { background: #ED1C24; border: 2px solid #9e0f14; }
.map-legend-partner::before { background: #fff; border: 2px solid #000; }
/* wyszukiwarka punktów */
.place-search { margin: 0 0 clamp(24px, 3vw, 36px); max-width: 640px; }
.place-search label { display: block; font-weight: 700; margin-bottom: 6px; }
.place-search input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field-line); background: var(--bg); color: var(--ink); font: inherit; }
.place-search-out { margin-top: 12px; }
.place-search-out .branch-cards { margin: 8px 0 0; }
.branch-kind { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--red); }
.branch-card.is-partner { border-top-color: var(--fg); }
.branch-card.is-partner .branch-kind { color: var(--grey); }
/* strona oddziału: odnośnik zamiast dużej mapy, dolny pasek na telefonie */
.place-others { padding-block: clamp(32px, 4vw, 56px); text-align: center; }
.place-others p { margin: 0; }
.place-bar { display: none; }
@media (max-width: 800px) {
  .place-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 8px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)); gap: 8px; background: var(--bg);
    box-shadow: 0 -6px 20px rgba(0,0,0,.12); transition: transform .25s var(--ease); }
  .place-bar a { display: grid; place-items: center; min-height: 48px; background: var(--red); color: #fff; font: 700 .9375rem/1 var(--display); text-decoration: none; }
  .place-bar a + a { background: var(--fg); color: var(--bg); }
  .place-bar.is-hidden { transform: translateY(110%); }
  body.has-place-bar { padding-bottom: 72px; }
}

/* Historia: oś czasu – lata na linii z boku, treść obok; kolory rodzajów wpisów: historia firmy (czerwony),
   nowe punkty (grafit), nagrody (złoty); rok przyklejony przy przewijaniu długich lat (np. 2022) */
.htl-intro { display: block; width: 100%; max-width: 900px; margin: 0 0 clamp(24px, 3vw, 40px); }
.htl-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 clamp(24px, 3vw, 40px); font-weight: 700; font-size: .9375rem; }
.htl-legend span::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; }
.htl-k-milestone::before, .htl-milestone { --k: var(--red); }
.htl-k-opening::before, .htl-opening { --k: var(--fg); }
.htl-k-award::before, .htl-awards { --k: #C99700; }
.htl-legend span::before { background: var(--k); }
.htl { list-style: none; margin: 0; padding: 0; position: relative; }
.htl::before { content: ""; position: absolute; left: clamp(72px, 11vw, 140px); top: 0; bottom: 0; width: 3px; background: var(--line); }
.htl-year { display: grid; grid-template-columns: clamp(72px, 11vw, 140px) minmax(0, 1fr); padding-bottom: clamp(28px, 4vw, 48px); }
.htl-label { margin: 0; padding-right: clamp(14px, 2vw, 28px); text-align: right; }
.htl-label span { position: sticky; top: calc(var(--header-h, 72px) + 16px); display: inline-block; font: 900 clamp(1.5rem, 3vw, 2.5rem)/1 var(--display); color: var(--fg); }
.htl-body { position: relative; display: grid; gap: 14px; padding-left: clamp(20px, 3vw, 40px); }
.htl-body::before { content: ""; position: absolute; left: -7px; top: 8px; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 3px solid var(--fg); }
.htl-item { margin: 0; border-left: 4px solid var(--k); padding-left: 16px; }
.htl-milestone img { margin-top: 12px; width: 100%; max-width: 520px; }
.htl-milestone .prose h2 { margin-top: 0; font-size: clamp(1.25rem, 2vw, 1.625rem); }
.htl-opening { font-weight: 700; font-size: 1.0625rem; }
.htl-awards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding-top: 2px; padding-bottom: 2px; }
.htl-awards li { margin: 0; }
.htl-awards a { display: block; background: var(--paper); }
.htl-awards img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .25s var(--ease); }
.htl-awards a:hover img, .htl-awards a:focus-visible img { transform: scale(1.04); }
.htl-awards p { margin: 6px 0 0; font-size: .8125rem; line-height: 1.35; }
.htl-awards p strong { display: block; font-size: .875rem; }
@media (max-width: 600px) {
  .htl-awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Historia: mapka Pomorza po prawej (od 1100 px), punkty pojawiają się wraz z latami otwarcia */
.htl-map { display: none; }
@media (min-width: 1100px) {
  .htl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: clamp(24px, 3vw, 48px); align-items: start; }
  .htl-map { display: block; grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h, 72px) + 32px); }
  .htl { grid-column: 1; grid-row: 1; }
}
.htl-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.htl-land { fill: color-mix(in srgb, var(--fg) 7%, var(--bg)); stroke: none; }
.htl-coast { fill: none; stroke: var(--grey); stroke-width: .7; stroke-linejoin: round; stroke-linecap: round; opacity: .7; }
/* znacznik: balonik jak na mapie oddziałów; rośnie od czubka (początek układu lokalnego) */
.htl-dot { opacity: 0; transition: opacity .4s var(--ease); }
.htl-dot.is-on { opacity: 1; }
.htl-pin { transform: scale(.3); transform-origin: 0 0; transition: transform .5s var(--ease); }
.htl-dot.is-on .htl-pin { transform: scale(1); }
.htl-dot.is-on.is-big .htl-pin { transform: scale(1.45); }
.htl-pin use { fill: #ED1C24; stroke: #9e0f14; stroke-width: .8; }
.htl-pin path { fill: none; stroke: #fff; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.htl-dot text { font: 700 7px/1 var(--display); fill: var(--fg); paint-order: stroke; stroke: var(--bg); stroke-width: 2.4px; }
.htl-dot.is-new .htl-pin { animation: htl-pop .9s var(--ease) 1; }
@keyframes htl-pop { 0% { transform: scale(.3); } 55% { transform: scale(1.35); } 100% { transform: scale(1); } }
.htl-map-year { margin: 8px 0 0; text-align: right; font: 900 clamp(2rem, 3vw, 3rem)/1 var(--display); color: var(--line); }
@media (prefers-reduced-motion: reduce) { .htl-dot, .htl-pin { transition: none; } .htl-dot.is-new .htl-pin { animation: none; } }
.htl-milestone img.htl-logo { width: 220px; max-width: 60%; }
.htl-photo { margin: 12px 0 0; }
.htl-photo img { display: block; width: 100%; max-width: 520px; }
.htl-photo figcaption { margin-top: 6px; font-size: .875rem; color: var(--grey); }

/* O nas: mozaika nagród prowadząca do Historii (odnośniki do dekarzy i poradnika są w treści strony) */
.about-awards { margin-top: 0; }
.about-awards-head { max-width: 760px; }
.about-awards-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900; letter-spacing: -.02em; }
.about-mosaic { list-style: none; margin: clamp(16px, 2vw, 24px) 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.about-mosaic a { display: block; overflow: hidden; background: var(--paper); }
.about-mosaic img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .3s var(--ease); }
.about-mosaic a:hover img, .about-mosaic a:focus-visible img { transform: scale(1.06); }
@media (max-width: 800px) { .about-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.about-block .about-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.about-block .about-cta a { text-decoration: none; }
.prose .about-cta a.btn-red { color: #fff; } .prose .about-cta a.btn-line { color: var(--fg); }

/* Baner cookies: pierwsza warstwa (tekst i przyciski), druga – kategorie z rozwijanym opisem i przełącznikiem (domyślnie wyłączonym) */
.cookie-opts[hidden] { display: none; }
.cookie-opts { gap: 0; margin: 8px 0 14px; border-top: 1px solid var(--line); }
.cookie-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cookie-cat summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.cookie-cat details p { margin: 6px 0 0; font-size: .875rem; color: var(--grey); }
.cookie-vendors { font-size: .8125rem !important; }
.cookie-always { padding-top: 6px; font-size: .8125rem; font-weight: 700; color: var(--grey); white-space: nowrap; }
.cookie-switch { position: relative; display: inline-block; width: 46px; height: 26px; margin-top: 3px; cursor: pointer; }
.cookie-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cookie-switch span[aria-hidden] { position: absolute; inset: 0; border-radius: 13px; background: var(--star-off); transition: background .2s; }
.cookie-switch span[aria-hidden]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + span { outline: 3px solid var(--fg); outline-offset: 2px; }
.cookie-actions [hidden] { display: none; }
.cookie-cat summary { list-style: none; }
.cookie-cat summary::-webkit-details-marker { display: none; }
.cookie-cat summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.cookie-cat details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
/* druga warstwa banera: „Akceptuję wszystkie” po prawej, serwisy z własnymi przełącznikami, włączony przełącznik czarny */
.cookie-cat-vendors { grid-template-columns: 1fr; gap: 4px; }
.cookie-vendor-list .cookie-switch { flex: none; margin-top: 0; }
.cookie-actions [data-cookie-all] { margin-left: auto; }
.cookie-vendor-list { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 6px; }
.cookie-vendor-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: .875rem; }
.cookie-switch input:checked + span { background: var(--fg); }
.cookie-switch input:checked + span::after { background: var(--bg); } /* tryb ciemny: jasny tor, ciemna kulka (widać, że włączony) */
/* przyciski banera: drugorzędne z cieńszą ramką; na telefonie wszystkie trzy w jednym rzędzie (napis może się zawinąć) */
.cookie-actions .btn-line { border-width: 1px; }
@media (max-width: 600px) {
  .cookie-in { padding: 18px 16px; }
  .cookie-actions { flex-wrap: nowrap; gap: 6px; }
  .cookie-actions .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 4px 6px; font-size: .8125rem; line-height: 1.15; white-space: normal; text-align: center; }
  .cookie-actions [data-cookie-all] { margin-left: 0; flex-grow: 1.25; }
}
/* outlet: plakietka z kwotą obniżki (czerwone tło, biały napis) */
.price-badge { display: inline-block; padding: 2px 8px; background: var(--red); color: #fff; font-weight: 700; white-space: nowrap; line-height: 1.4; margin-right: .3em; }
.cookie-vendor-list li { flex-wrap: wrap; }
.cookie-nudge { flex-basis: 100%; margin: 2px 0 4px !important; padding: 8px 10px; background: var(--paper); border-left: 3px solid var(--fg); font-size: .8125rem !important; color: var(--ink) !important; line-height: 1.45; }
.cookie-nudge[hidden] { display: none; }

/* nagłówek strony ze zdjęciem w tle (np. „Dachy z historią”): przyciemnione zdjęcie, biały tekst */
.page-hero-bg { background: #111; color: #fff; }
.page-hero-bg .page-hero-photo, .page-hero-bg .page-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.62) 55%, rgba(0,0,0,.4) 100%); }
.page-hero-bg > .wrap { position: relative; z-index: 1; }
.page-hero-bg .page-title, .page-hero-bg .page-lead, .page-hero-bg .page-lead p { color: #fff; }
.page-hero-bg .crumbs, .page-hero-bg .crumbs a { color: rgba(255,255,255,.8); }

/* Kontakt: cały kafelek oddziału klikalny (link z nazwy miasta rozciągnięty na kartę); telefon i przyciski nad nim */
.branch-card { position: relative; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.branch-link { color: inherit; text-decoration: none; }
.branch-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.branch-card .branch-tel a, .branch-card .branch-actions, .branch-card .branch-more { position: relative; z-index: 2; }
.branch-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-2px); }
.branch-card:hover .branch-link { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .15em; }
.branch-link:focus-visible { outline: none; }
.branch-card:has(.branch-link:focus-visible) { outline: 3px solid var(--red); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .branch-card:hover { transform: none; } }
