/* ─────────────────────────────────────────────────────────
   BrainMetrix marketing site — dark, modern, indigo accent
   ───────────────────────────────────────────────────────── */

:root {
  --brand:        #6366f1;
  --brand-light:  #818cf8;
  --brand-dark:   #4f46e5;
  --brand-glow:   rgba(99, 102, 241, 0.45);

  --bg:           #070b1a;
  --bg-2:         #0b1024;
  --surface:      #0f172a;
  --surface-2:    #111a33;
  --surface-3:    #1c2547;
  --border:       rgba(148, 163, 184, 0.14);
  --border-2:     rgba(148, 163, 184, 0.22);

  --text:         #e8ecf5;
  --text-dim:     #9aa6c0;
  --text-muted:   #6b7693;

  --success:      #22c55e;
  --warn:         #f59e0b;
  --danger:       #ef4444;

  --radius:       14px;
  --radius-lg:    20px;
  --max-w:        1180px;

  --shadow-soft:  0 10px 40px -10px rgba(0,0,0,0.55);
  --shadow-glow:  0 0 0 1px rgba(129,140,248,0.18), 0 20px 80px -20px rgba(99,102,241,0.35);

  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ─── Reset / base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-light); text-decoration: none; transition: color .15s ease; }
a:hover { color: #b6c0fb; }
code { font-family: var(--font-mono); font-size: 0.85em; background: rgba(129,140,248,0.08); color: var(--brand-light); padding: 0.1em 0.4em; border-radius: 5px; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ─── Background mesh ─── */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(900px  500px at  -5% 10%, rgba(129,140,248,0.12), transparent 55%),
    radial-gradient(1200px 800px at 50% 110%, rgba(79,70,229,0.18), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; }
.orb-a { width: 480px; height: 480px; top: -120px; right: -80px;  background: #6366f1; }
.orb-b { width: 380px; height: 380px; top: 40%;    left: -120px; background: #4f46e5; }
.orb-c { width: 420px; height: 420px; bottom: -160px; right: 30%; background: #7c3aed; opacity: 0.25; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  background: rgba(7, 11, 26, 0.65);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 6px 20px -6px var(--brand-glow);
}
.brand-mark.small { width: 22px; height: 22px; border-radius: 6px; }
.brand-wordmark { line-height: 1; }
.brand-wordmark.small { font-size: 1rem; }
.brand-accent { color: var(--brand-light); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { padding: 8px 14px; font-size: 0.85rem; }

.nav-toggle {
  display: none; width: 40px; height: 36px; background: transparent; border: 1px solid var(--border-2);
  border-radius: 8px; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: all .2s ease; }

@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; align-items: stretch; padding: 16px 24px; background: rgba(11, 16, 36, 0.96); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-block; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; user-select: none;
}
.btn-primary { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; box-shadow: 0 12px 30px -10px var(--brand-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 40px -10px var(--brand-glow); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--brand-light); color: var(--text); background: rgba(129,140,248,0.06); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(129,140,248,0.10); color: var(--text); }

/* ─── Type ─── */
.eyebrow {
  font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.75rem; font-weight: 600; color: var(--brand-light); margin: 0 0 14px;
}
.display {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.4rem, 5.0vw, 4.2rem); line-height: 1.05; letter-spacing: -0.01em;
  margin: 0 0 22px; color: var(--text);
}
.h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.15; letter-spacing: -0.005em;
  margin: 0 0 18px; color: var(--text);
}
.grad-text {
  background: linear-gradient(120deg, var(--brand-light) 0%, #c4b5fd 50%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede, .section-lede {
  font-size: 1.08rem; color: var(--text-dim); margin: 0 0 28px; max-width: 60ch;
}
.section-lede { margin: 0 auto 40px; text-align: center; max-width: 68ch; }

/* ─── Sections ─── */
.section { padding: 110px 0; position: relative; }
.section-alt { background:
  linear-gradient(180deg, transparent 0%, rgba(15,23,42,0.55) 30%, rgba(15,23,42,0.55) 70%, transparent 100%);
}
.section-head { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.section-head .eyebrow { display: block; }

/* ─── Hero ─── */
.hero { padding: 120px 0 90px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 40px; align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 80px 0 60px; }
}
.hero-copy .lede { font-size: 1.15rem; color: var(--text-dim); margin: 0 0 32px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-bullets li { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 0.97rem; }
.hero-bullets .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  box-shadow: 0 0 0 4px rgba(129,140,248,0.10);
  flex: 0 0 auto;
}

.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(28,37,71,0.7) 0%, rgba(15,23,42,0.7) 100%);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-glow);
  padding: 10px; overflow: hidden;
}
.hero-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(129,140,248,0.35), transparent 40%, rgba(124,58,237,0.30));
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}
.hero-card img { border-radius: 12px; width: 100%; display: block; }
.hero-card-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0 4px 4px; }
.badge {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: rgba(129,140,248,0.10); color: var(--brand-light);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid rgba(129,140,248,0.22);
}

