/* COSGRAL — shared subpage theme (matches homepage tokens + ambient) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600&family=Stack+Sans+Notch:wght@400;500;600;700&display=swap");

:root {
  --bg: #030303;
  --bg-card: #0a0a0a;
  --ink: #f5f5f5;
  --muted: #888;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #fff;
  --service-bg: #030303;
  --service-accent: #1a1a1a;
  --service-highlight: #888;
  --service-ripple: rgba(255, 255, 255, 0.4);
  --font-display: "Stack Sans Notch", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --global-tilt-x: 0deg;
  --global-tilt-y: 0deg;
}

body.service-page[data-service-theme="blue"] {
  --service-bg: #061018;
  --service-accent: #1e3f72;
  --service-highlight: #5a8fd4;
}
body.service-page[data-service-theme="purple"] {
  --service-bg: #0c0816;
  --service-accent: #4a2f78;
  --service-highlight: #9b6fd4;
}
body.service-page[data-service-theme="gold"] {
  --service-bg: #121008;
  --service-accent: #6b5520;
  --service-highlight: #c9a84a;
}
body.service-page[data-service-theme="orange"] {
  --service-bg: #120c08;
  --service-accent: #7a4018;
  --service-highlight: #d47a3a;
}
body.service-page[data-service-theme="crimson"] {
  --service-bg: #100608;
  --service-accent: #6e1e32;
  --service-highlight: #c44a62;
}
body.service-page[data-service-theme="green"] {
  --service-bg: #061210;
  --service-accent: #1a4f42;
  --service-highlight: #4aaf8c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: auto; }
html:has(body.service-page) { background: var(--service-bg); }
body.subpage {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.service-page {
  background: var(--service-bg, #060606);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Custom cursor — subpages (desktop) */
.home-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  pointer-events: none;
  mix-blend-mode: difference;
}
.home-cursor__dot {
  position: fixed;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  transform: translate(var(--cx, 0), var(--cy, 0));
}
.home-cursor__ring {
  position: fixed;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: translate(var(--rx, 0), var(--ry, 0));
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    margin 0.35s var(--ease);
}
.home-cursor.is-hover .home-cursor__ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
}
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  html:not(.reduce-motion) body.subpage {
    cursor: none;
  }
  html:not(.reduce-motion) body.subpage a,
  html:not(.reduce-motion) body.subpage button {
    cursor: none;
  }
}
html.reduce-motion .home-cursor {
  display: none;
}
@media (max-width: 900px) {
  html.reduce-motion body.subpage,
  html.reduce-motion body.subpage * {
    cursor: auto !important;
  }
  .home-cursor {
    display: none;
  }
}

body.subpage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("images/cosgral-agency/approved/charcoal-grain.jpg");
  background-size: 280px;
}

/* Service page — filmik z kafelka + kolorowy tint */
body.service-page .subpage-ambient {
  display: none !important;
}
.service-page-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--service-bg, #060606);
}
.service-page-video__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  filter: contrast(1.06) brightness(0.68) saturate(1.12);
  opacity: 0.92;
}
.service-page-video__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--service-accent) 42%, transparent) 0%,
      color-mix(in srgb, var(--service-bg) 78%, transparent) 42%,
      color-mix(in srgb, var(--service-bg) 92%, transparent) 100%
    ),
    radial-gradient(
      circle 70vmax at 50% 36%,
      color-mix(in srgb, var(--service-highlight) 22%, transparent) 0%,
      transparent 68%
    );
  mix-blend-mode: color;
  opacity: 0.88;
}
html.reduce-motion .service-page-video__media {
  display: none;
}
html.reduce-motion .service-page-video__tint {
  mix-blend-mode: normal;
  opacity: 1;
}

/* Ambient background layers */
.subpage-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  filter: grayscale(1) contrast(1.04) brightness(0.78);
  background:
    radial-gradient(ellipse 140% 90% at 50% 38%, #161616 0%, #0a0a0a 42%, #030303 100%);
}
.subpage-ambient--themed {
  filter: contrast(1.08) brightness(0.92) saturate(1.15);
}
body.service-page .subpage-ambient__blur {
  background:
    radial-gradient(
      circle 32vmax at var(--pointer-x, 50%) var(--pointer-y, 50%),
      color-mix(in srgb, var(--service-highlight) 28%, transparent) 0%,
      color-mix(in srgb, var(--service-accent) 12%, transparent) 32%,
      transparent 68%
    );
  opacity: 0.62;
}
.subpage-ambient__blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle 32vmax at var(--pointer-x, 50%) var(--pointer-y, 50%),
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.04) 30%,
      transparent 65%
    );
  filter: blur(52px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
body.service-page .subpage-ambient__shade {
  background: color-mix(in srgb, var(--service-bg) 72%, transparent);
}
.subpage-ambient__shade {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(3, 3, 3, 0.28);
}
body.service-page .subpage-cube-portal {
  display: none !important;
}
.grafiki-bloom {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  will-change: opacity;
}
.portfolio-scene-curtain {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(ellipse 90% 80% at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.94) 100%);
}
body.is-portfolio-scene-bridge .portfolio-scene-curtain {
  visibility: visible;
}
html.reduce-motion .subpage-ambient,
html.reduce-motion .subpage-ambient__blur,
html.reduce-motion .subpage-ambient__shade { display: none; }
html.reduce-motion body.subpage { background: var(--bg); }
html.reduce-motion body.service-page { background: var(--service-bg); }

