/* =========================================================================
   Bhairava — Marketing & Docs Design System
   Tokens mirror the real product (bhairava/frontend/src/index.css).
   Dark-first (product default). Toggle via [data-theme="light"] on <html>.
   ========================================================================= */

:root {
  /* Core palette — HSL triplets, used as hsl(var(--x)) */
  --background: 222 47% 6%;
  --surface: 222 47% 8%;
  --surface-2: 217 33% 11%;
  --foreground: 210 40% 98%;
  --muted: 217 33% 12%;
  --muted-foreground: 215 20% 65%;
  --border: 217 33% 17%;
  --border-strong: 217 30% 26%;
  --primary: 217 91% 60%;
  --primary-strong: 224 76% 58%;
  --primary-foreground: 222 47% 6%;
  --ring: 217 91% 60%;

  /* Chart / accent palette (from product --chart-1..5) */
  --c-blue: 217 91% 60%;
  --c-teal: 160 60% 45%;
  --c-orange: 30 80% 55%;
  --c-purple: 280 65% 60%;
  --c-magenta: 340 75% 55%;

  /* Severity (from tailwind.config severity.*) */
  --sev-critical: 0 84% 60%;
  --sev-high: 24 95% 53%;
  --sev-medium: 48 96% 53%;
  --sev-low: 142 71% 45%;
  --sev-info: 217 91% 60%;

  --success: 142 71% 45%;
  --warning: 38 92% 50%;
  --danger: 0 84% 60%;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.25rem;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Cascadia Code', monospace;

  --shadow-sm: 0 1px 2px 0 hsl(222 47% 2% / 0.4);
  --shadow-md: 0 8px 24px -8px hsl(222 47% 2% / 0.55);
  --shadow-lg: 0 24px 60px -20px hsl(217 91% 30% / 0.35);
  --shadow-glow: 0 0 0 1px hsl(var(--primary) / 0.25), 0 12px 48px -12px hsl(var(--primary) / 0.45);

  --maxw: 1200px;
  --nav-h: 68px;
}

[data-theme="light"] {
  --background: 210 40% 99%;
  --surface: 0 0% 100%;
  --surface-2: 210 40% 97%;
  --foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 20% 40%;
  --border: 214 32% 91%;
  --border-strong: 214 25% 82%;
  --primary: 224 76% 48%;
  --primary-strong: 224 76% 42%;
  --primary-foreground: 0 0% 100%;
  --shadow-lg: 0 24px 60px -20px hsl(217 40% 60% / 0.25);
  --shadow-glow: 0 0 0 1px hsl(var(--primary) / 0.2), 0 12px 48px -12px hsl(var(--primary) / 0.3);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 96px; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(var(--primary));
  padding: 6px 12px; border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.2);
}
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 18px 0 14px; }
.section-head p { color: hsl(var(--muted-foreground)); font-size: 1.075rem; }
.text-grad {
  background: linear-gradient(100deg, hsl(var(--primary)) 0%, hsl(var(--c-teal)) 55%, hsl(var(--c-purple)) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: var(--radius-sm);
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(180deg, hsl(var(--primary)) 0%, hsl(var(--primary-strong)) 100%);
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px hsl(var(--primary) / 0.4), 0 18px 50px -12px hsl(var(--primary) / 0.6); }
.btn-ghost {
  background: hsl(var(--surface) / 0.6);
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border-strong));
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: hsl(var(--primary) / 0.5); background: hsl(var(--surface-2)); transform: translateY(-2px); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center;
  background: hsl(var(--background) / 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: hsl(var(--border)); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand small { display: block; font-size: 0.66rem; font-weight: 500; color: hsl(var(--muted-foreground)); letter-spacing: 0.02em; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
  color: hsl(var(--muted-foreground)); transition: color .15s, background .15s;
}
.nav-links a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground));
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: hsl(var(--foreground)); border-color: hsl(var(--border-strong)); background: hsl(var(--muted)); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding-top: calc(var(--nav-h) + 80px); padding-bottom: 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(var(--border) / 0.5) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.5) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.6;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: float 14s ease-in-out infinite; }
.orb-1 { width: 460px; height: 460px; top: -160px; left: -80px; background: hsl(var(--primary) / 0.5); }
.orb-2 { width: 380px; height: 380px; top: -60px; right: -60px; background: hsl(var(--c-purple) / 0.4); animation-delay: -5s; }
.orb-3 { width: 320px; height: 320px; top: 120px; left: 45%; background: hsl(var(--c-teal) / 0.28); animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(30px) translateX(20px); } }

