/* =============================================================
   OpenChunk - darmowy hosting serwerow Minecraft
   style.css - fundament designu + navbar
   ============================================================= */

/* -------------------------------------------------------------
   1. Tokeny motywu
   ------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Tla i powierzchnie */
  --bg:            #ffffff;
  --bg-2:          #f6f8f5;
  --surface:       #ffffff;
  --surface-2:     #f1f4ef;

  /* Linie */
  --line:          rgba(12, 18, 12, .10);
  --line-strong:   rgba(12, 18, 12, .18);

  /* Tekst */
  --text:          #0d100d;
  --text-2:        #454c44;
  --muted:         #6b736a;

  /* Akcent */
  --accent:        #16a34a;
  --accent-hover:  #15803d;
  --accent-soft:   rgba(22, 163, 74, .10);
  --accent-line:   rgba(22, 163, 74, .28);
  --on-accent:     #ffffff;

  /* Kropkowa siatka w tle sekcji */
  --dot:           rgba(12, 18, 12, .13);

  /* Tlo wyroznionej karty darmowego planu */
  --plan-free-bg:  #f3faf5;

  /* Zdjecie w tle hero. Obrazek jest ciemny, wiec na jasnym motywie
     musi byc duzo slabsze, inaczej zabija kontrast tekstu. */
  --hero-photo-o:  .035;

  /* Plamy swiatla w tle hero */
  --glow-1:        rgba(22, 163, 74, .14);
  --glow-2:        rgba(24, 132, 176, .07);
  --glow-3:        rgba(22, 163, 74, .07);
  --grain-o:       .045;

  /* Efekty */
  --logo-src:      url("../img/logo.png");
  --mark-src:      url("../img/mark.png");
  --gh-src:        url("../img/gamehost.png");
  --ghs-src:       url("../img/ghsystems.png");
  --nav-bg:        rgba(255, 255, 255, .72);
  --nav-bg-solid:  #ffffff;
  --shadow-sm:     0 1px 2px rgba(10, 20, 10, .06);
  --shadow-md:     0 6px 18px -6px rgba(10, 20, 10, .12), 0 2px 6px rgba(10, 20, 10, .05);
  --shadow-lg:     0 24px 48px -20px rgba(10, 20, 10, .22), 0 8px 20px -12px rgba(10, 20, 10, .12);
  --ring:          0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent);

  /* Ksztalt */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Wymiary */
  --nav-h: 72px;
  --container: 1200px;
  --gutter: 24px;

  /* Typografia */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Poppins", var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Ruch */
  --t-fast: 140ms cubic-bezier(.2, .8, .3, 1);
  --t: 220ms cubic-bezier(.2, .8, .3, 1);
  --t-slow: 420ms cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #0b0d0b;
  --bg-2:          #101310;
  --surface:       #141814;
  --surface-2:     #1a1f19;

  --line:          rgba(255, 255, 255, .09);
  --line-strong:   rgba(255, 255, 255, .16);

  --text:          #f2f5f0;
  --text-2:        #c3ccc0;
  --muted:         #8e988b;

  --accent:        #4ade80;
  --accent-hover:  #6ee79b;
  --accent-soft:   rgba(74, 222, 128, .14);
  --accent-line:   rgba(74, 222, 128, .32);
  --on-accent:     #06230f;

  --dot:           rgba(255, 255, 255, .10);

  --plan-free-bg:  #101a13;

  --hero-photo-o:  .12;

  --glow-1:        rgba(74, 222, 128, .16);
  --glow-2:        rgba(56, 170, 220, .10);
  --glow-3:        rgba(74, 222, 128, .07);
  --grain-o:       .055;

  --logo-src:      url("../img/logo-dark.png");
  --mark-src:      url("../img/mark-dark.png");
  --gh-src:        url("../img/gamehost-dark.png");
  --ghs-src:       url("../img/ghsystems-dark.png");
  --nav-bg:        rgba(11, 13, 11, .70);
  --nav-bg-solid:  #0b0d0b;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 6px 18px -6px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg:     0 24px 48px -20px rgba(0, 0, 0, .7), 0 8px 20px -12px rgba(0, 0, 0, .5);
}

