/* ═══════════════════════════════════════════════════════════════════════
   KRIFOX PROTOCOL — Landing Page Design System
   Palette mirrors app/src/styles/index.css for brand consistency between
   the marketing site (this file) and the dashboard app (/app/).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Core palette (byte-identical to the dashboard app) */
  --color-primary: #a855f7;
  --color-primary-600: #9333ea;
  --color-primary-700: #7e22ce;
  --color-secondary: #6d28d9;

  --color-gold: #f0c14b;
  --color-gold-2: #ffe083;
  --color-gold-dark: #b08a1e;

  --color-bg: #03040a;
  --color-surface: #12141f;
  --color-surface-2: #1b1e2e;
  --color-ink: #ffffff;
  --color-muted: #a3abc4;
  --color-line: #2d3350;

  --font-heading: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --radius-card: 18px;
  --radius-btn: 10px;

  --shadow-glow: 0 18px 48px -12px rgb(168 85 247 / 0.55);
  --shadow-gold: 0 16px 38px -14px rgb(240 193 75 / 0.45);

  --nav-h: 76px;
}

/* ─────────────────────────  Base  ───────────────────────── */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, .kx-font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0;
}
p {
  color: var(--color-muted);
  line-height: 1.7;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2e45; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a3f5c; background-clip: padding-box; }

.kx-container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─────────────────────────  Typography helpers  ───────────────────────── */
.kx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-2);
  background: rgb(240 193 75 / 0.1);
  border: 1px solid rgb(240 193 75 / 0.3);
  border-radius: 999px;
  padding: 7px 16px;
}
.kx-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 10px var(--color-gold);
}
.kx-h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
}
.kx-h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}
.kx-h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
}
.kx-lead {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--color-muted);
  max-width: 640px;
}
.kx-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.kx-section-head .kx-h2 {
  margin-top: 16px;
}
.kx-section-head p {
  margin-top: 16px;
}
.kx-gradient-text {
  background: linear-gradient(135deg, #e9d5ff 0%, var(--color-primary) 55%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kx-gold-text {
  background: linear-gradient(135deg, var(--color-gold-2), var(--color-gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─────────────────────────  Buttons  ───────────────────────── */
.kx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.kx-btn:hover { transform: translateY(-2px); }
.kx-btn-primary {
  color: #1a0a2b;
  background: linear-gradient(135deg, var(--color-gold-2) 0%, var(--color-gold) 55%, var(--color-gold-dark) 100%);
  box-shadow: var(--shadow-gold);
}
.kx-btn-primary:hover {
  box-shadow: 0 22px 48px -14px rgb(240 193 75 / 0.65);
}
.kx-btn-outline {
  color: var(--color-ink);
  background: rgb(255 255 255 / 0.04);
  border-color: rgb(168 85 247 / 0.4);
}
.kx-btn-outline:hover {
  border-color: rgb(168 85 247 / 0.8);
  box-shadow: var(--shadow-glow);
  background: rgb(168 85 247 / 0.08);
}
.kx-btn-sm { padding: 10px 20px; font-size: 13px; }

/* ─────────────────────────  Cosmic background layers  ───────────────────────── */
#kxStarfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.kx-nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.kx-nebula-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.kx-nebula-1 {
  width: 52vw; height: 52vw; min-width: 420px; min-height: 420px;
  top: -16vh; left: -12vw;
  background: radial-gradient(circle at 50% 50%, rgb(168 85 247 / 0.65), transparent 68%);
  animation: kx-drift-1 26s ease-in-out infinite;
}
.kx-nebula-2 {
  width: 44vw; height: 44vw; min-width: 340px; min-height: 340px;
  top: 30vh; right: -14vw;
  background: radial-gradient(circle at 50% 50%, rgb(240 193 75 / 0.32), transparent 68%);
  animation: kx-drift-2 32s ease-in-out infinite;
}
.kx-nebula-3 {
  width: 58vw; height: 58vw; min-width: 460px; min-height: 460px;
  bottom: -24vh; left: 18vw;
  background: radial-gradient(circle at 50% 50%, rgb(109 40 217 / 0.55), transparent 70%);
  animation: kx-drift-3 30s ease-in-out infinite;
}
@keyframes kx-drift-1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(3vw, 4vh); } }
@keyframes kx-drift-2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-4vw, 3vh); } }
@keyframes kx-drift-3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(2vw, -3vh); } }

.kx-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%);
}

main, header, footer { position: relative; z-index: 1; }

