/* ==========================================================================
   HYDROMIX — główny arkusz stylów motywu
   Źródło: makieta hydromix_2 (index / case-study / dossier / privacy),
   scalona do jednego pliku i uzupełniona o widok mobilny i dostępność.
   ========================================================================== */

:root {
    /* Paleta */
    --laser-red: #FF0033;
    --deep-dark-steel: #1C1F23;
    --deep-industrial-steel: #2B2F33;
    --steel-mid: #646C75;          /* przyciemnione z #6E7781 dla kontrastu WCAG AA */
    --light-steel: #D9DEE3;
    --bg-light: #F4F6F8;

    /* Typografia */
    --fs-display-max: 8.125rem;
    --fs-display:     6.125rem;
    --fs-h2:          3.875rem;
    --fs-h3:          2.5rem;
    --fs-lead:        2rem;
    --fs-body:        1.25rem;
    --fs-micro:       1rem;

    --lh-display-max: 0.75;
    --lh-display:     0.8;
    --lh-tight:       1.05;
    --lh-h3:          1.2;
    --lh-normal:      1.65;

    --gutter: 24px;
    --header-x: 64px;

    --cb-mechanical: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--deep-dark-steel);
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--laser-red); outline-offset: 3px; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
    clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
    background: #fff; color: var(--deep-dark-steel); padding: 12px 16px;
}

body.menu-open { overflow: hidden; padding-right: var(--scrollbar-width, 0px); }
body.menu-open .main-header { padding-right: calc(var(--header-x) + var(--scrollbar-width, 0px)); }

/* ==========================================================================
   NAGŁÓWEK
   ========================================================================== */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 32px var(--header-x);
    z-index: 100;
    transition: background-color .5s var(--cb-mechanical), backdrop-filter .5s var(--cb-mechanical),
                border-bottom .5s var(--cb-mechanical), padding .5s var(--cb-mechanical);
}
body.admin-bar .main-header { top: 32px; }

.main-header.scrolled {
    background-color: rgba(244, 246, 248, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(217, 222, 227, .5);
    padding: 16px var(--header-x);
}

.logo-container {
    display: flex; align-items: center;
    height: 56px;
    transition: height .5s var(--cb-mechanical), opacity .2s ease;
}
.home .logo-container { height: 110px; }
.main-header.scrolled .logo-container { height: 44px; }
.logo-container a { display: block; height: 100%; }
.logo-img { height: 100%; width: auto; display: block; }

/* logo: dwie wersje, przełączane klasą (bez podmiany src) */
.logo-img--dark { display: none; }
.header-on-light .logo-img--light,
.main-header.scrolled .logo-img--light { display: none; }
.header-on-light .logo-img--dark,
.main-header.scrolled .logo-img--dark { display: block; }

.menu-trigger-btn {
    width: 56px; height: 56px;
    background-color: var(--laser-red);
    border: none; border-radius: 0; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    z-index: 200; position: relative;
    transition: transform .3s var(--cb-mechanical), background-color .5s var(--cb-mechanical);
}
.menu-trigger-btn:hover { transform: scale(1.05); }
.menu-open .menu-trigger-btn { background-color: var(--deep-dark-steel); }

.hamburger-line {
    width: 24px; height: 2px; background-color: #fff; display: block;
    transition: transform .5s var(--cb-mechanical), opacity .3s var(--cb-mechanical);
}
.menu-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Panel menu */
.fullscreen-menu-panel {
    position: fixed; top: 0; right: 0;
    width: 440px; height: 100vh; height: 100dvh;
    background-color: #fff;
    border-left: 1px solid var(--light-steel);
    z-index: 150;
    padding: 160px 64px 64px;
    display: flex; flex-direction: column; justify-content: space-between;
    transform: translateX(100%); visibility: hidden;
    transition: transform .6s var(--cb-mechanical), visibility .6s;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .05);
    overflow-y: auto;
}
.fullscreen-menu-panel.active { transform: translateX(0); visibility: visible; }

.menu-overlay-backdrop {
    position: fixed; inset: 0;
    background-color: rgba(28, 31, 35, .4);
    backdrop-filter: blur(4px);
    z-index: 140; opacity: 0; visibility: hidden;
    transition: opacity .5s var(--cb-mechanical), visibility .5s;
}
.menu-open .menu-overlay-backdrop { opacity: 1; visibility: visible; }

