/* =========================================================
   KUBORA landing — dark, glassy, Apple-minimal / Rust-arcade.
   The 3D canvas sits behind the whole page; every panel is
   translucent so the assembling cube shows through.

   This stylesheet is organised roughly top-down:
     1. Tokens / base
     2. Grain + progress bar (global overlays)
     3. Canvas + fallback banner
     4. Navbar
     5. Hero
     6. Stats strip
     7. Sections (shared)
     8. Feature grid / list / pillars / stack grid
     9. Download cards
    10. Footer
    11. Reveal animations (global utility)
    12. Responsive
   ========================================================= */

:root {
  --bg-0: #07080f;
  --bg-1: #0a0b14;
  --bg-2: #0f1220;
  --text: #eef0ff;
  --text-dim: #9aa0c4;
  --text-faint: #606789;
  --accent: #b36eff;       /* KUBORA purple */
  --accent-2: #4c8dff;     /* cool blue */
  --accent-3: #ff6ed1;     /* hot pink — used only in animated gradients */
  --success: #4dd27a;
  --danger: #ff5d6a;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-stroke: rgba(255, 255, 255, 0.10);
  --glass-stroke-strong: rgba(255, 255, 255, 0.22);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  /* Multiple radial glows shift the eye around — the top-left
     and bottom-right warm tints, plus a cool mid-bloom, create
     a subtle "aurora" wash that the cube sits inside of. */
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(179, 110, 255, 0.20), transparent 60%),
    radial-gradient(900px 600px at 100% 30%, rgba(76, 141, 255, 0.12), transparent 60%),
    radial-gradient(700px 500px at 0% 80%, rgba(255, 110, 209, 0.08), transparent 60%),
    linear-gradient(180deg, #07080f 0%, #05060c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: #d7d9ff;
}

::selection {
  background: rgba(179, 110, 255, 0.4);
  color: #fff;
}

/* =======================  Aurora blobs  =======================
   Three huge blurred radial blobs that drift on slow independent
   loops. Kept as separate spans so each can have its own
   animation timing. `filter: blur` is the secret sauce — without
   it they'd read as ugly sharp circles. */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.blob-1 {
  background: radial-gradient(circle, rgba(179, 110, 255, 0.75) 0%, transparent 60%);
  top: -20vmax;
  left: -10vmax;
  animation: drift-1 22s ease-in-out infinite alternate;
}
.blob-2 {
  background: radial-gradient(circle, rgba(76, 141, 255, 0.55) 0%, transparent 60%);
  top: 30vh;
  right: -20vmax;
  animation: drift-2 26s ease-in-out infinite alternate;
}
.blob-3 {
  background: radial-gradient(circle, rgba(255, 110, 209, 0.45) 0%, transparent 60%);
  bottom: -18vmax;
  left: 30vw;
  animation: drift-3 30s ease-in-out infinite alternate;
}
@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10vmax, 8vmax) scale(1.18); }
}
@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-12vmax, 6vmax) scale(0.9); }
}
@keyframes drift-3 {
  0%   { transform: translate(0, 0) scale(0.95); }
  100% { transform: translate(-8vmax, -12vmax) scale(1.25); }
}

/* =======================  Cursor orb  =======================
   A soft purple light that follows the cursor. Positioned via
   CSS custom properties set from ui.js. Hidden on touch
   devices and under prefers-reduced-motion. */

.cursor-orb {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(179, 110, 255, 0.22) 0%, rgba(76, 141, 255, 0.12) 35%, transparent 65%);
  transform: translate3d(var(--cx, 50vw), var(--cy, 50vh), 0) translate(-50%, -50%);
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
  mix-blend-mode: screen;
  opacity: 0;
}
.cursor-orb.is-active { opacity: 1; }
@media (hover: none) { .cursor-orb { display: none; } }

/* =======================  Grain overlay  =======================
   SVG fractal noise as a full-viewport pinned layer, blended with
   `overlay` so it reads as subtle texture on both light-ish and
   dark parts of the page. Saves us from paying for an image. */

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
  background-size: 240px 240px;
}

/* =======================  Scroll progress  ======================= */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}
.scroll-progress > span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 12px rgba(179, 110, 255, 0.6);
}

/* =======================  Canvas  ======================= */

#cube-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Everything above the canvas, aurora, and cursor-orb. Grain sits
   at z-index 3 because we want the noise to also blend over the
   content; the navbar clears all of it at z-index 100. */
.nav, main, .foot { position: relative; z-index: 2; }

