/* babianai.com — Clerk-inspired purple-black identity SaaS theme */
:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #16161f;
  --bg-card: #1a1a26;
  --bg-card-hover: #1e1e2e;
  --purple-1: #6c47ff;
  --purple-2: #8b6dff;
  --purple-3: #a98bff;
  --purple-glow: rgba(108, 71, 255, 0.25);
  --purple-border: rgba(108, 71, 255, 0.35);
  --white: #ffffff;
  --white-80: rgba(255,255,255,0.80);
  --white-60: rgba(255,255,255,0.60);
  --white-40: rgba(255,255,255,0.40);
  --white-15: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.12);
  --text: #e8e8f0;
  --text-muted: #9090aa;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Noise texture overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p { color: var(--white-80); line-height: 1.7; }
a { color: inherit; text-decoration: none; }

.gradient-text {
  background: linear-gradient(135deg, var(--purple-3) 0%, var(--white) 55%, var(--purple-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Layout ---- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; z-index: 1; }

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo svg { width: 36px; height: 36px; }

.nav-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 7px 14px;
  font-size: 0.9rem;
  color: var(--white-60);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--white);
  background: var(--white-15);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-ghost {
  background: transparent;
  color: var(--white-80);
  border: 1px solid var(--border-2);
}

.btn-ghost:hover {
  background: var(--white-15);
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}

.btn-primary {
  background: var(--purple-1);
  color: var(--white);
  box-shadow: 0 0 24px rgba(108, 71, 255, 0.35);
}

.btn-primary:hover {
  background: var(--purple-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 32px rgba(108, 71, 255, 0.5);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white-80);
  border: 1px solid var(--border-2);
}

.btn-outline:hover {
  border-color: var(--purple-border);
  color: var(--white);
  background: rgba(108,71,255,0.08);
}

/* ---- Hero ---- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(108,71,255,0.12);
  border: 1px solid var(--purple-border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-3);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 7px; height: 7px;
  background: var(--purple-2);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 { margin-bottom: 22px; }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--white-60);
  max-width: 580px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 68px;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--white-40);
}

.hero-trust-dot { color: var(--purple-3); font-size: 1rem; }

/* ---- Product UI preview ---- */
.hero-preview {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
}

.hero-preview::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(108,71,255,0.28) 0%, transparent 70%);
  pointer-events: none;
}

.preview-frame {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.preview-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.preview-dot:nth-child(1) { background: #ff5f57; }
.preview-dot:nth-child(2) { background: #febc2e; }
.preview-dot:nth-child(3) { background: #28c840; }

.preview-url {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--white-40);
  background: rgba(255,255,255,0.04);
  padding: 4px 12px;
  border-radius: 6px;
  max-width: 260px;
  margin: 0 auto;
}

.preview-body {
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 260px;
}

.preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.preview-panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white-40);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.preview-stat {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.preview-stat-label {
  font-size: 0.78rem;
  color: var(--white-40);
}

.preview-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 52px;
  margin-top: 14px;
}

.preview-bar-item {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--purple-1), var(--purple-3));
  opacity: 0.7;
  min-height: 8px;
}

.preview-list { list-style: none; }

.preview-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.preview-list li:last-child { border-bottom: none; }

.preview-icon-sm {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--purple-1), var(--purple-3));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
}

.preview-pill {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.preview-pill.up { background: rgba(40,200,120,0.15); color: #4ade80; }
.preview-pill.neutral { background: rgba(255,255,255,0.08); color: var(--white-60); }

/* ---- Logos band ---- */
.logos-band {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos-band-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--white-40);
  margin-bottom: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.logos-row .logo-item {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white-40);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.logos-row .logo-item:hover { color: var(--white-80); }

/* ---- Features grid ---- */
.features {
  padding: 100px 0;
}

.section-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(108,71,255,0.1);
  border: 1px solid var(--purple-border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-3);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header p {
  max-width: 520px;
  margin: 14px auto 0;
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--purple-border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.feature-icon-purple { background: linear-gradient(135deg, rgba(108,71,255,0.3), rgba(139,109,255,0.15)); border: 1px solid var(--purple-border); }
.feature-icon-blue { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(99,155,255,0.15)); border: 1px solid rgba(59,130,246,0.3); }
.feature-icon-green { background: linear-gradient(135deg, rgba(40,200,120,0.3), rgba(74,222,128,0.15)); border: 1px solid rgba(40,200,120,0.3); }
.feature-icon-amber { background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(251,191,36,0.15)); border: 1px solid rgba(245,158,11,0.3); }
.feature-icon-pink { background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(249,168,212,0.15)); border: 1px solid rgba(236,72,153,0.3); }
.feature-icon-cyan { background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(103,232,249,0.15)); border: 1px solid rgba(6,182,212,0.3); }

