@font-face { font-family: 'Syne'; font-weight: 800; font-display: swap; src: url('/assets/fonts/syne-800.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/assets/fonts/dm-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/assets/fonts/dm-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/assets/fonts/dm-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/assets/fonts/jetbrains-mono-500.woff2') format('woff2'); }

:root {
  --ink: #0e1116;
  --ink-2: #131821;
  --tile: #1b212b;
  --line: rgba(232, 237, 242, 0.10);
  --line-2: rgba(232, 237, 242, 0.18);
  --text: #e8edf2;
  --muted: #9aa6b4;
  --accent: #2ee6d6;
  --accent-ink: #062a27;
  --display: 'Syne', 'Trebuchet MS', sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 18px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 0.98; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.mono, .label, .kicker, .tagline, .meta, .tags { font-family: var(--mono); }
.label { color: var(--accent); font-size: 13px; letter-spacing: 0.04em; margin-bottom: 14px; }
.meta { color: var(--muted); font-size: 13px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(14, 17, 22, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform .15s, background .15s, box-shadow .15s, border-color .15s;
}
.btn--play { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 28px rgba(46, 230, 214, 0.22); }
.btn--play:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(46, 230, 214, 0.32); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--big { min-height: 60px; padding: 0 30px; font-size: 18px; }

/* hero */
.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 70% at 72% 45%, rgba(46, 230, 214, 0.13), transparent 70%),
    var(--ink);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, #000 30%, transparent 80%);
  opacity: 0.6;
}
.hero__in { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 32px; min-height: min(720px, calc(100svh - 68px)); padding-top: 56px; padding-bottom: 56px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: rgba(19, 24, 33, 0.7); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1 { font-size: clamp(44px, 7.2vw, 92px); margin: 26px 0 22px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tagline { margin-top: 40px; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; }
.cursor { color: var(--accent); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__art { display: flex; justify-content: center; }
.stage { position: relative; width: min(100%, 440px); aspect-ratio: 4 / 5; }
.stage::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: 6%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(46, 230, 214, 0.28), transparent); filter: blur(6px); }
.stage canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; touch-action: pan-y; }
.stage__fallback { position: absolute; left: 50%; top: 50%; width: 52%; height: auto; transform: translate(-50%, -50%); transition: opacity .6s; filter: drop-shadow(0 20px 40px rgba(46, 230, 214, 0.18)); }
.stage.is-3d canvas { opacity: 1; }
.stage.is-3d .stage__fallback { opacity: 0; }

/* sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { margin-bottom: 36px; }
h2 { font-size: clamp(32px, 4.6vw, 52px); }

/* game cards */
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.game:hover { border-color: rgba(46, 230, 214, 0.45); }
.game__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #2a3442; }
.game__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game:hover .game__media img { transform: scale(1.03); }
.game__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game h3 { font-size: 30px; }
.game h3 a { text-decoration: none; }
.game__sub { color: var(--accent); font-weight: 500; margin-top: -4px; }
.game p { color: var(--muted); }
.game__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 8px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.tags li { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; color: var(--text); }

.game--featured { grid-column: span 2; flex-direction: row; }
.game--featured .game__media { flex: 1.25; aspect-ratio: auto; min-height: 340px; }
.game--featured .game__body { flex: 1; padding: 32px; }
.game--featured h3 { font-size: clamp(32px, 3.4vw, 44px); }

.game--soon { border-style: dashed; background: transparent; }
.soon { padding: 32px 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; height: 100%; min-height: 220px; }
.soon__title { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }

/* what we make */
.make { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.make__item { border-top: 2px solid var(--line-2); padding-top: 22px; }
.make__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tile); color: var(--accent); font: 700 18px/1 var(--mono); margin-bottom: 18px; }
.make h3 { font-size: 26px; margin-bottom: 10px; }
.make p { color: var(--muted); }

/* contact */
.contact { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(ellipse 70% 120% at 100% 100%, rgba(46, 230, 214, 0.12), transparent 60%), var(--ink-2); }
.contact h2 { margin-bottom: 14px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot__in { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot__in img { height: 26px; width: auto; }
.foot__in .meta { margin-left: auto; }

/* tablet / phone */
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 8px; }
  .hero__art { order: -1; }
  .stage { width: min(60vw, 250px); }
  .kicker { font-size: 12px; }
  .games { grid-template-columns: 1fr 1fr; }
  .game--featured { grid-column: 1 / -1; flex-direction: column; }
  .game--featured .game__media { aspect-ratio: 16 / 10; min-height: 0; }
  .make { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .nav { gap: 14px; font-size: 14px; }
  .nav a[href="#make"] { display: none; }
  .brand img { height: 26px; }
  .games { grid-template-columns: 1fr; }
  .game--featured .game__body { padding: 22px; }
  .cta .btn { flex: 1 1 auto; }
  .contact .btn--big { width: 100%; font-size: 16px; }
  .foot__in .meta { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .btn, .game, .game__media img { transition: none; }
}
