/* =========================================================
   GameDevr — site styles
   ========================================================= */

@font-face { font-family: "Unbounded"; src: url("/assets/fonts/unbounded-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #0E1012;
  --panel: #16191D;
  --panel-2: #1D2126;
  --chip: #23282F;
  --bar: #121417;
  --line: #2A2F36;
  --line-soft: #23272D;
  --line-band: #1F2328;
  --line-input: #2E333A;
  --border-btn: #3A3F46;
  --text: #EDEDE6;
  --text-2: #C9CDD2;
  --muted: #A3A9B0;
  --muted-2: #8A9098;
  --placeholder: #7D848C;
  --accent: #00A8FC;
  --on-accent: #08111F;
  --orange: #FF560A;
  --success: #3DD68C;
  --error: #FF7A6B;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--text-2); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.band { border-top: 1px solid var(--line-band); }
.accent { color: var(--accent); }
.muted { color: var(--muted-2); }
.mb-32 { margin-bottom: 32px !important; }
.mb-48 { margin-bottom: 48px !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-primary { border: 0; background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #2BB8FF; color: var(--on-accent); }
.btn-outline { border: 1px solid var(--border-btn); background: transparent; color: var(--text); }
.btn-outline:hover { border-color: #5A616A; color: #fff; }
.btn-social { padding: 0 22px 0 14px; }
.btn-social img { width: 28px; height: 28px; border-radius: 7px; }
.btn-social img.framed { border: 1px solid var(--border-btn); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* desktop / phone switches */
.only-mobile, .only-mobile-block { display: none !important; }
@media (max-width: 767px) {
  .only-desktop, .only-desktop-block { display: none !important; }
  .only-mobile { display: inline-flex !important; }
  .only-mobile-block { display: flex !important; }
}

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line-soft); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 30px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 24px; flex: 1 1 auto; font-size: 15px; }
.nav-links a { text-decoration: none; padding: 10px 0; }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 96px; padding-bottom: 48px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-input); border-radius: 999px; font-size: 14px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 7vw, 100px); line-height: 1.06; letter-spacing: -0.03em; }
.hero-sub { max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero-note { font-size: 14px; color: var(--muted); }

/* ---------- headings & copy ---------- */
.h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.2; letter-spacing: -0.02em; }
.h2-xl { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 52px); line-height: 1.15; letter-spacing: -0.02em; }
.lead { max-width: 36em; font-size: 17px; color: var(--muted); }

/* ---------- cards ---------- */
.cards-3 { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 48px; }
.card { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.card h3 { font-size: 22px; font-weight: 700; }
.card p { color: var(--text-2); }
.step { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--accent); }

.cards-4 { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.tpl { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s ease; }
a.tpl:hover { border-color: #46505C; color: var(--text); }
.tpl-name { font-size: 20px; font-weight: 700; }
.tpl-desc { font-size: 15px; color: var(--muted); }
.tpl-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
.tpl-soon { justify-content: center; border-style: dashed; border-color: var(--border-btn); background: transparent; }
.tpl-soon .tpl-name { color: var(--text-2); }

.features { display: flex; flex-wrap: wrap; gap: 40px 48px; }
.feature { flex: 1 1 440px; display: flex; gap: 18px; }
.feature h3 { margin-bottom: 6px; font-size: 20px; font-weight: 700; }
.feature p { color: var(--muted); }
.f-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--panel-2); color: var(--accent); }

/* ---------- download ---------- */
.dl-card { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.dl-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.dl-text { font-size: 17px; color: var(--text-2); }
.fine { font-size: 14px; color: var(--muted-2); }
.dl-forms { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .input { flex: 1 1 200px; }
.row .btn { flex: 1 0 auto; }
.br-m { display: none; }
.input { min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--border-btn); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.input.mono { font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.input::placeholder { color: var(--placeholder); text-transform: none; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 168, 252, .25); }
.input[aria-invalid="true"] { border-color: var(--error); }
.note { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); font-size: 14px; color: var(--text-2); }
.waitlist { margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.status.is-ok { color: var(--success); }
.status.is-error { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary svg { flex: none; color: var(--muted); transition: transform .2s ease; }
details[open] summary svg { transform: rotate(180deg); }
details p { padding: 0 0 22px; color: var(--text-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-band); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-top: 40px; padding-bottom: 56px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand-name { font-size: 18px; }
.footer-brand .muted { font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; }
.footer-links a, .footer-links span { padding: 10px 0; }
.footer-links a { text-decoration: none; }

/* =========================================================
   Product demo window
   ========================================================= */
.demo-section { padding-top: 16px; padding-bottom: 96px; }
/* The demo is always drawn as a 1152px-wide desktop window and scaled down
   to fit smaller screens (see fitDemo in site.js), so phones see a miniature
   of the real app instead of a stacked layout. */
.demo-frame { position: relative; width: 100%; }
.demo { width: 1152px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 40px 120px rgba(0, 0, 0, .45); text-align: left; transform-origin: top left; }
.demo.is-scaled { position: absolute; top: 0; left: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.demo-bar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bar); }
.lights { display: flex; gap: 6px; }
.lights span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-btn); }
.demo-title { flex: 1 1 auto; text-align: center; font-size: 13px; color: var(--muted); }
.run-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; transition: box-shadow .2s ease, background-color .2s ease; }
.run-btn.is-running { background: var(--line); color: var(--text); }
.run-btn.is-ring { box-shadow: 0 0 0 4px rgba(0, 168, 252, .35); }