.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.15rem); letter-spacing: -0.035em; margin: 22px 0 20px; }
.hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: hsl(var(--muted-foreground)); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; color: hsl(var(--muted-foreground)); font-size: 0.86rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 15px; height: 15px; color: hsl(var(--c-teal)); }

/* --------------------------------------------------- architecture diagram */
.arch { position: relative; }
.arch-card {
  background: linear-gradient(180deg, hsl(var(--surface) / 0.9), hsl(var(--surface-2) / 0.85));
  border: 1px solid hsl(var(--border-strong)); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px);
}
.arch-card .arch-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.arch-card .arch-title span { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; color: hsl(var(--c-teal)); font-weight: 600; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--c-teal)); box-shadow: 0 0 0 0 hsl(var(--c-teal) / 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 hsl(var(--c-teal) / 0.5); } 70% { box-shadow: 0 0 0 10px hsl(var(--c-teal) / 0); } 100% { box-shadow: 0 0 0 0 hsl(var(--c-teal) / 0); } }
.flow-line { stroke-dasharray: 5 7; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.arch-node rect { transition: filter .2s; }
.arch-node:hover rect { filter: brightness(1.25); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  text-align: center; padding: 30px 18px; border-radius: var(--radius);
  background: hsl(var(--surface) / 0.6); border: 1px solid hsl(var(--border));
}
.stat .num { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; }
.stat .num.g { background: linear-gradient(120deg, hsl(var(--primary)), hsl(var(--c-teal))); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { color: hsl(var(--muted-foreground)); font-size: 0.88rem; margin-top: 6px; }

/* --------------------------------------------------------- feature grid */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  padding: 26px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: hsl(var(--surface) / 0.55); border: 1px solid hsl(var(--border));
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.feat::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, hsl(var(--primary) / 0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
}
.feat:hover { transform: translateY(-4px); background: hsl(var(--surface-2) / 0.75); border-color: hsl(var(--border-strong)); }
.feat:hover::after { opacity: 1; }
.feat-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); border: 1px solid hsl(var(--primary) / 0.2);
}
.feat-ico svg { width: 23px; height: 23px; }
.feat h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feat p { color: hsl(var(--muted-foreground)); font-size: 0.92rem; }
.feat .tag { position: absolute; top: 20px; right: 20px; font-size: 0.66rem; font-weight: 600; color: hsl(var(--c-teal)); text-transform: uppercase; letter-spacing: 0.06em; }

/* accent variants for feature icons */
.feat-ico.teal { background: hsl(var(--c-teal) / 0.12); color: hsl(var(--c-teal)); border-color: hsl(var(--c-teal) / 0.22); }
.feat-ico.purple { background: hsl(var(--c-purple) / 0.12); color: hsl(var(--c-purple)); border-color: hsl(var(--c-purple) / 0.22); }
.feat-ico.orange { background: hsl(var(--c-orange) / 0.12); color: hsl(var(--c-orange)); border-color: hsl(var(--c-orange) / 0.22); }
.feat-ico.magenta { background: hsl(var(--c-magenta) / 0.12); color: hsl(var(--c-magenta)); border-color: hsl(var(--c-magenta) / 0.22); }

/* --------------------------------------------------------------- how flow */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.flow-step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: hsl(var(--surface) / 0.5); border: 1px solid hsl(var(--border)); }
.flow-step .n { counter-increment: step; font-family: var(--font-mono); font-size: 0.8rem; color: hsl(var(--primary)); font-weight: 700; }
.flow-step .n::before { content: "0" counter(step); }
.flow-step h4 { font-size: 1.02rem; margin: 10px 0 7px; }
.flow-step p { color: hsl(var(--muted-foreground)); font-size: 0.88rem; }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: hsl(var(--border-strong)); font-size: 1.3rem; z-index: 1; }

/* ---------------------------------------------------- integrations strip */
.logo-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; gap: 14px; width: max-content; animation: scroll-x 40s linear infinite; }
.logo-track:hover { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.logo-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  background: hsl(var(--surface) / 0.7); border: 1px solid hsl(var(--border)); white-space: nowrap;
  font-size: 0.9rem; font-weight: 500; color: hsl(var(--muted-foreground));
}
.logo-pill i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--c-teal)); flex: none; }

