/* NEW INTERVENT LOOK — all pages built by build.py (products front page + product pages).
   Kept from the old site: the navy page colour and the cloud photo. Everything on top is new.
   Idea: the page is a night sky. Clouds drift slowly behind; content sits on dark glass.
   Sections: 1 colours + type  2 page + sky  3 header  4 hero  5 product cards  6 footer
             7 fade-in  8 smaller screens  9 PRODUCT PAGE (path, top, description, gallery, viewer)
             10 THE COMPANY on the main page (framed block: statement | photo + figures, ruled grids)
             11 PARTNER LOGOS (the slow strip under the hero)
             12 "Z DZIAŁAŃ" — THE RECORD (large entries, the year-by-year list, an entry's page)
             13 CONTACT (the last block of the main page)
             14 THE MENU ON PHONES (folded behind a button)
             15 THE LANGUAGE BUTTON in the bar (its own look comes from lang-menu.js) */

/* 1 ── colours + type ──────────────────────────────────────────────────── */
:root {
  --navy: #16263d;                    /* the old page colour */
  --navy-deep: #0d1828;
  --sky: #8fc7ee;                     /* light accent, from the clouds */
  --white: #f5f8fb;
  --soft: rgba(245, 248, 251, 0.66);
  --faint: rgba(245, 248, 251, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.055);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 2 ── page + the sky ──────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { background: var(--navy); scroll-behavior: smooth; }
/* NO BOUNCE: pulling past the top or the bottom of the page must not drag the whole page (and the
   menu bar with it) down and let it spring back — the page simply stops at its ends. */
html, body { overscroll-behavior-y: none; }
body { margin: 0; min-height: 100vh; color: var(--white); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--navy); }
.sky i {
  position: absolute; top: 0; left: 50%; width: 2000px; height: 900px; margin-left: -1000px;
  background: url(media/images/tlo_chmury.jpg) center top / 1680px auto no-repeat;
  animation: drift 90s ease-in-out infinite alternate;
}
.sky i + i { top: 60px; opacity: 0.5; transform: scaleX(-1); mix-blend-mode: screen; animation: drift-back 130s ease-in-out infinite alternate; }
/* the photo's edges melt into the navy, and the sky darkens towards the bottom */
.sky::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 28%, rgba(22, 38, 61, 0) 40%, var(--navy) 100%),
    linear-gradient(to bottom, rgba(22, 38, 61, 0) 30%, var(--navy) 62%, var(--navy-deep) 100%);
}
@keyframes drift { from { transform: translateX(-46px); } to { transform: translateX(46px); } }
@keyframes drift-back { from { transform: scaleX(-1) translateX(-70px); } to { transform: scaleX(-1) translateX(70px); } }

/* 3 ── header ──────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(13, 24, 40, 0.55);
  -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; font-size: 17px; font-weight: 600; letter-spacing: 0.32em; white-space: nowrap; }
.brand img { display: block; height: 30px; width: auto; }        /* the logo; its width follows from the height */
.menu { position: relative; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { position: relative; padding: 10px 14px; border-radius: 999px; font-size: 14px; color: var(--soft); white-space: nowrap; transition: color 0.25s ease, background 0.2s ease; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--white); }
/* WHERE YOU ARE: a light-blue line under the link. site.js draws ONE line (.menu__line) and slides
   it from link to link — also while scrolling the main page from the products into "O nas".
   Without the script each link simply has its own line (the ::after below). */