/* -------------------------------------------------------------
   2. Reset / baza
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: clip;
  transition: background-color var(--t), color var(--t);
}

body.is-locked { overflow: hidden; }

/* Wygaszenie animacji przy pierwszym malowaniu, zeby motyw nie mrugal */
.no-transitions, .no-transitions * {
  transition: none !important;
  animation: none !important;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
}

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* -------------------------------------------------------------
   3. Uklad
   ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 12px;
  translate: -50% -200%;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
  transition: translate var(--t);
}
.skip-link:focus-visible { translate: -50% 0; }

/* -------------------------------------------------------------
   4. Przyciski
   ------------------------------------------------------------- */
.btn {
  --btn-h: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 17px; height: 17px; flex: none; }

/* Grass block: obrazek, nie ikona konturowa, wiec troche wiekszy.
   Selektor musi byc mocniejszy niz `.btn svg`, stad `.btn` z przodu. */
.btn .ico-grass { width: 20px; height: 20px; margin-right: -1px; }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--outline {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg { --btn-h: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }

/* -------------------------------------------------------------
   5. Navbar
   ------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t), box-shadow var(--t);
}

.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

/* Bez backdrop-filter: pelne tlo zamiast polprzezroczystego */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-scrolled { background: var(--nav-bg-solid); }
}

/* Trzy kolumny: logo | linki | akcje.
   Boczne kolumny sa rowne (1fr), wiec linki siedza dokladnie na srodku paska.
   Gdy zabraknie miejsca, 1fr urosnie do swojej zawartosci - uklad sie nie rozjedzie. */
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: var(--nav-h);
}

.nav__center { justify-self: center; }

/* --- Logo --- */
.nav__brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border-radius: var(--r-sm);
  transition: opacity var(--t-fast);
}
.nav__brand:hover { opacity: .72; }

.nav__logo {
  height: 26px;
  aspect-ratio: 1404 / 298;
  background: var(--logo-src) center / contain no-repeat;
}

.nav__logo--mark {
  display: none;
  height: 30px;
  aspect-ratio: 1;
  background: var(--mark-src) center / contain no-repeat;
}

/* --- Linki --- */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-2);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Ikona Discorda - normalnie w kolorze linku, na hover w barwie marki */
.ico-discord {
  width: 17px;
  height: 17px;
  flex: none;
  transition: color var(--t-fast);
}
.nav__link:hover .ico-discord,
.nav__mobile-link:hover .ico-discord { color: #5865f2; }

.nav__mobile-link .ico-discord { width: 20px; height: 20px; }

/* --- Prawa strona --- */
.nav__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.nav__sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin-inline: 2px;
}

/* --- Przelacznik motywu --- */
.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-full);
  color: var(--text-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }

.theme-toggle svg {
  position: absolute;
  width: 19px;
  height: 19px;
  transition: opacity var(--t), transform var(--t-slow);
}
.theme-toggle .ico-sun  { opacity: 0; transform: rotate(-70deg) scale(.5); }
.theme-toggle .ico-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .ico-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .ico-moon { opacity: 0; transform: rotate(70deg) scale(.5); }

/* --- Hamburger --- */
.nav__burger {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-full);
  color: var(--text);
  transition: background-color var(--t-fast);
}
.nav__burger:hover { background: var(--surface-2); }

/* Wszystkie trzy kreski w tej samej komorce siatki - dzieki temu
   po obrocie skladaja sie w rowny znak X, niezaleznie od wysokosci wiersza. */
.nav__burger span {
  grid-area: 1 / 1;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t), opacity var(--t-fast);
}
.nav__burger span:nth-child(1) { transform: translateY(-6px); }
.nav__burger span:nth-child(3) { transform: translateY(6px); }

.nav__burger.is-active span:nth-child(1) { transform: rotate(45deg); }
.nav__burger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.nav__burger.is-active span:nth-child(3) { transform: rotate(-45deg); }

/* --- Panel mobilny --- */
.nav__mobile {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 20px var(--gutter) 40px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  translate: 0 -12px;
  transition: opacity var(--t), translate var(--t), visibility var(--t);
}
.nav__mobile.is-open { opacity: 1; visibility: visible; translate: 0 0; }

.nav__mobile-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.nav__mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: var(--r-md);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  transition: background-color var(--t-fast);
}
.nav__mobile-link:hover { background: var(--surface-2); }

.nav__mobile-label {
  padding: 20px 12px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* -------------------------------------------------------------
   6. Responsywnosc navbara
   ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__sep { display: none; }
  .nav__actions .btn--ghost { display: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; --nav-h: 64px; }
  .nav__logo { display: none; }
  .nav__logo--mark { display: block; }
  .nav__actions .btn--primary { display: none; }
}

