/* ==========================================================================
   MC — Portfolio: drugi rdzeń DNA + projekty na szklanych taflach
   Warstwy: canvas 3D (fixed) · panele projektów (rzutowane w 3D) · intro · modal
   ========================================================================== */

html { scroll-behavior: smooth; }

body.pf {
  background:
    radial-gradient(90% 70% at 62% 40%, #07141d 0%, #04070c 52%, #020306 100%);
}

/* ── scena ───────────────────────────────────────────────────────────── */

#pf-gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-2.5vw, 0, 0) scale(1.015);
  transition: opacity 1.1s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* wejście „z lewej” — jakby kamera przejeżdżała w prawo do drugiego rdzenia */
body.pf-live #pf-gl { opacity: 1; transform: none; }

.pf-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 62% 46%, rgba(94, 242, 255, 0.10) 0%, rgba(94, 242, 255, 0) 70%),
    radial-gradient(30% 40% at 68% 62%, rgba(139, 92, 246, 0.10) 0%, rgba(139, 92, 246, 0) 72%),
    radial-gradient(22% 30% at 55% 30%, rgba(255, 62, 165, 0.05) 0%, rgba(255, 62, 165, 0) 70%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
body.pf-live .pf-aura { opacity: 1; }

/* ── intro ───────────────────────────────────────────────────────────── */

.pf-intro {
  position: relative;
  z-index: 4;
  width: min(1080px, 100% - var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) 0 26px;
  pointer-events: none;
}

body.pf-live .pf-intro {
  position: fixed;
  left: var(--gutter);
  top: calc(62px + 11vh);
  margin: 0;
  width: min(460px, 38vw);
  padding: 0;
  will-change: opacity, transform;
}

.pf-intro__eyebrow {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.pf-intro__eyebrow span {
  color: var(--cyan);
  border: 1px solid var(--line);
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.pf-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.4vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #ffffff 0%, #b8f4ff 38%, var(--cyan) 62%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.pf-live .pf-title { font-size: clamp(2.4rem, 4.4vw, 4.6rem); }

.pf-lead {
  margin: 0 0 22px;
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(12.5px, 1.05vw, 14px);
  line-height: 1.85;
}
.pf-lead strong { color: var(--ink); font-weight: 400; }

.pf-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}
.pf-hint svg { display: block; overflow: visible; }
.pf-hint .pf-hint__wheel {
  animation: pf-wheel 1.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: center;
}
.pf-hint .pf-hint__chev { animation: pf-chev 1.9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

@keyframes pf-wheel {
  0%, 12% { transform: translateY(0); opacity: 0; }
  26% { opacity: 1; }
  62% { transform: translateY(7px); opacity: 0.9; }
  78%, 100% { transform: translateY(9px); opacity: 0; }
}
@keyframes pf-chev {
  0%, 30% { transform: translateY(0); opacity: 0.25; }
  55% { transform: translateY(5px); opacity: 0.95; }
  80%, 100% { transform: translateY(0); opacity: 0.25; }
}

/* ── tafle projektów ─────────────────────────────────────────────────── */

.pf-stage {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 8px var(--gutter) 48px;
}

body.pf-live .pf-stage {
  position: fixed;
  inset: 0;
  display: block;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1500px;
  perspective-origin: 50% 50%;
}

.pf-pane {
  position: relative;
  display: block;
  width: min(560px, 100%);
  color: inherit;
  text-decoration: none;
  outline: none;
}

body.pf-modal-open { overflow: hidden; }

body.pf-live .pf-pane {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(232px, 24vw, 320px);
  margin: 0;
  transform-origin: 50% 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}

.pf-glass {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 3px;
  padding: 16px 18px 18px;
  background:
    linear-gradient(150deg, rgba(16, 36, 48, 0.66) 0%, rgba(8, 18, 26, 0.50) 46%, rgba(6, 12, 18, 0.62) 100%);
  border: 1px solid rgba(94, 242, 255, 0.26);
  box-shadow:
    0 0 0 1px rgba(94, 242, 255, 0.05),
    0 18px 60px rgba(2, 6, 10, 0.65),
    0 0 60px rgba(94, 242, 255, 0.10),
    inset 0 1px 0 rgba(210, 255, 255, 0.14);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  transition: border-color 0.35s ease, box-shadow 0.4s ease, background 0.35s ease;
}

/* szklana tafla: refleks, róg i przyciemniony zrzut pod logo */
.pf-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.03) 22%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(0deg, rgba(4, 10, 14, 0.55) 0%, rgba(4, 10, 14, 0.12) 60%, rgba(4, 10, 14, 0) 100%);
  z-index: 4;
}
.pf-glass::after {
  content: "";
  position: absolute;
  right: -40%;
  top: -60%;
  width: 80%;
  height: 220%;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.10) 45%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(14deg) translateX(-30%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.pf-pane:hover .pf-glass,
.pf-pane:focus-visible .pf-glass {
  border-color: rgba(94, 242, 255, 0.72);
  background: linear-gradient(150deg, rgba(18, 44, 58, 0.72) 0%, rgba(10, 24, 34, 0.55) 46%, rgba(8, 16, 24, 0.66) 100%);
  box-shadow:
    0 0 0 1px rgba(94, 242, 255, 0.22),
    0 26px 70px rgba(2, 6, 10, 0.7),
    0 0 90px rgba(94, 242, 255, 0.22),
    0 0 160px rgba(139, 92, 246, 0.12),
    inset 0 1px 0 rgba(220, 255, 255, 0.22);
}
.pf-pane:hover .pf-glass::after,
.pf-pane:focus-visible .pf-glass::after {
  opacity: 1;
  transform: rotate(14deg) translateX(40%);
}

.pf-pane:focus-visible .pf-glass { outline: 1px solid var(--cyan); outline-offset: 4px; }

.pf-shot {
  display: block;
  width: calc(100% + 36px);
  margin: -16px -18px 12px;
  aspect-ratio: 16 / 8.4;
  object-fit: cover;
  object-position: top center;
  opacity: 0.68;
  filter: saturate(1.15) contrast(1.05) brightness(0.9);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.55) 88%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.55) 88%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-pane:hover .pf-shot { opacity: 0.8; transform: scale(1.02); }

.pf-logo {
  position: relative;
  z-index: 6;
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 2px 22px rgba(2, 6, 10, 0.85);
}
.pf-logo span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.34em;
  color: var(--cyan);
  text-shadow: 0 1px 10px rgba(2, 6, 10, 0.95);
}