.menu a:not(.menu__cta)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--sky); transform: scaleX(0); transform-origin: left center; transition: transform 0.35s var(--ease); }
.menu a[aria-current="page"]::after { transform: scaleX(1); }
.menu.has-line a::after { display: none; }
.menu__toggle, .menu-shade { display: none; }      /* only on phones, see §14 */
.menu__line { position: absolute; left: 0; bottom: 3px; width: 0; height: 2px; border-radius: 2px; background: var(--sky); box-shadow: 0 0 10px rgba(143, 199, 238, 0.55); pointer-events: none; transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.25s ease; }
.menu .menu__cta { margin-left: 10px; color: var(--navy-deep); background: var(--white); font-weight: 500; }
.menu .menu__cta:hover { color: var(--navy-deep); background: #fff; }

/* 4 ── hero ────────────────────────────────────────────────────────────── */
main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px) 110px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr); gap: clamp(32px, 6vw, 96px); align-items: end;
  padding: clamp(36px, 5.5vw, 76px) 0 clamp(56px, 8vw, 110px);      /* top: the space under the menu bar */
}
/* the line above the headline: the company and its year, in the serif (no pill, no frame) */
.hero__eyebrow { margin: 0 0 20px; font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: 0.01em; color: var(--white); }
.hero__eyebrow span { margin: 0 0.18em; color: var(--sky); }
.hero h1 { margin: 0; font-size: clamp(40px, 6.4vw, 86px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 em { display: block; font-style: normal; color: var(--sky); }      /* second line: same font as the first, in the light blue */
.hero__lead { margin: 28px 0 0; max-width: 30em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn--light { color: var(--navy-deep); background: var(--white); }
.btn--light:hover { background: #fff; }
.btn--ghost { border: 1px solid rgba(255, 255, 255, 0.22); color: var(--white); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: var(--glass); }

/* the numbered index of products, on glass */
.hero__index { padding: 22px 8px 10px; border: 1px solid var(--line); border-radius: 24px; background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hero__index p { margin: 0 16px 10px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.hero__index ol { list-style: none; margin: 0; padding: 0; }
.hero__index li + li { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.hero__index a { display: flex; align-items: baseline; gap: 14px; padding: 13px 16px; border-radius: 14px; font-size: 15.5px; color: var(--soft); transition: color 0.2s ease, background 0.2s ease, padding 0.25s var(--ease); }
.hero__index a span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--faint); }
.hero__index a:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); padding-left: 22px; }

/* 5 ── product cards ───────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; scroll-margin-top: 90px; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 10px; border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  scroll-margin-top: 90px;
  transition: transform 0.45s var(--ease), border-color 0.3s ease, box-shadow 0.45s var(--ease), background 0.3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(143, 199, 238, 0.45); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(143, 199, 238, 0.12) inset; }
.card:focus-visible { outline: 2px solid var(--sky); outline-offset: 4px; }

/* the picture sits in its own rounded tile inside the card */
.card__photo { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #0f1d31; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease); }
.card:hover .card__photo img { transform: scale(1.05); }
/* a product drawn on white (not a photo): a soft white tile, shown whole */
.card__photo--cutout { display: grid; place-items: center; padding: 9%; background: radial-gradient(circle at 50% 40%, #fff 0, #eef2f6 100%); }
.card__photo--cutout img { object-fit: contain; }

.card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 14px 12px; }
.card__meta { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }
.card__no { font-variant-numeric: tabular-nums; color: var(--faint); }
.card__no::after { content: ""; display: inline-block; width: 22px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--line); }
.card h2 { margin: 0; font-size: clamp(22px, 2vw, 27px); line-height: 1.12; font-weight: 500; letter-spacing: -0.025em; }
.card__text { margin: 10px 0 26px; font-size: 15px; line-height: 1.5; color: var(--soft); }
.card__more { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--white); }
.card__go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.35s var(--ease); }
.card__go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card__go { background: var(--white); border-color: var(--white); color: var(--navy-deep); transform: translateX(3px); }

/* 6 ── footer ──────────────────────────────────────────────────────────── */
.foot { display: flex; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 24px clamp(18px, 4vw, 56px) 38px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot a:hover { color: var(--white); }

/* 7 ── fade-in as things come into view (only when the script runs) ────── */
.has-reveal .card, .has-reveal .hero__text > *, .has-reveal .hero__index,
.has-reveal .phero__text > *, .has-reveal .phero__photo, .has-reveal .panel, .has-reveal .shot, .has-reveal .block__head,
.has-reveal .company__text > *, .has-reveal .closing > *, .has-reveal .ahero > *, .has-reveal .story, .has-reveal .year, .has-reveal .contact { opacity: 0; transform: translateY(18px); }
.has-reveal .is-in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.3s ease, box-shadow 0.45s var(--ease); }
.has-reveal .card.is-in:hover { transform: translateY(-6px); }
.has-reveal .story.is-in:hover { transform: translateY(-4px); }

/* 8 ── smaller screens ─────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  .brand { font-size: 15px; letter-spacing: 0.24em; }
  .brand img { height: 26px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .hero__index { display: none; }           /* the cards follow straight away on a phone */
  .sky i { background-size: 1200px auto; }
}
@media (prefers-reduced-motion: reduce) {
  .menu__line, .menu a::after { transition: none; }
  html { scroll-behavior: auto; }
  .sky i { animation: none; }
  .has-reveal .card, .has-reveal .hero__text > *, .has-reveal .hero__index,
  .has-reveal .phero__text > *, .has-reveal .phero__photo, .has-reveal .panel, .has-reveal .shot, .has-reveal .block__head,
  .has-reveal .company__text > *, .has-reveal .closing > *, .has-reveal .ahero > *, .has-reveal .story, .has-reveal .year, .has-reveal .contact { opacity: 1; transform: none; }
  .card, .card__photo img, .card__go, .hero__index a { transition: none; }
  .card:hover { transform: none; }
}

/* 9 ── PRODUCT PAGE ────────────────────────────────────────────────────────
   One layout for every product (build.py, product_page):
   top (path, name, lead, buttons | main photo) → description + side column → gallery → other products */

/* buttons with an icon, and a full-width one */
.btn svg { width: 15px; height: 15px; margin-right: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn--wide { width: 100%; justify-content: center; }

/* top */
.phero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); }
.crumbs { margin: 0 0 clamp(28px, 4vw, 48px); font-size: 16px; font-weight: 500; color: var(--white); }
.crumbs a { color: rgba(245, 248, 251, 0.8); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 4px; transition: color 0.2s ease; }
.crumbs a:hover { color: var(--white); }
.crumbs span { margin: 0 12px; color: var(--soft); }
/* the number + category line above the name: larger here than on the cards */
.phero .card__meta { margin-bottom: 16px; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; }
.phero .card__no { color: var(--soft); }
.phero .card__no::after { background: rgba(255, 255, 255, 0.35); }
.phero h1 { margin: 0; font-size: clamp(36px, 5.2vw, 68px); line-height: 1.03; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.phero__lead { margin: 22px 0 0; max-width: 30em; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; font-weight: 400; letter-spacing: -0.01em; color: var(--sky); }   /* same font as the name */
.phero__photo { padding: 10px; border-radius: 30px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65); }
.phero__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }

