/* ═══════════════════════════════════════════════════════════════════════════
   DataSparkX — Shared Design System
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --bg:        #05080f;
  --surface:   #0d1220;
  --surface2:  #111827;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  /* --primary:   #6c63ff;
  --primary2:  #8b85ff;
  --accent:    #00d4aa;
  --accent2:   #00f2c4; */
  --primary: #ee4444;
  --primary2: #ff6b6b;
  --accent: #ffb347;
  --accent2: #ffd280;
  --orange:    #f97316;
  --text:      #e8eaf2;
  --muted:     #8892a4;
  --heading:   #ffffff;
  --red:        #ff5f57;
  --r-xs: 6px; --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px;
  --glow: 0 0 60px rgba(108,99,255,0.18);
  --shadow: 0 20px 50px rgba(0,0,0,0.35);
  --primary-dark: #d90429;
  --accent-warm: #ff8c42;
  --primary-rgb: 238, 68, 68;
  --accent-rgb: 255, 179, 71;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--heading);
  line-height: 1.12;
}

a { color: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Gradient text ──────────────────────────────────────────────────────────── */
.grad {
  background: linear-gradient(135deg, var(--primary2) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-orange {
  background: linear-gradient(135deg, var(--orange) 0%, #f43f5e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Badge ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.28);
  color: var(--primary2); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 99px;
}
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); display: block;
  animation: pulse 2s infinite;
}
.badge-accent {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--accent);
}
.badge-accent::before { background: var(--accent); }
.badge-orange { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.28); color: var(--orange); }
.badge-orange::before { background: var(--orange); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.95rem;
  padding: 13px 28px; border-radius: var(--r-sm); border: none;
  cursor: pointer; text-decoration: none; transition: all 0.22s ease;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,0); transition:background 0.2s; }
.btn:hover::after { background:rgba(255,255,255,0.06); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 4px 24px rgba(var(--primary-rgb), 0.4);
}
.btn-primary:hover { transform:translateY(-2px); box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.55); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--bg); box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.35); font-weight:700;
}
.btn-accent:hover { transform:translateY(-2px); box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.5); }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--primary); color:#fff; transform:translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }

.btn-red {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 4px 24px rgba(var(--primary-rgb), 0.4);
}
.btn-red:hover {
  transform:translateY(-2px); box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.55);
}

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }

/* ── Card base ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 32px;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.card:hover { border-color: rgba(108,99,255,0.25); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-top-line::before {
  content: ''; position: absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s;
}
.card-top-line:hover::before { transform: scaleX(1); }

/* ── Section shared ──────────────────────────────────────────────────────────── */
.section-badge { margin-bottom: 20px; }
.section-h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px;
}
.section-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.75; max-width: 560px; }
.section-lead-center { max-width: 600px; margin-inline: auto; text-align: center; }

/* ── Divider ─────────────────────────────────────────────────────────────────── */
hr.rule { border: none; border-top: 1px solid var(--border); }

/* ── Dot grid bg ─────────────────────────────────────────────────────────────── */
.dot-grid {
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════════════════════════ */
.site-nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  transition: background 0.3s, border-color 0.3s;
}
.site-nav.scrolled {
  background: rgba(5,8,15,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1160px; margin-inline: auto;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 700;
  color: var(--heading); text-decoration: none; letter-spacing: -0.02em;
}
.nav-logo .logo-accent { color: var(--primary); }
.nav-logo .logo-x     { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color 0.2s; padding: 4px 0;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--primary); transform: scaleX(0);
  transition: transform 0.22s;
}
.nav-links a:hover, .nav-links a.active { color: var(--heading); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; border: none; background: none; padding: 4px;
}
.hamburger span { display:block; width:22px; height:2px; background:var(--text); border-radius:2px; transition:all 0.3s; }

/* Mobile menu overlay */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: var(--bg); flex-direction: column;
  padding: 90px 32px 40px; gap: 0;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn) {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700;
  color: var(--heading); text-decoration: none;
  padding: 18px 0; border-bottom: 1px solid var(--border); display: block;
}
.mobile-menu a:not(.btn):hover { color: var(--primary); }
.mobile-menu .btn {
  margin-top: 28px; text-align: center; justify-content: center;
  border-radius: var(--r-sm) !important;
}
.mobile-close {
  position: absolute; top: 18px; right: 24px;
  background: none; border: none; font-size: 2rem; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 4px 8px;
}
.mobile-close:hover { color: var(--heading); }

/* ══════════════════════════════════════════════════════════════════════════════
   PAGE HERO (inner pages)
══════════════════════════════════════════════════════════════════════════════ */
.page-hero {
  padding: 140px 0 80px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero .dot-grid { position: absolute; inset: 0; pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 20px; }
.page-hero p { font-size: 1.15rem; color: var(--muted); max-width: 580px; line-height: 1.7; }

/* Blobs */
.blob {
  position: absolute; border-radius: 50%; filter: blur(100px);
  opacity: 0.15; pointer-events: none;
  animation: blobFloat 10s ease-in-out infinite alternate;
}
@keyframes blobFloat { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(24px,16px) scale(1.04)} }

/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
.footer-brand p { font-size: 0.875rem; color: var(--muted); margin-top: 12px; max-width: 280px; line-height: 1.7; }
.footer-logo { display: inline-block; margin-bottom: 4px; }
.footer-col h5 {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px;
  font-family: 'Space Grotesk', sans-serif;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.875rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--heading); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 34px; height: 34px; border-radius: var(--r-xs);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; text-decoration: none; color: var(--muted);
  transition: all 0.2s;
}
.social-btn:hover { background: rgba(108,99,255,0.15); border-color: rgba(108,99,255,0.4); color: var(--heading); }

/* ══════════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════════════════════════════════════════ */
.reveal { opacity:0; transform:translateY(24px); transition:opacity 0.55s ease, transform 0.55s ease; }
.reveal.up { opacity:1; transform:translateY(0); }
.reveal-l { opacity:0; transform:translateX(-24px); transition:opacity 0.55s ease, transform 0.55s ease; }
.reveal-l.up { opacity:1; transform:translateX(0); }
.reveal-r { opacity:0; transform:translateX(24px); transition:opacity 0.55s ease, transform 0.55s ease; }
.reveal-r.up { opacity:1; transform:translateX(0); }

/* ══════════════════════════════════════════════════════════════════════════════
   SHARED CTA STRIP
══════════════════════════════════════════════════════════════════════════════ */
.cta-strip {
  padding: 100px 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(108,99,255,0.12) 0%, transparent 70%);
  border-top: 1px solid var(--border); text-align: center;
}
.cta-box {
  max-width: 680px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 60px 48px;
  box-shadow: 0 0 80px rgba(108,99,255,0.1);
  position: relative; overflow: hidden;
}
.cta-box::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.cta-box h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 14px; font-weight:800; }
.cta-box p  { color: var(--muted); margin-bottom: 36px; font-size: 1.05rem; }
.cta-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:14px; }
.cta-note { margin-top:16px; font-size:0.8rem; color:var(--muted); }

/* ══════════════════════════════════════════════════════════════════════════════
   STATS ROW
══════════════════════════════════════════════════════════════════════════════ */
.stats-row {
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 60px 0;
}
.stats-row-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-cell {
  text-align: center; padding: 16px 24px;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 800; display: block;
  background: linear-gradient(135deg, var(--primary2), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1; margin-bottom: 8px;
}
.stat-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row-grid { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(3) { border-top: 1px solid var(--border); }
  .stat-cell:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .cta-box { padding: 40px 24px; }
}