/* ─────────────────────────  Glass / card surfaces  ───────────────────────── */
.kx-glass {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid rgb(255 255 255 / 0.12);
  background:
    linear-gradient(160deg, rgb(255 255 255 / 0.09) 0%, rgb(255 255 255 / 0.02) 26%, transparent 55%),
    linear-gradient(180deg, var(--color-surface) 0%, #080a12 100%);
  box-shadow:
    inset 0 1px 0 0 rgb(255 255 255 / 0.14),
    0 24px 50px -28px rgb(0 0 0 / 0.9);
  backdrop-filter: blur(6px);
}
.kx-glass-purple { border-color: rgb(168 85 247 / 0.45); }
.kx-glass-gold { border-color: rgb(240 193 75 / 0.4); }
.kx-card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.kx-card-hover:hover {
  transform: translateY(-6px);
  border-color: rgb(168 85 247 / 0.65);
  box-shadow:
    inset 0 1px 0 0 rgb(255 255 255 / 0.18),
    0 30px 60px -24px rgb(0 0 0 / 0.9),
    0 0 40px -10px rgb(168 85 247 / 0.55);
}
.kx-card-hover.kx-hover-gold:hover {
  border-color: rgb(240 193 75 / 0.7);
  box-shadow:
    inset 0 1px 0 0 rgb(255 255 255 / 0.18),
    0 30px 60px -24px rgb(0 0 0 / 0.9),
    0 0 40px -10px rgb(240 193 75 / 0.55);
}

/* ─────────────────────────  Navbar  ───────────────────────── */
.kx-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease, height 0.35s ease;
  border-bottom: 1px solid transparent;
}
.kx-nav.kx-nav-scrolled {
  height: 64px;
  background: rgb(3 4 10 / 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--color-line);
}
.kx-nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.kx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--color-ink);
}
.kx-brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--color-primary) 0%, var(--color-secondary) 70%);
  box-shadow: 0 0 0 1px rgb(240 193 75 / 0.5), 0 0 18px -4px rgb(168 85 247 / 0.8);
  position: relative;
  overflow: hidden;
}
.kx-brand-mark svg { width: 22px; height: 22px; }
.kx-logo-img { height: 38px; width: auto; display: block; }
.kx-logo-img-lg { height: 46px; }
.kx-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.kx-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.kx-nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.kx-nav-links a:hover,
.kx-nav-links a.kx-active {
  color: var(--color-ink);
}
.kx-nav-links a:hover::after,
.kx-nav-links a.kx-active::after {
  transform: scaleX(1);
}
.kx-nav-cta { display: flex; align-items: center; gap: 12px; }
.kx-nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: rgb(255 255 255 / 0.04);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.kx-nav-toggle svg { width: 20px; height: 20px; color: var(--color-ink); }

/* Bootstrap Offcanvas — restyled for the KRIFOX mobile nav */
.kx-offcanvas {
  width: min(86vw, 360px);
  background: rgb(3 4 10 / 0.98);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--color-line);
}
.kx-offcanvas .offcanvas-header { padding: 22px 22px 0; }
.kx-offcanvas .offcanvas-body { padding: 10px 22px 30px; display: flex; flex-direction: column; }
.kx-offcanvas .btn-close { filter: invert(1); opacity: 0.8; }
.kx-offcanvas a.kx-off-link {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink);
}
.kx-offcanvas .kx-btn { margin-top: 24px; align-self: flex-start; }

/* ─────────────────────────  Hero  ───────────────────────── */
.kx-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
}
.kx-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.kx-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.kx-hero-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  background: rgb(255 255 255 / 0.03);
}
.kx-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}
.kx-hero .kx-hero-ctas {
  flex-wrap: nowrap;
  align-items: center;
}

/* Hero coin visual */
.kx-coin-stage {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.kx-coin-stage .kx-orbit {
  display: none;
}
.kx-orbit::before {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 12px 3px rgb(240 193 75 / 0.8);
  top: -5px; left: 50%;
  margin-left: -5px;
}
.kx-orbit-1 { inset: 6%; animation: kx-spin 22s linear infinite; }
.kx-orbit-2 { inset: -4%; border-color: rgb(240 193 75 / 0.28); animation: kx-spin-rev 30s linear infinite; }
.kx-orbit-2::before { background: var(--color-primary); box-shadow: 0 0 12px 3px rgb(168 85 247 / 0.8); }
.kx-orbit-3 { inset: 16%; border-style: dashed; border-color: rgb(255 255 255 / 0.14); animation: kx-spin 40s linear infinite; }
.kx-orbit-3::before { opacity: 0; }
@keyframes kx-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes kx-spin-rev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.kx-coin-glow {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, rgb(240 193 75 / 0.5), rgb(168 85 247 / 0.35) 55%, transparent 75%);
  filter: blur(38px);
  animation: kx-pulse-glow 5s ease-in-out infinite;
}
@keyframes kx-pulse-glow { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }

.kx-coin-visual {
  position: relative;
  width: 62%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  animation: kx-float 6s ease-in-out infinite;
}
.kx-coin-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}
@keyframes kx-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* CSS-only fallback coin (shown if the hero image fails to load) */
.kx-coin-fallback {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 0.55), transparent 34%),
    linear-gradient(150deg, var(--color-gold-2) 0%, var(--color-gold) 42%, var(--color-gold-dark) 100%);
  box-shadow:
    inset 0 0 0 6px rgb(255 255 255 / 0.15),
    inset 0 -12px 30px rgb(0 0 0 / 0.35),
    0 0 60px 10px rgb(240 193 75 / 0.5);
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.kx-coin-visual.kx-fallback-active .kx-coin-fallback { display: flex; }
.kx-coin-visual.kx-fallback-active img { display: none; }
.kx-coin-fallback::before {
  content: '';
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.35);
}
.kx-coin-fallback span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4rem);
  color: #3a2400;
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.4);
}