/* a main picture that is a drawing on white (not a photo): shown whole on a white tile */
.phero__photo--cutout img { object-fit: contain; padding: 9%; background: radial-gradient(circle at 50% 40%, #fff 0, #eef2f6 100%); }

/* glass panels: the description and the boxes beside it */
.panel { padding: clamp(22px, 3vw, 36px); border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.panel__title { margin: 0 0 18px; font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.panel__text { margin: 0 0 20px; font-size: 15.5px; line-height: 1.5; color: var(--soft); }
.panel--logo { display: grid; place-items: center; padding: 26px; background: #fff; }
.panel--logo img { max-width: 100%; max-height: 90px; display: block; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.about__side { display: grid; gap: 20px; position: sticky; top: 92px; }

/* the description text */
.prose { font-size: 17px; line-height: 1.7; color: rgba(245, 248, 251, 0.84); }
.prose p { margin: 0 0 1.1em; max-width: 68ch; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { color: var(--white); font-weight: 600; }
.prose a { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.2em; max-width: 68ch; }
.prose li { margin-bottom: 0.4em; }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.prose li::marker { color: var(--sky); }
/* a line the old page wrote all in bold: shown as a statement in the serif */
.prose .statement { max-width: none; margin: 1.3em 0; padding-left: 20px; border-left: 2px solid var(--sky); font-family: var(--serif); font-size: clamp(21px, 2vw, 26px); line-height: 1.3; color: var(--white); }
.prose .statement + .statement { margin-top: -0.6em; }
.prose .figure { max-width: none; margin: 1.6em 0; }
.prose .figure img { display: block; width: 100%; height: auto; border-radius: 16px; }

/* a file to download */
.file { display: flex; align-items: center; gap: 14px; padding: 12px; margin: 0 -12px; border-radius: 16px; transition: background 0.2s ease; }
.file + .file { margin-top: 4px; }
.file:hover { background: rgba(255, 255, 255, 0.07); }
.file__icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(143, 199, 238, 0.14); color: var(--sky); }
.file__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.file__name { font-size: 15px; line-height: 1.3; color: var(--white); }
.file__name small { display: block; margin-top: 3px; font-size: 12px; letter-spacing: 0.08em; color: var(--faint); }

/* a titled part of the page: gallery, other products */
.block { margin-top: clamp(64px, 9vw, 120px); scroll-margin-top: 90px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.block__head h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); font-weight: 500; letter-spacing: -0.03em; }
.block__head p { margin: 0; font-size: 14px; color: var(--faint); }
.block__head a { color: var(--soft); }
.block__head a:hover { color: var(--white); }

/* gallery */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot { display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #0f1d31; border: 1px solid var(--line); cursor: zoom-in; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), opacity 0.3s ease; }
.shot:hover img { transform: scale(1.06); }
.shot:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* film (YouTube) */
.films { display: grid; gap: 16px; }
.film { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #0b1422; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65); }
.film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* other products: the same cards, in one row that scrolls sideways when it does not fit */
.grid--row { grid-template-columns: repeat(5, minmax(250px, 1fr)); overflow-x: auto; padding: 8px 2px 18px; margin: -8px -2px 0; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.grid--row .card { scroll-snap-align: start; }
.grid--row .card h2 { font-size: 21px; }

/* the full-screen photo viewer (site.js) */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 64px 72px; background: rgba(8, 15, 26, 0.9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.viewer.is-open { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
.viewer__img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); opacity: 0; transform: scale(0.98); transition: opacity 0.3s ease, transform 0.4s var(--ease); }
.viewer__img.is-loaded { opacity: 1; transform: none; }
.viewer__btn { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--white); cursor: pointer; transition: background 0.2s ease, transform 0.2s var(--ease); }
.viewer__btn:hover { background: rgba(255, 255, 255, 0.18); }
.viewer__btn:active { transform: scale(0.93); }
.viewer__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.viewer__close { top: 18px; right: 18px; }
.viewer__prev { left: 16px; top: 50%; margin-top: -23px; }
.viewer__next { right: 16px; top: 50%; margin-top: -23px; }
.viewer__count { position: absolute; bottom: 20px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; letter-spacing: 0.1em; color: var(--soft); }
html.viewer-open { overflow: hidden; }

@media (max-width: 1000px) {
  .phero { grid-template-columns: 1fr; }
  .phero__photo { order: -1; }
  .about { grid-template-columns: 1fr; }
  .about__side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .shots { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .shots { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .prose { font-size: 16px; }
  .viewer { padding: 60px 10px 56px; }
  .viewer__prev, .viewer__next { top: auto; bottom: 10px; margin: 0; }
  .viewer__prev { left: 18px; } .viewer__next { right: 18px; }
  .grid--row { grid-template-columns: repeat(5, 78vw); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .shot img, .viewer, .viewer__img { transition: none; } }

/* 10 ── THE COMPANY, on the main page ("O nas") ─────────────────────────────
   build.py, about_section. Sober on purpose, and full: ONE framed block, square-cornered,
   divided by hairlines like a data sheet —
   statement + contact | photo with three figures → eight areas (ruled grid) → companies (ruled grid). */
.label { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sky); }

.company { --rule: rgba(255, 255, 255, 0.16); margin-top: clamp(64px, 9vw, 120px); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
  background: rgba(11, 21, 36, 0.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); scroll-margin-top: 84px; }

/* statement + contact | photo with the figures */
.company__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.company__text { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 4.2vw, 60px); }
.company__text h2 { margin: 22px 0 0; font-size: clamp(23px, 2.5vw, 36px); line-height: 1.2; font-weight: 500; letter-spacing: -0.028em; text-wrap: balance; }
.company__note { margin: 22px 0 32px; padding-left: 16px; border-left: 2px solid var(--sky); font-size: 16px; line-height: 1.5; color: var(--soft); }
.company__text .btn { margin-top: auto; }
.company__photo { position: relative; min-height: 440px; border-left: 1px solid var(--rule); background: #0b1422; }
.company__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(0.72); }
.company__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13, 24, 40, 0.15) 0, rgba(13, 24, 40, 0.35) 45%, rgba(11, 21, 36, 0.96) 100%), rgba(22, 38, 61, 0.35); }
.facts { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--rule); }
.facts div { padding: clamp(16px, 2vw, 26px) clamp(14px, 1.8vw, 24px); }
.facts div + div { border-left: 1px solid var(--rule); }
.facts dt { font-size: clamp(34px, 4.4vw, 62px); line-height: 1; font-weight: 500; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.facts dd { margin: 10px 0 0; font-size: 11px; line-height: 1.35; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }

/* a titled rule: the name of what follows on the left, its count on the right */
.company__bar { display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(20px, 2.6vw, 32px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(255, 255, 255, 0.035); }
.company__bar p + p { margin: 0; font-size: 12px; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; color: var(--faint); }

/* the eight areas: four to a row, cells divided by hairlines */
.matrix, .clients { list-style: none; margin: 0 -1px -1px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
/* (each cell draws its right and bottom line; the grid is pushed one pixel past the frame, which
   hides the outermost lines — so the grid stays correct however many cells it has) */
.cell { display: flex; flex-direction: column; min-height: 210px; padding: clamp(18px, 2.2vw, 28px); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: background 0.3s ease; }
.cell:hover { background: rgba(143, 199, 238, 0.07); }
.cell__top { display: flex; align-items: flex-start; justify-content: space-between; }
.cell__no { font-size: 12px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--faint); }
.cell svg { width: 30px; height: 30px; fill: none; stroke: var(--sky); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.cell h3 { margin: auto 0 0; padding-top: 26px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.22; font-weight: 500; letter-spacing: -0.015em; }
.cell p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); }

/* the companies: the same ruled grid, names only */
.clients__intro { margin: 0; padding: 22px clamp(20px, 2.6vw, 32px); border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.5; color: var(--soft); }
.clients li { display: flex; align-items: center; min-height: 84px; padding: 16px clamp(18px, 2.2vw, 28px); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13px; line-height: 1.35; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245, 248, 251, 0.9); transition: background 0.3s ease; }
.clients li:hover { background: rgba(143, 199, 238, 0.07); }

/* the closing line */
.closing { padding: clamp(72px, 10vw, 140px) 0 clamp(8px, 2vw, 24px); text-align: center; }
.closing__big { margin: 0; font-family: var(--serif); font-size: clamp(36px, 5.6vw, 76px); line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.closing .hero__actions { justify-content: center; }

@media (max-width: 1000px) {
  .company__top { grid-template-columns: 1fr; }
  .company__photo { min-height: 360px; border-left: 0; border-top: 1px solid var(--rule); }
  .matrix, .clients { grid-template-columns: repeat(2, 1fr); }
  .cell { min-height: 170px; }
}
@media (max-width: 640px) {
  .company__photo { min-height: 300px; }
  .facts dt { font-size: 32px; }
  .facts dd { font-size: 9.5px; letter-spacing: 0.1em; }
  .cell { min-height: 150px; padding: 16px; }
  .cell h3 { font-size: 16px; padding-top: 18px; }
  .clients li { min-height: 66px; padding: 12px 16px; font-size: 11.5px; }
}

/* 11 ── PARTNER LOGOS: the slow strip under the hero ─────────────────────────
   build.py, partners_strip. A see-through band across the whole screen (the clouds show behind
   it), between two hairlines; the logos drift left, slowly and at one speed. The logo files
   (logos/*.png, made by make_logos.py) are already one light tone on a transparent background. */
.brands { position: relative; width: 100vw; margin: 0 0 clamp(48px, 7vw, 88px) calc(50% - 50vw);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
/* the logos fade out at both edges of the screen */
.brands__window { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%); }
.brands__track { display: flex; width: max-content; animation: brands-slide 70s linear infinite; }
.brands:hover .brands__track { animation-play-state: paused; }
.brands ul { display: flex; align-items: center; gap: clamp(44px, 6vw, 92px); margin: 0; padding: 26px clamp(22px, 3vw, 46px); list-style: none; }
.brands li { flex: 0 0 auto; display: grid; place-items: center; height: 40px; }
.brands img { display: block; height: 100%; width: auto; max-width: 180px; object-fit: contain; opacity: 0.6; transition: opacity 0.3s ease; }
.brands li:hover img { opacity: 1; }
@keyframes brands-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* the hero sits a little closer to the strip than it did to the cards */
.hero { padding-bottom: clamp(44px, 6vw, 80px); }

@media (max-width: 640px) {
  .brands ul { gap: 40px; padding: 20px 20px; }
  .brands li { height: 34px; }
  .brands img { max-width: 130px; }
  .brands__window { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%); }
}
/* no movement wanted: the logos stand still and the strip can be swiped sideways */
@media (prefers-reduced-motion: reduce) {
  .brands__track { animation: none; }
  .brands__window { overflow-x: auto; }
  .brands__track ul + ul { display: none; }
}

/* 12 ── "Z DZIAŁAŃ" — THE RECORD ────────────────────────────────────────────
   build.py: record_page (the list), story_page (one entry), record_strip (three entries on the
   main page). Same sober language as the company block: square corners, hairlines, dates in
   small capitals — a record, not a blog. */

/* the opening of a plain page (name in the serif, large headline, one line) */
.ahero { padding: clamp(40px, 6vw, 84px) 0 clamp(36px, 5vw, 64px); max-width: 980px; }
.ahero h1 { margin: 0; font-size: clamp(38px, 6vw, 80px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.ahero h1 em { display: block; font-style: normal; color: var(--sky); }
.ahero__lead { margin: 26px 0 0; max-width: 34em; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--soft); }

/* an entry shown large: a photo with its date, label and title laid over the bottom */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; background: #0b1524; transition: border-color 0.3s ease, transform 0.45s var(--ease); }
.story:hover { border-color: rgba(143, 199, 238, 0.5); transform: translateY(-4px); }
.story:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.story__photo { position: absolute; inset: 0; }
.story__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.55) brightness(0.8); transition: transform 0.9s var(--ease), filter 0.5s ease; }
.story:hover .story__photo img { transform: scale(1.05); filter: grayscale(0) brightness(0.92); }
.story__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(11, 21, 36, 0) 25%, rgba(11, 21, 36, 0.72) 62%, rgba(11, 21, 36, 0.97) 100%); }
.story__body { position: relative; padding: clamp(18px, 2.2vw, 28px); }
.story__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.story__meta span { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.3); color: var(--sky); }
.story h3 { margin: 0; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.22; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }

