/* ==========================================================================
   Arise Games — main stylesheet
   1. Tokens  2. Base  3. Layout  4. Header/Nav  5. Buttons  6. Sections
   7. Cards   8. Forms 9. Footer  10. Animations  11. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #0b0b12;
  --bg-alt: #12121c;
  --surface: #1a1a28;
  --border: #2a2a3d;
  --text: #f2f2f7;
  --text-muted: #a0a0b8;
  --primary: #7c5cff;
  --primary-2: #ff4ecd;
  --accent: #3ee6c1;
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-2));

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 88px; /* space the floating header takes at the top (24px gap + 64px bar) */
  --hero-blur: 0px; /* how blurry the homepage background video is (0px = sharp) */
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* Keyboard users: a clear outline on whatever has focus (mouse clicks don't show it) */
:focus-visible { outline: 2px solid #4f9bff; outline-offset: 3px; border-radius: 6px; }
/* "Skip to content" link: hidden until a keyboard user tabs to it */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200; padding: 10px 16px; border-radius: 8px;
  background: #fff; color: #111; font-weight: 600; transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 3. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 100px; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 48px; }
.section__head p { max-width: 560px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* 4. Header / Nav ---------------------------------------------------------- */
/* Floating "glass" pill, centred near the top (clicks pass through the empty space around it) */
.header {
  position: fixed; top: 24px; left: 0; right: 0; z-index: 100;
  padding-inline: 24px; pointer-events: none;
}
.header .container {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 768px; height: 64px; padding: 0 16px 0 20px; border-radius: 999px;
  transition: box-shadow .5s var(--ease);
}
/* Glass look (also used by the mobile menu panel): dark tint keeps links readable over the
   bright hero video, plus blur and a hairline border */
.header {
  --glass-bg: linear-gradient(180deg, rgba(22, 22, 32, .62), rgba(12, 12, 20, .5));
  --glass-blur: blur(20px) saturate(140%);
  --glass-border: 1px solid rgba(255, 255, 255, .08);
  --glass-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 20px 60px -20px rgba(0, 0, 0, .7);
}
.header .container {
  background: var(--glass-bg); border: var(--glass-border); box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
/* Soft blue glow once the page is scrolled */
.header.is-scrolled .container { box-shadow: var(--glass-shadow), 0 0 24px rgba(79, 124, 255, .25); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.6rem; color: #fff; line-height: 1; }
.logo img { height: 32px; width: 32px; transition: transform .6s var(--ease), filter .3s; }
.header .logo img { height: 32px; width: 32px; }
.logo:hover img { transform: rotate(90deg) scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 255, 255, .55)); }

/* Wordmark: "AriseGames" (one word). The i is the font's own "i", so its dot is always exactly where the
   font puts it, on every computer and phone (a drawn-on dot drifted with some fonts). */
.wordmark { font-family: "Helvetica Now Display", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; letter-spacing: -.07em; color: #fff; padding-right: .07em; white-space: nowrap; }
.wordmark__i { margin-left: .05em; } /* a touch more room after the r */
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
/* Small grey links that turn white, with a thin glowing line that grows from the centre */
.nav__link {
  position: relative; display: inline-block; padding: 8px 14px;
  font-size: .84rem; font-weight: 500; letter-spacing: .025em; color: #b4b4c0; transition: color .3s;
}
.nav__link:hover, .nav__link.is-active { color: #fafafa; }
.nav__link::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 4px; height: 1px;
  background: linear-gradient(90deg, transparent, #4f9bff, transparent);
  transform: scaleX(0); transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); margin: 5px 0; border-radius: 1px; transition: transform .3s, opacity .3s; }
.nav__toggle:hover span { background: #4f9bff; }

/* 5. Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; font-size: 1rem; font-family: inherit;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 30px rgba(124, 92, 255, .35); }
.btn--primary:hover { box-shadow: 0 12px 40px rgba(124, 92, 255, .55); }
.link-arrow { color: var(--accent); font-weight: 600; }
.link-arrow::after { content: " →"; transition: margin .2s; }
.link-arrow:hover::after { margin-left: 4px; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* 6. Sections -------------------------------------------------------------- */
/* Hero: blurred background video with a glass card on top */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 85vh; display: grid; place-items: center;
  padding: calc(var(--header-h) + 40px) 20px 40px; text-align: center; background: #000;
}
.hero__video {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  filter: blur(var(--hero-blur, 0px));
  transform: scale(var(--hero-zoom, 1)); /* if you add blur, set --hero-zoom to ~1.15 to hide soft edges */
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .2); }
.hero__card {
  background: rgba(40, 40, 40, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 16px; padding: 20px 24px; max-width: 100%;
}
.hero__brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero__brand h1 { margin: 0; line-height: 1; font-size: clamp(2.6rem, 6.5vw, 4.4rem); color: #fff; white-space: nowrap; }
.hero__emblem {
  height: clamp(46px, 6.5vw, 66px); width: auto; aspect-ratio: 1;
  cursor: pointer;
  /* spins in once on load; "backwards" fill so the hover/click rotation below can take over */
  animation: emblem-in .9s var(--ease) backwards;
  /* --turn grows by 90deg on each click (js/main.js) — the emblem looks the same every quarter-turn */
  transform: rotate(var(--turn, 0deg));
  transition: transform .6s var(--ease), filter .3s;
}
/* Hovering the logo or name turns the emblem, like the header logo */
.hero__brand:hover .hero__emblem { transform: rotate(calc(var(--turn, 0deg) + 90deg)) scale(1.08); filter: drop-shadow(0 0 12px rgba(255, 255, 255, .5)); }
/* Letters rise in one after another on load */
.wordmark--animated > span { display: inline-block; animation: letter-in .6s var(--ease) calc(.25s + var(--i) * .05s) both; }
.hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.hero__actions .btn { justify-content: center; border-radius: 8px; padding: 13px 20px; font-size: 1.1rem; }
.btn--blue { background: #4f7cff; color: #fff; }
.btn--blue:hover { background: #3f6af0; }
.btn--white { background: #fff; color: #111; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.hero__stats strong { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; color: #fff; }
.hero__stats span { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .75); font-size: .95rem; }
.hero__stats svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.page-hero { padding: calc(var(--header-h) + 80px) 0 60px; text-align: center; }
.notfound { min-height: 70vh; display: grid; place-items: center; }
.page-hero p { max-width: 640px; margin-inline: auto; font-size: 1.1rem; }
.page-hero--left { text-align: left; padding-bottom: 40px; }
.page-hero--left p { margin-inline: 0; max-width: none; }
.page-hero--left h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.back-link { display: inline-block; color: var(--text-muted); margin-bottom: 20px; transition: color .2s; }
.back-link:hover { color: var(--text); }
.page-hero--left + .section .filters { justify-content: flex-start; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.stat__num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.stat__label { color: var(--text-muted); }

/* About page: story text on the left, 2 x 2 key numbers on the right */
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.story__text p { font-size: 1.05rem; }
.story__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.story__stats div { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.story__stats strong { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; color: #fff; }
.story__stats span { color: var(--text-muted); font-size: .95rem; }

.cta-band { text-align: center; background: var(--gradient); border-radius: var(--radius); padding: 64px 24px; }
.cta-band p { color: rgba(255, 255, 255, .85); }
.cta-band .btn { background: #fff; color: #111; }

/* 7. Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--primary); }
.card__icon { font-size: 2rem; margin-bottom: 16px; }

.game-card {
  display: flex; flex-direction: column; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s;
}
.game-card:hover { transform: translateY(-6px); border-color: var(--primary); }
.game-card__thumb { aspect-ratio: 1; border-radius: 12px; background: var(--gradient); overflow: hidden; }
.game-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.game-card:hover .game-card__thumb img { transform: scale(1.06); }
.game-card--wide .game-card__thumb { aspect-ratio: 16 / 9; }
.game-card__title { font-size: 1.05rem; text-align: center; margin: 16px 4px; min-height: 2.3em; display: flex; align-items: center; justify-content: center; }
.game-card__stats { display: grid; gap: 8px; margin-top: auto; }
.game-card__stat {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-alt); font-size: .95rem;
}
.game-card__stat span { color: var(--text-muted); }
.game-card__stat strong { font-weight: 700; }
.game-card__stat .is-live { color: #4ade80; }

/* Our Games page: "Our GAMES" heading with the description on the right */
.games-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.games-head h1 { margin: 0; }
.games-head__accent { background: linear-gradient(90deg, #3aa0ff, #4f7cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero--left .games-head p { max-width: 400px; text-align: right; margin: 0 0 8px; font-size: 1rem; }

/* Our Games page: large picture cards (players badge on the picture, visits + arrow below) */
.showcase { gap: 28px; }
.show-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.show-card:hover { transform: translateY(-6px); border-color: rgba(79, 155, 255, .5); box-shadow: 0 18px 40px -18px rgba(79, 124, 255, .45); }
.show-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--gradient); overflow: hidden; }
.show-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.show-card:hover .show-card__media img { transform: scale(1.06); }
.show-card__players, .show-card__new {
  position: absolute; top: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; line-height: 1.2;
}
.show-card__players {
  right: 14px; color: #fff; background: rgba(10, 14, 24, .6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12);
}
.show-card__players svg { width: 16px; height: 16px; fill: #6fb6ff; }
.show-card__new { left: 14px; color: #fff; background: #ef3b4a; letter-spacing: .08em; font-size: .75rem; }
.show-card__new::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.show-card__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 20px; }
.show-card__title { font-size: 1.15rem; margin: 0 0 6px; }
.show-card__meta { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; color: var(--text-muted); }
.show-card__meta strong { color: var(--text); font-weight: 600; }
.show-card__meta svg { width: 16px; height: 16px; fill: #4f9bff; }
.show-card__go {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text); transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.show-card__go svg { width: 16px; height: 16px; }
.show-card:hover .show-card__go { background: #4f7cff; border-color: #4f7cff; transform: rotate(45deg); }

/* Homepage: communities (cards filled by js/main.js from api/communities.php) */
.community-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.community-totals[hidden] { display: none; }
.community-totals div { padding: 18px 22px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); }
.community-totals strong, .community__stats strong { display: block; font-family: var(--font-display); color: #fff; line-height: 1.15; }
.community-totals strong { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.community-totals span, .community__stats span { color: var(--text-muted); font-size: .85rem; }
.community {
  display: flex; flex-direction: column; gap: 20px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.community:hover { transform: translateY(-6px); border-color: rgba(79, 155, 255, .5); box-shadow: 0 18px 40px -18px rgba(79, 124, 255, .45); }
.community__head { display: flex; align-items: center; gap: 14px; }
.community__head img, .community__icon { width: 64px; height: 64px; border-radius: 14px; flex: none; background: var(--bg-alt); }
.community__icon { display: grid; place-items: center; background: var(--gradient); font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; }
.community__head h3 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.community__verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #4f7cff; color: #fff; font-size: .7rem; vertical-align: 2px; }
.community__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.community__stats div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-alt); }
.community__stats strong { font-size: 1.15rem; }
.community__join { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: #6fb6ff; font-weight: 600; font-size: .95rem; }
.community__join svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.community:hover .community__join svg { transform: translate(2px, -2px); }

/* Homepage: case study video (thumbnail until clicked, then the YouTube player) */
.case { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.case__title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: #fff; margin-bottom: 16px; }
.video, .video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid var(--border); background: #000; }
.video { position: relative; overflow: hidden; padding: 0; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .85; }
.video:hover img { transform: scale(1.04); opacity: 1; }
.video__play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  transition: transform .3s var(--ease);
}
.video__play svg { width: 34px; height: 34px; fill: #111; margin-left: 4px; }
.video:hover .video__play { transform: scale(1.08); }
.video__caption { margin: 12px 4px 0; font-size: .85rem; }

/* Homepage: LiveOps for a revenue share */
.services__cta { text-align: center; margin-top: 40px; }
.services__cta .btn { border-radius: 8px; }
.liveops { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 48px; }
.liveops__intro .btn { margin-top: 8px; border-radius: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li {
  position: relative; padding: 18px 20px 18px 72px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-family: var(--font-display); font-weight: 700;
}
.steps strong { display: block; color: #fff; font-family: var(--font-display); }
.steps span { color: var(--text-muted); font-size: .92rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.filter-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 18px; border-radius: 999px; cursor: pointer; font: inherit; }
.filter-btn.is-active, .filter-btn:hover { color: var(--text); border-color: var(--primary); }

.careers-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.careers-actions .btn { border-radius: 8px; }
.careers-title { text-align: center; margin-bottom: 40px; }
.careers-notice {
  max-width: 900px; margin: -16px auto 28px; padding: 14px 20px; text-align: center;
  border-radius: var(--radius-sm); border: 1px solid rgba(79, 155, 255, .35); background: rgba(79, 155, 255, .08); color: var(--text);
}
.careers-notice.is-hiring { border-color: rgba(62, 230, 193, .45); background: rgba(62, 230, 193, .08); font-weight: 600; }
.perk svg { width: 36px; height: 36px; fill: #6f95ff; margin-bottom: 16px; }
.perk p { margin: 0; }
.jobs { display: grid; gap: 16px; max-width: 900px; margin-inline: auto; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.job h3 { margin: 0 0 8px; }
.job--hot { border-color: rgba(255, 138, 76, .45); }
.job__hot { display: inline-block; margin-bottom: 10px; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 120, 60, .15); color: #ff8a4c; }
.job__summary { color: var(--text); margin: 0 0 10px; }
.job ul { margin: 0 0 14px; padding-left: 20px; color: var(--text-muted); }
.job li + li { margin-top: 4px; }
.job .btn { flex: none; border-radius: 8px; }

/* Job application dialog */
.apply {
  width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 32px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.apply::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.apply h2 { font-size: 1.8rem; margin-bottom: 20px; padding-right: 32px; }
.apply .form { max-width: none; }
.apply .form input, .apply .form textarea { background: var(--bg-alt); }
.apply .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.apply__close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--text-muted); font-size: 2rem; line-height: 1; cursor: pointer; }
.apply__close:hover { color: var(--text); }
.job__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.job__tags span { font-size: .8rem; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-muted); }
.careers-contact { max-width: 900px; margin: 40px auto 0; text-align: center; padding: 32px 24px; border: 1px dashed var(--border); border-radius: var(--radius); }
.careers-contact h3 { margin-bottom: 8px; }
.careers-contact p { margin: 0; }
.careers-contact a, .legal a { color: #6f95ff; }
.careers-contact a:hover, .legal a:hover { text-decoration: underline; }

/* Privacy / Terms pages */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.6rem; margin: 48px 0 16px; }
.legal h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.legal ul { color: var(--text-muted); padding-left: 22px; margin: 0 0 1em; }
.legal li + li { margin-top: 6px; }
.jobs-empty { text-align: center; padding: 48px 24px; }
.jobs-empty p { max-width: 480px; margin: 8px auto 24px; }
.btn--linkedin { background: #0a66c2; color: #fff; }
.btn--linkedin:hover { background: #0958a8; }

/* 8. Forms ----------------------------------------------------------------- */
.form { display: grid; gap: 16px; max-width: 640px; margin-inline: auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--primary); }
.form textarea { min-height: 140px; resize: vertical; }
.form select {
  appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23a0a0b8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.form select option { background: var(--surface); }
.form__check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-muted); }
.form__check input { width: auto; margin-top: 4px; }
.form__check a { color: var(--accent); }
.form__status { min-height: 1.5em; font-size: .95rem; }
.form__status.is-success { color: var(--accent); }
.form__status.is-error { color: #ff6b6b; }

/* 9. Footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 64px 0 32px; background: var(--bg-alt); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 1rem; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: var(--text-muted); transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .875rem; color: var(--text-muted); text-align: center; }

/* 10. Animations ----------------------------------------------------------- */
@keyframes float { from { transform: translate(0, 0) rotate(0); } to { transform: translate(3%, -3%) rotate(8deg); } }
/* Logo: emblem spins in (it's 4-fold symmetric, so a quarter-turn lands seamlessly), letters rise in */
@keyframes emblem-in { from { opacity: 0; transform: rotate(-180deg) scale(.4); } to { opacity: 1; transform: none; } }
@keyframes letter-in { from { opacity: 0; transform: translateY(.45em) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

/* Scroll reveal. An animation (not a transition) so it doesn't slow down card hover effects */
@keyframes reveal-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; }
.reveal.is-visible { opacity: 1; animation: reveal-in .8s var(--ease) backwards; }
/* Cards in a grid appear one after another instead of all at once */
.grid > .reveal:nth-child(5n+2), .jobs > .reveal:nth-child(2) { animation-delay: .08s; }
.grid > .reveal:nth-child(5n+3), .jobs > .reveal:nth-child(3) { animation-delay: .16s; }
.grid > .reveal:nth-child(5n+4), .jobs > .reveal:nth-child(4) { animation-delay: .24s; }
.grid > .reveal:nth-child(5n+5), .jobs > .reveal:nth-child(n+5) { animation-delay: .32s; }

/* Page load: header drops in, hero card rises, buttons and stats follow */
.header { animation: fade-down .6s var(--ease) backwards; }
.hero__card { animation: card-in .8s var(--ease) backwards; }
/* "backwards" fill: holds the start state during the delay, then lets hover transforms work */
.hero__actions .btn { animation: fade-up .6s var(--ease) backwards; }
.hero__actions .btn:nth-child(1) { animation-delay: .45s; }
.hero__actions .btn:nth-child(2) { animation-delay: .55s; }
.hero__stats > div { animation: fade-up .6s var(--ease) backwards; }
.hero__stats > div:nth-child(1) { animation-delay: .65s; }
.hero__stats > div:nth-child(2) { animation-delay: .75s; }

/* Buttons: a light sweep passes across on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); }
.btn--white::after { background: linear-gradient(110deg, transparent 30%, rgba(79, 124, 255, .18) 50%, transparent 70%); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 11. Responsive ----------------------------------------------------------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section { padding-block: 70px; }
  .nav__toggle { display: block; }
  .header { top: 16px; padding-inline: 16px; }
  .header .container { height: 56px; padding: 0 8px 0 16px; }
  .header .logo img { height: 28px; width: 28px; }
  /* Menu drops down as its own panel just below the pill. It sits inside the blurred pill, which stops
     it blurring the page itself, so it uses a near-solid tint instead */
  .nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 8px; border-radius: 16px;
    background: rgba(14, 14, 22, .94); border: var(--glass-border); box-shadow: var(--glass-shadow);
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 12px 16px; border-radius: 12px; font-size: 1rem; color: #fafafa; transition: background .2s, color .2s; }
  .nav__link:hover { background: rgba(255, 255, 255, .05); color: #4f9bff; }
  .nav__link.is-active { color: #4f9bff; }
  .nav__link::after { display: none; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .grid--2, .grid--3, .grid--4, .stats, .form__row, .story, .case, .liveops { grid-template-columns: 1fr; }
  .story, .case, .liveops { gap: 32px; }
  .community-totals { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .community-totals div { padding: 14px; }
  .job { flex-direction: column; align-items: flex-start; }
  .page-hero--left .games-head p { text-align: left; }
  .game-card { padding: 10px; }
  .game-card__title { font-size: .95rem; }
  .game-card__stat { padding: 8px 10px; font-size: .85rem; }
}
@media (max-width: 480px) {
  .hero__actions { grid-template-columns: 1fr; }
  .hero__stats span { font-size: .8rem; }
  .apply { padding: 24px 18px; }
  .footer__grid { grid-template-columns: 1fr; }
}