.demo-body { display: flex; flex-wrap: nowrap; }
.chat { flex: 0 0 384px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.pane-head { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.chat-log { flex: 1 1 auto; height: 380px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: 18px; font-size: 14px; line-height: 1.65; }
.msg-user { display: flex; justify-content: flex-end; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--chip); }
.msg-ai { display: flex; gap: 10px; }
.avatar { flex: none; width: 28px; height: 21px; margin-top: 3px; }
.ai-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.checklist { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.checklist b { color: var(--accent); font-weight: 400; }
.checklist .pending { color: var(--muted-2); }
.composer { display: flex; align-items: center; gap: 8px; margin: 0 14px 14px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-input); border-radius: 12px; background: var(--bar); }
.composer-text { flex: 1 1 auto; min-width: 0; min-height: 22px; font-size: 14px; line-height: 1.55; }
.composer-text .placeholder { color: var(--placeholder); }
.caret { display: inline-block; width: 2px; height: 16px; margin-left: 1px; vertical-align: -3px; background: var(--accent); }
.send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--on-accent); }

.stage { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.tabs { display: flex; gap: 4px; }
.tab { padding: 3px 10px; border-radius: 6px; color: var(--muted-2); }
.tab.is-on { background: var(--chip); color: var(--text); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.tools span { padding: 3px 8px; border: 1px solid var(--line-input); border-radius: 6px; }

.viewport { position: relative; flex: 1 1 auto; min-height: 440px; overflow: hidden; background: #1B2431; }
.viewport > * , .viewport [data-el="built"] > *, .viewport [data-el="flag"] > *, .viewport [data-el="edit"] > * { position: absolute; }
.viewport [data-el="built"], .viewport [data-el="flag"], .viewport [data-el="edit"] { inset: 0; }
.moon { right: 12%; top: 12%; width: 56px; height: 56px; border-radius: 50%; background: #E9E4D0; opacity: .85; }
.star { width: 3px; height: 3px; background: var(--text-2); }
.star.sm { width: 2px; height: 2px; }
.empty-hint { inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 14px; color: var(--muted-2); }
.ground { left: 0; right: 0; bottom: 0; height: 52px; background: #2B3340; border-top: 4px solid #4A5566; }
.plat { height: 16px; background: #3A4250; border-top: 4px solid #5B6577; border-radius: 3px; }
.pole { right: 6%; bottom: 56px; width: 4px; height: 88px; background: var(--text-2); }
.banner { right: calc(6% - 26px); bottom: 122px; width: 26px; height: 18px; background: #E06C5A; }
.bone { width: 20px; height: 8px; border-radius: 4px; background: #F2EFE6; }
.crab { width: 30px; height: 16px; border-radius: 14px 14px 4px 4px; background: #9AA3AE; transition: left .1s linear; }
.select-box { left: calc(37% - 6px); bottom: 184px; width: calc(16% + 12px); height: 32px; border: 1.5px dashed var(--accent); border-radius: 4px; }
.select-tag { left: calc(37% - 6px); bottom: 222px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.inspector { right: 14px; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line-input); border-radius: 8px; background: rgba(18, 20, 23, .92); font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.inspector b { color: var(--text); font-weight: 400; }
.dog { width: 40px; height: 30px; }
.dog.is-moving { transition: left .3s linear, bottom .3s ease-out; }
.dog > span { position: absolute; }
.dog .ear { top: -6px; width: 9px; height: 9px; background: #E3A35B; transform: rotate(45deg); }
.dog .ear.l { left: 4px; } .dog .ear.r { right: 4px; }
.dog .body { inset: 0; border-radius: 8px; background: #E3A35B; }
.dog .eye { right: 8px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--on-accent); }
.hud { left: 14px; top: 12px; padding: 4px 10px; border-radius: 6px; background: rgba(14, 16, 18, .7); font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.clear { left: 50%; top: 36%; transform: translate(-50%, -50%); padding: 10px 22px; border: 1px solid var(--accent); border-radius: 10px; background: rgba(8, 17, 31, .88); font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .04em; color: var(--text); white-space: nowrap; }

@media (max-width: 767px) {
  .nav { flex-wrap: nowrap; justify-content: space-between; }
  .nav-links { display: none; }
  .hero { padding-top: 64px; }
  .hero-title { font-size: clamp(34px, 10.4vw, 52px); }
  .br-m { display: inline; }
  .br-d { display: none; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .demo-section { padding-bottom: 72px; }
  .btn-lg { width: 100%; }
  .cta-row .btn-social { width: auto; flex: 1 1 0; }
  .row .btn { width: 100%; }
}