.feature-card h3 { margin-bottom: 10px; font-size: 1.05rem; color: var(--white); }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ---- Stats strip ---- */
.stats-strip {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(108,71,255,0.06) 0%, transparent 50%, rgba(108,71,255,0.04) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-item .stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--white) 0%, var(--purple-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-item .stat-desc {
  font-size: 0.9rem;
  color: var(--white-60);
}

/* ---- Platform section ---- */
.platform {
  padding: 100px 0;
}

.platform-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.platform-text .section-tag { margin-bottom: 16px; }
.platform-text h2 { margin-bottom: 18px; }
.platform-text p { margin-bottom: 28px; }

.platform-list { list-style: none; }

.platform-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--white-80);
}

.platform-list li:last-child { border-bottom: none; }

.platform-check {
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--purple-1), var(--purple-3));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  margin-top: 2px;
}

.platform-visual {
  position: relative;
}

.platform-card-stack {
  position: relative;
  height: 380px;
}

.p-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.p-card-main {
  top: 0; left: 0; right: 0;
  z-index: 3;
}

.p-card-2 {
  top: 100px; left: -20px; right: -20px;
  z-index: 2;
  opacity: 0.7;
}

.p-card-3 {
  top: 200px; left: -40px; right: -40px;
  z-index: 1;
  opacity: 0.4;
}

.p-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white-40);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.p-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.p-card-change { font-size: 0.82rem; color: #4ade80; margin-top: 4px; }

.p-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.85rem;
  color: var(--white-80);
  border-bottom: 1px solid var(--border);
}

.p-row:last-child { border-bottom: none; }
.p-row-name { color: var(--white-60); }
.p-row-val { font-weight: 600; color: var(--white); }

/* ---- Security section ---- */
.security {
  padding: 100px 0;
  background: var(--bg-2);
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.security-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}

.sec-card:hover { border-color: var(--purple-border); }

.sec-card-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.sec-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.sec-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.security-text .section-tag { margin-bottom: 16px; }
.security-text h2 { margin-bottom: 18px; }
.security-text p { margin-bottom: 20px; font-size: 0.95rem; }

/* ---- Download section ---- */
.download-sec {
  padding: 100px 0;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.dl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: all var(--transition);
}

.dl-card:hover {
  border-color: var(--purple-border);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(108,71,255,0.15);
}

.dl-card-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.dl-card h3 {
  color: var(--white);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.dl-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.dl-card .btn { width: 100%; }

/* ---- CTA banner ---- */
.cta-banner {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(108,71,255,0.2) 0%, transparent 65%);
  pointer-events: none;
}

.cta-banner h2 { margin-bottom: 18px; }
.cta-banner p { font-size: 1.05rem; max-width: 480px; margin: 0 auto 36px; }

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--white-40);
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--white-40);
  margin: 14px 0 20px;
  max-width: 240px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--white-15);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--white-60);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.social-btn:hover {
  background: rgba(108,71,255,0.15);
  border-color: var(--purple-border);
  color: var(--white);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--white-40);
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--white-80); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--white-40);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 0.82rem;
  color: var(--white-40);
  transition: color var(--transition);
}

.footer-legal a:hover { color: var(--white-60); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-inner { grid-template-columns: 1fr; gap: 50px; }
  .security-grid { grid-template-columns: 1fr; }
  .security-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 72px 0 60px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; max-width: 340px; margin: 0 auto; }
  .preview-body { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .features-grid { grid-template-columns: 1fr; }
  .download-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .platform-card-stack { height: 280px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .security-visual { grid-template-columns: 1fr; }
  .logos-row { gap: 28px; }
  .hero-trust { flex-wrap: wrap; justify-content: center; }
}