/* ─────────────────────────  Scroll reveal  ───────────────────────── */
.kx-reveal {
  opacity: 0;
  transform: translateY(28px);
}
.kx-reveal.kx-revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─────────────────────────  Section spacing  ───────────────────────── */
.kx-section { padding: 110px 0; position: relative; }
.kx-section-tight { padding: 90px 0; }

/* ─────────────────────────  Philosophy (section 3)  ───────────────────────── */
.kx-philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.kx-philosophy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.kx-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--color-line);
  background: rgb(255 255 255 / 0.03);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink);
}
.kx-chip .kx-chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}
.kx-philosophy-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  border: 1px solid rgb(168 85 247 / 0.3);
  background:
    radial-gradient(120% 120% at 30% 20%, rgb(168 85 247 / 0.22), transparent 60%),
    radial-gradient(90% 90% at 90% 90%, rgb(240 193 75 / 0.16), transparent 60%),
    linear-gradient(180deg, var(--color-surface), #070811);
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* Two slow-spinning decorative rings behind the hub — pure atmosphere,
   independent of the node layout so they never fight the fixed positions. */
.kx-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.kx-orbit-ring-a {
  inset: 7%;
  border: 1px dashed rgb(168 85 247 / 0.28);
  animation: kx-spin 60s linear infinite;
}
.kx-orbit-ring-b {
  inset: 1%;
  border: 1px dotted rgb(240 193 75 / 0.22);
  animation: kx-spin-rev 80s linear infinite;
}

/* Six mechanic nodes placed on an exact hexagon via left/top percentages —
   the previous top/right/bottom/left mix didn't form a real circle and
   nodes landed unevenly. Percentages here are relative to .kx-node-ring
   (itself a perfect square), so the hexagon holds at any size. */
.kx-node-ring {
  position: relative;
  width: 84%;
  height: 84%;
}
.kx-spokes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.kx-spoke {
  stroke: rgb(168 85 247 / 0.4);
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-dasharray: 2.2 3.4;
  animation: kx-spoke-flow 2.6s linear infinite;
}
@keyframes kx-spoke-flow { to { stroke-dashoffset: -22.4; } }

/* Small sparks travel each spoke toward the KFX hub — a visual shorthand
   for "every mechanic ultimately feeds the token." Six independent
   keyframes (rather than CSS custom-property interpolation) keep this
   working in every browser, including ones without @property support. */
.kx-flow-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--color-gold) 60%, transparent 78%);
  box-shadow: 0 0 8px 2px rgb(240 193 75 / 0.75);
  transform: translate(-50%, -50%);
  opacity: 0;
}
.kx-flow-dot-1 { animation: kx-flow-1 3s ease-in-out infinite; animation-delay: 0s; }
.kx-flow-dot-2 { animation: kx-flow-2 3s ease-in-out infinite; animation-delay: .5s; }
.kx-flow-dot-3 { animation: kx-flow-3 3s ease-in-out infinite; animation-delay: 1s; }
.kx-flow-dot-4 { animation: kx-flow-4 3s ease-in-out infinite; animation-delay: 1.5s; }
.kx-flow-dot-5 { animation: kx-flow-5 3s ease-in-out infinite; animation-delay: 2s; }
.kx-flow-dot-6 { animation: kx-flow-6 3s ease-in-out infinite; animation-delay: 2.5s; }
@keyframes kx-flow-1 { 0% { left: 50%; top: 13.88%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 50%; top: 42.44%; opacity: 0; } }
@keyframes kx-flow-2 { 0% { left: 81.28%; top: 31.94%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 56.55%; top: 46.22%; opacity: 0; } }
@keyframes kx-flow-3 { 0% { left: 81.28%; top: 68.06%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 56.55%; top: 53.78%; opacity: 0; } }
@keyframes kx-flow-4 { 0% { left: 50%; top: 86.12%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 50%; top: 57.56%; opacity: 0; } }
@keyframes kx-flow-5 { 0% { left: 18.72%; top: 68.06%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 43.45%; top: 53.78%; opacity: 0; } }
@keyframes kx-flow-6 { 0% { left: 18.72%; top: 31.94%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 43.45%; top: 46.22%; opacity: 0; } }

