/* HyperQuant · portal. Jeden znak ruchu: linia wody. Szkło tylko na elementach unoszących się nad treścią
   (dock, menu, zakładki, odczyty), reszta płaska. Ruch wyłącznie poza html[data-motion=reduced]
   i prefers-reduced-motion. Kolory tekstu na ciemnym tle ≥ 4,5:1. */
.portal {
  --glass: color-mix(in oklab, #191229 64%, transparent);
  --glass-strong: color-mix(in oklab, #160f24 86%, transparent);
  --glass-line: rgba(241, 234, 255, .14);
  --glass-hi: rgba(255, 255, 255, .07);
  --glass-blur: blur(18px) saturate(1.5);
  --violet: #a490d3;
  --pale: #f1eaff;
  --dock-h: 60px;
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  background: var(--cinema-bg);
}
.portal .cinema-kicker > span:not(:empty) { flex: 0 0 auto; height: auto; background: none; font: 600 .7rem/1 var(--f-mono); color: var(--cinema-lime); letter-spacing: .06em; }
.portal :focus-visible { outline: 2px solid var(--cinema-lime); outline-offset: 3px; }

/* ---------- Szkło ---------- */
.glass, .dock-in, .tour-tabs-in, .hero2-live, .pmenu-in, .gseg {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 50px -24px rgba(0, 0, 0, .75);
}

/* ---------- Płynny znacznik (Fluid Tabs jako inspiracja): pigułka + linia wody ---------- */
[data-fluid] { position: relative; }
.fluid-ind {
  position: absolute;
  left: 0; top: 0;
  width: var(--fw, 0); height: var(--fh, 0);
  transform: translate(var(--fx, 0), var(--fy, 0));
  border-radius: 999px;
  background: rgba(241, 234, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(241, 234, 255, .12);
  opacity: var(--fo, 0);
  pointer-events: none;
  z-index: 0;
}
.fluid-ind::after {
  content: '';
  position: absolute;
  left: 22%; right: 22%; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--cinema-lime);
  box-shadow: 0 0 12px rgba(220, 255, 114, .7);
  transition: opacity .2s linear;
}
[data-fluid-hover='true'] .fluid-ind::after { opacity: .45; }
.fluid-ready .fluid-ind { transition: transform .42s var(--ease-spring), width .42s var(--ease-spring), height .3s var(--ease-out), opacity .2s linear; }
[data-fluid] > a, [data-fluid] > button { position: relative; z-index: 1; }

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  inset: 12px 0 auto;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: transform .5s var(--ease-out);
}
.dock[data-hidden='true'] { transform: translateY(calc(-100% - 20px)); }
.dock-in {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(1180px, calc(100% - 24px));
  height: var(--dock-h);
  padding: 0 8px 0 18px;
  border-radius: 999px;
  color: var(--cinema-text);
  transition: width .6s var(--ease-out), background-color .3s linear;
}
.dock[data-compact='true'] .dock-in { width: min(860px, calc(100% - 24px)); background: var(--glass-strong); }
.dock .logo { color: var(--cinema-text); font-size: 18px; flex: none; }
.dock .logo svg { width: 28px; height: 28px; }
.dock-nav { display: flex; gap: 2px; margin-inline: auto; padding: 4px; }
.dock-nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  color: #d4cde6;
  font: 600 14px/1 var(--f-ui);
  text-decoration: none;
  transition: color .2s linear;
}
.dock-nav a:hover, .dock-nav a[aria-current] { color: #fff; }
.dock-right { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.dock-nav + .dock-right { margin-inline-start: 0; }
.dock-cta {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px;
  background: var(--cinema-lime); color: #171c09;
  font: 700 14px/1 var(--f-ui); text-decoration: none;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease-out), background-color .15s linear, box-shadow .3s linear;
}
.dock-cta:hover { background: #f1ffba; box-shadow: 0 0 0 6px rgba(220, 255, 114, .12); }
.dock-menu {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 14px;
  border: 1px solid var(--glass-line); border-radius: 999px;
  background: rgba(241, 234, 255, .05); color: var(--cinema-text);
  font: 600 14px/1 var(--f-ui); cursor: pointer;
  transition: background-color .2s linear;
}
.dock-menu:hover { background: rgba(241, 234, 255, .12); }
.burger { position: relative; width: 18px; height: 10px; display: inline-block; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-out), top .35s var(--ease-out); }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 8px; background: var(--cinema-lime); }
.dock-menu:hover .burger i:first-child { transform: scaleX(.7); transform-origin: left; }
.burger.x i:first-child { top: 4px; transform: rotate(45deg); }
.burger.x i:last-child { top: 4px; transform: rotate(-45deg); }
.dock-progress {
  position: absolute;
  left: 50%; top: calc(var(--dock-h) - 1px);
  width: min(1120px, calc(100% - 80px));
  height: 2px;
  transform: translateX(-50%) scaleX(var(--page, 0));
  transform-origin: left;
  background: linear-gradient(90deg, transparent, var(--cinema-lime) 30%, var(--cinema-lime));
  border-radius: 2px;
  opacity: .9;
  pointer-events: none;
}
.dock[data-compact='true'] .dock-progress { width: min(800px, calc(100% - 80px)); }

