/* =====================================================================
   Bridgrs — Dark tech. Animation-forward. Automation energy.
   ===================================================================== */

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ── Tokens — Nocturne (editorial noir, unified with app.bridgrs.com) ── */
:root {
  /* Warm ink canvas — shifted from cool blue-black to editorial noir */
  --bg: #050507;
  --bg-2: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --hairline: rgba(245, 243, 238, 0.08);
  --hairline-2: rgba(245, 243, 238, 0.14);

  /* Warm ink type — no cold-blue cast */
  --fg: #F5F3EE;
  --fg-dim: #a8a8b0;
  --fg-mute: #6a6a74;

  /* Single luminous 2-stop accent: violet → electric blue */
  --violet: #A78BFA;
  --violet-bright: #C4B5FD;
  --cyan: #38BDF8;
  --cyan-bright: #7DD3FC;
  --pink: #F472B6;          /* retained for legacy references only */
  --green: #34D399;         /* retained for legacy references only */
  --amber: #FBBF24;         /* retained for legacy references only */

  --grad-main: linear-gradient(135deg, #A78BFA 0%, #38BDF8 100%);
  --grad-warm: linear-gradient(135deg, #A78BFA 0%, #38BDF8 100%);
  --grad-cool: linear-gradient(135deg, #38BDF8 0%, #A78BFA 100%);
  --grad-border: linear-gradient(135deg, rgba(167, 139, 250, 0.5), rgba(56, 189, 248, 0.5));

  /* Editorial display serif paired with precise geometric body + mono */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Global atmospheric layers ───────────────────── */
/* Layer 1: Animated aurora gradient mesh */
body::before {
  content: '';
  position: fixed;
  inset: -20% -20% auto auto;
  width: 120vmax;
  height: 120vmax;
  background:
    radial-gradient(circle at 22% 28%, rgba(167, 139, 250, 0.38), transparent 42%),
    radial-gradient(circle at 78% 44%, rgba(56, 189, 248, 0.30), transparent 48%),
    radial-gradient(circle at 52% 82%, rgba(167, 139, 250, 0.18), transparent 55%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.62;
  filter: blur(48px);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate(0, 0) rotate(0deg);   }
  50%  { transform: translate(-4%, 3%) rotate(2deg); }
  100% { transform: translate(3%, -4%) rotate(-2deg); }
}

/* Layer 2: Subtle grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Cursor glow (follows mouse, set by JS) — Nocturne violet */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle,
    rgba(167, 139, 250, 0.22) 0%,
    rgba(56, 189, 248, 0.10) 35%,
    transparent 62%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
  filter: blur(22px);
  will-change: transform;
  opacity: 0;
}

main, nav, footer { position: relative; z-index: 2; }

/* ── Typography ──────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 400;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  color: var(--fg);
}
h1 { font-weight: 400; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 400; letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; font-weight: 500; }
/* Fraunces italic accent on em inside headings (Nocturne editorial pull) */
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 350;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
  letter-spacing: -0.02em;
}
p { color: var(--fg-dim); font-family: var(--body); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cyan-bright);
  padding: 7px 14px;
  border: 1px solid var(--hairline-2);
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 4px var(--cyan);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.mono { font-family: var(--mono); }

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad-text-warm {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Shimmer text */
@keyframes shimmer {
  to { background-position: 200% center; }
}
.shimmer {
  background: linear-gradient(90deg, var(--fg) 0%, var(--violet-bright) 40%, var(--cyan-bright) 60%, var(--fg) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* ── Layout ──────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  margin: 16px var(--gutter) 0;
  padding: 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: calc(var(--container) - 32px);
  margin: 0 auto;
  padding: 0 22px;
  background: rgba(10, 13, 31, 0.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
  flex-shrink: 0;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(244,114,182,0.22), transparent 65%);
  filter: blur(10px);
  opacity: 0.75;
  z-index: -1;
  pointer-events: none;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.footer-brand .brand-mark { width: 26px; height: 26px; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.88rem;
  color: var(--fg-dim);
  padding: 8px 0;
  position: relative;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translateX(-50%) scale(0);
  transition: transform 0.25s var(--ease-bounce);
  box-shadow: 0 0 8px var(--cyan);
}
.nav-links a:hover::after { transform: translateX(-50%) scale(1); }

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

/* ── Buttons ─────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
  overflow: hidden;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  color: var(--bg);
  background: linear-gradient(135deg, #fff 0%, #e8ecf7 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 30px -10px rgba(56, 189, 248, 0.4);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-main);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 16px 40px -12px rgba(167, 139, 250, 0.7);
  color: #fff;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }

.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--hairline-2);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Magnetic interior shine (updated by JS) */
.btn-glow {
  position: relative;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(56, 189, 248, 0.2));
  border: 1px solid;
  border-color: transparent;
  background-clip: padding-box;
  color: var(--fg);
}
.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--grad-main);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 72px);
  position: relative;
}
.hero-tag {
  margin-bottom: 32px;
  display: inline-flex;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 18ch;
  margin: 0 0 32px;
}
.hero h1 .word-box {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-right: 0.2em;
}
.hero h1 .word-box > span {
  display: inline-block;
  transform: translateY(110%);
  animation: wordup 0.9s var(--ease) forwards;
}
.hero h1 .word-box:nth-of-type(1) > span { animation-delay: 0.10s; }
.hero h1 .word-box:nth-of-type(2) > span { animation-delay: 0.18s; }
.hero h1 .word-box:nth-of-type(3) > span { animation-delay: 0.26s; }
.hero h1 .word-box:nth-of-type(4) > span { animation-delay: 0.40s; }
.hero h1 .word-box:nth-of-type(5) > span { animation-delay: 0.50s; }
.hero h1 .word-box:nth-of-type(6) > span { animation-delay: 0.60s; }
.hero h1 .word-box:nth-of-type(7) > span { animation-delay: 0.70s; }
.hero h1 .word-box:nth-of-type(8) > span { animation-delay: 0.80s; }
.hero h1 .word-box:nth-of-type(9) > span { animation-delay: 0.90s; }
@keyframes wordup {
  to { transform: translateY(0); }
}

/* ── Nocturne serif accent (Fraunces italic, editorial pull) ── */
.serif-accent {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  letter-spacing: -0.02em;
  padding-right: 0.015em;
}
.hero h1 .serif-accent { font-weight: 350; letter-spacing: -0.025em; }

.hero-lede {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--fg-dim);
  line-height: 1.55;
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 0.7s forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 0.85s forwards;
}