.kx-node {
  position: absolute;
  width: 25%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background:
    linear-gradient(160deg, rgb(255 255 255 / 0.08) 0%, rgb(255 255 255 / 0.015) 60%),
    linear-gradient(180deg, var(--color-surface), #0a0c15);
  border: 1px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 16px 30px -18px rgb(0 0 0 / 0.85), 0 0 22px -10px rgb(168 85 247 / 0.5);
  font-size: clamp(9px, 2vw, 11px);
  font-weight: 600;
  text-align: center;
  color: var(--color-ink);
  padding: 4%;
  z-index: 2;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease;
  animation: kx-node-pop .6s cubic-bezier(.22,1,.36,1) both;
}
.kx-node:hover {
  transform: translate(-50%, -50%) scale(1.14);
  border-color: rgb(240 193 75 / 0.55);
  box-shadow: 0 20px 36px -18px rgb(0 0 0 / 0.9), 0 0 34px -6px rgb(240 193 75 / 0.7);
  z-index: 3;
}
.kx-node svg { width: 18px; height: 18px; color: var(--color-gold-2); transition: color .3s ease, transform .3s ease; }
.kx-node:hover svg { color: #fff; transform: scale(1.12); }
.kx-node span { line-height: 1.2; }
@keyframes kx-node-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.kx-node-1 { left: 50%;    top: 8%;   animation-delay: .05s; }
.kx-node-2 { left: 86.37%; top: 29%;  animation-delay: .15s; }
.kx-node-3 { left: 86.37%; top: 71%;  animation-delay: .25s; }
.kx-node-4 { left: 50%;    top: 92%;  animation-delay: .35s; }
.kx-node-5 { left: 13.63%; top: 71%;  animation-delay: .45s; }
.kx-node-6 { left: 13.63%; top: 29%;  animation-delay: .55s; }

/* Centre hub — a static gold orb (no more spin-and-counter-spin hack on the
   label) with a separate dashed ring rotating around it and a slow pulse
   on the glow so it reads as the living centre of the diagram. */
.kx-node-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 0.4), transparent 46%),
    linear-gradient(150deg, var(--color-gold-2), var(--color-gold) 45%, var(--color-gold-dark));
  z-index: 2;
  animation: kx-orb-pulse 3.2s ease-in-out infinite;
}
.kx-node-center-ring {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 1.5px dashed rgb(255 255 255 / 0.4);
  animation: kx-spin 16s linear infinite;
}
.kx-node-center-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-weight: 800;
  color: #2a1900;
  font-size: clamp(13px, 3vw, 16px);
  letter-spacing: 0.02em;
}
@keyframes kx-orb-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgb(240 193 75 / 0.4), 0 0 40px 4px rgb(240 193 75 / 0.45); }
  50% { box-shadow: 0 0 0 1px rgb(240 193 75 / 0.55), 0 0 62px 10px rgb(240 193 75 / 0.65); }
}

/* ─────────────────────────  Infra pillars (section 4)  ───────────────────────── */
.kx-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.kx-pillar {
  padding: 32px 26px;
}
.kx-pillar-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgb(168 85 247 / 0.32), rgb(109 40 217 / 0.18));
  box-shadow: inset 0 0 0 1px rgb(168 85 247 / 0.4), 0 0 18px -6px rgb(168 85 247 / 0.5);
  color: var(--color-gold-2);
  margin-bottom: 20px;
}
.kx-pillar-icon svg { width: 26px; height: 26px; }
.kx-pillar h3 { margin-bottom: 10px; }
.kx-pillar p { font-size: 14px; margin: 0; }

/* ─────────────────────────  Mint Burn Grow (section 5)  ─────────────────────────
   Direction is now explicit: three cards separated by chevron connectors
   rather than a flat background line, plus a closing note that loops the
   third step back to the first — matching the "loop" language in the copy. */
.kx-mbg-wrap { position: relative; }
.kx-mbg-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.kx-mbg-card { padding: 40px 30px; text-align: center; height: 100%; }
.kx-mbg-icon {
  width: 68px; height: 68px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  position: relative;
}
.kx-mbg-icon svg { width: 30px; height: 30px; }
.kx-mbg-mint .kx-mbg-icon { background: linear-gradient(150deg, #c084fc, var(--color-primary)); box-shadow: 0 0 30px -6px rgb(168 85 247 / 0.8); color: #fff; }
.kx-mbg-burn .kx-mbg-icon { background: linear-gradient(150deg, #fb7185, #be123c); box-shadow: 0 0 30px -6px rgb(190 18 60 / 0.7); color: #fff; }
.kx-mbg-grow .kx-mbg-icon { background: linear-gradient(150deg, var(--color-gold-2), var(--color-gold-dark)); box-shadow: 0 0 30px -6px rgb(240 193 75 / 0.8); color: #2a1900; }
.kx-mbg-card h3 { font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.kx-mbg-card p { font-size: 14.5px; }
.kx-mbg-stat {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gold-2);
}

/* Chevron connector between each step, nudging gently in its pointing
   direction so the flow reads as active rather than a static divider. */
.kx-mbg-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-2);
  opacity: 0.75;
}
.kx-mbg-connector svg {
  width: 26px;
  height: 26px;
  animation: kx-connector-nudge 2.2s ease-in-out infinite;
}
@keyframes kx-connector-nudge {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(5px); opacity: 1; }
}

/* Closing note beneath the row — visually ties Grow back to Mint so the
   section reads as a cycle rather than a three-step list with an end. */
.kx-mbg-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin: 34px auto 0;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgb(240 193 75 / 0.3);
  background: rgb(240 193 75 / 0.06);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-align: center;
}
.kx-mbg-loop svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-gold-2);
  animation: kx-spin 6s linear infinite;
}

/* ─────────────────────────  Supply cycle diagram  ───────────────────────── */
.kx-flow-track {
  position: relative;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 10px 4px 26px;
  scrollbar-width: thin;
}
.kx-flow-node {
  flex: 0 0 210px;
  padding: 22px 18px;
  text-align: center;
  margin-right: 34px;
  position: relative;
}
.kx-flow-node:last-child { margin-right: 0; }
.kx-flow-node::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -34px;
  width: 34px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgb(168 85 247 / 0.6) 0 6px, transparent 6px 12px);
}
.kx-flow-node:last-child::after { display: none; }
.kx-flow-index {
  width: 30px; height: 30px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
}
.kx-flow-node h4 { font-size: 14.5px; margin-bottom: 6px; }
.kx-flow-node p { font-size: 12.5px; margin: 0; }
.kx-flow-node .kx-flow-value {
  display: block;
  margin-top: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-gold-2);
}