.menu-nav-links ul { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.menu-nav-links a {
    font-size: 1.5rem; font-weight: 400; letter-spacing: -.01em;
    color: var(--deep-dark-steel); display: block;
    transition: color .2s var(--cb-mechanical);
}
.menu-nav-links a:hover,
.menu-nav-links .current-menu-item > a { color: var(--laser-red); }

.menu-panel-footer {
    border-top: 1px solid var(--light-steel);
    padding-top: 32px; margin-top: 48px;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.menu-footer-meta { font-size: var(--fs-micro); color: var(--steel-mid); line-height: 1.5; }
.menu-footer-meta p:first-child { color: var(--deep-dark-steel); }

.lang-switch { display: flex; gap: 12px; list-style: none; }
.lang-switch a {
    font-family: 'Tektur', sans-serif; font-weight: 600; font-size: var(--fs-micro);
    color: var(--steel-mid); text-transform: uppercase;
    transition: color .3s var(--cb-mechanical);
}
.lang-switch a:hover, .lang-switch .is-current a { color: var(--laser-red); }

/* ==========================================================================
   ELEMENTY WSPÓLNE
   ========================================================================== */
.container { position: relative; z-index: 2; }

.tech-divider-container { width: 100%; display: flex; align-items: center; margin: 64px 0; }
.tech-line { flex-grow: 1; height: 1px; background-color: rgba(217, 222, 227, .6); }
.tech-marker {
    font-family: 'Tektur', sans-serif; font-size: 14px; font-weight: 600;
    color: var(--steel-mid); padding: 0 24px; user-select: none;
}

.section-label {
    font-size: var(--fs-micro); font-weight: 500; text-transform: uppercase;
    letter-spacing: .08em; color: var(--steel-mid);
    margin-bottom: 32px; display: block;
}
.section-label--accent { color: var(--laser-red); }

.section-title {
    font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.03em;
    line-height: var(--lh-tight); color: var(--deep-dark-steel);
    margin-bottom: 88px; max-width: 1000px;
}

.highlight-red, mark, .has-inline-color.has-laser-red-background-color {
    background-color: var(--laser-red); color: #fff;
    padding: 2px 8px; font-weight: 500;
    display: inline-block; line-height: 1.1;
}

.cta-link {
    font-size: var(--fs-body); font-weight: 500;
    color: var(--laser-red); display: inline-block;
}
.cta-link span { display: inline-block; transition: transform .3s var(--cb-mechanical); }
.cta-link:hover span { transform: translateX(8px); }

/* Odsłanianie przy przewijaniu — tylko gdy działa JS */
.js .scroll-reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity .8s var(--cb-mechanical), transform .8s var(--cb-mechanical);
}
.js .scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
.js .quality-col.scroll-reveal:nth-child(2) { transition-delay: .15s; }
.js .quality-col.scroll-reveal:nth-child(3) { transition-delay: .3s; }

/* ==========================================================================
   STRONA GŁÓWNA — HERO
   ========================================================================== */
.hero-outer {
    width: 100%; background-color: var(--deep-dark-steel); color: #fff;
    position: relative; overflow: hidden;
}
.hero-bg-image {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(28,31,35,.7) 0%, rgba(28,31,35,.5) 45%, rgba(28,31,35,.2) 100%),
                var(--hero-img) center center / cover no-repeat;
    --hero-img: var(--hero-img-lg, none);
    transform: scale(1.05);
    transition: transform 1.2s var(--cb-mechanical);
}
@media (max-width: 1600px) { .hero-bg-image { --hero-img: var(--hero-img-md); } }
@media (max-width: 900px)  { .hero-bg-image { --hero-img: var(--hero-img-sm); } }
body.loaded .hero-bg-image { transform: scale(1); }

.hero { padding: 260px 0 180px; position: relative; z-index: 3; }
.hero-content-block { padding: 0 64px 0 300px; width: 100%; }
.hero-title-mask { overflow: hidden; margin-bottom: 48px; }

