/* =====================================================================
   RiverMC · strona sieci (MAI-185)
   Paleta z CLAUDE.md („Kolorystyka: zielona”), grafiki z resource packa.
   Wszystkie obrazy to piksel-art, więc skalujemy je pikselowo.
   ===================================================================== */

:root {
  --green: #2bd97c;
  --lime: #b8f55a;
  --mint: #9cffc9;
  --emerald: #0e7a47;
  --panel-top: #12261c;
  --panel-bottom: #0a1611;
  --frame: #1e4a34;
  --text: #eafff2;
  --text-soft: #cfe3d7;
  --gold: #ffc93c;
  --sage: #86a897;
  --sage-dark: #3d6b53;
  --red: #ff5c5c;
  --shadow: #050c08;
  --bg: #07110c;

  /* Jersey 15: pikselowy krój z polskimi znakami, czytelne cyfry, jak czcionka menu w packu. Ma tylko grubość 400,
     więc nigdzie nie podajemy grubszej (sztuczne pogrubienie rozmazuje piksele). Zapas: wąskie bezszeryfowe. */
  --font-pixel: "Jersey 15", "Arial Narrow", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1200px;
  --gutter: 16px;
  --frame-w: 6px;
  --topbar-h: 64px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 500px at 85% 38%, rgba(43, 217, 124, .05), transparent 70%),
    radial-gradient(800px 600px at 10% 70%, rgba(184, 245, 90, .035), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  overflow-x: clip;
  font-synthesis: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

img { max-width: 100%; height: auto; }
.px { image-rendering: crisp-edges; image-rendering: pixelated; }

a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: var(--lime); }

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }

code {
  font: 600 .9em/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--mint);
  background: rgba(5, 12, 8, .7);
  border: 1px solid var(--frame);
  padding: .15em .4em;
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green);
  color: var(--shadow);
  font: 700 15px var(--font-body);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.muted { color: var(--sage); font-size: 14px; }

/* ---------- Panel z ramką jak w menu packa (9-slice) ---------- */
.panel {
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame.png") 3 / var(--frame-w) stretch;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom)) padding-box;
}
.panel--gold { border-image-source: url("../assets/ui/frame-gold.png"); }
.panel--link {
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease;
}
.panel--link:hover,
.panel--link:focus-visible {
  color: inherit;
  border-image-source: url("../assets/ui/frame-accent.png");
  transform: translateY(-3px);
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame.png") 3 / var(--frame-w) stretch;
  background: linear-gradient(180deg, #183627, #0e2118) padding-box;
  color: var(--text);
  font: 400 21px/1.1 var(--font-pixel);
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover, .btn:focus-visible {
  color: var(--text);
  border-image-source: url("../assets/ui/frame-accent.png");
  transform: translateY(-2px);
  filter: brightness(1.12);
}
.btn:active { transform: translateY(1px); }
.btn small {
  display: block;
  font: 500 13px/1.2 var(--font-body);
  color: var(--sage);
  letter-spacing: 0;
}
.btn--small { padding: 6px 12px; font-size: 19px; gap: 8px; }
.btn--big { padding: 14px 22px; font-size: 25px; gap: 14px; text-align: left; }
.btn--gold {
  border-image-source: url("../assets/ui/frame-gold.png");
  background: linear-gradient(180deg, #ffd66a, #f0b42a 55%, #c98e1c) padding-box;
  color: #1d1405;
}
.btn--gold:hover, .btn--gold:focus-visible { border-image-source: url("../assets/ui/frame-gold.png"); color: #1d1405; }
.btn[disabled] {
  cursor: not-allowed;
  transform: none;
  filter: saturate(.55) brightness(.8);
}

/* ---------- Kropka statusu ---------- */
.dot {
  position: relative;
  display: inline-block;
  width: 10px; height: 10px;
  flex: none;
  background: var(--sage-dark);
  box-shadow: 0 0 0 2px var(--shadow);
}
.dot--live, .dot.is-online {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--shadow), 0 0 10px rgba(43, 217, 124, .8);
  animation: pulse 2.4s ease-in-out infinite;
}
/* Fala rozchodząca się od zielonej kropki */
.dot--live::after, .dot.is-online::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid var(--green);
  opacity: 0;
  animation: ripple 2.4s ease-out infinite;
}
.dot.is-offline { background: var(--red); box-shadow: 0 0 0 2px var(--shadow); animation: none; }
.dot.is-unknown { background: var(--sage-dark); animation: none; }

/* ---------- Pasek nawigacji ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(7, 17, 12, .82);
  border-bottom: 2px solid var(--frame);
  box-shadow: 0 2px 0 var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color .3s ease, box-shadow .3s ease;
}
/* Po zjechaniu w dół pasek gęstnieje, a logo lekko się zmniejsza */
.topbar.is-scrolled {
  background-color: rgba(7, 17, 12, .95);
  box-shadow: 0 2px 0 var(--shadow), 0 12px 28px rgba(0, 0, 0, .35);
}
/* Pasek postępu przewijania (nurt) na dolnej krawędzi; szerokość ustawia main.js */
.topbar__progress {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.topbar__progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--green) 55%, var(--lime));
  box-shadow: 0 0 10px rgba(43, 217, 124, .8);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__brand { display: block; line-height: 0; }
.topbar__brand img {
  width: 101px; height: 42px;
  transform-origin: 0 50%;
  transition: transform .3s ease;
}
.topbar.is-scrolled .topbar__brand img { transform: scale(.9); }
.topbar__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topbar__menu a:not(.btn) {
  position: relative;
  display: block;
  padding: 8px 12px;
  color: var(--text-soft);
  font: 400 21px/1.2 var(--font-pixel);
  letter-spacing: .03em;
  text-decoration: none;
  transition: color .2s ease;
}
/* Podkreślenie wjeżdża od środka */
.topbar__menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transform: scaleX(0);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.topbar__menu a:not(.btn):hover,
.topbar__menu a:not(.btn).is-active { color: var(--lime); }
.topbar__menu a:not(.btn):hover::after,
.topbar__menu a:not(.btn).is-active::after { transform: scaleX(1); }
.topbar__cta { margin-left: 8px; }
.topbar__toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame.png") 3 / var(--frame-w) stretch;
  background: var(--panel-top) padding-box;
  cursor: pointer;
}
.topbar__burger,
.topbar__burger::before,
.topbar__burger::after {
  display: block;
  width: 18px; height: 3px;
  margin: 0 auto;
  background: var(--mint);
  transition: transform .2s ease, opacity .2s ease;
}
.topbar__burger { position: relative; }
.topbar__burger::before, .topbar__burger::after { content: ""; position: absolute; left: 0; }
.topbar__burger::before { top: -6px; }
.topbar__burger::after { top: 6px; }
.topbar__toggle[aria-expanded="true"] .topbar__burger { background: transparent; }
.topbar__toggle[aria-expanded="true"] .topbar__burger::before { transform: translateY(6px) rotate(45deg); }
.topbar__toggle[aria-expanded="true"] .topbar__burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 859px) {
  .topbar__toggle { display: block; }
  .topbar__menu {
    position: absolute;
    top: calc(var(--topbar-h) - 2px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: rgba(7, 17, 12, .97);
    border-bottom: 2px solid var(--frame);
    box-shadow: 0 2px 0 var(--shadow);
    display: none;
  }
  .js .topbar__menu.is-open { display: flex; }
  html:not(.js) .topbar__menu { position: static; display: none; }
  .topbar__menu a:not(.btn) { padding: 12px 4px; font-size: 24px; border-bottom: 1px solid rgba(30, 74, 52, .6); }
  .topbar__menu a:not(.btn)::after { left: 4px; right: auto; width: 48px; bottom: 6px; transform-origin: 0 50%; }
  .topbar__cta { margin: 14px 0 0; }
}

/* ---------- Sekcja główna ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(640px, calc(100vh - var(--topbar-h)), 900px);
  padding: 72px 0 150px;
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, #143322 0%, transparent 62%),
    linear-gradient(180deg, #050c08 0%, #0a1611 46%, #12261c 82%, #0e2118 100%);
}
.hero__scene { position: absolute; inset: 0; z-index: -1; }
.hero__art, .hero__layer, .hero__shade, .hero__glow { position: absolute; inset: 0; }
.hero__art {
  background: url("../assets/art/hero.png") center bottom / cover no-repeat;
}
/* Daleki plan (niebo, zorza, góry, wyspa) i bliski plan (las, rzeka, tratwa) z ilustracji; pod nimi hero.png
   jako zapas. Przy przewijaniu plany przesuwają się z różną prędkością (paralaksa w main.js). */
.hero__far {
  background: url("../assets/art/hero-far.png") center bottom / cover no-repeat;
  will-change: transform;
}
.hero__near {
  background: url("../assets/art/hero-near.png") center bottom / cover no-repeat;
  will-change: transform;
}
/* Na komputerze plany idą też za myszą (main.js), więc są trochę szersze, żeby nie odsłaniać krawędzi */
@media (hover: hover) and (pointer: fine) {
  .hero__far, .hero__near { inset: -12px -32px; }
}
/* Migocące gwiazdy na niebie */
.hero__stars i {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--text);
  box-shadow: 0 0 6px 1px rgba(156, 255, 201, .6);
  opacity: .2;
  animation: twinkle 3.6s ease-in-out infinite;
}
.hero__stars i:nth-child(3n) { width: 3px; height: 3px; }
.hero__stars i:nth-child(1) { left: 6%; top: 12%; animation-delay: -.4s; }
.hero__stars i:nth-child(2) { left: 18%; top: 6%; animation-delay: -2.1s; animation-duration: 4.2s; }
.hero__stars i:nth-child(3) { left: 27%; top: 22%; animation-delay: -1.3s; animation-duration: 3.1s; }
.hero__stars i:nth-child(4) { left: 38%; top: 9%; animation-delay: -3s; animation-duration: 4.8s; }
.hero__stars i:nth-child(5) { left: 47%; top: 27%; animation-delay: -.9s; animation-duration: 3.4s; }
.hero__stars i:nth-child(6) { left: 58%; top: 5%; animation-delay: -2.6s; animation-duration: 4.4s; }
.hero__stars i:nth-child(7) { left: 66%; top: 18%; animation-delay: -1.8s; animation-duration: 3.8s; }
.hero__stars i:nth-child(8) { left: 77%; top: 8%; animation-delay: -.2s; animation-duration: 5s; }
.hero__stars i:nth-child(9) { left: 86%; top: 24%; animation-delay: -3.3s; animation-duration: 3.3s; }
.hero__stars i:nth-child(10) { left: 94%; top: 13%; animation-delay: -1.1s; animation-duration: 4.1s; }
/* Spadające gwiazdy: co kilkanaście sekund smuga przecina niebo w dół w lewo */
.hero__meteors i {
  position: absolute;
  width: 120px; height: 2px;
  background: linear-gradient(90deg, #fff, rgba(156, 255, 201, .85) 8%, rgba(43, 217, 124, .35) 45%, transparent);
  filter: drop-shadow(0 0 4px rgba(156, 255, 201, .8));
  rotate: -24deg;
  opacity: 0;
  animation: meteor 13s linear infinite;
}
.hero__meteors i:nth-child(1) { left: 62%; top: 9%; animation-delay: 2.5s; }
.hero__meteors i:nth-child(2) { left: 86%; top: 4%; animation-delay: 8s; animation-duration: 17s; }
.hero__meteors i:nth-child(3) { left: 38%; top: 15%; animation-delay: 12.5s; animation-duration: 21s; }
/* Zorza delikatnie faluje: przesuwany połysk nad górną częścią nieba */
.hero__aurora {
  position: absolute;
  inset: 0 0 52% 0;
  background: linear-gradient(100deg, transparent 18%, rgba(156, 255, 201, .11) 32%, transparent 46%, rgba(43, 217, 124, .09) 62%, transparent 78%);
  background-size: 220% 100%;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
  animation: aurora 22s ease-in-out infinite alternate;
}
/* Pikselowe chmury dryfują nad górami (między planami) */
.hero__clouds { position: absolute; inset: 0; pointer-events: none; }
.hero__clouds i {
  position: absolute;
  left: 0;
  display: block;
  width: 192px; height: 56px;
  background: url("../assets/ui/cloud-1.png") 0 0 / 100% 100% no-repeat;
  opacity: .42;
  animation: cloud 150s linear infinite;
}
.hero__clouds i:nth-child(1) { top: 16%; animation-delay: -20s; }
.hero__clouds i:nth-child(2) { top: 31%; width: 108px; height: 36px; background-image: url("../assets/ui/cloud-2.png"); opacity: .32; animation-duration: 190s; animation-delay: -120s; }
.hero__clouds i:nth-child(3) { top: 9%; width: 240px; height: 64px; background-image: url("../assets/ui/cloud-3.png"); opacity: .36; animation-duration: 210s; animation-delay: -75s; }
.hero__clouds i:nth-child(4) { top: 25%; width: 144px; height: 48px; background-image: url("../assets/ui/cloud-2.png"); opacity: .28; animation-duration: 170s; animation-delay: -150s; }
.hero__shade {
  background:
    radial-gradient(56% 46% at 50% 44%, rgba(5, 12, 8, .62), rgba(5, 12, 8, .15) 70%, transparent 100%),
    linear-gradient(180deg, rgba(5, 12, 8, .55) 0%, rgba(5, 12, 8, .1) 32%, rgba(5, 12, 8, 0) 62%, rgba(7, 17, 12, .75) 90%, var(--bg) 100%);
}
.hero__glow {
  background: radial-gradient(34% 28% at 50% 36%, rgba(156, 255, 201, .16), transparent 70%);
  animation: glow 7s ease-in-out infinite;
}
.hero__fireflies i {
  position: absolute;
  bottom: 18%;
  width: 4px; height: 4px;
  background: var(--mint);
  box-shadow: 0 0 8px 2px rgba(156, 255, 201, .55);
  opacity: 0;
  animation: firefly 13s linear infinite;
}
.hero__fireflies i:nth-child(3n) { background: var(--lime); box-shadow: 0 0 8px 2px rgba(184, 245, 90, .5); }
.hero__fireflies i:nth-child(1) { left: 8%; animation-delay: -1s; animation-duration: 14s; }
.hero__fireflies i:nth-child(2) { left: 17%; animation-delay: -7s; animation-duration: 11s; }
.hero__fireflies i:nth-child(3) { left: 26%; animation-delay: -3s; animation-duration: 16s; }
.hero__fireflies i:nth-child(4) { left: 34%; animation-delay: -10s; animation-duration: 12s; }
.hero__fireflies i:nth-child(5) { left: 43%; animation-delay: -5s; animation-duration: 15s; }
.hero__fireflies i:nth-child(6) { left: 52%; animation-delay: -12s; animation-duration: 13s; }
.hero__fireflies i:nth-child(7) { left: 60%; animation-delay: -2s; animation-duration: 17s; }
.hero__fireflies i:nth-child(8) { left: 68%; animation-delay: -8s; animation-duration: 12s; }
.hero__fireflies i:nth-child(9) { left: 76%; animation-delay: -4s; animation-duration: 14s; }
.hero__fireflies i:nth-child(10) { left: 84%; animation-delay: -11s; animation-duration: 16s; }
.hero__fireflies i:nth-child(11) { left: 91%; animation-delay: -6s; animation-duration: 13s; }
.hero__fireflies i:nth-child(12) { left: 4%; animation-delay: -9s; animation-duration: 18s; }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame.png") 3 / var(--frame-w) stretch;
  background: rgba(10, 22, 17, .82) padding-box;
  color: var(--text-soft);
  font: 400 19px/1.1 var(--font-pixel);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero__title { width: 100%; line-height: 0; }
.sprite.hero__logo {
  width: min(calc(var(--w) * 3px), 100%);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .55));
}
.hero__lead {
  max-width: 640px;
  color: var(--text-soft);
  font-size: clamp(16px, 2.2vw, 19px);
  text-shadow: 0 2px 0 var(--shadow), 0 0 16px rgba(5, 12, 8, .9);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-top: 6px;
}
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 15px;
  text-shadow: 0 2px 0 var(--shadow);
}
.hero__status strong { color: var(--lime); font: 400 24px/1 var(--font-pixel); }

