/* Zasłony nad stroną (intro „JADYMY DURŚ” i instrukcje). Samo hasło klubu — slogan.css (to samo
   w intrze, na końcu pokazu i na telebimie). Ruch tylko transform i opacity; przy „ogranicz ruch”
   zostaje sama treść (zasłona znika przenikaniem). */

.curtain {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 38%, #16296a 0%, #050a1f 72%);
  color: #fff; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
  animation: curtain-in 240ms ease-out both;
}
.curtain.is-leaving { pointer-events: none; animation: curtain-out 420ms var(--reveal) both; }
/* Pod znikającą zasłoną (intro → instrukcje): od razu pełna, bez wejścia. */
.curtain.is-under { animation: none; }
.intro.is-leaving { animation-name: intro-out; }
@keyframes curtain-in { from { opacity: 0; } }
@keyframes curtain-out { to { opacity: 0; } }
@keyframes intro-out { to { opacity: 0; transform: scale(1.14); } }

/* Koniec pokazu: hasło (slogan.css) zostaje na ekranie, herb oddycha. */
.end .slogan-crest { animation: crest-in 640ms var(--reveal) both, breathe 3.2s 1.4s ease-in-out infinite; }

/* ---------- Ostrzeżenie o migającym świetle (safety.mjs): długi tekst — przewijany ---------- */
.safety {
  place-items: start center; overflow-y: auto; overscroll-behavior: contain; user-select: text;
  background: linear-gradient(170deg, #050a1f 0%, #0b163f 60%, var(--navy) 100%);
}
.safety-card { display: grid; gap: 12px; width: 100%; max-width: 34rem; margin-block: auto; font-size: 16px; line-height: 1.45; }
.safety-title { font-family: var(--display); font-size: clamp(40px, 11vw, 60px); line-height: 1; text-transform: uppercase; }
.safety-lead { font-size: 18px; font-weight: 700; }
.safety-signs-title { margin-top: 4px; font-weight: 700; }
.safety-signs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.safety-signs li { position: relative; padding-left: 20px; }
.safety-signs li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; background: var(--red); }
.safety-help { color: var(--muted); }
.safety-ok { margin-top: 10px; }

/* ---------- Zgoda na push przy pierwszym otwarciu z ikony (pushask.mjs) ---------- */
.push-ask-card { display: grid; gap: 14px; width: 100%; max-width: 30rem; font-size: 16px; line-height: 1.45; }
.push-ask-title { font-family: var(--display); font-size: clamp(36px, 10vw, 54px); line-height: 1; text-transform: uppercase; }
.push-ask-text { font-size: 17px; }
.push-ask .cta { margin-top: 6px; }
.push-ask .cta[aria-busy="true"] { opacity: 0.6; }

/* ---------- Instrukcje: komunikaty jak relacje, z paskiem postępu ---------- */
.guide {
  place-items: stretch; grid-template-rows: auto auto 1fr auto; gap: 14px;
  background: linear-gradient(170deg, #050a1f 0%, #0b163f 48%, var(--navy) 100%);
}
.guide-bars { display: flex; gap: 6px; }
.seg { flex: 1; height: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.24); }
.seg i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.seg.is-done i { transform: none; }
.seg.is-now i { animation: seg-fill var(--step) linear forwards; }
@keyframes seg-fill { to { transform: none; } }
.guide-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-skip {
  min-height: 40px; padding: 0 14px; border: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
  background: none; color: #fff; font: 800 12px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
}
.guide-card { display: grid; place-items: center; }
.guide-step { display: grid; justify-items: center; gap: 24px; text-align: center; animation: step-in 520ms var(--reveal) both; }
/* Ikony kroków (guideicons.mjs): każda pokazuje ruch, o który prosimy. Stan bez animacji to stan
   końcowy (telefon obrócony, suwak na maksimum, kłódka otwarta) — przy „ogranicz ruch” zostaje on. */