/* Cube-load-failure banner */
#cube-fallback {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  max-width: 360px;
}
.cube-fallback-inner {
  background: rgba(20, 10, 30, 0.92);
  border: 1px solid rgba(255, 93, 106, 0.5);
  color: #ffd2d7;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.cube-fallback-inner strong { color: #ff8c97; }
.cube-fallback-inner button {
  align-self: flex-end;
  background: transparent;
  color: #ffd2d7;
  border: 1px solid rgba(255, 210, 215, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.cube-fallback-inner button:hover { background: rgba(255, 210, 215, 0.1); }

/* =======================  Nav bar  ======================= */

.nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 8, 15, 0.55);
  border-bottom: 1px solid var(--glass-stroke);
  z-index: 100;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Isometric cube logo — matches the in-client mark in
   crates/kubora-ui/src/logo.rs. SVG is inlined in markup so
   we can filter-drop-shadow it without a wrapping box. */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 3px 10px rgba(255, 140, 40, 0.35));
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), filter 0.25s ease;
}
.brand-logo svg { display: block; }
.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
  filter: drop-shadow(0 4px 14px rgba(255, 140, 40, 0.55));
}

.brand-name {
  font-size: 16px;
}

.nav-links {
  display: flex;
  gap: 24px;
}
/* Between tablet and mobile, trim the gap so 6–7 nav items fit
   without crowding the CTA button. Under 720 the links disappear
   altogether (mobile-menu-less design). */
@media (max-width: 1120px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  /* The "Download" link duplicates the CTA button on the right,
     so drop it first when space gets tight. */
  .nav-links a[href="#download"] { display: none; }
}
@media (max-width: 980px) {
  /* "Build" and "UI" are the shortest — keep them longest, but
     start trimming low-traffic links first. */
  .nav-links a[href="#build"],
  .nav-links a[href="#scriptable-ui"] { display: none; }
}
@media (max-width: 900px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12.5px; }
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s ease;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  padding: 9px 16px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(179, 110, 255, 0.35);
}
.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(179, 110, 255, 0.55);
}

/* Variant: orange Try CTA used in docs.html / try.html. Keeps the
   same silhouette as the default nav-cta but swaps the palette
   to the KUBORA logo's orange so it reads as the "play it now"
   affordance rather than the "download it" one. */
.nav-cta-try {
  background: linear-gradient(135deg, #ffb45c, #ff7a14);
  color: #1a0d00;
  box-shadow: 0 4px 20px rgba(255, 122, 20, 0.35);
}
.nav-cta-try:hover {
  box-shadow: 0 6px 28px rgba(255, 122, 20, 0.55);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding: 14px 18px; }
}

/* =======================  Hero  ======================= */

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 48px 120px;
  position: relative;
}

.hero-inner {
  max-width: 760px;
  margin-left: 4vw;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  background: rgba(179, 110, 255, 0.1);
  border: 1px solid rgba(179, 110, 255, 0.30);
  padding: 6px 12px;
  border-radius: 3px;
  margin-bottom: 28px;
  /* Soft pulse so the tag doesn't read as static. */
  animation: pulse-tag 3.4s ease-in-out infinite;
}
@keyframes pulse-tag {
  0%, 100% { box-shadow: 0 0 0 rgba(179, 110, 255, 0); }
  50%      { box-shadow: 0 0 18px rgba(179, 110, 255, 0.35); }
}

/* Hero title — each line is a block so we can stagger-reveal. */
.hero-title {
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.hero-line {
  display: block;
}

h1 .accent,
.accent-animated {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 35%, var(--accent-3) 65%, var(--accent) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-sweep 6s linear infinite;
}
@keyframes gradient-sweep {
  0%   { background-position: 0%   50%; }
  100% { background-position: 200% 50%; }
}

.lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(179, 110, 255, 0.35);
  overflow: hidden;
}
/* Subtle aurora wash under the primary CTA — a second gradient
   layered on top that slowly drifts, giving the button a
   "breathing" feel without trashing readability. */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 45%,
    transparent 90%);
  transform: translateX(-110%);
  transition: transform 0.7s cubic-bezier(.25,.9,.25,1);
}
.btn-primary:hover::before { transform: translateX(110%); }
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 40px rgba(179, 110, 255, 0.5);
}
.btn-primary .btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-stroke-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--glass-strong);
  transform: translateY(-1px);
}

/* Secondary hero CTA — KUBORA-orange to echo the logo cube.
   Sits between the purple primary and the glass ghost, so the
   reader's eye moves Download → Try → Docs in descending weight. */