/* ─────────────────────────  Rank ladder (section 8)  ───────────────────────── */
.kx-rank-ladder {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kx-rank-ladder::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, rgb(168 85 247 / 0.55), rgb(240 193 75 / 0.75));
}
.kx-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
}
.kx-rank-node {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  border: 2px solid rgb(3 4 10 / 1);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.08);
  z-index: 1;
}
.kx-rank-card {
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.kx-rank-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  min-width: 130px;
}
.kx-rank-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.kx-rank-metric { text-align: left; }
.kx-rank-metric .v { font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--color-ink); }
.kx-rank-metric .l { font-size: 11px; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* rank color progression: purple → gold as rank rises */
.kx-rank-row[data-rank="1"] .kx-rank-node { background: linear-gradient(150deg, #c084fc, #a855f7); }
.kx-rank-row[data-rank="2"] .kx-rank-node { background: linear-gradient(150deg, #b476f5, #9333ea); }
.kx-rank-row[data-rank="3"] .kx-rank-node { background: linear-gradient(150deg, #a566ed, #8b1fe0); }
.kx-rank-row[data-rank="4"] .kx-rank-node { background: linear-gradient(150deg, #9d6ce4, #7e22ce); }
.kx-rank-row[data-rank="5"] .kx-rank-node { background: linear-gradient(150deg, #c9a3e6, #7c3aed); }
.kx-rank-row[data-rank="6"] .kx-rank-node { background: linear-gradient(150deg, #e4c98f, #d4af37); }
.kx-rank-row[data-rank="7"] .kx-rank-node { background: linear-gradient(150deg, #f0d38a, #ce9d2f); }
.kx-rank-row[data-rank="8"] .kx-rank-node { background: linear-gradient(150deg, var(--color-gold-2), var(--color-gold)); color: #2a1900; }
.kx-rank-row[data-rank="9"] .kx-rank-node { background: linear-gradient(150deg, #fff6d8, var(--color-gold-2), var(--color-gold-dark)); color: #2a1900; box-shadow: 0 0 0 3px rgb(240 193 75 / 0.25), 0 0 24px -4px rgb(240 193 75 / 0.8); }
.kx-rank-row[data-rank="9"] .kx-rank-card { border-color: rgb(240 193 75 / 0.55); }

/* ─────────────────────────  DAO section  ───────────────────────── */
.kx-dao-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.kx-dao-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.kx-dao-fact {
  padding: 18px;
}
.kx-dao-fact .v { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--color-gold-2); }
.kx-dao-fact .l { font-size: 12.5px; color: var(--color-muted); margin-top: 4px; }
.kx-dao-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgb(168 85 247 / 0.3), rgb(109 40 217 / 0.15));
  color: var(--color-gold-2);
  margin-bottom: 14px;
}
.kx-dao-icon svg { width: 22px; height: 22px; }
.kx-dao-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  border: 1px solid rgb(240 193 75 / 0.3);
  background:
    radial-gradient(120% 120% at 70% 20%, rgb(240 193 75 / 0.2), transparent 60%),
    radial-gradient(90% 90% at 10% 90%, rgb(168 85 247 / 0.2), transparent 60%),
    linear-gradient(180deg, var(--color-surface), #070811);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.kx-dao-visual .kx-dao-seats {
  text-align: center;
}
.kx-dao-seats .num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 4.5rem);
  background: linear-gradient(135deg, var(--color-gold-2), var(--color-gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kx-dao-seats .cap { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); margin-top: 8px; }

/* ─────────────────────────  Ecosystem pillars (section 11)  ───────────────────────── */
.kx-eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.kx-eco-card {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kx-eco-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  flex-shrink: 0;
}
.kx-eco-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.kx-eco-card p { font-size: 12px; margin: 0; }

/* ─────────────────────────  FAQ (section 12)  ───────────────────────── */
.kx-faq { max-width: 780px; margin: 0 auto; }
.accordion-item.kx-faq-item {
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: 14px !important;
  margin-bottom: 14px;
  overflow: hidden;
}
.kx-faq-item .accordion-button {
  background: rgb(255 255 255 / 0.03);
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  padding: 20px 24px;
  box-shadow: none;
}
.kx-faq-item .accordion-button:not(.collapsed) {
  background: rgb(168 85 247 / 0.1);
  color: var(--color-ink);
}
.kx-faq-item .accordion-button:focus { box-shadow: none; }
.kx-faq-item .accordion-button::after {
  filter: invert(1) brightness(3);
}
.kx-faq-item .accordion-body {
  background: rgb(3 4 10 / 0.4);
  color: var(--color-muted);
  font-size: 14.5px;
  padding: 4px 24px 22px;
  line-height: 1.75;
}

/* ─────────────────────────  Final CTA (section 13)  ───────────────────────── */
.kx-final-cta {
  position: relative;
  border-radius: 32px;
  border: 1px solid rgb(168 85 247 / 0.4);
  padding: 80px 40px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(90% 130% at 20% 0%, rgb(168 85 247 / 0.5), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgb(240 193 75 / 0.28), transparent 58%),
    linear-gradient(140deg, #09040f 0%, #2a1150 46%, #4c1d95 100%);
}
.kx-final-cta .kx-hero-ctas { justify-content: center; }
.kx-final-cta-orb {
  width: 90px; height: 90px;
  margin: 0 auto 26px;
  border-radius: 50%;
  position: relative;
  animation: kx-float 6s ease-in-out infinite;
}
.kx-final-cta-orb .kx-coin-fallback span { font-size: 34px; }

/* ─────────────────────────  Footer (section 14)  ───────────────────────── */
.kx-footer {
  padding: 70px 0 30px;
  border-top: 1px solid var(--color-line);
}
.kx-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 50px;
}
.kx-footer-brand p { margin-top: 16px; font-size: 13.5px; max-width: 320px; }
.kx-footer-col h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-bottom: 18px;
}
.kx-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.kx-footer-col a { font-size: 14px; color: var(--color-muted); transition: color 0.2s ease; }
.kx-footer-col a:hover { color: var(--color-gold-2); }
.kx-contract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: rgb(255 255 255 / 0.03);
  font-size: 12px;
}
.kx-contract-row .label { color: var(--color-muted); flex-shrink: 0; }
.kx-contract-row .addr { font-family: 'Courier New', monospace; color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kx-contract-row button {
  border: none;
  background: none;
  color: var(--color-gold-2);
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px;
}
.kx-contract-row button svg { width: 15px; height: 15px; }
.kx-footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--color-muted);
}
.kx-footer-disclaimer { max-width: 720px; }

/* ═══════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .kx-nav-links { display: none; }
  .kx-nav-cta .kx-btn-outline { display: none; }
  .kx-nav-toggle { display: flex; }
  .kx-hero-grid { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .kx-hero-grid > div:first-child { order: 1; }
  .kx-hero-grid > div:last-child { order: 2; margin-top: 8px; }
  .kx-hero-badges, .kx-hero-ctas { justify-content: center; }
  .kx-philosophy-grid { grid-template-columns: 1fr; }
  .kx-philosophy-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .kx-pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .kx-mbg-grid { grid-template-columns: 1fr; }
  .kx-mbg-connector svg { transform: rotate(90deg); animation: none; }
  .kx-mbg-loop { font-size: 12.5px; padding: 12px 18px; }
  .kx-dao-grid { grid-template-columns: 1fr; }
  .kx-dao-visual { order: -1; max-width: 380px; margin: 0 auto; }
  .kx-eco-grid { grid-template-columns: repeat(2, 1fr); }
  .kx-footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .kx-final-cta { padding: 60px 28px; }
}

@media (max-width: 640px) {
  .kx-section { padding: 68px 0; }
  .kx-section-tight { padding: 56px 0; }
  .kx-container { padding: 0 18px; }
  .kx-section-head { margin-bottom: 40px; }
  .kx-hero { padding: calc(var(--nav-h) + 22px) 0 52px; }
  .kx-hero .kx-hero-ctas {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
  }
  .kx-hero .kx-hero-ctas .kx-btn {
    width: auto;
    flex: 0 1 auto;
    padding: 12px 16px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  .kx-final-cta .kx-hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .kx-final-cta .kx-hero-ctas .kx-btn { width: 100%; }
  .kx-hero-badges { gap: 8px; margin-top: 22px; }
  .kx-hero-badge { font-size: 11px; padding: 6px 12px; }
  .kx-philosophy-visual { max-width: 330px; }
  .kx-pillar-grid { grid-template-columns: 1fr; gap: 16px; }
  .kx-pillar { padding: 26px 22px; }
  .kx-mbg-card { padding: 32px 22px; }
  .kx-eco-grid { grid-template-columns: 1fr; }
  .kx-eco-card { padding: 20px 18px; }
  .kx-rank-metrics { gap: 14px; }
  .kx-rank-card { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
  .kx-rank-name { font-size: 17px; }
  .kx-dao-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kx-final-cta { padding: 48px 22px; border-radius: 24px; }
  .kx-final-cta .kx-hero-ctas { max-width: 320px; margin: 28px auto 0; }
  .kx-footer { padding: 52px 0 26px; }
  .kx-footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .kx-nav-inner { padding: 0 16px; }
  .kx-logo-img { height: 30px; }
}

@media (max-width: 420px) {
  .kx-h1 { font-size: clamp(2.05rem, 9.5vw, 2.5rem); line-height: 1.06; }
  .kx-eyebrow { font-size: 10.5px; padding: 6px 12px; }
  .kx-hero .kx-hero-ctas { gap: 8px; }
  .kx-hero .kx-hero-ctas .kx-btn { padding: 11px 12px; font-size: 13px; }
  .kx-lock-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kx-lock-card { padding: 24px 14px 20px; }
  .kx-dao-facts { grid-template-columns: 1fr; }
  .kx-node span { display: none; }
}

/* ─────────────────────────  Reduced motion  ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .kx-nebula-blob,
  .kx-orbit-1, .kx-orbit-2, .kx-orbit-3,
  .kx-coin-visual,
  .kx-coin-glow,
  .kx-orbit-ring-a, .kx-orbit-ring-b,
  .kx-spoke,
  .kx-flow-dot,
  .kx-node,
  .kx-node-center,
  .kx-node-center-ring,
  .kx-final-cta-orb {
    animation: none !important;
  }
  .kx-flow-dot { display: none; }
  .kx-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PREMIUM LAYER
   3D hero stage, aurora + grain depth, cinematic type, marquee, spotlight
   cards, lock terms. Appended last so it wins over the base rules; carries
   its own responsive and reduced-motion overrides.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Three.js hero stage ─────────────────────────────────────────────── */
.kx-coin-stage { width: min(100%, 560px); }
#kxHero3d {
  position: absolute;
  inset: -14%;
  z-index: 2;
}
#kxHero3d canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
/* Once WebGL mounts, the flat coin/orbits step aside for the 3D scene. */
.kx-coin-stage.kx-3d-on .kx-orbit,
.kx-coin-stage.kx-3d-on .kx-coin-glow,
.kx-coin-stage.kx-3d-on .kx-coin-visual {
  opacity: 0;
  visibility: hidden;
}
/* ── Page-wide WebGL space field ─────────────────────────────────────── */
#kxSpace {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#kxSpace canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
/* With the 3D field live, the 2D starfield and the large CSS colour blobs
   are redundant — stacking their blur on top of the WebGL nebulae is what
   produced a flat coloured "stain" instead of a starfield. Let the 3D
   scene own all of the nebula colour; CSS keeps only the vignette/grid. */
body.kx-space-on #kxStarfield { display: none; }
body.kx-space-on .kx-nebula-blob { opacity: 0.05; }
body.kx-space-on .kx-aurora { display: none; }

/* ── Ambient depth: aurora beams + film grain ────────────────────────── */
.kx-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.kx-aurora span {
  position: absolute;
  display: block;
  width: 62vw;
  height: 130vh;
  top: -40vh;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  transform-origin: 50% 0;
}
.kx-aurora span:nth-child(1) {
  left: -10vw;
  background: linear-gradient(180deg, rgb(168 85 247 / 0.5), transparent 62%);
  animation: kx-beam-1 22s ease-in-out infinite;
}
.kx-aurora span:nth-child(2) {
  right: -14vw;
  background: linear-gradient(180deg, rgb(240 193 75 / 0.32), transparent 58%);
  animation: kx-beam-2 28s ease-in-out infinite;
}
.kx-aurora span:nth-child(3) {
  left: 32vw;
  width: 34vw;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.14), transparent 52%);
  animation: kx-beam-3 34s ease-in-out infinite;
}
@keyframes kx-beam-1 { 0%,100% { transform: rotate(-14deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(4vh); } }
@keyframes kx-beam-2 { 0%,100% { transform: rotate(12deg) translateY(2vh); } 50% { transform: rotate(4deg) translateY(-3vh); } }
@keyframes kx-beam-3 { 0%,100% { transform: rotate(3deg) scaleY(1); opacity: 0.28; } 50% { transform: rotate(-3deg) scaleY(1.1); opacity: 0.46; } }

.kx-noise {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vignette so cinematic sections hold the eye toward the centre */
.kx-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 42%, rgb(0 0 0 / 0.55) 100%);
}

/* ── Scroll progress rail in the navbar ──────────────────────────────── */
.kx-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold) 70%, #fff);
  box-shadow: 0 0 12px rgb(168 85 247 / 0.8);
}

/* ── Cinematic typography ────────────────────────────────────────────── */
.kx-h1 {
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.kx-h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  letter-spacing: -0.03em;
}
.kx-display-line {
  display: block;
}
.kx-outline-text {
  color: transparent;
  -webkit-text-stroke: 1.4px rgb(255 255 255 / 0.42);
}
/* Slow sheen travelling across gradient headlines */
.kx-gradient-text {
  background: linear-gradient(100deg, #f6ecff 0%, var(--color-primary) 26%, #ffe9b0 52%, var(--color-primary) 74%, #f6ecff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: kx-sheen 9s ease-in-out infinite;
}
@keyframes kx-sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.kx-sec-index {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: rgb(240 193 75 / 0.6);
  margin-bottom: 14px;
}
.kx-watermark {
  position: absolute;
  top: 8px;
  right: 20px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 92px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / 0.07);
  pointer-events: none;
  user-select: none;
}

/* ── Surfaces: gradient hairline + cursor spotlight ──────────────────── */
/* Gradient hairline drawn as a masked ring. Gated behind @supports because
   without mask-composite the pseudo-element would veil the card content. */
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .kx-lux::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgb(240 193 75 / 0.8), rgb(168 85 247 / 0.55) 42%, rgb(255 255 255 / 0.05) 72%);
    -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;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.35s ease;
  }
  .kx-lux:hover::before { opacity: 1; }
}

.kx-spot { overflow: hidden; }
.kx-spot > .kx-spot-light {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgb(168 85 247 / 0.18), transparent 68%);
}
.kx-spot:hover > .kx-spot-light { opacity: 1; }

/* Sweeping highlight on the primary CTA */
.kx-btn-primary { position: relative; overflow: hidden; }
.kx-btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.42), transparent);
  transform: skewX(-18deg);
  animation: kx-sweep 5.5s ease-in-out infinite;
}
@keyframes kx-sweep { 0%, 68% { left: -120%; } 100% { left: 140%; } }