/* -------------------------------------------------------------- cta band */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 64px 48px; text-align: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.16), hsl(var(--c-purple) / 0.12));
  border: 1px solid hsl(var(--primary) / 0.25); }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.cta-band p { color: hsl(var(--muted-foreground)); max-width: 560px; margin: 0 auto 28px; font-size: 1.05rem; }
.cta-band .hero-cta { justify-content: center; }

/* --------------------------------------------------------------- footer */
.footer { border-top: 1px solid hsl(var(--border)); padding-block: 52px 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { font-size: 0.92rem; color: hsl(var(--muted-foreground)); }
.footer ul a:hover { color: hsl(var(--foreground)); }
.footer .muted { color: hsl(var(--muted-foreground)); font-size: 0.9rem; margin-top: 12px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }
.demo-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; background: hsl(var(--warning) / 0.15); color: hsl(var(--warning)); border: 1px solid hsl(var(--warning) / 0.3); text-transform: uppercase; }

/* ------------------------------------------------------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .arch { order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding-block: 64px; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .stats, .feat-grid, .flow { grid-template-columns: 1fr; }
  .flow-step::after { display: none !important; }
  .cta-band { padding: 44px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}

/* =========================================================================
   PREMIUM ENHANCEMENTS — richer hero, live-console preview, big architecture
   ========================================================================= */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 60;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--c-teal)) 50%, hsl(var(--c-purple)));
  box-shadow: 0 0 12px hsl(var(--primary) / 0.7); transition: width .1s linear;
}

/* Nav top accent */
.nav::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.6), hsl(var(--c-purple) / 0.5), transparent);
  opacity: 0; transition: opacity .3s;
}
.nav.scrolled::before { opacity: 1; }

/* Richer hero background: aurora sweep + scanline over the grid */
.hero-bg::after {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 50% at 20% 10%, hsl(var(--primary) / 0.22), transparent 60%),
    radial-gradient(50% 45% at 85% 15%, hsl(var(--c-purple) / 0.18), transparent 60%),
    radial-gradient(45% 40% at 60% 40%, hsl(var(--c-teal) / 0.12), transparent 60%);
  animation: aurora 18s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes aurora { 0% { transform: translate3d(-2%,0,0) scale(1); } 100% { transform: translate3d(3%,1%,0) scale(1.08); } }
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 180px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, hsl(var(--primary) / 0.10), transparent);
  mask-image: linear-gradient(180deg,#000,transparent);
  -webkit-mask-image: linear-gradient(180deg,#000,transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan { 0% { transform: translateY(-10%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(560px); opacity: 0; } }

/* ---------- Live console preview (hero right) ---------- */
.hero-visual { position: relative; perspective: 1600px; }
.console {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid hsl(var(--border-strong));
  background: linear-gradient(180deg, hsl(var(--surface) / 0.95), hsl(var(--surface-2) / 0.92));
  box-shadow: var(--shadow-lg), 0 0 0 1px hsl(var(--primary) / 0.08), 0 40px 80px -30px hsl(var(--primary) / 0.4);
  backdrop-filter: blur(10px);
  animation: floatCard 8s ease-in-out infinite;
}
@keyframes floatCard { 0%,100% { transform: translateY(0) rotateX(0) rotateY(0); } 50% { transform: translateY(-10px) rotateX(1.2deg) rotateY(-1.4deg); } }
.console::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.55), transparent 35%, transparent 65%, hsl(var(--c-purple) / 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.console-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--background) / 0.5);
}
.console-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.console-bar .dot.r { background: #ef4444; } .console-bar .dot.y { background: #eab308; } .console-bar .dot.g { background: #22c55e; }
.console-title { font-family: var(--font-mono); font-size: 0.78rem; color: hsl(var(--muted-foreground)); margin-left: 6px; }
.console-bar .live-dot { margin-left: auto; }
.console-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { padding: 13px 14px; border-radius: 11px; background: hsl(var(--muted) / 0.6); border: 1px solid hsl(var(--border)); }
.kpi-label { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground)); }
.kpi-val { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; display: block; margin-top: 4px; }
.kpi-val small { font-size: 0.9rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
.kpi-trend { font-size: 0.7rem; font-weight: 700; }
.kpi-trend.good { color: hsl(var(--success)); } .kpi-trend.bad { color: hsl(var(--danger)); }
.kpi-sub { font-size: 0.72rem; color: hsl(var(--muted-foreground)); }

.mini-chart { position: relative; border-radius: 11px; background: hsl(var(--muted) / 0.4); border: 1px solid hsl(var(--border)); padding: 12px 12px 6px; }
.mini-chart .mc-head { display: flex; justify-content: space-between; font-size: 0.68rem; color: hsl(var(--muted-foreground)); margin-bottom: 6px; }
.mc-line { fill: none; stroke: hsl(var(--primary)); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 2.4s ease forwards .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.mc-dot { fill: hsl(var(--primary)); animation: dotpulse 2s ease-in-out infinite 2.6s; }
@keyframes dotpulse { 0%,100% { r: 3.5; opacity: 1; } 50% { r: 5; opacity: .6; } }

.alert-feed { height: 128px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); }
.afeed-track { display: flex; flex-direction: column; gap: 7px; animation: feedUp 14s linear infinite; }
.afeed-track:hover { animation-play-state: paused; }
@keyframes feedUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.afeed-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px;
  background: hsl(var(--muted) / 0.5); border: 1px solid hsl(var(--border)); font-size: 0.78rem; }