/* ─── Stats strip ─── */
.stats { padding: 50px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(11,16,36,0.55); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-serif); font-size: 2.4rem; font-weight: 600; line-height: 1;
  background: linear-gradient(120deg, var(--brand-light), #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.stat-label { color: var(--text-dim); font-size: 0.92rem; max-width: 28ch; }

/* ─── Feature grid ─── */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px;
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  position: relative;
  background: linear-gradient(180deg, rgba(28,37,71,0.55) 0%, rgba(15,23,42,0.55) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px; transition: all .25s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(129,140,248,0.35);
  box-shadow: 0 14px 40px -14px rgba(99,102,241,0.35);
}
.feature-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(79,70,229,0.18));
  color: var(--brand-light);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(129,140,248,0.22);
}
.feature h3 { margin: 0 0 8px; font-family: var(--font-sans); font-size: 1.1rem; font-weight: 600; color: var(--text); letter-spacing: -0.005em; }
.feature p  { margin: 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.65; }

/* ─── Sample report gallery ─── */
.gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px;
}
@media (max-width: 820px) { .gallery { grid-template-columns: 1fr; } }
.gallery-item {
  margin: 0; padding: 14px;
  background: linear-gradient(180deg, rgba(28,37,71,0.55) 0%, rgba(15,23,42,0.55) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: all .25s ease;
}
.gallery-item:hover {
  border-color: rgba(129,140,248,0.35);
  box-shadow: 0 18px 50px -20px rgba(99,102,241,0.45);
  transform: translateY(-2px);
}
.gallery-item img {
  width: 100%; border-radius: 12px; cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.04);
  background: #0a0f22;
}
.gallery-item figcaption {
  padding: 14px 6px 4px; color: var(--text-dim); font-size: 0.92rem; line-height: 1.55;
}
.gallery-item figcaption strong { color: var(--text); font-weight: 600; }

/* ─── Split (in practice) ─── */
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
@media (max-width: 900px) { .split-grid { grid-template-columns: 1fr; } }
.split-card {
  background: linear-gradient(180deg, rgba(28,37,71,0.6) 0%, rgba(15,23,42,0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  position: relative; overflow: hidden;
}
.split-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 200px at 0% 0%, rgba(99,102,241,0.10), transparent 60%);
}
.card-eyebrow {
  font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; font-weight: 600; color: var(--brand-light); margin: 0 0 10px;
}
.split-card h3 { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 600; color: var(--text); margin: 0 0 18px; line-height: 1.2; }
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bullets li { color: var(--text-dim); line-height: 1.65; position: relative; padding-left: 20px; font-size: 0.97rem; }
.bullets li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
}
.bullets strong { color: var(--text); font-weight: 600; }

/* ─── Author ─── */
.author-grid {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 52px; align-items: start;
}
@media (max-width: 900px) { .author-grid { grid-template-columns: 1fr; gap: 36px; } }
.author-photo-wrap { position: relative; }
.author-photo {
  width: 100%; max-width: 320px; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-soft);
  position: relative; z-index: 1;
}
.author-photo-glow {
  position: absolute; inset: -20px; z-index: 0;
  background: radial-gradient(closest-side, rgba(99,102,241,0.35), transparent 70%);
  filter: blur(30px);
}
.author-title { color: var(--brand-light); font-weight: 500; margin: 0 0 22px; }
.author-copy p { color: var(--text-dim); margin: 0 0 14px; }
.author-copy p strong { color: var(--text); }
.credentials {
  list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px;
}
@media (max-width: 700px) { .credentials { grid-template-columns: 1fr; } }
.credentials li {
  color: var(--text); font-size: 0.92rem; position: relative; padding-left: 22px; line-height: 1.5;
}
.credentials li::before {
  content: '✓'; position: absolute; left: 0; top: 0; font-weight: 700;
  color: var(--brand-light); font-size: 0.95rem;
}
.author-links { margin-top: 24px; }

/* ─── CTA ─── */
.cta { padding: 100px 0 110px; }
.cta-inner {
  text-align: center; max-width: 720px; margin: 0 auto;
  background: linear-gradient(180deg, rgba(28,37,71,0.65) 0%, rgba(15,23,42,0.65) 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
}
.cta-inner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(129,140,248,0.18), transparent 60%);
  pointer-events: none;
}
.cta-inner h2 { margin-bottom: 14px; }
.cta-inner .section-lede { margin: 0 auto 28px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ─── */
.footer { padding: 36px 0 60px; border-top: 1px solid var(--border); background: rgba(7,11,26,0.6); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; text-align: center; } }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-family: var(--font-serif); font-size: 1rem; }
.footer-fineprint { color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; margin: 0; max-width: 60ch; }
.footer-links { font-size: 0.85rem; color: var(--text-dim); margin: 0; }
.footer-links .sep { margin: 0 8px; color: var(--text-muted); }

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .orb { display: none; }
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 40px;
  background: rgba(3, 6, 18, 0.92); backdrop-filter: blur(10px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96%; max-height: 90vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); border: 1px solid var(--border-2); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--border-2);
  font-size: 1.8rem; line-height: 1; cursor: pointer; transition: all .15s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }

/* ─── Selection ─── */
::selection { background: rgba(129,140,248,0.30); color: #fff; }