/* the whole record, year by year */
.record { margin-top: clamp(56px, 8vw, 104px); }
.year { display: grid; grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.year + .year { margin-top: clamp(40px, 6vw, 72px); }
.year__head { position: sticky; top: 96px; align-self: start; }
.year__head h2 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 0.95; font-weight: 500; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.year__head p { margin: 12px 0 0; font-size: 12px; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; color: var(--faint); }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li + li { border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 108px 118px minmax(0, 1fr) 132px 40px; gap: 20px; align-items: center; padding: 20px 12px; margin: 0 -12px; border-radius: 4px; transition: background 0.25s ease; }
.entry:hover { background: rgba(143, 199, 238, 0.07); }
.entry time { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--soft); }
.entry__kind { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }
.entry__text strong { display: block; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.25; font-weight: 500; letter-spacing: -0.015em; }
.entry__text small { display: block; margin-top: 7px; max-width: 62ch; font-size: 14px; line-height: 1.5; color: var(--soft); }
.entry__photo { aspect-ratio: 3 / 2; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.entry__photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.5) brightness(0.9); transition: filter 0.4s ease; }
.entry:hover .entry__photo img { filter: none; }
.entry__go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.35s var(--ease); }
.entry__go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.entry:hover .entry__go { background: var(--white); border-color: var(--white); color: var(--navy-deep); transform: translateX(3px); }