/* ── Hero polish ─────────────────────────────────────────────────────── */
.kx-hero { min-height: 100svh; }
.kx-hero::before {
  content: '';
  position: absolute;
  top: -18%;
  left: 50%;
  width: 120vw;
  height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgb(168 85 247 / 0.2), transparent 70%);
  pointer-events: none;
}
.kx-hero-badge {
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.kx-hero-badge:hover {
  border-color: rgb(240 193 75 / 0.55);
  color: var(--color-ink);
  background: rgb(240 193 75 / 0.08);
}
.kx-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgb(163 171 196 / 0.75);
}
.kx-scroll-cue i {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, rgb(240 193 75 / 0.9), transparent);
  animation: kx-cue 2.4s ease-in-out infinite;
}
@keyframes kx-cue { 0%,100% { opacity: 0.25; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ── Protocol marquee ────────────────────────────────────────────────── */
.kx-ticker {
  position: relative;
  border-top: 1px solid rgb(255 255 255 / 0.07);
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  background: linear-gradient(90deg, rgb(168 85 247 / 0.07), rgb(240 193 75 / 0.05));
  overflow: hidden;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.kx-ticker-track {
  display: flex;
  align-items: center;
  gap: 54px;
  width: max-content;
  animation: kx-marquee 34s linear infinite;
}
.kx-ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
  white-space: nowrap;
}
.kx-ticker-item svg { width: 16px; height: 16px; color: var(--color-gold); }
.kx-ticker-item::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgb(240 193 75 / 0.6);
}
@keyframes kx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Section rhythm: bands + hairline dividers ───────────────────────── */
.kx-band {
  border-top: 1px solid rgb(255 255 255 / 0.06);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  background:
    radial-gradient(80% 60% at 50% 0%, rgb(168 85 247 / 0.1), transparent 70%),
    linear-gradient(180deg, rgb(255 255 255 / 0.018), transparent);
}
.kx-divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgb(240 193 75 / 0.45), rgb(168 85 247 / 0.45), transparent);
  opacity: 0.7;
}