/* Wejście sekcji głównej po kolei: nadtytuł, logo z odbiciem, hasło, przyciski, status */
.js:not(.podglad) .hero__content > * { animation: hero-in .9s cubic-bezier(.2, .7, .2, 1) both; }
.js:not(.podglad) .hero__content > :nth-child(1) { animation-delay: .1s; }
.js:not(.podglad) .hero__content > .hero__title { animation: logo-in 1.1s cubic-bezier(.2, .7, .2, 1) .25s both; }
.js:not(.podglad) .hero__content > :nth-child(3) { animation-delay: .5s; }
.js:not(.podglad) .hero__content > :nth-child(4) { animation-delay: .65s; }
.js:not(.podglad) .hero__content > :nth-child(5) { animation-delay: .8s; }
.js:not(.podglad) .hero__scroll { animation: hero-in .9s ease 1.3s both; }
/* Logo unosi się i co jakiś czas błyska (błysk to klatki sprite'a) */
.sprite--shine.hero__logo {
  animation: shine 6.5s steps(1, end) var(--delay, 0s) infinite, bob 6s ease-in-out 1.4s infinite;
}

/* Strzałka „przewiń w dół” */
.hero__scroll {
  position: absolute;
  left: 50%; bottom: 100px;
  z-index: 1;
  width: 44px; height: 44px;
  margin-left: -22px;
  opacity: .8;
  transition: opacity .2s ease;
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll::before,
.hero__scroll::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 24px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' shape-rendering='crispEdges'%3E%3Cpath fill='%239cffc9' d='M0 0h2v1h1v1h1v1h1v1h2V3h1V2h1V1h1V0h2v2h-1v1h-1v1h-1v1H8v1H7v1H5V6H4V5H3V4H2V3H1V2H0z'/%3E%3C/svg%3E") center / 24px 14px no-repeat;
  filter: drop-shadow(0 2px 0 var(--shadow));
  animation: cue 1.8s ease-in-out infinite;
}
.hero__scroll::before { top: 6px; }
.hero__scroll::after { top: 20px; animation-delay: .2s; }

/* ---------- Przycisk z adresem (klik kopiuje) ---------- */
.ip {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label icon" "address icon" "hint icon";
  align-items: center;
  column-gap: 18px;
  min-width: min(340px, 100%);
  padding: 12px 20px 12px 22px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame-accent.png") 3 / var(--frame-w) stretch;
  background: linear-gradient(180deg, #1a3b2a, #0f241a) padding-box;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform .15s ease, filter .15s ease;
}
.ip:hover, .ip:focus-visible { transform: translateY(-2px); filter: brightness(1.1); }
.ip:active { transform: translateY(1px); }
/* Po dużym przycisku co kilka sekund przesuwa się błysk, żeby zachęcał do kliknięcia */
.ip:not(.ip--small) { overflow: hidden; }
.ip:not(.ip--small)::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 38%;
  background: linear-gradient(100deg, transparent, rgba(234, 255, 242, .16) 45%, rgba(184, 245, 90, .14) 55%, transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: sweep 6s ease-in-out 2.4s infinite;
  pointer-events: none;
}
.ip__label {
  grid-area: label;
  color: var(--sage);
  font: 400 17px/1.1 var(--font-pixel);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ip__address {
  grid-area: address;
  font: 400 clamp(40px, 9vw, 52px)/1 var(--font-pixel);
  letter-spacing: .03em;
  /* Gradient marki płynie przez adres (kafel 200%, ten sam kolor na obu końcach, więc bez szwu) */
  background: linear-gradient(90deg, var(--green), var(--lime) 25%, var(--mint) 50%, var(--lime) 75%, var(--green)) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--shadow));
  animation: flow 7s linear infinite;
}
.ip__hint {
  grid-area: hint;
  color: var(--mint);
  font: 500 13px/1.3 var(--font-body);
}
.ip__icon {
  grid-area: icon;
  position: relative;
  width: 28px; height: 30px;
}
.ip__icon::before, .ip__icon::after {
  content: "";
  position: absolute;
  width: 18px; height: 20px;
  border: 3px solid var(--mint);
  background: #14301f;
}
.ip__icon::before { left: 0; top: 0; opacity: .55; }
.ip__icon::after { left: 9px; top: 9px; }
.ip.is-copied { border-image-source: url("../assets/ui/frame-gold.png"); }
.ip.is-copied .ip__hint { color: var(--gold); font-weight: 700; }
.ip.is-copied .ip__icon::after { border-color: var(--gold); }
.ip.is-copied .ip__address { animation: flow 7s linear infinite, pop .35s ease; }

/* Konfetti po skopiowaniu adresu: kontener i cząstki tworzy main.js (--dx, --dy) */
.confetti {
  position: fixed;
  z-index: 90;
  width: 0; height: 0;
  pointer-events: none;
}
.confetti i {
  position: absolute;
  left: 0; top: 0;
  translate: -50% -50%;
  box-shadow: 0 0 0 1px rgba(5, 12, 8, .55);
  animation: confetti .95s cubic-bezier(.2, .7, .3, 1) forwards;
}