/* Tło podczas wejścia z animacji nurkowania — bez ukrywania treści */
html.is-service-dive-enter {
  background: var(--service-bg, #060606);
}

/* Scroll-driven cube portal */
.subpage-cube-portal {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: 0.68;
}
.subpage-cube__canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.portfolio-sand-portal {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}
.portfolio-sand-portal--back {
  z-index: 1;
}
.portfolio-sand-portal--front {
  z-index: 4;
}
.portfolio-sand__canvas {
  width: 100%;
  height: 100%;
  display: block;
}
body.portfolio-page.is-portfolio-sand-active main,
body.about-page.is-portfolio-sand-active main,
body.graphics-gallery-page.is-portfolio-sand-active main,
body.reels-gallery-page.is-portfolio-sand-active main {
  position: relative;
  z-index: 2;
}
body.portfolio-page.is-portfolio-intro-pending .portfolio-hero__title,
body.portfolio-page.is-portfolio-intro-pending .portfolio-hero__lead,
body.about-page.is-portfolio-intro-pending .portfolio-hero__title,
body.graphics-gallery-page.is-portfolio-intro-pending .portfolio-hero__title,
body.graphics-gallery-page.is-portfolio-intro-pending .portfolio-hero__lead,
body.graphics-gallery-page.is-portfolio-intro-pending .section-eyebrow,
body.graphics-gallery-page.is-portfolio-intro-pending .graphics-gallery-page__back,
body.reels-gallery-page.is-portfolio-intro-pending .portfolio-hero__title,
body.reels-gallery-page.is-portfolio-intro-pending .portfolio-hero__lead,
body.reels-gallery-page.is-portfolio-intro-pending .section-eyebrow,
body.reels-gallery-page.is-portfolio-intro-pending .reels-gallery-page__back {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
}
body.portfolio-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__title,
body.portfolio-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__lead,
body.about-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__title,
body.graphics-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__title,
body.graphics-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__lead,
body.graphics-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .section-eyebrow,
body.graphics-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .graphics-gallery-page__back,
body.reels-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__title,
body.reels-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .portfolio-hero__lead,
body.reels-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .section-eyebrow,
body.reels-gallery-page.is-portfolio-sand-active:not(.is-portfolio-intro-pending) .reels-gallery-page__back {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s ease;
}
html.reduce-motion .portfolio-sand-portal {
  display: none;
}
html.reduce-motion .subpage-cube-portal { display: none; }

body.is-grafiki-zone .subpage-cube-portal {
  opacity: 0 !important;
  visibility: hidden;
}
body.is-nav-menu-open.is-grafiki-zone .subpage-cube-portal {
  visibility: visible;
}
body.is-grafiki-menu-sand .portfolio-sand-portal {
  opacity: 1;
  visibility: visible;
}
body.is-grafiki-menu-sand .portfolio-sand-portal--front {
  z-index: 501;
}
body.is-grafiki-menu-sand .portfolio-sand-portal--back {
  z-index: 500;
}
body.is-nav-menu-open.is-grafiki-menu-sand .portfolio-sand-portal--front,
body.is-nav-menu-open.is-grafiki-menu-sand .portfolio-sand-portal--back {
  z-index: 503 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.is-nav-menu-open.is-grafiki-menu-sand .portfolio-sand-portal--back {
  z-index: 502 !important;
}
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.graphics-gallery-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.reels-gallery-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.about-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.portfolio-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.graphics-gallery-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.reels-gallery-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.about-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front.portfolio-page .portfolio-sand-portal--back {
  z-index: 503 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.is-nav-menu-open.is-grafiki-menu-sand.is-cube-menu-front .portfolio-sand-portal--back {
  z-index: 502 !important;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay {
  z-index: 502;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__stage {
  z-index: 505;
}
body.is-nav-menu-open.is-cube-menu-drift-bg .subpage-cube-portal {
  z-index: 1 !important;
  opacity: 1 !important;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list li {
  overflow: visible;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.72);
  -webkit-text-stroke: 0;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__char {
  position: relative;
  z-index: 1;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a.is-hovered,
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a:hover,
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a:focus-visible {
  color: #fff;
  transform: scale(1.06);
  z-index: 3;
  overflow: visible;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.72);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), color 0.85s ease;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108%;
  height: 175%;
  min-height: 2.2em;
  transform: translate(-50%, -50%) scale(0.94);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a.is-hovered::before,
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a:hover::before,
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__list a:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

body.is-nav-menu-open .subpage-cube-portal {
  z-index: 0;
  opacity: 1 !important;
}
body.is-nav-menu-open.is-cube-menu-front .subpage-cube-portal {
  z-index: 499;
}
body.is-nav-menu-open.is-cube-menu-front.portfolio-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-cube-menu-front.about-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-cube-menu-front.graphics-gallery-page .portfolio-sand-portal--front,
body.is-nav-menu-open.is-cube-menu-front.reels-gallery-page .portfolio-sand-portal--front {
  z-index: 498;
}
body.is-nav-menu-open.is-cube-menu-front.portfolio-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-cube-menu-front.about-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-cube-menu-front.graphics-gallery-page .portfolio-sand-portal--back,
body.is-nav-menu-open.is-cube-menu-front.reels-gallery-page .portfolio-sand-portal--back {
  z-index: 0;
}

body.is-gallery-menu-particles .portfolio-sand-portal {
  opacity: 1;
  visibility: visible;
}
body.is-gallery-menu-particles .portfolio-sand-portal--back {
  z-index: 1;
}
body.is-gallery-menu-particles .portfolio-sand-portal--front {
  z-index: 4;
}
body.is-gallery-menu-particles.is-cube-menu-passing .subpage-cube-portal {
  z-index: 0;
  opacity: 0 !important;
}
body.is-gallery-menu-particles.is-cube-menu-passing main {
  position: relative;
  z-index: 2;
}
body.is-gallery-menu-particles.is-cube-menu-front .subpage-cube-portal {
  z-index: 499;
  opacity: 1 !important;
}
body.is-gallery-menu-particles.is-cube-menu-front .portfolio-sand-portal--front {
  z-index: 498;
}
body.is-gallery-menu-particles.is-cube-menu-front .portfolio-sand-portal--back {
  z-index: 0;
}
body.is-nav-menu-open.is-cube-menu-bg-exit .subpage-cube-portal {
  z-index: 1 !important;
  opacity: 1 !important;
}
body.is-nav-menu-open.is-cube-menu-bg-exit main,
body.is-nav-menu-open.is-cube-menu-bg-exit .reels-masonry,
body.is-nav-menu-open.is-cube-menu-bg-exit .graphics-masonry {
  position: relative;
  z-index: 3;
}
body.is-nav-menu-open.is-cube-menu-passing main {
  position: relative;
  z-index: 2;
}
body.is-nav-menu-open.is-cube-menu-passing .subpage-cube-portal {
  z-index: 1;
  opacity: 1 !important;
}
body.is-nav-menu-open:not(.is-cube-menu-front) main {
  position: relative;
  z-index: 1;
}
body.is-nav-menu-open.is-cube-menu-front main {
  position: relative;
  z-index: 1;
}

/* Radial shockwave — rings + subtle content pulse (no section lift) */
.menu-shockwave {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}
html.is-nav-menu-open.has-global-tilt:not(.reduce-motion) {
  --global-tilt-x: 0deg;
  --global-tilt-y: 0deg;
}
body.is-nav-menu-open.is-cube-menu-front.graphics-gallery-page .subpage-cube-portal,
body.is-nav-menu-open.is-cube-menu-front.reels-gallery-page .subpage-cube-portal,
body.is-nav-menu-open.is-cube-menu-front.portfolio-page .subpage-cube-portal,
body.is-nav-menu-open.is-cube-menu-front.about-page .subpage-cube-portal {
  z-index: 499;
}
body.is-nav-menu-open.is-cube-menu-passing .graphics-masonry__item,
body.is-nav-menu-open.is-cube-menu-passing .reels-masonry__item {
  transform: none !important;
  pointer-events: none;
}
html.reduce-motion .menu-shockwave {
  display: none !important;
}

main { position: relative; z-index: 1; }

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  mix-blend-mode: difference;
}
.site-nav__logo {
  display: inline-flex;
}
.site-nav__logo-img { width: 48px; height: auto; }
.site-nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.5rem;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}
.lang-switch button[aria-pressed="true"] { opacity: 1; }
.site-nav__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav__toggle-bars { display: flex; flex-direction: column; gap: 5px; }
.site-nav__toggle-bars span {
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
.site-nav.is-open .site-nav__toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.site-nav.is-open .site-nav__toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-nav.is-open .site-nav__toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 498;
  pointer-events: none;
  visibility: hidden;
}
.nav-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}
.nav-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.44);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.55s var(--ease);
  cursor: pointer;
}
.nav-overlay.is-open .nav-overlay__backdrop { opacity: 1; }
.nav-overlay__stage {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 270px;
  height: 270px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  --menu-face-size: 270px;
}
.nav-overlay__links {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  pointer-events: none;
}
.nav-overlay__list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 78%;
  height: 78%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}