/* ---------- Menu pełnoekranowe: otwiera się od linii wody ---------- */
.pmenu {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(10px, 2vw, 22px);
  border: 0;
  background: transparent;
  color: var(--cinema-text);
  overflow: auto;
}
.pmenu::backdrop { background: rgba(6, 4, 12, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pmenu-in {
  min-height: 100%;
  border-radius: 28px;
  padding: clamp(18px, 3vw, 40px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(20px, 4vh, 48px);
  background: color-mix(in oklab, #120c1f 88%, transparent);
}
.pmenu-head { display: flex; align-items: center; gap: 16px; }
.pmenu-head h2 { margin: 0; font: 760 clamp(1.6rem, 3vw, 2.4rem)/1 var(--f-display); letter-spacing: -.03em; }
.pmenu-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 0 0; color: var(--cinema-muted); font: 500 .75rem/1.2 var(--f-mono); }
.pmenu-status i { width: 8px; height: 8px; border-radius: 50%; background: #e9b04f; }
.pmenu-status:has([data-state='live']) i { background: var(--cinema-lime); box-shadow: 0 0 10px var(--cinema-lime); }
.pmenu-cols { display: grid; grid-template-columns: 1.1fr 1fr .95fr; gap: clamp(20px, 4vw, 64px); align-content: start; }
.pmenu-k { margin: 0 0 14px; color: var(--cinema-muted); font: 600 .7rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.pmenu-list ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--glass-line); }
.pmenu-list li { border-bottom: 1px solid var(--glass-line); }
.pmenu-list a {
  display: flex; align-items: baseline; gap: 14px;
  min-height: 48px; padding: 10px 4px;
  color: var(--cinema-text); text-decoration: none;
  font: 700 clamp(1.15rem, 2.1vw, 1.75rem)/1.15 var(--f-display); letter-spacing: -.02em;
  transition: color .2s linear, transform .35s var(--ease-out);
}
.pmenu-list a > span:first-child { color: var(--cinema-lime); font: 600 .72rem/1 var(--f-mono); letter-spacing: .04em; }
.pmenu-app a { justify-content: space-between; font-size: clamp(1rem, 1.6vw, 1.3rem); }
.pmenu-app a > span { color: var(--cinema-muted); }
.pmenu-list a:hover { color: var(--cinema-lime); transform: translateX(6px); }
.pmenu-prefs { display: grid; gap: 14px; align-content: start; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--glass-line); padding-bottom: 10px; }
.prow > span { color: #d9d2ea; font: 600 .9rem/1.2 var(--f-ui); }
.pmenu-hint { margin: 0; color: var(--cinema-muted); font-size: .85rem; line-height: 1.5; max-width: 42ch; }

.gseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; }
.gseg button {
  min-height: 40px; min-width: 44px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: transparent; color: #cfc7e3;
  font: 700 .8rem/1 var(--f-ui); cursor: pointer;
}
.gseg button[aria-pressed='true'] { color: #fff; }
.gswitch {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px 0 8px;
  border: 1px solid var(--glass-line); border-radius: 999px;
  background: rgba(241, 234, 255, .05); color: var(--cinema-text);
  font: 600 .82rem/1 var(--f-ui); cursor: pointer;
}
.gswitch > i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #3a3150; transition: background-color .2s linear; flex: none; }
.gswitch > i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #e9e3f7; transition: transform .35s var(--ease-spring); }
.gswitch[aria-pressed='true'] > i { background: var(--cinema-lime); }
.gswitch[aria-pressed='true'] > i::after { transform: translateX(14px); background: #171c09; }
.gswitch-state { color: var(--cinema-muted); font-family: var(--f-mono); font-size: .72rem; }

.js-motion .pmenu[open] .pmenu-in { animation: pm-open .62s cubic-bezier(.83, 0, .17, 1) both; }
.js-motion .pmenu[open]::backdrop { animation: pm-fade .4s linear both; }
.js-motion .pmenu[open] .pmenu-list li, .js-motion .pmenu[open] .prow { animation: pm-rise .6s var(--ease-out) both; animation-delay: calc(180ms + var(--n, 0) * 35ms); }
.pmenu-list li:nth-child(2), .prow:nth-of-type(2) { --n: 1; } .pmenu-list li:nth-child(3), .prow:nth-of-type(3) { --n: 2; }
.pmenu-list li:nth-child(4), .prow:nth-of-type(4) { --n: 3; } .pmenu-list li:nth-child(5), .prow:nth-of-type(5) { --n: 4; }
.pmenu-list li:nth-child(6) { --n: 5; } .pmenu-list li:nth-child(7) { --n: 6; } .pmenu-list li:nth-child(8) { --n: 7; }
.js-motion .pmenu.closing .pmenu-in { animation: pm-close .32s cubic-bezier(.64, 0, .78, 0) both; }
.js-motion .pmenu.closing::backdrop { animation: pm-fade .3s linear reverse both; }
@keyframes pm-open { from { clip-path: inset(49.5% 0 49.5% 0 round 28px); } 40% { clip-path: inset(49.5% 0 49.5% 0 round 28px); } to { clip-path: inset(0 0 0 0 round 28px); } }
@keyframes pm-close { to { clip-path: inset(49.5% 0 49.5% 0 round 28px); opacity: .4; } }
@keyframes pm-fade { from { opacity: 0; } }
@keyframes pm-rise { from { opacity: 0; transform: translateY(18px); } }
.js-motion .pmenu[open] .pmenu-in::before {
  content: '';
  position: fixed; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--cinema-lime); box-shadow: 0 0 18px var(--cinema-lime);
  animation: pm-line .7s var(--ease-out) both;
  pointer-events: none;
}
@keyframes pm-line { 0% { transform: scaleX(0); opacity: 1; } 45% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
html.menu-open { overflow: hidden; }

/* ---------- Rozkład słów nagłówków ---------- */
.sw { display: inline-block; overflow: clip; vertical-align: top; padding: .08em .02em .16em; margin: -.08em -.02em -.16em; }
.sw-i { display: inline-block; }
.js-motion [data-words] .sw-i { transform: translateY(112%); transition: transform 1.05s var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms + var(--d0, 0ms)); }
.js-motion.portal-ready .hero2 [data-words] .sw-i,
.js-motion [data-in='true'] [data-words] .sw-i,
.js-motion .tour-chapter[data-active='true'] [data-words] .sw-i,
.js-motion [data-words][data-in='true'] .sw-i { transform: none; }
.js-motion .hero2 [data-words] { --d0: 120ms; }

/* ---------- Odsłanianie sekcji ---------- */
.js-motion [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.js-motion [data-reveal][data-in='true'] { opacity: 1; transform: none; }
.js-motion section[data-reveal] { transform: none; }

/* ---------- Hero „Linia wody” ---------- */
.hero2 { min-height: max(640px, 100svh); }
.hero2-media { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 70% 50%, #2a2040 0, #120d1d 55%, #09080e 80%); }
.hero2-media img, .hero2-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero2-media img { object-fit: cover; object-position: 66% center; opacity: .9; }
.hero2[data-gl='true'] .hero2-poster { opacity: 0; transition: opacity .6s linear; }
.hero2-media::after { content: ''; position: absolute; inset: auto 0 0; height: 26%; background: linear-gradient(0deg, var(--cinema-bg), transparent); pointer-events: none; }
.hero2-in {
  width: min(100%, var(--cinema-width));
  margin-inline: auto;
  padding: calc(var(--dock-h) + clamp(60px, 12vh, 150px)) var(--cinema-gutter) clamp(18px, 3.5vh, 40px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(28px, 6vh, 72px);
  position: relative;
}
.hero2-copy { align-self: center; max-width: 1100px; }
.hero2 h1 { margin: 0 0 clamp(20px, 3vh, 32px); font: 800 clamp(3.4rem, 8.6vw, 9.2rem)/.86 var(--f-display); letter-spacing: -.055em; color: var(--cinema-text); }
.hero2 h1 > span, .hero2 h1 > em { display: block; }
.portal h1 .sw, .portal h2 .sw, .portal h3 .sw { display: inline-block; }
.portal h1 .sw-i, .portal h2 .sw-i, .portal h3 .sw-i { display: inline-block; }
.bl-probe { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.hero2 h1 em { font-style: normal; color: var(--cinema-lime); }
.js-motion .hero2 .cinema-kicker, .js-motion .hero2 .cinema-lead, .js-motion .hero2 .cinema-hero-actions, .js-motion .hero2-foot {
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
}
.js-motion .hero2 .cinema-kicker { transition-delay: 60ms; }
.js-motion .hero2 .cinema-lead { transition-delay: 520ms; }
.js-motion .hero2 .cinema-hero-actions { transition-delay: 660ms; }
.js-motion .hero2-foot { transition-delay: 820ms; }
.js-motion.portal-ready .hero2 .cinema-kicker, .js-motion.portal-ready .hero2 .cinema-lead, .js-motion.portal-ready .hero2 .cinema-hero-actions, .js-motion.portal-ready .hero2-foot { opacity: 1; transform: none; }
.cinema-button[data-magnetic] { --mx: 0px; --my: 0px; transform: translate(var(--mx), var(--my)); transition: transform .35s var(--ease-out), background-color .15s linear, box-shadow .3s linear; }
.cinema-button-main:hover { box-shadow: 0 0 0 7px rgba(220, 255, 114, .12), 0 12px 40px -10px rgba(220, 255, 114, .45); }
.cinema-button-alt { background: rgba(23, 19, 30, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.hero2-foot { display: flex; align-items: flex-end; gap: 14px 18px; flex-wrap: wrap; }
.hero2-live { display: flex; gap: 0; margin: 0; padding: 6px; border-radius: 20px; }
.hl { display: grid; gap: 6px; padding: 10px 16px; min-width: 0; }
.hl + .hl { border-inline-start: 1px solid var(--glass-line); }
.hl dt { color: var(--cinema-muted); font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .04em; }
.hl dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hl dd > b { font: 700 1.3rem/1 var(--f-mono); color: var(--cinema-text); font-variant-numeric: tabular-nums; min-width: 6ch; }
.hl-sub { color: #d6cfe8; font: 500 .8rem/1 var(--f-mono); }
.hero2-note { display: flex; align-items: center; gap: 10px; max-width: 36ch; margin: 0 0 6px; color: #cdc6df; font-size: .82rem; line-height: 1.45; }
.hero2-note i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cinema-lime); box-shadow: 0 0 0 4px rgba(220, 255, 114, .15); }
.js-motion .hero2[data-live='live'] .hero2-note i { animation: hl-ping 2.4s var(--ease-out) infinite; }
@keyframes hl-ping { 0% { box-shadow: 0 0 0 0 rgba(220, 255, 114, .5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(220, 255, 114, 0); } }
.hero2-ctrl { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; flex-wrap: wrap; }
.hero2-ctrl .film-control { background: rgba(23, 19, 30, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero2-sound { background: rgba(23, 19, 30, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero2-scroll { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; display: grid; justify-items: center; gap: 8px; color: var(--cinema-muted); font: 500 .66rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.hero2-scroll i { position: relative; width: 1px; height: 64px; background: rgba(241, 234, 255, .2); overflow: hidden; }
.hero2-scroll i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--cinema-lime); }
.js-motion .hero2-scroll i::after { animation: hs-drop 2.2s var(--ease-io) infinite; }
@keyframes hs-drop { to { top: 100%; } }

/* ---------- Przerywnik: film przypięty na cały ekran, pas słów, manifest ---------- */
.interlude { position: relative; height: 220svh; color: var(--cinema-text); --sp: .5; }
.interlude-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; display: grid; align-items: center; }
.interlude-film { position: absolute; inset: 0; z-index: -2; }
.interlude-film img, .interlude-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; transform: scale(calc(1.22 - var(--sp) * .22)); }
.interlude-film video { opacity: 0; transition: opacity .6s linear; }
.interlude[data-frame='video'] .interlude-film video { opacity: 1; }
.interlude-film::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--cinema-bg) 0, rgba(13, 12, 19, 0) 18%, rgba(13, 12, 19, 0) 78%, var(--cinema-bg) 100%), linear-gradient(90deg, rgba(9, 8, 14, .86) 0, rgba(9, 8, 14, .55) 34%, rgba(9, 8, 14, 0) 62%); }
.interlude-marquee {
  position: absolute; left: 0; top: 12svh; z-index: -1;
  display: flex; gap: .4em; white-space: nowrap;
  font: 800 clamp(4rem, 12vw, 12.5rem)/1 var(--f-display); letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px rgba(241, 234, 255, .26);
  transform: translateX(calc(10% - var(--sp) * 60%));
  pointer-events: none;
}
.interlude-copy { width: min(100%, var(--cinema-width)); margin-inline: auto; padding: 18svh var(--cinema-gutter) 0; }
.interlude-copy h2 { max-width: 13ch; margin: 0 0 22px; font: 800 clamp(2.6rem, 6vw, 6.2rem)/.92 var(--f-display); letter-spacing: -.05em; }
.interlude-copy > p:not(.cinema-kicker) { max-width: 50ch; margin: 0 0 26px; color: #e2dcf0; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.6; }
.interlude-copy .cinema-kicker { color: var(--cinema-lime); }
.js-motion .interlude-copy { opacity: clamp(0, calc((var(--sp) - .18) * 6), 1); transform: translateY(calc(clamp(0, calc(.34 - var(--sp)), .34) * 120px)); }
.js-motion .interlude-copy [data-words] .sw-i { transform: translateY(calc(clamp(0, calc((.42 - var(--sp)) * 6 + var(--i) * .12), 1) * 112%)); transition: none; }
.interlude-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--cinema-muted); font: 500 .72rem/1.3 var(--f-mono); }
.film-control { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--glass-line); border-radius: 999px; background: rgba(23, 19, 30, .55); color: var(--cinema-text); font: 500 .75rem/1 var(--f-mono); cursor: pointer; }
.film-control[hidden] { display: none; }
.film-control:hover { color: var(--cinema-lime); }

/* ---------- Pokaz (Scrolltide jako inspiracja) ---------- */
.tour { position: relative; color: var(--cinema-text); }
/* Zanurzenie (Grok T1): przewijanie prowadzi kamerę pod linię wody, potem pojawia się nagłówek pokazu */
.dive { position: relative; height: 230svh; --dp: 0; }
.dive-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; align-items: end; isolation: isolate; }
.dive-poster, .dive-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.dive-poster { object-fit: cover; opacity: 0; }
.dive[data-frames='true'] .dive-poster { display: none; }
html[data-motion='reduced'] .dive .dive-poster, html[data-motion='reduced'] .dive[data-frames='true'] .dive-poster { opacity: 1; display: block; }
html[data-motion='reduced'] .dive-canvas { display: none; }
@media (prefers-reduced-motion: reduce) { .dive-poster { opacity: 1; display: block !important; } .dive-canvas { display: none; } .dive { height: 120svh; } }
.dive-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--cinema-bg) 0, rgba(13, 12, 19, 0) 16%, rgba(13, 12, 19, calc(var(--dp) * .55)) 70%, var(--cinema-bg) 100%); }
.tour-intro { width: min(100%, var(--cinema-width)); margin: 0 auto; padding: 0 var(--cinema-gutter) clamp(60px, 12vh, 130px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 60px; align-items: end; }
.js-motion .dive-copy { opacity: clamp(0, calc((var(--dp) - .55) * 4), 1); transform: translateY(calc(clamp(0, calc(.8 - var(--dp)), .3) * 140px)); }
.js-motion .dive-copy [data-words] .sw-i { transform: translateY(calc(clamp(0, calc((.78 - var(--dp)) * 5 + var(--i) * .1), 1) * 112%)); transition: none; }
.tour-intro h2 { margin: 0; font: 800 clamp(3rem, 7vw, 7.4rem)/.9 var(--f-display); letter-spacing: -.055em; }
.tour-intro h2 > span, .tour-intro h2 > em { display: block; }
.tour-intro h2 em { font-style: normal; color: var(--cinema-lime); }
.tour-intro p { margin: 0 0 10px; max-width: 46ch; color: var(--cinema-muted); font-size: 1.05rem; line-height: 1.6; }
.tour-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.38fr);
  grid-template-rows: auto auto;
  column-gap: clamp(24px, 4vw, 70px);
  width: min(100%, var(--cinema-width));
  margin-inline: auto;
  padding-inline: var(--cinema-gutter);
  --tour-progress: 0;
}
.tour-backdrop { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 0; height: 100svh; margin-inline: calc(var(--cinema-gutter) * -1); z-index: -1; overflow: hidden; pointer-events: none; }
@supports (width: 100vw) { .tour-backdrop { margin-inline: calc((100vw - min(100vw, var(--cinema-width))) / -2 - var(--cinema-gutter)); } }
.tour-backdrop > div { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s linear; background-size: cover; background-position: center; }
.tour-backdrop > div[data-on='true'] { opacity: 1; }
.tour-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--cinema-bg) 0, transparent 18%, transparent 82%, var(--cinema-bg)), radial-gradient(ellipse at 25% 50%, rgba(13, 12, 19, .8), transparent 60%); }
[data-bg='przed'] { background: radial-gradient(ellipse at 70% 55%, rgba(164, 144, 211, .26), transparent 55%), radial-gradient(ellipse at 85% 80%, rgba(255, 155, 181, .14), transparent 50%); }
[data-bg='wykresy'] { background: radial-gradient(ellipse at 65% 45%, rgba(155, 184, 255, .22), transparent 55%), radial-gradient(ellipse at 90% 20%, rgba(164, 144, 211, .16), transparent 45%); }
[data-bg='flow'] { background: radial-gradient(ellipse at 60% 50%, rgba(220, 255, 114, .10), transparent 45%), radial-gradient(ellipse at 80% 30%, rgba(255, 155, 181, .16), transparent 50%), radial-gradient(ellipse at 80% 75%, rgba(155, 184, 255, .18), transparent 50%); }
[data-bg='powtorka'] { background: radial-gradient(ellipse at 72% 40%, rgba(155, 184, 255, .2), transparent 55%), radial-gradient(ellipse at 50% 80%, rgba(220, 255, 114, .07), transparent 45%); }
[data-bg='rynki'] { background: radial-gradient(ellipse at 60% 50%, rgba(242, 211, 145, .14), transparent 50%), radial-gradient(ellipse at 85% 40%, rgba(164, 144, 211, .2), transparent 50%); }
[data-bg='po'] { background: radial-gradient(ellipse at 70% 55%, rgba(164, 144, 211, .24), transparent 55%), radial-gradient(ellipse at 60% 30%, rgba(220, 255, 114, .07), transparent 40%); }
[data-bg='zrodla'] { background: radial-gradient(ellipse at 65% 50%, rgba(155, 184, 255, .2), transparent 55%), radial-gradient(ellipse at 85% 70%, rgba(242, 211, 145, .1), transparent 45%); }
[data-bg='stanowisko'] { background: radial-gradient(ellipse at 70% 50%, rgba(164, 144, 211, .24), transparent 55%), radial-gradient(ellipse at 50% 85%, rgba(220, 255, 114, .08), transparent 45%); }
.tour-backdrop > div[data-bg='przed'] { background: linear-gradient(90deg, rgba(13, 12, 19, .92) 0, rgba(13, 12, 19, .55) 45%, rgba(13, 12, 19, .35)), image-set(url('media/B1.avif') type('image/avif'), url('media/B1.webp') type('image/webp')) center / cover; }
.tour-backdrop > div[data-bg='flow'] { background: linear-gradient(90deg, rgba(13, 12, 19, .92) 0, rgba(13, 12, 19, .5) 45%, rgba(13, 12, 19, .3)), image-set(url('media/B2.avif') type('image/avif'), url('media/B2.webp') type('image/webp')) center / cover; }
.tour-backdrop > div[data-bg='powtorka'] { background: linear-gradient(90deg, rgba(13, 12, 19, .92) 0, rgba(13, 12, 19, .55) 45%, rgba(13, 12, 19, .35)), image-set(url('media/B3.avif') type('image/avif'), url('media/B3.webp') type('image/webp')) center / cover; }
.tour-backdrop > div[data-bg='stanowisko'] { background: linear-gradient(90deg, rgba(13, 12, 19, .92) 0, rgba(13, 12, 19, .55) 45%, rgba(13, 12, 19, .35)), image-set(url('media/B4.avif') type('image/avif'), url('media/B4.webp') type('image/webp')) center / cover; }
.tour-backdrop > div[data-bg] { filter: saturate(.85); }
@media (max-width: 860px) {
  .tour-backdrop > div[data-bg='przed'] { background-image: linear-gradient(rgba(13, 12, 19, .6), rgba(13, 12, 19, .6)), url('media/B1-1200.avif'); }
  .tour-backdrop > div[data-bg='flow'] { background-image: linear-gradient(rgba(13, 12, 19, .6), rgba(13, 12, 19, .6)), url('media/B2-1200.avif'); }
  .tour-backdrop > div[data-bg='powtorka'] { background-image: linear-gradient(rgba(13, 12, 19, .6), rgba(13, 12, 19, .6)), url('media/B3-1200.avif'); }
  .tour-backdrop > div[data-bg='stanowisko'] { background-image: linear-gradient(rgba(13, 12, 19, .6), rgba(13, 12, 19, .6)), url('media/B4-1200.avif'); }
}