.afeed-row .sev { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px hsl(var(--background)); }
.sev.crit { background: hsl(var(--sev-critical)); box-shadow: 0 0 8px hsl(var(--sev-critical)); }
.sev.high { background: hsl(var(--sev-high)); }
.sev.med  { background: hsl(var(--sev-medium)); }
.sev.low  { background: hsl(var(--sev-low)); }
.afeed-row .txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: hsl(var(--foreground)); }
.afeed-row .tag { font-family: var(--font-mono); font-size: 0.66rem; color: hsl(var(--c-purple)); background: hsl(var(--c-purple) / 0.12); padding: 2px 7px; border-radius: 6px; }
.afeed-row .st { font-size: 0.64rem; color: hsl(var(--muted-foreground)); }

/* ---------- Big animated architecture ---------- */
.archx-wrap {
  border-radius: var(--radius-lg); padding: 8px;
  background: radial-gradient(120% 120% at 50% 0%, hsl(var(--surface) / 0.6), transparent 70%);
}
.archx { width: 100%; height: auto; display: block; }
.archx .node-box { transition: filter .2s; }
.archx-g:hover .node-box { filter: brightness(1.35) drop-shadow(0 0 6px hsl(var(--primary) / 0.5)); }
.archx .col-head { fill: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.archx .n-title { fill: hsl(var(--foreground)); font-weight: 700; }
.archx .n-sub { fill: hsl(var(--muted-foreground)); }
.archx .conn { stroke: hsl(var(--border-strong)); stroke-width: 1.6; fill: none; opacity: 0.55; }
.archx .conn-anim { stroke: url(#connGrad); stroke-width: 1.8; fill: none; stroke-dasharray: 4 8; animation: dash 1.2s linear infinite; opacity: 0.9; }
.archx .fb { stroke: hsl(var(--c-purple) / 0.6); stroke-width: 1.4; fill: none; stroke-dasharray: 3 6; opacity: 0.7; }
.arch-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 22px; color: hsl(var(--muted-foreground)); font-size: 0.82rem; }
.arch-legend span { display: inline-flex; align-items: center; gap: 8px; }
.arch-legend i { width: 22px; height: 3px; border-radius: 2px; }

/* Enhanced feature cards: subtle inner glow + icon lift */
.feat:hover .feat-ico { transform: translateY(-2px) scale(1.06); box-shadow: 0 8px 20px -8px hsl(var(--primary) / 0.5); }
.feat-ico { transition: transform .2s ease, box-shadow .2s ease; }

/* Enhanced stat cards */
.stat { position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.stat:hover { transform: translateY(-3px); border-color: hsl(var(--primary) / 0.4); }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.7), transparent); opacity: 0; transition: opacity .25s; }
.stat:hover::before { opacity: 1; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .console-body { padding: 14px; gap: 11px; }
}
@media (max-width: 640px) {
  .kpi-val { font-size: 1.25rem; }
  .arch-legend { gap: 12px; font-size: 0.75rem; }
}

/* =========================================================================
   TYPOGRAPHY + CTA v2 — polished hero fonts and a showpiece demo band
   ========================================================================= */

/* Hero headline: heavier weight, tighter tracking, controlled two-line lockup */
.hero-h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.9rem) !important;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 26px 0 22px !important;
}
.hero-h1 .text-grad {
  filter: drop-shadow(0 0 28px hsl(var(--primary) / 0.35));
}