/* ── Mechanism cards (MINT / BURN / GROW) ────────────────────────────── */
.kx-mbg-card { overflow: hidden; }
.kx-mbg-icon {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.kx-mbg-card:hover .kx-mbg-icon { transform: translateY(-4px) scale(1.06); }
.kx-mbg-stat {
  background: rgb(255 255 255 / 0.04);
  border-color: rgb(240 193 75 / 0.28) !important;
}

/* ── Rank ladder: three qualification metrics ────────────────────────── */
.kx-rank-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kx-rank-card { overflow: hidden; }
.kx-rank-name {
  background: linear-gradient(120deg, #fff, var(--color-gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kx-rank-desc {
  font-size: 13.5px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 10px;
}

/* ── Supply lock terms (staking, no reward figures) ──────────────────── */
.kx-lock-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.kx-lock-card {
  position: relative;
  padding: 30px 18px 26px;
  text-align: center;
  overflow: hidden;
}
.kx-lock-ring {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(from 180deg, var(--color-gold) calc(var(--pct, 40) * 1%), rgb(255 255 255 / 0.08) 0);
  position: relative;
}
.kx-lock-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: linear-gradient(180deg, #141622, #08090f);
  border: 1px solid rgb(255 255 255 / 0.08);
}
.kx-lock-days {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--color-ink);
}
.kx-lock-days small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 5px;
}
.kx-lock-card p { margin: 0; font-size: 12.5px; }