.btn-try {
  background: linear-gradient(135deg, #ffb45c, #ff7a14);
  color: #1a0d00;
  box-shadow: 0 10px 30px rgba(255, 122, 20, 0.35);
  overflow: hidden;
}
.btn-try::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 90%);
  transform: translateX(-110%);
  transition: transform 0.7s cubic-bezier(.25,.9,.25,1);
}
.btn-try:hover::before { transform: translateX(110%); }
.btn-try:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 40px rgba(255, 122, 20, 0.5);
}
.btn-try .btn-arrow { transition: transform 0.2s ease; }
.btn-try:hover .btn-arrow { transform: translateX(4px); }

.hero-receipts {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.receipt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-stroke);
  font-size: 12px;
  color: var(--text-dim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.receipt:hover {
  border-color: var(--glass-stroke-strong);
  background: rgba(255, 255, 255, 0.07);
}
.receipt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 12px var(--c, var(--accent));
}
.receipt-label {
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--text);
}

/* Gradient text used in a few section headlines. */
.grad-text {
  background: linear-gradient(135deg, #b36eff 0%, #4c8dff 55%, #ff6ed1 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-sweep 7s ease infinite;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--mono);
  flex-wrap: wrap;
}
.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-arrow { font-size: 18px; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* =======================  Stats strip  ======================= */

.stats {
  position: relative;
  z-index: 2;
  padding: 40px 48px 20px;
}
.stats-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 28px 36px;
  border-radius: 6px;
  background: linear-gradient(135deg,
    rgba(179, 110, 255, 0.08),
    rgba(76, 141, 255, 0.04) 50%,
    rgba(255, 110, 209, 0.06));
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--mono);
}

/* =======================  Sections  ======================= */

.section {
  padding: 140px 48px;
  position: relative;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-alt {
  background: linear-gradient(180deg, rgba(10, 11, 20, 0.2) 0%, rgba(10, 11, 20, 0.6) 100%);
  border-top: 1px solid var(--glass-stroke);
  border-bottom: 1px solid var(--glass-stroke);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 18px 0 22px;
}

.section-lede {
  font-size: clamp(15px, 1.15vw, 18px);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 0 48px;
}

/* ---- Feature grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.feature {
  padding: 28px 24px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
/* Gradient border that only shows on hover — gives cards that
   "neon outline" feel without painting one all the time. */
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(179, 110, 255, 0.55), rgba(76, 141, 255, 0.15) 60%, transparent);
  -webkit-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.25s ease;
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }
.feature:hover {
  background: var(--glass-strong);
  box-shadow: 0 20px 50px rgba(179, 110, 255, 0.15);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(179, 110, 255, 0.25), rgba(76, 141, 255, 0.25));
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--mono);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.feature:hover .feature-icon { transform: scale(1.08) rotate(-4deg); }

.feature h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text);
}

.feature p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* ---- Feature list (Build section) ---- */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-list li {
  padding: 16px 20px;
  border-radius: 3px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  color: var(--text-dim);
  font-size: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature-list li:hover {
  border-color: var(--glass-stroke-strong);
  transform: translateX(4px);
  background: var(--glass-strong);
}
.feature-list strong {
  color: var(--accent);
  font-weight: 600;
  margin-right: 10px;
  font-family: var(--mono);
}

/* ---- Pillars (Multiplayer section) ---- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.pillar {
  padding: 32px 28px;
  border-radius: 3px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  position: relative;
  overflow: hidden;
}
.pillar:hover {
  border-color: var(--glass-stroke-strong);
  background: var(--glass-strong);
  box-shadow: 0 18px 45px rgba(76, 141, 255, 0.15);
}

.pillar-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 14px;
}

.pillar h3 {
  font-size: 19px;
  margin: 0 0 10px;
  font-weight: 700;
}

.pillar p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* ---- Stack grid (Under the hood) ---- */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.stack-card {
  padding: 24px 22px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  position: relative;
}
.stack-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 110, 255, 0.4);
  background: var(--glass-strong);
}
.stack-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  background: rgba(179, 110, 255, 0.12);
  border: 1px solid rgba(179, 110, 255, 0.28);
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.stack-card h3 {
  font-size: 19px;
  margin: 0 0 8px;
  font-weight: 700;
}
.stack-card p {
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.55;
}

/* =======================  Language section  =======================
   Two-column layout: copy on the left, code editor chrome on the
   right. Collapses to stacked on tablets. The editor card is a
   glass panel with a fake title bar and a syntax-coloured code
   block — nothing runs, it's all static markup with span classes. */

.lang-split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 56px;
  align-items: center;
}

.lang-copy .eyebrow { margin-bottom: 20px; }

