/* Game Bits HQ — "Little games. Big joy."
   Simple, elegant, lots of air. Poppins throughout. */

@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url('/assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url('/assets/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url('/assets/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url('/assets/fonts/poppins-700.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-weight: 800; font-display: swap; src: url('/assets/fonts/poppins-800.woff2') format('woff2'); }

:root {
  --bg: #fbf8f3;
  --bg-2: #f4efe6;
  --surface: #ffffff;
  --ink: #1d1b2e;
  --ink-2: #4a4760;
  --muted: #7d7990;
  --line: #ebe5da;
  --accent: #ff6b4a;
  --accent-ink: #ffffff;
  --bit-1: #ff6b4a;
  --bit-2: #ffb627;
  --bit-3: #2fb38f;
  --bit-4: #6c7bf2;
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 1px 2px rgb(40 30 20 / 5%), 0 12px 40px rgb(40 30 20 / 8%);
  --shadow-lg: 0 30px 80px rgb(40 30 20 / 16%);
  --max: 1160px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131f; --bg-2: #1c1a29; --surface: #221f31; --ink: #f5f1ea; --ink-2: #cfc9d9;
    --muted: #9c96ac; --line: #2f2b40; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 40px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Poppins, system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-2); }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; display: inline-block; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 40ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--bit-4); outline-offset: 3px; border-radius: 8px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .9em 1.5em; border-radius: 999px; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px rgb(29 27 46 / 18%); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgb(255 107 74 / 30%); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-sm { padding: .6em 1.1em; font-size: .9rem; }
.btn svg { width: 1.2em; height: 1.2em; }
.store-badge { display: inline-flex; align-items: center; gap: .7em; background: var(--ink); color: var(--bg); padding: .65em 1.2em .65em 1em; border-radius: 14px; text-decoration: none; line-height: 1.15; transition: transform .2s var(--ease); }
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: .68rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
.store-badge b { font-size: 1.05rem; font-weight: 600; }
.store-badge.soon { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.logo-mark { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: .5em .9em; border-radius: 999px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--bg-2); }
.nav .btn { margin-left: 8px; color: var(--bg); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; }
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--bg); padding: 12px 20px 24px; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .3s var(--ease); box-shadow: var(--shadow); }
  .nav.open { transform: none; }
  .nav a { padding: .9em 1em; font-size: 1.05rem; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---- Page transition + progress ---- */
#main { min-height: 60vh; outline: none; }
#main.leaving { opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
#main.entering { animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--bit-1), var(--bit-2), var(--bit-3), var(--bit-4)); z-index: 200; transition: width .3s var(--ease), opacity .3s; opacity: 0; }
.progress.on { opacity: 1; }

/* ---- Sections ---- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.band { background: var(--bg-2); }

/* ---- Hero ---- */
.hero { padding-top: clamp(40px, 7vw, 90px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 .bits span { display: inline-block; }
.hero h1 .dot { color: var(--accent); }
.hero .lead { margin: 18px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 1.8rem; font-weight: 700; }
.hero-stats span { font-size: .9rem; color: var(--muted); }
.hero-art { position: relative; height: 560px; }
.hero-art .phone { position: absolute; width: 230px; border-radius: 34px; padding: 8px; background: var(--ink); box-shadow: var(--shadow-lg); }
.hero-art .phone img { border-radius: 27px; aspect-ratio: 9/19.5; object-fit: cover; object-position: top; width: 100%; }
.hero-art .p1 { left: 8%; top: 40px; transform: rotate(-7deg); animation: float 7s ease-in-out infinite; }
.hero-art .p2 { left: 38%; top: 0; z-index: 2; animation: float 6s ease-in-out -2s infinite; }
.hero-art .p3 { right: 3%; top: 70px; transform: rotate(7deg); animation: float 8s ease-in-out -4s infinite; }
.hero-art .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; }
@keyframes float { 50% { translate: 0 -12px; } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 420px; max-width: 560px; width: 100%; margin-inline: auto; }
  .hero-art .phone { width: 170px; }
}
@media (max-width: 560px) {
  .hero-art { height: 340px; }
  .hero-art .phone { width: 140px; border-radius: 26px; padding: 6px; }
  .hero-art .phone img { border-radius: 21px; }
  .hero-art .p1 { left: 4%; top: 40px; }
  .hero-art .p2 { left: 34%; top: 0; }
  .hero-art .p3 { right: 2%; top: 50px; }
  .hero-stats { gap: 22px; }
}

/* ---- Game cards ---- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.game-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s; overflow: hidden; isolation: isolate; }
.game-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .16; z-index: -1; }
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.game-card .icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 24px rgb(0 0 0 / 12%); object-fit: cover; background: var(--bg-2); }
.game-card h3 { margin: 4px 0 0; }
.game-card p { margin: 0; font-size: .95rem; }
.game-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: .3em .75em; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.chip.live { background: #d9f5e9; color: #177a59; }
.chip.soon { background: #fff1d6; color: #9a6400; }
.game-card .go { font-weight: 600; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { font: inherit; font-size: .92rem; font-weight: 500; padding: .5em 1.1em; border-radius: 999px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---- Game detail ---- */
.game-hero { padding-top: clamp(32px, 5vw, 70px); position: relative; overflow: hidden; }
.game-hero::before { content: ''; position: absolute; inset: 0 0 30% 0; background: radial-gradient(circle at 20% 20%, var(--c1), transparent 55%), radial-gradient(circle at 80% 10%, var(--c2), transparent 50%); opacity: .18; z-index: -1; }
.game-top { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.game-top .icon { width: 132px; height: 132px; border-radius: 32px; box-shadow: var(--shadow-lg); object-fit: cover; }
.game-top h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; }
.game-top .tag { font-size: 1.25rem; color: var(--ink-2); margin: 6px 0 16px; }
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 4px 20px; scrollbar-width: thin; }
.shots img { flex: none; width: 240px; border-radius: 26px; box-shadow: var(--shadow); scroll-snap-align: start; aspect-ratio: 9/16; object-fit: cover; object-position: top; background: var(--bg-2); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .num { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c1); margin-bottom: 12px; }
.feature p { margin: 0; color: var(--ink); font-weight: 500; }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) { .game-top { grid-template-columns: 1fr; } .game-top .icon { width: 104px; height: 104px; } }