.pf-pane__meta {
  position: relative;
  z-index: 6;
  display: block;
  margin: 0 0 10px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  text-shadow: 0 1px 8px rgba(2, 6, 10, 0.9);
}

.pf-pane__cta {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(94, 242, 255, 0.18);
  width: 100%;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 1px 10px rgba(2, 6, 10, 0.9);
}
.pf-pane__cta i {
  font-style: normal;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-pane:hover .pf-pane__cta i,
.pf-pane:focus-visible .pf-pane__cta i { transform: translateX(5px); }

/* ── cyber-dymek projektu (hover, lewa strona tafli) ──────────────────── */

.pf-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 8;
  width: clamp(216px, 22vw, 292px);
  padding: 13px 15px 12px;
  background: linear-gradient(158deg, rgba(7, 19, 27, 0.96) 0%, rgba(4, 9, 13, 0.98) 100%);
  border: 1px solid rgba(94, 242, 255, 0.38);
  box-shadow:
    0 18px 60px rgba(2, 6, 10, 0.66),
    0 0 46px rgba(94, 242, 255, 0.10);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s;
  will-change: transform;
}
.pf-tip.is-on { opacity: 1; visibility: visible; }

/* ── callout: linia od dymku do lewej krawędzi tafli ─────────────────── */

#pf-tip-line {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 7;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s;
}
body.pf-tip-on #pf-tip-line { opacity: 1; visibility: visible; }

.pf-tip-line__base {
  fill: none;
  stroke: rgba(94, 242, 255, 0.32);
  stroke-width: 1;
}
.pf-tip-line__dash {
  fill: none;
  stroke: rgba(158, 250, 255, 0.9);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  filter: drop-shadow(0 0 4px rgba(94, 242, 255, 0.55));
  animation: pf-tip-flow 2.2s linear infinite;
}
.pf-tip-line__dot {
  fill: rgba(94, 242, 255, 0.92);
  stroke: rgba(4, 10, 14, 0.9);
  stroke-width: 1;
}
.pf-tip-line__node { fill: rgba(158, 250, 255, 0.92); }

@keyframes pf-tip-flow { to { stroke-dashoffset: -18; } }
@media (prefers-reduced-motion: reduce) {
  .pf-tip-line__dash { animation: none; }
}

/* gdy dymek jest otwarty, intro schodzi na drugi plan (czytelność) */
body.pf-tip-on .pf-intro > * { opacity: 0.18; }
.pf-intro > * { transition: opacity 0.28s ease; }