.nav-overlay__list li {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-overlay__list a {
  position: relative;
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: calc(var(--menu-face-size) * 0.104);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: calc(var(--menu-face-size) * 0.02) 0;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: scale(1);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  transition: transform 0.28s var(--ease), color 0.25s var(--ease);
}
.nav-overlay__list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  transition: width 0.28s var(--ease), opacity 0.25s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.nav-overlay__list a.is-hovered,
.nav-overlay__list a:hover,
.nav-overlay__list a:focus-visible {
  color: #fff;
  transform: scale(1.06);
  outline: none;
}
.nav-overlay__list a.is-hovered::after,
.nav-overlay__list a:hover::after,
.nav-overlay__list a:focus-visible::after {
  width: 52%;
  opacity: 1;
}
.nav-overlay__label {
  display: inline-block;
}
.nav-overlay__char {
  display: inline-block;
}
.nav-overlay.is-open .nav-overlay__list a {
  pointer-events: auto;
}
html.reduce-motion .nav-overlay__list a {
  opacity: 1;
  transform: none;
  clip-path: none;
  pointer-events: auto;
}
html.reduce-motion .nav-overlay__char {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Shared section typography */
.section-eyebrow,
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.section-lead {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Glass CTA */
.glass-btn {
  position: relative;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(245, 240, 235, 0.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  box-shadow:
    0 0 8px rgba(0, 0, 0, 0.03),
    inset 0 0 6px 6px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s var(--ease), filter 0.2s ease;
}
.glass-btn:hover,
.glass-btn:focus-visible {
  transform: scale(1.03);
  filter: brightness(1.12);
}

/* Footer — full-viewport closing section, content centered */
.site-footer {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.footer-col__title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer-col a:hover,
.footer-col a:focus-visible { color: var(--ink); }
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.footer-social .footer-social__link,
.footer-col--social .footer-social__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  line-height: 0;
  padding: 0;
  position: relative;
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.footer-social .footer-social__link::after,
.footer-col--social .footer-social__link::after {
  display: none;
  content: none;
}
.footer-social__link {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  position: relative;
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.footer-social .footer-social__link:hover,
.footer-social .footer-social__link:focus-visible,
.footer-col--social .footer-social__link:hover,
.footer-col--social .footer-social__link:focus-visible,
.footer-social__link:hover,
.footer-social__link:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
.footer-social .footer-social__link svg,
.footer-social__link svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin: 0;
  pointer-events: none;
}
.footer-social .footer-social__link[aria-label="Facebook"] svg,
.footer-social__link[aria-label="Facebook"] svg {
  width: 0.94rem;
  height: 0.94rem;
  transform: translateY(1px);
}
.footer-social .footer-social__link[aria-label="Instagram"] svg,
.footer-social__link[aria-label="Instagram"] svg {
  width: 1rem;
  height: 1rem;
}
.footer-social .footer-social__link[aria-label="LinkedIn"] svg,
.footer-social__link[aria-label="LinkedIn"] svg {
  width: 0.92rem;
  height: 0.92rem;
  transform: translateY(-0.5px);
}
.footer-cta { grid-column: 1 / -1; }
.cosgral-footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  line-height: 0.95;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-bottom a:hover,
.footer-bottom a:focus-visible { color: var(--ink); }

.portfolio-contact-cta {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 8vh, 5rem) var(--gutter);
  border-top: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.35) 0%, rgba(3, 3, 3, 0.72) 55%, rgba(3, 3, 3, 0.85) 100%);
}
.portfolio-contact-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  border-radius: 4px;
  background: rgba(8, 8, 8, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.portfolio-contact-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.portfolio-contact-cta__lead {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.portfolio-contact-cta .glass-btn {
  margin-top: 0.35rem;
}
.about-hero {
  padding: clamp(6.5rem, 16vh, 8.5rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
}
.about-hero.portfolio-hero {
  min-height: auto;
  padding-bottom: clamp(1.25rem, 3vh, 2rem);
}
.about-hero .portfolio-hero__title { margin-bottom: 0.75rem; }
.about-hero__lead {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  line-height: 1.55;
  color: var(--muted);
}
.about-hero__cta {
  display: inline-flex;
  margin-top: 1.35rem;
  align-self: center;
}
.about-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-team {
  padding: 0 var(--gutter) clamp(2.5rem, 8vh, 4.5rem);
}
.about-team__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(2.5rem, 8vw, 5.5rem);
  max-width: 58rem;
  margin: 0 auto;
}
.about-team__member {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  flex: 1 1 16rem;
  max-width: 26rem;
}
.about-team__photo {
  width: clamp(9.5rem, 22vw, 13.5rem);
  height: clamp(9.5rem, 22vw, 13.5rem);
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.7rem;
}
.about-team__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.about-team__photo--kacper {
  border: none;
  box-shadow: none;
  background: transparent;
}
.about-team__img--kacper {
  object-position: center center;
  transform: scale(1.34);
}
.about-team__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.about-team__role {
  margin: 0.15rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.4vw, 0.74rem);
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}
.about-team__focus {
  margin: 0;
  font-size: clamp(0.84rem, 1.6vw, 0.92rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}
.about-team__bios {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
  width: 100%;
  max-width: 24rem;
}
.about-team__bio {
  margin: 0;
  font-size: clamp(0.9rem, 1.8vw, 0.98rem);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}
@media (max-width: 900px) {
  .about-page .site-nav {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.85rem;
  }
  .about-page .site-nav__logo-img {
    width: 40px;
  }
  .about-hero {
    padding:
      calc(5.75rem + env(safe-area-inset-top, 0px))
      1.35rem
      2rem;
  }
  .about-hero.portfolio-hero {
    padding-bottom: 2rem;
  }
  .about-hero .container {
    padding-inline: 0;
    width: 100%;
    max-width: 22.5rem;
  }
  .about-hero .portfolio-hero__title {
    width: auto;
    max-width: 100%;
    margin: 0 0 1rem;
    font-size: clamp(1.85rem, 8.2vw, 2.35rem);
    letter-spacing: 0.04em;
    line-height: 1.08;
  }
  .about-hero__lead {
    max-width: 100%;
    margin: 0;
    padding: 0 0.15rem;
    font-size: 0.98rem;
    line-height: 1.62;
    text-wrap: pretty;
  }
  .about-hero__cta {
    margin-top: 1.5rem;
  }
  .about-team {
    padding: 0.5rem 1.35rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }
  .about-team__grid {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 22.5rem;
  }
  .about-team__member {
    max-width: 100%;
    width: 100%;
    gap: 0.4rem;
  }
  .about-team__photo {
    width: 8.75rem;
    height: 8.75rem;
    margin-bottom: 0.85rem;
  }
  .about-team__name {
    font-size: 1.45rem;
  }
  .about-team__role {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }
  .about-team__focus {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.58);
  }
  .about-team__bios {
    max-width: 100%;
    margin-top: 0.95rem;
    gap: 0.95rem;
    padding: 0 0.1rem;
  }
  .about-team__bio {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    text-wrap: pretty;
  }
}
@media (max-width: 420px) {
  .about-hero,
  .about-team {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
  .about-hero .portfolio-hero__title {
    font-size: 1.7rem;
  }
}
.gallery-hero {
  padding: clamp(6.5rem, 16vh, 8.5rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
}
.gallery-hero.portfolio-hero {
  min-height: 100vh;
  min-height: 100dvh;
}

.privacy-page .privacy-content {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(6.5rem, 14vh, 8rem) var(--gutter) clamp(3rem, 10vh, 6rem);
}
.privacy-page .privacy-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}
.privacy-page .privacy-content__updated {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.privacy-page .privacy-content__intro {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.75rem;
}
.privacy-page .privacy-content h2 {
  font-size: 1.05rem;
  margin: 1.35rem 0 0.45rem;
}
.privacy-page .privacy-content p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.portfolio-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  text-align: center;
  border-bottom: none;
}
.portfolio-hero__title {
  width: 100%;
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(
    calc(2.75rem - 3px),
    calc((100vw - 2 * var(--gutter)) / 8 - 3px),
    calc((100vw - 2 * var(--gutter)) / 8 - 3px)
  );
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 0.82;
  text-transform: none;
}
.portfolio-hero__lead {
  max-width: min(40rem, calc(100vw - 2 * var(--gutter)));
  margin: clamp(0.85rem, 2.2vw, 1.35rem) auto 0;
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 1.1vw, 0.78rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--muted);
}
.portfolio-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  padding: clamp(0.85rem, 1.8vh, 1.35rem) 0 clamp(3rem, 8vh, 5rem);
  scroll-margin-top: 5rem;
  border-bottom: none;
  overflow: clip;
}
.portfolio-page .portfolio-section + .portfolio-section {
  margin-top: 0;
}
.portfolio-section__curtain {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 18%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.22) 82%,
    transparent 100%
  );
  box-shadow: 0 0 48px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 1;
}
.portfolio-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(92%, 1100px);
  height: 1px;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}
