/* ===========================================================
   MongoDB Analytics Studio — Website
   Theme: dark, modern, MongoDB green + AI purple accents
   =========================================================== */

:root {
  --bg: #07090F;
  --bg-2: #0B0F1A;
  --surface: #111827;
  --surface-2: #161E2E;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #F4F6FB;
  --text-muted: #9AA3B2;
  --text-dim: #6B7280;

  --primary: #00ED64;
  --primary-2: #00C95A;
  --primary-dark: #00684A;
  --accent: #8B5CF6;
  --accent-2: #6366F1;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 80px rgba(0, 237, 100, 0.18);

  --max-w: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(0, 237, 100, 0.10), transparent 60%),
    radial-gradient(800px 500px at 95% 5%, rgba(139, 92, 246, 0.12), transparent 65%),
    radial-gradient(600px 400px at 50% 110%, rgba(99, 102, 241, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-2); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===================== Typography ===================== */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); margin: 0 0 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 237, 100, 0.06);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

.gradient-text {
  background: linear-gradient(135deg, #00ED64 0%, #8B5CF6 70%, #6366F1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== Header / Nav ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(7, 9, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand .brand-name { letter-spacing: -0.01em; }
.brand .brand-tag {
  font-size: .68rem;
  color: var(--primary);
  background: rgba(0, 237, 100, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--primary);
  color: #07090F !important;
  font-weight: 600;
  border-radius: 100px;
  font-size: 0.9rem;
  transition: transform .15s ease, box-shadow .2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 237, 100, 0.3); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #07090F;
  box-shadow: 0 8px 24px rgba(0, 237, 100, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 237, 100, 0.35);
  color: #07090F;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

/* ===================== Sections ===================== */
section { padding: 90px 0; position: relative; z-index: 1; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: 1.05rem; }

/* ===================== Hero ===================== */
.hero {
  padding: 90px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 { margin-top: 24px; }
.hero h1 span { display: inline-block; }
.hero .lead {
  max-width: 700px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
  color: var(--text-muted);
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-mockup-wrap {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 8px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-mockup {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #0E1422 0%, #0A0E1A 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    var(--shadow-glow);
}
.hero-mockup img,
.hero-mockup svg { display: block; width: 100%; height: auto; }

/* Floating chips around hero */
.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 100px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: chipFloat 7s ease-in-out infinite;
}
.float-chip .ico { width: 16px; height: 16px; }
.float-chip.c1 { top: 14%; left: -2%; animation-delay: 0s; }
.float-chip.c2 { top: 30%; right: -2%; animation-delay: 1.5s; }
.float-chip.c3 { bottom: 18%; left: 2%; animation-delay: 3s; }
.float-chip.c4 { bottom: 8%; right: 4%; animation-delay: 4.5s; }
@keyframes chipFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

/* ===================== Trust strip ===================== */
.trust {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.trust-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

/* ===================== Features ===================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,237,100,0.5), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.feature:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(0,237,100,0.12), rgba(139,92,246,0.12));
  border: 1px solid var(--border-strong);
}
.feature-icon svg { width: 22px; height: 22px; color: var(--primary); }
.feature h3 { margin-bottom: 8px; font-size: 1.12rem; }
.feature p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

/* ===================== How it works ===================== */
.how {
  background: linear-gradient(180deg, transparent, rgba(0,237,100,0.025), transparent);
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
.step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.4);
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0, 237, 100, 0.12);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 237, 100, 0.3);
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; margin: 0; }

/* ===================== Chart types grid ===================== */
.charts {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139,92,246,0.07), transparent),
    transparent;
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.chip {
  text-align: center;
  padding: 16px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.4);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all .2s ease;
  cursor: default;
}
.chip:hover {
  border-color: rgba(0, 237, 100, 0.4);
  color: var(--text);
  background: rgba(0, 237, 100, 0.05);
  transform: translateY(-2px);
}
.chip-ico {
  width: 24px; height: 24px;
  margin: 0 auto 8px;
  color: var(--primary);
}