.pf-tip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(94, 242, 255, 0.06) 0%, rgba(94, 242, 255, 0) 44%),
    repeating-linear-gradient(0deg, rgba(94, 242, 255, 0.045) 0 1px, transparent 1px 4px);
  opacity: 0.4;
}

.pf-tip > * { position: relative; display: block; }

.pf-tip__tag {
  margin: 0 0 5px;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
}

.pf-tip__title {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.pf-tip__text {
  margin: 0 0 9px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--dim);
}

.pf-tip__hint {
  padding-top: 8px;
  border-top: 1px solid rgba(94, 242, 255, 0.14);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (hover: none), (max-width: 900px) {
  .pf-tip, #pf-tip-line { display: none; }
}

/* ── indeks po prawej ────────────────────────────────────────────────── */

.pf-index {
  position: fixed;
  right: clamp(14px, 2.2vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: grid;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease 0.3s;
}
body.pf-live .pf-index { opacity: 1; }
body.pf-live .pf-index.is-hidden { opacity: 0; pointer-events: none; }

.pf-index button {
  pointer-events: auto;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 0;
  background: none;
  color: rgba(232, 251, 255, 0.46);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease;
}
.pf-index button b {
  font-weight: 400;
  font-size: 9px;
  color: inherit;
  opacity: 0.7;
}
.pf-index button em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.18em;
  opacity: 0.75;
}
.pf-index button span {
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transition: width 0.3s ease, opacity 0.3s ease;
}
.pf-index button:hover,
.pf-index button:focus-visible { color: var(--ink); outline: none; }
.pf-index button[aria-current="true"] { color: var(--cyan); }

/* aktywny etap: zamiast kreski (przekreślenia) wirująca cząsteczka DNA po prawej */
.pf-index button[aria-current="true"] span { display: none; }
.pf-index button i.pf-index__dna {
  display: none;
  width: 16px;
  height: 20px;
  margin-left: 2px;
  color: currentColor;
  transform-origin: 50% 50%;
}
.pf-index button i.pf-index__dna svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pf-index button[aria-current="true"] i.pf-index__dna {
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(94, 242, 255, 0.55));
  animation: pf-dna-spin 4.4s linear infinite;
}
@keyframes pf-dna-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pf-index button[aria-current="true"] i.pf-index__dna { animation: none; }
}

/* ── stopka ──────────────────────────────────────────────────────────── */

.pf-spacer { height: 340vh; }

.pf-pager {
  position: relative;
  z-index: 7;
  background: rgba(3, 6, 10, 0.88);
  border-top: 1px solid var(--line-soft);
  padding: 16px clamp(22px, 3.6vw, 56px);
}

