/*!
 * NOCTIS · sekcja gry „Złapcie dusze nocy” — section.sec.gra2#gra
 * Klasy z prefiksem gra-. Korzysta z globalnych: .wrap .eyebrow h2 .btn .reel .reel-box .reel-play (styles.css).
 */
.gra2{position:relative;overflow:hidden;isolation:isolate;--gra-h:1200px}

/* ---- tło jak w grze: miasto, czerwone smugi, mgła ---- */
.gra-bg{position:absolute;inset:0;z-index:-1;pointer-events:none}
.gra-city{position:absolute;inset:0;background-size:cover;background-position:50% 32%;opacity:.2;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 22%,#000 64%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0,#000 22%,#000 64%,transparent 100%)}
.gra-ray{position:absolute;top:-10%;width:2px;height:150%;background:linear-gradient(180deg,rgba(194,48,48,.34),rgba(194,48,48,.06) 70%,transparent);
  transform-origin:50% 0;mix-blend-mode:screen;opacity:.8}
.gra-ray:nth-child(2){left:18%;transform:rotate(14deg)}
.gra-ray:nth-child(3){left:50%;transform:rotate(-6deg)}
.gra-ray:nth-child(4){left:82%;transform:rotate(-18deg)}
.gra-live .gra-ray{animation:gra-ray 9s ease-in-out infinite alternate}
.gra-live .gra-ray:nth-child(3){animation-duration:11s;animation-delay:-3s}
.gra-live .gra-ray:nth-child(4){animation-duration:13s;animation-delay:-6s}
.gra-fog{position:absolute;inset:0;
  background:radial-gradient(60% 38% at 20% 78%,rgba(232,224,208,.06),transparent 70%),radial-gradient(50% 30% at 85% 60%,rgba(232,224,208,.05),transparent 70%),
  radial-gradient(70% 50% at 50% 0,rgba(150,30,30,.16),transparent 70%)}

/* ---- dusze w tle ---- */
.gra-sky{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.gra-fl{position:absolute;bottom:-90px;width:var(--gra-sz,54px);pointer-events:auto;cursor:pointer;opacity:.5;touch-action:manipulation;
  animation:gra-rise var(--gra-dur,20s) linear var(--gra-del,0s) infinite;animation-play-state:paused;transition:opacity .25s}
.gra-live .gra-fl{animation-play-state:running}
.gra-fl:hover{opacity:.95}
.gra-fl-in{display:block;animation:gra-sway 3.4s ease-in-out infinite alternate;animation-play-state:paused}
.gra-live .gra-fl-in{animation-play-state:running}
.gra-fl.is-caught{opacity:0;pointer-events:none;transition:opacity .18s}
.gra-fl.is-caught .gra-svg{transform:scale(1.5);transition:transform .2s}

/* ---- postacie (SVG z gry) ---- */
.gra-svg{display:block;width:100%;height:auto;overflow:visible}
.gra-flick{animation:gra-flick 1.15s ease-in-out infinite alternate;animation-play-state:paused}
.gra-pupil{animation:gra-pulse 1s ease-in-out infinite alternate;animation-play-state:paused}
.gra-hand--m{animation:gra-turn 1.05s linear infinite;animation-play-state:paused}
.gra-hand--h{animation:gra-turn 7.8s linear infinite;animation-play-state:paused}
.gra-w2{opacity:0}
.gra-bat .gra-w1{animation:gra-wing1 .29s steps(1) infinite}
.gra-bat .gra-w2{animation:gra-wing2 .29s steps(1) infinite}
.gra-live .gra-flick,.gra-live .gra-pupil,.gra-live .gra-hand--m,.gra-live .gra-hand--h,.gra-live .gra-ch--bat .gra-w1,.gra-live .gra-ch--bat .gra-w2{animation-play-state:running}
.gra-ch--bat .gra-w1{animation:gra-wing1 .29s steps(1) infinite;animation-play-state:paused}
.gra-ch--bat .gra-w2{animation:gra-wing2 .29s steps(1) infinite;animation-play-state:paused}
.gra-bat{position:absolute;left:0;top:0;z-index:2;width:66px;cursor:pointer;touch-action:manipulation}

/* ---- układ ---- */
.gra-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(34px,5vw,80px);align-items:center}
.gra-body{min-width:0}
.gra-body h2{margin-bottom:16px}
.gra-lead,.gra-sub{max-width:36em}
.gra-lead{font-size:clamp(17px,1.9vw,21px);line-height:1.62;color:var(--cream,#e8e0d0);margin:0 0 10px;max-width:34em}
.gra-sub{font-size:15.5px;line-height:1.6;color:var(--cream-dim,rgba(232,224,208,.6));margin:0 0 26px;max-width:36em}

/* ---- legenda = dotykalne postacie ---- */
.gra-legend{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.gra-ch{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;min-height:132px;margin:0;padding:12px 4px 12px;
  background:rgba(232,224,208,.03);border:1px solid rgba(232,224,208,.1);color:var(--cream,#e8e0d0);font:inherit;cursor:pointer;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:border-color .25s,background-color .25s}
.gra-ch--pair .gra-art{width:100px}
.gra-ch:hover{border-color:rgba(210,58,51,.55);background:rgba(150,30,30,.08)}
.gra-ch:focus-visible{outline:2px solid #D23A33;outline-offset:2px}
.gra-art{display:block;width:70px;height:70px;margin:-2px 0 4px}
.gra-pair{display:flex;justify-content:center;width:100%;height:100%}
.gra-pair{gap:0}
.gra-pair .gra-svg{width:62%;flex:none;margin-top:8%}
.gra-pair .gra-svg:first-child{margin-right:-24%}
.gra-name{font-family:Oswald,sans-serif;font-weight:400;font-size:11px;line-height:1.3;letter-spacing:.14em;text-transform:uppercase;color:rgba(232,224,208,.66);text-align:center}
.gra-pts{font-family:Cinzel,serif;font-weight:600;font-size:21px;line-height:1.2;letter-spacing:.03em;color:#e8e0d0}
.gra-ch--gold .gra-pts{color:#f0b070}
.gra-ch--bat .gra-pts{color:#c23030}
.gra-ch--time .gra-pts{color:#bfe3ff}
.gra-ch--mult .gra-pts{color:#ff7a6b}
.gra-ch--pair .gra-pts{color:#efe2cc}
.gra-live .gra-art{animation:gra-bob 3.2s ease-in-out infinite alternate}
.gra-live li:nth-child(2) .gra-art{animation-delay:-.6s}
.gra-live li:nth-child(3) .gra-art{animation-delay:-1.3s}
.gra-live li:nth-child(4) .gra-art{animation-delay:-1.9s}
.gra-live li:nth-child(5) .gra-art{animation-delay:-2.4s}
.gra-live li:nth-child(6) .gra-art{animation-delay:-.3s}
.gra-ch.is-hit .gra-svg{animation:gra-hit .45s cubic-bezier(.2,.9,.3,1.3)}
.gra-hint{max-width:none;margin:12px 0 0;font-family:Oswald,sans-serif;font-weight:400;font-size:11.5px;letter-spacing:.16em;text-transform:uppercase;color:rgba(232,224,208,.45)}
.gra2:not(.gra-js) .gra-hint{display:none}

/* ---- CTA i tablica ---- */
.gra-cta{display:flex;flex-wrap:wrap;align-items:center;gap:14px 22px;margin:28px 0 0}
.gra-warm{font-family:Oswald,sans-serif;font-weight:400;font-size:12.5px;letter-spacing:.18em;text-transform:uppercase;color:#f0b070;opacity:0;transition:opacity .4s}
.gra-warm.on{opacity:1}
.gra-hof{margin:30px 0 0;padding:18px 0 0;border-top:1px solid rgba(232,224,208,.14);max-width:420px}
.gra-hof-h{margin:0 0 10px;font-family:Oswald,sans-serif;font-weight:400;font-size:11px;letter-spacing:.26em;text-transform:uppercase;color:#EDB278}
.gra-hof-list{list-style:none;margin:0;padding:0}
.gra-hof-list li{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:baseline;gap:8px;padding:7px 0;border-bottom:1px solid rgba(232,224,208,.08)}
.gra-hof-p{font-family:Oswald,sans-serif;font-size:13px;color:rgba(232,224,208,.5)}
.gra-hof-n{font-family:Cinzel,serif;font-weight:600;font-size:17px;letter-spacing:.03em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gra-hof-s{font-family:Cinzel,serif;font-weight:600;font-size:19px;color:#f0b070}
.gra-hof-list li:first-child .gra-hof-s{text-shadow:0 0 14px rgba(240,176,112,.6)}
.gra-hof-c{display:inline-block;width:6px;height:10px;margin-left:8px;border-radius:50% 50% 45% 45%/60% 60% 40% 40%;background:radial-gradient(circle at 50% 70%,#fff6dc,#FFC742 45%,#ba6e3a);
  box-shadow:0 0 6px rgba(255,199,66,.8);vertical-align:1px}

/* ---- rolka ---- */
.gra-reel{margin:0 auto;width:min(300px,78vw)}

/* ---- efekty złapania ---- */
.gra-pop{position:absolute;z-index:6;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap;
  font-family:Cinzel,serif;font-weight:600;font-size:24px;letter-spacing:.02em;text-shadow:0 0 8px rgba(0,0,0,.85),0 0 2px rgba(0,0,0,.9);
  animation:gra-pop 1.2s ease-out forwards}
.gra-pop--big{font-size:34px}
.gra-pop--wide{font-size:17px;letter-spacing:.14em;text-transform:uppercase}
.gra-burst{position:absolute;z-index:5;width:0;height:0;pointer-events:none}
.gra-dot{position:absolute;left:0;top:0;border-radius:50%;transform:translate(-50%,-50%)}
.gra-ring{position:absolute;left:-22px;top:-22px;width:44px;height:44px;border:2px solid;border-radius:50%;opacity:0}

@media (min-width:900px){
  .gra-grid{grid-template-columns:minmax(0,1fr) minmax(260px,320px)}
  .gra-reel{width:100%}
}
@media (min-width:1100px){
  .gra-legend{grid-template-columns:repeat(6,minmax(0,1fr))}
  .gra-ch{min-height:140px}
}
@media (max-width:899px){
  .gra-body{text-align:left}
}

@keyframes gra-rise{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,calc(var(--gra-h) * -1),0)}}
@keyframes gra-sway{from{transform:translateX(calc(var(--gra-sway,20px) * -1)) rotate(-7deg)}to{transform:translateX(var(--gra-sway,20px)) rotate(7deg)}}
@keyframes gra-flick{from{opacity:.82}to{opacity:1}}
@keyframes gra-pulse{from{opacity:.12}to{opacity:1}}
@keyframes gra-turn{to{transform:rotate(360deg)}}
@keyframes gra-wing1{0%{opacity:1}50%{opacity:0}}
@keyframes gra-wing2{0%{opacity:0}50%{opacity:1}}
@keyframes gra-bob{from{transform:translateY(3px) rotate(-4deg)}to{transform:translateY(-4px) rotate(4deg)}}
@keyframes gra-hit{0%{transform:scale(1)}40%{transform:scale(1.28)}100%{transform:scale(1)}}
@keyframes gra-pop{0%{opacity:0;transform:translate(-50%,-30%)}14%{opacity:1;transform:translate(-50%,-60%)}100%{opacity:0;transform:translate(-50%,-190%)}}
@keyframes gra-ray{from{margin-left:-30px}to{margin-left:30px}}

/* ograniczony ruch: postacie stoją, punkty tylko się pojawiają i gasną */
@media (prefers-reduced-motion:reduce){
  .gra-sky,.gra-bat{display:none}
  .gra2 *{animation:none !important}
  .gra-pop{animation:gra-fade 1.2s ease-out forwards !important}
  .gra-w2{opacity:0}
}
@keyframes gra-fade{0%,60%{opacity:1}100%{opacity:0}}
