/*
Theme Name: Bramtech
Theme URI: https://bramtech.eu
Author: Bramtech delivery team
Description: Motyw WordPress dla BRAM-TECH Tomasz First — jednostronicowa witryna z nawigacją kotwicową, edytowalna przez Customizer (theme_mod). Kolory tymczasowe do potwierdzenia po dostawie logo (spec/decisions.md Q10.1).
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bramtech
Requires at least: 6.4
Requires PHP: 8.0
*/

/* ==========================================================================
   Tokeny projektowe (spec/index.md). Wartości poniżej są domyślne — cztery
   z nich (accent, accent-strong, accent-light, graphite) są nadpisywane
   przez inline :root wygenerowany z theme_mod w inc/assets.php. Pozostałe
   tokeny nie są edytowalne z Customizera (AQ-02).
   ========================================================================== */
:root{
  --bt-accent:#e2690f;         /* tylko powierzchnie i grafika, nigdy tekst */
  --bt-accent-strong:#b04f0a;  /* tekst/przycisk na jasnym tle (5.29:1) */
  --bt-accent-hover:#8f4009;   /* hover przycisku (7.23:1) */
  --bt-accent-light:#f9a14a;   /* tekst/focus na ciemnym tle (7.56:1) */
  --bt-graphite:#1e2529;
  --bt-danger:#b3261e;         /* ST-07: błąd formularza — 6.54:1 na --bt-surface, 5.99:1 na --bt-surface-alt; nieedytowalny (nie jest tokenem marki, AQ-02) */
  --bt-surface:#ffffff;
  --bt-surface-alt:#f4f5f6;
  --bt-text-muted:#5a6570;
  --bt-border:#d8dcdf;
  --bt-radius:4px;
  --bt-shadow:0 1px 3px rgba(30,37,41,.12);
  --bt-gap:96px;               /* odstęp sekcji desktop */
  --bt-pad:32px;
  --bt-header-h:72px;          /* wysokość sticky pasa głównego (ST-02) */
  --bt-topbar-h:40px;          /* wysokość paska kontaktowego (ST-02, AQ-09) */
}

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

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:1rem;
  line-height:1.6;
  color:var(--bt-graphite);
  background:var(--bt-surface);
  -webkit-text-size-adjust:100%;
}

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

h1,h2,h3{line-height:1.2;margin:0 0 .5em}
h1{font-size:clamp(1.75rem,4.4vw,3rem);font-weight:700;letter-spacing:.01em}
h2{font-size:clamp(1.5rem,3.2vw,2.25rem);font-weight:700}
h3{font-size:1.0625rem;font-weight:600}
p{margin:0 0 1rem}
ul,ol{margin:0;padding:0;list-style:none}

a{color:var(--bt-accent-strong);text-decoration:underline}
a:hover{color:var(--bt-accent-hover)}
/* stage-10 AC-10.12 (html-validate "tel-non-breaking"): keep visible phone
   numbers on one line at narrow widths instead of wrapping mid-number.
   CSS-only fix — avoids inserting &nbsp; into the five duplicated
   theme_mod phone-number defaults in PHP for the same visual result. */
a[href^="tel:"]{white-space:nowrap}

/* ==========================================================================
   Focus (A11Y-06). `:focus` jest zapasem dla przeglądarek bez
   `:focus-visible` — obie grupy selektorów mają identyczne reguły, żeby
   fokus nigdy nie był niewidoczny.
   ========================================================================== */
a:focus,button:focus,input:focus,select:focus,textarea:focus,summary:focus,
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,summary:focus-visible{
  outline:2px solid var(--bt-graphite);
  outline-offset:2px;
}
.bt-dark a:focus,.bt-dark button:focus,.bt-dark summary:focus,
.bt-dark a:focus-visible,.bt-dark button:focus-visible,.bt-dark summary:focus-visible{
  outline-color:var(--bt-accent-light);
}

/* Sekcje są celem fokusu programowego po skoku z kotwicy (`tabindex="-1"`,
   spec/a11y.md „Klawiatura” pkt 5) — SEC-06/SEC-07 (ST-05) są pierwszymi
   sekcjami bez żadnego linku/przycisku wewnątrz, więc dopiero tu ten brak
   staje się obserwowalny (AC-05.14). Reguła obejmuje każdą sekcję, nie tylko
   te dwie.
   Release 2.1 (D-R21-09, D-R21-26): `:focus-visible` only, so a mouse
   click on non-interactive content — which focuses the section — no longer
   draws a full-width outline read as stray lines between sections. The
   `:focus` twins survive only where `:focus-visible` is unsupported.
   Interactive elements, `main` and `#bt-form-status` keep their own rules.
   The section ring is inset (`outline-offset:-4px`, DEV-R21-05, R-R21-5):
   `scroll-margin-top` lands the section top exactly under the sticky header
   and full-bleed sections span the viewport, so an outside ring was hidden
   (top) or off screen (sides). Inset, its top edge sits just below the
   header's border and both sides stay on screen. */
section[tabindex="-1"]:focus-visible{
  outline:2px solid var(--bt-graphite);outline-offset:-4px;
}
.bt-dark[tabindex="-1"]:focus-visible{
  outline-color:var(--bt-accent-light);
}
@supports not selector(:focus-visible){
  section[tabindex="-1"]:focus{
    outline:2px solid var(--bt-graphite);outline-offset:-4px;
  }
  .bt-dark[tabindex="-1"]:focus{
    outline-color:var(--bt-accent-light);
  }
}

/* ==========================================================================
   Skip link (A11Y-03). Poza ekranem przez pozycjonowanie, nie `display:none`,
   żeby zostać w kolejności tabulacji. `position:fixed` (nie `absolute`) —
   inaczej po przewinięciu strony fokus trafiał poza widoczny viewport,
   bo `absolute` liczy się względem przewijanego dokumentu (AC-02.24).
   ========================================================================== */