.hero h1 {
    font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.03em;
    line-height: var(--lh-tight); max-width: 900px; color: #fff;
    text-shadow: 0 4px 24px rgba(0,0,0,.45);
}
.hero-sub {
    font-size: var(--fs-body); color: #fff; max-width: 720px;
    margin-bottom: 64px; opacity: .95;
    text-shadow: 0 2px 16px rgba(0,0,0,.4); letter-spacing: -.01em;
}
.js .hero h1 { transform: translateY(100%); transition: transform 1s var(--cb-mechanical); }
.js .hero-sub { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--cb-mechanical) .2s, transform 1s var(--cb-mechanical) .2s; }
.js .hero .cta-link { opacity: 0; transform: translateY(10px); transition: opacity 1s var(--cb-mechanical) .4s, transform 1s var(--cb-mechanical) .4s; }
.js body.loaded .hero h1 { transform: translateY(0); }
.js body.loaded .hero-sub { opacity: .95; transform: translateY(0); }
.js body.loaded .hero .cta-link { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   STRONA GŁÓWNA — SEKCJE
   ========================================================================== */
.about, .workshops, .quality, .ledger-section, .manifesto { padding: 128px var(--gutter) 160px; }
.contact { padding: 128px var(--gutter) 64px; }

/* 01 O nas */
.about-layout-cover { display: grid; grid-template-columns: 350px 1fr; gap: 96px; align-items: start; }
.cover-text-max {
    font-size: var(--fs-display-max); font-weight: 500; line-height: var(--lh-display-max);
    color: var(--light-steel); letter-spacing: -.05em; text-transform: uppercase;
    position: sticky; top: 160px; transition: color .8s var(--cb-mechanical);
    overflow-wrap: anywhere;
}
.cover-text-max.revealed { color: var(--steel-mid); }
.cover-text-max span {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-lead); font-weight: 600;
    color: var(--deep-dark-steel); display: block; margin-top: 16px; letter-spacing: 0;
}
.about-main-content { padding-top: 24px; }
.about-main-content .section-title { margin-bottom: 48px; }
.about-content-text { font-size: var(--fs-body); color: var(--deep-industrial-steel); max-width: 680px; }
.about-content-text p + p { margin-top: 1em; }

/* 02 Technologie */
.typographic-rows { display: flex; flex-direction: column; gap: 120px; }
.row-item { display: grid; grid-template-columns: 200px 380px 1fr; gap: 48px; align-items: start; }
.huge-number {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-display); font-weight: 600;
    line-height: var(--lh-display); color: var(--light-steel); letter-spacing: -.02em;
    transition: color 1s var(--cb-mechanical);
}
.row-item.revealed .huge-number, .no-js .huge-number { color: var(--deep-industrial-steel); }
.row-item h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.03em; line-height: var(--lh-tight); }
.row-content { font-size: var(--fs-body); color: var(--deep-industrial-steel); max-width: 620px; }
.meta-specs { margin-top: 32px; font-size: var(--fs-micro); color: var(--steel-mid); display: flex; flex-wrap: wrap; gap: 16px 32px; }
.meta-badge { color: var(--deep-dark-steel); font-weight: 500; }

.workshops-visual-ledger, .featured-grid {
    display: grid; gap: 1px;
    background-color: var(--light-steel); border: 1px solid var(--light-steel);
}
.workshops-visual-ledger { grid-template-columns: repeat(3, 1fr); margin-top: 100px; }
.workshops-visual-card { background-color: var(--deep-dark-steel); position: relative; aspect-ratio: 16 / 10; overflow: hidden; }

/* Zdjęcia w stylu „technicznym” (grafit, odbarwione) */
.workshops-visual-card img, .case-gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(.85) contrast(1.15) brightness(.75);
    transition: transform .6s var(--cb-mechanical), filter .6s var(--cb-mechanical);
}
.workshops-visual-card:hover img, .case-gallery-item:hover img {
    transform: scale(1.03); filter: grayscale(0) contrast(1) brightness(.92);
}
.visual-tag {
    position: absolute; bottom: 16px; left: 20px;
    font-family: 'Tektur', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .05em;
    color: #fff; background-color: rgba(28,31,35,.88);
    padding: 6px 12px; border-left: 2px solid var(--laser-red);
    pointer-events: none; line-height: 1.2; text-transform: uppercase;
}