/* -------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 64px 0 100px;
}

/* --- Wskaznik przewijania ---
   Pozycja fixed, nie absolute: ma siedziec przy dolnej krawedzi ekranu
   niezaleznie od tego, czy hero miesci sie w calosci na pierwszym ekranie. */
.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  translate: -50% 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-md);
  transition: opacity var(--t), translate var(--t), visibility var(--t),
              color var(--t-fast), border-color var(--t-fast);
}
.scroll-cue:hover { color: var(--accent); border-color: var(--accent-line); }

.scroll-cue svg {
  width: 18px;
  height: 18px;
  /* animacja na ikonie, nie na przycisku - inaczej gryzlaby sie
     z `translate: -50%`, ktore centruje caly element */
  animation: cue 1.9s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(3px); }
}

.scroll-cue.is-hidden {
  opacity: 0;
  visibility: hidden;
  translate: -50% 12px;
}

@media (max-width: 560px) {
  .scroll-cue { width: 38px; height: 38px; bottom: 18px; }
}

/* --- Zdjecie w tle hero ---
   Osobna warstwa POD .hero__bg, zeby gradienty, ziarno i wygaszenie
   u dolu nakladaly sie na nia, a nie odwrotnie. */
.hero__photo {
  position: absolute;
  inset: calc(-1 * var(--nav-h)) 0 0;
  z-index: 0;
  background: url("../img/hero_bg.jpg") center / cover no-repeat;
  opacity: var(--hero-photo-o);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, #000 calc(100% - 200px), transparent calc(100% - 10px));
  mask-image: linear-gradient(to bottom, #000 40%, #000 calc(100% - 200px), transparent calc(100% - 10px));
  pointer-events: none;
}

/* --- Tlo hero --- */
.hero__bg {
  position: absolute;
  /* wyciagniete w gore o wysokosc navbara - inaczej gradient urywa sie
     ostra kreska pod przezroczystym paskiem */
  inset: calc(-1 * var(--nav-h)) 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;

  /* Trzy rozmyte plamy: dwie przy marginesach, jedna szeroka u gory.
     Radial-gradient zamiast filter: blur() - taniej i bez banding-u na krawedziach. */
  background:
    radial-gradient(clamp(240px, 44vw, 620px) clamp(200px, 34vw, 460px) at 6% 16%,
                    var(--glow-1), transparent 70%),
    radial-gradient(clamp(220px, 40vw, 560px) clamp(240px, 38vw, 520px) at 96% 64%,
                    var(--glow-2), transparent 72%),
    radial-gradient(clamp(420px, 80vw, 1100px) clamp(200px, 30vw, 420px) at 52% -12%,
                    var(--glow-3), transparent 72%);
}

/* Ziarno - to ono sprawia, ze gradient wyglada na materia, a nie na plaska plame */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--grain-o);
  /* Ziarno maluje sie PO wygaszeniu u dolu, wiec bez wlasnej maski
     urywaloby sie kreska na granicy sekcji. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 200px), transparent calc(100% - 10px));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 200px), transparent calc(100% - 10px));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Miekkie wygaszenie do koloru strony, zeby sekcja nie urywala sie kreska */
.hero__bg::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero__inner {
  position: relative;
  z-index: 1;
}

/* Tekst po lewej, render po prawej */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 48px;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}
.hero__pill b {
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Bez max-width - naglowek ma wypelniac cala kolumne tekstu */
.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
/* nowrap: 'za darmo' nie moze sie rozjechac na dwie linie */
.hero h1 em { font-style: normal; color: var(--accent); white-space: nowrap; }

/* Akcent w naglowkach sekcji, ten sam zabieg co w hero */
.section__head h2 em,
.split__copy h2 em { font-style: normal; color: var(--accent); }

.hero p {
  max-width: 50ch;
  margin-top: 22px;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--muted);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* --- Wejscie hero po wczytaniu strony ---
   Czysty CSS, bez JS: nie ma ryzyka mrugniecia, gdy skrypt sie spozni.
   `both` trzyma stan poczatkowy takze przed uplywem opoznienia. */
@keyframes hero-in {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0; }
}

