/* =====================================================================
   SAME STUDIO — Roblox Game Studio
   Aesthetic: sleek monochrome graphite-black base + a violet→cyan→mint
   holographic accent. Glass surfaces, soft motion. ∞
   ===================================================================== */

:root {
  --bg:        #07080c;
  --bg-2:      #0c0e16;
  --surface:   rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  /* Opaque glass for cards that scroll past: the subtle top-light gradient over a solid dark base
     reproduces the frosted-glass look WITHOUT backdrop-filter (which forces a GPU layer + backdrop
     re-sample per card on every scroll frame — the main remaining scroll cost on weak GPUs). */
  --surface-card: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)), var(--bg-2);
  --line:      rgba(170, 190, 255, 0.10);
  --line-2:    rgba(170, 190, 255, 0.20);

  --text:  #eef1f8;
  --muted: #99a2ba;

  --violet: #b88bff;
  --cyan:   #67e8f9;
  --mint:   #34f5a8;
  --blue:   #5b8cff;
  --accent: var(--cyan);

  --grad-primary: linear-gradient(135deg, #c4a3ff 0%, #67e8f9 50%, #45f3ad 100%);
  --grad-mint:    linear-gradient(135deg, #8affd4 0%, #19d691 100%);
  --grad-silver:  linear-gradient(135deg, #ffffff 0%, #c7d0ea 55%, #8e9ac0 100%);
  --holo:         linear-gradient(110deg, #b88bff, #67e8f9, #34f5a8, #5b8cff, #b88bff);

  --radius:    22px;
  --radius-sm: 14px;
  --shadow:    0 30px 70px -30px rgba(0, 0, 0, 0.9);
  --glow:      0 0 0 1px rgba(103, 232, 249, 0.22), 0 18px 50px -18px rgba(103, 232, 249, 0.5);
  --glow-violet: 0 18px 55px -20px rgba(184, 139, 255, 0.6);

  --font-display: "Unbounded", "Trebuchet MS", sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
  /* Kill sideways panning on mobile. body's overflow-x:hidden can't contain FIXED
     layers (the nav, .bg-aurora at inset:-20%, .cursor-glow…) because they're sized
     to the viewport, not body — so clip at the root/viewport level too. `hidden` is
     the universal fallback; `clip` (modern) clips without creating a scroll container,
     so scroll-padding-top / smooth-scroll keep working. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: rgba(103, 232, 249, 0.3); color: #fff; }

/* Skip layout + paint for off-screen sections while scrolling a long page — the browser renders each
   only as it nears the viewport. `auto 700px` lets it remember each section's real size after first
   render, so there's no scrollbar jump on subsequent passes. Big general win for scroll smoothness. */
.cv-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

/* Accessibility + performance kill-switch: users who ask for reduced motion (and low-end devices,
   which often default it on) get a near-static page — every decorative loop is stopped. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* custom scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #07080c; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--violet), var(--cyan));
  border-radius: 20px;
  border: 3px solid #07080c;
}

/* ============================ ATMOSPHERE ============================ */
.bg-aurora {
  position: fixed;
  inset: -20%;
  z-index: -3;
  background:
    radial-gradient(40% 50% at 16% 20%, rgba(184, 139, 255, 0.20), transparent 60%),
    radial-gradient(42% 52% at 84% 16%, rgba(103, 232, 249, 0.18), transparent 60%),
    radial-gradient(52% 55% at 72% 82%, rgba(52, 245, 168, 0.14), transparent 62%),
    radial-gradient(45% 50% at 22% 86%, rgba(91, 140, 255, 0.13), transparent 60%),
    var(--bg);
  filter: blur(22px) saturate(120%);
  /* Static: animating scale/translate on a full-viewport blur(22px) layer re-rasterizes the entire
     blurred surface every frame — a top cause of scroll jank. The blurred gradient looks the same
     standing still. (auroraDrift kept defined below but no longer applied.) */
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(170, 190, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 190, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, #000 30%, transparent 78%);
  opacity: 0.55;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* No mix-blend-mode: a fixed full-viewport blend layer forces the compositor to re-read the whole
     backdrop every frame (expensive while scrolling). At this opacity a plain overlay of the noise
     texture is visually near-identical; opacity nudged up slightly to compensate for the lost blend. */
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.12), transparent 60%);
  transform: translate3d(var(--mx, -999px), var(--my, -999px), 0);
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  top: 100%;
  font-size: var(--size, 28px);
  opacity: 0;
  /* No drop-shadow filter: re-rasterizing a filter on every animated particle each frame is costly.
     A baked text-shadow gives near-identical depth for free (painted once into the glyph layer). */
  animation: floatUp var(--dur, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
  text-shadow: 0 3px 9px rgba(0, 0, 0, 0.4);
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--op, 0.5); }
  90%  { opacity: var(--op, 0.5); }
  100% { transform: translateY(-118vh) translateX(var(--drift, 40px)) rotate(var(--rot, 220deg)); opacity: 0; }
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--holo);
  background-size: 220% 100%;
  animation: holoShift 7s linear infinite;
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.7);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--cyan);
  color: #04121a;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* keyboard focus — mirror the rich hover affordances for keyboard users (WCAG 2.4.7) */