.portfolio-section .container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.portfolio-section__head { margin-bottom: clamp(1.15rem, 2.5vw, 1.75rem); }
.portfolio-section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
.portfolio-section__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.25s ease;
}
.portfolio-section__link:hover { color: var(--ink); }
.portfolio-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}
.portfolio-mosaic__item {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  background: var(--bg-card);
}
.portfolio-mosaic__item img,
.portfolio-mosaic__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-mosaic__item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}
@media (max-width: 640px) {
  .portfolio-mosaic__item--wide { grid-column: span 1; }
}

/* Web projects — static tiles */
.portfolio-web-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}
@media (max-width: 820px) {
  .portfolio-web-grid { grid-template-columns: 1fr; }
}
.portfolio-web-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 10, 10, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.portfolio-web-card:hover,
.portfolio-web-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  outline: none;
}
.portfolio-web-card__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  align-content: end;
  padding: 1rem 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.portfolio-web-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.portfolio-web-card__preview--mj {
  background: #0d0b0c;
}
.portfolio-web-card__preview--mj::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 42%);
}
.portfolio-web-card__preview--trove {
  background: #080807;
}
.portfolio-web-card__preview--trove::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 42%);
}
.portfolio-web-card__chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.portfolio-web-card__chrome span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.portfolio-web-card__domain {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.portfolio-web-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
}
.portfolio-web-card__tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.portfolio-web-card__title {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.15;
}
.portfolio-web-card__desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 34ch;
}
.portfolio-web-card__cta {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.portfolio-web-card:hover .portfolio-web-card__cta,
.portfolio-web-card:focus-visible .portfolio-web-card__cta {
  opacity: 1;
}

/* Service pages */
.service-page { position: relative; }
.service-hero {
  padding: clamp(7rem, 16vw, 11rem) 0 clamp(3rem, 8vw, 5rem);
}
.service-hero__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.service-hero__title {
  font-size: clamp(2.4rem, 8vw, 5rem);
  max-width: 44rem;
}
.service-block {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--border);
}
.service-block__title {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  margin-bottom: 1rem;
}
.service-block p {
  color: var(--muted);
  max-width: 42rem;
  margin-bottom: 0.75rem;
}
.service-block ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted);
  max-width: 42rem;
}
.service-cta {
  margin-top: 2rem;
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Graphics cinema (portfolio preview) — stage + tło + overlay */
.portfolio-section--grafiki {
  padding: 0;
  overflow: clip;
}
.graphics-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  isolation: isolate;
}
.graphics-stage__cinema {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.graphics-stage__overlay {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 1.65rem);
  padding: clamp(4.5rem, 10vh, 6.5rem) var(--gutter) clamp(4.5rem, 10vh, 6.5rem);
  text-align: center;
  pointer-events: none;
}
.graphics-stage__overlay::before {
  content: none;
  display: none;
}
.liquid-glass-plate,
.graphics-stage__copy {
  position: relative;
  max-width: min(36rem, 92vw);
  margin: 0;
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: clamp(1rem, 2.2vw, 1.35rem);
  opacity: 0;
  visibility: hidden;
  background: rgba(8, 8, 10, 0.46);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  will-change: opacity, transform, filter;
}
.graphics-stage__overlay.is-overlay-hidden .graphics-stage__copy {
  opacity: 0;
  visibility: hidden;
}
body.is-grafiki-overlay-reveal #grafiki .graphics-stage__copy,
body.is-grafiki-overlay-reveal #grafiki .graphics-collage__footer {
  opacity: unset !important;
  visibility: unset !important;
  transform: unset !important;
}
.graphics-stage__copy .portfolio-section__title {
  margin-bottom: 0.65rem;
  color: #fff;
  text-shadow:
    0 2px 22px rgba(0, 0, 0, 0.62),
    0 1px 2px rgba(0, 0, 0, 0.88);
}
.graphics-stage__copy .section-lead {
  margin: 0 auto;
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.55);
}
.graphics-collage-wrap {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  z-index: 2;
}
.graphics-collage {
  margin-top: 0;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
}
.graphics-cinema {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
}
.graphics-cinema__viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.graphics-cinema__camera {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform: translateY(0);
}
.graphics-cinema__world {
  position: relative;
  width: var(--world-w, 2800px);
  height: var(--world-h, 4000px);
  flex-shrink: 0;
}
.graphics-cinema__watermark {
  position: absolute;
  left: 50%;
  top: 46%;
  margin: 0;
  transform: translate(-50%, -50%);
  font-family: var(--font-display, sans-serif);
  font-size: clamp(5rem, 22vw, 14rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: rgba(0, 0, 0, 0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}
.graphics-cinema__tile {
  position: absolute;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 2;
  will-change: transform;
}
.graphics-cinema__tile-inner {
  display: block;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.graphics-cinema__tile:hover .graphics-cinema__tile-inner,
.graphics-cinema__tile:focus-visible .graphics-cinema__tile-inner {
  border-color: rgba(0, 0, 0, 0.16);
  outline: none;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.24);
}
.graphics-cinema__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f2f2f2;
  filter: grayscale(0) !important;
}
body.is-grafiki-light #grafiki .graphics-stage__copy {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}
body.is-grafiki-light #grafiki .graphics-stage__copy .portfolio-section__title {
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.55);
}
body.is-grafiki-light #grafiki .graphics-stage__copy .section-lead {
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.4);
}
body.is-grafiki-light #grafiki .graphics-collage__footer {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}
body.is-grafiki-light #grafiki .graphics-collage__footer .graphics-collage__cta {
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.45);
}
body.is-grafiki-light #grafiki .portfolio-section__title,
body.is-grafiki-light #grafiki .graphics-stage__copy .portfolio-section__title,
body.is-grafiki-light #grafiki .graphics-collage__footer a {
  color: #111;
}
body.is-grafiki-light #grafiki .section-lead,
body.is-grafiki-light #grafiki .graphics-stage__copy .section-lead,
body.is-grafiki-light #grafiki .portfolio-section__link {
  color: #3a3a3a;
}
body.is-grafiki-light #grafiki .graphics-collage__cta {
  border-color: transparent;
  color: #111;
}
body.is-grafiki-light #grafiki .graphics-collage__cta:hover {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.04);
}

