/* ─── TOKENS ─── */
:root {
  --bg:          #030305;
  --bg-elevated: #0a0a0f;
  --bg-card:     #0f0f14;
  --bg-hover:    #161620;
  --border:      #1a1a24;
  --border-sub:  #12121a;

  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,0.15);
  --purple-dim2: rgba(167,139,250,0.07);
  --brand:       #5B3D9B;

  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-dim:    #475569;

  --font:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', monospace;
}

/* ─── SCROLLBAR ─── */
html { scrollbar-color: var(--purple) var(--bg-elevated); scrollbar-width: thin; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { opacity: 0.8; }

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ─── CANVAS ─── */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── NAV ─── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(3,3,5,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.nav-logo-name {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, var(--purple), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  padding: 5px 14px;
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 6px;
  background: var(--purple-dim2);
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
}
.nav-cta:hover {
  background: var(--purple-dim);
  border-color: rgba(167,139,250,0.5);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 52px 2rem 8vh;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 100%);
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(91,61,155,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-dim2);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 4px 14px;
  border-radius: 99px;
}

.hero-headline {
  font-size: clamp(1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, #e8e3f8 0%, #c084fc 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  text-decoration: none;
  transition: opacity 0.15s, opacity 0.4s;
}
.hero-scroll:hover { opacity: 0.7; }
.hero-scroll.is-hidden { opacity: 0; pointer-events: none; }

/* ─── PRODUCTS SHELL ─── */
.products-shell {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 0 80px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
}

.back-top {
  color: var(--purple);
  text-decoration: none;
  transition: opacity 0.15s;
}
.back-top:hover { opacity: 0.7; }

/* ─── PRODUCT CARD ─── */
.product-card {
  background: var(--bg-card);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(91,61,155,0.10);
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
}

.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 28px 32px 22px;
  border-bottom: 1px solid var(--border-sub);
}

.product-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 3px;
}

.product-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
}

.product-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.badge-teal    { background: var(--purple-dim);   color: var(--purple); }
.badge-purple  { background: var(--purple-dim); color: var(--purple); }
.badge-launch  { background: rgba(245,158,11,0.1); color: #d97706; }

.product-body {
  padding: 28px 32px 32px;
}

.product-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 680px;
  margin-bottom: 10px;
}

.capability-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
  list-style: none;
  margin-bottom: 12px;
}
.capability-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 2;
  padding-left: 1em;
  position: relative;
}
.capability-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
}

.product-validation {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.product-validation:last-of-type {
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

/* ─── STATS ─── */
.stat-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.stat-item {
  flex: 1;
  padding: 18px 24px;
  text-align: center;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 5px;
}
.stat-num.mono { font-family: var(--mono); font-size: 0.9rem; }

.stat-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─── PATHS ─── */
.path-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.path-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.path-oss .path-label  { color: var(--purple); }
.path-commercial .path-label { color: var(--purple); }

.path-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.path-cta {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.path-cta:hover { opacity: 0.75; }
.path-oss .path-cta        { color: var(--purple); }
.path-commercial .path-cta { color: var(--purple); }

.path-consulting .path-label { color: var(--purple); }
.path-consulting .path-cta   { color: var(--purple); }

/* ─── FOOTER ─── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, var(--purple), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-legal {
  font-size: 0.72rem;
  color: var(--text-dim);
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--purple);
  text-decoration: none;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
}
.footer-links a:hover { opacity: 0.7; }

/* ─── RESPONSIVE ─── */

/* Tablet */
@media (max-width: 768px) {
  .container { padding: 0 32px; }
  .products-shell { padding: 56px 0 64px; }
}

/* Mobile */
@media (max-width: 640px) {
  .top-nav { padding: 0 1.25rem; }

  .container { padding: 0 24px; }

  .hero { padding: 52px 1.25rem 8vh; }
  .hero-inner { gap: 1rem; }
  .hero-eyebrow {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .products-shell { padding: 40px 0 48px; }

  .hero-headline { font-size: clamp(1.5rem, 5vw, 2rem); }

  .product-header { flex-direction: column; gap: 12px; padding: 20px 18px 16px; }
  .product-body { padding: 18px 18px 22px; }
  .product-desc { font-size: 0.88rem; }
  .product-validation { font-size: 0.72rem; }

  .stat-row { flex-wrap: wrap; }
  .stat-item { flex: 0 0 50%; min-width: 0; padding: 14px 12px; }
  .stat-divider { display: none; }

  .capability-list { grid-template-columns: 1fr; }

  .path-row { grid-template-columns: 1fr; }

  .footer-links { gap: 1rem; }
}

/* Very small screens */
@media (max-width: 420px) {
  .nav-logo-name { letter-spacing: 0.08em; }
  .nav-cta { padding: 4px 10px; font-size: 0.72rem; }
  .stat-item { flex: 0 0 100%; }
  .footer-legal { display: none; }
}