/* an entry's own page: the product-page parts, with a longer headline and the story full width */
.phero__title--story { font-size: clamp(30px, 3.8vw, 52px) !important; line-height: 1.08 !important; }
.phero--plain { grid-template-columns: 1fr; }
.phero--plain .phero__text { max-width: 900px; }
.phero .card__no { letter-spacing: 0.08em; }
.about--story { grid-template-columns: 1fr; }
.about--story .prose p, .about--story .prose ul { max-width: 74ch; }

@media (max-width: 1000px) {
  .stories { grid-template-columns: 1fr 1fr; }
  .stories .story:nth-child(3) { grid-column: span 2; min-height: 300px; }
  .year { grid-template-columns: 1fr; gap: 14px; }
  .year__head { position: static; display: flex; align-items: baseline; gap: 16px; }
  .entry { grid-template-columns: 96px minmax(0, 1fr) 110px 38px; }
  .entry__kind { display: none; }
}
@media (max-width: 640px) {
  .stories { grid-template-columns: 1fr; }
  .stories .story:nth-child(3) { grid-column: auto; }
  .story { min-height: 300px; }
  .entry { grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; padding: 16px 12px; }
  .entry time { grid-column: 1 / -1; margin-bottom: -6px; }
  .entry__go { display: none; }
  .entry__text small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story, .story__photo img, .entry__go { transition: none; } .story:hover { transform: none; } }