:where(.btn, .nav__links a, .footer__links a, .nav__burger, .brand, .game-card__media, .dev-card a):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: inherit;
}
/* skip-link / in-page anchor landmarks receive programmatic focus — no ring needed */
[tabindex="-1"]:focus { outline: none; }

/* ============================ HELPERS ============================ */
.muted { color: var(--muted); }
.holo {
  background: var(--holo);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: holoShift 7s linear infinite;
}
@keyframes holoShift { to { background-position: 220% 0; } }

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mint);
  display: inline-block;
  position: relative;
  box-shadow: 0 0 10px var(--mint);
}
.dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--mint);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.kicker {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cyan);
}

.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.06;
  margin: 14px 0 14px;
  letter-spacing: -0.01em;
}
.section-head p { font-size: 1.05rem; }

/* ============================ BUTTONS ============================ */
.btn {
  --pad-y: 0.7rem;
  --pad-x: 1.3rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ease);
}
.btn:hover::after { left: 140%; }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--grad-primary);
  background-size: 180% 100%;
  color: #07111a;
  box-shadow: var(--glow);
}
.btn--primary:hover { transform: translateY(-3px); background-position: 100% 0; box-shadow: 0 24px 60px -18px rgba(103, 232, 249, 0.85); }

.btn--outline {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-2);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn--outline:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--surface); }

.btn--lg { --pad-y: 0.95rem; --pad-x: 1.7rem; font-size: 1.02rem; }
.btn--sm { --pad-y: 0.5rem; --pad-x: 1rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ============================ BRAND / LOGO ============================ */
/* The Same logo is a white→black ∞. We sit it on a dark→light split
   plate so BOTH sides of the mark stay visible on the dark theme. */
/* min-width:0 lets the brand shrink (and its text ellipsize) instead of shoving the
   Play Now button + burger off the right edge when the bar gets tight on small phones. */
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand__badge {
  position: relative;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(105deg, #0d0f17 0%, #1b1f2d 38%, #aab4d8 74%, #eef1fb 100%);
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.brand__badge::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  animation: holoShift 8s linear infinite;
}
.brand:hover .brand__badge { transform: rotate(-6deg) scale(1.05); }
.brand:hover .brand__badge::before { opacity: 0.9; }
.brand__badge img { width: 80%; height: 80%; object-fit: contain; }
.brand__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.05em;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================ NAV ============================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  /* Near-opaque solid instead of backdrop-filter: blurring the live backdrop under a fixed full-width
     nav re-blurs everything scrolling beneath it every frame. A solid bar at 0.92 reads the same. */
  background: rgba(8, 10, 16, 0.92);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav--scrolled .nav__inner { padding: 12px 24px; }

.nav__links { display: flex; gap: 30px; }
.nav__links a {
  position: relative;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
  padding: 4px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
/* scrollspy: the section currently in view stays lit */
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { width: 100%; }

/* flex:none — the actions (Play Now + burger) must never shrink or be pushed off; the
   brand gives way first. */
.nav__actions { display: flex; align-items: center; gap: 12px; flex: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav.open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ HERO ============================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 160px 24px 70px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 50px;
  min-height: 100vh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  backdrop-filter: blur(8px);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 22px 0 22px;
}
.hero__title .line { display: block; }

.hero__sub {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 540px;
}
.hero__sub strong { color: var(--text); font-weight: 600; }

.hero__chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.chip b { color: var(--text); font-weight: 700; }
.chip--live { border-color: rgba(52, 245, 168, 0.4); }
.chip--live b { color: var(--mint); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* hero showcase */
.hero__showcase { position: relative; display: grid; place-items: center; }
.showcase-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius);
  /* Near-opaque bg instead of backdrop-filter: a backdrop-filter on a tilted, preserve-3d card is a
     known GPU compositing bug that paints heavy RGB static at first paint on some Windows GPUs.
     Drop backdrop-filter + preserve-3d; isolate the blend glow + pin the backface to stabilize the layer. */
  background: linear-gradient(160deg, rgba(26, 29, 46, 0.94), rgba(12, 14, 22, 0.94));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  backface-visibility: hidden;
  transition: transform 0.18s ease-out, box-shadow 0.4s;
  z-index: 2;
}
.showcase-card__glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  animation: holoShift 8s linear infinite;
  pointer-events: none;
}
.showcase-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.showcase-card__media img { width: 100%; height: 100%; object-fit: cover; }
.showcase-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid rgba(52, 245, 168, 0.5);
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.showcase-card__body { padding: 18px 20px 22px; }
.showcase-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.showcase-card__head img { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); }
.showcase-card__head h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.showcase-card__head .muted { font-size: 0.82rem; }
.showcase-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.showcase-card__stats > div {
  text-align: center;
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.showcase-card__stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.showcase-card__stats small { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  z-index: 1;
  animation: floatY 9s ease-in-out infinite;
}
.orb--1 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(184, 139, 255, 0.55), transparent 70%); top: -40px; right: -30px; }
.orb--2 { width: 260px; height: 260px; background: radial-gradient(circle, rgba(103, 232, 249, 0.45), transparent 70%); bottom: -60px; left: -40px; animation-delay: -3s; }
@keyframes floatY { 50% { transform: translateY(-26px); } }

