/* ============================================================
   NOMATEC — BASE CSS
   no limits + technology
   ============================================================ */

/* --- Local Fonts: Roc Grotesk + JetBrains Mono (self-hosted, no Google Fonts) --- */
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roc Grotesk';
  src: url('/assets/fonts/RocGrotesk-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono 400 — subsets match Google Fonts unicode-range splits,
   so browsers download only the scripts a page actually uses. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --color-red:       #FF101C;
  --color-red-dark:  #CC0D16;
  --color-white:     #FFFFFF;
  --color-black:     #0A0A0A;
  --color-dark:      #1A1A1C;
  --color-mid:       #333337;
  --color-light:     #A0A0A5;

  /* Typography */
  --font-heading:    'Roc Grotesk', sans-serif;
  --font-body:       'Roc Grotesk', sans-serif;
  --font-mono:       'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   8rem;
  --space-xxl:  12rem;

  /* Sizes */
  --header-h:   80px;
  --max-w:      1440px;
  --content-w:  1200px;

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --dur-fast:   0.15s;
  --dur-med:    0.3s;
  --dur-slow:   0.6s;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

/* Global keyboard focus ring (fallback for any focusable element) */
:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 2px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 10000;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-light);
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
}

/* --- Layout Utilities --- */

/* Visually hidden but available to assistive tech (e.g. section headings) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: var(--max-w);
}

.section {
  padding: var(--space-xl) 0;
}

.section--dark {
  background-color: var(--color-dark);
}

.section--black {
  background-color: var(--color-black);
}

/* --- Shared Components --- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--dur-med) var(--ease),
              color var(--dur-med) var(--ease),
              border-color var(--dur-med) var(--ease),
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s var(--ease);
  white-space: nowrap;
}

/* ── i18n / mobile safety ──────────────────────────────────────────
   Localized text (esp. long German compounds like "Fertigungs-
   möglichkeiten") must wrap instead of overflowing narrow screens
   or getting clipped at the viewport edge. */
h1, h2, h3, h4, h5, h6,
p, li, dd, dt, a, figcaption, blockquote, .btn {
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
/* Inline-block headings/buttons shrink-wrap to their text; cap the width so a
   long unbreakable word wraps instead of pushing past the viewport edge. */
h1, h2, h3, h4, h5, h6, .btn {
  max-width: 100%;
}
@media (max-width: 560px) {
  .btn { white-space: normal; }   /* allow long CTA labels to wrap on phones */
}

.btn--primary {
  /* red-dark: white text passes WCAG 4.5:1 (brand red #FF101C = 3.9:1) */
  background: var(--color-red-dark);
  color: var(--color-white);
  border-color: var(--color-red-dark);
}
.btn--primary:hover {
  background: transparent;
  color: var(--color-red);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,16,28,0.3), 0 0 40px rgba(255,16,28,0.1);
}
.btn--primary:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 3px;
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-black);
  transform: scale(1.04);
}
.btn--outline:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

.btn--ghost {
  background: transparent;
  color: var(--color-red);
  border-color: var(--color-red);
}
.btn--ghost:hover {
  background: var(--color-red);
  color: var(--color-white);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255,16,28,0.25);
}

/* Section Label */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 1.5rem;
}
.section-label::before {
  content: '//';
  margin-right: 0.5em;
  opacity: 0.6;
}

/* Red underline accent */
.accent-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-red);
  margin-top: 1rem;
}

/* Tag/Chip */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-light);
  border: 1px solid var(--color-mid);
  transition: all var(--dur-fast) var(--ease);
}
.chip:hover, .chip--active {
  color: var(--color-red);
  border-color: var(--color-red);
}

/* Mono number */
.mono-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

/* Red dot / marker */
.red-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-red);
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Header (Sticky Nav) --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--dur-med) var(--ease),
              border-color var(--dur-med) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10,10,10,0.97);
  border-bottom-color: rgba(255,255,255,0.08);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  gap: 2rem;
}

/* Logo */
.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo img {
  height: 52px;
  width: auto;
}