/* Systemy i Automatyzacje — normalna sekcja ze scrollowalnymi case cards */
.portfolio-section--automatyzacje {
  min-height: auto;
  overflow: visible;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vh, 2.25rem) 0 clamp(3.5rem, 9vh, 5.5rem);
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.2) 0%, rgba(3, 3, 3, 0.55) 40%, rgba(3, 3, 3, 0.35) 100%);
}
.portfolio-section--automatyzacje .portfolio-scene__panel {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 0;
  display: block;
  padding: 0;
  transform: none;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  will-change: auto;
}
.portfolio-section--automatyzacje .portfolio-section__head {
  margin-bottom: clamp(1.25rem, 3.5vw, 2rem);
}
.portfolio-section--automatyzacje .portfolio-section__spacer {
  display: none;
}
.portfolio-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2.2vw, 1.35rem);
}
.portfolio-case-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.92);
  overflow: hidden;
  min-height: 100%;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.portfolio-case-card__preview {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: #0a0a0a;
}
.portfolio-case-card__visual {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-case-card__glyph {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}
.portfolio-case-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: clamp(0.95rem, 2.2vw, 1.25rem);
}
.portfolio-case-card__tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.portfolio-case-card__client {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.02em;
}
.portfolio-case-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.portfolio-case-card__desc {
  margin-top: 0.15rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.72);
}
@media (max-width: 900px) {
  .portfolio-section--automatyzacje {
    min-height: auto;
    max-height: none;
    height: auto;
    overflow: visible;
    padding:
      calc(4.25rem + env(safe-area-inset-top, 0px))
      0
      calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
  .portfolio-section--automatyzacje .portfolio-scene__panel,
  .portfolio-section--automatyzacje [data-portfolio-head] *,
  .portfolio-section--automatyzacje [data-portfolio-body],
  .portfolio-section--automatyzacje .portfolio-case-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    visibility: visible !important;
  }
  .portfolio-case-grid {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }
  .portfolio-section--automatyzacje .portfolio-section__title {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
    line-height: 1.08;
  }
  .portfolio-section--automatyzacje .section-lead {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .portfolio-case-card__preview {
    aspect-ratio: 16 / 10;
  }
  .portfolio-case-card__title {
    font-size: clamp(1.12rem, 4.6vw, 1.32rem);
  }
  .portfolio-case-card__desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
  }
  .portfolio-case-card__client {
    font-size: 0.88rem;
  }
}
html.reduce-motion .portfolio-scene__panel {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.graphics-cinema.is-static .graphics-cinema__viewport {
  height: auto;
  min-height: auto;
  padding: 2rem 0 3rem;
}
.graphics-cinema.is-static .graphics-cinema__camera {
  display: block;
  transform: none !important;
}
.graphics-cinema.is-static .graphics-cinema__world {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  width: 100%;
  height: auto;
}
.graphics-cinema.is-static .graphics-cinema__watermark {
  display: none;
}
.graphics-cinema.is-static .graphics-cinema__tile {
  position: relative;
  left: auto !important;
  top: auto !important;
  width: 100%;
  transform: none !important;
}
.graphics-cinema.is-static .graphics-cinema__tile-inner {
  mix-blend-mode: normal;
}
.graphics-collage__footer {
  display: inline-block;
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 3;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.46);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition:
    opacity 0.24s var(--ease),
    transform 0.24s var(--ease),
    visibility 0.24s;
  transition-delay: 0.03s;
  pointer-events: none;
  will-change: opacity, transform;
}
body.is-grafiki-cinema-animating #grafiki .graphics-collage__footer {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-14px) !important;
  pointer-events: none !important;
}
#grafiki.is-cinema-done .graphics-stage__copy,
body.is-grafiki-cinema-end #grafiki .graphics-stage__copy {
  opacity: 1;
  visibility: visible;
}
#grafiki.is-cinema-done .graphics-collage__footer,
body.is-grafiki-cinema-end #grafiki .graphics-collage__footer {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
#grafiki.is-cinema-done .graphics-collage__footer a,
body.is-grafiki-cinema-end #grafiki .graphics-collage__footer a {
  pointer-events: auto;
}
.graphics-collage__cta {
  display: inline-block;
  padding: 0.55rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.62),
    0 1px 2px rgba(0, 0, 0, 0.85);
}
.graphics-collage__cta:hover,
.graphics-collage__cta:focus-visible {
  transform: scale(1.03);
  filter: brightness(1.1);
  color: #fff;
}

/* Full graphics gallery page */
.graphics-gallery-page__back {
  margin-top: 1.25rem;
}
.graphics-gallery-page__back a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}
.graphics-gallery-page__back a:hover,
.graphics-gallery-page__back a:focus-visible {
  color: var(--ink);
}
.graphics-gallery__group {
  padding-bottom: clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--border);
}
.graphics-gallery__group:last-child {
  border-bottom: 0;
}
.graphics-gallery__head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.25rem, 3vw, 2rem);
}
.graphics-gallery__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
.graphics-gallery__count {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.graphics-masonry {
  columns: 3;
  column-gap: clamp(0.75rem, 2vw, 1.1rem);
}
@media (max-width: 900px) {
  .graphics-masonry {
    columns: 3;
    column-gap: clamp(0.35rem, 1.2vw, 0.55rem);
  }
  .graphics-masonry__item {
    margin-bottom: clamp(0.35rem, 1.2vw, 0.55rem);
    border-radius: 3px;
  }
}
.graphics-masonry__item img,
.graphics-masonry__item video {
  display: block;
  width: 100%;
  height: auto;
  background: #0a0a0a;
}
.graphics-masonry__item.is-video::after {
  content: "";
  position: absolute;
  inset: auto 0.55rem 0.55rem auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/55% no-repeat;
  pointer-events: none;
}
.graphics-masonry__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(0.75rem, 2vw, 1.1rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: zoom-in;
  break-inside: avoid;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}
.graphics-masonry__item:hover,
.graphics-masonry__item:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  outline: none;
}

.portfolio-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  translate: 0 -50%;
  width: clamp(2.1rem, 4.5vw, 2.75rem);
  height: clamp(2.1rem, 4.5vw, 2.75rem);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}
.portfolio-lightbox__nav:hover,
.portfolio-lightbox__nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(18, 18, 18, 0.92);
  outline: none;
}
.portfolio-lightbox__nav--prev {
  left: clamp(-0.15rem, -1vw, 0.25rem);
  translate: -100% -50%;
}
.portfolio-lightbox__nav--next {
  right: clamp(-0.15rem, -1vw, 0.25rem);
  translate: 100% -50%;
}
.portfolio-lightbox__nav[hidden] {
  display: none;
}

/* Lightbox */
body.is-lightbox-open {
  overflow: hidden;
}
.graphics-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}
.graphics-lightbox[hidden] {
  display: none;
}
.graphics-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 3, 3, 0.92);
  backdrop-filter: blur(18px);
  cursor: pointer;
}
.graphics-lightbox__figure {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  margin: 0;
}
.graphics-lightbox__img,
.graphics-lightbox__video {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
}
.graphics-lightbox__img[hidden],
.graphics-lightbox__video[hidden] {
  display: none;
}
.graphics-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(10, 10, 10, 0.8);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.graphics-lightbox__close:hover,
.graphics-lightbox__close:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(20, 20, 20, 0.95);
  outline: none;
}

/* Reels tiles (montaż preview) — pas 20 kafelków, głębia + drift R→L */
.portfolio-page #montaz [data-portfolio-body] {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.portfolio-page #montaz .reels-tiles {
  width: 100%;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.reels-tiles__stage {
  position: relative;
  height: clamp(300px, 44vh, 540px);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}