/* Eyebrow: premium pill with soft glow */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 7px 14px;
  background: linear-gradient(90deg, hsl(var(--primary) / 0.14), hsl(var(--c-purple) / 0.10));
  border: 1px solid hsl(var(--primary) / 0.3);
  box-shadow: 0 0 24px -6px hsl(var(--primary) / 0.35), inset 0 1px 0 hsl(var(--primary) / 0.15);
}

/* Lead: bigger, airier, with highlighted key phrases */
.hero .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
}
.lead .hl {
  color: hsl(var(--foreground));
  font-weight: 600;
}
.lead-tag {
  display: block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.98em;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--c-teal)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Section headings get the same weight discipline */
.section-head h2 { font-weight: 800; letter-spacing: -0.035em; }

/* ---------------- CTA band v2 — the showpiece ---------------- */
.cta-band.v2 {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 48px;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(hsl(var(--background)) 0 0) padding-box,
    linear-gradient(120deg, hsl(var(--primary) / 0.75), hsl(var(--c-teal) / 0.5) 45%, hsl(var(--c-purple) / 0.75)) border-box;
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.05),
    0 30px 90px -30px hsl(var(--primary) / 0.45),
    inset 0 0 120px -40px hsl(var(--primary) / 0.12);
}
.cta-band.v2::before {
  /* faint grid inside the band */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(hsl(var(--border) / 0.6) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.6) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 90% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 90% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.5;
}
.cta-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; animation: float 12s ease-in-out infinite; }
.cta-orb.o1 { width: 380px; height: 380px; top: -160px; left: -80px; background: hsl(var(--primary) / 0.35); }
.cta-orb.o2 { width: 320px; height: 320px; bottom: -140px; right: -60px; background: hsl(var(--c-purple) / 0.3); animation-delay: -6s; }

.cta-band.v2 .demo-chip {
  position: relative; z-index: 1;
  font-size: 0.7rem; letter-spacing: 0.12em; padding: 7px 15px;
  background: hsl(var(--warning) / 0.12);
  box-shadow: 0 0 22px -6px hsl(var(--warning) / 0.5);
}
.dm-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--warning)); display: inline-block; box-shadow: 0 0 0 0 hsl(var(--warning) / 0.6); animation: pulse 2s infinite; }

.cta-title {
  position: relative; z-index: 1;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
  margin: 22px 0 16px;
}
.cta-title .text-grad { filter: drop-shadow(0 0 30px hsl(var(--primary) / 0.4)); }
.cta-sub {
  position: relative; z-index: 1;
  color: hsl(var(--muted-foreground));
  max-width: 640px; margin: 0 auto 22px;
  font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.7;
}
.cta-points {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  margin-bottom: 34px; font-size: 0.9rem; font-weight: 500; color: hsl(var(--foreground) / 0.85);
}
.cta-points span { display: inline-flex; align-items: center; gap: 8px; }
.cta-points svg { width: 15px; height: 15px; color: hsl(var(--c-teal)); }
.cta-band.v2 .hero-cta { position: relative; z-index: 1; justify-content: center; margin-bottom: 0; }

/* glowing primary CTA with pulse ring */
.btn-glow {
  position: relative;
  padding: 17px 34px !important;
  font-size: 1.05rem !important;
  font-weight: 700;
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.5),
    0 14px 44px -10px hsl(var(--primary) / 0.65),
    inset 0 1px 0 hsl(0 0% 100% / 0.25);
}
.btn-glow::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit;
  border: 1.5px solid hsl(var(--primary) / 0.5);
  animation: ctaRing 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaRing {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(1.12); opacity: 0; }
}
.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.7),
    0 20px 60px -10px hsl(var(--primary) / 0.8),
    inset 0 1px 0 hsl(0 0% 100% / 0.3);
}

@media (max-width: 640px) {
  .cta-band.v2 { padding: 48px 22px; }
  .cta-points { gap: 8px 16px; font-size: 0.8rem; }
}