/* Hero live stats row */
.hero-stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 640px;
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 1s forwards;
}
.hero-stat {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.hero-stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(167, 139, 250, 0.12));
  pointer-events: none;
}
.hero-stat-num {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.hero-stat-num .unit { color: var(--cyan-bright); font-size: 0.85em; margin-left: 2px; }
.hero-stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  margin-top: 4px;
}

/* ── Flow diagram (Gmail → AI → Rep) ──────────────── */
.flow {
  margin-top: clamp(80px, 10vw, 140px);
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 1.3s forwards;
}
.flow-wrap {
  position: relative;
  padding: 40px 32px;
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(56, 189, 248, 0.04)),
    rgba(10, 13, 31, 0.5);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -40px rgba(167, 139, 250, 0.4);
  overflow: hidden;
}
.flow-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(167, 139, 250, 0.4), rgba(56, 189, 248, 0.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateBorder 8s linear infinite;
}
@keyframes rotateBorder {
  to { transform: rotate(360deg); }
}

.flow-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 420px;
}

.flow-node {
  position: relative;
  z-index: 2;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.flow-node .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  backdrop-filter: blur(12px);
}
.flow-node .chip.violet { color: var(--violet-bright); border-color: rgba(167, 139, 250, 0.45); background: rgba(167, 139, 250, 0.1); }
.flow-node .chip.cyan { color: var(--cyan-bright); border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.08); }
.flow-node .chip.pink { color: var(--pink); border-color: rgba(244, 114, 182, 0.45); background: rgba(244, 114, 182, 0.1); }
.flow-node .chip.green { color: var(--green); border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.1); }

.flow-node .node-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.flow-node .node-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}

