/*
 * Altman Professional — motyw frontendu.
 *
 * 2026-10-19: powrót do charakteru graficznego starej strony (Symfony, 2017–2026):
 * krój Exo, pomarańcz marki, sekcje na pełną szerokość, wersaliki w nawigacji
 * i nagłówkach. Układ i treść z Etapu 3 (poprawki audytu) zostają.
 * Źródła palety: logo (#ef7c01), stare `content.css`/`page.css`, kolory „boxów" z bazy.
 */

/* ── Krój: Exo, hostowany lokalnie (bez Google Fonts — dane odwiedzających nie wychodzą poza serwer) ── */
@font-face {
    font-family: "Exo"; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url("../fonts/exo/exo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Exo"; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url("../fonts/exo/exo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Exo"; font-style: italic; font-weight: 300 400; font-display: swap;
    src: url("../fonts/exo/exo-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Exo"; font-style: italic; font-weight: 300 400; font-display: swap;
    src: url("../fonts/exo/exo-italic-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;
}

:root {
    --orange: #ef7c01;       /* pomarańcz z logo */
    --orange-lg: #d96a00;    /* akcenty w dużych nagłówkach (kontrast ≥ 3:1 na bieli) */
    --orange-ink: #b35400;   /* odnośniki w tekście (kontrast ≥ 4,5:1 na bieli) */
    --graphite: #1a1a18;     /* czerń godła */
    --footer: #3c3c3c;       /* stopka starej strony */
    --ink: #2b2b2b;
    --text: #444;
    --muted: #6b6b6b;
    --sand: #f5f4f2;
    --line: #e5e3e1;
    /* „Boxy" oferty — kolory ze starej bazy (node_variable.color) */
    --box-1: #ff8400;
    --box-2: #ff5400;
    --box-3: #e80000;
    /*
     * Biały napis na pomarańczu ma kontrast 2,5–3,2:1 — poniżej WCAG. Zamiast zmieniać
     * kolory marki przyciemniamy tło od góry (decyzja Piotra): napis siedzi w ciemniejszej części.
     */
    --darken-top: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .05) 100%);
    /*
     * Biała mgła na drewnie podstron. Plik `wood-base.webp` jest rozbielony w 75%, mgła dokłada resztę:
     * 0 → 75% bieli · .48 → 87% · .64 → 91% · .72 → 93% · .80 → 95%. Do strojenia na żywo w inspektorze.
     */
    --wood-veil: .75;
    --gutter: 50px;
    --header-h: 92px;
    --maxw: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    font-family: "Exo", "Trebuchet MS", sans-serif;
    font-size: 17px;
    color: var(--text);
    background: #fff;
    line-height: 1.75;
    padding-top: var(--header-h);   /* podstrony: miejsce pod przyklejonym nagłówkiem */
}
body.page-home { padding-top: 0; }   /* strona główna: nagłówek leży na zdjęciu */

/*
 * Podstrony: tło z drewna — pas `head.jpg` ze starej strony, rozbielony tak, że słoje
 * są ledwo widoczne (pomysł Piotra: zamiast „czarne na białym" i zamiast paska nad tekstem).
 * Rozbielenie: część w pliku (75%), reszta to biała warstwa `--wood-veil`. Przypięte do okna przez
 * fixed pseudo-element, bo `background-attachment: fixed` iOS ignoruje. Wysokość 100vh
 * (na telefonie = największy widok) — tło nie przeskalowuje się, gdy chowa się pasek adresu.
 */
body:not(.page-home)::before {
    content: ""; position: fixed; z-index: -1; top: 0; left: 0; width: 100%; height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, var(--wood-veil)), rgba(255, 255, 255, var(--wood-veil))),
        #f6f1ea url("../img/theme/wood-base.webp") center / cover no-repeat;
    pointer-events: none;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange-ink); }
a:hover { color: var(--graphite); }
strong { font-weight: 600; color: var(--ink); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--orange-lg); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--graphite); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

/* Wspólny nagłówek sekcji — wersaliki, krój lekki, jak H1 starej strony */
.section-title {
    margin: 0 0 24px; font-weight: 300; font-size: 34px; line-height: 1.15;
    text-transform: uppercase; letter-spacing: .01em; color: var(--ink);
}