/* 13 ── CONTACT: the last part of the main page ──────────────────────────────
   build.py, contact_section. Quiet on purpose: no frame and no background, small soft type.
   A label, the phone number, three small links — then address, e-mail and company data in three columns. */
.closing { padding-bottom: clamp(40px, 6vw, 72px); }

.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); align-items: start;
  padding-top: clamp(28px, 3.6vw, 44px); border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.contact .label { color: var(--faint); }
.contact__phone { display: inline-block; margin-top: 14px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--white); transition: color 0.2s ease; }
.contact__phone:hover { color: var(--sky); }
.contact__ways { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.contact__ways a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); transition: color 0.2s ease; }
.contact__ways a:hover { color: var(--white); }
.contact__ways svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }

.contact__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.contact__cols p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--soft); }
.contact__cols .contact__key { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.contact__cols p + .contact__key { margin-top: 16px; }
.contact__cols a { color: rgba(245, 248, 251, 0.82); border-bottom: 1px solid rgba(255, 255, 255, 0.18); word-break: break-word; transition: color 0.2s ease, border-color 0.2s ease; }
.contact__cols a:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.5); }

/* the foot of every page: company, address, contact — on one quiet line */
.foot { flex-wrap: wrap; margin-top: clamp(36px, 5vw, 60px); }