.ip--small {
  grid-template-areas: "address hint";
  grid-template-columns: auto auto;
  justify-content: space-between;
  min-width: 0;
  padding: 6px 12px;
  column-gap: 14px;
}
.ip--small .ip__address { font-size: 28px; }
.ip--small .ip__hint { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Ruchome logo z klatkami błysku (sprite 9 klatek) ---------- */
.sprite {
  display: inline-block;
  width: calc(var(--w) * 1px);
  max-width: 100%;
  aspect-ratio: var(--w) / var(--h);
  background-repeat: no-repeat;
  background-size: 100% 900%;
  background-position: 0 0;
  vertical-align: middle;
}
.sprite--shine {
  animation: shine 6.5s steps(1, end) infinite;
  animation-delay: var(--delay, 0s);
}

/* ---------- Status sieci ---------- */
.status {
  position: relative;
  z-index: 2;
  margin-top: -84px;
}
.status__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}
.tile__icon { width: 48px; height: 48px; flex: none; }
.tile:hover .tile__icon { animation: hop .6s cubic-bezier(.3, .7, .4, 1.3); }
.tile__value {
  font: 400 40px/1 var(--font-pixel);
  color: var(--text);
  text-shadow: 0 2px 0 var(--shadow);
}
.tile__value--small { font-size: 28px; padding: 4px 0 2px; color: var(--mint); }
.tile__max { color: var(--sage); font-size: 24px; }
.tile__plus { color: var(--sage); font-size: 26px; }
.tile__label { color: var(--sage); font-size: 14px; }
.tile__state.is-online { color: var(--green); }
.tile__state.is-offline { color: var(--red); }

/* ---------- Sekcje ---------- */
.section { padding: 96px 0 0; }
.section:last-of-type { padding-bottom: 104px; }
.section__head {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}
.section__head--left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--lime);
  font: 400 20px/1 var(--font-pixel);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--shadow);
  transform: rotate(45deg);
  animation: gem 3.2s ease-in-out infinite;
}
.eyebrow--gold { color: var(--gold); }
.section__title {
  font: 400 clamp(40px, 6.2vw, 62px)/1 var(--font-pixel);
  letter-spacing: .02em;
  color: var(--text);
  text-shadow: 0 3px 0 var(--shadow);
}
.section__title::after {
  content: "";
  display: block;
  width: min(260px, 70%);
  height: 10px;
  margin: 18px auto 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath fill='%23050c08' d='M4 0h2v1h1v1h1v1h1v1h1v2H9v1H8v1H7v1H6v1H4V9H3V8H2V7H1V6H0V4h1V3h1V2h1V1h1z'/%3E%3Cpath fill='%232bd97c' d='M4 1h2v1h1v1h1v1h1v2H8v1H7v1H6v1H4V8H3V7H2V6H1V4h1V3h1V2h1z'/%3E%3Cpath fill='%23b8f55a' d='M4 2h1v1H4v1H3v1H2V4h1V3h1z'/%3E%3C/svg%3E") center / 10px 10px no-repeat,
    linear-gradient(90deg, transparent, var(--emerald) 12%, var(--green) 40%, var(--lime) 60%, var(--emerald) 88%, transparent) center / 100% 2px no-repeat;
}
.section__head--left .section__title::after { margin-left: 0; }
/* Linia pod tytułem rysuje się od środka, gdy nagłówek wjedzie w widok */
.js .section__head.reveal .section__title::after {
  background-size: 10px 10px, 0% 2px;
  transition: background-size 1s cubic-bezier(.2, .7, .2, 1) .35s;
}
.js .section__head.reveal.is-visible .section__title::after { background-size: 10px 10px, 100% 2px; }
.section__lead {
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 17px;
}

/* ---------- Dlaczego RiverMC ---------- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.feature h3 {
  margin: 16px 0 8px;
  font: 400 28px/1.05 var(--font-pixel);
  letter-spacing: .02em;
}
.feature p { color: var(--text-soft); font-size: 15px; }
.feature__icon {
  width: 72px; height: 72px;
  padding: 6px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame.png") 3 / var(--frame-w) stretch;
  background: radial-gradient(circle, rgba(43, 217, 124, .16), transparent 70%), var(--panel-bottom);
  background-clip: padding-box;
  animation: bob 4.8s ease-in-out infinite;
  transition: filter .25s ease;
}
/* Ikony unoszą się po kolei, a po najechaniu podskakują i świecą */
.feature:nth-child(2) .feature__icon { animation-delay: -1.2s; }
.feature:nth-child(3) .feature__icon { animation-delay: -2.4s; }
.feature:nth-child(4) .feature__icon { animation-delay: -3.6s; }
.feature:hover .feature__icon {
  border-image-source: url("../assets/ui/frame-accent.png");
  filter: drop-shadow(0 0 10px rgba(43, 217, 124, .45));
  animation: hop .6s cubic-bezier(.3, .7, .4, 1.3);
}

/* ---------- Tryby ---------- */
.modes__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 700px) { .modes__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .modes__grid { grid-template-columns: repeat(3, 1fr); } }

.mode {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, filter .25s ease;
}
.mode:hover {
  transform: translateY(-4px);
  border-image-source: url("../assets/ui/frame-accent.png");
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5));
}
.mode__art {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--panel-bottom);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}
/* Kopia ilustracji (to samo tło), która po najechaniu powoli się przybliża */
.mode__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1);
}
.mode:hover .mode__art::before { transform: scale(1.07); }
.mode__art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(18, 38, 28, .85) 72%, var(--panel-top));
}
/* Efekty na ilustracjach (dym, okruchy, flesze…): pozycje w % ilustracji, przybliżają się razem z nią */
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1);
}
.fx i { position: absolute; display: block; }
.mode:hover .fx { transform: scale(1.07); }
/* Cząstki mają bazowo opacity: 0, więc bez animacji (zrzuty, reduced-motion) ilustracja jest czysta.
   Poświaty mają szerokość w % i aspect-ratio 1; margines w % też liczy się od szerokości, więc środek siedzi na punkcie. */

/* Survival: świetliki nad łąką */
.fx--survival i {
  width: 3px; height: 3px;
  margin: -1px 0 0 -1px;
  background: var(--mint);
  box-shadow: 0 0 6px 2px rgba(156, 255, 201, .55);
  opacity: 0;
  animation: fx-firefly 7s ease-in-out infinite;
}
.fx--survival i:nth-child(even) { background: var(--lime); box-shadow: 0 0 6px 2px rgba(184, 245, 90, .5); }
.fx--survival i:nth-child(1) { left: 9%;  top: 58%; animation-delay: -1s; }
.fx--survival i:nth-child(2) { left: 22%; top: 50%; animation-delay: -4.2s; animation-duration: 8.4s; }
.fx--survival i:nth-child(3) { left: 36%; top: 62%; animation-delay: -2.3s; animation-duration: 6.6s; }
.fx--survival i:nth-child(4) { left: 64%; top: 48%; animation-delay: -5.6s; animation-duration: 9s; }
.fx--survival i:nth-child(5) { left: 76%; top: 60%; animation-delay: -3.1s; animation-duration: 7.4s; }
.fx--survival i:nth-child(6) { left: 88%; top: 52%; animation-delay: -6.3s; animation-duration: 8s; }
.fx--survival i:nth-child(7) { left: 50%; top: 44%; animation-delay: -.4s; animation-duration: 10s; }

/* Tycoon: dym z dwóch kominów (po 3 kłęby), wyładowanie przy kuli Tesli, monety unoszące się przy stacji */
.fx--tycoon .fx__smoke {
  top: 20.5%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  background: #4e5c54;
  box-shadow: inset -2px -2px 0 rgba(20, 28, 24, .4);
  opacity: 0;
  animation: fx-smoke 4.2s ease-out infinite;
}
.fx--tycoon .fx__smoke:nth-child(-n+3) { left: 47.7%; }
.fx--tycoon .fx__smoke:nth-child(n+4) { left: 53.3%; animation-duration: 4.8s; }
.fx--tycoon .fx__smoke:nth-child(2) { animation-delay: -1.4s; }
.fx--tycoon .fx__smoke:nth-child(3) { animation-delay: -2.8s; }
.fx--tycoon .fx__smoke:nth-child(4) { animation-delay: -.7s; }
.fx--tycoon .fx__smoke:nth-child(5) { animation-delay: -2.3s; }
.fx--tycoon .fx__smoke:nth-child(6) { animation-delay: -3.9s; }
.fx--tycoon .fx__tesla {
  left: 82%; top: 27.8%;
  width: 16%; aspect-ratio: 1;
  margin: -8% 0 0 -8%;
  background: radial-gradient(circle, rgba(234, 255, 242, .95) 0 5%, rgba(156, 255, 201, .55) 16%, rgba(43, 217, 124, .18) 40%, transparent 68%);
  opacity: 0;
  animation: fx-tesla 3.7s steps(1, end) infinite;
}
.fx--tycoon .fx__coin {
  width: 5px; height: 5px;
  margin: -2px 0 0 -2px;
  background: var(--gold);
  box-shadow: 0 0 0 1px #b07f12, 0 0 8px 2px rgba(255, 201, 60, .55);
  opacity: 0;
  animation: fx-coin 3.6s ease-out infinite;
}
.fx--tycoon .fx__coin:nth-child(8)  { left: 86%;   top: 58%; animation-delay: -.3s; }
.fx--tycoon .fx__coin:nth-child(9)  { left: 91%;   top: 54%; animation-delay: -1.5s; animation-duration: 4.2s; }
.fx--tycoon .fx__coin:nth-child(10) { left: 95.5%; top: 60%; animation-delay: -2.7s; animation-duration: 3.9s; }

/* OneBlock: wielki blok trawy jak przy kopaniu: co chwilę miętowy błysk na wierzchu i okruchy trawy i ziemi, które
   wyskakują łukiem i spadają (wszystkie w tym samym rytmie, więc to jedno „wykopanie”), a przy blokach kolejnych
   światów (Las, Zima, Pustynia, Nether) migoczą iskierki */