.lang-bullets {
  list-style: none;
  padding: 0;
  margin: 28px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lang-bullets li {
  color: var(--text-dim);
  font-size: 14.5px;
  padding-left: 18px;
  position: relative;
}
.lang-bullets li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 9px;
  line-height: 22px;
}
.lang-bullets strong {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
  background: rgba(179, 110, 255, 0.12);
  border: 1px solid rgba(179, 110, 255, 0.28);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.88em;
}

.lang-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Fake editor card ----
   Chrome: traffic lights + filename tab + version badge.
   Body: <pre><code> with inline <span>s for token colours. Each
   line sits in a `.cline` wrapper with a `.ln` line-number gutter
   so the block reads as a real editor. */

.code-editor {
  background: linear-gradient(180deg, rgba(15, 18, 32, 0.95), rgba(10, 11, 20, 0.95));
  border: 1px solid var(--glass-stroke-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(179, 110, 255, 0.10),
    0 0 40px rgba(179, 110, 255, 0.18);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  font-family: var(--mono);
  position: relative;
}
/* Soft scanline-ish rim so the editor reads as a monitor. */
.code-editor::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.code-dots { display: inline-flex; gap: 6px; }
.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #444;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }

.code-tab {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.code-badge {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: rgba(179, 110, 255, 0.12);
  border: 1px solid rgba(179, 110, 255, 0.30);
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

.code-body {
  margin: 0;
  padding: 18px 20px 22px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #d7d9ff;
  overflow-x: auto;
}
.code-body code { display: block; }

/* Line wrapper. A `.cline` is one source line, with a prefix
   `.ln` that behaves as a gutter (right-aligned, muted). */
.cline { display: block; }
.ln {
  display: inline-block;
  width: 2.2em;
  padding-right: 12px;
  text-align: right;
  color: var(--text-faint);
  user-select: none;
  opacity: 0.55;
}

/* Token colours. Chosen from the site palette so the editor
   doesn't introduce a new color language. */
.code-body .k  { color: #b36eff; font-weight: 600; }  /* keyword */
.code-body .f  { color: #4c8dff; }                    /* function call */
.code-body .e  { color: #ff6ed1; }                    /* event name */
.code-body .s  { color: #4dd27a; }                    /* string */
.code-body .n  { color: #ffd580; }                    /* number */
.code-body .c  { color: #606789; font-style: italic; } /* comment */
.code-body .pp { color: #e8bfff; }                    /* property */

/* On narrow screens the split collapses to one column with code
   below copy. Editor also shrinks its font. */
@media (max-width: 920px) {
  .lang-split { grid-template-columns: 1fr; gap: 36px; }
  .code-body  { font-size: 12.5px; }
}

/* =======================  Why KUBORA grid  =======================
   Six cards in a 3-column responsive grid. Each one stacks a big
   muted number over the card body — reads as a manifesto. */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.why-card {
  padding: 28px 24px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}
.why-card::after {
  /* Faint diagonal gradient that becomes visible on hover. */
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(179, 110, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.why-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 110, 255, 0.42);
  background: var(--glass-strong);
  box-shadow: 0 20px 45px rgba(179, 110, 255, 0.16);
}
.why-card:hover::after { opacity: 1; }
.why-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 12px;
}
.why-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.why-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* =======================  Download cards  ======================= */

.section-download .section-inner { text-align: center; }
.section-download .section-lede { margin-left: auto; margin-right: auto; }

/* "In the box" ribbon under the download CTA. A single flex row
   of chips, each with a glyph + label. Wraps on narrow widths.
   Designed to read as a bill of goods without pulling focus
   from the big download button. */
.in-the-box {
  list-style: none;
  padding: 0;
  margin: 32px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 780px;
}
.in-the-box li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--sans);
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.in-the-box li:hover {
  border-color: rgba(179, 110, 255, 0.45);
  background: var(--glass-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(179, 110, 255, 0.22);
}
.in-the-box li span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 15px;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px 0 32px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.download-card {
  text-align: left;
  padding: 24px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.download-card.primary {
  background:
    radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, rgba(179, 110, 255, 0.22), rgba(76, 141, 255, 0.14));
  border-color: rgba(179, 110, 255, 0.42);
  box-shadow: 0 10px 30px rgba(179, 110, 255, 0.22);
  cursor: pointer;
}
.download-card.primary:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 110, 255, 0.7);
  box-shadow: 0 18px 50px rgba(179, 110, 255, 0.4);
}
.download-card.ghost {
  opacity: 0.5;
  cursor: not-allowed;
}

.download-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.platform {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.arch {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.download-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.download-size {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.download-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.footnote {
  max-width: 540px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-faint);
}

/* =======================  Footer  ======================= */

.foot {
  padding: 56px 48px 28px;
  border-top: 1px solid var(--glass-stroke);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7, 8, 15, 0.6);
}

.foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 2fr);
  gap: 48px;
  align-items: flex-start;
}

.foot-brand { display: flex; flex-direction: column; gap: 14px; }
.foot-blurb {
  color: var(--text-faint);
  font-size: 13px;
  margin: 0;
  max-width: 260px;
  line-height: 1.55;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 32px;
}
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.foot-col a {
  color: var(--text-dim);
  font-size: 13.5px;
  transition: color 0.18s ease, transform 0.18s ease;
}
.foot-col a:hover {
  color: var(--text);
  transform: translateX(3px);
}

.foot-base {
  max-width: 1080px;
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--glass-stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.foot-copyright,
.foot-tag {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.foot-tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 10px;
}

@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr; gap: 32px; }
  .foot-cols  { grid-template-columns: repeat(2, 1fr); }
}

/* =======================  Reveal animations  =======================
   Global utility. Any element can add `.reveal` and optionally a
   `--d: <seconds>` CSS custom property for a stagger delay.
   ui.js adds `.is-visible` via IntersectionObserver once the
   element scrolls into view — at that point the transform/opacity
   transitions kick in. */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s cubic-bezier(.22,.61,.36,1) var(--d, 0s),
    transform 0.7s cubic-bezier(.22,.61,.36,1) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =======================  Tilt cards  =======================
   .tilt elements get --rx and --ry written by ui.js on mousemove.
   We apply a transform that composes the tilt with the card's
   reveal-in so nothing fights. */

.tilt {
  transform-style: preserve-3d;
}
.tilt.is-visible {
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateZ(var(--tz, 0px));
  transition:
    transform 0.18s ease-out,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* =======================  Marquee strip  =======================
   Infinite horizontal scroll of buzzwords. Two copies of the
   content sit back-to-back inside `.marquee-track`; we animate
   translateX from 0 to -50% which puts copy #2 exactly where
   copy #1 started, giving a seamless loop.

   Outlined text (transparent fill + stroke via -webkit-text-
   stroke) keeps the strip from stealing attention from the
   download CTA below it. */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 28px 0;
  border-top: 1px solid var(--glass-stroke);
  border-bottom: 1px solid var(--glass-stroke);
  background: linear-gradient(180deg, rgba(7, 8, 15, 0.0), rgba(7, 8, 15, 0.4));
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 52px);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 240, 255, 0.35);
}
.marquee-track .sep {
  color: var(--accent);
  -webkit-text-stroke: 0;
  font-size: 0.55em;
  opacity: 0.85;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* =======================  Border beam  =======================
   Rotating conic gradient behind the primary download card.
   We mask the inside so only a 1px border shows the colour,
   creating a "light chasing around the edge" effect. */

.download-card.primary { position: relative; isolation: isolate; }

.border-beam {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0deg,
    var(--accent) 60deg,
    var(--accent-3) 120deg,
    var(--accent-2) 180deg,
    transparent 240deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: beam-spin 5s linear infinite;
}
/* The animation abuses @property so we can interpolate a custom
   property. Browsers without @property still show a static rim
   (the `from` fallback), which is acceptable. */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes beam-spin {
  to { --angle: 360deg; }
}

/* Bring the card's real content above the beam. */
.download-card.primary > *:not(.border-beam) {
  position: relative;
  z-index: 1;
}

/* =======================  H2 outline-sweep  =======================
   Section headings get a subtle animated gradient underline using
   a ::after pseudo. Draws focus without adding a chunky divider.
*/

h2 {
  position: relative;
  display: inline-block;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 40%;
  bottom: -10px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  background-size: 200% 100%;
  animation: gradient-sweep 4s linear infinite;
  opacity: 0.85;
}

/* Respect users who asked for less motion — strip animations. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-hint,
  .eyebrow,
  .brand-logo::after,
  .accent-animated,
  .blob,
  .marquee-track,
  .border-beam,
  h2::after { animation: none !important; }
  .tilt.is-visible { transform: none !important; }
  .cursor-orb { display: none; }
}

/* =======================  JSON Game accents  ======================= */

/* Small "NEW" pill that sits inline with the feature h3. */
.feature-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: linear-gradient(90deg, #b36eff, #ff6ec7);
  color: #0a0b14;
  vertical-align: middle;
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 110, 199, 0.35);
}

/* The AI-prompt callout at the bottom of #jsongame. A full-width
   card with a gradient border, icon column, and CTA. Visually
   louder than a regular section so the reader does not miss the
   core hook of JSON Game — "paste into Claude, get a game". */
.ai-callout {
  margin-top: 64px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  padding: 32px 36px;
  border-radius: 20px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(20, 22, 38, 0.88), rgba(14, 15, 26, 0.88));
  border: 1px solid rgba(179, 110, 255, 0.35);
  overflow: hidden;
  isolation: isolate;
}
.ai-callout::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(179, 110, 255, 0.55), rgba(255, 110, 199, 0.35), rgba(76, 141, 255, 0.55));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
.ai-callout::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 110, 199, 0.22), transparent 60%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}
.ai-callout-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 28px;
  font-weight: 700;
  color: #0a0b14;
  background: linear-gradient(135deg, #b36eff, #ff6ec7);
  box-shadow: 0 10px 30px rgba(179, 110, 255, 0.35);
}
.ai-callout-body {
  position: relative;
  z-index: 1;
}
.ai-callout-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.ai-callout-body h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.ai-callout-body p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 62ch;
}
.ai-callout-body p em {
  color: #ffa8d7;
  font-style: normal;
  font-weight: 600;
}
.ai-callout-body code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 13px;
  color: #e3d6ff;
}

