:root {
  --bg: #0b0c10;
  --bg-elev: #12141a;
  --bg-card: #161921;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef0f4;
  --text-muted: #9aa1b2;
  --accent: #2ee67f;
  --accent-2: #a6f56c;
  --accent-grad: linear-gradient(135deg, #10b981 0%, #2ee67f 50%, #b4f56a 100%);
  --radius: 16px;
  --max: 1180px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-muted); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 12, 16, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.logo span small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: -2px;
}
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--text); background: rgba(46, 230, 127, 0.14); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 12px 16px; border-radius: 10px; }
  .site-header.nav-open { background: rgba(11, 12, 16, 0.95); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent-grad);
  color: #03140a;
  box-shadow: 0 10px 30px -10px rgba(46, 230, 127, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(46, 230, 127, 0.75); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 75% 35%, rgba(46, 230, 127, 0.22), transparent 70%),
    radial-gradient(40% 40% at 15% 80%, rgba(180, 245, 106, 0.10), transparent 70%),
    var(--bg);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
#embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-content { max-width: 920px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 560px; margin-bottom: 2rem; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 170px 0 70px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 70% at 80% 0%, rgba(46, 230, 127, 0.18), transparent 70%);
}
.page-hero p { font-size: 1.15rem; max-width: 620px; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 230, 127, 0.35);
  box-shadow: 0 20px 50px -25px rgba(46, 230, 127, 0.45);
}
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(46, 230, 127, 0.12);
  color: var(--accent);
  margin-bottom: 20px;
}
.card .icon svg { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }

/* Home "How we build" steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: none;
}
.step { position: relative; overflow: hidden; }
.step::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--accent-grad); opacity: 0.7;
}
.step-num {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; line-height: 1;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-row.center { justify-content: center; margin-top: 36px; }

/* ---------- Game cards ---------- */
.game-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.game-art {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 30% 20%, rgba(46, 230, 127, 0.35), transparent 60%),
    radial-gradient(60% 80% at 90% 100%, rgba(180, 245, 106, 0.22), transparent 60%),
    #1b1e27;
}
.game-art.alt {
  background:
    radial-gradient(70% 90% at 80% 20%, rgba(34, 190, 220, 0.35), transparent 60%),
    radial-gradient(60% 80% at 10% 100%, rgba(46, 230, 127, 0.25), transparent 60%),
    #1b1e27;
}
.game-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.game-card:hover .game-art img { transform: scale(1.04); }
.game-art-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.game-body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.tag.hot { background: rgba(46, 230, 127, 0.15); color: var(--accent-2); }
.game-body .btn-row { margin-top: auto; padding-top: 8px; }
.game-body .btn { padding: 11px 20px; font-size: 0.92rem; }

.game-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.game-stats[hidden] { display: none; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stat-pill strong { color: var(--text); font-weight: 600; }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(46, 230, 127, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 127, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(46, 230, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 127, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 8px;
}
.stat span { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Leadership ---------- */
.leader { text-align: center; padding: 40px 28px; }
.avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #03140a;
  background: var(--accent-grad);
  box-shadow: 0 0 0 6px rgba(46, 230, 127, 0.12), 0 18px 40px -16px rgba(46, 230, 127, 0.7);
}
.leader h3 { margin-bottom: 4px; }
.leader .role {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

/* ---------- Leadership portraits ---------- */
.leadership { overflow: hidden; }
.leadership-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.portrait-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.portrait {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(80% 55% at 50% 45%, rgba(46, 230, 127, 0.22), transparent 70%),
    linear-gradient(180deg, #161a20 0%, #0d0f13 100%);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.portrait:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 230, 127, 0.4);
  box-shadow: 0 24px 60px -28px rgba(46, 230, 127, 0.55);
}
.portrait img {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 105%;
  max-width: none;
  transform: translateX(-50%);
  transition: transform 0.5s ease;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}
.portrait:hover img { transform: translateX(-50%) scale(1.04); }
.portrait-initial {
  position: absolute;
  inset: 0 0 20% 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.08);
}
.portrait.has-avatar .portrait-initial { display: none; }
.portrait-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 70px 24px 22px;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 12, 0.92) 55%);
}
.portrait-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.portrait-role { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--accent-2); }

@media (max-width: 760px) {
  .portrait-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
  }
  .portrait-track::-webkit-scrollbar { display: none; }
  .portrait { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- Careers ---------- */
.role-list { display: flex; flex-direction: column; gap: 14px; }
.role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
}
.role-item h3 { margin: 0 0 4px; }
.role-item p { margin: 0; font-size: 0.95rem; }
.empty-note {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
}
.empty-note p { max-width: 520px; margin: 0 auto 1.5rem; }

.role-main { flex: 1 1 380px; }
.role-item .tags { margin-bottom: 10px; }
.tag.sample { background: rgba(255, 196, 0, 0.14); color: #ffd466; }
.job-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.job-search {
  flex: 1 1 240px;
  max-width: 360px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
}
.job-search:focus { outline: none; border-color: rgba(46, 230, 127, 0.5); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); }
.chip.active { color: var(--text); background: rgba(46, 230, 127, 0.14); border-color: rgba(46, 230, 127, 0.4); }
.no-match { text-align: center; padding: 32px 0; }
.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 18px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, 0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 36px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.modal-panel h2 { font-size: 1.9rem; margin-top: 6px; }
.modal-panel h3 { font-size: 1.05rem; margin: 26px 0 10px; }
.modal-panel ul { margin: 0; padding-left: 20px; color: var(--text-muted); }
.modal-panel li { margin-bottom: 6px; }
.modal-panel li::marker { color: var(--accent); }
.modal-panel .btn-row { margin-top: 30px; }
.modal-panel .posted { font-size: 0.9rem; margin-top: -6px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.06); }

/* ---------- Apply form ---------- */
.apply-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.apply-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 500; color: var(--text); }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field-row label { flex: 1 1 200px; }
.apply-form input, .apply-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  resize: vertical;
}
.apply-form input:focus, .apply-form textarea:focus { outline: none; border-color: rgba(46, 230, 127, 0.5); }
.apply-form .hp { display: none; }
.apply-form .btn-row { margin-top: 4px; }
.apply-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-status { margin: 0; font-size: 0.9rem; min-height: 1em; }
.form-status.error { color: #ff8080; }
.form-done { text-align: center; padding: 24px 0 8px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(46, 230, 127, 0.3), transparent 70%),
    var(--bg-card);
  border: 1px solid rgba(46, 230, 127, 0.25);
}
.cta p { max-width: 520px; margin: 0 auto 2rem; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-top: 32px; font-size: 0.85rem; color: #6b7182; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint::after { animation: none; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .card { padding: 26px; }
  .cta { padding: 48px 24px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