/* ============================ MARQUEE ============================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.02);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================ SECTIONS layout ============================ */
.stats, .games, .team, .community, .voices {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 24px;
}

/* ============================ METRICS — "by the numbers" rows ============================ */
.metrics {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-card); /* opaque glass — no backdrop-filter (scroll perf) */
  overflow: hidden;
}
.metric {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 26px 30px;
  border-top: 1px solid var(--line);
}
.metric:first-child { border-top: 0; }
/* holographic accent bar that draws down on hover */
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease);
}
.metric:hover::before { transform: scaleY(1); }

.metric__rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  opacity: 0.45;
  min-width: 1.6em;
}
.metric__icon {
  font-size: 1.5rem;
  display: inline-flex;
  width: 52px; height: 52px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), border-color 0.45s;
}
.metric:hover .metric__icon { transform: translateY(-3px) scale(1.06); border-color: var(--line-2); }
.metric__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric__label { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.2; }
.metric__sub { color: var(--muted); font-size: 0.86rem; }
.metric__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.15;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: var(--grad-silver);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.06em; /* gradient-clipped text can shave descenders without this */
}
/* the live "players online" row gets the mint treatment */
.metric--live { background: rgba(52, 245, 168, 0.05); }
.metric--live .metric__icon { border-color: rgba(52, 245, 168, 0.4); }
.metric--live .metric__value {
  background: var(--grad-mint);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* pop-up-on-scroll reveal — overrides the generic .reveal for a springier entrance */
.metric.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  filter: blur(5px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease), background 0.4s var(--ease);
  transition-delay: var(--d, 0s);
}
.metric.reveal.in { opacity: 1; transform: none; filter: none; }

/* generic stat number/label — still used by the Community card below */
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.1;
  margin: 8px 0 6px;
  background: var(--grad-silver);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat__label { color: var(--muted); font-size: 0.9rem; }