/* Sam zanik, bez ruchu. Brak `to` sprawia, ze animacja konczy sie
   na wlasnej wartosci elementu (zdjecie ma opacity ze zmiennej). */
@keyframes hero-fade {
  from { opacity: 0; }
}

.hero__pill,
.hero h1,
.hero__copy p,
.hero__cta,
.hero__art {
  animation: hero-in .7s cubic-bezier(.22, 1, .36, 1) both;
}

.hero__pill   { animation-delay: .06s; }
.hero h1      { animation-delay: .14s; }
.hero__art    { animation-delay: .20s; }
.hero__copy p { animation-delay: .24s; }
.hero__cta    { animation-delay: .32s; }

.hero__photo,
.hero__bg { animation: hero-fade 1.2s ease both; }

/* `backwards`, nie `both`: po zakonczeniu animacji element wraca pod normalne
   reguly, dzieki czemu przejscie do `.is-hidden` przy scrollu nadal dziala. */
.scroll-cue { animation: hero-fade .6s ease .45s backwards; }

/* --- Render postaci --- */
.hero__art img {
  width: 100%;
  max-width: 520px;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 26px 30px rgba(10, 20, 10, .20));
  animation: unos 6s ease-in-out infinite;
}
[data-theme="dark"] .hero__art img {
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .6));
}

@keyframes unos {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Na waskich ekranach: tekst nad renderem, wszystko wysrodkowane */
@media (max-width: 900px) {
  .hero { padding: 40px 0 80px; }
  .hero__inner { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .hero h1, .hero p { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__art { order: 2; }
  .hero__copy { order: 1; }
  .hero__art img { max-width: 320px; }
}

@media (max-width: 560px) {
  .hero__pill { font-size: 12.5px; padding: 6px 12px 6px 7px; }
  .hero__cta .btn { width: 100%; }
  .hero__art img { max-width: 260px; }
}



/* =============================================================
   8. Sekcje tresci
   ============================================================= */
.section {
  position: relative;
  padding: 104px 0;
}

/* Kropki w tle sekcji. Wygaszane maska ku brzegom, zeby siatka
   nie urywala sie kreska na krawedziach sekcji. */
.section--dots::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%);
  pointer-events: none;
}
.section--dots > .container { position: relative; z-index: 1; }

.section__head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.section__head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.section__head p {
  margin-top: 16px;
  font-size: clamp(1rem, 2vw, 1.08rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* -------------------------------------------------------------
   Wejscie sekcji w kadr
   ------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  translate: 0 16px;
  transition: opacity .55s ease, translate .55s cubic-bezier(.22, 1, .36, 1);
}
.js [data-reveal].is-visible { opacity: 1; translate: 0 0; }

/* Kropki w tle sekcji. Wygaszane maska ku brzegom, zeby siatka
   nie urywala sie kreska na krawedziach sekcji. */
.section--dots::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%);
  pointer-events: none;
}
.section--dots > .container { position: relative; z-index: 1; }

/* -------------------------------------------------------------
   Liczby + zaproszenie na Discorda
   ------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
}

.stat {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.stat:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Delikatna poswiata w rogu kafelka - to ona odroznia go od zwyklego pudelka */
.stat::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.stat > * { position: relative; }

.stat__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.stat__ico svg { width: 20px; height: 20px; }

.stat__num {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
/* plus mniejszy i w akcencie, zeby nie ciazyl liczbie */
.stat__num i {
  font-style: normal;
  font-size: .55em;
  font-weight: 700;
  color: var(--accent);
  align-self: flex-start;
  margin-top: .1em;
}

.stat__label {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Pulsujaca kropka przy liczniku serwerow online */
.stat__live {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
  animation: puls 2.4s ease-out infinite;
}
@keyframes puls {
  0%   { box-shadow: 0 0 0 0 var(--accent-line); }
  70%  { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* --- Zaproszenie na Discorda --- */
.join {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 30px 32px;
  border-radius: var(--r-xl);
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 8% 0%, #6b76f7, transparent 60%),
    linear-gradient(115deg, #5865f2, #4149bd);
  box-shadow: 0 18px 40px -22px rgba(88, 101, 242, .8);
}

/* Ta sama faktura co w hero, zeby panel nie byl plaska plama koloru */
.join::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.join > * { position: relative; z-index: 1; }

.join__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.join__ico svg { width: 28px; height: 28px; }

.join__txt { flex: 1; min-width: 0; }
.join__txt h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.join__txt p {
  margin-top: 5px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .82);
  text-wrap: pretty;
}

.join__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-full);
  background: #fff;
  color: #3b45b0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.join__btn svg { width: 17px; height: 17px; }
.join__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .24); }

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .join { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px; }
  .join__btn { width: 100%; justify-content: center; }
}

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 22px; }
}

