/* ===== Tokens ===== */
:root {
  --bg: #0a0a0f;
  --bg-alt: #101018;
  --surface: #15151f;
  --surface-2: #1c1c29;
  --border: #26263a;
  --text: #ececf3;
  --muted: #9a9ab0;
  --accent-1: #8b5cf6;   /* violet */
  --accent-2: #22d3ee;   /* cyan */
  --accent-3: #f472b6;   /* pink */
  --grad: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; } /* 68px header + 24px air */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  border: 0;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 30px -10px rgba(139, 92, 246, .7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(34, 211, 238, .7); }
.btn-ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { border-color: var(--muted); box-shadow: none; }
.btn-small { padding: 0.55em 1.1em; font-size: 0.92rem; }
.btn-large { padding: 1em 2em; font-size: 1.1rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 15, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.logo-mark { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-word { color: var(--text); font-weight: 500; }
/* Animated "wow": colours flow through the letters, which hop in a little wave every few seconds */
.logo-anim { display: inline-flex; background: none; color: inherit; }
.logo-anim span {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2) 33%, var(--accent-3) 66%, var(--accent-1));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wow-flow 6s linear infinite, wow-hop 5s cubic-bezier(.3, .7, .4, 1) infinite;
}
.logo-anim span:nth-child(2) { animation-delay: -.6s, .12s; }
.logo-anim span:nth-child(3) { animation-delay: -1.2s, .24s; }
@keyframes wow-flow { to { background-position: 200% 0; } }
@keyframes wow-hop {
  0%, 16%, 100% { transform: none; }
  5% { transform: translateY(-5px) scale(1.12) rotate(-6deg); }
  10% { transform: translateY(1px) scale(.96); }
}
.lang-switch {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: .08em;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}
.nav-links a.lang-switch:hover { border-color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .25s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; padding: 96px 0 120px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background:
    radial-gradient(circle at 30% 40%, rgba(139, 92, 246, .35), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(34, 211, 238, .25), transparent 55%);
  filter: blur(40px);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

/* Hero: real work collage */
.hero-visual { position: relative; display: flex; justify-content: flex-end; padding-bottom: 40px; }
.shot {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.85);
}
.shot video, .shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; color: #fff;
  background: rgba(10,10,15,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 12px;
}
.shot-main { width: min(78%, 380px); aspect-ratio: 512 / 720; }
.shot-main figcaption { left: auto; right: 12px; }
.shot-side {
  position: absolute; left: 0; bottom: 0;
  width: min(42%, 210px); aspect-ratio: 832 / 1216;
  transform: rotate(-5deg); background: #e9e9ec;
}
.shot-side img { object-fit: contain; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* ===== Sections ===== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-sub { color: var(--muted); font-size: 1.1rem; }

/* ===== Animate: before / after ===== */
.before-after { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: start; max-width: 900px; }
.ba-item { margin: 0; }
.ba-item img, .ba-item video {
  width: 100%; height: auto; aspect-ratio: 512 / 720; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.ba-item figcaption { margin-top: 12px; color: var(--muted); font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.tag {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; color: var(--muted);
}
.tag-hot { color: var(--accent-3); border-color: rgba(244,114,182,.4); background: rgba(244,114,182,.08); }
.ba-arrow { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 150px; text-align: center; }
.ba-arrow svg { width: 48px; height: 24px; fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba-prompt { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); line-height: 1.4; }
.facts { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { border-top: 2px solid var(--border); padding-top: 16px; position: relative; }
.facts li::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--grad); }
.facts strong { display: block; margin-bottom: 4px; }
.facts span { color: var(--muted); font-size: 0.95rem; }
.facts a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.pill {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-3); border: 1px solid rgba(244,114,182,.4); background: rgba(244,114,182,.08);
  border-radius: 999px; padding: 2px 10px;
}
.status {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 40px; max-width: 900px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.status-item { background: var(--surface); padding: 20px 24px; }
.status-item p { margin: 8px 0 0; color: var(--muted); font-size: 0.96rem; }
.status-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.status-next { color: var(--accent-2); }
#game-assets .status { margin-top: 72px; }

/* ===== Game assets: concept flow ===== */
.flow { list-style: none; padding: 0; margin: 0; position: relative; }
.flow::before {
  content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(var(--accent-1), var(--accent-2), var(--accent-3));
  opacity: .5;
}
.flow-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 28px; padding-bottom: 72px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-node {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 600;
  background: var(--bg-alt); border: 2px solid var(--accent-1); color: var(--text);
  position: relative; z-index: 1;
}
.flow-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; align-items: start; min-width: 0; }
.flow-wide .flow-body { grid-template-columns: 1fr; gap: 24px; }
.flow-text { padding-top: 8px; max-width: 46ch; }
.flow-text p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.chip { font-family: var(--mono); font-size: 0.75rem; color: var(--text); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px; }
.brief {
  margin: 0; padding: 28px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent-1);
  font-size: 1.15rem; line-height: 1.55;
}
.brief p { margin: 0; }
.brief footer { margin-top: 14px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.media img { width: 100%; height: 100%; }
.media-tall { background: #e9e9ec; max-width: 380px; aspect-ratio: 832 / 1216; }
.media-tall img { object-fit: contain; }
.media-wide { background: linear-gradient(#e7edf6, #cfd9e8); }
.turn-labels {
  display: grid; grid-template-columns: repeat(4, 1fr); text-align: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase;
  color: #4b5563; padding: 0 0 12px;
}
.phone {
  margin: 0; position: relative; width: 100%; max-width: 280px; aspect-ratio: 405 / 720;
  border-radius: 34px; padding: 10px; background: #050507;
  border: 1px solid var(--border); box-shadow: 0 30px 60px -25px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; background: #63a34f; }
.flow-cta { margin-top: 64px; padding-left: 76px; }

/* ===== Cards ===== */
.cards { display: grid; gap: 24px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: #3a3a58; transform: translateY(-3px); }
.card > p { color: var(--muted); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 22px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(34,211,238,.18));
  border: 1px solid var(--border);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; padding: 0; margin: 1.2em 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 0.96rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2);
  transform: rotate(-45deg) translateY(-3px);
}
/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.principles li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; }
.principles h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.principles p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ===== Contact ===== */
.contact-box {
  text-align: center; display: flex; flex-direction: column; align-items: center;
  padding-top: 72px; padding-bottom: 72px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139,92,246,.22), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  max-width: calc(var(--container) - 48px);
  width: calc(100% - 48px);
}
.contact-box .lead { margin-bottom: 2rem; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a:hover { color: var(--text); }
.legal { margin: 0; order: 4; flex-basis: 100%; font-size: 0.82rem; line-height: 1.7; }
.ai-note { order: 3; flex-basis: 100%; margin: 0; font-size: 0.82rem; opacity: .8; }

/* ===== Legal pages ===== */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose p, .prose li { color: #c9c9d6; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose .ticks { margin: 0 0 1em; }
.prose .updated { color: var(--muted); font-size: 0.92rem; }
.prose .eyebrow { color: var(--accent-2); }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin: 32px 0 8px; }
.summary h2 { margin-top: 0; font-size: 1.1rem; }
.summary .ticks { margin: 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 14px 32px; margin: 32px 0 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.details dt { color: var(--muted); font-size: 0.92rem; }
.details dd { margin: 0; }
.details a { color: var(--accent-2); }
@media (max-width: 560px) { .details { grid-template-columns: 1fr; gap: 4px; } .details dd { margin-bottom: 12px; } }
/* Close button + company-details popup */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.close-x {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: color .2s ease, border-color .2s ease;
}
.close-x:hover { color: var(--text); border-color: var(--muted); }
.close-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
dialog.modal {
  padding: 0; border: 0; background: transparent; color: var(--text);
  width: min(720px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px);
}
dialog.modal[open] { animation: modal-in .2s ease-out; }
dialog.modal::backdrop { background: rgba(5, 5, 8, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
html:has(dialog.modal[open]) { overflow: hidden; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 28px 28px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.modal .details { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
@media (max-width: 560px) { .modal-card { padding: 18px 20px 22px; } }
mark.todo { background: rgba(250, 204, 21, .16); color: #fde68a; border: 1px dashed rgba(250, 204, 21, .5); border-radius: 4px; padding: 0 4px; }
.footer-links a[aria-current="page"] { color: var(--text); }

/* ===== Reveal on scroll ===== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 88px; }
  .hero-visual { justify-content: center; max-width: 520px; margin: 0 auto; width: 100%; }
  .flow-body { grid-template-columns: 1fr; gap: 24px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .cards-2 { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ba-arrow { grid-column: 1 / -1; grid-row: 2; flex-direction: row; max-width: none; justify-content: center; }
  .ba-arrow svg { transform: none; }
  .ba-item figcaption { font-size: 0.85rem; flex-wrap: wrap; gap: 6px; }
  .facts { grid-template-columns: 1fr; }
  .status { grid-template-columns: 1fr; }
  .flow::before { left: 17px; }
  .flow-step { grid-template-columns: 36px 1fr; gap: 16px; padding-bottom: 56px; }
  .flow-node { width: 36px; height: 36px; font-size: 0.75rem; }
  .brief { padding: 22px; font-size: 1.05rem; }
  .flow-cta { padding-left: 0; }
  .turn-labels { font-size: 0.6rem; }
  .card { padding: 26px 22px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 16px; }
  .nav-links a.lang-switch { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 4px; font-size: 0.9rem; }
  .contact-box { border-radius: 20px; padding: 56px 20px; margin: 0 16px; max-width: none; width: auto; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