@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .contact__cols { grid-template-columns: 1fr; gap: 18px; } }

/* 14 ── THE MENU ON PHONES ──────────────────────────────────────────────────
   Up to 760px wide the links do not fit beside the name, so they are folded away: the bar shows
   INTERVENT and a two-line button; tapping it drops the links down as a list under the bar
   (site.js §4 opens and closes it). Each link is a full-width row, easy to hit with a thumb. */
@media (max-width: 760px) {
  .top { padding: 10px 16px; }
  .menu__toggle { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--white); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .menu__toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
  /* open: the two lines cross into an × */
  .top.is-open .menu__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .top.is-open .menu__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; overflow: visible;
    max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; padding: 6px 16px 18px;
    background: rgba(11, 20, 34, 0.97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.22s ease, transform 0.3s var(--ease), visibility 0s linear 0.3s; }
  .top.is-open .menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s ease, transform 0.3s var(--ease), visibility 0s; }
  .menu a, .menu a:not(.menu__cta) { padding: 16px 4px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 18px; color: var(--soft); }
  /* where you are: the row turns white with a short blue line before it (the sliding line is for wide screens) */
  .menu a:not(.menu__cta)::after, .menu.has-line a::after { display: none; }
  .menu__line { display: none; }
  .menu a[aria-current="page"] { color: var(--white); padding-left: 16px; box-shadow: inset 3px 0 0 var(--sky); }
  .menu .menu__cta { margin: 16px 0 0; padding: 15px 20px; border: 0; border-radius: 999px; text-align: center; font-size: 16px; color: var(--navy-deep); }
  html.menu-open { overflow: hidden; }       /* the page behind stays put while the list is open */
  /* the sheet over the page while the list is open: takes the outside tap, and blurs the page a touch */
  .menu-shade { display: block; position: fixed; inset: 0; z-index: 9; background: rgba(8, 15, 26, 0.14); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; -webkit-tap-highlight-color: transparent; }
  html.menu-open .menu-shade { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .menu, .menu__toggle span { transition: none; } }

