/* ==========================================================================
   ICS Poland — main stylesheet
   Struktura: 1. Fonty  2. Tokeny  3. Baza  4. Układ i komponenty
              5. Sekcje  6. Animacje  7. Responsywność  8. Ograniczony ruch
   ========================================================================== */

/* 1. Fonty — Archivo (variable: wght 100–900, wdth 62–125), hostowane lokalnie
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-pl-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0104-0107, U+010C-010D, U+0118-011B, U+0141-0144, U+0158-0161, U+0179-017E;
}

/* 2. Tokeny
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  /* Granat — od najgłębszego */
  --ink-950: #040916;
  --ink-900: #071028;
  --ink-850: #0a1634;
  --ink-800: #0f1e44;
  --ink-700: #1b2d5c;
  --line-dark: rgba(150, 175, 230, 0.14);
  --line-dark-strong: rgba(150, 175, 230, 0.26);

  /* Jasne */
  --mist-50: #f7f9fc;
  --mist-100: #eef2f8;
  --mist-200: #dfe5ef;
  --mist-300: #c9d2e1;
  --slate-600: #4a5876;
  --slate-400: #8d9bb9;
  --text-dark: #e9eef8;

  /* Akcent świetlny */
  --signal-500: #3d7dff;
  --signal-400: #5f97ff;
  --signal-300: #8db6ff;
  --signal-100: #dce8ff;

  /* Kolory marek (próbkowane z oryginalnych logotypów) */
  --c-british: #e81c17;
  --c-giganci: #ef6e09;
  --c-bosko: #3d6e62;
  --c-dealab: #1a4458;
  --c-redox: #cf4808;
  --c-composite: #0a4a78;
  --c-bookingkids: #00005a;
  /* Jaśniejsze odpowiedniki do użycia na granatowym tle (akcenty, nie logotypy) */
  --c-british-on-dark: #ff5a4f;
  --c-giganci-on-dark: #ff9a3c;
  --c-bosko-on-dark: #a5d9cc;
  --c-dealab-on-dark: #5fc8d4;
  --c-redox-on-dark: #ff6f3d;
  --c-composite-on-dark: #4aa8f0;
  --c-bookingkids-on-dark: #8f8fff;

  /* Typografia */
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --fs-display: clamp(2.6rem, 11.6vw, 6.5rem);
  --fs-h2: clamp(2.1rem, 1.2rem + 3.6vw, 4.25rem);
  --fs-h3: clamp(1.15rem, 1.02rem + 0.45vw, 1.375rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.8125rem;

  /* Rytm */
  --container: 1240px;
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --section-y: clamp(5.5rem, 3rem + 9vw, 10rem);
  --header-h: 76px;

  --radius-xl: 22px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 3. Baza
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-950);
  color: var(--text-dark);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-stretch: 100%;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--signal-500); color: #fff; }

:focus-visible {
  outline: 2px solid var(--signal-300);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem; top: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink-900);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

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

/* 4. Komponenty
   -------------------------------------------------------------------------- */

