:root {
  --night: #07090f;
  --night-2: #0d111b;
  --night-line: rgba(255, 255, 255, 0.08);
  --paper: #ffffff;
  --paper-2: #f6f7fb;
  --ink: #0a0d14;
  --muted: #5c6475;
  --line: #e6e8ef;
  --blue: #3b5bff;
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, #3b5bff 0%, #5b8cff 45%, #22d3ee 100%);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden;
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Display type */
.display { font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.92; margin: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue); }
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--grad); border-radius: 2px; }
.center { text-align: center; }
.center .kicker { justify-content: center; }
.lede { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 40em; margin: 22px 0 0; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s;
}
.btn .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.btn:hover { transform: translateY(-2px); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 10px 40px -8px rgba(59, 91, 255, 0.7); }
.btn-grad:hover { box-shadow: 0 16px 50px -8px rgba(59, 91, 255, 0.9); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: #fff; border-color: rgba(255, 255, 255, 0.14); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-white { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }

/* Nav */
.nav-bar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav-bar.is-scrolled, .nav-bar.solid { background: rgba(7, 9, 15, 0.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom-color: var(--night-line); }
.nav-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 900; font-size: 21px; letter-spacing: -0.03em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; }
.brand-mark svg { width: 22px; height: 22px; }
.brand b { color: var(--cyan); }
.nav-links { display: flex; gap: 34px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-links a { color: rgba(255, 255, 255, 0.62); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-bar .btn { min-height: 44px; padding: 0 24px; font-size: 12px; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; min-height: min(100svh, 980px); display: flex; align-items: center; padding: 140px 0 110px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 55% at 50% 0%, rgba(59, 91, 255, 0.35), transparent 70%),
              radial-gradient(40% 40% at 85% 85%, rgba(34, 211, 238, 0.14), transparent 70%),
              radial-gradient(35% 35% at 10% 70%, rgba(91, 140, 255, 0.12), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%); }
.orb { position: absolute; z-index: -1; width: 520px; height: 520px; left: 50%; top: 46%; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59, 91, 255, 0.35), rgba(34, 211, 238, 0.08) 50%, transparent 70%); filter: blur(50px); }
@media (prefers-reduced-motion: no-preference) {
  .orb { animation: orb 9s ease-in-out infinite alternate; }
  @keyframes orb { from { transform: translate(-50%, -50%) scale(.85); opacity: .6; } to { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } }
}
.hero .wrap { width: 100%; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
  font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hero h1 { font-size: clamp(52px, 11.5vw, 168px); margin-top: 34px; }
.hero h1 span { display: block; }
.hero .lede { color: rgba(255, 255, 255, 0.62); margin: 34px auto 0; font-size: clamp(17px, 1.7vw, 21px); max-width: 36em; }
.hero .lede strong { color: #fff; font-weight: 600; }
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }

/* Stats */
.stats { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 80px) 0; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 24px; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.stat-label .ico { width: 16px; height: 16px; color: var(--blue); }
.stat-num { display: block; margin-top: 14px; font-size: clamp(38px, 4.4vw, 54px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.stat-sub { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 64px); }
.section h2.display { font-size: clamp(40px, 6.4vw, 84px); }
.side-note { max-width: 300px; padding-left: 18px; border-left: 2px solid var(--blue); color: var(--muted); font-size: 15px; margin: 0; }

/* Bento */
.bento { display: grid; grid-template-columns: 1.65fr 1fr; grid-template-rows: auto auto; gap: 18px; margin-top: clamp(40px, 6vw, 64px); }
.tile { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 3.4vw, 44px); border: 1px solid var(--line); background: var(--paper-2); }
.tile h3 { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; }
.tile p { color: var(--muted); margin: 14px 0 0; max-width: 30em; }
.tile-main { grid-row: span 2; display: flex; flex-direction: column; min-height: 520px; }
.tile-main::before { content: ""; position: absolute; width: 380px; height: 380px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 91, 255, 0.16), transparent 70%); }
.tile-main > * { position: relative; }
.tile-main p { max-width: 24em; }
.tile-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 26px; box-shadow: 0 10px 30px -8px rgba(59, 91, 255, 0.6); }
.tile-icon .ico { width: 26px; height: 26px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 28px; z-index: 1; max-width: 46%; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.tile-main .code { position: absolute; }
.code { right: -24px; bottom: -24px; width: min(440px, 56%); border-radius: 18px 0 0 0; background: #0b0f1a; border: 1px solid #1d2435; padding: 18px 22px 40px; box-shadow: 0 30px 60px -20px rgba(10, 13, 20, 0.5); transform: rotate(-4deg); transform-origin: bottom right; }
.code-dots { display: flex; gap: 7px; margin-bottom: 16px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }
.code pre { margin: 0; font: 500 12.5px/1.75 ui-monospace, "SF Mono", Menlo, monospace; color: #8a94ad; white-space: pre; overflow: hidden; }
.code .k { color: #7aa2ff; } .code .s { color: #5eead4; } .code .f { color: #e2e8f0; }
.tile-dark { background: var(--night); border-color: var(--night); color: #fff; }
.tile-dark::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.tile-dark p { color: rgba(255, 255, 255, 0.6); position: relative; z-index: 1; }
.tile-big { position: relative; z-index: 1; display: block; font-size: clamp(56px, 6vw, 80px); font-weight: 900; letter-spacing: -0.06em; line-height: 1; }
.tile-soft { background: linear-gradient(140deg, #eef2ff 0%, #e6fbff 100%); border-color: #dce4ff; }
.tile-soft .ico { width: 34px; height: 34px; color: var(--blue); margin-bottom: 18px; }
.tile-soft p { color: #4a5a7a; }

/* Services */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service { position: relative; overflow: hidden; height: 100%; border-radius: 24px; border: 1px solid var(--line); background: #fff; padding: 34px 32px 36px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.service::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(59, 91, 255, 0.18)), transparent 70%); transition: transform .4s; }
.service:hover { transform: translateY(-4px); border-color: #d4d9e6; box-shadow: 0 24px 50px -24px rgba(10, 13, 20, 0.25); }
.service:hover::before { transform: scale(1.3); }
.service-icon { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); margin-bottom: 30px; }
.service h3 { position: relative; margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.service p { position: relative; margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* Process */
.process { background: var(--paper-2); }
.steps { list-style: none; margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; text-align: center; padding: 0 8px; }
.steps li::before { content: "0" counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto; border-radius: 50%; background: #fff; box-shadow: 0 18px 40px -16px rgba(10, 13, 20, 0.28); font-size: 28px; font-weight: 900; letter-spacing: -0.04em; }
.steps li:first-child::before { background: var(--grad); color: #fff; box-shadow: 0 18px 40px -12px rgba(59, 91, 255, 0.6); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 46px; left: calc(50% + 56px); right: calc(-50% + 44px); height: 2px; background: linear-gradient(90deg, rgba(59, 91, 255, 0.4), rgba(34, 211, 238, 0.15)); }
.steps h3 { margin: 28px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.steps p { margin: 10px auto 0; color: var(--muted); font-size: 14.5px; max-width: 24em; }

/* Tech marquee */
.tech { padding: 56px 0 60px; border-top: 1px solid var(--line); overflow: hidden; }
.tech-title { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; color: #9aa2b4; margin: 0 0 30px; }
.marquee { display: flex; width: max-content; }
.tech-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee ul { list-style: none; margin: 0; padding: 0 56px 0 0; display: flex; gap: 56px; }
.marquee li { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: #6b7387; white-space: nowrap; letter-spacing: -0.01em; }
.marquee li .ico { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .marquee { animation: marquee 38s linear infinite; }
  .marquee:hover { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
}

/* Games (dark) */
.arcade { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; }
.arcade::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 22px 22px; }
.arcade::after { content: ""; position: absolute; z-index: -1; width: 700px; height: 500px; left: 50%; top: 0; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(59, 91, 255, 0.22), transparent 70%); filter: blur(20px); }
.arcade .kicker { color: var(--cyan); }
.arcade .lede { color: rgba(255, 255, 255, 0.58); }
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.game { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: #fff; border-radius: 24px; padding: 12px 12px 20px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); transition: transform .25s, background-color .25s, border-color .25s; }
.game:hover { transform: translateY(-6px); background: rgba(255, 255, 255, 0.06); border-color: rgba(91, 140, 255, 0.5); }
.game img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: #141a28; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 8px 0; }
.game-name { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; }
.game-play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); transition: background-color .25s; flex: none; }
.game-play .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.game:hover .game-play { background: var(--grad); }
.game-desc { margin: 8px 8px 0; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.56); }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 8px 0; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.7); }
.tag.is-new { background: var(--grad); border-color: transparent; color: #fff; }
.arcade .more { display: flex; justify-content: center; margin-top: clamp(40px, 6vw, 60px); }

/* Why */
.why-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.why { border-radius: 24px; padding: 34px 32px; border: 1px solid var(--line); background: var(--paper-2); }
.why:nth-child(2) { background: var(--night); border-color: var(--night); color: #fff; }
.why:nth-child(2) p { color: rgba(255, 255, 255, 0.6); }
.why .ico { width: 28px; height: 28px; color: var(--blue); margin-bottom: 22px; }
.why:nth-child(2) .ico { color: var(--cyan); }
.why h3 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.why p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* CTA + footer */
.cta { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; border-radius: clamp(28px, 5vw, 64px) clamp(28px, 5vw, 64px) 0 0; padding: clamp(90px, 13vw, 170px) 0; text-align: center; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 50% 50%, rgba(59, 91, 255, 0.32), transparent 70%); }
.cta .kicker { color: var(--cyan); }
.cta h2.display { font-size: clamp(60px, 11vw, 150px); }
.cta .lede { color: rgba(255, 255, 255, 0.6); margin: 30px auto 0; }
.cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }
.foot { background: var(--night); color: rgba(255, 255, 255, 0.55); border-top: 1px solid var(--night-line); font-size: 14px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 56px; }
.foot-top p { max-width: 26em; margin: 18px 0 0; }
.foot h4 { margin: 0 0 18px; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.35); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.foot a { text-decoration: none; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.foot a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 32px; border-top: 1px solid var(--night-line); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.35); }

/* Inner pages */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; padding: 180px 0 90px; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 70% at 50% 0%, rgba(59, 91, 255, 0.3), transparent 70%); }
.page-hero h1.display { font-size: clamp(54px, 9vw, 120px); }
.page-hero .lede { color: rgba(255, 255, 255, 0.6); }
.arcade.page-games { padding-top: 40px; }
.prose { max-width: 70ch; padding: clamp(56px, 8vw, 96px) 0 clamp(80px, 10vw, 120px); }
.prose h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 44px 0 10px; }
.prose p { color: #3a4254; }
.prose a { color: var(--blue); }

/* Reveal on scroll (only when JS runs, so content never stays hidden) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: 1fr; }
  .tile-main { grid-row: auto; min-height: 560px; }
  .service-grid, .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .steps li:nth-child(2)::after { display: none; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .nav-bar .wrap { height: 70px; }
  .nav-bar .btn { min-height: 40px; padding: 0 18px; }
  .hero { padding: 120px 0 80px; }
  .stat { padding: 20px; border-radius: 18px; }
  .service { padding: 26px 24px 28px; }
  .service-icon { margin-bottom: 20px; }
  .service-grid, .why-grid, .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .pills { max-width: none; }
  .tile-main { min-height: 0; }
  .tile-main .code { position: relative; right: auto; bottom: auto; width: auto; margin: 32px -28px -28px 12px; transform: none; border-radius: 18px 0 0 0; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game { padding: 8px 8px 14px; border-radius: 18px; }
  .game img { border-radius: 12px; }
  .game-name { font-size: 15px; }
  .game-play { display: none; }
  .game-desc { font-size: 12.5px; margin: 6px 4px 0; }
  .game-meta { margin: 12px 4px 0; }
  .game-tags { margin: 10px 4px 0; }
  .tag { font-size: 9.5px; padding: 3px 8px; }
  .page-hero { padding: 140px 0 64px; }
}