.flow-node .icon-box {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
  display: grid;
  place-items: center;
  position: relative;
  backdrop-filter: blur(16px);
  transition: transform 0.4s var(--ease);
}
.flow-node .icon-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--grad-main);
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.4s;
  z-index: -1;
}
.flow-node:hover .icon-box { transform: translateY(-4px) scale(1.05); }
.flow-node:hover .icon-box::before { opacity: 0.5; }
.flow-node .icon-box svg { width: 32px; height: 32px; color: var(--fg); }

/* Pulse ring on icon boxes that emphasize action */
.flow-node.is-active .icon-box::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--cyan);
  opacity: 0;
  animation: pulseRing 2.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* Flow connector SVG overlay */
.flow-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.flow-path {
  fill: none;
  stroke: url(#flowGrad);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: flowDash 1.4s linear infinite;
}
@keyframes flowDash {
  to { stroke-dashoffset: -24; }
}

/* ── Marquee ─────────────────────────────────────── */
.marquee {
  padding: 20px 0;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(10, 13, 31, 0.4);
  backdrop-filter: blur(12px);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 38s linear infinite;
  width: max-content;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}
.marquee-item::after {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan);
  margin-left: 48px;
  box-shadow: 0 0 10px var(--cyan);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ── Capabilities grid ──────────────────────────── */
.caps-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: end;
}
.caps-head h2 { max-width: 16ch; }
.caps-head h2 em { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.caps-head p { font-size: 1.05rem; line-height: 1.6; max-width: 46ch; }

.caps {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.cap {
  grid-column: span 4;
  position: relative;
  padding: 32px 28px 28px;
  background: rgba(10, 13, 31, 0.5);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s;
  isolation: isolate;
}
.cap::before {
  /* Cursor spotlight — updated by JS via CSS variables */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(167, 139, 250, 0.18),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.cap:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, 0.4); }
.cap:hover::before { opacity: 1; }

.cap-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cap-num .pill {
  padding: 3px 8px;
  font-size: 0.64rem;
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 100px;
  letter-spacing: 0.14em;
}
.cap h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--fg);
}
.cap h3 em { color: var(--cyan-bright); }
.cap p { font-size: 0.92rem; line-height: 1.6; color: var(--fg-dim); }

.cap-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  position: relative;
  transition: transform 0.35s var(--ease);
}
.cap-icon svg { width: 20px; height: 20px; color: var(--fg); }
.cap:hover .cap-icon { transform: rotate(-5deg) scale(1.08); }
.cap-icon.violet { color: var(--violet-bright); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.3); }
.cap-icon.cyan { color: var(--cyan-bright); background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.3); }
.cap-icon.pink { color: var(--pink); background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.3); }
.cap-icon.green { color: var(--green); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); }
.cap-icon.amber { color: var(--amber); background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); }

.cap.cap-wide { grid-column: span 6; }
.cap.cap-narrow { grid-column: span 6; }
.cap.cap-full { grid-column: span 12; }

/* Feature cap with live code preview */
.cap-code {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--fg-dim);
  white-space: pre;
  overflow: auto;
}
.cap-code .kw { color: var(--violet-bright); }
.cap-code .str { color: var(--green); }
.cap-code .fn { color: var(--cyan-bright); }
.cap-code .co { color: var(--fg-mute); font-style: italic; }

/* ── Stats ───────────────────────────────────────── */
.stats {
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(10, 13, 31, 0.3);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat { padding: 0 16px; position: relative; }
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 10%;
  width: 1px; height: 80%;
  background: linear-gradient(to bottom, transparent, var(--hairline-2), transparent);
}
.stat-num {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-num .sfx { -webkit-text-fill-color: currentColor; background: none; color: var(--cyan-bright); font-size: 0.45em; margin-left: 2px; }
.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-mute);
}

/* ── Sectors ─────────────────────────────────────── */
.sectors-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 56px;
}
.sectors-head h2 { max-width: 16ch; }
.sectors-head h2 em { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.sectors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.sector {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: rgba(10, 13, 31, 0.55);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s;
  isolation: isolate;
}
.sector::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 0%),
    rgba(56, 189, 248, 0.14),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.sector:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, 0.35); }
.sector:hover::before { opacity: 1; }