.bt-skip{
  position:fixed;left:-9999px;top:0;z-index:100;
  background:var(--bt-graphite);color:#fff;
  padding:12px 20px;text-decoration:none;font-weight:600;
}
.bt-skip:focus{left:8px;top:8px;color:#fff}

/* ==========================================================================
   Siatka treści i breakpointy (spec/index.md — mobile <768/tablet 768-1023/
   desktop ≥1024, padding 16/24/32).
   ========================================================================== */
.bt-wrap{max-width:1200px;margin:0 auto;padding-inline:16px}

@media (min-width:768px){
  .bt-wrap{padding-inline:24px}
}
@media (min-width:1024px){
  .bt-wrap{padding-inline:var(--bt-pad)}
}

/* ==========================================================================
   Tekst dla technologii asystujących.
   ========================================================================== */
.bt-sr,
.screen-reader-text{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px;
}

/* ==========================================================================
   Przyciski (A11Y-11: hover zmienia tło I obramowanie — border-color
   przycisku głównego celowo równy tłu, nie `transparent`, żeby wizualnie
   nic się nie zmieniło, a technicznie obie właściwości reagowały na hover).
   ========================================================================== */
.bt-btn{
  display:inline-block;font-weight:700;font-size:.9375rem;
  padding:12px 22px;border-radius:var(--bt-radius);
  text-decoration:none;border:2px solid transparent;cursor:pointer;
  font-family:inherit;
}
.bt-btn-primary{
  background:var(--bt-accent-strong);border-color:var(--bt-accent-strong);color:#fff;
}
.bt-btn-primary:hover{
  background:var(--bt-accent-hover);border-color:var(--bt-accent-hover);color:#fff;
}
.bt-btn-ghost{background:transparent;color:#fff;border-color:#fff}
.bt-btn-ghost:hover{background:rgba(255,255,255,.12);border-color:#fff;color:#fff}

/* ==========================================================================
   Karta usługi (SEC-04, ST-04, mockup l. 249-257). ST-01 zarejestrował tu
   `box-shadow:var(--bt-shadow)` na zapas ("IDX-15 — jedyny dopuszczony cień
   kart"), zanim ta reguła miała jakiegokolwiek konsumenta w kodzie. Jedyne
   miejsce makiety, które faktycznie używa klasy `.bt-card`, nie ma cienia —
   cień w makiecie występuje wyłącznie na kontenerze formularza (SEC-09,
   `.bt-form`, poza zakresem tego etapu). Uzupełniono o padding/flex/gap i
   usunięto `box-shadow`, żeby reguła odpowiadała makiecie dosłownie
   (wierność makiecie, CLAUDE.md) — `--bt-shadow` zostaje w tokenach jako
   budżet dla ST-06, nie nakaz użycia na każdej karcie.
   Karta nie jest linkiem: brak `cursor:pointer` i brak reguły `:hover`.
   ========================================================================== */
.bt-card{
  background:var(--bt-surface);
  border:1px solid var(--bt-border);
  border-radius:var(--bt-radius);
  padding:24px;
  display:flex;flex-direction:column;gap:12px;
}
.bt-card h3{margin:0}
.bt-card p{margin:0;color:var(--bt-text-muted);font-size:.9375rem}

/* ==========================================================================
   Lead sekcji (spec/index.md; pierwszy konsument w tym arkuszu — SEC-02/03
   używają zwykłego `<p>`, SEC-04/05/08 mają wyróżniony wstęp, mockup l. 189-193).
   ========================================================================== */
.bt-lead{
  color:var(--bt-text-muted);max-width:65ch;
  font-size:1.0625rem;margin-bottom:40px;
}

/* ==========================================================================
   Siatki powtarzalnych slotów (SEC-04/05/08, ST-04). Mobile-first — baza to
   1 kolumna (brak `grid-template-columns` = jedna niejawna kolumna), zamiast
   kaskady `max-width` z makiety (spójne z podejściem ST-02/03). 4/2/1 dla
   usług, 3/2/1 dla modeli (AC-04.2, AC-04.10).
   Bez `nth-child` — siatka ma zostać spójna dla dowolnej liczby aktywnych
   slotów (AC-04.3, AC-04.21, AC-04.25).

   ST-17: SEC-08 (przykładowe rozwiązania) przełączone z `.bt-grid-3` na
   `.bt-grid-4` — bez nowej reguły CSS, ponownie użyta istniejąca klasa.
   AC-17.9 wymaga 4×3 na 1280 px / 2×6 na 768 px / 1 kolumny na 320 px dla
   dwunastu kafli (D-R2-23); `.bt-grid-3` dawałoby 3 kolumny na desktopie.
   `.bt-grid-4` już istnieje (sekcja usług) i ma dokładnie 1/2/4 kolumn —
   modele (SEC-05) zostają na `.bt-grid-3`, niezmienione (spec SEC-05:
   „3/2/1 grid… unchanged”).
   ========================================================================== */
.bt-grid{display:grid;gap:24px}

@media (min-width:768px){
  .bt-grid-4{grid-template-columns:repeat(2,1fr)}
  .bt-grid-3{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:1024px){
  .bt-grid-4{grid-template-columns:repeat(4,1fr)}
  .bt-grid-3{grid-template-columns:repeat(3,1fr)}
}

.bt-ico{width:48px;height:48px;stroke:var(--bt-accent);fill:none;stroke-width:1.5}

/* ==========================================================================
   Kafle SEC-05 / SEC-08 — release 2.1, variant B "corner label" (D-R21-06,
   D-R21-27; spec/release-2.1/index.md §Tile appearance), on theme tokens.
   One component for both sections (template-parts/components/figure-tile.php).
   `.bt-tile-box` is the 4:3 box: the `<a>` of a tile with an image, a
   `<div>` for a tile without one (D-R21-25). Every hover/focus cue and the
   pointer hang on `.bt-tile-link`, so a no-image tile shows none of them.
   Focus ring: the sitewide light-surface ring above (graphite 2 px, offset
   2 px, a11y.md §3) on the `<a>` itself — the box's `overflow:hidden` clips
   its children, never its own outline, and no ancestor clips.
   `--bt-accent` appears only as the decorative underline, never as text.
   ========================================================================== */
figure{margin:0}

.bt-tile-box{
  position:relative;display:block;aspect-ratio:4/3;
  border-radius:var(--bt-radius);overflow:hidden;isolation:isolate;
  background:var(--bt-surface);color:var(--bt-graphite);text-decoration:none;
}
/* `scroll-margin`: when Tab scrolls a tile into view, the browser aligns
   the border box, which left the 4 px ring past the viewport edge (forward)
   or under the sticky header (backward). The margins keep the whole ring on
   screen (a11y.md §3, DEV-R21-08). */
.bt-tile-link{cursor:pointer;scroll-margin-block:calc(var(--bt-header-h) + 8px) 8px}

/* The media fills the box: a Media Library image or the SEC-08 placeholder
   (`.bt-tile-media`), or the SEC-05 outline (`.bt-sketch`). */
.bt-tile-media{position:absolute;inset:0}
.bt-tile-media img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .45s ease;
}
.bt-tile-link:hover img,.bt-tile-link:focus-visible img{transform:scale(1.04)}

.bt-sketch{
  position:absolute;inset:0;background:var(--bt-surface-alt);
  display:flex;align-items:center;justify-content:center;padding:24px;
}
.bt-sketch svg{width:100%;height:100%;stroke:#8d969b;fill:none;stroke-width:2}

/* SEC-05 frame (E05-1): white, 1 px border, the render `contain`-fitted with
   a 6 % inset, so the corner label lies on the render's own white margin or
   reflection rather than on the gate. D-R2-28 still holds: the whole render
   is visible. SEC-08 (`.bt-tile--photo`) keeps `cover`, edge to edge, no
   border. */
.bt-tile--model .bt-tile-box{border:1px solid var(--bt-border)}
.bt-tile-media--contain img{object-fit:contain;padding:6%}

/* The corner label: opaque, so the image behind never affects contrast
   (title 15.5:1, number 5.29:1 — a11y.md §3). */
.bt-tile-label{
  position:absolute;left:0;bottom:0;max-width:calc(100% - 24px);
  display:flex;align-items:baseline;gap:10px;
  padding:10px 16px 10px 14px;background:var(--bt-surface);
  border-top-right-radius:var(--bt-radius);
  box-shadow:0 -1px 0 var(--bt-border),1px 0 0 var(--bt-border);
}
.bt-tile-no{
  flex:none;font-size:.75rem;font-weight:700;color:#fff;
  background:var(--bt-accent-strong);padding:2px 7px;border-radius:2px;
  font-variant-numeric:tabular-nums;letter-spacing:.04em;
}
/* The number is generated content, so it is not part of the link's text
   and the visible label is the title alone (WCAG 2.5.3, DEV-R21-07). */
.bt-tile-no::before{content:attr(data-no)}
.bt-tile-title{
  min-width:0;font-size:.9375rem;font-weight:700;line-height:1.3;
  color:var(--bt-graphite);overflow-wrap:anywhere;
}
.bt-tile-title::after{
  content:"";display:block;height:2px;margin-top:3px;background:var(--bt-accent);
  transform:scaleX(0);transform-origin:left;transition:transform .25s ease;
}
.bt-tile-link:hover .bt-tile-title::after,
.bt-tile-link:focus-visible .bt-tile-title::after{transform:scaleX(1)}

/* Reduced motion (a11y.md §3): no scale, the underline appears at once. */
@media (prefers-reduced-motion:reduce){
  .bt-tile-media img,.bt-tile-title::after{transition:none}
  .bt-tile-link:hover img,.bt-tile-link:focus-visible img{transform:none}
}

/* ==========================================================================
   Full-size view (release 2.1, ST-26) — variant B's dialog on theme tokens
   (D-R21-07, D-R21-23, D-R21-27; spec/release-2.1/index.md §Full-size view
   item 9). Markup: template-parts/components/lightbox.php; behaviour:
   assets/js/lightbox.js. Values are variant B's except `--bt-radius`,
   `--bt-accent-strong`, the theme's dark-surface focus ring, the size cap
   and the backdrop's carrier below. The view itself defines no transition.
   ========================================================================== */
/* Scroll lock while open. No `scrollbar-gutter`: a reserved gutter is not
   covered by the dialog and showed as a white strip down the right edge.
   Where scrollbars take space, the page behind widens by that much under the
   92 % backdrop and narrows back on close; scroll anchoring is off meanwhile,
   so that reflow cannot move the scroll position either (DEV-R21-11). */
html.bt-lightbox-open{overflow:hidden;overflow-anchor:none}

/* The dialog covers the viewport and is a size container, so the image cap
   can refer to the space actually available (`cqw`/`cqh`) — never to
   `100vw`, which includes a classic scrollbar. The two chrome values are
   what surrounds the image: horizontally the padding plus both 44 px nav
   buttons and their gaps; vertically variant B's own 190 px (padding, top
   bar, gaps, caption).
   The backdrop colour is painted on the dialog box, which covers the whole
   viewport, instead of on `::backdrop` as in variant B: the pixels are the
   same, but contrast tools such as axe ignore `::backdrop` and measured the
   caption against the white page underneath (DEV-R21-12). */
.bt-lightbox{
  --bt-lb-chrome-x:144px;
  --bt-lb-chrome-y:190px;
  width:100%;height:100%;max-width:none;max-height:none;
  margin:0;padding:0;border:0;background:rgba(15,19,21,.92);color:#fff;
  container-type:size;
}
.bt-lightbox::backdrop{background:transparent}
.bt-lightbox-inner{
  height:100%;display:grid;grid-template-rows:auto 1fr auto;padding:16px;gap:12px;
}
.bt-lightbox-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.bt-lightbox-count{font-size:.875rem;color:#c9d0d4;font-variant-numeric:tabular-nums}
.bt-lightbox-stage{display:flex;align-items:center;justify-content:center;gap:12px;min-height:0}
.bt-lightbox-figure{
  margin:0;display:flex;flex-direction:column;align-items:center;gap:12px;
  min-height:0;max-height:100%;
}

/* D-R21-23: at most twice the file's own width, within the width and the
   height left by the chrome. The script sets `width`/`height` (the ratio,
   so the box is reserved before the file arrives) and the two unitless
   properties; only the width is computed, the height follows the ratio, so
   the box always has the picture's proportions and `contain` never shows
   white bands. `max-*` cover an item without dimensions. */
.bt-lightbox-img{
  display:block;height:auto;object-fit:contain;
  background:#fff;border-radius:var(--bt-radius);
  width:min(calc(var(--bt-lb-w) * 2px), calc(100vw - var(--bt-lb-chrome-x)), calc((100vh - var(--bt-lb-chrome-y)) * var(--bt-lb-w) / var(--bt-lb-h)));
  max-width:100%;max-height:calc(100vh - var(--bt-lb-chrome-y));
}
@supports (width:1cqw){
  .bt-lightbox-img{
    width:min(calc(var(--bt-lb-w) * 2px), calc(100cqw - var(--bt-lb-chrome-x)), calc((100cqh - var(--bt-lb-chrome-y)) * var(--bt-lb-w) / var(--bt-lb-h)));
    max-height:calc(100cqh - var(--bt-lb-chrome-y));
  }
}
.bt-lightbox-caption{font-weight:600;font-size:1.0625rem;text-align:center;overflow-wrap:anywhere}
.bt-lightbox-caption small{display:block;font-weight:400;font-size:.8125rem;color:#c9d0d4}

.bt-lightbox-btn{
  font:inherit;color:#fff;background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.25);border-radius:var(--bt-radius);cursor:pointer;
  min-width:44px;min-height:44px;display:inline-grid;place-items:center;padding:0 12px;
}
.bt-lightbox-btn:hover{background:var(--bt-accent-strong);border-color:var(--bt-accent-strong)}
/* The sitewide ring (2 px, offset 2 px), in its dark-surface colour. */
.bt-lightbox-btn:focus,.bt-lightbox-btn:focus-visible{outline-color:var(--bt-accent-light)}
.bt-lightbox-btn[hidden]{display:none}
.bt-lightbox-prev,.bt-lightbox-next{flex:none}

/* ≤ 600 px: the one previous/next pair moves to a centred row at the
   bottom, as variant B's `.lb-bottom` — by letting the stage's children
   join the inner grid instead of duplicating the buttons (DEV-R21-10).
   The bottom row adds 56 px of vertical chrome. */
@media (max-width:600px){
  .bt-lightbox{--bt-lb-chrome-x:32px;--bt-lb-chrome-y:246px}
  .bt-lightbox-inner{grid-template-columns:1fr 1fr}
  .bt-lightbox-top{grid-column:1 / -1}
  .bt-lightbox-stage{display:contents}
  .bt-lightbox-figure{grid-column:1 / -1;grid-row:2;align-self:center;justify-self:center}
  .bt-lightbox-prev{grid-column:1;grid-row:3;justify-self:end}
  .bt-lightbox-next{grid-column:2;grid-row:3;justify-self:start}
}

/* Reduced motion: no transition at all, as variant B. Without this the
   sitewide rule (Ruch, A11Y-12) turns the close button's focus ring into a
   .01 ms transition when the view opens. */
@media (prefers-reduced-motion:reduce){
  .bt-lightbox,.bt-lightbox *{transition:none!important}
}

/* ==========================================================================
   Plakietka [DO PODMIANY] (mockup l. 89-94) — dowolny placeholder obrazu w
   dowolnej sekcji (ST-03: hero, o firmie; później ST-04/06). `z-index:1`
   (mockup go nie miał, bo nigdy nie stał obok prawdziwego `<img>`) trzyma
   plakietkę nad placeholderem, który jest position:absolute na tym samym
   domyślnym poziomie warstwy.
   ========================================================================== */
.bt-ph-badge{
  position:absolute;top:8px;left:8px;z-index:1;
  background:var(--bt-graphite);color:#fff;
  font-size:.6875rem;font-weight:700;letter-spacing:.06em;
  padding:4px 8px;border-radius:var(--bt-radius);
}

/* ==========================================================================
   Sekcje (reguły 1–5 z spec/index.md). Odstęp pionowy 48/64/96 px.
   ========================================================================== */
.bt-sec{padding-block:48px;scroll-margin-top:var(--bt-header-h)}
@media (min-width:768px){ .bt-sec{padding-block:64px} }
@media (min-width:1024px){ .bt-sec{padding-block:var(--bt-gap)} }

.bt-sec-alt{background:var(--bt-surface-alt)}
.bt-dark{background:var(--bt-graphite);color:#fff}
.bt-dark h1,.bt-dark h2,.bt-dark h3{color:#fff}
.bt-dark .bt-lead{color:#d4dade}

.bt-rule{
  display:block;width:48px;height:3px;
  background:var(--bt-accent);margin-bottom:20px;
}

/* ==========================================================================
   SEC-06 proces (ST-05, mockup l. 271-280). Mobile-first, jak `.bt-grid`
   (ST-04): baza 1 kolumna, `min-width:768/1024` dokładają 2/4 kolumny.
   `nth-child(4n+1)`/`nth-child(2n+1)` zamiast makietowego `:first-child` —
   ten ostatni usuwa lewą linię tylko dla dokładnie 4 elementów; siatka musi
   działać też dla 5 i 6 aktywnych kroków (SEC-06 „Layout”), gdzie piąty
   krok jest pierwszy w drugim rzędzie. `gap:32px 0` na desktopie (makieta:
   `gap:0`, poprawne tylko dla jednego rzędu) daje odstęp pionowy, gdy
   aktywnych kroków jest więcej niż 4 i siatka się zawija.
   ========================================================================== */
.bt-steps{display:grid;gap:28px 0}
.bt-steps li{padding:0;border-left:0}

@media (min-width:768px){
  .bt-steps{grid-template-columns:repeat(2,1fr);gap:32px 0}
  .bt-steps li{padding:0 24px;border-left:1px solid rgba(255,255,255,.14)}
  .bt-steps li:nth-child(2n+1){padding-left:0;border-left:0}
}
@media (min-width:1024px){
  .bt-steps{grid-template-columns:repeat(4,1fr);gap:32px 0}
  .bt-steps li:nth-child(2n+1){padding-left:24px;border-left:1px solid rgba(255,255,255,.14)}
  .bt-steps li:nth-child(4n+1){padding-left:0;border-left:0}
}

.bt-step-n{
  display:block;font-size:2.5rem;font-weight:700;line-height:1;
  color:var(--bt-accent-light);margin-bottom:12px;
}
.bt-steps p{color:#d4dade;font-size:.9375rem;margin:0}

/* ==========================================================================
   SEC-07 atuty (ST-05, mockup l. 282-290). Flexbox with fixed `flex-basis`
   columns (3 / 2 / 1). Release 2.1 (D-R21-08) reverses release-1 AC-05.11:
   every flex line, including an incomplete last one, starts at the left
   edge — five cards give cards 4 and 5 under cards 1 and 2. `flex-grow:0`
   keeps cards in a short row at the full-row width; basis and gaps are
   unchanged.
   ========================================================================== */
.bt-benefits{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:32px}
.bt-benefit{flex:0 1 100%;border:0}

@media (min-width:768px){
  .bt-benefits{gap:40px 32px}
  .bt-benefit{flex-basis:calc((100% - 32px)/2)}
}
@media (min-width:1024px){
  .bt-benefit{flex-basis:calc((100% - 64px)/3)}
}

.bt-benefit .bt-ico{stroke:var(--bt-accent-light);width:40px;height:40px}
.bt-benefit h3{margin:16px 0 8px}
.bt-benefit p{color:#d4dade;font-size:.9375rem;margin:0}

/* ISS-R2-30 (ST-23 fix round): client-typed catalogue text (titles,
   captions, descriptions, SEC-03 badges) may hold one long unbroken word.
   `anywhere` breaks only a word that cannot fit on a line of its own, so
   ordinary text lays out as before; unlike `break-word` it also shrinks the
   min-content width, which is what sizes these grid/flex items — so no
   `min-width:0` is needed. Inherited: one rule per card covers its title
   and description. No `hyphens:auto` (depends on the browser's Polish
   dictionary). */
.bt-card,.bt-tile,.bt-steps li,.bt-benefit,.bt-badges li{overflow-wrap:anywhere}

/* ==========================================================================
   Ruch (A11Y-12).
   ========================================================================== */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;transition-duration:.01ms!important;
  }
}

/* ==========================================================================
   Inter — hostowany lokalnie (Q10.2), wagi 400/600/700, `latin` +
   `latin-ext` (polskie znaki). Licencja: assets/fonts/inter/OFL.txt.
   Źródło i data pobrania: spec/assets-plan.md, wiersz #29.
   ========================================================================== */
@font-face{
  font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;
  src:url('assets/fonts/inter/inter-400-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;
  src:url('assets/fonts/inter/inter-400-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;
  src:url('assets/fonts/inter/inter-600-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;
  src:url('assets/fonts/inter/inter-600-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;
  src:url('assets/fonts/inter/inter-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+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:'Inter';font-style:normal;font-weight:700;font-display:swap;
  src:url('assets/fonts/inter/inter-700-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ==========================================================================
   SEC-01 — pasek kontaktowy (ST-02). Wewnątrz <header>, nad pasem głównym
   (AQ-09) — position:sticky działa na całym <header>, więc ten pasek
   przewija się razem z treścią, a pas główny zostaje przyklejony (patrz
   .bt-header niżej).
   ========================================================================== */
.bt-topbar{background:var(--bt-graphite);color:#fff;font-size:.875rem;min-height:var(--bt-topbar-h)}
.bt-topbar .bt-wrap{
  display:flex;flex-wrap:wrap;gap:8px 24px;
  align-items:center;min-height:var(--bt-topbar-h);
}
.bt-topbar a{
  color:#fff;text-decoration:none;
  display:inline-flex;align-items:center;gap:8px;
}
.bt-topbar a:hover{text-decoration:underline}
.bt-topbar a:focus,.bt-topbar a:focus-visible{outline-color:var(--bt-accent-light)}
.bt-topbar-icon{flex:0 0 auto}
.bt-topbar-note{margin-left:auto;color:#c7ced3}

@media (max-width:767px){
  .bt-topbar-text{
    position:absolute;width:1px;height:1px;overflow:hidden;
    clip:rect(0 0 0 0);white-space:nowrap;
  }
  .bt-topbar-note{display:none}
}

/* ==========================================================================
   SEC-01 — pas główny i sticky (ST-02). Cały <header> jest sticky z `top`
   ujemnym równym wysokości paska kontaktowego: przy przewijaniu pasek
   znika pod górną krawędzią, a reszta pudełka (pas główny) zatrzymuje się
   na top:0 — czysty efekt CSS, bez JS (Q1.5, AQ-09). Bez paska
   kontaktowego (bramtech_topbar_enabled=false) próg wynosi 0.
   ========================================================================== */
.bt-header{
  position:sticky;top:calc(-1 * var(--bt-topbar-h));z-index:50;
}
.bt-header--no-topbar{top:0}
.bt-header-main{
  background:var(--bt-surface);border-bottom:1px solid var(--bt-border);
}
.bt-header-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:16px;
  min-height:var(--bt-header-h);
}

/* --- logo ------------------------------------------------------------- */
.bt-logo{
  font-weight:700;font-size:1.25rem;letter-spacing:.04em;
  color:var(--bt-graphite);text-decoration:none;white-space:nowrap;
  display:inline-flex;align-items:center;gap:8px;
}
/* D-R21-05: `.bt-logo-mark` ("BRAM-") inherits the context colour; only the
   accent half is coloured, by its own class — never a bare `span`
   descendant selector, which also matched the outer mark (whole word
   orange). */
.bt-logo-accent{color:var(--bt-accent-strong)}
.bt-logo-img{height:40px;width:auto;display:block}
@media (min-width:1024px){ .bt-logo-img{height:48px} }

/* --- nawigacja główna: <button> zamiast <details> (I-3) ---------------- */
.bt-nav{
  display:flex;flex-wrap:wrap;align-items:center;
  margin-left:auto;flex:1 1 auto;justify-content:flex-end;
}
.bt-nav-toggle{
  display:none;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;padding:10px 12px;
  border:1px solid var(--bt-border);border-radius:var(--bt-radius);
  background:transparent;color:var(--bt-graphite);
  font-family:inherit;cursor:pointer;
}
.bt-nav-list{
  display:flex;flex-wrap:wrap;gap:4px 20px;align-items:center;
}
.bt-nav-list a{
  color:var(--bt-graphite);text-decoration:none;font-size:.9375rem;
  font-weight:600;padding:6px 0;border-bottom:2px solid transparent;
}
.bt-nav-list a:hover{border-bottom-color:var(--bt-accent)}
.bt-nav-list a[aria-current="true"]{
  color:var(--bt-accent-strong);border-bottom-color:var(--bt-accent-strong);
}

.bt-header-cta{flex:0 0 auto}

/* Zwinięte menu tylko gdy JavaScript naprawdę działa (klasa "js" zamienia
   "no-js" w <head>, header.php) — bez JS lista i CTA zostają w naturalnym
   przepływie i są zawsze osiągalne (AC-02.10, mapping.md „Odstępstwa…
   zakazem JavaScriptu”). */
@media (max-width:1023px){
  .js .bt-nav-toggle{display:inline-flex}
  /* Lista musi zajmować pełną szerokość nagłówka (AC-02.26), nie tylko
     przestrzeń obok logo — dlatego .bt-nav też dostaje flex-basis:100%
     po otwarciu, a lista jest 100% tego nowego, pełnoszerokiego pudełka. */
  .js .bt-nav.is-open{flex-basis:100%}
  .js .bt-nav-list{
    display:none;flex-basis:100%;flex-direction:column;align-items:stretch;
    gap:0;margin-top:12px;
  }
  .js .bt-nav.is-open .bt-nav-list{display:flex}
  .js .bt-nav-list li+li{border-top:1px solid var(--bt-border)}
  .js .bt-nav-list a{display:block;padding:12px 0;border-bottom:0}
  .js .bt-nav-list a[aria-current="true"]{
    border-bottom:0;border-left:2px solid var(--bt-accent-strong);padding-left:8px;
  }
  .js .bt-header-cta{display:none;flex-basis:100%;text-align:center;margin-top:12px}
  .js .bt-nav.is-open ~ .bt-header-cta{display:block}
}

/* ==========================================================================
   SEC-10 — stopka (ST-02).
   ========================================================================== */
.bt-footer{background:var(--bt-graphite);color:#fff;padding-block:64px 0}
.bt-footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:32px}
.bt-footer h2,.bt-footer h3{
  font-size:.875rem;letter-spacing:.08em;text-transform:uppercase;
  color:#c7ced3;margin-bottom:16px;
}
.bt-footer a{color:#fff;text-decoration:none}
.bt-footer a:hover{text-decoration:underline}
.bt-footer a:focus,.bt-footer a:focus-visible{outline-color:var(--bt-accent-light)}
.bt-footer li+li{margin-top:8px}
.bt-footer .bt-logo{color:#fff;margin-bottom:12px}
/* `--bt-accent-strong` (5.29:1) jest kalibrowany na jasne tło (nagłówek);
   na ciemnym tle stopki daje tylko ~2.94:1, więc "TECH" dostaje tu
   `--bt-accent-light` (7.56:1 wobec --bt-graphite), tak jak inne akcenty na
   ciemnym tle w tym arkuszu (AC-02.21). "BRAM-" dziedziczy #fff z
   `.bt-footer .bt-logo` (D-R21-05). */
.bt-footer .bt-logo-accent{color:var(--bt-accent-light)}
.bt-footer address{font-style:normal}
.bt-footer-tag{color:#c7ced3;font-size:.9375rem}
.bt-footer-bottom{
  margin-top:48px;border-top:1px solid rgba(255,255,255,.14);
  padding-block:20px 24px;font-size:.8125rem;color:#c7ced3;
}

@media (max-width:1023px){
  .bt-footer-grid{grid-template-columns:repeat(2,1fr);gap:32px}
}
@media (max-width:767px){
  .bt-footer-grid{grid-template-columns:1fr}
}

/* ==========================================================================
   SEC-02 — hero (ST-03). `.bt-hero` deliberately does *not* carry `.bt-sec`
   (mockup l. 464) — it manages its own vertical rhythm and full-bleed
   background instead of the generic section padding.

   Nakładka DEV-01: mobile (<768px) jednolita `.75`; od 768px gradient z
   twardym progiem przy 85% szerokości sekcji — wyliczone tak, żeby próg
   leżał możliwie blisko prawej krawędzi bloku `.bt-hero-box` (max-width
   600px); przy 768px tekst realnie sięga do ok. 87,2% (zmierzone,
   stage-10 test-report.md AC-10.3), więc 85% nie jest twardą gwarancją
   położenia za progiem — zostaje bezpieczne, bo tło placeholdera jest
   ciemne i kontrast pozostaje wysoko powyżej wymogu nawet w strefie
   gradientu, patrz delivery/stage-03/plan.md decyzja 8.
   ========================================================================== */
.bt-hero{
  position:relative;min-height:60vh;display:flex;align-items:center;
  color:#fff;overflow:hidden;text-align:center;
  scroll-margin-top:var(--bt-header-h);
}
.bt-hero-img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
}
.bt-hero::after{
  content:"";position:absolute;inset:0;
  background:rgba(30,37,41,.75);
}
.bt-hero .bt-wrap{position:relative;z-index:1;padding-block:48px}
.bt-hero-box{max-width:none;margin-inline:auto}
.bt-hero h1{color:#fff;text-transform:uppercase}
.bt-hero-sub{
  font-size:1.0625rem;color:#eef1f2;max-width:52ch;margin:0 auto 32px;
}
.bt-hero-cta{display:flex;flex-direction:column;gap:16px}
.bt-hero-cta .bt-btn{width:100%;text-align:center}
.bt-hero .bt-ph-badge{z-index:2;top:16px;left:16px}

@media (min-width:768px){
  .bt-hero{min-height:70vh;text-align:left}
  .bt-hero::after{
    background:linear-gradient(90deg,rgba(30,37,41,.75) 0%,rgba(30,37,41,.75) 85%,rgba(30,37,41,.45) 100%);
  }
  .bt-hero .bt-wrap{padding-block:64px}
  .bt-hero-box{max-width:600px;margin-inline:0}
  .bt-hero-sub{margin:0 0 32px}
  .bt-hero-cta{flex-direction:row;flex-wrap:wrap}
  .bt-hero-cta .bt-btn{width:auto}
}

/* ==========================================================================
   SEC-02 — hero, `local`/`youtube` modes: the full-bleed frame (ST-27,
   D-R21-03/12/15/16, replacing the ST-18 16:9 card of D-R2-45).
   `.bt-hero--media` sits alongside `.bt-hero` and is defined after the
   classic block, so `min-height:0` and `display:block` win over the classic
   rules without touching them (as a flex item, `.bt-wrap` would shrink to
   the hidden H1's 1px box). No band, no card, no gutter: `.bt-wrap` loses
   its max-width and padding here only. The width is the page body's
   (`width:100%`), never `100vw`, which includes a classic scrollbar and
   overflows (D-R21-16).
   Height: below 1024px the box is 16:9 of its width, so the 16:9 still
   fills it uncropped (`contain` kept, so an off-ratio upload is never cut,
   DEV-R21-16). From 1024px `aspect-ratio` still gives 9/16 × width — the
   cap — and `max-height` clamps it to the viewport minus the whole sticky
   header as rendered at load: contact bar + main bar + the main bar's 1px
   bottom border, or the main bar alone without the contact bar
   (DEV-R21-14). That is `min(100svh − header, 9/16 × width)` with no
   script and no container query (DEV-R21-15); `vh` first as the fallback
   where `svh` is unsupported. All of it is known before any media loads,
   so the hero cannot shift.
   ========================================================================== */
.bt-hero--media{
  --bt-hero-header:calc(var(--bt-topbar-h) + var(--bt-header-h) + 1px);
  min-height:0;display:block;
}
.bt-header--no-topbar ~ main .bt-hero--media{--bt-hero-header:calc(var(--bt-header-h) + 1px)}
.bt-hero--media::after{content:none}
.bt-hero--media .bt-wrap{max-width:none;padding:0}
.bt-hero-frame{
  position:relative;width:100%;aspect-ratio:16/9;
  background:var(--bt-graphite);overflow:hidden;
}
.bt-hero-still,
.bt-hero-video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain;
}

@media (min-width:1024px){
  .bt-hero-frame{
    max-height:calc(100vh - var(--bt-hero-header));
    max-height:calc(100svh - var(--bt-hero-header));
  }
  /* Crop anchored low (DEV-R21-23): the frame is wider than 16:9, so cover
     cuts top and bottom; 85% keeps the burned-in wordmark (78–93% of the
     frame height) whole with a margin up to 2560×1080. Same value on both
     layers, so the still/poster matches the playing video. */
  .bt-hero-still,
  .bt-hero-video{object-fit:cover;object-position:50% 85%}
}

/* --- `local` mode (ST-27, D-R21-04/18/20). assets/js/hero-local.js
   creates the `<video>` inside the mount only after its device gate; the
   video stays transparent over the still until its first `playing` event
   (`.is-playing` on the frame), then fades in. Pausing keeps it revealed,
   so the paused frame stays on screen. Under reduced motion the reveal has
   no transition at all: the sitewide `.01ms` override would still compute
   as non-zero, hence the explicit `none`. ----------------------------- */
.bt-hero-video-mount{position:absolute;inset:0}
.bt-hero-video{opacity:0;transition:opacity .3s ease}
.bt-hero-frame.is-playing .bt-hero-video{opacity:1}

@media (prefers-reduced-motion:reduce){
  .bt-hero-video{transition:none!important}
}

/* --- `youtube` mode: the embed mount + pause/play control (ST-19,
   D-R2-09/46/49). `.bt-hero-embed-wrap` is permanent in the DOM — the
   script (assets/js/hero-player.js) only ever fills/empties it, it never
   removes the wrapper itself, so this rule always applies. It starts at
   opacity:0 (the still stays the visible layer, per D-R2-49 point 2) and
   is revealed only once `.bt-hero-frame` gets `.is-playing`, which the
   script adds strictly on the player's own PLAYING event — never on
   iframe creation. The opacity transition is intentionally the only motion
   this stage adds, and it is already neutralised under
   prefers-reduced-motion by the sitewide rule above (Ruch / A11Y-12),
   so no separate reduced-motion override is needed here. --------------- */
.bt-hero-embed-wrap{
  position:absolute;inset:0;opacity:0;pointer-events:none;
  transition:opacity .3s ease;
}
.bt-hero-frame.is-playing .bt-hero-embed-wrap{opacity:1;pointer-events:auto}
.bt-hero-embed-wrap iframe{
  position:absolute;inset:0;width:100%;height:100%;border:0;display:block;
}

/* ST-27 (D-R21-17): the iframe covers the full-bleed frame. An iframe has
   no `object-fit`, so it is sized to the larger of the width-derived and
   the height-derived 16:9 box, centred, and the frame's `overflow:hidden`
   clips the rest. Container units on the wrap give its real size: the wrap
   is absolutely sized by the frame (`inset:0`), so size containment cannot
   collapse it. Without container units the plain fill rule above stays. */
@supports (width:1cqw){
  .bt-hero-embed-wrap{container-type:size}
  .bt-hero-embed-wrap iframe{
    inset:auto;top:50%;left:50%;
    width:max(100cqw,calc(100cqh * 16 / 9));
    height:max(100cqh,calc(100cqw * 9 / 16));
    transform:translate(-50%,-50%);
  }
}

/* The control is rendered server-side for every `youtube`-mode page load,
   but only ever visible/interactive at >=1024px — matching D-R2-48's "no
   request below 1024px" boundary exactly, so a hidden control can never be
   pressed into attempting a request the spec forbids at that width.
   `display:none` also removes it from the tab order below 1024px, which is
   the "no control where nothing can play" rule (SEC-02 "Playback control")
   applied to the sub-1024 still-only state. No border (task 6: a bordered
   control samples against its own border, not its backdrop) — the solid,
   fully opaque `--bt-graphite` fill is what "holds contrast over any frame"
   really means: an opaque control occludes the video entirely, so its
   contrast never depends on what is playing behind it. */
.bt-hero-control{
  display:none;position:absolute;right:16px;bottom:16px;z-index:3;
  align-items:center;gap:8px;background:var(--bt-graphite);color:#fff;
  border:none;border-radius:var(--bt-radius);padding:10px 16px;
  font-family:inherit;font-weight:700;font-size:.875rem;line-height:1;
  cursor:pointer;
}
.bt-hero-ico{width:18px;height:18px;flex:0 0 auto}
.bt-hero-control[data-state="playing"] .bt-hero-ico-play{display:none}
.bt-hero-control[data-state="paused"] .bt-hero-ico-pause{display:none}

/* Fix round (ST-19, AC-19.5): the sitewide default focus ring
   (line ~75, `var(--bt-graphite)`) is identical to the dark media the
   control sits on (the frame's `var(--bt-graphite)` fill and the dark
   still/film since ST-27), so the default ring is
   invisible here — measured 1.00:1 by the tester. `.bt-hero--media`
   doesn't receive `.bt-dark` (its `section_class` override bypasses that
   variant), so the existing `.bt-dark a:focus-visible` compensation
   (line 82) never applies either. Scoped override only — do not add
   `.bt-dark` to the section itself, it carries unrelated text-colour
   rules never designed against this section's bespoke markup. */
.bt-hero-control:focus,
.bt-hero-control:focus-visible{outline-color:var(--bt-accent-light)}

@media (min-width:1024px){
  .bt-hero-control{display:inline-flex}
}

/* `local` mode (ST-27): the control is printed `hidden` and only
   hero-local.js unhides it, where its device gate passes. Once shown it
   stays usable at any width — a video started at 1280px keeps playing
   after the window is narrowed (D-R21-19) and must keep its stop control
   (WCAG 2.2.2) — so the width rule above does not apply here. */
.bt-hero-frame--local .bt-hero-control{display:inline-flex}
.bt-hero-frame--local .bt-hero-control[hidden]{display:none}

/* ==========================================================================
   SEC-03 — o firmie (ST-03). Mobile: jedna kolumna, obraz pod tekstem
   (mockup max-width:1023 rule). Desktop (>=1024): siatka 7/5.
   `.bt-about-image` zastępuje puste `.bt-imgph` makiety prawdziwym `<img>`
   (wymóg AC-03.14: loading="lazy" + alt edytowalny), zachowując te same
   proporcje 4/3 i promień narożnika.
   ========================================================================== */
.bt-about{display:grid;gap:32px;align-items:start}
.bt-about-image{position:relative;border-radius:var(--bt-radius);overflow:hidden}
.bt-about-image img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
/* D-R2-50/D-R2-51 (ST-20): below 768px, one full-width rule *between* items
   and none before the first / after the last (`li+li`, never a container
   border) — the previous `.bt-badges{border-top}` sat before item 1 and
   produced the "stepped, poorly separated" list the spec reports. 12px
   padding top *and* bottom per item (was padding-top only). The separator
   colour is the accent token everywhere (mobile and the >=768px
   `border-left` below) — the label text itself sets no `color` here, so it
   keeps inheriting the section's base text colour (C-05: --bt-accent is
   decoration-only, never text). */
.bt-badges{
  display:flex;flex-wrap:wrap;gap:0;margin-top:8px;
}
.bt-badges li{
  padding:12px 0;margin:0;font-weight:600;font-size:.9375rem;width:100%;
}
.bt-badges li+li{border-top:1px solid var(--bt-accent)}

@media (min-width:768px){
  .bt-badges li{padding:14px 24px 0 0;margin-right:24px;width:auto}
  .bt-badges li+li{border-top:0;border-left:1px solid var(--bt-accent);padding-left:24px}
}
@media (min-width:1024px){
  .bt-about{grid-template-columns:7fr 5fr;gap:48px}
}

/* ==========================================================================
   SEC-09 — kontakt (ST-06, mockup l. 779-839, CSS l. 291-344). Mobile-first,
   like `.bt-about`/`.bt-grid` above: base is one column (dane → mapa →
   formularz, already the DOM order, so no reordering needed at any width),
   `min-width:1024` switches to the makieta's 5fr/7fr grid (AC-06.13).
   ========================================================================== */
.bt-contact{display:grid;gap:32px;align-items:start}
.bt-contact h3{margin-top:0}
address{font-style:normal;line-height:1.8}
.bt-contact-block+.bt-contact-block{margin-top:40px}

@media (min-width:1024px){
  .bt-contact{grid-template-columns:5fr 7fr;gap:48px}
}

/* --- mapa: statyczny podgląd lokalny, Google Maps otwierany dopiero po
   kliknięciu (Q6.5 wariant b, Q11.1 wariant b1) -------------------------- */
.bt-map{margin-top:16px}
.bt-map-link{display:block;text-decoration:none;border-radius:var(--bt-radius)}
.bt-map-frame{
  display:block;position:relative;aspect-ratio:8/5;overflow:hidden;
  border:1px solid var(--bt-border);border-radius:var(--bt-radius);
  background:#e8edea;
}
.bt-map-frame img{width:100%;height:100%;object-fit:cover;display:block}
.bt-map-pin{
  position:absolute;left:50%;top:46%;transform:translate(-50%,-100%);
  width:26px;height:26px;
}
/* Przycisk stoi POD mapą, w normalnym przepływie — nie nachodzi na podgląd
   i nie wychodzi poza kontener (mockup l. 310-311). */
.bt-map-cta{
  display:block;margin-top:12px;text-align:center;
  background:var(--bt-accent-strong);color:#fff;font-weight:700;
  font-size:.875rem;padding:12px 18px;border-radius:var(--bt-radius);
}
.bt-map-link:hover .bt-map-cta{background:var(--bt-accent-hover)}
.bt-map-attr{font-size:.75rem;color:var(--bt-text-muted);margin:8px 0 0}
.bt-map-note{font-size:.8125rem;color:var(--bt-text-muted);margin:8px 0 0}

/* --- formularz (ST-07, mockup l. 324-343). `.bt-form` jest teraz
   bezpośrednio elementem <form> (tak jak w makiecie), nie opakowującym
   <div> jak w placeholderze ST-06. -------------------------------------- */
.bt-form{
  background:var(--bt-surface);border:1px solid var(--bt-border);
  border-radius:var(--bt-radius);padding:32px;box-shadow:var(--bt-shadow);
}
.bt-field{margin-bottom:20px}
.bt-field label{display:block;font-weight:600;font-size:.9375rem;margin-bottom:6px}
.bt-req{color:var(--bt-accent-strong);font-weight:700}
.bt-opt{color:var(--bt-text-muted);font-weight:400}
.bt-field input,.bt-field select,.bt-field textarea{
  width:100%;font-family:inherit;font-size:1rem;color:var(--bt-graphite);
  padding:11px 12px;background:var(--bt-surface);
  border:1px solid #9aa4ab;border-radius:var(--bt-radius);
}
.bt-field textarea{min-height:140px;resize:vertical}
.bt-consent{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;margin-bottom:24px}
.bt-consent input{width:20px;height:20px;flex:0 0 auto;margin-top:2px}
.bt-consent label{font-weight:400;font-size:.875rem;line-height:1.5;margin:0}
/* honeypot: poza ekranem, nie display:none (AC-07.4) */
.bt-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* --- stany błędu/sukcesu (a11y.md "Zakaz polegania na kolorze": tekst +
   ikona + aria-invalid, kolor nigdy jedyny nośnik informacji) ------------ */
.bt-field input[aria-invalid="true"],
.bt-field select[aria-invalid="true"],
.bt-field textarea[aria-invalid="true"]{border-color:var(--bt-danger)}
.bt-field-error{
  display:flex;gap:6px;align-items:flex-start;
  color:var(--bt-danger);font-size:.8125rem;margin-top:6px;
}
.bt-field-error-ico{flex:0 0 auto;width:16px;height:16px;stroke:var(--bt-danger);fill:none;stroke-width:1.5}
/* flex:0 0 calc(...) forces the error onto its own wrapped line at any
   width (stage-10 pass 2, AC-10.1 fix) — without a basis, `.bt-consent`'s
   default `min-width:auto` on flex children let this item's intrinsic
   min-content (icon + longest word) sit beside the checkbox/label instead
   of wrapping below it, overflowing the viewport at 320px. */
.bt-consent .bt-field-error{flex:0 0 calc(100% - 32px);margin-top:8px;margin-left:32px}

#bt-form-status{
  margin-bottom:24px;padding:16px 20px;border-radius:var(--bt-radius);
  border:1px solid var(--bt-border);
}
#bt-form-status[role="alert"]{border-color:var(--bt-danger)}
#bt-form-status[role="status"]{border-color:var(--bt-accent-strong)}
#bt-form-status p{margin:0}
#bt-form-status ul{margin-top:10px}
#bt-form-status li+li{margin-top:6px}
#bt-form-status[hidden]{display:none}

/* Kontener komunikatu jest, jak sekcje wyżej, celem fokusu programowego
   (`tabindex="-1"`, assets/js/contact-form.js, AC-07.17) bez natywnie
   fokusowalnego elementu wewnątrz. Unlike the sections it deliberately
   keeps `:focus` (D-R21-26): the focus after submission is programmatic
   and must stay visible even after a mouse click on the submit button. */
#bt-form-status:focus,#bt-form-status:focus-visible{
  outline:2px solid var(--bt-graphite);outline-offset:2px;
}

/* ==========================================================================
   ST-08 — polityka prywatności (page.php). Baner "projekt do weryfikacji
   prawnej": `border-left` w --bt-accent-strong (token ST-01, ten sam użyty
   dla linków/przycisków) odróżnia go od komunikatu błędu formularza
   (--bt-danger, ST-07, znaczenie "coś poszło źle") i od zwykłej karty
   (.bt-card, --bt-border) — to ostrzeżenie procesowe, nie stan formularza.
   ========================================================================== */
.bt-legal-notice{
  margin-bottom:32px;padding:16px 20px;
  background:var(--bt-surface-alt);
  border:1px solid var(--bt-border);
  border-left:4px solid var(--bt-accent-strong);
  border-radius:var(--bt-radius);
}
.bt-legal-notice p{margin:0}

/* Treść rozdziałów/wpisów żyje w post_content (the_content()), więc trzeba
   tu lokalnie cofnąć globalny reset `ul,ol{list-style:none}` (ten reset jest
   pomyślany dla nawigacji/kafli, nie dla prozy — listy praw użytkownika w
   polityce prywatności, rozdz. 5/7/9/10, oraz listy w treści wpisu/404/
   wyszukiwarki, ST-11). `.bt-policy-content` (ST-08) i `.bt-entry-content`
   (ST-11, index.php/404.php/search.php) dzielą tę samą bazę typografii
   prozy — zgrupowane niżej, żeby nie duplikować identycznych reguł; każda
   klasa zachowuje osobne selektory tylko tam, gdzie realnie się różni:
   `.bt-policy-content` ma własne odstępy nagłówków rozdziałów, a
   `.bt-entry-content` dodatkowo obsługuje tabele i cytaty z dowolnej treści
   posta oraz `overflow-x:auto`, który trzyma zbyt szeroki element (np.
   szeroką tabelę) przewijalny *wewnątrz* tego boksu, zamiast pchać całą
   stronę w przewijanie poziome (AC-11.3/AC-11.5) — celowo nie `overflow-x`
   na samym <table> ani `display:block`, co usunęłoby niejawną semantykę
   ARIA wiersz/komórka w części przeglądarek. */
.bt-policy-content,
.bt-entry-content{max-width:75ch}
.bt-entry-content{overflow-x:auto}
.bt-policy-content h2{margin-top:2.5em}
.bt-policy-content h2:first-of-type{margin-top:0}
.bt-policy-content h3{margin-top:1.5em}
.bt-policy-content ul,.bt-policy-content ol,
.bt-entry-content ul,.bt-entry-content ol{
  list-style:disc;padding-left:1.25em;margin:0 0 1rem;
}
.bt-policy-content li,
.bt-entry-content li{margin-bottom:.4em}
.bt-policy-content p,
.bt-entry-content p{max-width:none}

/* ==========================================================================
   ST-11 — table/blockquote defaults specific to .bt-entry-content
   (index.php single-post fallback AC-11.5, 404.php, search.php). Release 1
   has no blog templates otherwise, so no earlier stage needed these.
   ========================================================================== */
.bt-entry-content table{border-collapse:collapse;margin:0 0 1rem}
.bt-entry-content th,.bt-entry-content td{
  border:1px solid var(--bt-border);padding:8px 12px;text-align:left;
}
.bt-entry-content blockquote{
  margin:0 0 1rem;padding-left:16px;
  border-left:4px solid var(--bt-accent-strong);
  font-style:italic;color:var(--bt-text-muted);
}