/* ── Final CTA ───────────────────────────────────────────────────────── */
.kx-final-cta {
  position: relative;
  overflow: hidden;
}
.kx-final-cta::after {
  content: '';
  position: absolute;
  inset: -40% -10% auto;
  height: 70%;
  background: radial-gradient(50% 60% at 50% 50%, rgb(240 193 75 / 0.16), transparent 70%);
  pointer-events: none;
}

/* ── Responsive (premium layer) ──────────────────────────────────────── */
@media (max-width: 991px) {
  .kx-coin-stage { width: min(72vw, 340px); }
  .kx-lock-grid { grid-template-columns: repeat(3, 1fr); }
  .kx-watermark { font-size: 74px; }
  .kx-scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .kx-coin-stage { width: min(64vw, 260px); }
  .kx-lock-grid { grid-template-columns: repeat(2, 1fr); }
  .kx-rank-metrics { grid-template-columns: 1fr 1fr; }
  .kx-ticker-item { font-size: 12.5px; }
  .kx-ticker-track { gap: 34px; animation-duration: 26s; }
  .kx-watermark { font-size: 46px; top: 14px; right: 16px; }
  /* The nebulae already carry the colour on small screens; skip the extra
     large-radius blurs and the grain to keep mobile compositing cheap. */
  .kx-aurora,
  .kx-noise { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kx-aurora span,
  .kx-gradient-text,
  .kx-ticker-track,
  .kx-scroll-cue i,
  .kx-mbg-connector svg,
  .kx-mbg-loop svg,
  .kx-btn-primary::after {
    animation: none !important;
  }
  .kx-progress { transition: none !important; }
}
