/* GameZone: site styles */
:root {
  color-scheme: light;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #efedf8;
  --ink: #15162b;
  --ink-2: #4a4c66;
  --muted: #6b6d86;
  --line: #e2e0ee;
  --brand: #5b3df5;
  --brand-ink: #ffffff;
  --brand-soft: #ebe6ff;
  --hl: #ffcf3f;
  --ok: #1a7f45; --ok-bg: #e2f5e9;
  --info: #1f5fbf; --info-bg: #e3edff;
  --soon: #8a5a00; --soon-bg: #fff1cf;
  --warn: #b3261e; --warn-bg: #fde7e5;
  --accent: var(--brand);
  --accent-ink: #fff;
  --accent-soft: var(--brand-soft);
  --radius: 18px;
  --shadow: 0 1px 2px rgb(21 22 43 / .05), 0 8px 28px rgb(21 22 43 / .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0f1d; --surface: #171932; --surface-2: #20233f; --ink: #eceaf8; --ink-2: #c4c3da;
    --muted: #9a9bb5; --line: #2b2e4d; --brand: #8b74ff; --brand-ink: #10112a; --brand-soft: #262150;
    --ok: #6fd69a; --ok-bg: #143323; --info: #8db6ff; --info-bg: #182a4a; --soon: #ffd36e; --soon-bg: #3a2c0b;
    --warn: #ff9b92; --warn-bg: #3d1614;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px rgb(0 0 0 / .25);
  }
  :root:not([data-theme="light"]) body.game, :root:not([data-theme="light"]) body.policy { --accent-soft: var(--accent-soft-dark, var(--brand-soft)); }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f1d; --surface: #171932; --surface-2: #20233f; --ink: #eceaf8; --ink-2: #c4c3da;
  --muted: #9a9bb5; --line: #2b2e4d; --brand: #8b74ff; --brand-ink: #10112a; --brand-soft: #262150;
  --ok: #6fd69a; --ok-bg: #143323; --info: #8db6ff; --info-bg: #182a4a; --soon: #ffd36e; --soon-bg: #3a2c0b;
  --warn: #ff9b92; --warn-bg: #3d1614;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px rgb(0 0 0 / .25);
}
:root[data-theme="dark"] body.game, :root[data-theme="dark"] body.policy { --accent-soft: var(--accent-soft-dark, var(--brand-soft)); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; overflow-wrap: anywhere; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6em; }
.eyebrow a { color: inherit; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; }
.section { padding-block: 40px; }
@media (min-width: 720px) { .section { padding-block: 64px; } }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.logo-mark { width: 36px; height: 36px; }
.logo.small { font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 10px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 600px) { .nav a:not([href="/#games"]) { display: none; } }
.theme-toggle { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 24px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-row p { max-width: 40ch; margin-top: 10px; }
.footer-row nav { display: flex; flex-direction: column; gap: 6px; }
.footer-row nav a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-row nav a:hover { color: var(--brand); }
.fine { font-size: .82rem; color: var(--muted); margin-top: 24px; }

/* buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); transition: transform .15s ease, box-shadow .15s ease; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .92rem; border-radius: 11px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.play svg { width: 18px; height: 18px; }
.btn.play.disabled { background: var(--surface-2); color: var(--ink-2); box-shadow: none; cursor: default; transform: none; }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; }
.chip { font-size: .8rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.soon { background: var(--soon-bg); color: var(--soon); }

/* hero */
.hero { padding: 48px 0 24px; overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 80px 0 40px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } }
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--hl) 75%, transparent) 62%); padding: 0 .1em; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 6px 0 26px; color: var(--ink-2); }
.facts b { font-family: var(--display); font-size: 1.35rem; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { position: relative; height: 280px; max-width: 420px; width: 100%; justify-self: center; }
@media (min-width: 900px) { .hero-art { height: 360px; } }
.hero-art::before { content: ""; position: absolute; inset: 8% 4%; border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; background: radial-gradient(circle at 30% 30%, var(--brand-soft), transparent 70%), radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--hl) 35%, transparent), transparent 65%); }
.stack-icon { position: absolute; width: 44%; aspect-ratio: 1; border-radius: 24%; overflow: hidden; box-shadow: 0 18px 40px rgb(21 22 43 / .22); transition: transform .25s ease; }
.stack-icon img { width: 100%; height: 100%; object-fit: cover; }
.stack-icon:hover { transform: translateY(-6px) rotate(0deg) !important; z-index: 5; }
.stack-icon.s0 { left: 8%; top: 14%; transform: rotate(-8deg); z-index: 2; }
.stack-icon.s1 { right: 8%; top: 34%; transform: rotate(7deg); z-index: 3; }
.stack-icon.s2 { left: 30%; bottom: 0; width: 34%; transform: rotate(-3deg); z-index: 1; }
.stack-icon.s3 { right: 2%; top: 0; width: 26%; transform: rotate(12deg); }