.tour-stage {
  grid-column: 2; grid-row: 1;
  position: sticky;
  top: max(calc(var(--dock-h) + 28px), calc(50svh - min(calc(100svh - var(--dock-h) - 150px), 46vw) / 2 - 20px));
  align-self: start;
  height: min(calc(100svh - var(--dock-h) - 150px), 46vw);
  min-height: 400px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, #1d1630, #0f0b19);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 40px 120px -50px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .3);
  isolation: isolate;
}
.tour-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tour-prev[hidden] { display: none; }
.tour-wipe { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--cinema-lime); box-shadow: 0 0 22px var(--cinema-lime); transform: scaleX(0); opacity: 0; pointer-events: none; z-index: 2; }
.js-motion .tour-stage.wiping .tour-wipe { animation: tw-line .72s var(--ease-out) both; }
@keyframes tw-line { 0% { transform: scaleX(0); opacity: 1; } 50% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.tour-stage-label { position: absolute; left: 26px; top: 22px; display: grid; gap: 6px; z-index: 3; overflow: hidden; }
.tour-stage-code { color: var(--cinema-lime); font: 600 .68rem/1.2 var(--f-mono); letter-spacing: .1em; display: block; }
.tour-stage-name { font: 700 clamp(.95rem, 1.6vw, 1.35rem)/1.15 var(--f-display); letter-spacing: -.01em; display: block; }
.tour-count { position: absolute; right: 24px; top: 20px; display: flex; align-items: baseline; gap: 6px; z-index: 3; font: 500 .75rem/1 var(--f-mono); color: var(--cinema-muted); overflow: hidden; }
.tour-count b { display: inline-block; font: 700 1.9rem/1 var(--f-mono); color: var(--cinema-text); }
.tour-stage-meta { position: absolute; right: 20px; bottom: 18px; display: flex; align-items: center; gap: 10px; z-index: 3; color: var(--cinema-muted); font: 500 .68rem/1.2 var(--f-mono); }
.tour-stage-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(241, 234, 255, .06); z-index: 3; }
.tour-stage-progress::after { content: ''; position: absolute; inset: 0; transform: scaleX(var(--tour-progress)); transform-origin: left; background: var(--cinema-lime); box-shadow: 0 0 12px var(--cinema-lime); }