/* 03 Jakość */
.triple-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px; }
.quality-col h3 {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-micro); font-weight: 600;
    color: var(--steel-mid); margin-bottom: 32px; letter-spacing: .05em; text-transform: uppercase;
}
.quality-col p { font-size: var(--fs-body); color: var(--deep-industrial-steel); }

/* 04 Realizacje */
.ledger-header-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 80px; flex-wrap: wrap; }
.ledger-header-meta .section-title { margin-bottom: 0; max-width: 820px; }
.ledger-counter-badge {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-micro); font-weight: 600;
    color: var(--steel-mid); border: 1px solid var(--light-steel);
    padding: 8px 16px; background-color: #fff; white-space: nowrap; letter-spacing: .05em; text-transform: uppercase;
}

.featured-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 120px; }
.featured-card {
    background-color: var(--deep-dark-steel); position: relative; overflow: hidden;
    display: flex; flex-direction: column; min-height: 480px;
}
.featured-card > a { position: absolute; inset: 0; z-index: 3; }
.featured-media { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.featured-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(1) contrast(1.3) brightness(.65);
    transition: transform .8s var(--cb-mechanical), filter .8s var(--cb-mechanical);
}
.featured-card:hover .featured-media img { transform: scale(1.03); filter: grayscale(.6) contrast(1.2) brightness(.8); }

.cad-blueprint-visual {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(43,47,51,.9) 0%, rgba(28,31,35,1) 100%);
    position: relative;
}
.cad-grid-bg {
    position: absolute; inset: 0; background-size: 24px 24px;
    background-image: linear-gradient(to right, rgba(217,222,227,.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(217,222,227,.05) 1px, transparent 1px);
}
.cad-svg-render {
    width: 70%; height: 70%; stroke: var(--light-steel); stroke-width: 1.25; fill: none; opacity: .65;
    transition: stroke .4s var(--cb-mechanical), opacity .4s var(--cb-mechanical);
}
.featured-card:hover .cad-svg-render { stroke: var(--laser-red); opacity: 1; }

.featured-overlay {
    position: relative; z-index: 2; padding: 32px; flex: 1;
    display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(180deg, rgba(28,31,35,.85) 0%, rgba(28,31,35,.1) 45%, rgba(28,31,35,.95) 100%);
    color: #fff;
}
.featured-top-meta {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-family: 'Tektur', sans-serif; font-size: var(--fs-micro); letter-spacing: .04em;
}
.featured-id { font-weight: 600; }
.featured-status-pill {
    color: var(--light-steel); font-size: 11px; border: 1px solid rgba(217,222,227,.3);
    padding: 4px 10px; text-transform: uppercase; background-color: rgba(28,31,35,.6);
}
.featured-status-pill.verified { border-color: var(--laser-red); color: #fff; }
.featured-bottom-meta h3 { font-size: 1.875rem; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 16px; }
.featured-specs-row { display: flex; flex-wrap: wrap; gap: 16px 24px; font-size: var(--fs-micro); color: #A9B1BA; }
.featured-specs-row strong { color: var(--light-steel); font-weight: 500; }

/* Tabela rejestru */
.registry-subheading {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    border-bottom: 2px solid var(--deep-dark-steel); padding-bottom: 16px;
}
.registry-subheading h2, .registry-subheading h3 {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-micro); font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
}
.registry-subheading a { font-size: var(--fs-micro); color: var(--steel-mid); }
.registry-subheading a:hover { color: var(--laser-red); }

.registry-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 1px solid var(--light-steel); }
.registry-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--fs-micro); min-width: 780px; }
.registry-table thead { background-color: rgba(244,246,248,.95); }
.registry-table th {
    font-family: 'Tektur', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .08em;
    color: var(--steel-mid); text-transform: uppercase; padding: 18px 24px;
    border-bottom: 1px solid var(--light-steel);
}
.registry-table td {
    padding: 22px 24px; border-bottom: 1px solid rgba(217,222,227,.6);
    color: var(--deep-industrial-steel); vertical-align: middle;
    transition: background-color .2s var(--cb-mechanical);
}
.registry-table tbody tr:hover td { background-color: #fff; }
.registry-table th:last-child, .td-status { text-align: right; }
.td-id { font-family: 'Tektur', sans-serif; font-weight: 600; letter-spacing: .03em; color: var(--deep-dark-steel); width: 18%; }
.td-facility { font-weight: 500; color: var(--deep-dark-steel); width: 32%; }
.td-facility a:hover { color: var(--laser-red); }
.td-facility small { display: block; font-weight: 400; font-size: .85em; color: var(--steel-mid); margin-top: 4px; }
.td-shield { width: 25%; }
.td-metric { font-family: 'Tektur', sans-serif; letter-spacing: .02em; color: var(--deep-dark-steel); font-weight: 500; width: 15%; }
.td-status { width: 10%; }

.status-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--deep-dark-steel); white-space: nowrap; }
.status-bullet { width: 6px; height: 6px; background-color: var(--steel-mid); border-radius: 50%; flex-shrink: 0; }
.status-bullet.verified { background-color: var(--laser-red); }