.fx--oneblock .fx__pop {
  left: 35%; top: 34.5%;
  width: 18%; aspect-ratio: 1;
  margin: -9% 0 0 -9%;
  background: radial-gradient(circle, rgba(234, 255, 242, .7) 0 6%, rgba(156, 255, 201, .35) 22%, transparent 62%);
  opacity: 0;
  animation: fx-pop 3.2s ease-out infinite;
}
.fx--oneblock .fx__crumb {
  left: 35%; top: 36.7%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: #5fd35b;
  box-shadow: inset -1px -1px 0 rgba(5, 12, 8, .35);
  opacity: 0;
  animation: fx-crumb 3.2s cubic-bezier(.25, .6, .5, 1) infinite;
}
.fx--oneblock .fx__crumb:nth-child(3n)   { background: #7a5636; }
.fx--oneblock .fx__crumb:nth-child(3n+1) { background: #8ff08a; }
.fx--oneblock .fx__crumb:nth-child(2) { --dx: -18px; --up: 13px; }
.fx--oneblock .fx__crumb:nth-child(3) { --dx: -9px;  --up: 18px; animation-delay: -.04s; }
.fx--oneblock .fx__crumb:nth-child(4) { --dx: -2px;  --up: 21px; animation-delay: -.02s; width: 3px; height: 3px; }
.fx--oneblock .fx__crumb:nth-child(5) { --dx: 7px;   --up: 17px; animation-delay: -.06s; }
.fx--oneblock .fx__crumb:nth-child(6) { --dx: 14px;  --up: 12px; animation-delay: -.03s; width: 3px; height: 3px; }
.fx--oneblock .fx__crumb:nth-child(7) { --dx: 21px;  --up: 15px; animation-delay: -.05s; }
.fx--oneblock .fx__spark {
  width: 3px; height: 3px;
  margin: -1px 0 0 -1px;
  background: var(--text);
  box-shadow: 0 0 5px 1px rgba(156, 255, 201, .8);
  opacity: 0;
  animation: fx-spark 2.4s ease-in-out infinite;
}
.fx--oneblock .fx__spark:nth-child(8)  { left: 20.6%;  top: 28.9%; animation-delay: -.2s; }
.fx--oneblock .fx__spark:nth-child(9)  { left: 53.75%; top: 22.2%; animation-delay: -1.1s; animation-duration: 2.9s; }
.fx--oneblock .fx__spark:nth-child(10) { left: 58.75%; top: 50%;   animation-delay: -1.8s; animation-duration: 2.1s; background: var(--lime); box-shadow: 0 0 5px 1px rgba(184, 245, 90, .75); }
.fx--oneblock .fx__spark:nth-child(11) { left: 61.25%; top: 33.3%; animation-delay: -.7s;  animation-duration: 3.3s; }

/* Derby: oddychające reflektory w górnych rogach i flesze aparatów na trybunach */
.fx--derby .fx__flood {
  top: 4%;
  width: 16%; aspect-ratio: 1;
  margin: -8% 0 0 -8%;
  background: radial-gradient(circle, rgba(234, 255, 242, .6) 0 8%, rgba(234, 255, 242, .2) 28%, transparent 66%);
  opacity: 0;
  animation: fx-flood 4.6s ease-in-out infinite;
}
.fx--derby .fx__flood:nth-child(1) { left: 3.2%; }
.fx--derby .fx__flood:nth-child(2) { left: 96.6%; animation-delay: -2.1s; animation-duration: 5.2s; }
.fx--derby .fx__flash {
  width: 3px; height: 3px;
  margin: -1px 0 0 -1px;
  background: #fff;
  box-shadow: 0 0 6px 3px rgba(234, 255, 242, .75);
  opacity: 0;
  animation: fx-flash 5s steps(1, end) infinite;
}
.fx--derby .fx__flash:nth-child(3)  { left: 8%;  top: 30%; animation-delay: -.4s;  animation-duration: 4.3s; }
.fx--derby .fx__flash:nth-child(4)  { left: 21%; top: 41%; animation-delay: -3.1s; animation-duration: 5.7s; }
.fx--derby .fx__flash:nth-child(5)  { left: 34%; top: 26%; animation-delay: -1.7s; animation-duration: 6.1s; }
.fx--derby .fx__flash:nth-child(6)  { left: 47%; top: 45%; animation-delay: -4.4s; animation-duration: 4.9s; }
.fx--derby .fx__flash:nth-child(7)  { left: 58%; top: 33%; animation-delay: -2.6s; animation-duration: 5.3s; }
.fx--derby .fx__flash:nth-child(8)  { left: 69%; top: 24%; animation-delay: -.9s;  animation-duration: 6.6s; }
.fx--derby .fx__flash:nth-child(9)  { left: 81%; top: 43%; animation-delay: -3.8s; animation-duration: 4.6s; }
.fx--derby .fx__flash:nth-child(10) { left: 92%; top: 31%; animation-delay: -5.2s; animation-duration: 5.9s; }

/* Lobby: fajerwerki rozkwitają w miejscach z ilustracji (pierścień + błysk w środku), portale pulsują w kolorze trybu */
.fx--lobby .fx__burst {
  --c: 255, 201, 60;
  width: 14%; aspect-ratio: 1;
  margin: -7% 0 0 -7%;
  background:
    radial-gradient(circle, transparent 0 34%, rgba(var(--c), .55) 44%, rgba(var(--c), .15) 54%, transparent 64%),
    radial-gradient(circle, rgba(var(--c), .5) 0, transparent 30%);
  opacity: 0;
  animation: fx-burst 4.2s ease-out infinite;
}
.fx--lobby .fx__burst:nth-child(1) { left: 7%;    top: 7.8%; width: 8%;  margin: -4% 0 0 -4%;  animation-delay: -.3s;  animation-duration: 4.8s; }
.fx--lobby .fx__burst:nth-child(2) { left: 21.9%; top: 22%;  width: 15%; margin: -7.5% 0 0 -7.5%; --c: 43, 217, 124; animation-delay: -1.6s; }
.fx--lobby .fx__burst:nth-child(3) { left: 51.6%; top: 13.9%; width: 19%; margin: -9.5% 0 0 -9.5%; animation-delay: -2.8s; animation-duration: 5s; }
.fx--lobby .fx__burst:nth-child(4) { left: 78%;   top: 25%;  width: 15%; margin: -7.5% 0 0 -7.5%; --c: 156, 255, 201; animation-delay: -.9s;  animation-duration: 4.5s; }
.fx--lobby .fx__burst:nth-child(5) { left: 92.5%; top: 9.7%; width: 9%;  margin: -4.5% 0 0 -4.5%; --c: 43, 217, 124; animation-delay: -3.6s; animation-duration: 5.4s; }
.fx--lobby .fx__burst:nth-child(6) { left: 36.9%; top: 34.7%; width: 8%; margin: -4% 0 0 -4%;  --c: 184, 245, 90; animation-delay: -2.1s; animation-duration: 3.9s; }
.fx--lobby .fx__portal {
  top: 66%;
  width: 14%; aspect-ratio: 1;
  margin: -7% 0 0 -7%;
  background: radial-gradient(circle, rgba(var(--c), .5) 0, rgba(var(--c), .18) 40%, transparent 68%);
  opacity: 0;
  animation: fx-portal 3s ease-in-out infinite;
}
.fx--lobby .fx__portal:nth-child(7) { left: 19.5%; --c: 43, 217, 124; }
.fx--lobby .fx__portal:nth-child(8) { left: 80.8%; --c: 255, 201, 60; animation-delay: -1.5s; }

/* Anarchia: pulsujący kryształ i żar unoszący się z dziur w ziemi */
.fx--anarchia .fx__crystal {
  left: 50%; top: 43.6%;
  width: 22%; aspect-ratio: 1;
  margin: -11% 0 0 -11%;
  background: radial-gradient(circle, rgba(255, 210, 210, .7) 0 4%, rgba(255, 92, 92, .5) 14%, rgba(255, 92, 92, .16) 36%, transparent 64%);
  opacity: 0;
  animation: fx-crystal 2.8s ease-in-out infinite;
}
.fx--anarchia .fx__ember {
  width: 3px; height: 3px;
  margin: -1px 0 0 -1px;
  background: var(--red);
  box-shadow: 0 0 5px 1px rgba(255, 92, 92, .7);
  opacity: 0;
  animation: fx-ember 3.4s ease-out infinite;
}
.fx--anarchia .fx__ember:nth-child(3n) { background: var(--gold); box-shadow: 0 0 5px 1px rgba(255, 150, 60, .7); }
.fx--anarchia .fx__ember:nth-child(2) { left: 19.5%; top: 84%; animation-delay: -.2s; }
.fx--anarchia .fx__ember:nth-child(3) { left: 21%;   top: 85%; animation-delay: -1.9s; animation-duration: 3.9s; }
.fx--anarchia .fx__ember:nth-child(4) { left: 18%;   top: 85%; animation-delay: -2.8s; animation-duration: 3.1s; }
.fx--anarchia .fx__ember:nth-child(5) { left: 66.9%; top: 66%; animation-delay: -.8s;  animation-duration: 3.6s; }
.fx--anarchia .fx__ember:nth-child(6) { left: 68%;   top: 67%; animation-delay: -2.4s; animation-duration: 4.2s; }
.fx--anarchia .fx__ember:nth-child(7) { left: 76.6%; top: 91%; animation-delay: -1.3s; animation-duration: 3.8s; }
.fx--anarchia .fx__ember:nth-child(8) { left: 75%;   top: 91%; animation-delay: -3.1s; animation-duration: 3.3s; }

@keyframes fx-firefly {
  0%   { opacity: 0;   transform: translate(0, 0); }
  20%  { opacity: .9; }
  45%  { opacity: .35; transform: translate(7px, -10px); }
  60%  { opacity: .9; }
  85%  { opacity: .6; }
  100% { opacity: 0;   transform: translate(-5px, -24px); }
}
@keyframes fx-smoke {
  0%   { opacity: 0;   transform: translate(0, 0) scale(.5); }
  12%  { opacity: .85; }
  100% { opacity: 0;   transform: translate(18px, -46px) scale(2); }
}
@keyframes fx-tesla {
  0%   { opacity: 0;  transform: scale(1); }
  8%   { opacity: .9; transform: scale(1.1); }
  10%  { opacity: .2; transform: scale(.9); }
  12%  { opacity: 1;  transform: scale(1.2); }
  15%  { opacity: 0;  transform: scale(1); }
  52%  { opacity: .6; }
  54%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes fx-coin {
  0%   { opacity: 0;  transform: translate(0, 0) scaleX(1); }
  15%  { opacity: 1; }
  25%  { transform: translate(1px, -8px) scaleX(.25); }
  50%  { transform: translate(3px, -16px) scaleX(1); }
  75%  { transform: translate(1px, -26px) scaleX(.25); }
  80%  { opacity: .8; }
  100% { opacity: 0;  transform: translate(-2px, -34px) scaleX(1); }
}
/* Wykopanie bloku OneBlocka: błysk i okruchy w pierwszych ~60% cyklu, potem przerwa do następnego bloku */
@keyframes fx-pop {
  0%        { opacity: 0;  transform: scale(.4); }
  3%        { opacity: .9; }
  25%, 100% { opacity: 0;  transform: scale(1.3); }
}
@keyframes fx-crumb {
  0%        { opacity: 0;  transform: translate(0, 0) rotate(0); }
  4%        { opacity: 1; }
  22%       { transform: translate(calc(var(--dx, 0px) * .55), calc(var(--up, 14px) * -1)) rotate(90deg); }
  48%       { opacity: .9; }
  60%, 100% { opacity: 0;  transform: translate(var(--dx, 0px), 14px) rotate(200deg); }
}
@keyframes fx-spark {
  0%, 100% { opacity: 0;  transform: translateY(0) scale(.6); }
  45%      { opacity: 1;  transform: translateY(-5px) scale(1.2); }
  60%      { opacity: .4; }
  75%      { opacity: 0;  transform: translateY(-9px) scale(.6); }
}
@keyframes fx-flood {
  0%, 100% { opacity: .35; transform: scale(.9); }
  50%      { opacity: .8;  transform: scale(1.08); }
  53%      { opacity: .5; }
  56%      { opacity: .85; }
}
@keyframes fx-flash {
  0%       { opacity: 0;  transform: scale(1); }
  2%       { opacity: 1;  transform: scale(1.6); }
  4%       { opacity: .5; transform: scale(1); }
  6%, 100% { opacity: 0; }
}
@keyframes fx-burst {
  0%        { opacity: 0; transform: scale(.2); }
  6%        { opacity: 1; }
  30%, 100% { opacity: 0; transform: scale(1.35); }
}
@keyframes fx-portal {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50%      { opacity: .9;  transform: scale(1.1); }
}
@keyframes fx-crystal {
  0%, 100% { opacity: .45; transform: scale(.9); }
  45%      { opacity: 1;   transform: scale(1.08); }
  50%      { opacity: .7; }
  55%      { opacity: 1; }
}
@keyframes fx-ember {
  0%   { opacity: 0; transform: translate(0, 0); }
  15%  { opacity: 1; }
  50%  { transform: translate(4px, -26px); }
  100% { opacity: 0; transform: translate(-3px, -56px); }
}
.mode__head {
  position: relative;
  z-index: 1;
  margin-top: -44px;
  padding: 0 18px;
  text-align: center;
}
.mode__head::after {
  content: "";
  display: block;
  height: 3px;
  margin: 12px auto 0;
  width: 64%;
  background: linear-gradient(90deg, transparent, var(--a1), var(--a2), transparent);
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}
.mode:hover .mode__head::after { width: 92%; }
.mode__title { line-height: 0; }
.mode__title .sprite { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.mode__tag {
  margin-top: 10px;
  font: 400 19px/1.1 var(--font-pixel);
  letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mode__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px 22px;
}
.mode__body > p { color: var(--text-soft); font-size: 15px; }

.ribbon {
  position: absolute;
  z-index: 2;
  left: 12px; top: 12px;
  padding: 4px 12px;
  background: linear-gradient(180deg, #c43c3c, #9e2c2c);
  color: #fff6ea;
  font: 400 19px/1.2 var(--font-pixel);
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 0 0 2px var(--shadow), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .25);
  transform-origin: 0 50%;
  animation: nudge 4.5s ease-in-out infinite;
}
.mode--soon .mode__body > p,
.mode--soon .perks li { color: #bccfc3; }

/* Lista z ikonami */
.perks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.perks li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding-left: 44px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}
.perks img {
  position: absolute;
  left: 0; top: 50%;
  width: 32px; height: 32px;
  margin-top: -16px;
}
/* Po najechaniu karty ikony listy podskakują po kolei */
.mode:hover .perks img,
.rank:hover .perks img { animation: hop .55s cubic-bezier(.3, .7, .4, 1.3) both; }
.perks li:nth-child(2) img { animation-delay: .07s; }
.perks li:nth-child(3) img { animation-delay: .14s; }
.perks li:nth-child(4) img { animation-delay: .21s; }
.perks li:nth-child(5) img { animation-delay: .28s; }

/* 9 faz OneBlocka i Prestiż jako sloty (2 rzędy po 5) */
.phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.phases li {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: rgba(5, 12, 8, .55);
  box-shadow: inset 0 0 0 2px var(--frame), inset 0 -3px 0 rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.phases li:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--mint); }
.phases img { width: 32px; height: 32px; animation: phase-hop 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .5s); }
/* Fala światła przechodzi przez fazy po kolei, od Równin do Endu, a na końcu złoty Prestiż (--i ustawia main.js) */
.phases li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(156, 255, 201, .24), transparent 70%);
  box-shadow: inset 0 0 0 2px var(--mint), 0 0 12px rgba(156, 255, 201, .45);
  opacity: 0;
  pointer-events: none;
  animation: phase 6s linear infinite;
  animation-delay: calc(var(--i, 0) * .5s);
}
.phases .phases__prestige { box-shadow: inset 0 0 0 2px #8a6a1e, inset 0 -3px 0 rgba(0, 0, 0, .35); }
.phases .phases__prestige:hover { box-shadow: inset 0 0 0 2px var(--gold); }
.phases .phases__prestige::after {
  background: radial-gradient(circle, rgba(255, 201, 60, .3), transparent 70%);
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 14px rgba(255, 201, 60, .55);
}

/* Ligi Derby jako piramida (od Reprezentacji na górze do Klasy B na dole) */
.leagues {
  display: grid;
  grid-template-columns: repeat(8, 28px);
  justify-content: center;
  row-gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.leagues li { grid-column: span 2; display: grid; place-items: center; }
.leagues img {
  width: 48px; height: 48px;
  transition: transform .15s ease;
  /* Awans: blask idzie od Klasy B w górę piramidy do Reprezentacji (--i ustawia main.js) */
  animation: promote 5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .35s);
}
.leagues img:hover { transform: translateY(-3px) scale(1.04); }
.leagues li:nth-child(1) { grid-row: 1; grid-column: 3 / span 2; }
.leagues li:nth-child(2) { grid-row: 1; grid-column: 5 / span 2; }
.leagues li:nth-child(3) { grid-row: 2; grid-column: 2 / span 2; }
.leagues li:nth-child(4) { grid-row: 2; grid-column: 4 / span 2; }
.leagues li:nth-child(5) { grid-row: 2; grid-column: 6 / span 2; }
.leagues li:nth-child(6) { grid-row: 3; grid-column: 1 / span 2; }
.leagues li:nth-child(7) { grid-row: 3; grid-column: 3 / span 2; }
.leagues li:nth-child(8) { grid-row: 3; grid-column: 5 / span 2; }
.leagues li:nth-child(9) { grid-row: 3; grid-column: 7 / span 2; }

/* ---------- Rangi ---------- */
.ranks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.rank {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, filter .25s ease;
}
.rank:hover { transform: translateY(-4px); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); }
/* Złoty połysk przechodzi po kartach rang po kolei */
.rank { overflow: hidden; }
.rank::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 224, 138, .12) 47%, rgba(255, 255, 255, .09) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: sheen 7s ease-in-out 1s infinite;
  pointer-events: none;
}
.rank:nth-child(2)::before { animation-delay: 1.6s; }
.rank:nth-child(3)::before { animation-delay: 2.2s; }
.rank__top {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 18px 20px;
  text-align: center;
  background:
    radial-gradient(70% 80% at 50% 0%, color-mix(in srgb, var(--r1) 22%, transparent), transparent 70%);
  border-bottom: 2px solid rgba(255, 201, 60, .22);
}
.rank__emblem {
  position: relative;
  width: 64px; height: 64px;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--r1) 45%, transparent));
  animation: bob 4.5s ease-in-out infinite;
}
.rank:nth-child(2) .rank__emblem { animation-delay: -1.5s; }
.rank:nth-child(3) .rank__emblem { animation-delay: -3s; }
/* Iskry wokół emblematu (kolor rangi) */
.rank__sparks { position: absolute; left: 50%; top: 26px; width: 0; height: 0; pointer-events: none; }
.rank__sparks i {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--r2);
  box-shadow: 0 0 6px 2px color-mix(in srgb, var(--r1) 60%, transparent);
  opacity: 0;
  animation: spark 2.8s ease-in-out infinite;
}
.rank__sparks i:nth-child(1) { left: -46px; top: 8px; }
.rank__sparks i:nth-child(2) { left: 40px; top: 2px; animation-delay: .7s; }
.rank__sparks i:nth-child(3) { left: 34px; top: 50px; animation-delay: 1.4s; }
.rank__sparks i:nth-child(4) { left: -38px; top: 54px; animation-delay: 2.1s; }
.rank__title { line-height: 0; }
.rank__badge { width: auto; height: 24px; }
.perks--rank { padding: 20px; }