/* Nav — center column */
.site-nav {
  display: flex;
  justify-content: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.375rem;
  height: var(--header-h);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(160,160,165,0.75);
  text-decoration: none;
  position: relative;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
}

/* Numbered index */
.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--color-red);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.site-nav__link:hover .site-nav__idx,
.site-nav__link.is-active .site-nav__idx {
  opacity: 1;
  transform: translateY(0);
}

/* Bottom indicator */
.site-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.375rem;
  right: 1.375rem;
  height: 1px;
  background: var(--color-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease);
}
.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-white);
}
.site-nav__link:hover::after,
.site-nav__link.is-active::after {
  transform: scaleX(1);
}

/* Usługi caret */
.site-nav__caret {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
  margin-left: 0.25rem;
}
.nav-has-mega:hover .site-nav__caret {
  transform: rotate(180deg);
}

/* =========================================
   MEGA MENU
========================================= */
.nav-has-mega {
  position: static;
}

.mega-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--color-dark);
  border-top: 1px solid var(--color-mid);
  border-bottom: 1px solid var(--color-mid);
  z-index: 999;
  opacity: 0;
  visibility: hidden; /* keeps the 12 hidden links out of the tab order */
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease),
              transform 0.2s var(--ease),
              visibility 0.2s var(--ease);
}

.nav-has-mega:hover .mega-menu,
.nav-has-mega:focus-within .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.mega-menu__col {
  padding: 2rem 2rem 2rem 0;
  border-right: 1px solid var(--color-mid);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mega-menu__col:first-child { padding-left: 0; }
.mega-menu__col:last-child {
  border-right: none;
  padding-left: 2rem;
}
.mega-menu__col:nth-child(2) { padding-left: 2rem; }

.mega-menu__cat {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: block;
}

.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.75rem 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--dur-fast) var(--ease);
}
.mega-menu__item:last-child { border-bottom: none; }
.mega-menu__item:hover { background: rgba(255,255,255,0.02); }

.mega-menu__num {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--color-mid);
  flex-shrink: 0;
  padding-top: 0.2rem;
  letter-spacing: 0.05em;
  transition: color var(--dur-fast) var(--ease);
}
.mega-menu__item:hover .mega-menu__num { color: var(--color-red); }

.mega-menu__item strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 0.125rem;
  transition: color var(--dur-fast) var(--ease);
}
.mega-menu__item em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.05em;
  color: var(--color-light);
  opacity: 0.7;
}
.mega-menu__item:hover strong { color: var(--color-red); }

/* =========================================
   MEGA MENU — O NAS (wariant wizerunkowy)
========================================= */

.mega-menu__inner--about {
  grid-template-columns: repeat(4, 1fr);
  padding: 0 2.5rem;
  align-items: start;
}

.mega-menu__inner--about > .mega-menu__col {
  padding: 2rem 2rem 2rem 0;
}
.mega-menu__inner--about > .mega-menu__col:first-child {
  padding-left: 0;
}
.mega-menu__inner--about > .mega-menu__col:nth-child(2),
.mega-menu__inner--about > .mega-menu__col:nth-child(3),
.mega-menu__inner--about > .mega-menu__col:nth-child(4) {
  padding-left: 2rem;
}
.mega-menu__inner--about > .mega-menu__col:last-child {
  border-right: none;
}

/* Mocniejszy hover dla lewej kolumny w wariancie O nas */
.mega-menu--about .mega-menu__item {
  transition: background var(--dur-fast) var(--ease),
              padding var(--dur-fast) var(--ease);
}
.mega-menu--about .mega-menu__item:hover {
  background: rgba(255,16,28,0.045);
}
.mega-menu--about .mega-menu__item strong {
  transition: color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  display: block;
}
.mega-menu--about .mega-menu__item:hover strong {
  transform: translateX(4px);
}


/* Right: kontakt — desktop only (hidden on mobile via media query) */
.site-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 1.25rem;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .site-header__right { display: none; }
}

.site-header__right .btn--cta-nav {
  padding: 0.625rem 1.375rem;
  font-size: 0.8125rem;
}