.sector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sector-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-mute);
  letter-spacing: 0.16em;
}
.sector-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
}
.sector-icon svg { width: 20px; height: 20px; }
.sector h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.sector p { font-size: 0.92rem; line-height: 1.6; color: var(--fg-dim); }
.sector-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.sector-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--fg-dim);
}

/* ── How it works (steps) ──────────────────────── */
.steps-head { margin-bottom: 56px; max-width: 54ch; }
.steps-head h2 { margin: 16px 0 16px; }
.steps-head h2 em { color: var(--cyan-bright); }
.steps-head p { font-size: 1.05rem; line-height: 1.55; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: rgba(10, 13, 31, 0.55);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, 0.35); }
.step-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--violet-bright);
  margin-bottom: 28px;
}
.step h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.step p { font-size: 0.88rem; line-height: 1.55; color: var(--fg-dim); }

/* ── Inbox demo ──────────────────────────────────── */
.inbox-wrap { margin-top: 40px; }
.inbox {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10, 13, 31, 0.8), rgba(6, 8, 20, 0.9)),
    rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6), 0 0 80px -20px rgba(167, 139, 250, 0.3);
}
.inbox-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.3);
}
.inbox-dots { display: flex; gap: 6px; }
.inbox-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.inbox-dots span:nth-child(1) { background: #ef4444; }
.inbox-dots span:nth-child(2) { background: #fbbf24; }
.inbox-dots span:nth-child(3) { background: #22c55e; }
.inbox-path {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
}
.inbox-live {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
}
.inbox-live::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.inbox-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 420px;
}
.inbox-side {
  padding: 18px 14px;
  border-right: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.2);
}
.inbox-side h4 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  margin-bottom: 12px;
}
.inbox-folder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--fg-dim);
  transition: background 0.2s;
  margin-bottom: 2px;
  cursor: default;
}
.inbox-folder:hover { background: var(--surface); }
.inbox-folder.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(56, 189, 248, 0.15));
  color: var(--fg);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.inbox-folder-count { font-family: var(--mono); font-size: 0.7rem; color: var(--fg-mute); }
.inbox-folder.active .inbox-folder-count { color: var(--cyan-bright); }

.inbox-list { padding: 10px 0; }
.inbox-row {
  display: grid;
  grid-template-columns: 86px 150px 1fr 50px;
  gap: 14px;
  align-items: center;
  padding: 13px 20px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}
.inbox-row:hover { background: rgba(255, 255, 255, 0.02); }
.inbox-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 500;
  border: 1px solid;
  justify-self: start;
}
.tag-hot { color: #fca5a5; background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); }
.tag-warm { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.35); }
.tag-cool { color: var(--cyan-bright); background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.35); }
.tag-green { color: var(--green); background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.35); }
.tag-mute { color: var(--fg-mute); background: var(--surface); border-color: var(--hairline); }
.tag-sent { color: var(--violet-bright); background: rgba(167, 139, 250, 0.08); border-color: rgba(167, 139, 250, 0.4); }

.inbox-from {
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-sub {
  color: var(--fg-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-sub strong { color: var(--fg-dim); font-weight: 400; }
.inbox-time { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-mute); text-align: right; }

.inbox-row.classifying .inbox-tag {
  color: var(--cyan-bright);
  background: transparent;
  border-style: dashed;
  animation: pulseText 1.4s ease-in-out infinite;
}
@keyframes pulseText { 50% { opacity: 0.4; } }

/* ── Trust / Security ───────────────────────────── */
.trust {
  position: relative;
  overflow: hidden;
}
.trust-inner {
  position: relative;
  padding: 64px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(167, 139, 250, 0.2), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(56, 189, 248, 0.15), transparent 40%),
    rgba(6, 8, 20, 0.8);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(20px);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.trust h2 { max-width: 14ch; }
.trust h2 em { color: var(--cyan-bright); }
.trust-lede { font-size: 1rem; margin-top: 20px; line-height: 1.6; max-width: 42ch; }

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 100px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-bright);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 24px;
}
.trust-chip svg { width: 14px; height: 14px; }

.trust-list { display: flex; flex-direction: column; gap: 0; }
.trust-item {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  transition: padding-left 0.4s var(--ease);
}
.trust-item:last-child { border-bottom: 1px solid var(--hairline); }
.trust-item:hover { padding-left: 8px; }
.trust-item-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.35);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--violet-bright);
  font-weight: 500;
}
.trust-item h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--fg);
}
.trust-item p { font-size: 0.9rem; line-height: 1.6; color: var(--fg-dim); }