/* the main headline on phones: larger than the general size would give (12.5% of the screen width),
   since on a narrow screen it is the first and almost only thing visible */
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(44px, 12.5vw, 58px); line-height: 1.04; letter-spacing: -0.04em; }
}

/* the YouTube link under "Z działań" on the main page: a white outline icon, no background */
.tube { display: flex; align-items: center; justify-content: center; gap: 14px; width: max-content; max-width: 100%; margin: clamp(28px, 4vw, 44px) auto 0; padding: 8px 6px; color: var(--white); opacity: 0.78; transition: opacity 0.25s ease, transform 0.35s var(--ease); }
.tube:hover { opacity: 1; transform: translateY(-2px); }
.tube:focus-visible { outline: 2px solid var(--sky); outline-offset: 6px; border-radius: 6px; }
.tube svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.tube span { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .tube { transition: none; } .tube:hover { transform: none; } }

/* 15 ── THE LANGUAGE BUTTON in the bar ──────────────────────────────────────
   The button and its menu are drawn by lang-menu.js (the cutlanca.pl script), with its own styles.
   These rules only seat it in this bar: after the links on wide screens, before the two-line
   button on phones. ".cn__btn.cn-embed" is written out on purpose — the script adds its own rule
   for the button later, so these must be more specific to win (same as on cutlanca.pl). */
.top .menu { order: 1; margin-left: auto; }
.top .cn__btn.cn-embed { order: 2; margin-left: 12px; color: #fff; font-family: var(--sans); font-size: 14px; letter-spacing: 0.04em; }
.top .menu__toggle { order: 3; }
@media (max-width: 760px) {
  .top .cn__btn.cn-embed { margin-left: auto; margin-right: 4px; }      /* phones: beside the two-line button */
}
