@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo-2-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo-2-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #0a0c18;
  --bg-2: #0e1122;
  --panel: #13172b;
  --panel-2: #181d35;
  --ink: #f4f4fa;
  --muted: #a9aec6;
  --line: #262b45;
  --yellow: #ffd23f;
  --yellow-2: #ffe27a;
  --blue: #5cc4ff;
  --violet: #a77bff;
  --mint: #3ef0a8;
  --wrap: 1180px;
  --radius: 20px;
  --display: "Baloo 2", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 50;
  padding: 10px 16px; border-radius: 10px;
  background: var(--yellow); color: #14121f; font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgb(10 12 24 / 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 12px rgb(92 196 255 / 0.35)); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; }
.brand-name span { color: var(--yellow); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--ink); background: rgb(255 255 255 / 0.05); }
.nav .nav-cta { color: #14121f; background: var(--yellow); margin-left: 6px; }
.nav .nav-cta:hover { color: #14121f; background: var(--yellow-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .15s, background-color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: #14121f; box-shadow: 0 10px 30px -10px rgb(255 210 63 / 0.6); }
.btn-primary:hover { background: var(--yellow-2); }
.btn-ghost { border: 1px solid rgb(255 255 255 / 0.18); color: var(--ink); background: rgb(255 255 255 / 0.04); }
.btn-ghost:hover { border-color: rgb(255 255 255 / 0.35); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgb(10 12 24 / 0.85) 32%, rgb(10 12 24 / 0) 62%),
    linear-gradient(0deg, var(--bg) 0%, rgb(10 12 24 / 0) 30%);
}
.hero-inner { min-height: min(720px, 86vh); display: flex; align-items: center; padding-block: 96px 112px; }
.hero-copy { max-width: 600px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid rgb(92 196 255 / 0.3); background: rgb(92 196 255 / 0.08);
  color: var(--blue); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow svg { flex: none; }

.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.4rem); }
.hero h1 .spark {
  background: linear-gradient(100deg, var(--yellow) 10%, #ffb347 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin: 22px 0 34px; max-width: 520px; color: var(--muted); font-size: clamp(1.08rem, 1.5vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding-block: 104px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.kicker { margin: 0 0 12px; color: var(--yellow); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }
.section h2 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.section-head p:not(.kicker) { margin: 16px 0 0; color: var(--muted); font-size: 1.12rem; }

/* ---------- Games ---------- */
.games-list { display: grid; gap: 32px; }
.game {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.game:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.game:nth-child(even) .game-art { order: 2; }

.game-art { position: relative; min-height: 360px; overflow: hidden; }
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game:hover .game-art img { transform: scale(1.03); }
.game-wizzboom .game-art { background: #2a1b52; }
.game-handclash .game-art { background: #0f1a2c; }
.game-handclash .game-art img { object-position: 50% 45%; }

.game-body { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 44px 48px; }
.game-title { display: flex; align-items: center; gap: 16px; }
.game-title img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 22px -8px rgb(0 0 0 / 0.7); }
.game h3 { font-size: clamp(2rem, 3vw, 2.6rem); }
.game-genre { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.game-desc { margin: 0; color: #d4d6e4; font-size: 1.06rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.03); color: var(--muted);
}
.game-wizzboom .tags li:first-child { color: #d6c3ff; border-color: rgb(167 123 255 / 0.4); background: rgb(167 123 255 / 0.1); }
.game-handclash .tags li:first-child { color: #9ff7d3; border-color: rgb(62 240 168 / 0.4); background: rgb(62 240 168 / 0.08); }

.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px;
  border-radius: 12px; background: #000; border: 1px solid rgb(255 255 255 / 0.22);
  color: #fff; text-decoration: none; line-height: 1.1;
}
.store small { display: block; font-size: 0.68rem; opacity: 0.75; letter-spacing: 0.04em; text-transform: uppercase; }
.store strong { font-size: 1.02rem; }
.store-soon { opacity: 0.55; cursor: default; }
.text-link { color: var(--ink); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 12px 4px; }
.text-link:hover { color: var(--yellow); }

/* ---------- About ---------- */
.about { background: var(--bg-2); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-copy p:not(.kicker) { color: var(--muted); font-size: 1.1rem; margin: 18px 0 0; }
.about-copy p strong { color: var(--ink); }
.values { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.values li {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
}
.values .ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgb(255 210 63 / 0.1); color: var(--yellow); }
.values li:nth-child(2) .ico { background: rgb(92 196 255 / 0.1); color: var(--blue); }
.values li:nth-child(3) .ico { background: rgb(167 123 255 / 0.12); color: var(--violet); }
.values h3 { font-size: 1.35rem; margin-bottom: 4px; }
.values p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  padding: 56px; border-radius: 28px; border: 1px solid rgb(255 210 63 / 0.25);
  background: radial-gradient(ellipse at 100% 0%, rgb(255 210 63 / 0.14), transparent 55%),
              radial-gradient(ellipse at 0% 100%, rgb(92 196 255 / 0.12), transparent 55%), var(--panel);
}
.contact-card h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.contact-card p:not(.kicker) { margin: 14px 0 0; color: var(--muted); font-size: 1.1rem; }
.contact-links { display: grid; gap: 12px; }
.contact-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-radius: 14px; border: 1px solid var(--line); background: rgb(10 12 24 / 0.6);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.contact-links a:hover { border-color: var(--yellow); transform: translateX(3px); }
.contact-links small { display: block; color: var(--muted); font-size: 0.82rem; }
.contact-links strong { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer { padding-block: 56px 40px; color: var(--muted); font-size: 0.95rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-about { max-width: 320px; }
.footer-about p { margin: 14px 0 0; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer h2 { font-family: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer ul a { text-decoration: none; display: inline-block; padding: 4px 0; }
.footer a:hover { color: var(--yellow); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 0.88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .game, .game:nth-child(even) { grid-template-columns: 1fr; }
  .game:nth-child(even) .game-art { order: 0; }
  .game-art { min-height: 0; aspect-ratio: 16 / 9; }
  .game-body { padding: 32px 28px 36px; }
  .about-grid, .contact-card { grid-template-columns: 1fr; gap: 36px; }
  .contact-card { padding: 40px 28px; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .nav a:not(.nav-cta) { display: none; }
  .brand-name { font-size: 1.15rem; }
  .brand img { width: 38px; height: 38px; }
  .hero-bg { bottom: auto; height: 340px; }
  .hero-bg img { object-position: 84% 50%; }
  .hero::after {
    height: 340px; bottom: auto;
    background: linear-gradient(0deg, var(--bg) 0%, rgb(10 12 24 / 0) 55%);
  }
  .hero-inner { min-height: 0; padding-block: 280px 64px; align-items: flex-end; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section { padding-block: 72px; }
  .section-head { margin-bottom: 32px; }
  .game-title img { width: 54px; height: 54px; }
  .footer-cols { gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-hero {
  padding-block: 72px 44px; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 85% 0%, rgb(92 196 255 / 0.12), transparent 55%),
              radial-gradient(ellipse at 0% 100%, rgb(255 210 63 / 0.08), transparent 50%), var(--bg-2);
}
.legal-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
.legal-meta { margin: 14px 0 0; color: var(--muted); font-size: 0.98rem; }
.breadcrumb { margin: 0 0 18px; font-size: 0.9rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--yellow); }

.legal { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 64px; padding-block: 56px 104px; }
.toc { position: sticky; top: 104px; align-self: start; }
.toc h2 { font-family: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--yellow); }

.prose { max-width: 74ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 56px 0 14px; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.3rem; margin: 30px 0 8px; scroll-margin-top: 96px; }
.prose p, .prose li { color: #d4d6e4; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--yellow); }
.prose a:not(.btn) { color: var(--yellow); text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--yellow-2); }
.prose strong { color: var(--ink); }

.callout {
  margin: 0 0 32px; padding: 24px 26px; border-radius: 16px;
  border: 1px solid rgb(255 210 63 / 0.28); background: rgb(255 210 63 / 0.06);
}
.callout h2 { margin: 0 0 12px; font-size: 1.35rem; }
.callout ul { margin: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); color: #d4d6e4; }
.prose th { background: var(--panel); color: var(--ink); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }

.contact-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 24px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
}
.contact-box p { margin: 0; }

@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 72px; }
  .toc { position: static; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 720px) {
  .legal-hero { padding-block: 48px 32px; }
  .callout { padding: 20px; }
}
.footer a[aria-current="page"] { color: var(--ink); }

/* ---------- Social links ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.social {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.04); color: var(--muted);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: color .15s, background-color .15s, border-color .15s, transform .15s;
}
.social:hover { color: #fff; transform: translateY(-2px); }
.social-discord:hover { background: #5865f2; border-color: #5865f2; }
.social-telegram:hover { background: #229ed9; border-color: #229ed9; }
.social-instagram:hover { background: #d62976; border-color: #d62976; }
.social-youtube:hover { background: #e62117; border-color: #e62117; }
.socials-labeled .social { padding: 0 16px; color: var(--ink); }
.contact-card p.community-label { margin: 28px 0 0; color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.contact-card .socials { margin-top: 12px; }
.footer .socials { display: flex; gap: 10px; margin-top: 20px; }
.footer .socials .social { display: inline-flex; padding: 0; }
.footer .socials .social:hover { color: #fff; }

/* 404 page */
.notfound { padding-block: clamp(56px, 10vw, 120px); text-align: center; }
.notfound-inner { max-width: 640px; }
.notfound-logo { width: 120px; height: 120px; margin: 0 auto 8px; filter: drop-shadow(0 0 40px rgb(255 210 63 / 0.35)); }
.notfound-code {
  margin: 0; font-family: var(--display); font-weight: 800; line-height: 1;
  font-size: clamp(4.5rem, 16vw, 8rem); color: var(--yellow);
  text-shadow: 0 0 50px rgb(255 210 63 / 0.35);
}
.notfound h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: 8px 0 12px; }
.notfound-lead { color: var(--muted); font-size: 1.08rem; margin: 0 auto 28px; max-width: 46ch; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
