:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #2f5bff;
  --accent-2: #7a5cff;
  --nav: rgba(22, 22, 23, .82);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --wrap: 1000px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-alt: #101012; --card: #1c1c1e; --fg: #f5f5f7; --muted: #a1a1a6; --line: #38383d; --accent: #6b8cff; --accent-2: #a58bff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-alt: #101012; --card: #1c1c1e; --fg: #f5f5f7; --muted: #a1a1a6; --line: #38383d; --accent: #6b8cff; --accent-2: #a58bff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 52px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h2, h3 { letter-spacing: -0.03em; text-wrap: balance; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(22px, env(safe-area-inset-left, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* pill buttons */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 500; white-space: nowrap; transition: filter .2s; }
.pill:hover { text-decoration: none; filter: brightness(1.1); }
.pill.sm { min-height: 28px; padding: 0 12px; font-size: 12px; }
.pill.light { background: #fff; color: #1d1d1f; }

/* local nav */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: #f5f5f7; }
.nav .wrap { max-width: 1060px; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: block; flex: none; }
.logo img { height: 22px; width: auto; }
.nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 12px; }
.nav ul a:not(.pill) { color: rgba(245,245,247,.8); }
.nav ul a:not(.pill):hover { color: #fff; text-decoration: none; }
@media (max-width: 520px) { .nav ul { gap: 14px; } .nav .opt { display: none; } }

/* hero (full screen) */
.nav.over { margin-bottom: -52px; }
.nav { transition: background .35s; }
.nav.top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #000; color: #fff; display: grid; place-items: center; text-align: center; }
.hero-slides, .hero-slides img { position: absolute; inset: 0; }
.hero-slides img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
/* soft blur on the background; the slides extend past the edges so the blur has no dark rim */
.hero-slides { inset: -20px; filter: blur(4px); }
.hero-slides img.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-slides img.on { animation: drift 9s ease-out both; }
  @keyframes drift { from { transform: scale(1.1); } to { transform: scale(1); } }
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, rgba(0,0,0,.25), rgba(0,0,0,.65)); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 26px; padding: 22px; }
.hero-logo img { width: min(440px, 78vw); height: auto; filter: drop-shadow(0 0 18px rgba(140,170,255,.9)) drop-shadow(0 0 2px #fff); }
.hero-inner p { font-size: clamp(19px, 2.4vw, 24px); font-weight: 600; letter-spacing: -0.02em; opacity: .92; }
.hero-pause { position: absolute; z-index: 3; right: 20px; bottom: max(20px, env(safe-area-inset-bottom, 0px)); }

/* round pause/play button */
.pause { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.pause:hover { background: rgba(255,255,255,.28); }
.pause svg { width: 12px; height: 12px; }

/* game cards */
/* 4 per row on desktop, 2 on tablets, 1 on phones */
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.game { display: grid; gap: 14px; align-content: start; min-width: 0; color: var(--fg); }
.game:hover { text-decoration: none; }
.game .shot img { transition: transform .5s ease; }
.game:hover .shot img { transform: scale(1.03); }
.game .shot { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--bg-alt); }
.game .shot img { width: 100%; height: 100%; object-fit: cover; }
.game-head { display: flex; align-items: flex-start; gap: 12px; }
.game-head img { flex: none; width: 40px; height: 40px; border-radius: 22%; }
.game-head > div { min-width: 0; }
.game h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.game .short { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 960px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .game h3 { font-size: 17px; }
  .game .short { font-size: 14px; }
  .game-head img { width: 44px; height: 44px; }
}
@media (max-width: 560px) { .games { grid-template-columns: 1fr; } }

/* section titles */
.block { padding-block: clamp(80px, 10vw, 130px); }
.alt { background: var(--bg-alt); }
.title { font-size: clamp(32px, 4.4vw, 48px); font-weight: 700; line-height: 1.08; margin-bottom: clamp(32px, 4vw, 48px); }
.title-c { text-align: center; }

/* stats row (device-row style) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stats b { display: block; font-size: clamp(32px, 4.6vw, 48px); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 15px; font-weight: 500; }
@media (max-width: 480px) { .stats b { font-size: 28px; } .stats span { font-size: 13px; } }

/* services */
.lead { max-width: 34em; margin: calc(-1 * clamp(16px, 2vw, 28px)) 0 clamp(32px, 4vw, 48px); font-size: clamp(17px, 1.8vw, 19px); color: var(--muted); }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.svc { display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: 18px; background: var(--bg-alt); }
.svc h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.svc p { font-size: 15px; color: var(--muted); }
.svc ul { list-style: none; margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.svc li::before { content: "✓"; margin-right: 10px; color: var(--accent); font-weight: 700; }
@media (max-width: 820px) { .services { grid-template-columns: 1fr; } }

/* closing */
.closing { text-align: center; }
.closing h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; }
.closing p { margin: 14px auto 28px; font-size: 17px; font-weight: 500; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 24px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 32px; font-size: 14px; }
.socials a { color: var(--muted); }
.socials a:hover { color: var(--fg); text-decoration: none; }

footer { background: var(--bg-alt); color: var(--muted); font-size: 12px; }
footer .wrap { border-top: 1px solid var(--line); padding-block: 18px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- game pages (games/<name>/) ---------- */
.gp { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 100px); }
.crumb { display: inline-block; margin-bottom: 28px; font-size: 14px; color: var(--muted); }
.crumb:hover { color: var(--fg); text-decoration: none; }
.gp-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 24px); }
.gp-head > img { flex: none; width: clamp(72px, 12vw, 104px); height: auto; border-radius: 22%; }
.gp-head > div { min-width: 0; }
.gp h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; text-wrap: balance; }
.gp-head .short { margin-top: 8px; font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); }
.gp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); font-size: 13px; font-weight: 500; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: clamp(36px, 5vw, 56px); }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: var(--bg-alt); }
.shots img:first-child { grid-column: 1 / -1; border-radius: 20px; }
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 5vw, 64px); margin-top: clamp(40px, 6vw, 64px); }
.about h2, .more h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.about p { color: var(--muted); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0; font-size: 15px; align-content: start; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.more { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 64px); margin-top: clamp(48px, 7vw, 80px); }
.more h2 { margin-bottom: 24px; }
.games.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.games.three .game-head img { width: 36px; height: 36px; }
.games.three h3 { font-size: 15px; }
.games.three .shot { border-radius: 14px; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .games.three { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .shots { grid-template-columns: 1fr; }
}

/* ---------- news ---------- */
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.title-row a { font-size: 15px; font-weight: 500; white-space: nowrap; }
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 28px); }
.post-card { display: grid; gap: 8px; align-content: start; color: var(--fg); min-width: 0; }
.post-card:hover { text-decoration: none; }
.post-card .shot { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--line); margin-bottom: 6px; }
.post-card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .shot img { transform: scale(1.03); }
.post-card time, .article time { font-size: 13px; color: var(--muted); }
.post-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.post-card p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 820px) { .posts { grid-template-columns: 1fr; } }

.page-title { font-size: clamp(32px, 4.4vw, 48px); font-weight: 700; letter-spacing: -0.035em; margin-bottom: clamp(28px, 4vw, 44px); }
.empty { color: var(--muted); }
.empty-page { display: grid; justify-items: start; gap: 20px; padding-block: 40px; }
.empty-page .page-title { margin: 0; }

/* single post */
.article { max-width: 720px; }
.article .crumb { display: block; margin-bottom: 20px; }
.article h1 { margin-top: 6px; font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.article-lead { margin-top: 14px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.article-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin-top: 28px; }
.prose { margin-top: 28px; font-size: 17px; line-height: 1.65; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 24px; margin-top: 1.6em; letter-spacing: -0.02em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; }
.prose img { width: 100%; height: auto; border-radius: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin-inline: 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--bg-alt); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: var(--bg-alt); }
.prose pre code { padding: 0; background: none; }