/* 05 Manifest */
.manifesto-ticker-container { min-height: 250px; max-width: 900px; }
.ticker-content-wrapper { position: relative; width: 100%; }
.manifesto-slide {
    position: absolute; top: 0; left: 0; width: 100%;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .8s var(--cb-mechanical), transform .8s var(--cb-mechanical), visibility .8s;
}
.manifesto-slide.active { opacity: 1; visibility: visible; transform: translateY(0); position: relative; }
.no-js .manifesto-slide { position: relative; opacity: 1; visibility: visible; transform: none; margin-bottom: 48px; }
.manifesto-slide h3 { font-size: var(--fs-h3); font-weight: 500; margin-bottom: 24px; letter-spacing: -.03em; line-height: var(--lh-h3); }
.manifesto-slide p { font-size: var(--fs-body); color: var(--steel-mid); letter-spacing: -.01em; }
.manifesto-dots { display: flex; gap: 12px; margin-top: 40px; }
.manifesto-dots button {
    width: 32px; height: 4px; border: 0; padding: 0; cursor: pointer;
    background: var(--light-steel); transition: background-color .3s;
}
.manifesto-dots button[aria-current="true"] { background: var(--laser-red); }

/* 06 Kontakt */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; }
.contact-layout .section-title { margin-bottom: 32px; }
.contact-intro { font-size: var(--fs-body); color: var(--deep-industrial-steel); max-width: 520px; }
.contact-direct { margin-top: 48px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-body); }
.contact-direct a:hover { color: var(--laser-red); }

.raw-form { display: flex; flex-direction: column; gap: 56px; }
.form-group { display: flex; flex-direction: column; gap: 12px; }
.form-group label {
    font-size: var(--fs-micro); font-weight: 500; color: var(--steel-mid);
    text-transform: uppercase; letter-spacing: .05em;
}
.form-group input, .form-group textarea {
    background: transparent; border: none; border-bottom: 1px solid var(--light-steel);
    padding: 16px 0; font-family: inherit; font-size: var(--fs-body); color: var(--deep-dark-steel);
    outline: none; transition: border-color .3s var(--cb-mechanical); border-radius: 0; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-bottom-color: var(--deep-dark-steel); }
.form-consent { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--steel-mid); line-height: 1.5; }
.form-consent input { margin-top: 3px; accent-color: var(--laser-red); width: 18px; height: 18px; flex-shrink: 0; }
.form-consent a { text-decoration: underline; }
.hm-hp { position: absolute !important; left: -9999px !important; }

.submit-btn {
    align-self: flex-start; background: transparent; border: none; border-bottom: 2px solid transparent;
    font-family: inherit; font-size: var(--fs-body); font-weight: 500; color: var(--deep-dark-steel);
    cursor: pointer; padding: 8px 0;
    transition: transform .3s var(--cb-mechanical), border-bottom-color .3s var(--cb-mechanical);
}
.submit-btn:hover { transform: translateX(8px); border-bottom-color: var(--laser-red); }