.ranks__info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 24px;
  padding: 20px 22px;
}
@media (min-width: 860px) {
  .ranks__info { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
}
.ranks__label {
  margin-bottom: 10px;
  color: var(--gold);
  font: 400 21px/1.1 var(--font-pixel);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ranks__shop { display: grid; gap: 10px; justify-items: start; max-width: 360px; }
@media (min-width: 860px) { .ranks__shop { justify-items: center; text-align: center; } }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 4px 12px;
  background: rgba(5, 12, 8, .6);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--text);
  font: 400 20px/1.3 var(--font-pixel);
  letter-spacing: .03em;
}
.chips .chip--gold { color: var(--gold); box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .55); }
/* „na zawsze” z przesuwającym się połyskiem */
.chips .chip--gold span {
  background: linear-gradient(90deg, var(--gold), var(--gold) 35%, #fff3c4 50%, var(--gold) 65%, var(--gold)) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flow 3.5s linear infinite;
}

/* Wybór czasu i rangi w sklepie: te same chipy, tylko klikalne */
.chips .chip {
  padding: 4px 12px;
  border: 0;
  background: rgba(5, 12, 8, .6);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--text);
  font: 400 20px/1.3 var(--font-pixel);
  letter-spacing: .03em;
  cursor: pointer;
  transition: box-shadow .15s ease, color .15s ease, transform .15s ease, background .15s ease;
}
.chips .chip:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--sage-dark); }
.chips .chip[aria-checked="true"] {
  background: rgba(43, 217, 124, .16);
  box-shadow: inset 0 0 0 2px var(--green), 0 0 12px rgba(43, 217, 124, .25);
  color: var(--lime);
}
.chips .chip--gold[aria-checked="true"] {
  background: rgba(255, 201, 60, .14);
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 12px rgba(255, 201, 60, .3);
}

/* Cena na karcie rangi (zmienia się z wybranym czasem) */
.rank__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 0;
}
.rank__price strong {
  color: var(--gold);
  font: 400 32px/1 var(--font-pixel);
  letter-spacing: .02em;
  text-shadow: 0 2px 0 var(--shadow), 0 0 14px rgba(255, 201, 60, .25);
}
.rank__price small { color: var(--sage); font-size: 14px; }
.rank__price.is-bump strong { display: inline-block; animation: price-bump .35s cubic-bezier(.3, .7, .4, 1.4); }
@keyframes price-bump { 0% { transform: scale(.85); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }

/* Sklep: ranga, nick, podsumowanie, płatność */
.shop { width: 100%; }
.shop .chips { margin-bottom: 4px; }
.shop__nick { display: grid; gap: 6px; width: 100%; text-align: left; }
.shop__nick span { color: var(--sage); font-size: 14px; }
.shop__nick input {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: rgba(5, 12, 8, .75);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--text);
  font: 400 22px/1.1 var(--font-pixel);
  letter-spacing: .04em;
}
.shop__nick input::placeholder { color: var(--sage-dark); }
.shop__nick input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--green), 0 0 12px rgba(43, 217, 124, .25); }
.shop__nick input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red); }
.shop__sum { margin: 2px 0; color: var(--text-soft); font: 400 21px/1.2 var(--font-pixel); letter-spacing: .03em; }
.shop__sum strong { color: var(--gold); }
.shop__note { font-size: 14px; }
@media (min-width: 860px) { .shop .chips { justify-content: center; } }