/* =======================  Responsive  ======================= */

@media (max-width: 860px) {
  .ai-callout {
    grid-template-columns: 1fr;
    padding: 24px 22px;
  }
  .ai-callout-icon { width: 52px; height: 52px; font-size: 22px; }
  .ai-callout-body h3 { font-size: 20px; }
}

@media (max-width: 680px) {
  .hero          { padding: 48px 24px 100px; }
  .hero-inner    { margin-left: 0; }
  .section       { padding: 96px 24px; }
  .stats         { padding: 28px 20px 4px; }
  .stats-inner   { padding: 20px 22px; }
  .foot-inner    { justify-content: flex-start; }
  .foot          { padding: 32px 24px; }
  .download-card { padding: 20px; }
}

/* =========================================================
   Community games section (#games)
   ========================================================= */

.games-counter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  padding: 26px 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(179, 110, 255, 0.10), rgba(76, 141, 255, 0.06));
  border: 1px solid rgba(179, 110, 255, 0.22);
  box-shadow: 0 18px 60px -30px rgba(179, 110, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.games-counter-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 180px;
  padding: 18px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(179, 110, 255, 0.22), rgba(255, 110, 209, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.games-counter-value {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #fff, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 34px rgba(255, 110, 209, 0.35);
}

.games-counter-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.games-counter-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}

.games-counter-hint {
  color: var(--text-faint);
  font-size: 13px;
}

/* Status pill (loading / live / offline) */
.games-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  align-self: flex-start;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
}