/* ============================ ACHIEVEMENTS BAND ============================ */
.achievements {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
.ach {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 30px 18px 24px;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022)), var(--bg-2);
  border: 1px solid var(--line-2);
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}
.ach:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow), 0 0 42px -12px rgba(103, 232, 249, 0.45);
}
/* holographic glow bloom across the top edge */
.ach__ring {
  position: absolute;
  top: -45%; left: 50%;
  width: 150%; height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(103, 232, 249, 0.18), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.4s;
}
.ach:hover .ach__ring { opacity: 1; }
.ach__icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  color: var(--cyan);
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.28);
  box-shadow: 0 0 22px -6px rgba(103, 232, 249, 0.45);
  transition: transform 0.45s var(--ease);
}
.ach__icon svg { width: 26px; height: 26px; }
.ach:hover .ach__icon { transform: translateY(-2px) scale(1.07); }
.ach__val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.22));
  padding-bottom: 0.06em;
}
.ach__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.ach__tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.7;
}
/* the live card gets the mint treatment to match the rest of the site's "live" cues */
.ach--live { background: linear-gradient(165deg, rgba(52, 245, 168, 0.1), rgba(255, 255, 255, 0.02)); border-color: rgba(52, 245, 168, 0.4); }
.ach--live .ach__icon { color: var(--mint); background: rgba(52, 245, 168, 0.1); border-color: rgba(52, 245, 168, 0.4); box-shadow: 0 0 22px -6px rgba(52, 245, 168, 0.5); }
.ach--live .ach__ring { background: radial-gradient(closest-side, rgba(52, 245, 168, 0.22), transparent 70%); }
.ach--live .ach__val { background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 18px rgba(52, 245, 168, 0.3)); }
.ach__tag--live { color: var(--mint); opacity: 1; }

@media (max-width: 780px) {
  .achievements { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 400px) {
  .achievements { grid-template-columns: 1fr 1fr; }
  .ach { padding: 22px 12px 18px; }
  .ach__icon { width: 46px; height: 46px; }
}

/* ============================ GAMES ============================ */
.games__grid {
  display: grid;
  /* min(330px, 100%) lets a single card collapse below ~370px instead of
     overflowing (body has overflow-x:hidden, which would otherwise clip it) */
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 26px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface-card); /* opaque glass — no backdrop-filter (scroll perf) */
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.18s ease-out, box-shadow 0.4s, border-color 0.4s;
  transform-style: preserve-3d;
  /* cursor-tracked spotlight position, fed by the tilt handler (falls back centred) */
  --gx: 50%; --gy: 30%;
}
.game-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

/* holographic animated edge — faint at rest, blooms on hover (mask ring trick) */
.game-card__border {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  animation: holoShift 8s linear infinite;
  pointer-events: none;
  z-index: 3;
}
.game-card:hover .game-card__border { opacity: 0.85; }

/* soft spotlight that follows the cursor across the whole card */
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--gx) var(--gy), rgba(103, 232, 249, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.game-card:hover::after { opacity: 1; }

.game-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.game-card:hover .game-card__media img { transform: scale(1.08); }
/* gradient scrim so the pills/tags stay readable over any thumbnail */
.game-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.55) 0%, transparent 30%, transparent 62%, rgba(7, 9, 14, 0.62) 100%);
  z-index: 1;
  pointer-events: none;
}
/* diagonal sheen that sweeps across the art on hover */
.game-card__shine {
  position: absolute;
  top: 0; left: -130%;
  width: 65%; height: 100%;
  z-index: 2;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.game-card:hover .game-card__shine { animation: cardSheen 0.9s var(--ease); }
@keyframes cardSheen { to { left: 150%; } }
/* play affordance that scales in on hover */
.game-card__play {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(7, 9, 14, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.55);
  box-shadow: 0 0 28px -4px rgba(103, 232, 249, 0.6);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.game-card:hover .game-card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.game-card__live, .game-card__genre, .game-card__rarity {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
}
.game-card__live { top: 12px; left: 12px; border-color: rgba(52, 245, 168, 0.5); color: var(--mint); }
.game-card__live b { font-weight: 700; }
.game-card__genre {
  bottom: 12px; right: 12px;
  color: #c3ccdf;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  /* keep small label legible over bright thumbnail areas (WCAG 1.4.3) */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
/* rarity / tier badge — top-right, tinted per tier */
.game-card__rarity {
  top: 12px; right: 12px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--cyan);
  border-color: rgba(103, 232, 249, 0.45);
}
.game-card__rarity svg { width: 12px; height: 12px; }
.game-card__rarity.is-legendary { color: #ffd27a; border-color: rgba(255, 210, 122, 0.5); box-shadow: 0 0 18px -4px rgba(255, 210, 122, 0.5); }
.game-card__rarity.is-epic { color: var(--violet); border-color: rgba(184, 139, 255, 0.5); box-shadow: 0 0 18px -4px rgba(184, 139, 255, 0.45); }
.game-card__rarity.is-rare { color: var(--cyan); border-color: rgba(103, 232, 249, 0.5); }
.game-card__rarity.is-new { color: var(--mint); border-color: rgba(52, 245, 168, 0.5); box-shadow: 0 0 18px -4px rgba(52, 245, 168, 0.45); }
.game-card__body { position: relative; z-index: 2; padding: 22px; display: flex; flex-direction: column; flex: 1; }

/* "Hosted in <group>" chip */
.game-card__group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 12px 5px 5px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--muted);
}
.game-card__group img { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); }
.game-card__group b { color: var(--text); font-weight: 600; }

