/* Ironjolt: Voltage Pop (direction B) */
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --white: #FFFFFF;
  --ink: #101014;
  --blue: #2D5BFF;
  --lime: #B6FF3B;
  --mist: #F1F3FA;
  --muted: #4A4D5C;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --squircle: 26%;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1; letter-spacing: -0.035em; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
main, .foot { position: relative; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--lime); font-weight: 600; }
.skip:focus { top: 12px; }

/* drifting blob background, drawn by motion.js; plain white without it */
.bg { position: fixed; left: 0; top: 0; z-index: -1; width: 100%; height: 100vh; pointer-events: none; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px;
  padding: 16px var(--pad);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 0 rgba(16, 16, 20, .06);
}
.logo { display: block; width: 150px; }
.logo svg { display: block; width: 100%; overflow: visible; }
.wm-letters { fill: var(--ink); }
.wm-bolt { fill: var(--blue); transform-box: fill-box; transform-origin: 50% 50%; }
.logo.charged .wm-bolt { fill: var(--blue); filter: drop-shadow(0 0 6px rgba(182, 255, 59, .95)); }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav a { font-weight: 600; text-decoration: none; }
.nav a:not(.pill):hover { color: var(--blue); }
.pill { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--lime); font-weight: 600; text-decoration: none; }
.pill:hover { background: var(--blue); color: var(--white); }
.mag > span { display: inline-block; pointer-events: none; }

/* hero */
.hero {
  display: grid;
  gap: 40px;
  padding: clamp(24px, 5vw, 72px) var(--pad) clamp(56px, 8vw, 120px);
  align-items: center;
}
h1 { font-size: clamp(3.4rem, 12vw, 8.4rem); line-height: .9; max-width: 8ch; }
.sub { margin-top: 24px; max-width: 38ch; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block;
  padding: 18px 30px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font: 700 1.15rem/1 var(--display);
  text-decoration: none;
  box-shadow: 0 0 0 0 var(--lime);
  transition: box-shadow .15s ease;
}
.btn:hover { box-shadow: 0 0 0 6px var(--lime); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.btn-ghost:hover { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 6px var(--lime); }

.icon-stage { margin: 0; justify-self: center; position: relative; text-align: center; width: min(78vw, 420px); }
.halo {
  position: absolute;
  width: 62%; aspect-ratio: 1;
  right: -8%; top: -10%;
  border-radius: 50%;
  background: var(--lime);
}
.app-icon {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--squircle);
  background: var(--blue);
  rotate: -8deg;
  box-shadow: 0 30px 60px -20px rgba(45, 91, 255, .55);
  display: grid;
  place-items: center;
}
.app-icon svg { width: 72%; overflow: visible; }
.icon-bolt { fill: var(--lime); stroke: var(--blue); stroke-width: 6; stroke-linejoin: round; transform-box: fill-box; transform-origin: 50% 50%; }
.icon-stage figcaption { position: relative; margin-top: 22px; font: 700 1.2rem/1 var(--display); }

/* what we make */
.make { padding: 0 var(--pad) clamp(56px, 8vw, 120px); }
.make h2, .games h2, .studio h2, .contact h2 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
.tiles { display: grid; gap: 16px; margin-top: 32px; align-items: start; }
.tile { padding: 32px 28px 34px; border-radius: 32px; }
.tile h3 { margin-top: 28px; font-size: 1.7rem; max-width: 14ch; }
.tile p { margin-top: 12px; max-width: 34ch; }
.ico { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.t-blue { background: var(--blue); color: var(--white); }
.t-lime { background: var(--lime); color: var(--ink); }
.t-ink { background: var(--ink); color: var(--white); }
.t-ink .ico { stroke: var(--lime); }

/* our games: one card per entry in data/games.js, icon colors per game */
.games { padding: 0 var(--pad) clamp(56px, 8vw, 120px); }
.game-list { display: grid; gap: 20px; margin-top: 32px; }
.game {
  --g-icon: var(--lime); --g-glyph: var(--ink);
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 36px 28px;
  border-radius: 32px;
  background: var(--mist);
}
.game-icon {
  position: relative;
  width: 132px; aspect-ratio: 1;
  border-radius: var(--squircle);
  background: var(--g-icon);
  display: grid; place-items: center;
}
.game-icon svg { width: 58%; fill: var(--g-glyph); }
/* loading ring: the game is on its way */
.is-soon .game-icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 32%;
  border: 4px solid rgba(45, 91, 255, .16);
  border-top-color: var(--blue);
  border-right-color: var(--blue);
}
.game-status { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--lime); font-weight: 600; font-size: .9rem; }
.game-status:empty { display: none; }
.game-title { margin-top: 16px; font-size: clamp(2.6rem, 7vw, 5rem); }
.game-line { margin-top: 10px; color: var(--muted); }
.game-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.game-links:empty { display: none; }
.game-link { padding: 14px 24px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 1.05rem/1 var(--display); text-decoration: none; }
.game-link:hover { background: var(--blue); }
.game-fallback { font: 700 1.4rem/1.2 var(--display); }

