/* SPARK STATION: film przelotu do radia + wnętrze radia z trzech plansz. Dashboard świeci w ekranach na zdjęciach. */

.station {
  position: absolute; inset: 0; z-index: 7; visibility: hidden; overflow: hidden; pointer-events: none;
  container-type: size; background: #1a0709; color: #e4f7ff; font-family: var(--grot);
}
.station.on { pointer-events: auto; }

/* trzy kadry na ścianach wokół kamery: obrót głowy w perspektywie, po obrocie wjazd do ekranu */
.station { perspective: 1300px; perspective-origin: 50% 45%; touch-action: pan-y; }
.station.on { cursor: grab; }
.station.dragging { cursor: grabbing; user-select: none; }
.st-view { position: absolute; inset: 0; overflow: hidden; transform-origin: 50% 50%; backface-visibility: hidden; transition: transform 1.15s cubic-bezier(.65, 0, .35, 1), opacity 1.15s cubic-bezier(.65, 0, .35, 1); }
.dragging .st-view { transition: none; }
.st-frame {
  position: absolute; left: 50%; top: 50%; width: max(100cqw, 177.78cqh); aspect-ratio: 2000 / 1125;
  translate: -50% -50%; transition: scale .9s cubic-bezier(.33, 0, .2, 1);
}
.st-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-user-drag: none; }
.st-mid { scale: var(--z, 1); transform-origin: 50% 38%; transition: none; }
.st-view[data-v="-1"] .st-frame { transform-origin: 50.1% 44.6%; }
.st-view[data-v="1"] .st-frame { transform-origin: 52% 40.8%; }
.st-view.near .st-frame { scale: 1.32; transition-delay: .75s; }
.st-flare { position: absolute; inset: 0; z-index: 11; pointer-events: none; opacity: var(--flare, 0); background: radial-gradient(40% 40% at 50% var(--my, 40%), #fff, rgba(190,235,255,.7) 40%, transparent 75%); mix-blend-mode: screen; }

/* ekran: czarne szkło z poświatą jak taśma LED w suficie, odblask po skosie */
.st-screen {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; box-sizing: border-box;
  background: radial-gradient(120% 90% at 30% 20%, #0d1a22 0%, #05080b 60%, #020304 100%);
  text-shadow: 0 0 14px rgba(110, 215, 255, .45);
  font-variant-numeric: tabular-nums;
}
.st-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 38%, transparent 39%), repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 2px, transparent 2px 4px); }
.st-screen header { display: flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(228,247,255,.6); }
.st-screen header b { color: #fff; font-weight: 600; margin-right: auto; }
.st-dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--signal); box-shadow: 0 0 .8em var(--signal); animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: .3; } }

