:root {
  --bg: #110d1c;
  --bg-2: #1a1430;
  --card: #211a3a;
  --line: #3a2f61;
  --text: #f1edff;
  --muted: #b3a9d6;
  --ember: #ff8a3d;
  --ember-2: #e2412b;
  --psy: #8a4dff;
  --psy-2: #c6a6ff;
  --radius: 18px;
  --max: 1180px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--psy-2); }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font: 700 .78rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 14px;
}
.grad { background: linear-gradient(90deg, var(--ember), #ffd36b 45%, var(--psy-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* language switch: html[lang] hides the other language */
html[lang="pl"] [lang="en"]:not(html), html[lang="en"] [lang="pl"]:not(html) { display: none !important; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 800 1.15rem/1 var(--font-head); white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--card); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); font: 700 .8rem/1 var(--font-body); padding: 8px 10px; cursor: pointer; }
html[lang="pl"] .lang [data-set="pl"], html[lang="en"] .lang [data-set="en"] { background: var(--psy); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px;
  font: 700 1rem/1 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ember { background: linear-gradient(135deg, var(--ember), var(--ember-2)); color: #fff; box-shadow: 0 10px 30px -10px var(--ember-2); }
.btn-ember:hover { color: #fff; box-shadow: 0 14px 34px -10px var(--ember-2); }
.btn-ghost { border-color: var(--line); color: var(--text); background: color-mix(in srgb, var(--card) 70%, transparent); }
.btn-ghost:hover { color: #fff; border-color: var(--psy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* sections */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.alt { background: var(--bg-2); }

/* studio hero */
.hero-studio { position: relative; padding: 110px 0 120px; overflow: hidden; }
.hero-studio::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, color-mix(in srgb, var(--psy) 38%, transparent), transparent 62%);
  pointer-events: none;
}
.hero-studio .wrap { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero-studio .lead { font-size: 1.22rem; color: var(--muted); max-width: 560px; }
.hero-mark { width: 100%; max-width: 420px; margin-inline: auto; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 50px rgba(138, 77, 255, .35)); }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }

/* game feature card */
.feature-game {
  display: grid; grid-template-columns: 1.3fr 1fr; border-radius: 26px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
}
.feature-game .art { min-height: 360px; background: url(img/zar_hero.webp) 62% center/cover; }
.feature-game .body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.feature-game .body img.logo { width: 220px; margin: -10px 0 8px -8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.tags li { font-size: .8rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: color-mix(in srgb, var(--psy) 20%, transparent); color: var(--psy-2); }

/* grids & cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card .ico { font-size: 1.9rem; line-height: 1; margin-bottom: 14px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1em; margin: 0; color: var(--muted); }
.card ul li { margin-bottom: 6px; }
.stat { text-align: center; padding: 26px 16px; }
.stat b { display: block; font: 800 2.6rem/1 var(--font-head); color: var(--ember); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .92rem; }

/* game hero */
.hero-game {
  position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end;
  background: linear-gradient(to top, var(--bg) 4%, rgba(17, 13, 28, .55) 45%, rgba(17, 13, 28, .1)), url(img/zar_hero.webp) center/cover;
  padding: 120px 0 72px;
}
.hero-game .logo { width: min(520px, 90%); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6)); margin-bottom: 8px; }
.hero-game .pitch { font: 600 clamp(1.15rem, 2.2vw, 1.5rem)/1.45 var(--font-body); max-width: 640px; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.badge { display: inline-flex; gap: 8px; align-items: center; font-size: .85rem; font-weight: 700; padding: 7px 13px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .15); margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }

/* split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 88px; }
.split.rev > :first-child { order: 2; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--ember), var(--psy)); }
.checks b { color: var(--text); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: zoom-in; background: none; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }
.gallery button:last-child { grid-column: span 2; aspect-ratio: auto; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 14, .94); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; border-radius: 12px; }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); }
.lightbox button { position: absolute; background: var(--card); border: 1px solid var(--line); color: #fff; border-radius: 12px; width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; }
.lb-next { right: 18px; top: 50%; }

/* eras timeline */
.eras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.eras::before { content: ""; position: absolute; top: 31px; left: 10%; right: 10%; height: 4px; background: linear-gradient(90deg, #8b8b8b, #c97f3f, #9aa7b8, #ffcc4d, var(--ember)); border-radius: 4px; }
.era { text-align: center; padding: 0 10px; position: relative; }
.era .pin { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: var(--card); border: 3px solid var(--c, var(--line)); }
.era h3 { font-size: 1.1rem; }
.era p { font-size: .92rem; color: var(--muted); }

/* bestiary */
.beasts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.beast { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.beast h4 { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.05rem; }
.beast p { margin: 0; font-size: .9rem; color: var(--muted); }
.beast .kind { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.k-tame { color: #4ade80; } .k-wild { color: var(--ember); } .k-hunt { color: #ffd36b; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--card); font-family: var(--font-head); }
tr:last-child td { border-bottom: 0; }
kbd { font: 700 .82rem/1 var(--font-body); background: var(--bg); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 7px; padding: 4px 8px; white-space: nowrap; }

/* faq */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font: 700 1.05rem/1.4 var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--ember); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* cta band */
.cta-band { text-align: center; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ember) 22%, transparent), transparent 70%), var(--bg-2); }
.cta-band .btn-row { justify-content: center; }

/* press kit */
.fact { display: grid; grid-template-columns: 160px 1fr; gap: 6px 20px; }
.fact dt { color: var(--muted); font-weight: 600; }
.fact dd { margin: 0 0 10px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text); }
.dl .thumb { aspect-ratio: 16 / 9; background: var(--bg) center/contain no-repeat; display: grid; place-items: center; }
.dl .thumb.checker { background-color: #2a2147; background-image: linear-gradient(45deg, #322858 25%, transparent 25%), linear-gradient(-45deg, #322858 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #322858 75%), linear-gradient(-45deg, transparent 75%, #322858 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.dl .thumb img { max-height: 80%; max-width: 80%; }
.dl .meta { padding: 12px 16px; font-size: .9rem; }
.dl .meta b { display: block; }
.dl:hover { border-color: var(--psy); color: #fff; }
.palette { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 120px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); font-size: .8rem; }
.swatch i { display: block; height: 64px; }
.swatch span { display: block; padding: 8px 10px; background: var(--card); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
footer h4 { color: var(--text); font-family: var(--font-head); margin-bottom: 10px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 6px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; font-size: .82rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero-mark { animation: none; } }

/* responsive */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr 1fr; }
  .eras { grid-template-columns: 1fr; gap: 18px; }
  .eras::before { display: none; }
  .era { display: grid; grid-template-columns: 66px 1fr; gap: 0 16px; text-align: left; align-items: start; }
  .era .pin { grid-row: span 2; margin: 0; }
}
@media (max-width: 820px) {
  section { padding: 72px 0; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); padding: 12px 16px 18px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .lang { align-self: flex-start; margin-top: 6px; }
  .hero-studio .wrap, .feature-game, .split, .g2 { grid-template-columns: 1fr; }
  .hero-studio { padding: 60px 0 80px; }
  .hero-mark { max-width: 260px; order: -1; }
  .feature-game .art { min-height: 220px; }
  .feature-game .body { padding: 28px; }
  .split.rev > :first-child { order: 0; }
  .split { gap: 28px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; }
  .fact dd { margin-bottom: 14px; }
}
@media (max-width: 520px) {
  .g3, .g4 { grid-template-columns: 1fr; }
  .gallery button:first-child { grid-column: span 2; grid-row: span 1; }
}