.reels-tiles__stage::before,
.reels-tiles__stage::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(3, 3, 3, 0.92), transparent);
}
.reels-tiles__stage::after {
  inset: 0 0 0 auto;
  background: linear-gradient(270deg, rgba(3, 3, 3, 0.92), transparent);
}
.reels-tiles__belt {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: reels-tiles-drift 52s linear infinite;
}
.reels-tiles.is-ready .reels-tiles__belt {
  animation-play-state: running;
}
.reels-tiles__belt:hover {
  animation-play-state: paused;
}
@keyframes reels-tiles-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.reels-tiles__track {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.65rem, 1.8vw, 1.25rem);
  padding: 0 clamp(0.5rem, 1.5vw, 1rem);
}
.reels-tiles__card {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  align-self: flex-end;
  transform: translateY(calc(var(--lane, 0) * 14px)) scale(var(--tile-scale, 1));
  filter: blur(var(--tile-blur, 0)) grayscale(1);
  opacity: var(--tile-opacity, 1);
  z-index: var(--tile-z, 2);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    filter 0.45s ease,
    opacity 0.35s ease;
}
.reels-tiles__card--xs { width: clamp(68px, 7vw, 84px); }
.reels-tiles__card--sm { width: clamp(84px, 9vw, 108px); }
.reels-tiles__card--md { width: clamp(108px, 11vw, 138px); }
.reels-tiles__card--lg { width: clamp(138px, 14vw, 178px); }
.reels-tiles__card--xl { width: clamp(168px, 17vw, 220px); }
.reels-tiles__card--far {
  --tile-scale: 0.58;
  --tile-blur: 1.6px;
  --tile-opacity: 0.5;
  --tile-z: 1;
}
.reels-tiles__card--mid {
  --tile-scale: 0.8;
  --tile-blur: 0.6px;
  --tile-opacity: 0.76;
  --tile-z: 2;
}
.reels-tiles__card--near {
  --tile-scale: 1;
  --tile-blur: 0;
  --tile-opacity: 1;
  --tile-z: 4;
}
@media (max-width: 900px) {
  .reels-tiles__card--far,
  .reels-tiles__card--mid {
    --tile-blur: 0;
  }
}
.reels-tiles__card:hover,
.reels-tiles__card:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.62);
  outline: none;
  z-index: 6;
  transform: translateY(calc(var(--lane, 0) * 14px - 8px)) scale(calc(var(--tile-scale, 1) * 1.1));
  filter: blur(0) grayscale(0);
  opacity: 1;
}
.reels-tiles__card.is-in-focus {
  filter: blur(0) grayscale(0);
  opacity: 1;
  z-index: 5;
}
.reels-tiles__card.is-in-focus video {
  filter: grayscale(0);
}
.reels-tiles__card video,
.reels-tiles__card .reels-tiles__poster {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #0a0a0a;
  transform: translateZ(0);
  backface-visibility: hidden;
}
html.reduce-motion .reels-tiles__belt {
  animation: none;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
  gap: 0.75rem;
}
html.reduce-motion .reels-tiles__stage {
  height: auto;
  mask-image: none;
  -webkit-mask-image: none;
}
html.reduce-motion .reels-tiles__track--clone {
  display: none;
}
html.reduce-motion .reels-tiles__card {
  transform: none;
  filter: grayscale(1);
  opacity: 1;
}
.reels-tiles__footer {
  display: inline-block;
  text-align: center;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.46);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.reels-tiles__cta {
  display: inline-block;
  padding: 0.55rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.62),
    0 1px 2px rgba(0, 0, 0, 0.85);
}
.reels-tiles__cta:hover,
.reels-tiles__cta:focus-visible {
  transform: scale(1.03);
  filter: brightness(1.1);
}

/* Full reels gallery */
.reels-gallery-page__back {
  margin-top: 1.25rem;
}
.reels-gallery-page__back a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}
.reels-gallery-page__back a:hover,
.reels-gallery-page__back a:focus-visible { color: var(--ink); }
.reels-gallery__group {
  padding-bottom: clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--border);
}
.reels-gallery__group:last-child { border-bottom: 0; }
.reels-gallery__head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.25rem, 3vw, 2rem);
}
.reels-gallery__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
.reels-gallery__count {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.reels-masonry {
  columns: 4;
  column-gap: clamp(0.65rem, 1.8vw, 1rem);
}
@media (max-width: 1000px) {
  .reels-masonry {
    columns: 3;
    column-gap: clamp(0.45rem, 1.4vw, 0.7rem);
  }
}
@media (max-width: 900px) {
  .reels-masonry {
    columns: 3;
    column-gap: clamp(0.35rem, 1.2vw, 0.55rem);
  }
  .reels-masonry__item {
    margin-bottom: clamp(0.35rem, 1.2vw, 0.55rem);
    border-radius: 4px;
  }
}
.reels-masonry__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(0.65rem, 1.8vw, 1rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  break-inside: avoid;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}
.reels-masonry__item:hover,
.reels-masonry__item:focus-visible {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  outline: none;
}
.reels-masonry__item video {
  display: block;
  width: 100%;
  height: auto;
  background: #0a0a0a;
}
.reels-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}
.reels-lightbox[hidden] { display: none; }
.reels-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 3, 3, 0.92);
  backdrop-filter: blur(18px);
  cursor: pointer;
}
.reels-lightbox__figure {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 480px);
  max-height: 92vh;
  margin: 0;
}
.reels-lightbox__video {
  display: block;
  max-width: min(96vw, 480px);
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
  background: #000;
}
.reels-lightbox__video[hidden] { display: none; }
.reels-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(10, 10, 10, 0.8);
  cursor: pointer;
}

/* Portfolio — grayscale media, kolor na hover (strona Realizacje) */
.graphics-masonry__item img,
.graphics-masonry__item video,
.reels-tiles__card video,
.reels-masonry__item video,
.portfolio-mosaic__item img,
.portfolio-mosaic__item video,
.portfolio-web-card__video {
  filter: grayscale(1);
  transition: filter 0.45s var(--ease);
}
.graphics-masonry__item:hover img,
.graphics-masonry__item:hover video,
.graphics-masonry__item:focus-visible img,
.graphics-masonry__item:focus-visible video,
.reels-tiles__card:hover video,
.reels-tiles__card:focus-visible video,
.reels-tiles__card.is-in-focus video,
.reels-masonry__item:hover video,
.reels-masonry__item:focus-visible video,
.portfolio-mosaic__item:hover img,
.portfolio-mosaic__item:hover video,
.portfolio-web-card:hover .portfolio-web-card__video,
.portfolio-web-card:focus-visible .portfolio-web-card__video {
  filter: grayscale(0);
}

/* Galerie — kolor tylko w pasie środka ekranu */
.reels-gallery-page .reels-masonry__item video,
.graphics-gallery-page .graphics-masonry__item img,
.graphics-gallery-page .graphics-masonry__item video {
  filter: grayscale(calc(1 - var(--color-mix, 0)));
  transition: filter 0.35s var(--ease);
}
.reels-gallery-page .reels-masonry__item:hover video,
.reels-gallery-page .reels-masonry__item:focus-visible video,
.graphics-gallery-page .graphics-masonry__item:hover img,
.graphics-gallery-page .graphics-masonry__item:hover video,
.graphics-gallery-page .graphics-masonry__item:focus-visible img,
.graphics-gallery-page .graphics-masonry__item:focus-visible video {
  filter: grayscale(calc(1 - max(var(--color-mix, 0), 0.92)));
}

/* Portfolio — scroll rail (identyczny jak homepage) */
.portfolio-page .home-scroll-rail {
  position: fixed;
  top: 50%;
  right: clamp(0.55rem, 1.4vw, 1rem);
  z-index: 480;
  translate: 0 -50%;
  width: auto;
  min-width: 14px;
  height: min(72vh, 560px);
  pointer-events: none;
  --rail-track-edge: rgba(255, 255, 255, 0.04);
  --rail-track-mid: rgba(255, 255, 255, 0.14);
  --rail-fill-1: rgba(255, 255, 255, 0.35);
  --rail-fill-2: rgba(255, 255, 255, 0.85);
  --rail-fill-shadow: rgba(255, 255, 255, 0.2);
  --rail-dot-border: rgba(255, 255, 255, 0.28);
  --rail-dot-bg: rgba(8, 8, 8, 0.65);
  --rail-dot-active-border: rgba(255, 255, 255, 0.55);
  --rail-dot-active-bg: rgba(255, 255, 255, 0.22);
  --rail-dot-hold-border: rgba(255, 255, 255, 0.95);
  --rail-dot-hold-bg: rgba(255, 255, 255, 0.92);
  --rail-dot-hold-shadow-1: rgba(255, 255, 255, 0.08);
  --rail-dot-hold-shadow-2: rgba(255, 255, 255, 0.35);
  --rail-title: rgba(255, 255, 255, 0.52);
  --rail-title-hover: rgba(255, 255, 255, 0.92);
  --rail-title-current: rgba(255, 255, 255, 0.88);
}
.portfolio-page .home-scroll-rail__track {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3px;
  left: auto;
  width: 1px;
  translate: 50% 0;
  background: linear-gradient(
    to bottom,
    var(--rail-track-edge) 0%,
    var(--rail-track-mid) 12%,
    var(--rail-track-mid) 88%,
    var(--rail-track-edge) 100%
  );
}
.portfolio-page .home-scroll-rail__fill {
  position: absolute;
  top: 0;
  right: 3px;
  left: auto;
  width: 2px;
  height: 0;
  translate: 50% 0;
  background: linear-gradient(to bottom, var(--rail-fill-1), var(--rail-fill-2));
  box-shadow: 0 0 10px var(--rail-fill-shadow);
  transition: height 0.12s linear;
}
.portfolio-page .home-scroll-rail__dots {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
}
.portfolio-page .home-scroll-rail__item {
  position: relative;
  right: auto;
  top: auto;
  translate: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}