.pf-foot {
  position: relative;
  z-index: 7;
  margin-top: 0;
  background: linear-gradient(to top, rgba(3, 6, 10, 0.96) 0%, rgba(3, 6, 10, 0.72) 60%, rgba(3, 6, 10, 0) 100%);
  padding-top: 54px;
}
.pf-foot__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 0 clamp(22px, 3.6vw, 56px) 4px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pf-foot__list a { color: #ffffff; }
.pf-foot__list a:hover { color: var(--cyan); }
.pf-foot__list b { color: var(--cyan); font-weight: 400; margin-right: 8px; }

/* ── modal projektu ──────────────────────────────────────────────────── */

dialog.pf-modal {
  width: min(960px, 92vw);
  max-height: min(86vh, 720px);
  padding: 0;
  border: 1px solid rgba(94, 242, 255, 0.30);
  border-radius: 2px;
  background: #060c12;
  color: var(--ink);
  overflow: auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 90px rgba(94, 242, 255, 0.12);
}
dialog.pf-modal::backdrop {
  background: rgba(2, 4, 8, 0.78);
  backdrop-filter: blur(7px);
}
dialog.pf-modal[open] { animation: pf-modal-in 0.42s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes pf-modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.pf-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  appearance: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(94, 242, 255, 0.28);
  background: rgba(4, 10, 14, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.pf-modal__close:hover,
.pf-modal__close:focus-visible { border-color: var(--cyan); color: var(--cyan); outline: none; }

.pf-modal__body {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  min-height: 100%;
}

.pf-modal__shot {
  margin: 0;
  padding: 34px 26px 26px 34px;
  background:
    radial-gradient(80% 60% at 20% 0%, rgba(94, 242, 255, 0.10) 0%, rgba(94, 242, 255, 0) 70%),
    linear-gradient(160deg, #08111a 0%, #050a10 100%);
  border-right: 1px solid rgba(94, 242, 255, 0.12);
  display: flex;
  align-items: center;
}
.pf-modal__shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(94, 242, 255, 0.24);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 50px rgba(94, 242, 255, 0.10);
}

.pf-modal__copy {
  padding: 44px 36px 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pf-modal__eyebrow {
  margin: 0 0 10px;
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.pf-modal__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.pf-modal__text {
  margin: 0 0 20px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.8;
}

.pf-modal__params {
  margin: 0 0 22px;
  width: 100%;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(94, 242, 255, 0.12);
}
.pf-modal__params > div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(94, 242, 255, 0.08);
  font-size: 11px;
  line-height: 1.55;
}
.pf-modal__params dt {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 1px;
}
.pf-modal__params dd { margin: 0; color: var(--ink); }

.pf-modal__link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--cyan);
  background: rgba(94, 242, 255, 0.08);
  color: var(--ink);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.pf-modal__link:hover,
.pf-modal__link:focus-visible {
  background: var(--cyan);
  color: #04121a;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(94, 242, 255, 0.35);
}
.pf-modal__link i { font-style: normal; }

/* ── wyjście / wejście ───────────────────────────────────────────────── */

body.is-exit-right .pnav,
body.is-exit-right .pf-intro,
body.is-exit-right .pf-stage,
body.is-exit-right .pf-index,
body.is-exit-right #pf-gl,
body.is-exit-right .pf-aura,
body.is-exit-right .pf-foot {
  transform: translate3d(8vw, 0, 0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.42s ease;
}

.pnav,
.pf-index {
  animation: pf-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.pnav { animation-delay: 0.04s; }
.pf-index { animation-delay: 0.3s; }

.pf-intro { animation: pf-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s backwards; }
body.pf-live .pf-intro { animation: none; }

@keyframes pf-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes pf-in-left {
  from { opacity: 0; transform: translate3d(-26px, 0, 0); }
  to { opacity: 1; transform: none; }
}

/* ── bez WebGL: zwykła, czytelna lista ───────────────────────────────── */

body:not(.pf-live) .pf-pane { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
body:not(.pf-live) .pf-pane:nth-child(1) { animation-delay: 0.18s; }
body:not(.pf-live) .pf-pane:nth-child(2) { animation-delay: 0.26s; }
body:not(.pf-live) .pf-pane:nth-child(3) { animation-delay: 0.34s; }
body:not(.pf-live) .pf-pane { width: min(560px, 100%); }
body:not(.pf-live) .pf-glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 18, 26, 0.7); }
body:not(.pf-live) .pf-spacer { display: none; }
body:not(.pf-live) .pf-index { display: none; }
body:not(.pf-live) .pf-hint { display: none; }
body:not(.pf-live) .pf-pane { width: min(480px, 100%); }

/* ── responsywność ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  body.pf-live .pf-intro {
    left: var(--gutter);
    right: var(--gutter);
    top: calc(62px + 7vh);
    width: auto;
    max-width: 520px;
  }
  /* na wąskim ekranie rdzeń jest duży — delikatna zasłona pod tekstem intro */
  body.pf-live .pf-intro::before {
    content: "";
    position: absolute;
    inset: -22px -14px -10px -14px;
    background: radial-gradient(120% 92% at 18% 26%, rgba(3, 7, 11, 0.9) 0%, rgba(3, 7, 11, 0.72) 52%, rgba(3, 7, 11, 0) 100%);
    pointer-events: none;
  }
  body.pf-live .pf-intro > * { position: relative; }
  body.pf-live .pf-title { font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .pf-lead { font-size: 12px; max-width: 40ch; }

  .pf-index {
    top: auto;
    bottom: 18px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    grid-auto-flow: column;
    gap: 2px;
  }
  .pf-index button { padding: 6px; }
  .pf-index button span { display: none; }
  .pf-index button em { display: none; }

  .pf-modal__body { grid-template-columns: 1fr; }
  .pf-modal__shot { padding: 26px 22px 0; border-right: 0; border-bottom: 1px solid rgba(94, 242, 255, 0.12); }
  .pf-modal__copy { padding: 26px 22px 24px; }
  .pf-modal__params > div { grid-template-columns: 92px 1fr; }
}

@media (max-height: 620px) {
  body.pf-live .pf-intro { top: calc(62px + 4vh); }
  .pf-hint { display: none; }
  .pf-lead { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-hint .pf-hint__wheel,
  .pf-hint .pf-hint__chev,
  dialog.pf-modal[open],
  .pnav, .pf-intro, .pf-index { animation: none; }
  .pf-glass::after { transition: none; }
}