/* Przyciski */
.btn {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-border: var(--line-dark-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.005em;
  line-height: 1.1;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--primary {
  --btn-bg: var(--signal-500);
  --btn-border: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px -10px rgba(10, 30, 90, 0.9);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}
.btn--primary:hover { --btn-bg: #4d89ff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 22px -12px rgba(10, 30, 90, 0.95); }
.btn--primary:hover::before { transform: translateX(120%); }

.btn--ghost { --btn-bg: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.07); --btn-border: rgba(170, 195, 245, 0.5); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--ink-900); --btn-border: transparent; }
.btn--light:hover { --btn-bg: var(--signal-100); transform: translateY(-1px); }

.btn--block { width: 100%; }

/* Logo ICS Poland (znak z obecnej strony) */
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 650;
  font-stretch: 112%;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: #fff;
}
.brandmark__chip {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.brandmark__chip img { width: 32px; height: 32px; }

/* Nagłówki sekcji */
.section-title {
  font-size: var(--fs-h2);
  font-weight: 620;
  font-stretch: 110%;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-title span { display: block; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 34em;
  text-wrap: pretty;
}

/* ==========================================================================
   Nagłówek strony
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--ink-950);
  border-bottom-color: var(--line-dark);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-nav { display: flex; align-items: center; gap: 2.25rem; }
.site-nav__list { display: flex; align-items: center; gap: 0.25rem; }
.site-nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  color: rgba(233, 238, 248, 0.78);
  font-size: 0.9625rem;
  font-weight: 500;
  font-stretch: 106%;
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0.2rem;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--signal-300);
  box-shadow: 0 0 10px var(--signal-400);
  transform: translateX(-50%) scale(0);
  transition: transform 0.35s var(--ease-out);
}
.site-nav__link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.site-nav__link[aria-current="true"] { color: #fff; }
.site-nav__link[aria-current="true"]::after { transform: translateX(-50%) scale(1); }

.site-header .btn { min-height: 2.75rem; padding: 0.65rem 1.25rem; font-size: 0.9375rem; }

.nav-toggle {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  border: 1px solid var(--line-dark-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  z-index: 120;
}
.nav-toggle__bar {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.nav-toggle__bar--top { transform: translate(-50%, -4px); }
.nav-toggle__bar--bottom { transform: translate(-50%, 4px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar--top { transform: translate(-50%, 0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar--bottom { transform: translate(-50%, 0) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + clamp(2rem, 6vh, 5rem));
  padding-bottom: clamp(1.75rem, 4vh, 3rem);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 70% at 78% 48%, rgba(38, 78, 182, 0.34), transparent 62%),
    radial-gradient(45% 55% at 8% 105%, rgba(22, 46, 120, 0.42), transparent 70%),
    linear-gradient(180deg, #050b1c 0%, var(--ink-950) 100%);
}

/* Delikatna siatka techniczna w tle */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(140, 170, 235, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140, 170, 235, 0.06) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 45%, #000 0%, transparent 75%);
}
/* Wygaszenie dolnej krawędzi w kolejną sekcję */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--ink-950));
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
.hero__canvas.is-ready { opacity: 1; }

/* Przyciemnienie pod tekstem — poprawia czytelność na tle animacji */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 9, 22, 0.78) 0%, rgba(4, 9, 22, 0.45) 34%, transparent 58%);
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__content { max-width: 100%; }
.hero__content > :not(.hero__title) { max-width: 40rem; }
@media (min-width: 900px) { :root { --fs-display: clamp(3.5rem, 7.6vw, 6.5rem); } }

.hero__title {
  font-size: var(--fs-display);
  font-weight: 640;
  font-stretch: 114%;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: #fff;
}
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero__line-inner { display: inline-block; white-space: nowrap; }

.hero__lead {
  margin-top: clamp(1.5rem, 3vh, 2.25rem);
  max-width: 31em;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: rgba(225, 233, 248, 0.8);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: clamp(2rem, 4.5vh, 3rem);
}

/* Legenda: jeden strumień = jedna marka */
.hero__legend {
  position: relative;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}
.hero__legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
}
.hero__legend-link {
  --brand: var(--signal-300);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0;
  color: rgba(214, 224, 244, 0.62);
  font-size: var(--fs-small);
  font-weight: 500;
  font-stretch: 104%;
  transition: color 0.3s var(--ease-out);
}
.hero__legend-link::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 0 transparent;
  transition: width 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.hero__legend-link:hover,
.hero__legend-link:focus-visible { color: #fff; }
.hero__legend-link:hover::before,
.hero__legend-link:focus-visible::before { width: 34px; box-shadow: 0 0 12px var(--brand); }

/* ==========================================================================
   MARKI
   ========================================================================== */
.brands {
  position: relative;
  padding-block: var(--section-y);
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(40, 80, 190, 0.18), transparent 70%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 22%, var(--ink-900) 100%);
}
/* Wiązka światła na krawędzi — kontynuacja motywu z hero */
.brands::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: min(880px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(141, 182, 255, 0.7), transparent);
}

.brands__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.brands__intro { color: rgba(214, 224, 244, 0.72); font-size: 1.125rem; max-width: 26em; padding-bottom: 0.4rem; text-wrap: pretty; }