/* środek: mały ekran na ścianie po lewej, licznik obserwujących */
.st-mini { padding: 26px 22px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.st-mini .st-live { display: flex; align-items: center; gap: 8px; font: 600 15px/1 var(--grot); letter-spacing: .2em; text-transform: uppercase; color: rgba(228,247,255,.7); }
.st-mini .st-num { font: 200 52px/1 var(--grot); letter-spacing: -.02em; color: #fff; }
.st-mini small { font: 500 13px/1.2 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: rgba(228,247,255,.6); }

/* lewa ściana: pełny dashboard nad syntezatorem */
.st-dash { padding: 26px 32px; display: flex; flex-direction: column; gap: 18px; }
.st-dash header { font-size: 14px; }
.st-dash-body { flex: 1; display: grid; grid-template-columns: 1fr 1.7fr; gap: 30px; align-items: center; }
.st-big { display: flex; flex-direction: column; gap: 10px; padding-right: 26px; border-right: 1px solid rgba(160,225,255,.18); }
.st-big .st-num { font: 200 84px/1 var(--grot); letter-spacing: -.03em; color: #fff; }
.st-big small, .st-dash dt { font: 500 12px/1.2 var(--grot); letter-spacing: .14em; text-transform: uppercase; color: rgba(228,247,255,.58); }
.st-dash dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 20px; }
.st-dash dd { margin: 6px 0 0; font: 300 29px/1 var(--grot); color: #fff; }

/* prawa ściana: ekran zawieszony na aksamicie, w kremowej ramie jak ekran po lewej */
.st-hung { box-shadow: 0 0 0 16px #e8dfcf, 0 0 0 18px #b9ab93, 0 30px 60px 18px rgba(0,0,0,.55); overflow: visible; }
.st-hung::before { content: ""; position: absolute; left: 6%; right: 6%; top: -16px; height: 4px; background: linear-gradient(90deg, transparent, rgba(255,250,235,.9), transparent); filter: blur(2px); }
.st-chart { padding: 28px 40px; }
.st-chart header { font-size: 17px; margin-bottom: 12px; }
.st-chart ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.st-chart li { counter-increment: r; border-top: 1px solid rgba(160,225,255,.12); }
.st-chart a, .st-row { display: flex; gap: 18px; align-items: baseline; padding: 9px 0; color: inherit; text-decoration: none; font: 400 20px/1.2 var(--grot); }
.st-chart a::before, .st-row::before { content: counter(r, decimal-leading-zero); font-size: 15px; color: rgba(228,247,255,.45); }
.st-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-t i { font-family: var(--serif); font-size: 22px; }
.st-v { color: rgba(228,247,255,.65); }
.st-chart a:hover .st-t, .st-chart a:focus-visible .st-t { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* sterowanie na środku dołu: strzałki i trzy miejsca, z dala od menu pokoi po prawej */
.st-look {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 12; display: flex; align-items: center; gap: 6px; padding: 5px;
  border-radius: 99px; background: rgba(20,8,10,.32); border: 1px solid rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 30px rgba(0,0,0,.25);
  pointer-events: none; opacity: 0; transition: opacity .4s;
}
.station.on .st-look { opacity: 1; pointer-events: auto; cursor: default; }
.st-arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .2s, opacity .2s; }
.st-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-arrow:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.st-arrow:disabled { opacity: .3; cursor: default; }
.st-places { display: flex; gap: 2px; }
.st-places button { min-height: 32px; padding: 0 14px; border-radius: 99px; font: 500 10.5px/1 var(--grot); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); transition: background .25s, color .25s; }
.st-places button:hover { color: #fff; }
.st-places button[aria-current="true"] { background: rgba(255,248,238,.92); color: #1b0b0d; }
.st-look button:focus-visible { outline: 2px solid #bfeaff; outline-offset: 2px; }

/* tryb 3D: splat zamiast zdjęć, płótno pod całą warstwą */
/* płótno rysuje pod zdjęciami od razu; zdjęcia gasną dopiero, gdy splat pokaże pierwszy obraz */
.st-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-3d .st-view { opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s .7s; }
/* kursor jak „idź tutaj” w Street View: pierścień na podłodze i strzałka w głąb */
.st-3d.on { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2744%27%20height%3D%2744%27%20viewBox%3D%270%200%2044%2044%27%3E%3Cg%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cellipse%20cx%3D%2722%27%20cy%3D%2728%27%20rx%3D%2715%27%20ry%3D%277%27%20stroke%3D%27rgba%280%2C0%2C0%2C.45%29%27%20stroke-width%3D%274%27/%3E%3Cellipse%20cx%3D%2722%27%20cy%3D%2728%27%20rx%3D%2715%27%20ry%3D%277%27%20stroke%3D%27white%27%20stroke-width%3D%272%27/%3E%3Cpath%20d%3D%27M16%2017l6-6%206%206M22%2011v13%27%20stroke%3D%27rgba%280%2C0%2C0%2C.45%29%27%20stroke-width%3D%274%27/%3E%3Cpath%20d%3D%27M16%2017l6-6%206%206M22%2011v13%27%20stroke%3D%27white%27%20stroke-width%3D%272%27/%3E%3C/g%3E%3C/svg%3E") 22 28, pointer; }
.st-3d.dragging { cursor: grabbing; }

/* tryb wieży: model 3D na nocnym tle; zdjęcia zostają w DOM jako zapas */
.st-twr { background: radial-gradient(80% 70% at 64% 42%, #124a48 0%, #0b2b2b 55%, #051616 100%); }
.st-twr .st-view, .st-twr .st-flare { visibility: hidden; }
/* pokój wieży jest kolorowy: szkło panelu i nawigacji dostaje ciemny petrol, żeby tekst trzymał kontrast */
.chapter.przy-wiezy::before { background: linear-gradient(140deg, rgba(8,28,28,.72), rgba(8,28,28,.6) 45%, rgba(8,28,28,.7)); -webkit-backdrop-filter: blur(16px) saturate(110%) brightness(.62); backdrop-filter: blur(16px) saturate(110%) brightness(.62); }
.st-twr .st-look { background: rgba(8,28,28,.66); }
.st-tower { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-twr.on { cursor: grab; }
.st-twr.on[data-hover="in"] { cursor: zoom-in; }
.st-twr.on[data-hover="out"] { cursor: zoom-out; }
.st-twr.on[data-hover="act"] { cursor: pointer; }
.st-twr.dragging { cursor: grabbing; }

/* panel rozdziału chowa się, kiedy patrzymy na ścianę z ekranem */
.st-side .chapter { transition: opacity .5s, translate .5s; }
.st-side .chapter.on { opacity: 0; translate: -24px 0; pointer-events: none; }

@media (max-width: 760px) {
  .st-look { bottom: 14px; }
  .st-places button { padding: 0 10px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .st-dot { animation: none; }
  .st-view, .st-frame { transition-duration: .01s; transition-delay: 0s; }
}



/* telefon w zbliżeniu radia: cały kadr dla tablicy, pasek u góry na cieniu */
.st-look button { white-space: nowrap; }
@media (max-width: 760px), (max-height: 480px) {
  html:has(.stage.st-side) :is(.levels, .zacheta) { opacity: 0; visibility: hidden; pointer-events: none; }
  .stage.st-side .station::after { content: ""; position: absolute; inset: 0 0 auto; z-index: 3; height: 96px; background: linear-gradient(#081c1ce6, #081c1c99 45%, #081c1c00); pointer-events: none; }
}

/* wejście do radia i swobodna kamera */
.station.st-free { touch-action: none; }
.st-twr.st-free.on:not([data-hover="act"]) { cursor: grab; }
.st-twr.st-free.dragging { cursor: grabbing; }
.st-door { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-left: 4px; padding: 0 16px 0 13px; border-radius: 99px; background: #e2532f; color: #160a06; font: 600 10.5px/1 var(--grot); letter-spacing: .08em; text-transform: uppercase; transition: background .2s, transform .16s var(--ease-out); }
.st-door::after { content: ""; position: absolute; inset: -4px; }
.st-door svg { width: 14px; height: 14px; fill: currentColor; transition: transform .5s var(--ease-out); }
.st-in .st-door { background: rgba(255,248,238,.92); color: #1b0b0d; }
.st-in .st-door svg { transform: rotate(45deg); }
@media (hover: hover) { .st-door:hover { background: #f06a44; } .st-door:hover svg { transform: rotate(90deg); } .st-in .st-door:hover { background: #fff; } }
.st-door:active { transform: scale(.97); }
.st-tip { position: absolute; left: 50%; top: 74px; z-index: 12; translate: -50% 0; margin: 0; padding: 9px 16px; border-radius: 99px; background: rgba(8,28,28,.72); color: #f7f5f0; font: 400 12px/1.3 var(--grot); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .5s; }
.station.on .st-tip.in { opacity: 1; }
.st-tip .hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .st-tip .hint-mouse { display: none; } .st-tip .hint-touch { display: inline; } }
@media (max-width: 760px) and (orientation: portrait) {
  .st-door { position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; height: 44px; margin: 0; }
  html:has(.station.on) .zacheta { opacity: 0; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .st-look { left: calc(50% + 56px); }
  .st-look .st-arrow { display: none; }
  .st-door { padding: 0 13px 0 11px; letter-spacing: .05em; }
}
.st-in::after { content: ""; position: absolute; inset: 0 0 auto; z-index: 3; height: 96px; background: linear-gradient(#081c1ce6, #081c1c99 45%, #081c1c00); pointer-events: none; }