/* ================================================= CERTIFICATIONS BAND === */
.cert-band {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(38px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border: 1px solid hsl(var(--border));
  background:
    radial-gradient(120% 140% at 0% 0%, hsl(var(--c-teal) / 0.14) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--surface) / 0.95), hsl(var(--surface-2) / 0.75));
  box-shadow: var(--shadow-md);
}
.cert-orb {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  top: -220px; left: -140px; filter: blur(90px); pointer-events: none;
  background: hsl(var(--c-teal) / 0.22);
}
/* thin arc echoing the product mark, top-right */
.cert-ring {
  position: absolute; top: -110px; right: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(200deg, hsl(var(--c-teal)), hsl(var(--primary))) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.55; pointer-events: none;
}

.cert-head { position: relative; z-index: 1; max-width: 720px; }
.cert-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; margin: 18px 0 14px; }
.cert-head p { color: hsl(var(--muted-foreground)); font-size: 1.02rem; max-width: 620px; }

.cert-metrics {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px; margin: 40px 0 8px;
}
.cert-metric .num { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.cert-metric .num.g {
  background: linear-gradient(120deg, hsl(var(--primary)), hsl(var(--c-teal)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cert-metric .lbl {
  color: hsl(var(--muted-foreground)); margin-top: 6px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

.cert-marquee {
  position: relative; z-index: 1; margin-top: 38px; padding-top: 30px;
  border-top: 1px solid hsl(var(--border));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.cert-track { display: flex; align-items: stretch; gap: 16px; width: max-content; animation: scroll-x 46s linear infinite; }
.cert-marquee:hover .cert-track { animation-play-state: paused; }

.cert-badge {
  flex: none; width: 148px; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 12px; border-radius: var(--radius);
  background: hsl(var(--surface) / 0.6);
  border: 1px solid hsl(var(--border));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cert-badge:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--c-teal) / 0.45);
  box-shadow: 0 14px 34px -18px hsl(var(--c-teal) / 0.6);
}
.cert-badge img {
  height: 62px; width: 100%; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 8px;
}
.cert-badge figcaption {
  font-size: 0.72rem; font-weight: 600; line-height: 1.35; text-align: center;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 900px) {
  .cert-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .cert-ring { width: 200px; height: 200px; top: -80px; right: -80px; }
}
@media (max-width: 560px) {
  .cert-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-badge { width: 128px; }
  .cert-badge img { height: 52px; }
}
/* ============================================ COMPLIANCE HIGHLIGHT (SOC 2 / ISO) === */
.compliance { padding-block: 56px 72px; }
.comp-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.comp-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.035em;
  margin: 18px 0 12px;
}
.comp-head p { color: hsl(var(--muted-foreground)); font-size: 1.02rem; }

.comp-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; max-width: 720px; margin-inline: auto;
}

/* card follows the .stat / .feat idiom: flat surface, hairline border, top accent */
.comp-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 30px 24px 26px; border-radius: var(--radius);
  background: hsl(var(--surface) / 0.55);
  border: 1px solid hsl(var(--border));
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.comp-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.7), transparent);
}
.comp-card:hover { transform: translateY(-3px); border-color: hsl(var(--primary) / 0.4); background: hsl(var(--surface) / 0.75); }
.comp-card.teal::before { background: linear-gradient(90deg, transparent, hsl(var(--c-teal) / 0.7), transparent); }
.comp-card.teal:hover { border-color: hsl(var(--c-teal) / 0.4); }

.comp-seal {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 14px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.comp-seal svg { width: 28px; height: 28px; }
.comp-card:hover .comp-seal { transform: translateY(-2px) scale(1.06); box-shadow: 0 8px 20px -8px hsl(var(--primary) / 0.5); }
.comp-card.teal .comp-seal { background: hsl(var(--c-teal) / 0.12); color: hsl(var(--c-teal)); border-color: hsl(var(--c-teal) / 0.25); }
.comp-card.teal:hover .comp-seal { box-shadow: 0 8px 20px -8px hsl(var(--c-teal) / 0.5); }

.comp-name {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -0.03em;
  color: hsl(var(--foreground)); line-height: 1.15;
}
.comp-sub {
  display: inline-block; margin-top: 10px; padding: 5px 13px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.2);
}
.comp-card.teal .comp-sub { color: hsl(var(--c-teal)); background: hsl(var(--c-teal) / 0.1); border-color: hsl(var(--c-teal) / 0.22); }
.comp-desc {
  margin-top: 14px; color: hsl(var(--muted-foreground));
  font-size: 0.88rem; line-height: 1.55;
}

@media (max-width: 560px) {
  .comp-grid { grid-template-columns: 1fr; gap: 14px; max-width: 340px; }
  .comp-card { padding: 26px 20px 22px; }
}