/* Lang switch — global (used in header on all pages) */
.lang-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}
.lang-switch__item {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-light);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--dur-fast, 0.15s) var(--ease, ease);
  user-select: none;
}
.lang-switch__item.is-active { color: var(--color-white); }
.lang-switch__item:hover     { color: var(--color-white); }
.lang-switch__divider {
  color: var(--color-mid);
  font-size: 0.625rem;
  line-height: 1;
  user-select: none;
}

/* --- Language dropdown --- */
.lang-dropdown { position: relative; }

.lang-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-light);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lang-dropdown__trigger:hover,
.lang-dropdown.is-open .lang-dropdown__trigger {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.32);
}
.lang-dropdown__globe { width: 13px; height: 13px; opacity: 0.85; flex-shrink: 0; }
.lang-dropdown__chevron { width: 9px; height: 9px; flex-shrink: 0; transition: transform 0.2s ease; }
.lang-dropdown.is-open .lang-dropdown__chevron { transform: rotate(180deg); }

.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  padding: 0.5rem;
  z-index: 1200;
}
.lang-dropdown__menu[hidden] { display: none; }

/* Mobile variant: with 10 languages an absolutely-positioned drop-up no
   longer fits above the trigger on phones (top of the list escaped the
   viewport). Render the list in-flow instead — it expands like an
   accordion and the scrollable overlay handles the rest. */
.lang-dropdown--up .lang-dropdown__menu {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 0.5rem;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: none;
}

.lang-dropdown__heading {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.4rem 0.85rem 0.65rem;
  margin: 0;
}

.lang-dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: left;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lang-dropdown__option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  border-left-color: var(--color-red);
}
.lang-dropdown__code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-mid);
}
.lang-dropdown__option.is-active {
  color: var(--color-red);
  border-left-color: var(--color-red);
}
.lang-dropdown__option.is-active .lang-dropdown__code { color: var(--color-red); }