.game-card__body h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin-bottom: 10px; }
.game-card__body > .muted { font-size: 0.94rem; min-height: 3.2em; }
.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.game-card__meta b { color: var(--text); }
.game-card__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: auto;
}
.game-card__actions .btn { width: 100%; }

.game-card--soon {
  display: grid;
  place-items: center;
  text-align: center;
  border-style: dashed;
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.015);
}
.game-card__soon-inner { padding: 40px 28px; }
.soon-emoji { font-size: 3rem; display: block; margin-bottom: 12px; animation: floatY 5s ease-in-out infinite; }
.game-card--soon h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 10px; }
.game-card--soon p { margin-bottom: 20px; max-width: 280px; }

/* ============================ TEAM ============================ */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.dev-card {
  position: relative;
  text-align: center;
  padding: 38px 24px 30px;
  border-radius: var(--radius);
  background: var(--surface-card); /* opaque glass — no backdrop-filter (scroll perf) */
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.18s ease-out, box-shadow 0.4s, border-color 0.4s;
  transform-style: preserve-3d;
}
.dev-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.dev-card__glow {
  position: absolute;
  top: -60px; left: 50%;
  width: 200px; height: 200px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(103, 232, 249, 0.22), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.dev-card:hover .dev-card__glow { opacity: 1; }
.dev-card__avatar {
  width: 116px; height: 116px;
  border-radius: 50%;
  margin: 0 auto 18px;
  object-fit: cover;
  background: var(--bg-2);
  padding: 4px;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-2), var(--bg-2)), var(--holo);
  background-origin: border-box;
  background-clip: content-box, border-box;
  background-size: auto, 220% 100%;
  animation: holoShift 8s linear infinite;
  transition: transform 0.45s var(--ease);
}
.dev-card:hover .dev-card__avatar { transform: scale(1.06) translateY(-2px); }
.dev-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
/* real Roblox verified badge (image) */
.verified-badge {
  width: 21px; height: 21px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px rgba(43, 127, 255, 0.55));
  animation: badgePop 0.5s var(--ease) both;
}
@keyframes badgePop { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.dev-card__handle { color: var(--muted); font-size: 0.9rem; margin: 2px 0 14px; }
.dev-card__role {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.28);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 22px;
}