/* credibility block */
.studio { padding: 0 var(--pad) clamp(56px, 8vw, 120px); }
.studio-grid { display: grid; gap: 16px; margin-top: 32px; }
.story { padding: 36px 30px 38px; border-radius: 32px; background: var(--ink); color: var(--white); }
.tag { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.story h3 { margin-top: 20px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 16ch; }
.story p:not(.tag) { margin-top: 16px; max-width: 58ch; color: #C9CBD6; font-size: 1.05rem; }
.facts { display: grid; gap: 22px; padding: 32px 30px; border-radius: 32px; background: var(--mist); align-content: center; }
.facts dt { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: 2px; font: 700 1.4rem/1.2 var(--display); letter-spacing: -0.02em; }
.steps-h { margin-top: 56px; font-size: 1.8rem; }
.steps { display: grid; gap: 16px; margin-top: 20px; }
.steps li { padding: 26px 26px 28px; border-radius: 24px; background: var(--white); box-shadow: inset 0 0 0 2px var(--ink); }
.step-n { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--blue); color: var(--white); font: 700 .95rem/1 var(--display); }
.steps h4 { margin-top: 16px; font-size: 1.4rem; }
.steps p { margin-top: 8px; color: var(--muted); }

/* partner and press strip */
.strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px;
  margin: 0 var(--pad) clamp(56px, 8vw, 120px);
  padding: 32px 28px;
  border-radius: 32px;
  background: var(--ink);
  color: var(--white);
}
.strip-logo { display: block; width: 140px; height: auto; overflow: visible; }
.strip-h { font-size: 1.25rem; letter-spacing: -0.02em; }
.strip-links { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.strip-links a { display: inline-block; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; text-decoration: none; }
.strip-links li:first-child a { background: var(--lime); color: var(--ink); }
.strip-links a:hover { background: var(--blue); color: var(--white); }
.strip :focus-visible { outline-color: var(--lime); }

/* contact */
.contact { padding: clamp(64px, 9vw, 128px) var(--pad); background: var(--blue); color: var(--white); }
.contact > p { margin-top: 14px; }
.email {
  display: inline-block;
  margin-top: 28px;
  font: 700 clamp(1.8rem, 7vw, 5rem)/1.05 var(--display);
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: .1em;
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--lime); }
.contact :focus-visible { outline-color: var(--lime); }
.topics { display: grid; gap: 12px; margin-top: 40px; }
.topics a { display: grid; gap: 2px; padding: 18px 22px; border-radius: 20px; background: rgba(16, 16, 20, .22); text-decoration: none; }
.topics a:hover { background: var(--ink); }
.topics strong { font: 700 1.2rem/1.3 var(--display); }
.topics span { font-size: .95rem; }

/* footer */
.foot { display: flex; justify-content: space-between; padding: 24px var(--pad) 32px; background: var(--white); font-size: .9rem; color: var(--muted); }
.foot a:hover { color: var(--blue); }

/* long-form pages: privacy policy, press placeholder */
.doc { max-width: 72ch; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--pad) clamp(64px, 9vw, 120px); }
.doc h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); max-width: none; }
.doc h2 { margin-top: 44px; font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: -0.02em; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; list-style: disc; }
.doc li + li { margin-top: 8px; }
.doc a { color: var(--blue); text-underline-offset: .15em; overflow-wrap: anywhere; }
.doc-meta { color: var(--muted); }
.doc .draft-note { margin: 0 0 32px; padding: 14px 20px; border-radius: 16px; background: var(--lime); color: var(--ink); }
.page-doc .foot { border-top: 1px solid var(--mist); }

/* cursor trail dots (motion.js, fine pointers only) */
.trail { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; }
.trail i { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--blue); opacity: 0; will-change: transform, opacity; }
.trail i:nth-child(even) { background: var(--lime); box-shadow: 0 0 0 1px rgba(16, 16, 20, .12); }

@media (min-width: 820px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  /* level-select row: the middle tile sits lower */
  .tile:nth-child(2) { margin-top: 28px; }
  .game { grid-template-columns: auto 1fr; padding: 48px 56px; gap: 48px; }
  .game-icon { width: 168px; }
  .studio-grid { grid-template-columns: 1.7fr 1fr; }
  .story { padding: 44px 48px 46px; }
  .facts { padding: 40px; }
  .steps, .topics { grid-template-columns: repeat(2, 1fr); }
  .strip { padding: 32px 40px; }
}
@media (min-width: 1100px) {
  .steps, .topics { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 599px) {
  .topbar { padding-block: 12px; }
  .nav { width: 100%; }
  .nav ul { justify-content: space-between; gap: 6px; font-size: .95rem; }
  .pill { padding: 8px 14px; }
  .steps li { display: grid; grid-template-columns: 3em 1fr; padding: 22px 24px; }
  .step-n { grid-row: 1 / 3; }
  .steps h4 { margin-top: .35em; }
  .strip-links { margin-left: 0; }
  html { scroll-padding-top: 110px; }
}

/* motion: load pop, springy reveals, loading ring. All off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .app-icon { animation: pop .8s var(--spring) .15s both; }
  @keyframes pop {
    from { opacity: 0; rotate: 14deg; scale: .5; }
    to { opacity: 1; rotate: -8deg; scale: 1; }
  }
  .halo { animation: halo .9s var(--spring) .05s both; }
  @keyframes halo { from { scale: 0; } }
  .is-soon .game-icon::after { animation: spin 2.4s linear infinite; }
  @keyframes spin { to { rotate: 1turn; } }
  .logo:hover .wm-bolt { animation: zap .45s steps(2) 2; }
  @keyframes zap { 50% { translate: 1.5px -1px; } }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .rv {
    transition: opacity .5s ease calc(var(--i, 0) * 80ms), translate .9s var(--spring) calc(var(--i, 0) * 80ms), scale .9s var(--spring) calc(var(--i, 0) * 80ms);
  }
  .rv:not(.in) { opacity: 0; translate: 0 48px; scale: .94; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