/* ── FAQ ─────────────────────────────────────────── */
.faq-head { margin-bottom: 48px; max-width: 54ch; }
.faq-head h2 { margin-top: 16px; }
.faq-head h2 em { color: var(--violet-bright); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: rgba(10, 13, 31, 0.55);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s;
}
.faq-item[open] { border-color: rgba(167, 139, 250, 0.35); }
.faq-q {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: left;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
  list-style: none;
  cursor: pointer;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-toggle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.faq-toggle::before, .faq-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.faq-toggle::before { width: 11px; height: 1px; }
.faq-toggle::after { width: 1px; height: 11px; }
.faq-item[open] .faq-toggle { transform: rotate(45deg); background: rgba(167, 139, 250, 0.2); border-color: rgba(167, 139, 250, 0.5); color: var(--violet-bright); }
.faq-a {
  padding: 0 24px 22px;
  max-width: 74ch;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--fg-dim);
}
.faq-a a { color: var(--cyan-bright); border-bottom: 1px solid currentColor; }

/* ── CTA ─────────────────────────────────────────── */
.cta {
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 140px);
}
.cta-box {
  position: relative;
  padding: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 64px);
  border-radius: var(--radius-xl);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(167, 139, 250, 0.3), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.2), transparent 50%),
    rgba(6, 8, 20, 0.8);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(20px);
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from 0deg at 50% 50%, rgba(167, 139, 250, 0.5), rgba(56, 189, 248, 0.4), rgba(244, 114, 182, 0.4), rgba(167, 139, 250, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateBorder 12s linear infinite;
}
.cta h2 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  max-width: 20ch;
  margin: 0 auto 24px;
  line-height: 0.98;
  font-weight: 500;
}
.cta h2 em { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.cta-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-mute);
  margin-top: 24px;
  letter-spacing: 0.06em;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--hairline);
  background: rgba(6, 8, 20, 0.6);
  backdrop-filter: blur(20px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 14px;
}
.footer-brand-line {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg-mute);
  max-width: 36ch;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--fg-dim);
  transition: color 0.25s;
}
.footer-col a:hover { color: var(--cyan-bright); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}

/* ── Legal page template ─────────────────────────── */
.page-hero {
  padding: clamp(56px, 8vw, 112px) 0 clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--hairline);
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.035em;
  margin-bottom: 14px;
  max-width: 20ch;
  font-weight: 500;
}
.page-hero p { font-size: 1rem; color: var(--fg-dim); max-width: 62ch; }
.page-hero-meta {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.prose h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 48px 0 14px;
  color: var(--fg);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--fg);
}
.prose p {
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 14px;
  color: var(--fg-dim);
}
.prose ul, .prose ol {
  margin: 8px 0 22px 22px;
  color: var(--fg-dim);
}
.prose ul li, .prose ol li { font-size: 0.98rem; line-height: 1.7; margin-bottom: 6px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--cyan-bright); border-bottom: 1px solid currentColor; }
.prose strong { color: var(--fg); font-weight: 500; }
.prose code {
  font-family: var(--mono);
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--cyan-bright);
  border: 1px solid var(--hairline);
}

.callout {
  padding: 22px 26px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.3);
  margin: 24px 0;
  position: relative;
}
.callout h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--violet-bright);
  margin-bottom: 8px;
}
.callout p { margin: 0; color: var(--fg); font-size: 0.95rem; }

.scopes-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 28px;
  font-size: 0.92rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.scopes-table th, .scopes-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.scopes-table th {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  font-weight: 500;
  background: var(--surface);
}
.scopes-table td code { font-size: 0.78em; white-space: nowrap; }
.scopes-table tr:last-child td { border-bottom: none; }

/* ── Reveal (progressive enhancement) ───────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: translateY(0); }
.js .reveal.delay-1 { transition-delay: 0.08s; }
.js .reveal.delay-2 { transition-delay: 0.16s; }
.js .reveal.delay-3 { transition-delay: 0.24s; }
.js .reveal.delay-4 { transition-delay: 0.32s; }

/* ─────────────────────────────────────────────────
   NOCTURNE LIVE ELEMENTS
   Bridge-wire signature motif + breathing glows +
   shimmer underlines + metric heartbeat
   ───────────────────────────────────────────────── */

