/*
 * SW Home v4 - root vars + klasy shortcodow/animacji (mu-plugin sw-home-v4-demo).
 * TYLKO: :root, [sw_hero_demo] (hero-visual/pc-scene/skeleton/postacie),
 * [sw_games_rail] (rail-wrap/rail-btn/proof-rail/proof-card),
 * [sw_v4_runtime] (data-reveal). Style natywnych ukladow/elementow robione
 * recznie w Elementorze - NIE dodawac ich tutaj.
 */

:root {
  --sw-ink: #07060f;
  --sw-panel: #12101c;
  --sw-mist: #9b97b0;
  --sw-paper: #f4f2ff;
  --sw-green: #2fea15;
  --sw-magenta: #ff40ff;
  --sw-accent: var(--sw-green);
  --sw-line: rgba(255, 255, 255, 0.08);
  --sw-glow: rgba(47, 234, 21, 0.1);
  --sw-glow-m: rgba(255, 64, 255, 0.09);
  --font-display: "Anybody", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-hud: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1180px;
  --r-card: 1.25rem;
}

/* --- [sw_hero_demo]: scena z monitorem + demo LIVE --------------------- */

.hero-visual {
  position: relative;
  isolation: isolate;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -6% -4% 6%;
  background:
    radial-gradient(ellipse at 30% 40%, var(--sw-glow), transparent 55%),
    radial-gradient(ellipse at 75% 55%, var(--sw-glow-m), transparent 50%);
  filter: blur(18px);
  z-index: 0;
  pointer-events: none;
}
.pc-scene {
  position: relative;
  z-index: 1;
  /* GOTCHA: KAZDY procent (width/max-width) + aspect-ratio daje 0 intrinsic
     height w kolumnowym flexie Elementora (widget kolapsuje do 0). Tylko
     jednostki px/vw rozwiazuja sie bez rodzica - zadnych % tutaj. */
  width: min(640px, 92vw);
  margin-inline: auto;
  aspect-ratio: 609 / 691;
}
.pc-scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  user-select: none;
}
.pc-scene__screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 77.08%;
  height: 49.31%;
  transform-origin: 0 0;
  overflow: hidden;
  background: #0a0a0c;
  visibility: hidden;
}
.pc-scene__screen.is-mapped { visibility: visible; }
.pc-scene__screen .sw-app-mount { width: 100%; }
.app-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1b1b1b 0 9%, #141414 9% 16%, #101014 16%);
}
.app-skeleton span {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.045) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: skel-shine 1.6s linear infinite;
}
@keyframes skel-shine {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}
.pc-char {
  position: absolute;
  z-index: 2;
  bottom: 2.5%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.pc-char--wizard {
  left: -4%;
  width: 31%;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 22px rgba(47, 234, 21, 0.14));
  animation: bob 7s ease-in-out infinite;
}
.pc-char--gamer {
  right: 2%;
  width: 19%;
  bottom: 2%;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 20px rgba(255, 64, 255, 0.16));
  animation: bob 8s ease-in-out -2.5s infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* --- [sw_games_rail]: przewijany rail biblioteki gier ------------------- */

.rail-wrap { position: relative; }
.proof-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.4rem 0.15rem 1rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 234, 21, 0.35) rgba(244, 242, 255, 0.06);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.proof-rail::-webkit-scrollbar { height: 6px; }
.proof-rail::-webkit-scrollbar-track {
  background: rgba(244, 242, 255, 0.06);
  border-radius: 999px;
}
.proof-rail::-webkit-scrollbar-thumb {
  background: rgba(47, 234, 21, 0.35);
  border-radius: 999px;
}
.proof-rail::-webkit-scrollbar-thumb:hover { background: rgba(47, 234, 21, 0.55); }
.rail-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--sw-line);
  background: rgba(10, 9, 18, 0.85);
  color: var(--sw-paper);
  font-size: 1.35rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.rail-btn:hover { border-color: rgba(47, 234, 21, 0.45); color: var(--sw-green); }
.rail-btn--prev { left: -0.7rem; }
.rail-btn--next { right: -0.7rem; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .rail-btn { display: none; } }
.proof-card {
  flex: 0 0 148px;
  scroll-snap-align: start;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--sw-line);
  background: #14121c;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.proof-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 234, 21, 0.35);
}
.proof-card .shot {
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(47, 234, 21, 0.08), transparent 60%),
    linear-gradient(145deg, #1c1a2a, #0e0c14);
}
.proof-card .shot img {
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}
.proof-card h3 {
  margin: 0;
  padding: 0.7rem 0.8rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.proof-card--more {
  display: block;
  color: var(--sw-paper);
  text-decoration: none;
  border-color: rgba(47, 234, 21, 0.28);
}
.proof-card--more .shot {
  background:
    radial-gradient(circle at 50% 40%, rgba(47, 234, 21, 0.14), transparent 62%),
    linear-gradient(145deg, #17231a, #0e0c14);
}
.proof-card--more .plus {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--sw-green);
  letter-spacing: -0.02em;
}
.proof-card--more h3 { color: var(--sw-green); }

/* --- [sw_v4_runtime]: reveal przy scrollu ------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .pc-char, .app-skeleton span { animation: none; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