/* ---------- Jak dołączyć ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 18px 20px;
}
.step__no {
  position: absolute;
  right: 14px; top: 8px;
  font: 400 60px/1 var(--font-pixel);
  background: linear-gradient(180deg, var(--green), var(--emerald));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .55;
}
.js .step.is-visible .step__no { animation: num-in .7s cubic-bezier(.3, .7, .4, 1.4) both; animation-delay: calc(var(--reveal-delay, 0s) + .25s); }
.step__icon { width: 48px; height: 48px; margin: 3px 0; }
.step:hover .step__icon { animation: hop .6s cubic-bezier(.3, .7, .4, 1.3); }
.step h3 { font: 400 27px/1.05 var(--font-pixel); letter-spacing: .02em; }
.step p { color: var(--text-soft); font-size: 15px; }
.step .ip--small { margin-top: 4px; }
/* Trzy kafelki okna wyboru lobby jak talia: dzień na wierzchu, zachód i noc wystają z prawej */
.step__lobbies { display: flex; height: 54px; margin: 2px 0 2px 2px; }
.step__lobbies img {
  position: relative;
  width: 78px; height: 54px;
  box-shadow: 0 0 0 2px var(--shadow), 0 0 0 4px var(--frame);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), filter .35s ease;
}
.step__lobbies img:nth-child(1) { z-index: 3; }
.step__lobbies img:nth-child(2) { z-index: 2; margin-left: -54px; transform: translate(0, 3px); filter: brightness(.85); }
.step__lobbies img:nth-child(3) { z-index: 1; margin-left: -54px; transform: translate(0, 6px); filter: brightness(.7); }
/* Talia rozkłada się jak karty: raz po wejściu kroku w widok i za każdym najechaniem */
.step:hover .step__lobbies img:nth-child(1) { transform: rotate(-3deg); }
.step:hover .step__lobbies img:nth-child(2) { transform: translate(22px, -2px) rotate(2deg); filter: brightness(.95); }
.step:hover .step__lobbies img:nth-child(3) { transform: translate(44px, 0) rotate(6deg); filter: brightness(.9); }
.js .step.is-visible .step__lobbies img:nth-child(2) { animation: deal-2 1.6s cubic-bezier(.2, .7, .2, 1) 1s; }
.js .step.is-visible .step__lobbies img:nth-child(3) { animation: deal-3 1.6s cubic-bezier(.2, .7, .2, 1) 1s; }

/* ---------- Administracja ---------- */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.member { position: relative; display: flex; flex-direction: column; transition: transform .25s ease, filter .25s ease; }
.member:hover { transform: translateY(-4px); border-image-source: url("../assets/ui/frame-accent.png"); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); }

/* Scena z głową: plakietka z nickiem jak nad graczem w grze, głowa, cień, dymek */
.member__stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 22px 16px 10px;
  background:
    radial-gradient(55% 60% at 50% 58%, rgba(43, 217, 124, .18), transparent 72%),
    linear-gradient(180deg, rgba(5, 12, 8, 0), rgba(5, 12, 8, .4));
  border-bottom: 2px solid rgba(30, 74, 52, .8);
  overflow: hidden;
}
.nametag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 2px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font: 400 20px/1 var(--font-pixel);
  letter-spacing: .02em;
  animation: head-bob 3.2s ease-in-out infinite;
}
.nametag img { width: auto; height: 14px; }

/* Głowa: sześcian 8x8 „pikseli” z głowy skórki 64x64 (druga warstwa nałożona na pierwszą) */
.head {
  --s: 11px;
  --L: calc(8 * var(--s));
  position: relative;
  width: var(--L); height: var(--L);
  margin: 18px 0 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 560px;
  animation: head-bob 3.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.head:focus-visible { outline-offset: 10px; }
.head--bedi1470 { --skin: url("../assets/team/bedi1470.png"); }
.head--abilpl { --skin: url("../assets/team/ABILpl.png"); }
.head--villager { --skin: url("../assets/team/Villager.png"); }
.head--pomocnik { --skin: url("../assets/team/Pomocnik.png"); }
.head__cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(-10deg);           /* poza bez JS i w podglądzie; ruch liczy main.js */
}
.head__face {
  position: absolute;
  inset: 0;
  background-image: var(--skin), var(--skin);
  background-size: calc(64 * var(--s)) calc(64 * var(--s));
  background-repeat: no-repeat;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  backface-visibility: hidden;
}
/* Cieniowanie ścian jak w grze: boki ciemniejsze, spód najciemniejszy */
.head__face::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--shade, 0)); }
.head__face--front  { transform: translateZ(calc(var(--L) / 2));                  background-position: calc(-40 * var(--s)) calc(-8 * var(--s)), calc(-8 * var(--s)) calc(-8 * var(--s)); }
.head__face--back   { transform: rotateY(180deg) translateZ(calc(var(--L) / 2));  background-position: calc(-56 * var(--s)) calc(-8 * var(--s)), calc(-24 * var(--s)) calc(-8 * var(--s)); --shade: .3; }
.head__face--right  { transform: rotateY(-90deg) translateZ(calc(var(--L) / 2));  background-position: calc(-32 * var(--s)) calc(-8 * var(--s)), 0 calc(-8 * var(--s)); --shade: .2; }
.head__face--left   { transform: rotateY(90deg) translateZ(calc(var(--L) / 2));   background-position: calc(-48 * var(--s)) calc(-8 * var(--s)), calc(-16 * var(--s)) calc(-8 * var(--s)); --shade: .2; }
.head__face--top    { transform: rotateX(90deg) translateZ(calc(var(--L) / 2));   background-position: calc(-40 * var(--s)) 0, calc(-8 * var(--s)) 0; }
.head__face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--L) / 2));  background-position: calc(-48 * var(--s)) 0, calc(-16 * var(--s)) 0; --shade: .45; }
/* Nos wieśniaka: klocek 2x4x2 przyklejony do przodu głowy */
.head__nose {
  position: absolute;
  left: calc(3 * var(--s)); top: calc(4 * var(--s));
  width: calc(2 * var(--s)); height: calc(4 * var(--s));
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--L) / 2 + var(--s)));
}
.head__nose i { position: absolute; display: block; backface-visibility: hidden; }
.nose__front { inset: 0; background: linear-gradient(transparent 75%, #8d5a44 75%), #b07a5f; transform: translateZ(var(--s)); }
.nose__left, .nose__right { left: 0; top: 0; width: calc(2 * var(--s)); height: 100%; background: #93624b; }
.nose__left { transform: rotateY(-90deg) translateZ(var(--s)); }
.nose__right { transform: rotateY(90deg) translateZ(var(--s)); }
.nose__top, .nose__bottom { left: 0; top: var(--s); width: 100%; height: calc(2 * var(--s)); }
.nose__top { background: #c4927a; transform: rotateX(90deg) translateZ(calc(2 * var(--s))); }
.nose__bottom { background: #7d523e; transform: rotateX(-90deg) translateZ(calc(2 * var(--s))); }

.head__shadow {
  width: calc(var(--L, 88px) * .95);
  height: 14px;
  margin-top: 4px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
  animation: shadow-bob 3.2s ease-in-out infinite;
}
/* Klik: podskok (a sześcian robi obrót w main.js) */
.head.is-poked { animation: head-jump .75s cubic-bezier(.3, .7, .4, 1); }

/* Dymek z powitaniem */
.bubble {
  position: absolute;
  top: 44px; left: calc(50% + 46px);
  padding: 5px 10px 4px;
  background: var(--text);
  color: var(--shadow);
  font: 400 21px/1 var(--font-pixel);
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--shadow), 4px 4px 0 rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(8px) scale(.7);
  transform-origin: 0 100%;
  transition: opacity .2s ease, transform .3s cubic-bezier(.3, .7, .4, 1.5);
  pointer-events: none;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 6px; bottom: -8px;
  width: 8px; height: 8px;
  background: var(--text);
  box-shadow: 2px 2px 0 var(--shadow), -2px 0 0 var(--shadow);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.is-talking .bubble { opacity: 1; transform: none; }
.is-talking .head__nose { animation: nose-talk .25s ease-in-out 4; }

/* Cząsteczki szczęśliwego wieśniaka (zielone gwiazdki jak w grze) */
.member__fx { position: absolute; inset: 0; pointer-events: none; }
.member__fx i {
  position: absolute;
  bottom: 30%;
  width: 3px; height: 3px;
  background: #5fd35b;
  box-shadow: 3px 0 0 #5fd35b, -3px 0 0 #5fd35b, 0 3px 0 #5fd35b, 0 -3px 0 #5fd35b, 0 0 8px rgba(95, 211, 91, .7);
  opacity: 0;
  animation: happy 3.4s ease-out infinite;
}
.member__fx i:nth-child(1) { left: 34%; animation-delay: -.3s; }
.member__fx i:nth-child(2) { left: 64%; animation-delay: -1.1s; animation-duration: 3.9s; }
.member__fx i:nth-child(3) { left: 42%; animation-delay: -2s; animation-duration: 3.1s; }
.member__fx i:nth-child(4) { left: 58%; animation-delay: -2.7s; animation-duration: 4.2s; }
.member__fx i:nth-child(5) { left: 50%; animation-delay: -1.6s; animation-duration: 3.6s; }

/* Opis pod sceną */
.member__body { display: grid; gap: 12px; padding: 16px 18px 20px; }
.member__nick { text-align: center; font: 400 36px/1 var(--font-pixel); letter-spacing: .02em; text-shadow: 0 3px 0 var(--shadow); }
.member__role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: -4px;
  color: var(--gold);
  font: 400 19px/1.1 var(--font-pixel);
  letter-spacing: .1em;
  text-transform: uppercase;
}
/* Animowany medal CEO z panelu ekipy w grze (32 klatki co 0,1 s, z błyskiem) */
.medal {
  --m: 32px;
  flex: none;
  width: var(--m); height: var(--m);
  background: url("../assets/pack/medal-ceo.png") 0 0 / var(--m) calc(32 * var(--m)) no-repeat;
  image-rendering: pixelated;
  animation: medal 3.2s steps(32) infinite;
}
/* Medal Pomocnika: koło ratunkowe, te same 32 klatki */
.medal--pomocnik { background-image: url("../assets/pack/medal-pomocnik.png"); }
.member__info { display: grid; gap: 14px; margin: 0; }
.member__info dt {
  color: var(--sage);
  font: 400 16px/1 var(--font-pixel);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.member__info dd { margin: 6px 0 0; }
.member__scope { color: var(--text-soft); font-size: 14px; }
.mode-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.mode-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 1px;
  background: rgba(5, 12, 8, .6);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--text);
  font: 400 17px/1.3 var(--font-pixel);
  letter-spacing: .03em;
}
.mode-chips li::before { content: ""; width: 6px; height: 6px; background: var(--c); box-shadow: 0 0 6px var(--c); }
/* Chipy trybów wskakują po kolei, gdy karta wjedzie w widok */
.js .member.is-visible .mode-chips li { animation: chip-in .45s cubic-bezier(.3, .7, .4, 1.4) both; animation-delay: calc(var(--reveal-delay, 0s) + .35s); }
.js .member.is-visible .mode-chips li:nth-child(2) { animation-delay: calc(var(--reveal-delay, 0s) + .41s); }
.js .member.is-visible .mode-chips li:nth-child(3) { animation-delay: calc(var(--reveal-delay, 0s) + .47s); }
.js .member.is-visible .mode-chips li:nth-child(4) { animation-delay: calc(var(--reveal-delay, 0s) + .53s); }
.js .member.is-visible .mode-chips li:nth-child(5) { animation-delay: calc(var(--reveal-delay, 0s) + .59s); }
.js .member.is-visible .mode-chips li:nth-child(6) { animation-delay: calc(var(--reveal-delay, 0s) + .65s); }
.member__contact { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  background: rgba(5, 12, 8, .7);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--mint);
  font: 600 14px/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .15s ease, color .15s ease, transform .15s ease;
}
.cmd img { width: 16px; height: 16px; }
.cmd:hover, .cmd:focus-visible { color: var(--lime); box-shadow: inset 0 0 0 2px var(--green); transform: translateY(-2px); }
.cmd.is-copied { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

.team__contact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding: 18px 20px;
}
.team__contact-icon { width: 48px; height: 48px; }
.team__contact-title { margin-bottom: 4px; font: 400 25px/1.1 var(--font-pixel); letter-spacing: .02em; }
@media (max-width: 719px) {
  .team__contact { grid-template-columns: auto 1fr; }
  .team__contact .btn { grid-column: 1 / -1; justify-self: start; }
}

/* Rekrutacja Pomocników (MAI-194): scena z głową „?” jak w kartach, opis i przycisk na Discord.
   Telefon: jedno pod drugim; od 720 px scena z lewej; od 1040 px przycisk w trzeciej kolumnie. */
.recruit {
  --rank: #7cd6e8;                                     /* kolor rangi Pomocnik z ranks.yml */
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "stage" "body" "cta";
  margin-top: 24px;
  overflow: hidden;
}
.recruit:hover { border-image-source: url("../assets/ui/frame-accent.png"); }
/* Miętowy połysk co jakiś czas przechodzi po panelu (jak złoty po rangach) */
.recruit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, transparent 38%, rgba(156, 255, 201, .09) 47%, rgba(255, 255, 255, .07) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: sheen 9s ease-in-out 2.5s infinite;
  pointer-events: none;
}
.recruit__stage {
  grid-area: stage;
  align-self: stretch;
  align-content: center;
  overflow: visible;                                   /* dymek może wejść nad opis; cząstki tnie .recruit__fx */
  background:
    radial-gradient(55% 60% at 50% 58%, rgba(124, 214, 232, .14), transparent 72%),
    radial-gradient(70% 70% at 50% 60%, rgba(43, 217, 124, .16), transparent 75%),
    linear-gradient(180deg, rgba(5, 12, 8, 0), rgba(5, 12, 8, .4));
}
.recruit .bubble { z-index: 3; }
/* Znaki zapytania unoszą się nad głową */
.recruit__fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.recruit__fx i {
  position: absolute;
  bottom: 26%;
  color: var(--mint);
  font: 400 24px/1 var(--font-pixel);
  font-style: normal;
  text-shadow: 0 2px 0 var(--shadow), 0 0 10px rgba(156, 255, 201, .55);
  opacity: 0;
  animation: ask 4.4s ease-out infinite;
}
.recruit__fx i::before { content: "?"; }
.recruit__fx i:nth-child(1) { left: 26%; animation-delay: -.4s; }
.recruit__fx i:nth-child(2) { left: 70%; animation-delay: -1.5s; animation-duration: 5s; color: var(--rank); }
.recruit__fx i:nth-child(3) { left: 36%; animation-delay: -2.6s; animation-duration: 3.8s; font-size: 18px; }
.recruit__fx i:nth-child(4) { left: 62%; animation-delay: -3.4s; animation-duration: 4.8s; font-size: 18px; color: var(--lime); }
.recruit__fx i:nth-child(5) { left: 48%; animation-delay: -2s; animation-duration: 5.4s; font-size: 30px; }

.recruit__body {
  grid-area: body;
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 20px 18px 18px;
}
.recruit__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 3px;
  background: rgba(43, 217, 124, .1);
  box-shadow: inset 0 0 0 2px rgba(43, 217, 124, .45);
  color: var(--green);
  font: 400 18px/1.1 var(--font-pixel);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.recruit__status .dot { width: 8px; height: 8px; }
.recruit__title {
  font: 400 clamp(34px, 4.6vw, 46px)/1 var(--font-pixel);
  letter-spacing: .02em;
  text-shadow: 0 3px 0 var(--shadow);
}
/* „Pomocników” w gradiencie marki, który płynie jak adres w sekcji głównej */
.recruit__title span {
  background: linear-gradient(90deg, var(--green), var(--lime) 25%, var(--mint) 50%, var(--lime) 75%, var(--green)) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 var(--shadow));
  animation: flow 7s linear infinite;
}
.recruit__role { justify-content: flex-start; margin-top: 0; color: var(--rank); }
.recruit__text { max-width: 60ch; color: var(--text-soft); font-size: 15.5px; }