.portfolio-page .home-scroll-rail__title {
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rail-title);
  background: none;
  border: 0;
  padding: 0.2rem 0.35rem;
  margin: 0;
  opacity: 0;
  transform: translateX(10px);
  cursor: default;
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    color 0.25s var(--ease);
}
.portfolio-page .home-scroll-rail__item.is-title-revealed .home-scroll-rail__title {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
  cursor: pointer;
}
.portfolio-page .home-scroll-rail__item.is-title-revealed .home-scroll-rail__title:hover,
.portfolio-page .home-scroll-rail__item.is-title-revealed .home-scroll-rail__title:focus-visible {
  color: var(--rail-title-hover);
  outline: none;
}
.portfolio-page .home-scroll-rail__item.is-title-revealed.is-current .home-scroll-rail__title {
  color: var(--rail-title-current);
}
.portfolio-page .home-scroll-rail__dot {
  pointer-events: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--rail-dot-border);
  background: var(--rail-dot-bg);
  padding: 0;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.portfolio-page .home-scroll-rail__dot.is-active {
  border-color: var(--rail-dot-active-border);
  background: var(--rail-dot-active-bg);
  transform: scale(1.15);
}
.portfolio-page .home-scroll-rail__dot.is-hold {
  transform: scale(1.55);
  border-color: var(--rail-dot-hold-border);
  background: var(--rail-dot-hold-bg);
  box-shadow:
    0 0 0 4px var(--rail-dot-hold-shadow-1),
    0 0 14px var(--rail-dot-hold-shadow-2);
  animation: scroll-rail-hold-pulse-portfolio 1.8s ease-in-out infinite;
}
@keyframes scroll-rail-hold-pulse-portfolio {
  0%, 100% {
    box-shadow:
      0 0 0 4px var(--rail-dot-hold-shadow-1),
      0 0 10px color-mix(in srgb, var(--rail-dot-hold-shadow-2) 70%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 7px color-mix(in srgb, var(--rail-dot-hold-shadow-1) 140%, transparent),
      0 0 18px var(--rail-dot-hold-shadow-2);
  }
}
html.reduce-motion .portfolio-page .home-scroll-rail { display: none; }

@media (max-width: 900px) {
  .site-footer {
    overflow: visible;
    min-height: 100svh;
    min-height: 100dvh;
    justify-content: center;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.6rem;
    padding-bottom: 0.55rem;
    margin-bottom: 0;
  }
  .footer-cta,
  .footer-col--social,
  .footer-bottom {
    grid-column: 1 / -1;
  }
  .footer-cta {
    text-align: center;
  }
  .footer-col--social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.6rem;
  }
  .footer-col--social .footer-col__title {
    margin-bottom: 0;
  }
  .footer-col__title {
    font-size: 0.48rem;
    letter-spacing: 0.11em;
    margin-bottom: 0.38rem;
  }
  .footer-col a {
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    hyphens: none;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .footer-col a[href^="tel:"] {
    font-size: 0.6rem;
    letter-spacing: 0.01em;
  }
  .footer-social .footer-social__link,
  .footer-col--social .footer-social__link {
    width: 2.2rem;
    height: 2.2rem;
    font-size: inherit;
    white-space: normal;
  }
  .cosgral-footer-wordmark {
    font-size: clamp(1rem, 4.8vw, 1.35rem);
    letter-spacing: 0.03em;
  }
  .footer-social {
    justify-content: center;
    gap: 0.5rem;
  }
  .footer-social__link {
    width: 2.2rem;
    height: 2.2rem;
  }
  .footer-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    font-size: 0.56rem;
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .portfolio-hero__title {
    font-size: clamp(
      calc(2rem - 3px),
      calc((100vw - 2 * var(--gutter)) / 9 - 3px),
      calc((100vw - 2 * var(--gutter)) / 8 - 3px)
    );
    letter-spacing: 0.06em;
  }
  .portfolio-page .home-scroll-rail {
    right: 0.35rem;
    height: min(64vh, 460px);
  }
  .portfolio-page .home-scroll-rail__title {
    font-size: calc(0.62rem - 2px);
  }
  .portfolio-page .home-scroll-rail__dot {
    width: 6px;
    height: 6px;
  }

  /* Strony + Montaż — cała treść w jednym widoku mobilnym */
  .portfolio-page #strony.portfolio-section,
  .portfolio-page #montaz.portfolio-section {
    box-sizing: border-box;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    padding:
      calc(4.1rem + env(safe-area-inset-top, 0px))
      0
      calc(0.5rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    align-items: stretch;
  }
  .portfolio-page #strony .container,
  .portfolio-page #montaz .container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: 100%;
  }
  .portfolio-page #strony [data-portfolio-head] *,
  .portfolio-page #strony [data-portfolio-body],
  .portfolio-page #strony .portfolio-web-card,
  .portfolio-page #montaz [data-portfolio-head] *,
  .portfolio-page #montaz [data-portfolio-body] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .portfolio-page #strony .portfolio-section__head,
  .portfolio-page #montaz .portfolio-section__head {
    flex-shrink: 0;
    margin-bottom: 0.4rem;
  }
  .portfolio-page #strony .portfolio-section__title,
  .portfolio-page #montaz .portfolio-section__title {
    font-size: clamp(1.1rem, 4.8vw, 1.4rem);
    line-height: 1.05;
    margin-bottom: 0.15rem;
  }
  .portfolio-page #strony .section-lead,
  .portfolio-page #montaz .section-lead {
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .portfolio-page #strony .portfolio-section__link,
  .portfolio-page #montaz .portfolio-section__link {
    display: none;
  }
  .portfolio-page #strony [data-portfolio-body],
  .portfolio-page #montaz [data-portfolio-body] {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: flex-start;
    gap: 0.45rem;
  }
  .portfolio-page #montaz [data-portfolio-body] {
    gap: 0;
  }

  .portfolio-page #strony .portfolio-web-grid {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    align-content: start;
    grid-template-columns: 1fr !important;
    gap: 0.55rem;
    overflow: visible;
  }
  .portfolio-page #strony .portfolio-web-card {
    height: auto;
    max-height: none;
    flex-shrink: 0;
  }
  .portfolio-page #strony .portfolio-web-card__preview {
    aspect-ratio: unset;
    height: clamp(96px, 22svh, 124px);
    min-height: 0;
    flex-shrink: 0;
    padding: 0.35rem 0.45rem 0.45rem;
  }
  .portfolio-page #strony .portfolio-web-card__chrome {
    padding: 0.3rem 0.45rem;
  }
  .portfolio-page #strony .portfolio-web-card__chrome span {
    width: 5px;
    height: 5px;
  }
  .portfolio-page #strony .portfolio-web-card__domain {
    font-size: 0.46rem;
  }
  .portfolio-page #strony .portfolio-web-card__body {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0.38rem 0.45rem 0.45rem;
    gap: 0.1rem;
    overflow: hidden;
  }
  .portfolio-page #strony .portfolio-web-card__tag {
    font-size: 0.44rem;
    letter-spacing: 0.08em;
  }
  .portfolio-page #strony .portfolio-web-card__title {
    font-size: 0.66rem;
    line-height: 1.12;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .portfolio-page #strony .portfolio-web-card__desc {
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .portfolio-page #strony .portfolio-web-card__cta {
    display: inline-flex;
    font-size: 0.72rem;
  }

  .portfolio-page #montaz .reels-tiles {
    margin-top: 0.2rem;
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.45rem;
  }
  .portfolio-page #montaz .reels-tiles__stage {
    flex: 0 0 auto;
    height: clamp(128px, 28svh, 210px);
    min-height: 0;
    max-height: min(30svh, 210px);
  }
  .portfolio-page #montaz .reels-tiles__card--xs { width: clamp(50px, 13vw, 62px); }
  .portfolio-page #montaz .reels-tiles__card--sm { width: clamp(62px, 16vw, 76px); }
  .portfolio-page #montaz .reels-tiles__card--md { width: clamp(76px, 19vw, 92px); }
  .portfolio-page #montaz .reels-tiles__card--lg { width: clamp(92px, 23vw, 112px); }
  .portfolio-page #montaz .reels-tiles__card--xl { width: clamp(108px, 27vw, 132px); }
  .portfolio-page #montaz .reels-tiles__footer {
    margin-top: 1cm !important;
    flex-shrink: 0;
    align-self: center;
  }
  .portfolio-page #montaz .reels-tiles__cta {
    font-size: 0.6rem;
    padding: 0.42rem 0.95rem;
  }
}