/* ---- Values / about ---- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.value { background: var(--surface); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.value .bit { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 16px; display: grid; place-items: center; font-size: 1.3rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---- CTA band ---- */
.cta { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.cta h2, .cta p { color: var(--bg); }
.cta p { opacity: .8; }
.cta > div { position: relative; z-index: 1; }
.cta .bits-bg { position: absolute; right: -70px; bottom: -90px; width: 300px; opacity: .14; z-index: 0; pointer-events: none; }
@media (max-width: 860px) { .cta .bits-bg { width: 200px; right: -60px; bottom: -70px; opacity: .1; } }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }

/* ---- Forms ---- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: .92rem; display: grid; gap: 6px; }
input, select, textarea { font: inherit; font-size: 1rem; padding: .85em 1em; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bit-4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bit-4) 18%, transparent); }
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .88rem; color: var(--muted); }
.form-status { padding: 14px 16px; border-radius: 14px; font-weight: 500; display: none; }
.form-status.ok { display: block; background: #d9f5e9; color: #145c44; }
.form-status.err { display: block; background: #ffe3dc; color: #8c2a14; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 220px; border-radius: 999px; }
.card { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }

/* ---- FAQ ---- */
.faq details { background: var(--surface); border-radius: 18px; padding: 4px 22px; box-shadow: var(--shadow); margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; }

/* ---- Legal ---- */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.45rem; margin-top: 2em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal li { color: var(--ink-2); margin-bottom: .4em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.toc { background: var(--surface); border-radius: 18px; padding: 18px 24px; box-shadow: var(--shadow); margin: 24px 0 8px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---- Footer ---- */
.site-footer { background: var(--bg-2); padding: 72px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.footer-grid a:hover { color: var(--ink); }
.socials { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.socials a:hover { transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; font-size: .88rem; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Chat widget ---- */
.chat-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); display: grid; place-items: center; transition: transform .25s var(--ease); }
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher svg { width: 28px; height: 28px; }
.chat-launcher .ping { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.chat { position: fixed; right: 22px; bottom: 98px; z-index: 95; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 130px)); background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; transition: transform .25s var(--ease), opacity .2s; }
.chat[hidden] { display: flex; transform: scale(.9) translateY(10px); opacity: 0; pointer-events: none; }
.chat-head { padding: 18px 20px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 12px; }
.chat-head .av { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; }
.chat-head b { display: block; font-size: 1rem; }
.chat-head small { opacity: .75; font-size: .8rem; }
.chat-head button { margin-left: auto; background: transparent; border: 0; color: var(--bg); font-size: 1.6rem; cursor: pointer; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: .94rem; line-height: 1.45; white-space: pre-line; }
.msg.bot { background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user { background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg a { color: var(--bit-4); font-weight: 600; }
.msg.user a { color: inherit; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font: inherit; font-size: .84rem; font-weight: 500; padding: .45em .9em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chips button:hover { border-color: var(--ink); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form input { border-radius: 999px; padding: .75em 1.1em; }
.chat-form button { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat .escalate { display: grid; gap: 10px; background: var(--surface); padding: 14px; border-radius: 18px; box-shadow: var(--shadow); align-self: stretch; }
.chat .escalate input, .chat .escalate textarea, .chat .escalate select { padding: .65em .85em; font-size: .92rem; border-radius: 12px; }
.chat .escalate textarea { min-height: 80px; }
@media (max-width: 520px) { .chat { right: 16px; bottom: 90px; } .chat-launcher { right: 16px; bottom: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