.recruit__cta {
  grid-area: cta;
  position: relative;
  z-index: 2;
  justify-self: stretch;
  justify-content: center;
  margin: 0 18px 20px;
  border-image-source: url("../assets/ui/frame-accent.png");
}
.recruit__cta span { min-width: 0; }
/* Fala światła wokół przycisku zaprasza do kliknięcia */
.recruit__cta::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--frame-w));
  border: 2px solid var(--green);
  opacity: 0;
  animation: recruit-ping 2.8s ease-out 1s infinite;
  pointer-events: none;
}
@media (min-width: 720px) {
  .recruit { grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "stage body" "stage cta"; }
  .recruit__stage { border-bottom: 0; border-right: 2px solid rgba(30, 74, 52, .8); }
  .recruit__body { padding: 22px 26px 16px; }
  .recruit__cta { justify-self: start; margin: 0 26px 24px; }
}
@media (min-width: 1040px) {
  .recruit { grid-template-columns: 280px minmax(0, 1fr) auto; grid-template-areas: "stage body cta"; align-items: center; }
  .recruit__body { padding: 26px 28px; }
  .recruit__cta { margin: 0 30px 0 0; }
}
@media (max-width: 400px) {
  .recruit__cta { gap: 10px; margin-inline: 12px; padding-inline: 12px; font-size: 22px; }
}
/* Bez JS głowy rozglądają się same (z JS ruch liczy main.js i patrzą na kursor) */
html:not(.js) .head__cube { animation: look 9s ease-in-out infinite; }