.form-notice { padding: 16px 20px; font-size: var(--fs-micro); border-left: 2px solid var(--deep-dark-steel); background: #fff; }
.form-notice--ok { border-left-color: #1f8a4c; }
.form-notice--error { border-left-color: var(--laser-red); }

/* ==========================================================================
   STOPKA
   ========================================================================== */
.footer-meta {
    margin-top: 140px; padding: 64px var(--gutter) 48px;
    border-top: 1px solid var(--light-steel);
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
    font-size: var(--fs-micro); color: var(--steel-mid);
}
.home .footer-meta { margin-top: 180px; padding-left: 0; padding-right: 0; }
.footer-meta strong { color: var(--deep-dark-steel); font-weight: 500; display: block; margin-bottom: 12px; }
.footer-meta a:hover { color: var(--laser-red); }
.footer-bottom {
    padding: 24px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: .875rem; color: var(--steel-mid);
}
.footer-bottom ul { list-style: none; display: flex; gap: 24px; }
.footer-bottom a:hover { color: var(--laser-red); }

/* ==========================================================================
   PODSTRONY — NAGŁÓWKI
   ========================================================================== */
/* Ciemny hero (szablon „Dossier”) */
.hero-outer-subpage { background-color: var(--deep-dark-steel); color: #fff; padding: 260px var(--gutter) 160px; }
.hero-subpage-content { padding: 0 40px 0 300px; max-width: 1200px; }
.hero-outer-subpage h1 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.03em; line-height: var(--lh-tight); margin-bottom: 40px; max-width: 900px; }
.hero-outer-subpage .hero-lead { font-size: var(--fs-body); color: var(--light-steel); max-width: 760px; }

/* Jasny nagłówek (strony zwykłe, realizacje) */
.page-title-section { padding: 200px var(--gutter) 60px; }
.page-title-content { padding: 0 40px 0 350px; max-width: 1200px; }
.page-title-section h1 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.03em; line-height: var(--lh-tight); margin-bottom: 24px; max-width: 900px; }
.page-lead { font-size: var(--fs-body); color: var(--deep-industrial-steel); max-width: 760px; }

/* ==========================================================================
   TREŚĆ Z EDYTORA (strony, dossier, realizacje)
   ========================================================================== */
.entry-section { padding: 60px var(--gutter) 100px; }
.entry-section--dossier { padding-top: 140px; }
.prose { max-width: 760px; margin-left: calc(350px + 96px); }
.prose > * + * { margin-top: 28px; }
.prose h2 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.03em; line-height: var(--lh-h3); margin-top: 80px; margin-bottom: 32px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; margin-top: 48px; }
.prose p, .prose li { font-size: var(--fs-body); color: var(--deep-industrial-steel); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose a { color: var(--laser-red); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--deep-dark-steel); font-weight: 500; }
.prose figure img { display: block; }
.prose figcaption { font-size: .875rem; color: var(--steel-mid); margin-top: 8px; }

/* Styl bloku Tabela: „Lista parametrów” */
.is-style-hm-specs { margin: 48px 0 !important; }
.is-style-hm-specs table { width: 100%; border-collapse: collapse; border-top: 1px solid rgba(217,222,227,.6); }
.is-style-hm-specs td { padding: 20px 0 16px; border: 0; border-bottom: 1px solid rgba(217,222,227,.5); vertical-align: baseline; }
.is-style-hm-specs td:first-child { color: var(--steel-mid); font-size: var(--fs-micro); padding-right: 24px; }
.is-style-hm-specs td:last-child { font-family: 'Tektur', sans-serif; font-weight: 500; color: var(--deep-dark-steel); text-align: right; font-size: var(--fs-body); white-space: nowrap; }
.is-style-hm-specs thead { display: none; }

/* Styl bloku Grupa: „Sekcja numerowana” — duży numer po lewej (licznik CSS) */
.prose { counter-reset: hm-sec; }
.prose > .is-style-hm-numbered {
    counter-increment: hm-sec;
    position: relative;
    margin-top: 140px;
    padding-top: 64px;
    border-top: 1px solid rgba(217,222,227,.6);
}
.prose > .is-style-hm-numbered:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose > .is-style-hm-numbered::before {
    content: counter(hm-sec, decimal-leading-zero);
    position: absolute; left: calc(-350px - 96px); top: 48px;
    font-family: 'Tektur', sans-serif; font-size: var(--fs-display-max); font-weight: 600;
    line-height: var(--lh-display-max); color: var(--light-steel); letter-spacing: -.02em;
}
.prose > .is-style-hm-numbered:first-child::before { top: -16px; }

/* ==========================================================================
   REALIZACJA (pojedyncza)
   ========================================================================== */