/* Hamburger — only on mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: all var(--dur-med) var(--ease);
  transform-origin: center;
}
.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  padding: 9rem 1.5rem 2rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease);
}
.mobile-overlay nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.mobile-overlay__footer {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lang-switch--mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-overlay__cta-btn {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}
.mobile-overlay__link {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: color var(--dur-fast) var(--ease);
}
.mobile-overlay__link:hover {
  color: var(--color-red);
}
.mobile-overlay__link[aria-current="page"],
.mobile-overlay__link.is-active {
  color: var(--color-red);
}
.mobile-overlay__group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mobile-overlay__toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  color: var(--color-white);
}
.mobile-overlay__caret {
  width: 14px;
  height: 10px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
}
.mobile-overlay__group.is-open .mobile-overlay__caret {
  transform: rotate(180deg);
}
.mobile-overlay__group.is-open .mobile-overlay__toggle {
  color: var(--color-red);
}
.mobile-overlay__sub {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, margin-top 0.2s ease;
  margin-top: 0;
}
.mobile-overlay__group.is-open .mobile-overlay__sub {
  max-height: 400px;
  margin-top: 0.5rem;
}
.mobile-overlay__sub a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-light);
  text-decoration: none;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 2px solid var(--color-mid);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.mobile-overlay__sub a:hover {
  color: var(--color-red);
  border-color: var(--color-red);
}

/* ─── Footer ─────────────────────────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,16,28,0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 12% 0%, rgba(255,16,28,0.14), transparent 34rem),
    linear-gradient(180deg, #0f0f11 0%, #070708 100%);
  background-size: 72px 72px, 72px 72px, auto, auto;
  border-top: 2px solid var(--color-red);
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 1.55fr) repeat(3, minmax(9rem, 0.7fr));
  gap: clamp(2rem, 4vw, 4.5rem);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3.5rem, 6vw, 5.75rem) 2rem clamp(2.75rem, 4vw, 4rem);
}

.footer-col--brand {
  max-width: 34rem;
}

.footer-col__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 1.1rem;
}
.footer-col__logo img {
  height: clamp(64px, 6vw, 88px);
  width: auto;
}

.footer-brand__rule {
  display: block;
  width: min(100%, 26rem);
  height: 1px;
  margin: 0 0 1.25rem;
  background: linear-gradient(90deg, var(--color-red), rgba(255,255,255,0.18), transparent);
}

.footer-brand__intro {
  max-width: 31rem;
}

.footer-col__tagline {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red);
  opacity: 0.75;
  margin-bottom: 1rem;
  display: block;
}
.footer-col p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.62);
  margin-bottom: 0.5rem;
}
.footer-col h3 {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin: 0 0 1.125rem;
  padding-top: 0.35rem;
}
.footer-col h3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 1px;
  background: var(--color-red);
}
.footer-col address {
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.62);
}
.footer-col a {
  position: relative;
  display: block;
  width: fit-content;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  margin-bottom: 0.5rem;
}
.footer-col a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.12rem;
  height: 1px;
  background: var(--color-red);
  transition: right var(--dur-med) var(--ease);
}
.footer-col a:hover {
  color: var(--color-white);
  transform: translateX(0.18rem);
}
.footer-col a:hover::after { right: 0; }

.footer-col__logo::after {
  display: none;
}
.footer-col__logo:hover {
  transform: none;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.35rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.68);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  margin-bottom: 0;
}
.footer-social a::after { display: none; }
.footer-social a:hover {
  border-color: var(--color-red);
  background: rgba(255,16,28,0.08);
  color: var(--color-red);
  transform: translateY(-2px);
}

.site-footer__bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.15rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-footer__bottom p {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.62);
  margin: 0;
}
.site-footer__bottom a {
  color: rgba(255,255,255,0.52);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.site-footer__bottom a:not(.site-footer__credit-link):hover { color: var(--color-red); }

.site-footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.site-footer__credit-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(255,16,28,0.5);
  background: rgba(255,16,28,0.08);
  padding: 0.42rem 0.78rem;
  color: var(--color-red) !important;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: none;
}

.site-footer__credit-link:hover,
.site-footer__credit-link:focus-visible {
  border-color: var(--color-red);
  background: rgba(255,16,28,0.16);
  color: var(--color-white) !important;
}

.footer-cookie-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: fit-content;
  text-align: left;
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  letter-spacing: normal;
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.footer-cookie-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.12rem;
  height: 1px;
  background: var(--color-red);
  transition: right var(--dur-med) var(--ease);
}
.footer-cookie-btn:hover {
  color: var(--color-white);
  transform: translateX(0.18rem);
}
.footer-cookie-btn:hover::after { right: 0; }
/* ─── Footer cookie button ───────────────────────────── */
.ft-bottom__cookie-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.4375rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.62);
  transition: color var(--dur-fast) var(--ease);
}
.ft-bottom__cookie-btn:hover { color: var(--color-red); }

/* ─── Cookie Banner ──────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  max-width: 500px;
  width: calc(100% - 3rem);
  background: #141416;
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid var(--color-red);
  padding: 1.25rem 1.5rem;
  z-index: 9000;
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner__title {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
  margin: 0 0 0.25rem;
}
.cookie-banner__text p:not(.cookie-banner__title) {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
}
.cookie-banner__text a { color: var(--color-red); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cookie-banner__actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  white-space: nowrap;
}

/* ─── Cookie Settings Modal ──────────────────────────── */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal[hidden] { display: none; }

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
}

.cookie-modal__box {
  position: relative;
  z-index: 1;
  background: #141416;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid var(--color-red);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
}
.cookie-modal__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0;
  font-weight: 400;
}
.cookie-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.62);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast) var(--ease);
}
.cookie-modal__close:hover { color: var(--color-white); }

.cookie-modal__intro {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.65;
  padding: 1rem 1.5rem 0;
  margin: 0;
}

.cookie-modal__cats {
  margin: 1.25rem 0 0;
}
.cookie-modal__cat {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.125rem 1.5rem;
}
.cookie-modal__cat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-modal__cat-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.3rem;
}
.cookie-modal__cat-desc {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.55;
}
.cookie-modal__always-on {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

/* Toggle switch */
.cookie-toggle {
  cursor: pointer;
  flex-shrink: 0;
}
.cookie-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.cookie-toggle__track {
  display: block;
  width: 40px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s ease;
}
.cookie-toggle__track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cookie-toggle input:checked + .cookie-toggle__track { background: var(--color-red); }
.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(18px);
  background: #fff;
}
.cookie-toggle input:focus-visible + .cookie-toggle__track {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

.cookie-modal__actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.cookie-modal__actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
}