/* -------------------------------------------------------------
   Sekcje - waskie ekrany
   ------------------------------------------------------------- */
@media (max-width: 980px) {
  .section { padding: 80px 0; }
}

@media (max-width: 680px) {
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 36px; }
}


/* =============================================================
   9. Jak to dziala
   ============================================================= */
.section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 28px;
  list-style: none;
}

/* subgrid: miniatura i opis kazdego kroku trafiaja do WSPOLNYCH wierszy siatki,
   dzieki czemu panele maja rowna wysokosc, a numery 01/02/03 stoja w jednej linii
   niezaleznie od dlugosci opisu. Bez subgrid uklad zachowuje sie jak zwykly flex. */
.step {
  position: relative;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 20px;
}

/* Lacznik miedzy krokami - strzalka w przerwie siatki */
.step + .step::before {
  content: "";
  position: absolute;
  top: 92px;
  left: -20px;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--line-strong);
  border-right: 2px solid var(--line-strong);
  rotate: 45deg;
  opacity: .7;
}

/* --- Miniatura interfejsu --- */
.step__art {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 196px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step__txt { display: flex; flex-direction: column; }

.step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.step h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.step__txt p {
  margin-top: 7px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* --- Atrapy kontrolek --- */
.mock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.mock-btn--discord { color: #5865f2; border-color: rgba(88, 101, 242, .35); }
.mock-btn--discord .ico-discord { width: 16px; height: 16px; }
.mock-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.mock-or {
  position: relative;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.mock-or::before,
.mock-or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--line);
}
.mock-or::before { left: 0; }
.mock-or::after  { right: 0; }

.mock-field {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  font-size: 13.5px;
  color: var(--muted);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  font-size: 13.5px;
}
.mock-row b { font-weight: 500; color: var(--muted); }
.mock-row em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}
.mock-row svg { width: 14px; height: 14px; opacity: .5; }

/* Wiersz bez rozwijania - to pole tekstowe, nie lista wyboru */
.mock-row--text em { font-weight: 500; }

/* Informacja o zasobach przydzielanych automatycznie */
.mock-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 9px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.mock-note svg { width: 13px; height: 13px; flex: none; }

.mock-server {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.mock-server__top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.mock-server__top em {
  margin-left: auto;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mock-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.mock-server code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-players { display: flex; align-items: center; gap: 4px; }
.ava {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}
.ava + .ava { margin-left: -9px; }
.ava--more { background: var(--accent-soft); color: var(--accent); }
.mock-players em {
  margin-left: 10px;
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
}

/* --- Domkniecie sekcji --- */
.steps__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 52px;
}
.steps__cta span { font-size: 13.5px; color: var(--muted); }

/* --- Waskie ekrany --- */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 32px; max-width: 460px; margin-inline: auto; }
  .step + .step::before {
    top: -22px;
    left: 50%;
    rotate: 135deg;          /* strzalka w dol - kroki ida teraz pionowo */
    translate: -50% 0;
  }
  .steps__cta { margin-top: 40px; }
}


/* =============================================================
   10. Na czym dziala OpenChunk
   ============================================================= */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 64px;
}

/* Naglowek sekcji jest tu wyrownany do lewej, nie wysrodkowany
   jak w pozostalych sekcjach - to uklad dwukolumnowy. */
.split__copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.split__copy p {
  margin-top: 18px;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--muted);
  text-wrap: pretty;
}
.split__copy strong { color: var(--text); font-weight: 600; }

/* Logo GameHost wplecione w zdanie - napis jest bialy, wiec kazdy motyw
   ma wlasny plik (na jasnym tle bialy napis bylby niewidoczny). */
.gh {
  display: inline-block;
  height: 1.3em;
  aspect-ratio: 668 / 138;
  vertical-align: -.34em;
  /* wiecej powietrza przed logo; po prawej mniej, bo zaraz jest kropka */
  margin-inline: .3em .08em;
  background: var(--gh-src) center / contain no-repeat;
}