.case-dossier-grid { display: grid; grid-template-columns: 350px 1fr; gap: 96px; align-items: start; }
.case-dossier-grid .prose { margin-left: 0; }
.case-specs-sidebar { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 40px; }
.case-sidebar-title {
    font-family: 'Tektur', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .08em;
    color: var(--steel-mid); text-transform: uppercase;
    border-bottom: 1px solid var(--light-steel); padding-bottom: 8px; margin-bottom: 20px;
}
.case-meta-group { display: flex; flex-direction: column; gap: 24px; }
.case-meta-item { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-body); }
.case-meta-item > span { font-size: 11px; color: var(--steel-mid); text-transform: uppercase; letter-spacing: .05em; font-family: 'Tektur', sans-serif; }
.case-meta-item strong { font-weight: 500; }
.case-status-badge {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
    font-family: 'Tektur', sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase;
    color: var(--steel-mid);
}
.case-status-badge.verified { color: var(--laser-red); }
.case-status-badge .status-bullet { background-color: currentColor; }

.case-parameters-list {
    display: flex; flex-direction: column; gap: 20px; margin: 48px 0;
    border-top: 1px solid rgba(217,222,227,.6); padding-top: 32px;
}
.case-param-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
    border-bottom: 1px solid rgba(217,222,227,.4); padding-bottom: 16px;
}
.case-param-row span { color: var(--steel-mid); font-size: var(--fs-micro); }
.case-param-row strong { font-family: 'Tektur', sans-serif; font-weight: 500; font-size: var(--fs-body); white-space: nowrap; }

.case-gallery-section { padding: 80px var(--gutter) 40px; }
.case-gallery-section h2 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.03em; line-height: var(--lh-h3); margin-bottom: 64px; }
.case-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case-gallery-item { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background-color: var(--deep-dark-steel); display: block; }
.case-gallery-item:first-child { grid-column: span 2; aspect-ratio: 21 / 9; }
.case-gallery-grid.count-even .case-gallery-item:first-child { grid-column: auto; aspect-ratio: 16 / 10; }

.case-nav {
    padding: 40px var(--gutter) 0; display: flex; justify-content: space-between; gap: 24px;
    font-size: var(--fs-micro); color: var(--steel-mid);
}
.case-nav a:hover { color: var(--laser-red); }

/* Lightbox (galeria) */
.hm-lightbox {
    position: fixed; inset: 0; z-index: 500; background: rgba(28,31,35,.95);
    display: none; align-items: center; justify-content: center; padding: 40px;
}
.hm-lightbox.open { display: flex; }
.hm-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hm-lightbox button {
    position: absolute; background: var(--laser-red); color: #fff; border: 0; cursor: pointer;
    width: 48px; height: 48px; font-size: 22px; line-height: 1;
}
.hm-lightbox .lb-close { top: 24px; right: 24px; }
.hm-lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.hm-lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* Archiwum realizacji */
.archive-section { padding: 40px var(--gutter) 40px; }
.pagination { margin-top: 48px; display: flex; gap: 16px; font-family: 'Tektur', sans-serif; }
.pagination .current { color: var(--laser-red); }

/* 404 */
.error-404 .cta-link { margin-top: 48px; }

/* ==========================================================================
   RESPONSYWNOŚĆ
   ========================================================================== */
@media (max-width: 1200px) {
    :root {
        --fs-display-max: 5.5rem;
        --fs-display:     4.5rem;
        --fs-h2:          2.8rem;
        --fs-h3:          2rem;
        --fs-lead:        1.6rem;
        --fs-body:        1.1rem;
        --header-x:       24px;
    }
    .home .logo-container { height: 80px; }
    .hero { padding: 260px 0 180px; }
    .hero-content-block { padding: 0 var(--gutter); }
    .about-layout-cover { grid-template-columns: 1fr; gap: 48px; }
    .cover-text-max { position: static; }
    .workshops-visual-ledger { grid-template-columns: 1fr; margin-top: 64px; }
    .contact-layout { grid-template-columns: 1fr; gap: 64px; }
    .triple-grid { grid-template-columns: 1fr; gap: 48px; }
    .row-item { grid-template-columns: 1fr; gap: 16px; }
    .section-title { margin-bottom: 72px; }
    .footer-meta { grid-template-columns: 1fr 1fr; }
    .fullscreen-menu-panel { width: 100%; padding: 140px var(--gutter) var(--gutter); }

    .hero-outer-subpage { padding: 200px var(--gutter) 100px; }
    .hero-subpage-content, .page-title-content { padding: 0; }
    .page-title-section { padding-top: 160px; padding-bottom: 40px; }
    .prose { margin-left: 0; }
    .entry-section--dossier { padding-top: 72px; }
    .prose > .is-style-hm-numbered::before { position: static; display: block; margin-bottom: 32px; }
    .prose > .is-style-hm-numbered { margin-top: 80px; }
    .case-dossier-grid { grid-template-columns: 1fr; gap: 48px; }
    .case-specs-sidebar { position: static; }
}