/* Siatka „cegiełkowa”: 4 kafle w górnym rzędzie, 3 wyśrodkowane w dolnym.
   Każdy kafel zajmuje 2 z 8 kolumn; piąty zaczyna się od kolumny 2. */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 1.5rem);
}
.brand-cell { grid-column: span 2; }
.brand-cell:nth-child(5) { grid-column: 2 / span 2; }

.brand {
  --brand: var(--signal-400);
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015) 60%),
    var(--ink-850);
  box-shadow: inset 0 0 0 1px var(--line-dark), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  isolation: isolate;
  transition: transform 0.6s var(--ease-out), box-shadow 0.5s var(--ease-out), opacity 0.45s var(--ease-out);
  outline: none;
}
.brand.is-tilting { transition: transform 0.14s linear, box-shadow 0.5s var(--ease-out), opacity 0.45s var(--ease-out); }

/* Obramowanie świetlne podążające za kursorem */
.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 80%, #fff), transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
/* Poświata w kolorze marki */
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: radial-gradient(460px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 24%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
.brand:hover::before,
.brand:hover::after,
.brand.is-target::before,
.brand.is-target::after { opacity: 1; }
.brand:hover { box-shadow: inset 0 0 0 1px rgba(150, 175, 230, 0.08), 0 40px 70px -40px rgba(0, 0, 0, 0.95); }

.brand__plate {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  max-width: 100%;
  border-radius: 7px;
  overflow: hidden;
  background: var(--plate-bg, #fff);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 34px -22px rgba(0, 0, 0, 0.85);
  transform: translateZ(0);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
/* Logo wyśrodkowane w plakietce; szerokość dobrana optycznie dla każdej marki */
.brand__plate > picture,
.brand__plate > img { display: block; width: var(--logo-w, 66%); height: auto; }
.brand__plate > picture > img { display: block; width: 100%; height: auto; }
/* Plakietka w ciemnym kolorze marki (białe logo) — delikatna krawędź */
.brand__plate--dark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 18px 34px -22px rgba(0, 0, 0, 0.85); }
.brand:hover .brand__plate {
  transform: translateY(-3px) translateZ(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 38px -22px rgba(0, 0, 0, 0.9), 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent);
}

.brand__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.6rem 0.65rem;
}
.brand__name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(214, 224, 244, 0.6);
  font-size: var(--fs-micro);
  font-weight: 550;
  font-stretch: 106%;
  letter-spacing: 0.01em;
}
.brand__name::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.brand__field {
  margin-top: 0.45rem;
  color: #fff;
  font-size: clamp(1.0625rem, 0.98rem + 0.25vw, 1.1875rem);
  font-weight: 560;
  font-stretch: 104%;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* Cała karta prowadzi na stronę marki (link rozciągnięty z nazwy marki) */
.brand__link { color: inherit; }
.brand__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 18px;
}
.brand__link:focus-visible { outline: none; }
.brand__link:focus-visible::after { outline: 2px solid var(--signal-300); outline-offset: 4px; }

.brand__site {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 1.1rem;
  color: var(--slate-400);
  font-size: var(--fs-small);
  font-weight: 500;
  transition: color 0.3s var(--ease-out);
}
.brand__site svg { width: 0.95em; height: 0.95em; flex: none; transition: transform 0.35s var(--ease-out); }
.brand:hover .brand__site,
.brand:focus-within .brand__site { color: #fff; }
.brand:hover .brand__site svg,
.brand:focus-within .brand__site svg { transform: translate(2px, -2px); }

.brand.is-target { animation: target-pulse 1.6s var(--ease-out) 1; }

/* ==========================================================================
   O ICS POLAND (jasna sekcja)
   ========================================================================== */
.about {
  position: relative;
  padding-block: var(--section-y);
  background: var(--mist-100);
  color: var(--ink-900);
  overflow: hidden;
}
.about__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.about .section-title { grid-column: 1 / -1; color: var(--ink-900); }
.about__text { grid-column: 6 / -1; display: grid; gap: 1.25rem; color: var(--slate-600); max-width: 36em; }
.about__text .lead { color: var(--ink-800); }

.areas {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  border-bottom: 1px solid var(--mist-300);
}
.area {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem clamp(1rem, 2vw, 2rem);
  align-items: baseline;
  padding-block: clamp(1.25rem, 2.2vw, 1.75rem);
  border-top: 1px solid var(--mist-300);
}
.area::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 0; height: 2px;
  background: var(--signal-500);
  transition: width 1.1s var(--ease-out) calc(var(--delay, 0s) + 0.2s);
}
.area.is-in::before,
.no-js .area::before { width: 48px; }
.area__name {
  grid-column: 1 / span 5;
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  font-weight: 600;
  font-stretch: 110%;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink-900);
}
.area__brands {
  grid-column: 6 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.area__brands li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--slate-600);
}
.area__brands li::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--dot, var(--slate-400));
}