/* games grid */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search input { width: min(260px, 100%); min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; }
.search input:focus { border-color: var(--brand); outline: none; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font: 650 .9rem var(--font); cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.game-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(21 22 43 / .05), 0 18px 40px rgb(21 22 43 / .12); }
.card-media { display: block; aspect-ratio: 1024 / 500; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 0 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body > p { color: var(--ink-2); }
.card-title { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 12px; padding-top: 12px; }
.card-title .app-icon { margin-top: -42px; }
.card-title h3 { margin: 0 0 2px; font-size: 1.15rem; }
.card-title h3 a { color: var(--ink); text-decoration: none; }
.card-title h3 a:hover { color: var(--accent); }
.card-title p { margin: 0; font-size: .88rem; }
.app-icon { width: 72px; height: 72px; border-radius: 22%; border: 3px solid var(--surface); box-shadow: 0 6px 18px rgb(21 22 43 / .18); flex: none; background: var(--surface); }
.app-icon.big { width: 112px; height: 112px; }
.app-icon.tiny { width: 32px; height: 32px; border-width: 0; border-radius: 9px; box-shadow: none; }
.card-actions { margin-top: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 0; }

.promise-grid, .highlights { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tile p { margin: 0; color: var(--ink-2); }
.tile.accent { background: var(--accent-soft); border-color: transparent; }
.contact-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 32px; border-radius: 24px; background: var(--ink); color: var(--bg); }
.contact-card h2 { margin-bottom: .2em; }
.contact-card p { margin: 0; color: color-mix(in srgb, var(--bg) 72%, transparent); }
.contact-card .btn { --accent: var(--hl); --accent-ink: #15162b; overflow-wrap: anywhere; }

/* game page */
/* Feature graphics carry text, so show them whole over a blurred copy instead of cropping. */
.game-banner { position: relative; overflow: hidden; background: var(--accent-soft); display: flex; justify-content: center; }
.game-banner::before { content: ""; position: absolute; inset: -60px; background: var(--banner) center / cover no-repeat; filter: blur(36px) saturate(1.15); opacity: .85; }
.game-banner img { position: relative; width: 100%; max-width: 860px; aspect-ratio: 1024 / 500; object-fit: contain; }
@media (min-width: 900px) { .game-banner { padding: 28px 0 40px; } .game-banner img { border-radius: 20px; box-shadow: 0 20px 50px rgb(0 0 0 / .3); } }
.game-head { display: flex; gap: 24px; align-items: flex-start; padding-top: 24px; position: relative; }
.game-head .app-icon.big { margin-top: -72px; }
@media (max-width: 640px) { .game-head { flex-direction: column; gap: 12px; } .game-head .app-icon.big { width: 92px; height: 92px; margin-top: -60px; } }
.game-head .app-icon.big { border-width: 4px; }
.game-head-copy { flex: 1 1 auto; min-width: 0; }
.game-head h1 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); margin-bottom: .2em; }
.tagline { font-size: 1.15rem; color: var(--ink-2); }
.game-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.shots { list-style: none; padding: 0 0 12px; margin: 0; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.shots li { flex: none; scroll-snap-align: start; }
.shot { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; display: block; box-shadow: var(--shadow); }
.shot img { width: 200px; aspect-ratio: 9 / 16; object-fit: cover; }
@media (min-width: 720px) { .shot img { width: 230px; } }
.game-layout { display: grid; gap: 22px; padding-bottom: 20px; }
@media (min-width: 960px) { .game-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .game-side { position: sticky; top: 84px; } }
.game-main, .game-side { display: grid; gap: 22px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 1.3rem; }
.panel h3 { margin-top: 1.1em; }
.panel > :last-child { margin-bottom: 0; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.features li { position: relative; padding-left: 30px; }
.features li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 6px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--ink); font-weight: 800; font-family: var(--display); }
.bullets { padding-left: 1.2em; margin: 0 0 1em; }
.bullets li { margin-bottom: .3em; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; overflow-wrap: anywhere; }
.info { margin: 0; display: grid; }
.info div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); flex: none; }
.info dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ds { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.ds-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ds-list li { display: flex; gap: 10px; align-items: center; font-weight: 650; padding: 10px 12px; border-radius: 12px; }
.ds-ok { background: var(--ok-bg); color: var(--ok); }
.ds-warn { background: var(--warn-bg); color: var(--warn); }
.ds-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: currentColor; flex: none; font-size: .8rem; }
.ds-ok .ds-icon { color: var(--ok); } .ds-icon { -webkit-text-fill-color: var(--surface); }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(8 9 20 / .88); }
.lightbox img { max-height: 82vh; max-width: 90vw; width: auto; border-radius: 18px; }
.lb-cap { color: #fff; text-align: center; max-width: 60ch; padding: 0 16px; margin: 12px 0 0; }
.lb-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-nav { position: fixed; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }

/* documents */
.doc { padding-block: 48px 24px; max-width: 800px; }
.doc.wide { max-width: 1160px; }
.doc.center { text-align: center; padding-block: 100px; }
.doc.center .lede { margin-inline: auto; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); margin-bottom: .2em; }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; margin-top: 24px; font-size: 1.02rem; overflow-wrap: anywhere; }
@media (min-width: 720px) { .prose { padding: 40px 44px; } }
.prose h2 { font-size: 1.25rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 24px 0; }
.table { border-collapse: collapse; width: 100%; min-width: 640px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.cell-game { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.copy-url { display: inline-flex; align-items: center; gap: 8px; }
.copy { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 4px 10px; font: 600 .8rem var(--font); cursor: pointer; }
.nowrap { white-space: nowrap; }
.optout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); margin: 1em 0; }
.optout p { margin: 0; flex: 1 1 240px; }
.cell-game a { text-decoration: none; }
@media (max-width: 640px) {
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 4px 0; }
  .copy-url { display: flex; align-items: flex-start; }
  .copy-url code { flex: 1; min-width: 0; }
}
.text-link.muted-link { color: var(--ink-2); font-weight: 600; }