/* ============================ TESTIMONIALS (voices marquee) ============================ */
.voices__marquee {
  display: flex;
  flex-direction: column;
  gap: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.voices__row { overflow: hidden; }
.voices__track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding: 6px 11px; /* breathing room so hover lift/glow isn't clipped by the row */
  animation: voicesScroll 52s linear infinite;
}
.voices__row[data-dir="-1"] .voices__track { animation-direction: reverse; }
.voices__marquee:hover .voices__track,
.voices__marquee:focus-within .voices__track { animation-play-state: paused; }
@keyframes voicesScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tcard {
  flex: 0 0 clamp(270px, 78vw, 372px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface-card); /* opaque glass — no backdrop-filter (scroll perf) */
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.4s;
}
.tcard:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow), 0 0 36px -12px rgba(103, 232, 249, 0.4);
}
.tcard__stars { display: inline-flex; gap: 3px; color: var(--cyan); }
.tcard__stars svg { width: 16px; height: 16px; filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.4)); }
.tcard__stars svg.is-empty { color: var(--line-2); filter: none; }
.tcard blockquote {
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.tcard blockquote::before { content: "\201C"; color: var(--cyan); font-weight: 700; }
.tcard blockquote::after { content: "\201D"; color: var(--cyan); font-weight: 700; }
.tcard__by { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.tcard__avatar {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #07111a;
  background: var(--grad-primary);
  background-size: 180% 100%;
  box-shadow: 0 0 18px -4px rgba(103, 232, 249, 0.5);
}
.tcard__id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tcard__id b { font-weight: 600; }
.tcard__id small { color: var(--muted); font-size: 0.8rem; }

/* reduced motion: stop the scroll and let cards wrap into a tidy centred grid */
@media (prefers-reduced-motion: reduce) {
  .voices__row { overflow: visible; }
  .voices__track { flex-wrap: wrap; width: auto; justify-content: center; animation: none; }
}

/* ============================ COMMUNITY ============================ */
.community__card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px;
  border-radius: 28px;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(184, 139, 255, 0.16), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(103, 232, 249, 0.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.community__left { display: flex; align-items: center; gap: 24px; }
.community__left h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 8px 0 4px; }
.community__right { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.community__count .stat__num {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  background: var(--grad-mint);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.community__count .stat__label { display: block; }

/* ============================ JOIN CTA BAND ============================ */
.cta-band {
  position: relative;
  overflow: hidden;
  margin-top: 60px;
  padding: clamp(64px, 9vw, 110px) 24px;
  text-align: center;
  isolation: isolate;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 12% 0%, rgba(184, 139, 255, 0.2), transparent 55%),
    radial-gradient(60% 120% at 88% 100%, rgba(103, 232, 249, 0.2), transparent 55%),
    radial-gradient(50% 90% at 50% 120%, rgba(52, 245, 168, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.018);
}
/* giant ∞ watermark drifting behind the copy */
.cta-band__mark {
  position: absolute;
  z-index: -1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16rem, 42vw, 40rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(170, 190, 255, 0.06);
  pointer-events: none;
  user-select: none;
  animation: floatY 12s ease-in-out infinite;
}
.cta-band__inner { position: relative; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cta-band__inner h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 14px 0 16px;
  text-shadow: 0 0 42px rgba(91, 140, 255, 0.16);
}
.cta-band__inner > .muted { font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 560px; }
.cta-band__inner > .muted b { color: var(--text); font-weight: 700; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 30px 0 4px; }
.cta-band__chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

@media (max-width: 480px) {
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { width: 100%; }
}

/* ============================ FOOTER ============================ */
.footer { border-top: 1px solid var(--line); margin-top: 0; }
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand .brand__badge { width: 40px; height: 40px; border-radius: 12px; }
.footer__brand strong { font-family: var(--font-display); letter-spacing: 0.04em; }
.footer__links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer__links a { color: var(--muted); transition: color 0.25s; }
.footer__links a:hover { color: var(--cyan); }
.footer__bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer__live { display: inline-flex; align-items: center; gap: 8px; }
/* small, unobtrusive developer sign-in link (visible to all; only devs can log in) */
.footer__signin { color: var(--muted); opacity: 0.7; transition: color 0.25s, opacity 0.25s; }
.footer__signin:hover { color: var(--cyan); opacity: 1; }

/* ============================ REVEAL ============================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ============================ NEON / GLOW POLISH ============================ */
/* gaming / retro-futurism accent (per ui-ux-pro-max): tasteful neon glow on key
   holographic elements. Glows are additive only — text stays light-on-dark so
   contrast is unaffected. */
.holo { filter: drop-shadow(0 0 22px rgba(103, 232, 249, 0.28)); }
.hero__title { text-shadow: 0 0 42px rgba(91, 140, 255, 0.14); }
.brand__text { text-shadow: 0 0 18px rgba(103, 232, 249, 0.18); }
.section-head h2 { text-shadow: 0 0 34px rgba(184, 139, 255, 0.12); }
.eyebrow .pulse { box-shadow: 0 0 14px var(--cyan), 0 0 4px var(--cyan); }

/* primary buttons get a stronger, neon halo */
.btn--primary { box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.28), 0 14px 42px -16px rgba(103, 232, 249, 0.65); }
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.45), 0 24px 64px -16px rgba(103, 232, 249, 0.9); }

/* numbers glow softly */
.metric__value { filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.18)); }
.metric--live .metric__value { filter: drop-shadow(0 0 20px rgba(52, 245, 168, 0.34)); }
.community__count .stat__num { filter: drop-shadow(0 0 22px rgba(52, 245, 168, 0.24)); }
.showcase-card__stats b { filter: drop-shadow(0 0 12px rgba(103, 232, 249, 0.22)); }

/* cards gain a neon edge + lift on hover */
.game-card:hover,
.dev-card:hover {
  box-shadow: var(--shadow), 0 0 0 1px rgba(103, 232, 249, 0.22), 0 0 40px -8px rgba(103, 232, 249, 0.35);
}
.dev-card:hover .dev-card__avatar { box-shadow: 0 0 28px -4px rgba(103, 232, 249, 0.5); }