/* --- Zasady --- */
.facts {
  display: flex;
  flex-direction: column;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.facts li {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
}
.facts li + li { border-top: 1px solid var(--line); }

.facts__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.facts__ico svg { width: 17px; height: 17px; }

.facts b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.facts span:not(.facts__ico) {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* Trzy kolumny: render, tekst, tabela. Render przedstawia to,
   o czym mowi tabela obok, wiec stoi na poczatku rzedu. */
.split--trzy { grid-template-columns: 210px minmax(0, 1fr) 380px; gap: 48px; }

.split__art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 26px rgba(10, 20, 10, .22));
  animation: unos 7s ease-in-out infinite;
}
[data-theme="dark"] .split__art img {
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .6));
}

@media (max-width: 1080px) {
  /* Za ciasno na trzy kolumny: render schodzi, tekst i tabela zostaja obok siebie */
  .split--trzy { grid-template-columns: minmax(0, 1fr) 380px; }
  .split--trzy .split__art { display: none; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--trzy { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 520px) {
  .facts li { padding: 15px 16px; gap: 12px; }
}


/* =============================================================
   11. Stopka
   ============================================================= */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.footer__inner {
  display: grid;
  /* `auto` na kolumnach linkow: szerokosc wg tresci, wiec ostatnia konczy sie
     rowno z prawa krawedzia kontenera. Przy `1fr` zostawala pusta reszta. */
  grid-template-columns: 1fr auto auto;
  gap: 72px;
  padding-block: 64px 52px;
}

/* --- Marka --- */
/* To samo logo co w navbarze, tylko odrobine wieksze */
.footer__logo {
  display: block;
  height: 30px;
  aspect-ratio: 1404 / 298;
  background: var(--logo-src) center / contain no-repeat;
}

.footer__brand p {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 34ch;
  text-wrap: pretty;
}

.footer__discord {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  margin-top: 22px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.footer__discord svg { width: 17px; height: 17px; }
.footer__discord:hover { border-color: #5865f2; color: #5865f2; }

/* --- Kolumny linkow --- */
.footer__col h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 18px;
  list-style: none;
}
.footer__col a {
  font-size: 14.5px;
  color: var(--text-2);
  transition: color var(--t-fast);
}
.footer__col a:hover { color: var(--accent); }

/* --- Pasek na dole --- */
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer__by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer__by span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* gamehost.systems - napis jest bialy, wiec kazdy motyw ma wlasny plik */
.ghs {
  display: block;
  height: 20px;
  aspect-ratio: 483 / 66;
  background: var(--ghs-src) center / contain no-repeat;
  transition: opacity var(--t-fast);
}
.ghs:hover { opacity: .7; }

@media (max-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    padding-block: 52px 40px;
  }
  .footer__brand { grid-column: span 2; }
}

@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; gap: 34px; }
  .footer__brand { grid-column: auto; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}


/* =============================================================
   12. Podstrona: darmowy serwer Minecraft
   ============================================================= */

/* --- Naglowek podstrony --- */
.phead {
  position: relative;
  padding: 76px 0 68px;
  overflow: hidden;
}

/* Ta sama poswiata co w hero, tylko plytsza - podstrona ma sie
   przedstawic, a nie konkurowac ze strona glowna. */
.phead__bg {
  position: absolute;
  inset: calc(-1 * var(--nav-h)) 0 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(clamp(300px, 60vw, 820px) clamp(200px, 34vw, 420px) at 20% 0%,
                    var(--glow-1), transparent 70%),
    radial-gradient(clamp(280px, 50vw, 700px) clamp(200px, 32vw, 400px) at 92% 20%,
                    var(--glow-2), transparent 72%);
}
.phead > .container { position: relative; z-index: 1; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--muted);
}
.crumbs a { transition: color var(--t-fast); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current] { color: var(--text-2); font-weight: 500; }

.phead h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  letter-spacing: -.04em;
  text-wrap: balance;
}
.phead > .container > p {
  max-width: 56ch;
  margin-top: 18px;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--muted);
  text-wrap: pretty;
}

.phead__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* --- Tabela specyfikacji --- */
.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.spec__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
}
.spec__row + .spec__row { border-top: 1px solid var(--line); }

.spec dt {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  font-size: 14px;
  color: var(--muted);
}
.spec dt svg { width: 17px; height: 17px; flex: none; color: var(--accent); }