.games-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 0 currentColor;
}

.games-status[data-state="loading"] .games-status-dot {
  background: #ffcb6b;
  animation: games-dot-pulse 1.2s ease-in-out infinite;
}

.games-status[data-state="live"] {
  color: #7ef0a8;
  border-color: rgba(126, 240, 168, 0.35);
  background: rgba(126, 240, 168, 0.08);
}
.games-status[data-state="live"] .games-status-dot {
  background: #7ef0a8;
  box-shadow: 0 0 0 0 rgba(126, 240, 168, 0.6);
  animation: games-dot-live 1.8s ease-out infinite;
}

.games-status[data-state="offline"] {
  color: #ff9d9d;
  border-color: rgba(255, 120, 120, 0.3);
  background: rgba(255, 120, 120, 0.07);
}

@keyframes games-dot-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

@keyframes games-dot-live {
  0%   { box-shadow: 0 0 0 0 rgba(126, 240, 168, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(126, 240, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 240, 168, 0); }
}

/* List container */
.games-list-wrap {
  position: relative;
  margin-top: 36px;
  min-height: 200px;
}

.games-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Individual game card */
.game-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  will-change: transform, opacity;
  --accent: #b36eff;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(140% 120% at 0% 0%, var(--accent) 0%, transparent 55%);
  opacity: 0.10;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 22px 60px -28px color-mix(in srgb, var(--accent) 75%, transparent);
}

.game-card:hover::before { opacity: 0.22; }

.game-card-orb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, #fff, var(--accent) 55%, rgba(0, 0, 0, 0.2) 100%);
  box-shadow: 0 10px 26px -8px var(--accent);
  position: relative;
}

.game-card-orb::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), transparent 45%);
  opacity: 0.6;
}

.game-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.game-card-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.game-card-plays {
  font-variant-numeric: tabular-nums;
}