/* ── Nagłówek ── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: #fff; box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
    transition: background-color .25s ease, box-shadow .25s ease;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); padding: 0 var(--gutter); }
.brand { display: block; flex: none; line-height: 0; }
.brand-logo { display: block; width: 190px; height: auto; }
.brand-logo--light { display: none; }

/* Strona główna, zanim się przewinie: przezroczysty pas z cieniem od góry, jasne logo i menu.
   Bez JS nie ma przełączenia na biały pasek — nagłówek odjeżdża wtedy razem ze zdjęciem. */
.page-home .site-header { position: absolute; }
.js .page-home .site-header { position: fixed; }
.page-home .site-header:not(.is-scrolled) {
    background: linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 100%);
    box-shadow: none;
}
.page-home .site-header:not(.is-scrolled) .header-inner { height: 116px; }
.page-home .site-header:not(.is-scrolled) .brand-logo { width: 210px; }
.page-home .site-header:not(.is-scrolled) .brand-logo--light { display: block; }
.page-home .site-header:not(.is-scrolled) .brand-logo--dark { display: none; }
.page-home .site-header:not(.is-scrolled) .main-nav > ul > li > a,
.page-home .site-header:not(.is-scrolled) .header-phone,
.page-home .site-header:not(.is-scrolled) .header-fb { color: #fff; }
.page-home .site-header:not(.is-scrolled) .header-sep { background: rgba(255, 255, 255, .55); }
.page-home .site-header:not(.is-scrolled) .nav-toggle { color: #fff; border-color: rgba(255, 255, 255, .6); }

/* Menu wyrównane do prawej (decyzja Piotra), za nim kreska, telefon i Facebook — jak na starej stronie. */
.main-nav { margin-left: auto; }
/* Tylko lista najwyższego poziomu — bez „>" reguła łapałaby też .submenu
   i (mając wyższą specyficzność) trzymała podmenu otwarte na stałe. */
.main-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
    display: flex; align-items: center; gap: 6px; padding: 0 14px; line-height: 38px;
    color: var(--graphite); text-decoration: none; text-transform: uppercase;
    font-size: 17px; letter-spacing: .05em; white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.has-children:hover > a,
.main-nav > ul > li.has-children:focus-within > a { background: var(--graphite); color: #fff; }
.page-home .site-header:not(.is-scrolled) .main-nav > ul > li > a:hover,
.page-home .site-header:not(.is-scrolled) .main-nav > ul > li.has-children:hover > a,
.page-home .site-header:not(.is-scrolled) .main-nav > ul > li.has-children:focus-within > a { background: var(--orange); color: var(--graphite); }
.main-nav > ul > li > a.active,
.main-nav > ul > li > a.active-parent { background: var(--orange); color: var(--graphite); }
.nav-caret { width: 14px; height: 14px; opacity: .75; }
.nav-toggle {
    display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
    background: transparent; color: var(--graphite); border: 1px solid #b5b5b5;
    font: 500 15px "Exo", sans-serif; text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* Podmenu: grafitowy panel z pomarańczową krawędzią */
.main-nav .submenu {
    display: none; position: absolute; left: 0; top: 100%; min-width: 300px;
    list-style: none; margin: 0; padding: 8px 0; z-index: 60;
    background: var(--graphite); border-top: 3px solid var(--orange);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.main-nav li.has-children:hover > .submenu,
.main-nav li.has-children:focus-within > .submenu { display: block; }
.main-nav .submenu a { display: block; padding: 0 20px; line-height: 44px; color: #fff; font-size: 16px; text-decoration: none; }
.main-nav .submenu a:hover, .main-nav .submenu a.active { color: var(--orange); background: rgba(255, 255, 255, .05); }

.header-sep { width: 1px; height: 30px; background: #b5b5b5; flex: none; }
.header-aside { display: flex; align-items: center; gap: 14px; flex: none; }
.header-phone {
    display: flex; align-items: center; gap: 10px; white-space: nowrap;
    color: var(--graphite); text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: .03em;
}
.header-phone svg { color: var(--orange); }
.header-phone svg, .header-fb svg { width: 20px; height: 20px; flex: none; }
.header-phone:hover, .header-fb:hover { color: var(--orange); }
.header-fb { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--graphite); }

/* ── Przyciski ── */
.btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
    font: 600 15px/1.2 "Exo", sans-serif; text-transform: uppercase; letter-spacing: .08em;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: none; }
/* Grafit na pomarańczu = kolory logo; kontrast 6,3:1 (biały miałby 2,8:1). */
.btn--primary { background: var(--orange); color: var(--graphite); }
.btn--primary:hover { background: var(--graphite); color: #fff; }
.btn--ghost { border-color: var(--graphite); color: var(--graphite); background: transparent; }
.btn--ghost:hover { background: var(--graphite); color: #fff; }
.btn--ghost-light { border-color: rgba(255, 255, 255, .75); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: #fff; color: var(--graphite); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* ── Hero ── */
/*
 * Audyt 1.7: stary slider miał tylko zdjęcia — bez hasła i przycisku. Zdjęcie zostaje
 * jasne (jak na starej stronie); czytelność hasła daje cień od lewej, a nie zaciemnienie całości.
 */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 560px; padding: 160px 0 0; background: var(--sand); }
.hero--image {
    min-height: 100vh; min-height: 100svh; color: #fff;
    background-color: #2a2622; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero--image::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(18, 16, 14, .8) 0%, rgba(18, 16, 14, .55) 40%, rgba(18, 16, 14, 0) 68%);
}
.hero-inner { position: relative; padding: 0 var(--gutter) 120px; max-width: 860px; }
.hero-bar { display: block; width: 64px; height: 4px; background: var(--orange); margin-bottom: 26px; }
.hero-headline {
    margin: 0 0 22px; font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.08;
    text-transform: uppercase; letter-spacing: .01em; color: var(--ink); text-wrap: balance;
}
.hero-lead { margin: 0 0 34px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 300; line-height: 1.6; color: var(--muted); max-width: 34em; }
.hero--image .hero-headline { color: #fff; }
.hero--image .hero-lead { color: #efebe6; }
.hero:not(.hero--image) .btn--ghost-light { border-color: var(--graphite); color: var(--graphite); }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 36px; color: #fff; opacity: .85; }
.hero-scroll:hover { color: var(--orange); opacity: 1; }
.hero-scroll svg { display: block; width: 26px; height: 42px; }

/* ── Pas oferty — „boxy" ze starej strony ── */
.boxes { display: flex; }
.box {
    flex: 1; position: relative; display: flex; flex-direction: column; justify-content: center;
    min-height: 112px; padding: 18px 90px 18px 40px; color: #fff; text-decoration: none;
}
.box:nth-child(3n+1) { background: var(--darken-top), var(--box-1); }
.box:nth-child(3n+2) { background: var(--darken-top), var(--box-2); }
.box:nth-child(3n+3) { background: var(--darken-top), var(--box-3); }
.box:hover { color: #fff; filter: brightness(.9); }
.box-title { font-size: 24px; line-height: 1.15; text-transform: uppercase; letter-spacing: .03em; }
.box-sub { font-size: 15px; margin-top: 6px; }
.box-arrow { position: absolute; right: 36px; top: 50%; width: 28px; height: 28px; margin-top: -14px; transition: transform .2s ease; }
.box:hover .box-arrow { transform: translateX(6px); }

/* ── Wybrane realizacje — pełna szerokość, bez marginesów (audyt 5.1: klient kupuje oczami) ── */
.featured-head {
    display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: baseline;
    padding: 76px var(--gutter) 30px;
}
.featured-head .section-title { margin: 0; }
.link-more { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: var(--orange-ink); }
.link-more:hover { color: var(--graphite); }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; }
.featured-item a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #222; text-decoration: none; }
.featured-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.featured-item a:hover img, .featured-item a:focus-visible img { transform: scale(1.05); }
.featured-label {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 28px 22px;
    color: #fff; font-size: 17px; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .78) 100%);
}
.featured-label::before { content: ""; display: block; width: 32px; height: 3px; background: var(--orange); margin-bottom: 12px; transition: width .3s ease; }
.featured-item a:hover .featured-label::before, .featured-item a:focus-visible .featured-label::before { width: 64px; }

/* ── Jak działamy (audyt 3.3) ── */
.process { background: var(--sand); padding: 88px var(--gutter); }
.process-inner { max-width: var(--maxw); margin: 0 auto; }
.process-lead { margin: -8px 0 44px; color: var(--muted); font-size: 18px; max-width: 46rem; }
.process-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; list-style: none; margin: 0; padding: 0; }
.process-step { border-top: 2px solid var(--orange); padding-top: 18px; }
.process-num { display: block; font-size: 60px; font-weight: 300; line-height: 1; color: var(--orange-lg); margin-bottom: 14px; }
.process-step h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.process-step p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.process-cta { margin: 48px 0 0; }

/* ── O firmie — tekst na tle kuchni (stare `home.jpg`) ── */
.intro { display: flex; min-height: 620px; background: #fff url("../img/theme/home.webp") left center / cover no-repeat; }
.intro-text { margin-left: 50%; padding: 90px var(--gutter) 90px 30px; max-width: 760px; }
.intro-text h2 { margin: 0 0 24px; font-weight: 300; font-size: 34px; line-height: 1.15; text-transform: uppercase; color: var(--ink); }
.intro-text p { margin: 0 0 18px; line-height: 1.85; max-width: 64ch; }

/* ── Opinie na drewnie (stare „slogany", audyt 3.2) ── */
.slogans {
    position: relative; min-height: 488px; display: flex; align-items: center; justify-content: center;
    padding: 70px 120px; text-align: center; color: #fff;
    background: #2b1d14 url("../img/theme/slogan.webp") center / cover no-repeat;
}
.slogan-track { width: 100%; max-width: 1000px; }
.slogan { margin: 0; }
.slogan + .slogan { margin-top: 48px; }   /* bez JS widać wszystkie, jedna pod drugą */
.slogans.is-ready .slogan + .slogan { margin-top: 0; }
.slogan blockquote { margin: 0; }
.slogan blockquote p { margin: 0; font-size: 46px; font-style: italic; font-weight: 300; line-height: 1.25; text-shadow: 0 0 12px rgba(0, 0, 0, .9); }
.quote-author { margin: 22px 0 0; font-size: 18px; text-transform: uppercase; letter-spacing: .18em; text-shadow: 0 0 8px rgba(0, 0, 0, .9); }
.quote-author::before { content: "— "; }
.slogan-nav {
    position: absolute; top: 50%; margin-top: -28px; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .25); border: 0; color: #fff; cursor: pointer;
}
.slogan-nav:hover, .slogan-nav:focus-visible { background: var(--orange); color: var(--graphite); }
.slogan-nav svg { width: 26px; height: 26px; }
.slogan-nav--prev { left: 30px; }
.slogan-nav--next { right: 30px; }
.slogan-dots { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 4px; }
.slogan-dot { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; padding: 0; }
.slogan-dot span { display: block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.slogan-dot[aria-current="true"] span { background: var(--orange); border-color: var(--orange); }
.slogans [hidden] { display: none; }

/* ── Pas kontaktowy: grafit z wezwaniem + pomarańcz z drzewem (stara stopka „up") ── */
.contact-strip { display: flex; min-height: 488px; }
.contact-cta {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 70px 70px 70px var(--gutter); background: var(--graphite); color: #d9d6d1;
}
.contact-cta .section-title { color: #fff; }
.contact-cta p { margin: 0 0 30px; font-size: 18px; max-width: 34em; }
.contact-card {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 70px 240px 70px 70px; color: #fff;
    /* Duże pole — gradient łagodniejszy niż na boxach, żeby pomarańcz nie zbrązowiał. */
    background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, 0) 100%),
                var(--orange) url("../img/theme/contact-tree.png") right center / auto 100% no-repeat;
}
.contact-card h2 { margin: 0 0 26px; font-size: 30px; font-weight: 400; line-height: 1.15; text-transform: uppercase; color: #fff; }
.contact-card address { font-style: normal; font-size: 21px; line-height: 1.6; margin: 0 0 22px; }
.contact-card p { margin: 0; font-size: 21px; line-height: 1.6; }
.contact-card a { color: #fff; text-decoration: none; }
.contact-card a:hover { color: var(--graphite); }
.contact-card .map-link {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 26px; padding-bottom: 4px;
    font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid #fff;
}

/* ── Podstrony ── */
/*
 * Audyt 3.5: akapity ciągnęły się przez całą szerokość kolumny. Powyżej ~75 znaków
 * w wierszu czytelność wyraźnie spada, bo oko gubi początek następnej linii.
 * Jednostka `ch` mierzy szerokość znaku, więc miara trzyma się przy każdym rozmiarze pisma.
 */
.prose { padding: 56px var(--gutter) 72px; }
.prose h1 { margin: 0 0 16px; font-weight: 300; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.15; text-transform: uppercase; color: var(--ink); max-width: 30ch; }
.prose h2 { margin: 2.2rem 0 .75rem; font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.25; text-transform: uppercase; color: var(--ink); max-width: 40ch; }
.prose h3 { margin: 1.6rem 0 .5rem; font-weight: 500; font-size: 1.15rem; color: var(--ink); }
.prose .lead, .page .lead { color: var(--muted); font-size: 1.2rem; font-weight: 300; margin: 0 0 1.75rem; max-width: 60ch; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; max-width: 68ch; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--orange); }
.page .content { max-width: 68ch; }
.page .content h2 { margin: 2.2rem 0 .75rem; }
.page h1 { margin: 0 0 16px; font-weight: 300; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.15; text-transform: uppercase; color: var(--ink); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: .06em; }
.breadcrumb a { text-decoration: none; }
.error-page { text-align: center; padding: 5rem var(--gutter); }
.error-page h1 { font-size: 4rem; color: var(--orange-lg); max-width: none; }

/* ── Galeria ── */
.page--gallery { padding: 56px var(--gutter) 72px; }
.gallery { list-style: none; margin: 1.75rem 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery-item a { display: block; overflow: hidden; background: #eee; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery-item a:hover img { transform: scale(1.04); }
.gallery-caption { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); }
.gallery-empty { color: var(--muted); font-style: italic; }
.gallery-cta { margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.gallery-item a { cursor: zoom-in; }

/* ── Lightbox (natywny <dialog>, skrypt: js/lightbox.js) ── */
.lightbox {
    /* Margines na przyciski i podpis — czyta go też skrypt, żeby dobrać rozmiar zdjęcia. */
    --lb-gap-x: 180px;
    --lb-gap-y: 110px;
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; overflow: hidden;
    background: rgba(20, 19, 17, .96); color: #e8e4de;
    touch-action: pan-y pinch-zoom;   /* przesunięcie w bok obsługuje skrypt, powiększanie zostaje */
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(20, 19, 17, .5); }
html:has(.lightbox[open]) { overflow: hidden; }   /* strona pod spodem stoi w miejscu */

/* Stara szkoła: figure jako tabela, podpis jako table-caption — podpis ma dokładnie szerokość zdjęcia. */
.lightbox-stage { display: table; margin: 0; }
.lightbox-img {
    display: block; max-width: calc(100vw - var(--lb-gap-x)); max-height: calc(100vh - var(--lb-gap-y));
    object-fit: contain; background: #0e0d0c no-repeat center / 100% 100%; transition: opacity .2s ease;
}
.lightbox-caption { display: table-caption; caption-side: bottom; padding-top: 14px; font-size: 15px; line-height: 1.4; }
.lightbox-count { float: right; margin-left: 20px; color: var(--orange); font-weight: 600; letter-spacing: .1em; }
.lightbox-text::before { content: ""; display: inline-block; width: 24px; height: 3px; background: var(--orange); vertical-align: middle; margin: -2px 12px 0 0; }
.lightbox-text:empty::before { display: none; }

.lightbox-btn {
    position: absolute; z-index: 2; width: 56px; height: 56px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); border: 0; color: #fff; cursor: pointer;
}
.lightbox-btn:hover { background: var(--orange); color: var(--graphite); }
.lightbox-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lightbox-btn svg { width: 26px; height: 26px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev, .lightbox-next { top: 50%; margin-top: -28px; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* Wczytywanie: przygaszone zdjęcie i pomarańczowy pasek u góry. */
.lightbox.is-loading .lightbox-img { opacity: .85; }
.lightbox.is-loading::after {
    content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 40%;
    background: var(--orange); animation: lightbox-load 1s ease-in-out infinite;
}
@keyframes lightbox-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Treść podstrony wewnątrz galerii/kontaktu — bez drugiego wcięcia (artykuł ma już marginesy). */
.page--gallery .prose, .page--contact .prose { padding: 0; }

/* ── Kontakt ── */
.page--contact { padding: 56px var(--gutter) 72px; }
.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.contact-side { background: var(--sand); border-top: 3px solid var(--orange); padding: 1.75rem; }
.contact-side h2 { margin-top: 0; font-size: 1.15rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.contact-side address { font-style: normal; margin-bottom: 1rem; }
.contact-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.contact-list li { margin-bottom: .35rem; }

/* ── Formularz ── */
.contact-form-wrap { margin-top: 2.5rem; }
.contact-form-wrap h2 { margin: 0 0 1.25rem; font-weight: 400; font-size: 1.5rem; text-transform: uppercase; color: var(--ink); }
.contact-form { max-width: 640px; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .35rem; color: var(--ink); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field select, .field textarea {
    width: 100%; padding: .7rem .85rem; border: 1px solid #c9c6c2;
    border-radius: 0; font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field .req { color: #b3261e; }
.field .opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field--consent label.consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.field--consent input { margin-top: .3rem; flex: none; accent-color: var(--orange); }

.form-msg { padding: .9rem 1.1rem; margin-bottom: 1.25rem; font-size: .95rem; }
.form-msg--ok { background: #edf7ee; border: 1px solid #bcdfc0; color: #1e5427; }
.form-msg--error { background: #fdeceb; border: 1px solid #f3c3bf; color: #8c1d18; }

/*
 * Pułapka na automaty. Świadomie NIE display:none ani type="hidden" —
 * lepsze boty takie pola pomijają. Ukrywamy wizualnie, zostawiając je w drzewie.
 */
.hp-field {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Stopka (stara stopka „down": kolumny menu wersalikami) ── */
.site-footer { background: var(--footer); color: #cfcfcf; }
.footer-inner { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 40px; padding: 60px var(--gutter) 44px; }
.footer-brand img { display: block; width: 170px; height: auto; margin-bottom: 18px; }
.footer-brand p { margin: 0 0 6px; font-size: 15px; line-height: 1.7; color: #b5b5b5; max-width: 22em; }
.footer-col h2 { margin: 0 0 10px; font-size: 20px; font-weight: 300; line-height: 1.3; text-transform: uppercase; letter-spacing: .03em; }
.footer-col h2 a { color: #fff; text-decoration: none; }
.footer-col h2 a:hover { color: var(--orange); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { font-size: 15px; line-height: 1.5; padding: .25rem 0; }
.footer-col li a { color: #b5b5b5; text-decoration: none; }
.footer-col li a:hover { color: #fff; }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
    padding: 20px var(--gutter); border-top: 1px solid #4d4d4d; font-size: 14px; color: #b5b5b5;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: #b5b5b5; }
.footer-bottom a:hover { color: #fff; }

/* ── Responsywność ── */
@media (max-width: 1180px) {
    .main-nav > ul > li > a { padding: 0 9px; font-size: 15px; }
    .header-phone span { display: none; }
    .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    :root { --gutter: 20px; --header-h: 68px; }
    .header-inner { gap: 8px; }
    .brand-logo, .page-home .site-header:not(.is-scrolled) .brand-logo { width: 150px; }
    .page-home .site-header:not(.is-scrolled) .header-inner { height: 84px; }
    .header-sep { display: none; }
    .nav-toggle { display: inline-flex; }
    .main-nav { order: 3; margin-left: 0; }
    .header-aside { order: 2; margin-left: auto; gap: 0; }
    .header-phone { width: 44px; height: 44px; justify-content: center; }

    .main-nav > ul {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
        background: var(--graphite); border-top: 3px solid var(--orange);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    }
    .main-nav > ul.open { display: flex; }

    /*
     * Audyt 4.1: pozycje leżały zbyt gęsto. WCAG wymaga obszaru klikalnego
     * co najmniej 44×44 px — stąd min-height i większe odstępy w pionie.
     */
    .main-nav > ul > li > a,
    .page-home .site-header:not(.is-scrolled) .main-nav > ul > li > a {
        min-height: 48px; padding: 0 4px; font-size: 16px; color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
    .main-nav > ul > li > a:hover { background: transparent; color: var(--orange); }
    .main-nav > ul > li > a.active, .main-nav > ul > li > a.active-parent { background: transparent; color: var(--orange); }
    .nav-caret { display: none; }

    /* Na dotyku nie ma najechania kursorem — podmenu jest rozwinięte na stałe. */
    .main-nav .submenu { display: block; position: static; min-width: 0; padding: 0 0 6px 14px; border: 0; box-shadow: none; background: transparent; }
    .main-nav .submenu a { line-height: 1.3; min-height: 44px; display: flex; align-items: center; padding: 0 4px; font-size: 15px; color: #cfcfcf; }

    /* Audyt 4.2: tekst akapitowy nie schodzi poniżej 16 px na urządzeniach mobilnych. */
    body { font-size: 16px; }
    .prose p, .prose li, .page .content p, .page .content li { font-size: 1rem; }

    .section-title, .intro-text h2 { font-size: 26px; }
    .hero--image::before { background: linear-gradient(0deg, rgba(18, 16, 14, .85) 0%, rgba(18, 16, 14, .45) 55%, rgba(18, 16, 14, .1) 100%); }
    .hero--image { min-height: 640px; min-height: min(100svh, 760px); }
    .hero-inner { padding-bottom: 56px; }
    .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
    .hero-scroll { display: none; }

    .boxes { flex-direction: column; }
    .box { min-height: 92px; padding-left: var(--gutter); }
    .box-title { font-size: 21px; }

    .featured-head { padding: 52px var(--gutter) 22px; }
    .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-label { padding: 40px 14px 14px; font-size: 14px; }

    .process { padding: 56px var(--gutter); }

    .intro { background-size: auto 240px; background-position: left top; padding-top: 240px; min-height: 0; }
    .intro-text { margin-left: 0; padding: 40px var(--gutter) 48px; }

    .slogans { min-height: 380px; padding: 60px 64px 90px; }
    .slogan blockquote p { font-size: 28px; }
    .slogan-nav { width: 44px; height: 44px; margin-top: -22px; }
    .slogan-nav--prev { left: 8px; }
    .slogan-nav--next { right: 8px; }

    .contact-strip { flex-direction: column; }
    .contact-cta { padding: 52px var(--gutter); }
    /* Na wąskim ekranie drzewo schodzi pod tekst — obok się nie zmieści. */
    .contact-card { padding: 52px var(--gutter) 230px; background-position: 0 0, right bottom; background-size: auto, auto 200px; }
    .contact-card h2 { font-size: 24px; }
    .contact-card address, .contact-card p { font-size: 18px; }
    .btn-row .btn { min-height: 48px; }

    .prose, .page--gallery, .page--contact { padding-top: 36px; padding-bottom: 52px; }
    .footer-inner { padding: 44px var(--gutter) 32px; gap: 28px; }

    /* Lightbox na telefonie: zdjęcie na całą szerokość, przyciski przewijania na dole, pod kciukiem. */
    .lightbox { --lb-gap-x: 0px; --lb-gap-y: 160px; }
    .lightbox-img { max-height: calc(100svh - var(--lb-gap-y)); }
    .lightbox-caption { padding: 12px 64px 0; text-align: center; }
    .lightbox-count { float: none; display: block; margin: 0 0 2px; }
    .lightbox-btn { width: 48px; height: 48px; }
    .lightbox-close { top: 10px; right: 10px; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; margin-top: 0; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
@media (max-width: 520px) {
    .featured-grid, .process-list, .footer-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
    .lightbox.is-loading::after { animation: none; width: 100%; opacity: .6; }
}