/* ---------- FAQ ---------- */
.faq__inner {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .faq__inner { grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
  .faq__inner .section__head { position: sticky; top: calc(var(--topbar-h) + 32px); }
}
@media (max-width: 959px) {
  .faq__inner .section__head--left { text-align: center; margin-inline: auto; }
  .faq__inner .section__head--left .section__title::after { margin-left: auto; }
}
.faq__list { display: grid; gap: 12px; }
.qa summary {
  position: relative;
  padding: 16px 52px 16px 18px;
  list-style: none;
  cursor: pointer;
  font: 400 23px/1.15 var(--font-pixel);
  letter-spacing: .02em;
  color: var(--text);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 16px; top: 50%;
  width: 26px; height: 26px;
  margin-top: -13px;
  display: grid;
  place-items: center;
  background: rgba(5, 12, 8, .7);
  box-shadow: inset 0 0 0 2px var(--frame);
  color: var(--lime);
  font: 400 26px/1 var(--font-pixel);
  transition: transform .3s cubic-bezier(.3, .7, .4, 1.3), background-color .2s ease;
}
.qa[open] { border-image-source: url("../assets/ui/frame-accent.png"); }
.qa[open] summary::after { content: "−"; transform: rotate(180deg); background-color: rgba(43, 217, 124, .18); }
.qa summary { transition: color .2s ease; }
.qa summary:hover { color: var(--lime); }
.qa p {
  padding: 0 18px 18px;
  color: var(--text-soft);
  font-size: 15px;
}
/* Odpowiedź wjeżdża z lekkim opadnięciem; w Chromium dodatkowo płynnie rośnie wysokość */
.qa[open] p { animation: qa-open .4s cubic-bezier(.2, .7, .2, 1) both; }
@supports (interpolate-size: allow-keywords) {
  .qa { interpolate-size: allow-keywords; }
  .qa::details-content {
    height: 0;
    overflow: clip;
    transition: height .35s cubic-bezier(.2, .7, .2, 1), content-visibility .35s allow-discrete;
  }
  .qa[open]::details-content { height: auto; }
}

/* ---------- Stopka ---------- */
.footer {
  position: relative;
  border-top: 2px solid var(--frame);
  box-shadow: inset 0 2px 0 var(--shadow);
  background: linear-gradient(180deg, #091510, #050c08);
  padding: 48px 0 28px;
}
/* Pikselowa fala rzeki płynie nad stopką: przednia fala szybciej w prawo, tylna wolniej w lewo */
.footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -16px;
  height: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14' viewBox='0 0 48 14' shape-rendering='crispEdges'%3E%3Cpath fill='%230e7a47' d='M0 6h6V5h6V4h6v1h6v1h6v1h6v1h6V7h6v7H0z'/%3E%3Cpath fill='%230b5233' d='M0 10h48v4H0z'/%3E%3Cpath fill='%232bd97c' d='M0 6h6v1H0zM6 5h6v1H6zM12 4h6v1h-6zM18 5h6v1h-6zM24 6h6v1h-6zM30 7h6v1h-6zM36 8h6v1h-6zM42 7h6v1h-6z'/%3E%3Cpath fill='%239cffc9' d='M14 4h2v1h-2zM32 7h1v1h-1z'/%3E%3C/svg%3E") 0 0 / 48px 14px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14' viewBox='0 0 48 14' shape-rendering='crispEdges'%3E%3Cpath fill='%231e4a34' d='M0 5h6v1h6V5h6V4h6V3h6V2h6v1h6v1h6v10H0z'/%3E%3Cpath fill='%233d6b53' d='M0 5h6v1H0zM6 6h6v1H6zM12 5h6v1h-6zM18 4h6v1h-6zM24 3h6v1h-6zM30 2h6v1h-6zM36 3h6v1h-6zM42 4h6v1h-6z'/%3E%3C/svg%3E") 0 0 / 48px 14px repeat-x;
  image-rendering: pixelated;
  animation: waves 6s linear infinite;
  pointer-events: none;
}
.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 32px;
}
.footer__brand img { width: 202px; height: 84px; margin-bottom: 8px; }
.footer__col { display: grid; gap: 12px; align-content: start; justify-items: start; }
.footer__head {
  color: var(--lime);
  font: 400 20px/1 var(--font-pixel);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer__links { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footer__links a { color: var(--text-soft); text-decoration: none; }
.footer__links a:hover { color: var(--lime); }
.footer__legal {
  display: grid;
  gap: 6px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(30, 74, 52, .7);
  color: var(--sage);
  font-size: 13px;
}

/* ---------- Dymek „Skopiowano!” ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame-accent.png") 3 / var(--frame-w) stretch;
  background: linear-gradient(180deg, #1a3b2a, #0f241a) padding-box;
  color: var(--text);
  font: 400 21px/1.2 var(--font-pixel);
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Przycisk „na górę” (pokazuje go main.js po zjechaniu w dół) ---------- */
.totop {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 52px; height: 52px;
  border: var(--frame-w) solid transparent;
  border-image: url("../assets/ui/frame-accent.png") 3 / var(--frame-w) stretch;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%239cffc9' d='M5 1h2v1h1v1h1v1h1v1h1v2H9V6H8v6H4V6H3v1H1V5h1V4h1V3h1V2h1z'/%3E%3C/svg%3E") center / 24px 24px no-repeat,
    linear-gradient(180deg, #1a3b2a, #0f241a) padding-box;
  image-rendering: pixelated;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1), filter .15s ease;
}
.totop.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover, .totop:focus-visible { filter: brightness(1.15); animation: bob 1.2s ease-in-out infinite; }

/* ---------- Pył Nurtu: piksele unoszące się w tle (pod panelami, nad tłem strony) ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient i {
  position: absolute;
  bottom: -12px;
  width: 4px; height: 4px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(43, 217, 124, .6);
  opacity: 0;
  animation: drift 26s linear infinite;
}
.ambient i:nth-child(3n) { width: 3px; height: 3px; background: var(--mint); box-shadow: 0 0 8px rgba(156, 255, 201, .6); }
.ambient i:nth-child(4n) { background: var(--lime); box-shadow: 0 0 8px rgba(184, 245, 90, .55); }
.ambient i:nth-child(1) { left: 4%; animation-delay: -2s; }
.ambient i:nth-child(2) { left: 11%; animation-delay: -15s; animation-duration: 31s; }
.ambient i:nth-child(3) { left: 19%; animation-delay: -8s; animation-duration: 23s; }
.ambient i:nth-child(4) { left: 26%; animation-delay: -21s; animation-duration: 34s; }
.ambient i:nth-child(5) { left: 33%; animation-delay: -5s; animation-duration: 28s; }
.ambient i:nth-child(6) { left: 41%; animation-delay: -18s; }
.ambient i:nth-child(7) { left: 48%; animation-delay: -11s; animation-duration: 33s; }
.ambient i:nth-child(8) { left: 56%; animation-delay: -24s; animation-duration: 25s; }
.ambient i:nth-child(9) { left: 63%; animation-delay: -3s; animation-duration: 30s; }
.ambient i:nth-child(10) { left: 70%; animation-delay: -14s; animation-duration: 22s; }
.ambient i:nth-child(11) { left: 77%; animation-delay: -9s; animation-duration: 35s; }
.ambient i:nth-child(12) { left: 84%; animation-delay: -20s; animation-duration: 27s; }
.ambient i:nth-child(13) { left: 91%; animation-delay: -6s; animation-duration: 32s; }
.ambient i:nth-child(14) { left: 97%; animation-delay: -17s; animation-duration: 24s; }

/* ---------- Wejście przy przewijaniu ---------- */
/* Stan ukryty ma zerową specyficzność (:where), więc po wejściu działają własne transform kart (najechanie). */
/* Oba przejścia trwają tyle samo: main.js ustawia is-done po końcu opacity, a wtedy wraca własne przejście karty. */
.js .reveal:not(.is-done) {
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
:where(.js .reveal:not(.is-visible)) { opacity: 0; transform: translateY(20px); }
/* Warianty: przechylenie (tryby), przybliżenie (rangi), wjazd z lewej (kroki) i z prawej (FAQ) */
:where(.js .reveal--tilt:not(.is-visible)) { transform: perspective(900px) translateY(40px) rotateX(16deg); }
:where(.js .reveal--zoom:not(.is-visible)) { transform: translateY(16px) scale(.92); }
:where(.js .reveal--left:not(.is-visible)) { transform: translateX(-36px); }
:where(.js .reveal--right:not(.is-visible)) { transform: translateX(36px); }
.podglad .reveal { transition: none !important; }
/* W podglądzie (zrzuty) wszystko od razu w stanie końcowym */
.podglad *, .podglad *::before, .podglad *::after { transition-duration: 0s !important; transition-delay: 0s !important; }

/* ---------- Animacje ---------- */
@keyframes shine {
  0% { background-position: 0 0; }
  82% { background-position: 0 12.5%; }
  84% { background-position: 0 25%; }
  86% { background-position: 0 37.5%; }
  88% { background-position: 0 50%; }
  90% { background-position: 0 62.5%; }
  92% { background-position: 0 75%; }
  94% { background-position: 0 87.5%; }
  96% { background-position: 0 100%; }
  98%, 100% { background-position: 0 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes glow {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: .9; }
  50% { transform: translate(18px, -26vh); }
  85% { opacity: .7; }
  100% { opacity: 0; transform: translate(-10px, -52vh); }
}
@keyframes aurora {
  0% { background-position: 0% 0; opacity: .7; }
  50% { opacity: 1; }
  100% { background-position: 100% 0; opacity: .75; }
}
@keyframes cloud {
  from { transform: translateX(-280px); }
  to { transform: translateX(calc(100vw + 40px)); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
/* Podskok z przysiadem (ikony po najechaniu) */
@keyframes hop {
  0%, 100% { transform: none; }
  35% { transform: translateY(-8px); }
  60% { transform: translateY(0) scale(1.08, .92); }
  80% { transform: translateY(-2px); }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes logo-in {
  0% { opacity: 0; transform: translateY(18px) scale(.86); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.03); }
  100% { opacity: 1; transform: none; }
}
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}
@keyframes meteor {
  0% { opacity: 0; transform: translateX(0); }
  1% { opacity: 1; }
  7% { opacity: 0; transform: translateX(-360px); }
  100% { opacity: 0; transform: translateX(-360px); }
}
@keyframes cue {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}
@keyframes sweep {
  0% { transform: translateX(-160%) skewX(-18deg); }
  28%, 100% { transform: translateX(330%) skewX(-18deg); }
}
/* Kafel gradientu ma 200% szerokości: -200% przesuwa go dokładnie o jeden kafel */
@keyframes flow {
  from { background-position: 0 0; }
  to { background-position: -200% 0; }
}
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  55% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1.2), calc(var(--dy) + 70px)) scale(.5); }
}
@keyframes ripple {
  0% { opacity: .8; transform: scale(.6); }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes gem {
  0%, 100% { transform: rotate(45deg) scale(1); box-shadow: 0 0 0 2px var(--shadow); }
  50% { transform: rotate(45deg) scale(1.25); box-shadow: 0 0 0 2px var(--shadow), 0 0 10px currentColor; }
}
@keyframes nudge {
  0%, 80%, 100% { transform: rotate(0); }
  85% { transform: rotate(-4deg); }
  90% { transform: rotate(2deg); }
  95% { transform: rotate(-1deg); }
}
/* Fazy OneBlocka: slot rozbłyska na ok. pół sekundy, ikona podskakuje (translate, żeby nie gasić najechania) */
@keyframes phase {
  0% { opacity: 0; }
  3% { opacity: 1; }
  11%, 100% { opacity: 0; }
}
@keyframes phase-hop {
  0%, 9%, 100% { translate: 0 0; }
  4% { translate: 0 -3px; }
}
/* Ligi Derby: odznaka na chwilę świeci złotem i się unosi */
@keyframes promote {
  0%, 10%, 100% { translate: 0 0; filter: none; }
  4% { translate: 0 -4px; filter: drop-shadow(0 0 8px rgba(255, 201, 60, .85)) brightness(1.2); }
}
@keyframes sheen {
  0% { transform: translateX(-100%); }
  22%, 100% { transform: translateX(100%); }
}
@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(.4); }
  45% { opacity: 1; transform: scale(1.3); }
  60% { opacity: .2; transform: scale(.8); }
}
@keyframes num-in {
  0% { opacity: 0; transform: translateY(12px) scale(.4); }
  100% { opacity: .55; transform: none; }
}
@keyframes deal-2 {
  0%, 100% { transform: translate(0, 3px); }
  35%, 65% { transform: translate(22px, -2px) rotate(2deg); }
}
@keyframes deal-3 {
  0%, 100% { transform: translate(0, 6px); }
  35%, 65% { transform: translate(44px, 0) rotate(6deg); }
}
@keyframes qa-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes waves {
  from { background-position: 0 0, 0 0; }
  to { background-position: 96px 0, -48px 0; }
}
/* Administracja */
@keyframes head-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes shadow-bob {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(.86); opacity: .7; }
}
@keyframes head-jump {
  0% { transform: translateY(0) scale(1); }
  18% { transform: translateY(2px) scale(1.08, .9); }
  45% { transform: translateY(-28px) scale(.96, 1.05); }
  75% { transform: translateY(0) scale(1.05, .94); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes nose-talk {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 2px; }
}
@keyframes happy {
  0% { opacity: 0; transform: translateY(0); }
  15% { opacity: 1; }
  70% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-70px); }
}
@keyframes medal {
  from { background-position: 0 0; }
  to { background-position: 0 calc(-32 * var(--m)); }
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(.7); }
  to { opacity: 1; transform: none; }
}
/* Rekrutacja: znak zapytania unosi się i kołysze; fala wokół przycisku */
@keyframes ask {
  0% { opacity: 0; transform: translateY(0) rotate(-10deg) scale(.7); }
  15% { opacity: 1; }
  50% { transform: translateY(-42px) rotate(8deg) scale(1); }
  75% { opacity: .75; }
  100% { opacity: 0; transform: translateY(-84px) rotate(-6deg) scale(1.1); }
}
@keyframes recruit-ping {
  0% { opacity: .75; transform: scale(1); }
  60%, 100% { opacity: 0; transform: scale(1.05, 1.3); }
}
@keyframes look {
  0%, 100% { transform: rotateY(-28deg) rotateX(-10deg); }
  30% { transform: rotateY(20deg) rotateX(-2deg); }
  55% { transform: rotateY(34deg) rotateX(-16deg); }
  80% { transform: rotateY(-6deg) rotateX(4deg); }
}
@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: .35; }
  50% { transform: translate(18px, -55vh); }
  90% { opacity: .25; }
  100% { opacity: 0; transform: translate(-12px, -110vh); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, ::details-content {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero__fireflies, .hero__clouds, .hero__aurora, .hero__meteors, .hero__scroll,
  .ambient, .fx, .rank__sparks, .confetti, .member__fx, .recruit__fx { display: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 559px) {
  .hero { padding: 48px 0 132px; }
  .hero__content { gap: 18px; }
  .hero__kicker { font-size: 16px; }
  .hero__actions { width: 100%; }
  .hero__actions .ip, .hero__actions .btn { width: 100%; }
  .section { padding-top: 72px; }
  .section__head { margin-bottom: 30px; }
  .mode__body { padding: 14px 16px 20px; }
  .perks li { font-size: 14.5px; }
  .phases { gap: 5px; }
  .features__grid { gap: 22px; }
  .feature { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; align-items: start; }
  .feature__icon { grid-row: span 2; width: 64px; height: 64px; }
  .feature h3 { margin: 2px 0 6px; font-size: 25px; }
  .status { margin-top: -96px; }
  .status__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .tile__icon { width: 32px; height: 32px; }
  .tile__value { font-size: 34px; }
  .tile__value--small { font-size: 20px; padding: 0; }
  .tile__label { font-size: 13px; line-height: 1.4; }
}