/* ===================== Code demo ===================== */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 32px;
  align-items: center;
}
.demo-grid .col h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.demo-grid .col ul { list-style: none; padding: 0; margin: 24px 0 0; }
.demo-grid .col ul li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--text-muted);
}
.demo-grid .col ul li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0, 237, 100, 0.15);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.code-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0A0E1A;
  box-shadow: var(--shadow-soft);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.code-head .dot-r { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.code-head .dot-y { width: 10px; height: 10px; border-radius: 50%; background: #FFBD2E; }
.code-head .dot-g { width: 10px; height: 10px; border-radius: 50%; background: #28C940; }
.code-head .file { margin-left: 10px; }

.code-body { padding: 22px 20px; font-family: var(--mono); font-size: 0.85rem; line-height: 1.7; }
.code-body .q {
  color: var(--text);
  font-style: italic;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-left: 2px solid var(--primary);
  background: rgba(0, 237, 100, 0.05);
}
.code-body .label { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 14px; margin-bottom: 8px; }
.code-body pre { margin: 0; color: #C8D3E5; white-space: pre-wrap; }
.code-body .k { color: var(--accent); }
.code-body .s { color: #FBBF24; }
.code-body .n { color: #60A5FA; }
.code-body .c { color: var(--text-dim); }

/* ===================== Safety ===================== */
.safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.safety-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(0,237,100,0.08), transparent),
    rgba(17, 24, 39, 0.6);
}
.safety-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--text); }
.safety-card .rules { list-style: none; padding: 0; margin: 0; }
.safety-card .rules li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--border);
  font-size: 0.92rem;
}
.safety-card .rules li:first-child { border-top: 0; }
.safety-card .rules .tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 80, 80, 0.1);
  color: #FF8A8A;
  border: 1px solid rgba(255, 80, 80, 0.25);
}
.safety-card .rules .tag.ok {
  background: rgba(0, 237, 100, 0.08);
  color: var(--primary);
  border-color: rgba(0, 237, 100, 0.25);
}

/* ===================== FAQ ===================== */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: rgba(17, 24, 39, 0.4);
  overflow: hidden;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: rgba(0, 237, 100, 0.3); }
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform .25s ease;
  font-weight: 300;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 22px 18px; color: var(--text-muted); font-size: 0.95rem; }

/* ===================== CTA banner ===================== */
.cta-banner {
  padding: 70px 0;
}
.cta-card {
  text-align: center;
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 237, 100, 0.25);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(0,237,100,0.15), transparent 70%),
    radial-gradient(400px 200px at 90% 100%, rgba(139,92,246,0.15), transparent 70%),
    rgba(11, 15, 26, 0.6);
  position: relative;
  overflow: hidden;
}
.cta-card h2 { margin-bottom: 12px; }
.cta-card p { font-size: 1.05rem; margin-bottom: 28px; }

/* ===================== Footer ===================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  background: rgba(7, 9, 15, 0.6);
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 36px;
}
.footer-grid h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-grid ul li a:hover { color: var(--primary); }
.footer-grid .about p { font-size: 0.92rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================== Legal pages ===================== */
.legal-hero {
  padding: 80px 0 40px;
  text-align: center;
}
.legal-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.legal-hero .meta {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.legal {
  padding: 30px 0 80px;
}
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 56px;
}
.legal-wrap h2 {
  font-size: 1.4rem;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.legal-wrap h2:first-child { margin-top: 0; }
.legal-wrap h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-top: 22px;
  margin-bottom: 8px;
}
.legal-wrap p, .legal-wrap li {
  color: var(--text-muted);
  font-size: 0.97rem;
}
.legal-wrap ul, .legal-wrap ol { padding-left: 22px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-wrap strong { color: var(--text); font-weight: 600; }
.legal-wrap a { color: var(--primary); }
.legal-wrap .callout {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  background: rgba(0, 237, 100, 0.06);
  color: var(--text);
  font-size: 0.95rem;
}

/* ===================== Reveal on scroll ===================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== Responsive ===================== */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: repeat(4, 1fr); }
  .demo-grid, .safety-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-wrap { padding: 32px 24px; }
  .float-chip { display: none; }
}
@media (max-width: 640px) {
  section { padding: 70px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 9, 15, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .nav-links .nav-cta { margin-top: 12px; }
  .nav-toggle { display: inline-flex; }
}