.guide-icon { width: 132px; height: 132px; overflow: hidden; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.guide-icon * { transform-box: view-box; }
.gi-line, .gi-head, .gi-frame { fill: none; stroke: #fff; stroke-width: 2.6; }
.gi-arrow { fill: none; stroke: var(--red); stroke-width: 3; animation: gi-arrow 2.2s ease-in-out infinite; }
.gi-screen { fill: #fff; opacity: 0.9; }
/* Obróć ekran w stronę murawy: snop światła z ekranu przechodzi z kibica na murawę. */
.gi-pitch { fill: #1f7a34; stroke: #fff; stroke-width: 2.4; }
.gi-pitch-lit { fill: #fff; stroke: none; opacity: 0.4; animation: gi-lit 2.2s ease-out both; }
.gi-turn { transform-origin: 48px 57px; transform: rotate(180deg); animation: gi-turn 2.2s cubic-bezier(0.6, 0, 0.2, 1) both; }
.gi-beam { fill: #fff; opacity: 0.3; }
.gi-phone-top { fill: #fff; }
@keyframes gi-turn { 0%, 22% { transform: rotate(0deg); } 62%, 100% { transform: rotate(180deg); } }
@keyframes gi-lit { 0%, 55% { opacity: 0; } 75%, 100% { opacity: 0.4; } }
/* Trzymaj telefon uniesiony: telefon wędruje w górę i rozjaśnia się. */
.gi-rise { animation: gi-rise 2.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.gi-step2 .gi-screen { animation: gi-glow 2.2s ease-out both; }
@keyframes gi-rise { 0%, 12% { transform: translateY(26px); } 60%, 100% { transform: none; } }
@keyframes gi-glow { 0%, 35% { opacity: 0.25; } 65%, 100% { opacity: 0.9; } }
@keyframes gi-arrow { 0%, 100% { transform: translateY(6px); opacity: 0.3; } 50% { transform: translateY(-4px); opacity: 1; } }
/* Jasność na maksimum: wypełnienie i gałka suwaka idą do końca, słońce rośnie i rozbłyska. */
.gi-track { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2.4; }
.gi-fill { fill: #fff; transform-origin: 14px 69px; animation: gi-fill 2.2s cubic-bezier(0.45, 0, 0.2, 1) both; }
.gi-knob { fill: var(--red); stroke: #fff; stroke-width: 2.4; animation: gi-knob 2.2s cubic-bezier(0.45, 0, 0.2, 1) both; }
.gi-sun { transform-origin: 48px 26px; animation: gi-sun 2.2s cubic-bezier(0.45, 0, 0.2, 1) both; }
.gi-sun-core { fill: #ffd25e; }
.gi-rays { fill: none; stroke: #ffd25e; stroke-width: 3; }
@keyframes gi-fill { 0%, 12% { transform: scaleX(0.24); } 66%, 100% { transform: none; } }
@keyframes gi-knob { 0%, 12% { transform: translateX(-50px); } 66%, 100% { transform: none; } }
@keyframes gi-sun { 0%, 12% { transform: scale(0.55); opacity: 0.45; } 66% { transform: scale(1.12); opacity: 1; } 80%, 100% { transform: none; } }
/* Nie blokuj telefonu: kłódka na jasnym ekranie otwiera się. */
.gi-screen--on { animation: gi-on 2.2s ease-in-out infinite; }
.gi-lock-body { fill: var(--navy); }
.gi-shackle { fill: none; stroke: var(--navy); stroke-width: 3; transform-origin: 53.5px 42px; transform: translateY(-4px) rotate(32deg);
  animation: gi-open 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes gi-open { 0%, 25% { transform: none; } 45% { transform: translateY(-4px); } 70%, 100% { transform: translateY(-4px) rotate(32deg); } }
@keyframes gi-on { 0%, 100% { opacity: 0.9; } 50% { opacity: 1; } }
.guide-text { max-width: 13ch; font-family: var(--display); font-size: clamp(42px, 12.5vw, 68px); line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
.guide-next { text-align: center; font-size: 14px; color: var(--muted); }
@keyframes step-in { from { opacity: 0; transform: translateX(40px); } }

@media (prefers-reduced-motion: reduce) {
  .curtain, .intro.is-leaving { animation-name: curtain-in; animation-duration: 1ms; }
  .curtain.is-leaving { animation-name: curtain-out; }
  .end .slogan-crest, .guide-step, .guide-icon, .guide-icon * { animation: none; }
  .seg.is-now i { animation: none; transform: none; }
}