.tour-chapters { grid-column: 1; grid-row: 1; }
.tour-chapter { min-height: 112svh; display: flex; align-items: flex-start; scroll-margin-top: 22vh; }
.tour-chapter:first-child { padding-top: 6svh; }
.tour-chapter:last-child { min-height: 80svh; }
.tour-card { position: sticky; top: 27svh; max-width: 460px; transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.js-motion .tour-chapter[data-active='false'] .tour-card { opacity: .1; transform: translateY(-14px); }
.tour-card .cinema-kicker { color: var(--cinema-lime); margin-bottom: 20px; }
.tour-card .cinema-kicker > span { color: var(--cinema-lime); }
.tour-card h3 { margin: 0 0 20px; font: 800 clamp(2.4rem, 4.6vw, 4.6rem)/.94 var(--f-display); letter-spacing: -.05em; }
.tour-card p:not(.cinema-kicker) { margin: 0 0 28px; color: #d9d2ea; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; max-width: 40ch; }
.tour-link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(241, 234, 255, .05); color: var(--cinema-text); font: 700 .95rem/1 var(--f-ui); text-decoration: none; transition: background-color .2s linear, color .2s linear, border-color .2s linear; }
.tour-link:hover { background: var(--cinema-lime); color: #171c09; border-color: var(--cinema-lime); }
.tour-link span:last-child { transition: transform .3s var(--ease-out); }
.tour-link:hover span:last-child { transform: translate(2px, -2px); }

.tour-tabs { grid-column: 1 / -1; grid-row: 2; position: sticky; bottom: 16px; display: flex; justify-content: center; z-index: 5; margin-top: 30px; pointer-events: none; }
.tour-tabs-in { pointer-events: auto; display: flex; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tour-tabs-in::-webkit-scrollbar { display: none; }
.tour-tabs-in a { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; color: #cdc6df; text-decoration: none; font: 600 .82rem/1 var(--f-ui); transition: color .2s linear; }
.tour-tabs-in a span { color: var(--cinema-muted); font: 500 .66rem/1 var(--f-mono); }
.tour-tabs-in a[aria-current] { color: #fff; }
.tour-tabs-in a[aria-current] span { color: var(--cinema-lime); }

/* ---------- Bento: jeden terminal ---------- */
.portal .bento { color: var(--cinema-text); background: var(--cinema-bg); border-top: 1px solid rgba(241, 234, 255, .06); }
.bento-head { margin-bottom: clamp(28px, 5vh, 56px); }
.bento-head .cinema-kicker { color: var(--cinema-lime); }
.bento-head h2 { max-width: 18ch; color: var(--cinema-text); }
/* Jeden krój nagłówków w całym portalu (szeroki Bricolage), także w sekcjach na żywo */
.portal .h2 { font: 800 clamp(2.4rem, 4.6vw, 4.6rem)/.95 var(--f-display); font-stretch: 100%; letter-spacing: -.05em; }
.portal .sec .eyebrow .no { color: var(--cinema-lime); }
.bento-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bento-card {
  --sx: 50%; --sy: 50%;
  position: relative; isolation: isolate;
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px;
  min-height: 300px; padding: 24px;
  border-radius: 24px;
  background: linear-gradient(170deg, #1a1429, #110d1b);
  border: 1px solid rgba(241, 234, 255, .09);
  color: var(--cinema-text); text-decoration: none;
  overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .3s linear, opacity .9s var(--ease-out);
}
.bento-card.b-wide { grid-column: span 2; }
.bento-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--sx) var(--sy), rgba(220, 255, 114, .10), transparent 45%); opacity: 0; transition: opacity .3s linear; }
.bento-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(260px circle at var(--sx) var(--sy), rgba(220, 255, 114, .75), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s linear; pointer-events: none; }
.bento-card:hover::before, .bento-card:hover::after, .bento-card:focus-visible::after { opacity: 1; }
.bento-card:hover, .js-motion .bento-card[data-in='true']:hover { transform: translateY(-4px); }
.bento-card h3 { margin: 6px 0 0; font: 750 clamp(1.25rem, 1.8vw, 1.6rem)/1.1 var(--f-display); letter-spacing: -.02em; }
.bento-card p { margin: 0; color: #cfc8e1; line-height: 1.55; font-size: .95rem; max-width: 46ch; }
.bento-open { display: inline-flex; gap: 8px; align-items: center; color: var(--cinema-lime); font: 600 .78rem/1 var(--f-mono); letter-spacing: .04em; }
.bento-glyph { height: 96px; display: flex; align-items: center; }
.bento-glyph svg { width: 100%; max-width: 340px; height: 90px; overflow: visible; }
.bento-glyph .g-water { stroke: var(--cinema-lime); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(220, 255, 114, .6)); }
.g-bubbles circle { fill: rgba(155, 184, 255, .2); stroke: #9bb8ff; stroke-width: 1.2; }
.g-bubbles circle:nth-child(2n) { fill: rgba(255, 155, 181, .18); stroke: #ff9bb5; }
.g-bars rect { fill: rgba(164, 144, 211, .55); }
.g-bars rect:nth-child(n+11) { fill: rgba(255, 155, 181, .5); }
.g-axis { stroke: rgba(241, 234, 255, .35); stroke-width: 1.5; }
.g-snap { fill: rgba(164, 144, 211, .18); stroke: #a490d3; stroke-width: 1.2; }
.g-trade { fill: rgba(220, 255, 114, .25); stroke: var(--cinema-lime); stroke-width: 1.5; }
.g-cursor { stroke: var(--cinema-lime); stroke-width: 1.5; }
.g-chips rect { fill: rgba(28, 21, 48, .9); stroke-width: 1.2; }
.g-chips rect:nth-child(1) { stroke: var(--cinema-lime); } .g-chips rect:nth-child(2) { stroke: #a490d3; } .g-chips rect:nth-child(3) { stroke: #e9b04f; stroke-dasharray: 4 3; }
.g-chip-t text { font: 700 11px var(--f-mono); text-anchor: middle; }
.g-chip-t text:nth-child(1) { fill: var(--cinema-lime); } .g-chip-t text:nth-child(2) { fill: #a490d3; } .g-chip-t text:nth-child(3) { fill: #e9b04f; }
.g-panels rect { fill: rgba(164, 144, 211, .12); stroke: rgba(164, 144, 211, .6); stroke-width: 1.2; }
.g-move { fill: rgba(220, 255, 114, .16); stroke: var(--cinema-lime); stroke-width: 1.5; }
.g-phone, .g-desk { fill: rgba(164, 144, 211, .12); stroke: rgba(164, 144, 211, .7); stroke-width: 1.2; }
.js-motion .bento-card .g-bubbles circle { animation: g-float 3.6s var(--ease-io) infinite alternate; animation-delay: calc(var(--k, 0) * -0.6s); }
.g-bubbles circle:nth-child(2) { --k: 1; } .g-bubbles circle:nth-child(3) { --k: 2; } .g-bubbles circle:nth-child(4) { --k: 3; } .g-bubbles circle:nth-child(5) { --k: 4; } .g-bubbles circle:nth-child(6) { --k: 5; }
@keyframes g-float { to { transform: translateX(-14px); } }
.js-motion .bento-card .g-bars rect { transform-box: fill-box; transform-origin: bottom; animation: g-grow 2.8s var(--ease-io) infinite alternate; }
.g-bars rect:nth-child(3n) { animation-delay: -.7s !important; } .g-bars rect:nth-child(3n+1) { animation-delay: -1.4s !important; }
@keyframes g-grow { from { transform: scaleY(.72); } }
.js-motion .bento-card .g-cursor { animation: g-scrub 5s var(--ease-io) infinite alternate; }
@keyframes g-scrub { from { transform: translateX(16px); } to { transform: translateX(226px); } }
.js-motion .bento-card .g-move { animation: g-move 4.4s var(--ease-io) infinite; }
@keyframes g-move { 0%, 15% { transform: none; } 55%, 85% { transform: translate(176px, 0); } 100% { transform: none; } }
.js-motion .bento-card:hover .g-water { animation: g-pulse 1.2s var(--ease-out); }
@keyframes g-pulse { 50% { stroke-width: 4; } }

/* ---------- Finał: horyzont ---------- */
.final2 { position: relative; isolation: isolate; overflow: clip; min-height: 88svh; display: grid; place-items: center; text-align: center; color: var(--cinema-text); background: radial-gradient(ellipse at 50% 120%, #2a2048 0, #120d1d 55%, var(--cinema-bg) 80%); }
.final2-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.final2-sky video, .final2-sky img { position: absolute; left: 0; top: -25%; width: 100%; height: 150%; object-fit: cover; opacity: .85; transform: translateY(calc(var(--hz, 50%) - 33.333%)); }
.final2-sky video { opacity: 0; transition: opacity .6s linear; }
.final2[data-frame='video'] .final2-sky video { opacity: .85; }
.final2-sky::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(13, 12, 19, .78), rgba(13, 12, 19, .35) 60%, rgba(13, 12, 19, .2)), linear-gradient(180deg, var(--cinema-bg), transparent 18%, transparent 85%, var(--cinema-bg)); }
.final2-film { position: absolute; right: var(--cinema-gutter); bottom: 22px; }
.final2-h > span { display: block; }
.final2-line { position: absolute; left: 0; right: 0; top: var(--hz, 50%); z-index: 1; height: 2px; background: var(--cinema-lime); box-shadow: 0 0 30px var(--cinema-lime), 0 0 90px rgba(220, 255, 114, .5); transform-origin: center; }
.final2-glow { position: absolute; left: 10%; right: 10%; top: var(--hz, 50%); z-index: 1; height: 40%; background: radial-gradient(ellipse at 50% 0, rgba(164, 144, 211, .28), transparent 65%); }
.js-motion .final2 .final2-line { transform: scaleX(0); transition: transform 1.6s cubic-bezier(.83, 0, .17, 1) .2s; }
.js-motion .final2[data-in='true'] .final2-line { transform: scaleX(1); }
.final2-in { position: relative; padding: 0 var(--cinema-gutter); max-width: 1100px; }
.final2-in .cinema-kicker { justify-content: center; color: var(--cinema-lime); }
.final2-h { margin: 0 0 24px; font: 800 clamp(3rem, 8.4vw, 8.6rem)/.9 var(--f-display); letter-spacing: -.055em; }
.final2 .lead { margin: 0 auto 36px; max-width: 52ch; color: #d9d2ea; }
.final2-cta { min-height: 60px; padding: 0 30px; font-size: 1.05rem; }

/* ---------- Przejścia między stronami (od linii wody) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .38s cubic-bezier(.64, 0, .78, 0) both; }
::view-transition-new(root) { animation: vt-in .7s cubic-bezier(.83, 0, .17, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { clip-path: inset(49.6% 0 49.6% 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Telefon i tablet ---------- */
@media (max-width: 1060px) {
  .dock-nav a { padding: 0 12px; }
  .pmenu-cols { grid-template-columns: 1fr 1fr; }
  .pmenu-prefs { grid-column: 1 / -1; }
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-card.b-wide { grid-column: span 2; }
  .bento-card:last-child { grid-column: span 2; }
}
@media (max-width: 860px) {
  .dock-nav { display: none; }
  .dock-nav + .dock-right { margin-inline-start: auto; }
  .dock[data-compact='true'] .dock-in { width: calc(100% - 24px); }
  .tour-intro { grid-template-columns: 1fr; }
  .tour-story { grid-template-columns: minmax(0, 1fr); }
  .tour-stage { grid-column: 1; grid-row: 1; top: calc(var(--dock-h) + 20px); height: 40svh; min-height: 260px; border-radius: 22px; z-index: 2; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px rgba(0, 0, 0, .3); }
  .tour-chapters { grid-column: 1; grid-row: 1; padding-top: calc(40svh + 40px); }
  .tour-chapter, .tour-chapter:first-child, .tour-chapter:last-child { min-height: 92svh; padding: 0; }
  .tour-card { top: calc(var(--dock-h) + 40svh + 34px); padding: 20px; border-radius: 22px; background: var(--glass-strong); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
  .js-motion .tour-chapter[data-active='false'] .tour-card { opacity: .35; transform: none; }
  .tour-card h3 { font-size: clamp(2rem, 8vw, 3rem); }
  .tour-tabs { bottom: 10px; }
  .tour-tabs-in { max-width: calc(100vw - 24px); }
}
@media (max-width: 640px) {
  .portal { --dock-h: 56px; }
  .dock { inset-block-start: 8px; }
  .dock-in { padding: 0 6px 0 14px; gap: 6px; }
  .dock .logo { font-size: 0; gap: 0; }
  .dock-cta { padding: 0 14px; font-size: 13px; }
  .dock-menu { padding: 0 12px; }
  .dock-menu-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pmenu-in { border-radius: 22px; }
  .pmenu-cols { grid-template-columns: 1fr; }
  .pmenu-status { display: none; }
  .pmenu-head h2 { margin-inline-end: auto; }
  .hero2-in { padding-top: calc(var(--dock-h) + 56px); }
  .hero2 h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero2-live { width: 100%; }
  .hl { flex: 1; padding: 8px 10px; }
  .hl dd > b { font-size: 1.05rem; min-width: 0; }
  .hero2-ctrl { margin-inline-start: 0; }
  .hero2-scroll { display: none; }
  .interlude { height: 180svh; }
  .interlude-marquee { top: 10svh; }
  .interlude-film::after { background: linear-gradient(180deg, var(--cinema-bg) 0, rgba(13, 12, 19, .2) 20%, rgba(13, 12, 19, .78) 62%, var(--cinema-bg) 100%); }
  .interlude-copy { align-self: end; padding-bottom: 10svh; }
  .bento-grid { grid-template-columns: minmax(0, 1fr); }
  .bento-card.b-wide, .bento-card:last-child { grid-column: auto; }
  .bento-card { min-height: 0; }
  .tour-stage-label { left: 16px; top: 14px; }
  .tour-count { right: 14px; top: 12px; }
  .tour-count b { font-size: 1.4rem; }
  .tour-stage-meta { right: 12px; bottom: 10px; }
  .tour-stage-meta > span:last-child { display: none; }
}

/* ---------- Ograniczony ruch: wszystko nieruchome, przejścia stron wyłączone ---------- */
html[data-motion='reduced']::view-transition-old(root), html[data-motion='reduced']::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .dock, .dock-in, .fluid-ind, .tour-card, .bento-card, .pmenu-list a { transition: none !important; }
  .interlude-film img, .interlude-film video { transform: none; }
  .interlude-marquee { transform: none; }
}
html[data-motion='reduced'] .dock, html[data-motion='reduced'] .dock-in, html[data-motion='reduced'] .fluid-ind, html[data-motion='reduced'] .tour-card { transition: none !important; }
html[data-motion='reduced'] .interlude-film img, html[data-motion='reduced'] .interlude-marquee { transform: none; }

/* ---------- Scena przechodzi w narzędzie ---------- */
.zoom-veil { position: fixed; z-index: 200; overflow: hidden; background: linear-gradient(160deg, #1d1630, #0f0b19); box-shadow: 0 40px 120px -40px #000; pointer-events: none; }
.zoom-veil canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s linear .25s, transform .62s cubic-bezier(.83, 0, .17, 1); }
.zoom-veil.zooming canvas { opacity: 0; transform: scale(1.18); }
.zoom-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--cinema-lime, #dcff72); box-shadow: 0 0 24px var(--cinema-lime, #dcff72); transform: scaleX(0); animation: zoom-line .62s cubic-bezier(.22, 1, .36, 1) .12s forwards; }
@keyframes zoom-line { 60% { transform: scaleX(1); opacity: 1; } to { transform: scaleX(1); opacity: .2; } }

/* ---------- Zmiana motywu: koło od przełącznika ---------- */
html.vt-motyw::view-transition-old(root) { animation: none; }
html.vt-motyw::view-transition-new(root) { animation: vt-kolo .75s cubic-bezier(.83, 0, .17, 1) both; }
@keyframes vt-kolo { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* ================= Opal (jasny motyw) — ten sam co w aplikacji ================= */
/* Treść strony (nawigacja, nagłówek z linią wody, terminal, sekcje na żywo, menu) przechodzi na tokeny Opalu aplikacji:
   papier, ciemny atrament, oliwkowy akcent, przyciski w kolorze lume. Filmy i zdjęcia nie mają jasnej wersji, więc
   przerywnik, pokaz i finał zostają ciemne jako zaokrąglone kadry na papierze (jak film w Stanowisku). */
html[data-theme='paper'] .cinema {
  --cinema-bg: var(--page);
  --cinema-text: var(--ink-1);
  --cinema-muted: var(--ink-2);
  --cinema-line: var(--line);
  --cinema-lime: var(--accent);
}
html[data-theme='paper'] .portal {
  --glass: color-mix(in oklab, var(--s2) 74%, transparent);
  --glass-strong: color-mix(in oklab, var(--s2) 92%, transparent);
  --glass-line: color-mix(in oklab, var(--ink-1) 12%, transparent);
  --glass-hi: rgba(255, 255, 255, .85);
  --violet: #5b4a8f;
  --pale: var(--ink-1);
  --opal-fill: var(--lume);
  --opal-tint: color-mix(in oklab, var(--ink-1) 6%, transparent);
  --opal-shadow: 0 18px 44px -30px rgba(20, 18, 27, .38);
}
html[data-theme='paper'] :is(.glass, .dock-in, .tour-tabs-in, .hero2-live, .pmenu-in, .gseg) { box-shadow: inset 0 1px 0 var(--glass-hi), var(--opal-shadow); }
html[data-theme='paper'] .fluid-ind { background: color-mix(in oklab, var(--ink-1) 9%, transparent); box-shadow: inset 0 0 0 1px var(--glass-line); }
html[data-theme='paper'] .fluid-ind::after { box-shadow: none; }

/* Wypełnienia akcentem: lume z ciemnym napisem, jak główne przyciski aplikacji */
html[data-theme='paper'] :is(.dock-cta, .cinema-button-main) { background: var(--opal-fill); color: var(--on-lume); }
html[data-theme='paper'] :is(.dock-cta, .cinema-button-main):hover { background: color-mix(in oklab, var(--opal-fill) 78%, white); box-shadow: 0 0 0 6px color-mix(in oklab, var(--opal-fill) 30%, transparent); }
html[data-theme='paper'] :is(.dock-progress, .pmenu[open] .pmenu-in::before) { box-shadow: none; }

/* Nawigacja i menu */
html[data-theme='paper'] .dock-nav a { color: var(--ink-2); }
html[data-theme='paper'] .dock-nav a:hover, html[data-theme='paper'] .dock-nav a[aria-current] { color: var(--ink-1); }
html[data-theme='paper'] :is(.dock-menu, .gswitch) { background: var(--opal-tint); }
html[data-theme='paper'] .dock-menu:hover { background: color-mix(in oklab, var(--ink-1) 11%, transparent); }
html[data-theme='paper'] .pmenu::backdrop { background: rgba(20, 18, 27, .28); }
html[data-theme='paper'] .pmenu-in { background: color-mix(in oklab, var(--s1) 94%, transparent); }
html[data-theme='paper'] .prow > span { color: var(--ink-1); }
html[data-theme='paper'] .gseg button { color: var(--ink-2); }
html[data-theme='paper'] .gseg button[aria-pressed='true'] { color: var(--ink-1); }
html[data-theme='paper'] .gswitch > i { background: var(--line-strong); }
html[data-theme='paper'] .gswitch > i::after { background: var(--s2); box-shadow: 0 1px 2px rgba(20, 18, 27, .3); }
html[data-theme='paper'] .gswitch[aria-pressed='true'] > i { background: var(--opal-fill); }
html[data-theme='paper'] .gswitch[aria-pressed='true'] > i::after { background: var(--on-lume); }
html[data-theme='paper'] .pmenu-status i { background: var(--warn); }
html[data-theme='paper'] .pmenu-status:has([data-state='live']) i { box-shadow: none; }

/* Nagłówek: linia wody w jasnym szkle Opalu (ten sam shader, wariant papierowy) */
html[data-theme='paper'] .cinema-hero { background: var(--page); }
html[data-theme='paper'] .hero2-media { background: radial-gradient(ellipse at 70% 50%, #dcd5ee 0, #ebe8f3 50%, var(--page) 80%); }
html[data-theme='paper'] .hero2-poster { display: none; }
html[data-theme='paper'] .hl-sub, html[data-theme='paper'] .hero2-note { color: var(--ink-2); }
html[data-theme='paper'] .hero2-note i { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent); }
html[data-theme='paper'] :is(.cinema-button-alt, .hero2-ctrl .film-control, .hero2-sound) { background: color-mix(in oklab, var(--s2) 70%, transparent); border-color: var(--line-strong); color: var(--ink-1); }
html[data-theme='paper'] .cinema-button-alt:hover { background: var(--s2); }
html[data-theme='paper'] .hero2-scroll i { background: color-mix(in oklab, var(--ink-1) 22%, transparent); }

/* Terminal (bento): karty jak w Dziś — biała powierzchnia, cienka linia, miękki cień */
html[data-theme='paper'] .portal .bento { border-top-color: var(--line); }
html[data-theme='paper'] .bento-card { background: linear-gradient(170deg, var(--s2), var(--s1)); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), var(--opal-shadow); }
html[data-theme='paper'] .bento-card:hover { border-color: var(--line-strong); }
html[data-theme='paper'] .bento-card p { color: var(--ink-2); }
html[data-theme='paper'] .bento-card::before { background: radial-gradient(420px circle at var(--sx) var(--sy), color-mix(in oklab, var(--lume) 22%, transparent), transparent 45%); }
html[data-theme='paper'] .bento-card::after { background: radial-gradient(260px circle at var(--sx) var(--sy), color-mix(in oklab, var(--accent) 70%, transparent), transparent 60%); }
html[data-theme='paper'] .bento-glyph .g-water { filter: none; }
html[data-theme='paper'] .g-bubbles circle { fill: color-mix(in oklab, var(--buy-ink) 14%, transparent); stroke: var(--buy-ink); }
html[data-theme='paper'] .g-bubbles circle:nth-child(2n) { fill: color-mix(in oklab, var(--sell-ink) 12%, transparent); stroke: var(--sell-ink); }
html[data-theme='paper'] .g-bars rect { fill: color-mix(in oklab, var(--violet) 55%, transparent); }
html[data-theme='paper'] .g-bars rect:nth-child(n+11) { fill: color-mix(in oklab, var(--sell-ink) 50%, transparent); }
html[data-theme='paper'] .g-axis { stroke: color-mix(in oklab, var(--ink-1) 35%, transparent); }
html[data-theme='paper'] .g-snap { fill: color-mix(in oklab, var(--violet) 12%, transparent); stroke: var(--violet); }
html[data-theme='paper'] :is(.g-trade, .g-move) { fill: color-mix(in oklab, var(--lume) 45%, transparent); }
html[data-theme='paper'] .g-chips rect { fill: var(--s2); }
html[data-theme='paper'] .g-chips rect:nth-child(2) { stroke: var(--violet); }
html[data-theme='paper'] .g-chips rect:nth-child(3) { stroke: var(--warn); }
html[data-theme='paper'] .g-chip-t text:nth-child(2) { fill: var(--violet); }
html[data-theme='paper'] .g-chip-t text:nth-child(3) { fill: var(--warn); }
html[data-theme='paper'] .g-panels rect, html[data-theme='paper'] :is(.g-phone, .g-desk) { fill: color-mix(in oklab, var(--violet) 8%, transparent); stroke: color-mix(in oklab, var(--violet) 60%, transparent); }

/* Kadry filmowe: ciemne wartości kina wracają lokalnie, a kadr ma zaokrąglone rogi i margines od krawędzi papieru */
html[data-theme='paper'] :is(.interlude, .tour, .final2) {
  --cinema-bg: #0d0c13;
  --cinema-text: #f6f3ff;
  --cinema-muted: #bcb7cc;
  --cinema-line: #383348;
  --cinema-lime: #deff71;
  --glass: color-mix(in oklab, #191229 64%, transparent);
  --glass-strong: color-mix(in oklab, #160f24 86%, transparent);
  --glass-line: rgba(241, 234, 255, .14);
  --glass-hi: rgba(255, 255, 255, .07);
  --violet: #a490d3;
  --pale: #f1eaff;
  --opal-fill: #deff71;
  --opal-tint: rgba(241, 234, 255, .05);
  --opal-shadow: 0 18px 50px -24px rgba(0, 0, 0, .75);
  --page: #0b0a12; --s1: #121019; --s2: #19162a; --s3: #231f38; --line: #2b2640; --line-strong: #403a5c;
  --ink-1: #f0edf7; --ink-2: #b9b3cc; --ink-3: #9a94b0;
  --lume: #cfea5b; --accent: #cfea5b; --on-lume: #171c09; --notch: #cfea5b; --water: #cfea5b;
  --buy-ink: #82bcfc; --sell-ink: #f68771; --warn: #fab219; --sim: #e9b04f;
  color-scheme: dark;
  background-color: #0d0c13;
  clip-path: inset(0 var(--opal-frame, 12px) round var(--opal-round, 28px));
}
html[data-theme='paper'] .final2 { clip-path: inset(0 var(--opal-frame, 12px) var(--opal-frame, 12px) round var(--opal-round, 28px)); }
html[data-theme='paper'] .portal { --opal-frame: clamp(8px, 1vw, 16px); }
html[data-theme='paper'] :is(.interlude, .tour) + * { margin-top: var(--opal-frame); }
@media (max-width: 640px) { html[data-theme='paper'] .portal { --opal-frame: 6px; --opal-round: 20px; } }
