/* ============================================================
   NextToken — global styles
   ============================================================ */

:root {
  --bg: #080a1a;
  --bg-2: #0c0f24;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --text: #eef1ff;
  --text-dim: #a6acd0;
  --text-mute: #7a80a8;
  --teal: #2ee6c8;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --grad: linear-gradient(120deg, #2ee6c8 0%, #22d3ee 38%, #8b5cf6 74%, #a855f7 100%);
  --grad-soft: linear-gradient(120deg, rgba(46,230,200,.18), rgba(139,92,246,.18));
  --radius: 18px;
  --maxw: 1160px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .btn { font-family: "Space Grotesk", system-ui, sans-serif; }

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

/* ---------- Ambient background ---------- */
.bg-aura {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 55% at 15% 10%, rgba(46, 230, 200, 0.14), transparent 60%),
    radial-gradient(55% 60% at 88% 20%, rgba(168, 85, 247, 0.18), transparent 62%),
    radial-gradient(70% 60% at 50% 100%, rgba(34, 211, 238, 0.10), transparent 65%),
    var(--bg);
}
#tokens-canvas { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.55; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-primary {
  background: var(--grad); color: #05121a;
  box-shadow: 0 10px 30px -8px rgba(46, 230, 200, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(139, 92, 246, 0.55); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }

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

.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal);
  padding: 5px 14px; border: 1px solid rgba(46, 230, 200, 0.28);
  border-radius: 999px; background: rgba(46, 230, 200, 0.06);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  transition: background .25s ease, backdrop-filter .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 10, 26, 0.72); backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.brand-name { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: 4px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  max-width: 900px; margin: 0 auto; padding: 96px 24px 80px; text-align: center;
}
.hero .eyebrow { margin-bottom: 26px; }
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--text-dim);
  max-width: 640px; margin: 0 auto 38px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 58px; }
.hero-stats {
  display: inline-flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center;
  padding: 20px 30px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(8px);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: "Space Grotesk"; font-size: 1.35rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.82rem; color: var(--text-mute); }
.stat-divider { width: 1px; height: 34px; background: var(--border); }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  padding: 30px 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: transform .2s ease, border-color .2s ease, background .2s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
  background: var(--grad); -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 .2s ease;
}
.card:hover { transform: translateY(-5px); background: var(--surface-2); }
.card:hover::before { opacity: 0.6; }
.card-icon { font-size: 2rem; margin-bottom: 16px; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.98rem; }
.section-cta { text-align: center; margin-top: 44px; }

/* ---------- Topics marquee ---------- */
.topics { padding: 40px 0; border-block: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.marquee { display: flex; }
.marquee-track {
  display: flex; gap: 42px; white-space: nowrap; animation: scroll 32s linear infinite;
  padding-right: 42px;
}
.marquee-track span {
  font-family: "Space Grotesk"; font-size: 1.5rem; font-weight: 600; color: var(--text-mute);
  opacity: 0.7; transition: color .2s;
}
.marquee-track span:nth-child(odd) { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: 1; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Products ---------- */
.products-section { padding-block: 90px; }
.products-inner {
  max-width: 760px; margin: 0 auto; text-align: center;
  padding: 56px 40px; border: 1px solid var(--border); border-radius: 28px;
  background: var(--grad-soft); position: relative; overflow: hidden;
}
.products-inner .eyebrow { margin-bottom: 20px; }
.products-inner h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.products-lead { color: var(--text-dim); font-size: 1.08rem; max-width: 560px; margin: 0 auto 40px; }
.pipeline { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.pipeline-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 26px;
  position: relative;
}
.pipeline-item:not(:last-child)::after {
  content: ""; width: 34px; height: 1px; background: var(--border); margin-left: 14px;
}
.pipeline-item .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.pipeline-item.done .dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(46, 230, 200, 0.2); }
.pipeline-item div { text-align: left; display: flex; flex-direction: column; }
.pipeline-item strong { font-family: "Space Grotesk"; font-size: 1rem; font-weight: 600; }
.pipeline-item em { font-style: normal; font-size: 0.8rem; color: var(--text-mute); }

/* ---------- Subscribe ---------- */
.subscribe { max-width: var(--maxw); margin: 0 auto; padding: 60px 24px 90px; }
.subscribe-card {
  max-width: 620px; margin: 0 auto; text-align: center;
  padding: 54px 40px; border: 1px solid var(--border); border-radius: 28px;
  background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.subscribe-logo { width: 74px; height: 74px; border-radius: 18px; margin-bottom: 22px; object-fit: cover; }
.subscribe-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.subscribe-card > p { color: var(--text-dim); margin-bottom: 30px; max-width: 440px; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 44px 24px 60px; text-align: center;
  border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk"; font-size: 1.15rem; font-weight: 700; }
.footer-mark { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.footer-tag { color: var(--text-mute); font-size: 0.9rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-dim); font-size: 0.92rem; transition: color .15s; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { color: var(--text-mute); font-size: 0.85rem; margin-top: 6px; }

/* ---------- Legal / content pages ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 60px 24px 90px; }
.doc-back { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 0.92rem; margin-bottom: 34px; transition: color .15s; }
.doc-back:hover { color: var(--teal); }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 10px; }
.doc .updated { color: var(--text-mute); font-size: 0.88rem; margin-bottom: 40px; }
.doc h2 { font-size: 1.35rem; margin: 38px 0 12px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--text-dim); font-size: 1rem; margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc li { margin-bottom: 8px; }
.doc .lead { font-size: 1.12rem; color: var(--text); margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.open { flex-wrap: wrap; background: rgba(8,10,26,.95); backdrop-filter: blur(14px); }
  .nav.open .nav-links { display: flex; flex-direction: column; width: 100%; gap: 6px; margin: 8px 0 0; order: 3; }
  .nav.open .nav-links a { padding: 10px 4px; border-top: 1px solid var(--border); }
  .nav.open .nav-cta { display: inline-flex; width: 100%; order: 4; margin-top: 8px; }
  .cards { grid-template-columns: 1fr; }
  .pipeline-item:not(:last-child)::after { display: none; }
  .hero-stats { gap: 18px; padding: 18px 22px; }
  .stat-divider { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  html { scroll-behavior: auto; }
}