/* Bridge-wire: a thin luminous line that traces between sections */
.bx-wire {
  position: relative;
  height: 120px;
  width: 100%;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.bx-wire.in, .js .bx-wire.in { opacity: 1; transform: translateY(0); }
.bx-wire svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bx-wire .line {
  fill: none;
  stroke: url(#bxWireGrad);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: bxWireDraw 3.4s var(--ease) 0.3s forwards;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.45));
}
.bx-wire .dot {
  fill: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.85));
  opacity: 0;
  animation: bxWireDot 2.6s ease-in-out 3.2s infinite;
}
@keyframes bxWireDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes bxWireDot {
  0%   { opacity: 0; offset-distance: 0%; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

/* Live metric heartbeat — subtle pulse behind counter numbers */
.hero-stat-num {
  position: relative;
  display: inline-block;
}
.hero-stat-num::after {
  content: '';
  position: absolute;
  inset: -6px -10px;
  background: radial-gradient(ellipse at center, rgba(167, 139, 250, 0.18), transparent 70%);
  z-index: -1;
  opacity: 0;
  animation: bxHeartbeat 3.2s ease-in-out 1.6s infinite;
  border-radius: 50%;
}
@keyframes bxHeartbeat {
  0%, 100% { opacity: 0; transform: scale(0.9); }
  50%      { opacity: 1; transform: scale(1.05); }
}

/* Breathing halo behind the hero — slower, more ambient */
.hero::before {
  content: '';
  position: absolute;
  left: 50%; top: 20%;
  width: 900px; height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(167, 139, 250, 0.22),
    rgba(56, 189, 248, 0.10) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  animation: bxBreathe 9s ease-in-out infinite alternate;
}
@keyframes bxBreathe {
  0%   { opacity: 0.55; transform: translateX(-50%) scale(0.96); }
  100% { opacity: 0.9;  transform: translateX(-50%) scale(1.05); }
}
.hero > .container { position: relative; z-index: 1; }

/* Tiny live-indicator badge — blinking dot + monospace timestamp */
.bx-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--cyan-bright);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bx-live-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulseDot 1.6s ease-in-out infinite;
}

/* Shimmer underline hover for nav-like links */
.bx-shimmer-hover {
  position: relative;
  display: inline-block;
}
.bx-shimmer-hover::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--grad-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}
.bx-shimmer-hover:hover::after { transform: scaleX(1); }

/* Scroll-linked noise grain overlay (imperceptible but keeps the image alive) */
.bx-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
  animation: bxGrainJitter 0.9s steps(5) infinite;
}
@keyframes bxGrainJitter {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 1%); }
  40%  { transform: translate(1%, -2%); }
  60%  { transform: translate(-1%, 2%); }
  80%  { transform: translate(2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .flow-grid { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .flow-svg { display: none; }
  .caps-head { grid-template-columns: 1fr; }
  .cap, .cap.cap-wide, .cap.cap-narrow { grid-column: span 6; }
  .cap.cap-full { grid-column: span 12; }
  .sectors { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat + .stat::before { display: none; }
  .trust-grid { grid-template-columns: 1fr; gap: 36px; }
  .trust-inner { padding: 40px 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-stats { max-width: none; }
}

@media (max-width: 720px) {
  .nav { margin: 12px var(--gutter); top: 12px; }
  .nav-inner { height: 56px; padding: 0 16px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .flow-grid { grid-template-columns: 1fr; gap: 16px; }
  .cap, .cap.cap-wide, .cap.cap-narrow { grid-column: span 12; }
  .stats-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .inbox-body { grid-template-columns: 1fr; }
  .inbox-side { display: none; }
  .inbox-row { grid-template-columns: 72px 1fr 40px; }
  .inbox-from { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .cta-box { padding: 48px 24px; }
}

/* ── Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track, .flow-path { animation: none; }
  .flow-path { stroke-dasharray: 0; }
}

::selection { background: var(--violet); color: #fff; }