/* Subtle pointer / gyro tilt — never transform scroll-pinned sections or nav-overlay stage */
html.has-global-tilt:not(.reduce-motion) .site-nav,
html.has-global-tilt:not(.reduce-motion) .home-scroll-rail {
  transform: rotateX(var(--global-tilt-x)) rotateY(var(--global-tilt-y));
  transform-origin: 50vw 50vh;
}
@media (min-width: 901px) {
  html.has-global-tilt:not(.reduce-motion) .site-footer {
    transform: rotateX(var(--global-tilt-x)) rotateY(var(--global-tilt-y));
    transform-origin: 50vw 50vh;
  }
}

/* About — visible blocks only (jak homepage .home-scene.is-in-view) */
html.has-global-tilt:not(.reduce-motion) body.about-page #main > .is-in-view,
html.has-global-tilt:not(.reduce-motion) body.about-page #main > .is-in-view > * {
  transform: rotateX(var(--global-tilt-x)) rotateY(var(--global-tilt-y));
  transform-origin: 50vw 50vh;
}

/* Portfolio — inner content only when section visible (nie pinujemy [data-portfolio-section]) */
html.has-global-tilt:not(.reduce-motion) body.portfolio-page .portfolio-hero.is-in-view > *,
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view [data-portfolio-head],
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view [data-portfolio-head] > *,
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view [data-portfolio-body],
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view [data-portfolio-body] > *,
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view .graphics-stage__overlay,
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view .graphics-stage__overlay > *,
html.has-global-tilt:not(.reduce-motion) body.portfolio-page [data-portfolio-section].is-in-view .portfolio-scene__panel > * {
  transform: rotateX(var(--global-tilt-x)) rotateY(var(--global-tilt-y));
  transform-origin: 50vw 50vh;
}

/* Gallery subpages */
html.has-global-tilt:not(.reduce-motion) body.graphics-gallery-page #main > .is-in-view,
html.has-global-tilt:not(.reduce-motion) body.graphics-gallery-page #main > .is-in-view > *,
html.has-global-tilt:not(.reduce-motion) body.reels-gallery-page #main > .is-in-view,
html.has-global-tilt:not(.reduce-motion) body.reels-gallery-page #main > .is-in-view > * {
  transform: rotateX(var(--global-tilt-x)) rotateY(var(--global-tilt-y));
  transform-origin: 50vw 50vh;
}

body.is-nav-menu-open.is-cube-menu-front .nav-overlay__list a {
  color: rgba(255, 255, 255, 0.97);
  text-shadow:
    0 0 28px rgba(0, 0, 0, 0.95),
    0 2px 18px rgba(0, 0, 0, 0.92),
    0 0 2px rgba(0, 0, 0, 0.85);
}
body.is-nav-menu-open.is-cube-menu-front .nav-overlay__stage {
  filter: drop-shadow(0 0 42px rgba(0, 0, 0, 0.55));
}

html.is-nav-menu-open .nav-overlay__stage {
  transform: translate(-50%, -50%) !important;
}

.nav-overlay__item--services {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nav-overlay__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow: visible;
  max-height: none;
}
.nav-overlay.is-services-expanded .nav-overlay__sublist {
  display: flex;
  gap: 0;
  margin-top: calc(var(--menu-face-size) * 0.01);
  padding: 0;
}
.nav-overlay__sublist li {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.nav-overlay__sublist a {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: calc(var(--menu-face-size) * 0.104);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  hyphens: none;
  word-break: keep-all;
  overflow-wrap: normal;
  padding: calc(var(--menu-face-size) * 0.02) 0;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.72);
  opacity: 0;
  clip-path: none;
  pointer-events: none;
  transition: transform 0.28s var(--ease), color 0.25s var(--ease);
}
.nav-overlay.is-services-expanded .nav-overlay__sublist a {
  pointer-events: auto;
}
.nav-overlay__sublist a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  transition: width 0.28s var(--ease), opacity 0.25s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.nav-overlay__sublist a.is-hovered,
.nav-overlay__sublist a:hover,
.nav-overlay__sublist a:focus-visible {
  color: #fff;
  transform: scale(1.06);
  outline: none;
}
.nav-overlay__sublist a.is-hovered::after,
.nav-overlay__sublist a:hover::after,
.nav-overlay__sublist a:focus-visible::after {
  width: 52%;
  opacity: 1;
}
.nav-overlay__list a.is-services-active,
.nav-overlay__list a.is-services-active.is-hovered {
  color: #fff;
}
.nav-overlay.is-services-expanded .nav-overlay__backdrop {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(38px);
}
.nav-overlay.is-services-expanded .nav-overlay__stage {
  height: auto !important;
  min-height: 0;
  max-height: none;
}
.nav-overlay.is-services-expanded .nav-overlay__list {
  width: 86%;
  height: auto;
  min-height: 0;
  justify-content: center;
}
.nav-overlay.is-services-expanded .nav-overlay__list > li:not(.nav-overlay__item--services) {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}
.nav-overlay.is-services-expanded .nav-overlay__item--services {
  width: 100%;
  height: auto;
  justify-content: center;
  padding-top: 0;
}
body.is-nav-menu-open.is-grafiki-menu-sand .nav-overlay__sublist a {
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  font-weight: 600;
}
body.is-nav-menu-open.is-nav-services-expanded .home-cube-portal,
body.is-nav-menu-open.is-nav-services-expanded .subpage-cube-portal {
  filter: blur(18px) brightness(0.34) saturate(0.7);
  transition: filter 0.45s var(--ease);
}

/* Mobile gyro permission gate — same as home (subpages use this stylesheet) */
.gyro-enable {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  transform: translateX(-50%);
  padding: 0.72rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 8, 8, 0.82);
  color: #f2f2f2;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: opacity 0.35s var(--ease, ease), transform 0.35s var(--ease, ease);
}
.gyro-enable.is-done {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}
@media (min-width: 901px) and (hover: hover) {
  .gyro-enable {
    display: none !important;
  }
}