.cookie-modal__footer-note {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.6;
  padding: 0 1.5rem 1.25rem;
  margin: 0;
}
.cookie-modal__footer-note a { color: rgba(255,255,255,0.62); }
.cookie-modal__footer-note a:hover { color: var(--color-red); }
.cookie-modal__reopen-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255,255,255,0.62);
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  transition: color var(--dur-fast) var(--ease);
}
.cookie-modal__reopen-link:hover { color: var(--color-red); }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --- Responsive Breakpoints --- */
@media (min-width: 1800px) {
  :root {
    --header-h: 86px;
  }

  html {
    font-size: 17px;
  }

  p {
    font-size: clamp(1.0625rem, 1vw, 1.1875rem);
  }

  .site-header__inner,
  .mega-menu__inner {
    max-width: 1680px;
  }

  .site-header__logo img {
    height: 56px;
  }

  .site-nav__link {
    font-size: 0.875rem;
    padding: 0 1.5rem;
  }

  .site-nav__idx,
  .mega-menu__cat,
  .mega-menu__num {
    font-size: 0.5625rem;
  }

  .mega-menu__item strong {
    font-size: 0.9375rem;
  }

  .mega-menu__item em {
    font-size: 0.625rem;
  }

  .section-label,
  .chip {
    font-size: 0.8125rem;
  }

  .chip {
    padding: 0.45rem 1.125rem;
  }
}

@media (min-width: 2560px) {
  :root {
    --header-h: 92px;
  }

  html {
    font-size: 18px;
  }

  .site-header__inner,
  .mega-menu__inner {
    max-width: 1760px;
  }

  .site-header__logo img {
    height: 60px;
  }
}

@media (max-width: 1280px) {
  :root {
    --space-xl: 6rem;
  }
}

@media (max-width: 1180px) {
  /* Hamburger layout */
  .site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    gap: 0;
  }
  .site-nav        { display: none; }
  .hamburger       { display: flex; flex-shrink: 0; }

  /* Logo nie przycięte */
  .site-header__logo img { height: 38px; }

.site-footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 3rem;
  }
  .container {
    padding: 0 1.25rem;
  }
  .site-footer__inner { grid-template-columns: 1fr; padding: 2.75rem 1.25rem 2rem; text-align: center; }
  .site-footer__bottom { flex-direction: column; align-items: center; text-align: center; padding: 1rem 1.25rem; }
  .footer-col--brand { max-width: none; }
  .footer-col__logo { display: flex; justify-content: center; margin: 0 auto 1rem; width: fit-content; }
  .footer-brand__rule { margin-left: auto; margin-right: auto; }
  .footer-brand__intro { margin-left: auto; margin-right: auto; }
  .footer-col h3::before { left: 50%; transform: translateX(-50%); }
  .footer-social { justify-content: center; }
  .footer-col a { margin-left: auto; margin-right: auto; text-align: center; }
  .footer-cookie-btn { margin-left: auto; margin-right: auto; text-align: center; }
  .footer-col a:hover, .footer-cookie-btn:hover { transform: none; }
  .cookie-banner {
    flex-direction: column;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  .cookie-banner__actions {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 64px;
  }
}

/* ============================================================
   ANIMATE-LITE — the five animate.css v4 animations used by
   assets/js/animations.js. The animate__* classes are added at
   RUNTIME by JS, so a static grep shows no usage — do not remove
   as "unused". Keyframes extracted verbatim from the full 70 KB
   animate.min.css that used to ship with the redesign.
   ============================================================ */
.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}
@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}
@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}
.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}
@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}
.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}
@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}
.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}
@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}
.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}
@media print, (prefers-reduced-motion: reduce) {
  .animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}
}