.spec dd {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  text-wrap: pretty;
}

/* --- Silniki --- */
.engines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  list-style: none;
}

.engines li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.engines li:hover { border-color: var(--accent-line); transform: translateY(-2px); }

.engines b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
.engines span {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* --- Cykl zycia --- */
.life {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  counter-reset: etap;
}

.life__item {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Ostrzegawczy etap wyrozniony barwa, zeby nie zginal miedzy pozostalymi */
.life__item.is-warn { border-color: rgba(240, 200, 90, .45); }
.life__item.is-warn .life__dot { background: rgba(240, 200, 90, .16); color: #b98900; }
[data-theme="dark"] .life__item.is-warn .life__dot { color: #f0c85a; }

.life__dot {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.life__dot svg { width: 19px; height: 19px; }

.life h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
.life p {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* --- FAQ --- */
.container--waski { max-width: 820px; }

.faq {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq__item + .faq__item { border-top: 1px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  list-style: none;
  transition: color var(--t-fast);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent); }

/* Znak plus rysowany w CSS, obraca sie w minus po otwarciu */
.faq__plus {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.faq__plus::before,
.faq__plus::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  translate: 0 -50%;
  transition: rotate var(--t), background-color var(--t-fast);
}
.faq__plus::after { rotate: 90deg; }
.faq__item[open] .faq__plus::after { rotate: 0deg; }
.faq__item[open] .faq__plus::before,
.faq__item[open] .faq__plus::after { background: var(--accent); }

.faq__answer {
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
  transition: height .32s cubic-bezier(.22, 1, .36, 1);
}
.faq__answer p { padding: 0 22px 22px; }
.faq__answer strong { color: var(--text); font-weight: 600; }
.faq__answer code {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--text-2);
}

.faq + .join { margin-top: 20px; }

/* --- Waskie ekrany --- */
@media (max-width: 860px) {
  .life { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .phead { padding: 52px 0 48px; }
  .phead__cta .btn { width: 100%; }
  .spec__row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .spec dd { text-align: left; }
  .faq__item summary { padding: 18px; font-size: 15px; }
  .faq__answer p { padding: 0 18px 18px; }
}


/* =============================================================
   12. Parametry, silniki, FAQ
   ============================================================= */

/* --- Tabela parametrow --- */
.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.spec__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
}
.spec__row + .spec__row { border-top: 1px solid var(--line); }

.spec dt {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  font-size: 14px;
  color: var(--muted);
}
.spec dt svg { width: 17px; height: 17px; flex: none; color: var(--accent); }

.spec dd {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  text-wrap: pretty;
}

/* --- Karuzela silnikow ---
   Dwa identyczne tory jadace obok siebie. Gdy pierwszy przesunie sie
   o dokladnie swoja szerokosc, drugi jest w jego punkcie startowym,
   wiec petla nie ma widocznego szwu. */
.karuzela {
  position: relative;
  display: flex;
  gap: 56px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.karuzela__tor {
  display: flex;
  gap: 56px;
  flex: none;
  padding-block: 6px;
  list-style: none;
  animation: przesuw 34s linear infinite;
}

@keyframes przesuw {
  to { transform: translateX(calc(-100% - 56px)); }
}

.karuzela__poz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 118px;
  flex: none;
}
.karuzela__poz img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .55;
  transition: filter var(--t), opacity var(--t), transform var(--t);
}
.karuzela__poz:hover img { filter: none; opacity: 1; transform: scale(1.08); }

.karuzela__poz span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--t-fast);
}
.karuzela__poz:hover span { color: var(--text); }

/* --- FAQ --- */
.container--waski { max-width: 820px; }

.faq {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq__item + .faq__item { border-top: 1px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  list-style: none;
  transition: color var(--t-fast);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent); }

/* Plus rysowany w CSS, po otwarciu obraca sie w minus */
.faq__plus {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.faq__plus::before,
.faq__plus::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  translate: 0 -50%;
  transition: rotate var(--t), background-color var(--t-fast);
}
.faq__plus::after { rotate: 90deg; }
.faq__item[open] .faq__plus::after { rotate: 0deg; }
.faq__item[open] .faq__plus::before,
.faq__item[open] .faq__plus::after { background: var(--accent); }

.faq__answer {
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
  transition: height .32s cubic-bezier(.22, 1, .36, 1);
}
.faq__answer p { padding: 0 22px 22px; }
.faq__answer strong { color: var(--text); font-weight: 600; }
.faq__answer code {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--text-2);
}

@media (max-width: 620px) {
  .spec__row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .spec dd { text-align: left; }
  .karuzela, .karuzela__tor { gap: 40px; }
  @keyframes przesuw { to { transform: translateX(calc(-100% - 40px)); } }
  .karuzela__poz { width: 96px; }
  .karuzela__poz img { width: 54px; height: 54px; }
  .faq__item summary { padding: 18px; font-size: 15px; }
  .faq__answer p { padding: 0 18px 18px; }
}


/* =============================================================
   13. Pakiety
   ============================================================= */
.plany {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
  list-style: none;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.plan:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Poswiata w rogu, ta sama co w kafelkach z liczbami */
.plan::before {
  content: "";
  position: absolute;
  inset: -45% -35% auto auto;
  width: 210px;
  height: 210px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.plan > * { position: relative; }

/* Darmowy ma byc najbardziej widoczna karta na liscie, wiec dostaje
   wlasne, zielonkawe tlo, obwodke w akcencie i mocniejszy cien. */
.plan--free {
  border-color: var(--accent);
  background:
    radial-gradient(130% 150% at 0% 0%, var(--accent-soft), transparent 62%),
    var(--plan-free-bg);
  box-shadow: 0 18px 40px -22px var(--accent), var(--shadow-sm);
}
.plan--free:hover { border-color: var(--accent); }
.plan--free::before { display: none; }

.plan__tag {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 4px 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
}

.plan h3 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--muted);
}

.plan__cena {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 12px;
}
.plan__kwota {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.plan__okres { font-size: 13.5px; color: var(--muted); }

.plan__opis {
  /* staly zapas na dwie linie, zeby listy zaczynaly sie w tej samej wysokosci */
  min-height: 2lh;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.plan__cechy {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 20px 0 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.plan__cechy li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.plan__wart { flex: 1; min-width: 0; color: var(--muted); }
.plan__cechy b { font-weight: 700; color: var(--text); }

/* Przyrost przy konkretnym parametrze zamiast jednej dlugiej pigulki nad lista.
   Kazdy wiersz ma te sama budowe, wiec karty ustawiaja sie w rownych rzedach. */
.plan__plus {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.plan__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: var(--r-xs);
  background: var(--accent-soft);
  color: var(--accent);
}
.plan__ico svg { width: 14px; height: 14px; }

/* Co jeszcze daje pakiet poza zasobami */
.plan__dodatki {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0 0 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 13.5px;
  line-height: 1.4;
}
.plan__dodatki li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-2);
}
.plan__dodatki svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}
/* Czego w darmowym nie ma - wyszarzone, bez ptaszka */
.plan__dodatki .jest-nie { color: var(--muted); }
.plan__dodatki .jest-nie svg { color: var(--muted); opacity: .7; }

/* Przycisk zawsze na dole, zeby karty konczyly sie rowno */
.plan .btn { margin-top: auto; }

/* --- Karta z przejsciem na GameHosta ---
   Ten sam ksztalt co pakiety, wiec konczy rzad zamiast rozbijac uklad. */
.plan--gh {
  background:
    radial-gradient(130% 150% at 100% 0%, var(--surface-2), transparent 60%),
    var(--bg-2);
}
.plan--gh::before { display: none; }

.plan__logo {
  display: block;
  width: 132px;
  height: 27px;
  margin-bottom: 18px;
  background: var(--gh-src) left center / contain no-repeat;
}

.plan--gh h3 {
  font-size: 1.05rem;
  color: var(--text);
}
.plan--gh .plan__dodatki {
  margin-top: 20px;
  padding-top: 20px;
}

/* Instalator paczek to jedyna rzecz, ktorej OpenChunk nie ma w ogole,
   wiec dostaje wlasne tlo i obwodke zamiast zwyklego wiersza z ptaszkiem. */
.plan__dodatki .wyrozniony {
  margin: -2px -10px 4px;
  padding: 9px 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  font-weight: 700;
  color: var(--accent);
}
.plan__dodatki .wyrozniony svg { color: var(--accent); }

.plany__nota {
  max-width: 62ch;
  margin: 28px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  text-wrap: pretty;
}

@media (max-width: 1080px) {
  .plany { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .plany { grid-template-columns: 1fr; }
}