/* ==========================================================================
   WSPÓŁPRACA + KONTAKT
   ========================================================================== */
.cta {
  position: relative;
  padding-block: var(--section-y);
  background:
    radial-gradient(45% 60% at 82% 55%, rgba(38, 78, 182, 0.32), transparent 70%),
    radial-gradient(40% 50% at 0% 0%, rgba(22, 46, 120, 0.35), transparent 70%),
    var(--ink-950);
  overflow: hidden;
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: min(880px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(141, 182, 255, 0.55), transparent);
}
.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3.5rem clamp(3rem, 6vw, 6rem);
  align-items: start;
}
.cta__lead { margin-top: 1.75rem; color: rgba(225, 233, 248, 0.76); }

.contact {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line-dark);
}
.contact__label { color: var(--slate-400); font-size: var(--fs-small); }
.contact__value {
  margin: 0;
  min-width: 0;
  color: #fff;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 560;
  font-stretch: 106%;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.contact__value a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.contact__value a:hover { color: var(--signal-300); text-decoration-color: currentColor; }
.contact__value--address {
  display: grid;
  gap: 0.35rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(233, 238, 248, 0.92);
}
.contact__value--address .contact__map {
  justify-self: start;
  color: var(--signal-300);
  font-size: var(--fs-small);
  text-decoration-color: rgba(141, 182, 255, 0.45);
}
.contact__value--address .contact__map:hover { text-decoration-color: currentColor; }

/* Formularz */
.form-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)), var(--ink-900);
  box-shadow: inset 0 0 0 1px var(--line-dark-strong), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.form-card::before {
  content: "";
  position: absolute;
  left: 12%; right: 12%; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141, 182, 255, 0.9), transparent);
}
.form-card__title { font-size: 1.5rem; font-weight: 620; font-stretch: 110%; letter-spacing: -0.01em; color: #fff; }
.form-card__hint { margin-top: 0.4rem; color: var(--slate-400); font-size: var(--fs-small); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1rem; margin-top: 1.75rem; }
.field { display: grid; gap: 0.45rem; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: var(--fs-small); font-weight: 550; color: rgba(225, 233, 248, 0.86); }
.field__label .opt { color: var(--slate-400); font-weight: 400; }
.field__control {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-md);
  background: rgba(4, 9, 22, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field__control::placeholder { color: rgba(141, 155, 185, 0.7); }
.field__control:hover { border-color: rgba(170, 195, 245, 0.42); }
.field__control:focus { outline: none; border-color: var(--signal-400); box-shadow: 0 0 0 3px rgba(61, 125, 255, 0.28); background: rgba(4, 9, 22, 0.8); }
.field__control[aria-invalid="true"] { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18); }
textarea.field__control { min-height: 8.5rem; resize: vertical; }
select.field__control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238db6ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
}
select.field__control option { background: var(--ink-900); color: #fff; }
.field__error { min-height: 0; color: #ff9b9b; font-size: var(--fs-micro); }
.field__error:empty { display: none; }

.consent { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-size: var(--fs-micro); line-height: 1.55; color: rgba(214, 224, 244, 0.7); }
.consent input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem; height: 1.25rem;
  margin: 0.1rem 0 0;
  border: 1px solid var(--line-dark-strong);
  border-radius: 6px;
  background: rgba(4, 9, 22, 0.55);
  display: grid;
  place-items: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.consent input::after {
  content: "";
  width: 0.65rem; height: 0.35rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.2s var(--ease-out);
}
.consent input:checked { background: var(--signal-500); border-color: var(--signal-500); }
.consent input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.consent input[aria-invalid="true"] { border-color: #ff6b6b; }
.consent .field__error { grid-column: 2; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form__footer { grid-column: 1 / -1; display: grid; gap: 1rem; margin-top: 0.25rem; }
.form__note { font-size: 0.75rem; line-height: 1.55; color: rgba(141, 155, 185, 0.85); }
.form__status {
  display: none;
  grid-column: 1 / -1;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.form__status.is-visible { display: block; }
.form__status--ok { background: rgba(46, 204, 138, 0.12); box-shadow: inset 0 0 0 1px rgba(46, 204, 138, 0.4); color: #b8f5d9; }
.form__status--info { background: rgba(61, 125, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(141, 182, 255, 0.4); color: var(--signal-100); }
.form__status--error { background: rgba(255, 107, 107, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.4); color: #ffc9c9; }
.form__status a { text-decoration: underline; text-underline-offset: 2px; }

.btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.btn[aria-busy="true"] .btn__label::after { content: "…"; }
.btn__spinner {
  display: none;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn[aria-busy="true"] .btn__spinner { display: inline-block; }

/* ==========================================================================
   STOPKA
   ========================================================================== */
.site-footer {
  position: relative;
  padding-top: clamp(4rem, 7vw, 6rem);
  background: #030712;
  border-top: 1px solid var(--line-dark);
  color: rgba(214, 224, 244, 0.7);
  font-size: 0.95rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem 3rem;
}
.site-footer__about p { margin-top: 1.25rem; max-width: 22em; color: var(--slate-400); }
.site-footer__heading { color: #fff; font-size: 0.95rem; font-weight: 600; font-stretch: 108%; margin-bottom: 1rem; }
.site-footer__list { display: grid; gap: 0.55rem; }
.site-footer__list a { transition: color 0.25s; }
.site-footer__list a:hover { color: #fff; }
.site-footer address { font-style: normal; display: grid; gap: 0.55rem; }
.site-footer address a:hover { color: #fff; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-micro);
  color: var(--slate-400);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(214, 224, 244, 0.8);
  font-weight: 500;
  transition: color 0.25s;
}
.to-top svg { width: 1rem; height: 1rem; transition: transform 0.3s var(--ease-out); }
.to-top:hover { color: #fff; }
.to-top:hover svg { transform: translateY(-3px); }

/* ==========================================================================
   6. Animacje
   ========================================================================== */
@keyframes rise {
  from { transform: translateY(108%); }
  to { transform: translateY(0); }
}
@keyframes widen {
  from { font-stretch: 82%; letter-spacing: -0.02em; }
  to { font-stretch: 114%; letter-spacing: -0.035em; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes target-pulse {
  0% { box-shadow: inset 0 0 0 1px var(--line-dark), 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); }
  40% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 70%, transparent), 0 0 0 10px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: inset 0 0 0 1px var(--line-dark), 0 0 0 0 transparent; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Wejście hero — jedna, zsynchronizowana sekwencja (tylko z JS) */
.js .hero__line-inner { animation: rise 1.1s var(--ease-out) both, widen 1.6s var(--ease-out) both; }
.js .hero__line:nth-child(2) .hero__line-inner { animation-delay: 0.12s, 0.12s; }
.js .hero__lead { animation: fade-up 0.9s var(--ease-out) 0.55s both; }
.js .hero__actions { animation: fade-up 0.9s var(--ease-out) 0.7s both; }
.js .hero__legend { animation: fade-up 0.9s var(--ease-out) 1.25s both; }
/* tylko opacity — transform na nagłówku zablokowałby pozycjonowanie menu mobilnego */
.js .site-header { animation: fade-in 0.9s var(--ease-out) 0.2s both; }

/* Animacje przy przewijaniu */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Kafle marek: wejście z lekkim przybliżeniem logotypu */
.js .brand-cell[data-reveal] { transform: translateY(40px); }
.js .brand-cell[data-reveal].is-in { transform: none; }
.js .brand-cell[data-reveal] .brand__plate { transform: scale(0.94); opacity: 0.4; transition: transform 1.1s var(--ease-out) calc(var(--delay, 0s) + 0.1s), opacity 1.1s var(--ease-out) calc(var(--delay, 0s) + 0.1s), box-shadow 0.6s var(--ease-out); }
.js .brand-cell[data-reveal].is-in .brand__plate { transform: none; opacity: 1; }
.js .brand-cell.is-in .brand:hover .brand__plate { transform: translateY(-3px) translateZ(10px); transition-delay: 0s; }

/* ==========================================================================
   7. Responsywność
   ========================================================================== */
@media (max-width: 1100px) {
  .site-nav { gap: 1.25rem; }
  .site-nav__link { padding-inline: 0.7rem; }
}

@media (max-width: 1179px) {
  .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand-cell:nth-child(5) { grid-column: auto / span 2; }
  .brand-cell:nth-child(7) { grid-column: 2 / span 2; }
}

@media (max-width: 999px) {
  .about__text { grid-column: 1 / -1; }
  .area { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .area__name { grid-column: 1; }
  .area__brands { grid-column: 2; }
  .brands__head { grid-template-columns: 1fr; align-items: start; }
  .cta__grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2.5rem;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2.5rem;
    background:
      radial-gradient(70% 50% at 80% 20%, rgba(38, 78, 182, 0.35), transparent 70%),
      var(--ink-950);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0s linear 0.35s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease-out), visibility 0s; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__link {
    padding: 1rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: clamp(1.75rem, 7vw, 2.4rem);
    font-weight: 600;
    font-stretch: 112%;
    letter-spacing: -0.02em;
    color: #fff;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out), color 0.25s;
  }
  .site-nav__link:hover { background: none; color: var(--signal-300); }
  .site-nav__link::after { left: auto; right: 0; bottom: 50%; transform: translateY(50%) scale(0); }
  .site-nav__link[aria-current="true"]::after { transform: translateY(50%) scale(1.6); }
  .site-nav.is-open .site-nav__link { transform: none; opacity: 1; }
  .site-nav.is-open li:nth-child(2) .site-nav__link { transition-delay: 0.05s; }
  .site-nav.is-open li:nth-child(3) .site-nav__link { transition-delay: 0.1s; }
  .site-nav.is-open li:nth-child(4) .site-nav__link { transition-delay: 0.15s; }
  .site-nav .btn { min-height: 3.25rem; font-size: 1rem; }
  .site-header .brandmark { position: relative; z-index: 120; }

  .hero { min-height: max(600px, 100svh); }
  .hero__scrim { background: linear-gradient(180deg, rgba(4, 9, 22, 0.55) 0%, rgba(4, 9, 22, 0.35) 45%, transparent 70%); }
  .hero__legend { display: none; }
  .hero__inner { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --fs-body: 1rem; }
  .hero { padding-top: calc(var(--header-h) + 2.25rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .brand-grid { grid-template-columns: 1fr; gap: 1rem; }
  .brand-cell,
  .brand-cell:nth-child(5),
  .brand-cell:nth-child(7) { grid-column: auto; }
  .brand__body { padding-top: 1rem; }
  .area { grid-template-columns: 1fr; gap: 0.6rem; }
  .area__name, .area__brands { grid-column: 1 / -1; }
  .area__brands { gap: 0.4rem 1.5rem; }
  .contact__row { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Urządzenia dotykowe: bez efektu przechylania */
@media (hover: none) {
  .brand { transform: none; }
  .brand::before { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 70%, #fff), transparent 45%); opacity: 0.55; }
}

/* ==========================================================================
   8. Ograniczony ruch
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal],
  .js .brand-cell[data-reveal] .brand__plate { opacity: 1; transform: none; }
  .brand { transform: none !important; }
}

@media print {
  .site-header, .hero__canvas, .nav-toggle, .form-card { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .brands, .cta, .site-footer { background: #fff !important; color: #000 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