@media (max-width: 782px) {
    body.admin-bar .main-header { top: 46px; }
}

@media (max-width: 640px) {
    :root {
        --fs-display-max: 3.5rem;
        --fs-display:     3.25rem;
        --fs-h2:          2.125rem;
        --fs-h3:          1.6rem;
        --fs-lead:        1.3rem;
        --fs-body:        1.05rem;
        --gutter:         20px;
        --header-x:       20px;
    }
    .main-header { padding-top: 20px; padding-bottom: 20px; }
    .home .logo-container, .logo-container { height: 48px; }
    .main-header.scrolled .logo-container { height: 38px; }
    .menu-trigger-btn { width: 48px; height: 48px; }
    .hero { padding: 180px 0 120px; }
    .hero-title-mask { margin-bottom: 32px; }
    .hero-sub { margin-bottom: 40px; }
    .about, .workshops, .quality, .ledger-section, .manifesto { padding-top: 96px; padding-bottom: 120px; }
    .contact { padding-top: 96px; }
    .tech-divider-container { margin: 32px 0; }
    .typographic-rows { gap: 72px; }
    .section-title { margin-bottom: 48px; }
    .featured-grid { grid-template-columns: 1fr; margin-bottom: 72px; }
    .featured-card { min-height: 400px; }
    .footer-meta { grid-template-columns: 1fr; margin-top: 96px; }
    .home .footer-meta { margin-top: 96px; }
    .page-title-section { padding-top: 130px; }
    .hero-outer-subpage { padding-top: 150px; padding-bottom: 72px; }
    .case-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
    .case-gallery-item:first-child { grid-column: auto; aspect-ratio: 16 / 10; }
    .case-param-row, .is-style-hm-specs td:last-child { white-space: normal; }
    .ledger-counter-badge { white-space: normal; }
    .registry-subheading { flex-direction: column; align-items: flex-start; }
}

/* Ograniczenie animacji dla osób, które tego potrzebują */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0s !important; }
    .js .scroll-reveal, .js .hero h1, .js .hero-sub, .js .hero .cta-link { opacity: 1 !important; transform: none !important; }
    .hero-bg-image { transform: none; }
}

/* ==========================================================================
   DODATKI: liczby, filtr realizacji, tabela kontraktów
   ========================================================================== */
.stat-value {
    font-family: 'Tektur', sans-serif; font-weight: 600;
    font-size: var(--fs-display); line-height: var(--lh-display);
    color: var(--deep-dark-steel); letter-spacing: -.02em; margin-bottom: 24px;
}
.quality-col h3 { margin-bottom: 16px; }

.registry-table .td-id { width: 9%; }
.registry-table .td-facility { width: 38%; }
.registry-table .td-metric { width: 13%; }
.registry-table .td-shield { width: 40%; }
.registry-table .td-shield .status-tag { display: flex; margin-top: 8px; font-size: .875rem; color: var(--laser-red); }

.project-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.project-filter a {
    font-family: 'Tektur', sans-serif; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; padding: 8px 16px; border: 1px solid var(--light-steel); background: #fff;
    color: var(--steel-mid); transition: color .2s, border-color .2s;
}
.project-filter a:hover { color: var(--deep-dark-steel); border-color: var(--deep-dark-steel); }
.project-filter a[aria-current="page"] { background: var(--deep-dark-steel); border-color: var(--deep-dark-steel); color: #fff; }

.case-scope-list .case-param-row span { color: var(--deep-dark-steel); font-size: var(--fs-body); }
.case-scope-list .case-param-row strong { color: var(--light-steel); }
.case-meta-group .case-status-badge { margin-top: 0; }