.game-card-time {
  color: var(--text-faint);
}

.game-card-visibility {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--accent) 85%, #fff);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Entrance animation for realtime INSERTs */
.game-card-enter {
  animation: game-card-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes game-card-enter {
  0% {
    opacity: 0;
    transform: translateY(-26px) scale(0.94);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 80%, transparent);
  }
  55% {
    box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Exit animation for DELETE / visibility-flipped-to-private */
.game-card-leave {
  animation: game-card-leave 0.4s ease-out both;
  pointer-events: none;
}

@keyframes game-card-leave {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* Flash for realtime UPDATE */
.game-card-flash {
  animation: game-card-flash 1.1s ease-out;
}

@keyframes game-card-flash {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  40%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Skeleton loaders while initial fetch is in flight */
.games-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  pointer-events: none;
}

.game-card-skeleton {
  height: 110px;
  border-radius: 18px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.03) 80%
  );
  background-size: 200% 100%;
  animation: games-skel-shine 1.6s linear infinite;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes games-skel-shine {
  0%   { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

/* Empty / error placeholder */
.games-placeholder {
  padding: 32px 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
}

.games-placeholder-title {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}

.games-placeholder-sub {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.games-placeholder-error {
  background: rgba(255, 120, 120, 0.05);
  border-color: rgba(255, 120, 120, 0.25);
}

.games-placeholder-error .games-placeholder-title {
  color: #ff9d9d;
}

/* Responsive */
@media (max-width: 880px) {
  .games-counter {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }
  .games-counter-tile {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .games-counter-meta { align-items: center; text-align: center; }
  .games-counter-value { font-size: 52px; }
}

@media (max-width: 540px) {
  .games-list,
  .games-skeleton { grid-template-columns: 1fr; }
  .game-card      { padding: 16px 18px; }
  .game-card-orb  { width: 44px; height: 44px; }
}

/* Users who asked for less motion get the list without the
   spring animations. Opacity transitions only. */
@media (prefers-reduced-motion: reduce) {
  .game-card-enter,
  .game-card-leave,
  .game-card-flash,
  .game-card-skeleton,
  .games-status-dot {
    animation: none !important;
  }
  .game-card { transition: opacity 0.2s ease; }
}

/* ====================================================================
   We vs Roblox
   --------------------------------------------------------------------
   Two-column comparison + a live CCU ticker at the bottom. The
   left column (Roblox) uses a warm-red accent so the cons read as
   warnings; the right column (KUBORA) uses the house violet +
   green check so it reads as the answer. The middle divider
   label "vs" bridges the two with a small animated pulse.

   On narrow viewports the columns stack and the divider rotates
   flat, so the "vs" row becomes a horizontal splitter rather
   than a side-by-side gutter. The live ticker always reads as
   two tiles plus a divider — columns on desktop, stacked on mobile.
   ==================================================================== */

.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
}

.vs-col {
  position: relative;
  padding: 28px 28px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.vs-col::before {
  /* Subtle top sheen that identifies which column this is —
     warm red for Roblox, cool violet for KUBORA. Pure decoration. */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
  background: radial-gradient(60% 120% at 50% 0%, var(--vs-tint, rgba(255,255,255,0.10)), transparent 70%);
}

.vs-col-them {
  --vs-tint: rgba(255, 93, 106, 0.28);
}
.vs-col-them:hover {
  border-color: rgba(255, 93, 106, 0.35);
  box-shadow: 0 12px 40px rgba(255, 93, 106, 0.10);
  transform: translateY(-3px);
}

.vs-col-us {
  --vs-tint: rgba(179, 110, 255, 0.32);
  border-color: rgba(179, 110, 255, 0.22);
  box-shadow: 0 10px 40px rgba(179, 110, 255, 0.10);
}
.vs-col-us:hover {
  border-color: rgba(179, 110, 255, 0.42);
  box-shadow: 0 16px 50px rgba(179, 110, 255, 0.22);
  transform: translateY(-3px);
}

.vs-col-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--glass-stroke);
}

.vs-col-head h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.vs-col-tag {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.vs-col-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  flex-shrink: 0;
}

.vs-logo-roblox {
  background: linear-gradient(135deg, #ff5d6a, #c0202d);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 16px rgba(255, 93, 106, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.vs-logo-kubora {
  background: linear-gradient(135deg, #b36eff, #4c8dff);
  color: #fff;
  box-shadow: 0 4px 16px rgba(179, 110, 255, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
}
.vs-logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.vs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-dim);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.vs-list li:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}
.vs-list li strong {
  color: var(--text);
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}

.vs-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  margin-top: 1px;
}
.vs-icon-bad {
  background: rgba(255, 93, 106, 0.18);
  color: #ff8a95;
  border: 1px solid rgba(255, 93, 106, 0.28);
}
.vs-icon-good {
  background: rgba(77, 210, 122, 0.18);
  color: #68e596;
  border: 1px solid rgba(77, 210, 122, 0.28);
}

@media (max-width: 900px) {
  .vs-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- Live CCU ticker ---------------------------------------------- */

.vs-live {
  margin-top: 60px;
  padding: 28px 28px 24px;
  border-radius: 24px;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(179, 110, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.vs-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.vs-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-stroke);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.vs-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 0 currentColor;
}
.vs-live-status[data-state="loading"] .vs-live-dot {
  background: #ffd580;
  animation: games-dot-pulse 1.4s ease-in-out infinite;
}
.vs-live-status[data-state="live"]    {
  color: var(--success);
  border-color: rgba(77, 210, 122, 0.35);
}
.vs-live-status[data-state="live"] .vs-live-dot {
  background: var(--success);
  animation: games-dot-live 1.8s ease-in-out infinite;
}
.vs-live-status[data-state="offline"] {
  color: var(--danger);
  border-color: rgba(255, 93, 106, 0.35);
}
.vs-live-status[data-state="offline"] .vs-live-dot { background: var(--danger); }

.vs-live-hint {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.vs-live-tiles {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}

.vs-live-tile {
  position: relative;
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: rgba(8, 9, 18, 0.55);
  border: 1px solid var(--glass-stroke);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.vs-live-tile:hover { transform: translateY(-2px); }
.vs-live-tile-us:hover   { border-color: rgba(179, 110, 255, 0.35); }
.vs-live-tile-them:hover { border-color: rgba(255, 93, 106, 0.35); }

.vs-live-tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.vs-live-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}
.vs-live-logo .vs-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.vs-live-tile-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.vs-live-tile-pill {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: help;
}
.vs-live-pill-live {
  color: #0a1d12;
  background: linear-gradient(90deg, #4dd27a, #2fb55d);
  box-shadow: 0 0 12px rgba(77, 210, 122, 0.45);
  animation: vs-pill-live-pulse 2.6s ease-in-out infinite;
}
.vs-live-pill-approx {
  color: #ffd580;
  background: rgba(255, 213, 128, 0.14);
  border: 1px solid rgba(255, 213, 128, 0.30);
}

@keyframes vs-pill-live-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(77, 210, 122, 0.45); }
  50%      { box-shadow: 0 0 22px rgba(77, 210, 122, 0.75); }
}

.vs-live-tile-value {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, #eef0ff 0%, #b36eff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2);
}
.vs-live-tile-them .vs-live-tile-value {
  background: linear-gradient(135deg, #eef0ff 0%, #ff8a95 85%);
  -webkit-background-clip: text;
  background-clip: text;
}
.vs-live-tile-value.is-flash { animation: vs-value-flash 0.55s ease-out; }
@keyframes vs-value-flash {
  0%   { text-shadow: 0 0 0 transparent; transform: translateY(0); }
  30%  { text-shadow: 0 0 24px rgba(179, 110, 255, 0.9); transform: translateY(-2px); }
  100% { text-shadow: 0 0 0 transparent; transform: translateY(0); }
}

.vs-live-tile-label {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.vs-live-spark {
  position: absolute;
  inset: auto 0 0 0;
  height: 40px;
  opacity: 0.55;
  pointer-events: none;
}

.vs-live-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-faint);
  position: relative;
}
.vs-live-divider::before,
.vs-live-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--glass-stroke-strong), transparent);
  height: 45%;
  transform: translateX(-50%);
}
.vs-live-divider::before { top: 0; }
.vs-live-divider::after  { bottom: 0; }
.vs-live-divider-label {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 18, 0.9);
  border: 1px solid var(--glass-stroke-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vs-live-caveat {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.5;
  max-width: 720px;
}

@media (max-width: 780px) {
  .vs-live-tiles {
    grid-template-columns: 1fr;
  }
  .vs-live-divider {
    min-height: 36px;
  }
  .vs-live-divider::before,
  .vs-live-divider::after {
    left: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-stroke-strong), transparent);
    transform: translateY(-50%);
  }
  .vs-live-divider::before { left: 0; }
  .vs-live-divider::after  { left: auto; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vs-live-pill-live,
  .vs-live-tile-value.is-flash { animation: none !important; }
  .vs-col:hover,
  .vs-live-tile:hover { transform: none; }
}