/* hero spotlight — soft conic-ish glow blooming behind the headline */
.hero__copy { position: relative; isolation: isolate; }
.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -6%; top: 4%;
  width: 64%; height: 58%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.12), rgba(184, 139, 255, 0.06) 45%, transparent 72%);
  /* Lower blur radius = cheaper raster; this blurred surface animates, so keep it light. */
  filter: blur(26px);
  pointer-events: none;
  animation: heroBloom 9s ease-in-out infinite alternate;
}
@keyframes heroBloom {
  from { opacity: 0.7; transform: translate3d(0, 0, 0) scale(1); }
  to   { opacity: 1;   transform: translate3d(4%, 3%, 0) scale(1.1); }
}

/* nav gains a faint holographic underline glow once scrolled */
.nav--scrolled { box-shadow: 0 1px 0 0 rgba(103, 232, 249, 0.12), 0 10px 40px -20px rgba(0, 0, 0, 0.8); }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; gap: 40px; min-height: auto; }
  .hero__showcase { order: -1; }
  .nav__links, .nav__actions .btn--ghost { display: none; }
  .nav__burger { display: flex; }
  .nav.open .nav__links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 24px;
    background: rgba(8, 10, 16, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav__links a { padding: 12px 0; font-size: 1.1rem; }
}
@media (max-width: 720px) {
  .stats, .games, .team, .community { padding: 70px 20px; }
  .community__card { padding: 32px 24px; }
  .community__right { width: 100%; }
  .footer__bar { flex-direction: column; }
}
@media (max-width: 600px) {
  /* icon on the left (spanning both rows); label on top, big value on its own
     full-width line below — so the number can never be clipped, however long */
  .metric {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon info"
      "icon value";
    column-gap: 16px;
    row-gap: 4px;
    padding: 20px 18px;
  }
  .metric__rank { display: none; }
  .metric__icon { grid-area: icon; align-self: center; width: 46px; height: 46px; font-size: 1.3rem; border-radius: 12px; }
  .metric__info { grid-area: info; }
  .metric__label { font-size: 1rem; }
  .metric__sub { font-size: 0.82rem; }
  .metric__value { grid-area: value; text-align: left; font-size: clamp(1.7rem, 9vw, 2.4rem); }
}
/* Compact the fixed top bar on phones. The full-size bar measured 432px of content
   which overflowed every ≤430px viewport — the burger was shoved fully off-screen and
   Play Now was clipped. Tighter padding/gaps, a smaller badge + brand text, and a
   compact Play Now bring it well under the viewport so all three items stay visible. */
@media (max-width: 600px) {
  .nav__inner { padding: 12px 16px; gap: 10px; }
  .nav--scrolled .nav__inner { padding: 10px 16px; }
  .brand { gap: 9px; }
  .brand__badge { width: 38px; height: 38px; border-radius: 12px; }
  .brand__text { font-size: 0.98rem; letter-spacing: 0.02em; }
  .nav__actions { gap: 8px; }
  .nav__actions .btn--primary { --pad-x: 0.95rem; --pad-y: 0.52rem; font-size: 0.85rem; }
  .nav__burger { padding: 6px; }
}
/* On the smallest common phones (≤400px) shave a little more so the full "SAME STUDIO"
   wordmark still fits beside Play Now + burger; the brand ellipsis only kicks in below ~335px. */
@media (max-width: 400px) {
  .nav__inner { padding: 12px 13px; gap: 8px; }
  .brand { gap: 8px; }
  .brand__badge { width: 36px; height: 36px; }
  .brand__text { font-size: 0.9rem; letter-spacing: 0.01em; }
  .nav__actions { gap: 7px; }
  .nav__actions .btn--primary { --pad-x: 0.82rem; font-size: 0.82rem; }
}
@media (max-width: 480px) {
  .hero { padding-top: 120px; }
  .hero__chips .chip { font-size: 0.82rem; padding: 8px 12px; }
  .showcase-card__stats b { font-size: 1.05rem; }
  .game-card__actions { grid-template-columns: 1fr; }
}

/* ============================ MOTION SAFETY ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .metric.reveal { opacity: 1; transform: none; filter: none; }
  .particles, .cursor-glow { display: none; }
}
