/* ================================================================
   N8iV Intelligence — Design System
   "Atelier" — editorial, authoritative, consulting-grade aesthetic
   Ink on warm ivory · serif display · hairline rules · deep indigo
   ================================================================ */

:root {
  /* ── Deep-ink section tokens (overridden in light context per   */
  /*    section; .bg-dark scopes them back to a true dark field) ── */
  --dark:        #E9E3D6;            /* recessed warm band */
  --dark-2:      #F1EDE4;            /* panel */
  --dark-3:      #F7F5EE;            /* card on band */
  --dark-4:      #ECE7DC;            /* inset / track tint */
  --dark-border: #E2DCCD;
  --dark-border-2: #D6CFBE;

  /* ── Light surface tokens (warm paper) ───────────────────── */
  --page:       #F4F1EA;             /* warm paper */
  --surface:    #FFFFFF;
  --surface-2:  #F4F1E9;
  --surface-3:  #EBE7DC;
  --border:     #E5E0D4;             /* hairline */
  --border-2:   #D6D0C1;

  /* ── Text ────────────────────────────────────────────────── */
  --ink:        #14161D;             /* near-black */
  --ink-2:      #24272F;
  --ink-3:      #41454E;
  --muted:      #6B6F78;
  --subtle:     #9A9DA4;
  --on-dark:    #14161D;             /* default = dark text (light ctx) */
  --on-dark-2:  #565a63;

  /* ── Accent — deep refined indigo (premium brand translation) ─ */
  --blue:       #423B9E;             /* authority indigo */
  --blue-light: #ECEAF4;
  --blue-hover: #332D80;
  --blue-deep:  #272264;
  --green:      #1E7355;             /* refined emerald for data-positive */
  --green-light:#E7F1EB;
  --green-dark: #155A42;
  --red:        #A93B36;
  --red-light:  #F5ECEA;
  --amber:      #9C7A2A;
  --ink-accent: #14161D;             /* near-black primary button */

  /* ── Gradients (restrained) ──────────────────────────────── */
  --grad-primary: linear-gradient(180deg, #1A1C24 0%, #14161D 100%);
  --grad-primary-soft: linear-gradient(135deg, #F2F1FA 0%, #ECEAF4 100%);
  --grad-field: linear-gradient(150deg, #3E37A0 0%, #534BC4 100%);

  /* ── Surfaces (flat — glass tokens neutralised to opaque) ──── */
  --glass:        #FFFFFF;
  --glass-strong: #FFFFFF;
  --glass-soft:   #FBF9F3;
  --glass-border: var(--border);
  --glass-blur:   saturate(100%) blur(0px);

  /* ── Typography ──────────────────────────────────────────── */
  --ff: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-serif: 'Source Serif 4', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --ff-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* ── Layout ──────────────────────────────────────────────── */
  --maxw:    1180px;
  --gutter:  40px;
  --nav-h:   76px;

  /* ── Radii (sharp, editorial) ────────────────────────────── */
  --r-xs:  2px;
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  8px;
  --r-xl:  12px;
  --r-2xl: 16px;
  --r-pill: 999px;

  /* ── Shadows (minimal, neutral) ──────────────────────────── */
  --shadow-sm:  0 1px 2px rgba(20,22,29,0.05);
  --shadow-md:  0 10px 30px rgba(20,22,29,0.08), 0 2px 6px rgba(20,22,29,0.04);
  --shadow-lg:  0 30px 70px rgba(20,22,29,0.12), 0 8px 20px rgba(20,22,29,0.06);
  --shadow-blue: 0 8px 24px rgba(20,22,29,0.14);
}

/* ================================================================
   BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  color: var(--ink);
  background:
    radial-gradient(1200px 680px at 100% -6%, #EFEBE0 0%, transparent 62%),
    linear-gradient(180deg, #F7F4ED 0%, #F2EFE7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: 0; padding: 0; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--blue); color: #fff; }

/* ================================================================
   LAYOUT
   ================================================================ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 116px 0; }
.section-sm { padding: 76px 0; }
.section-lg { padding: 144px 0; }

/* Alternating sections */
.bg-surface { background: var(--surface); }
.bg-page    { background: var(--page); }
.bg-dark-2  { background: var(--dark-2); }

/* Recessed warm band — distinguishes the dashboard & case-study
   sections within the all-light scheme. White panels/cards lift off it. */
.bg-dark {
  background: var(--dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
.display-xl {
  font-family: var(--ff-serif);
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.display-lg {
  font-family: var(--ff-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.display-md {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.008em;
  color: var(--ink);
}
.display-sm {
  font-family: var(--ff-serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.on-dark .display-xl,
.on-dark .display-lg,
.on-dark .display-md,
.on-dark .display-sm { color: var(--on-dark); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--blue);
  border-radius: 0;
  flex-shrink: 0;
}
.on-dark .eyebrow { color: var(--on-dark-2); }
.on-dark .eyebrow::before { background: var(--blue); }

.lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 640px;
}
.on-dark .lead { color: var(--on-dark-2); }

.body { font-size: 16px; line-height: 1.65; color: var(--ink-3); }
.body-sm { font-size: 14px; line-height: 1.6; color: var(--muted); }

.text-blue  { color: var(--blue); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--muted); }

.mono {
  font-family: var(--ff-mono);
  font-size: 0.875em;
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
}
/* Solid frosted header bar with a hairline rule — opaque enough that
   dark sections scroll cleanly beneath it, so nav stays ink-on-ivory. */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(247,244,237,0.82);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
          backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
  pointer-events: none;
  z-index: 0;
}
.nav-inner { position: relative; z-index: 1; }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav.light .nav-logo { color: var(--ink); }
.nav-logo-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  display: block;
  line-height: 1;
  margin-top: 1px;
}
.nav.light .nav-logo-sub { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav.light .nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); background: rgba(20,22,29,0.05); }
.nav.light .nav-links a:hover { color: var(--ink); background: rgba(20,22,29,0.05); }
.nav-links a.active { color: var(--ink); background: transparent; font-weight: 600; }
.nav.light .nav-links a.active { color: var(--ink); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-badge .dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-green 2s ease-out infinite;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--r-sm);
  padding: 13px 24px;
  transition: transform 0.2s cubic-bezier(.2,.7,.2,1), box-shadow 0.2s, background 0.2s, opacity 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink-accent);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: #000; box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* near-black accent button (reference "Use Jet AI" / "Generate") */
.btn-dark {
  background: var(--ink-accent);
  color: #fff;
}
.btn-dark:hover { background: #000; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(20,21,43,0.30); }

.btn-ghost-dark {
  background: transparent;
  color: var(--on-dark);
  border: 1px solid var(--border-2);
}
.cta-section .btn-ghost-dark { border-color: rgba(255,255,255,0.32); }
.btn-ghost-dark:hover { background: rgba(20,22,29,0.04); border-color: var(--ink); transform: translateY(-2px); }
.cta-section .btn-ghost-dark:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.6); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: rgba(20,22,29,0.04); border-color: var(--ink); transform: translateY(-2px); }

.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-green:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 15px; gap: 10px; }
.btn-xl { padding: 18px 38px; font-size: 16px; gap: 12px; }

.btn-arrow { display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s; }
.btn:hover .btn-arrow { gap: 10px; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  background: transparent;
  padding-top: calc(var(--nav-h) + 88px);
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

/* Faint editorial baseline grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(20,22,29,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,29,0.028) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 75% 65% at 70% 0%, black, transparent 80%);
  pointer-events: none;
}

/* Glow orbs — reduced to faint warm wash for depth, not spectacle */
.hero-glow-1 {
  position: absolute;
  width: 680px; height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66,59,158,0.08) 0%, transparent 68%);
  top: -260px; left: -160px;
  filter: blur(8px);
  pointer-events: none;
  will-change: transform;
}
.hero-glow-2 {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160,140,90,0.07) 0%, transparent 70%);
  top: 40px; right: -80px;
  filter: blur(8px);
  pointer-events: none;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  padding: 7px 14px 7px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 30px;
}
.hero-badge .badge-dot {
  width: 7px; height: 7px;
  background: var(--blue);
  color: transparent;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0;
  overflow: hidden;
}

.hero h1 { color: var(--ink); margin: 0 0 26px; text-wrap: balance; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--blue); }

.hero-sub {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0 0 40px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-trust {
  margin-top: 48px;
  display: flex;
  align-items: center;
}
.hero-trust-items {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-trust-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-dark-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-trust-item::before {
  content: '';
  width: 16px; height: 16px;
  background: var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ================================================================
   ATTRIBUTION FLOW (HERO)
   ================================================================ */
.flow-diagram {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 340px;
  margin-top: 72px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.flow-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 62%, rgba(241,240,253,0.55) 100%);
  z-index: 10;
  pointer-events: none;
}

.flow-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.flow-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.flow-node .node-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.flow-node.meta    .node-icon { background: #1877F2; color: #fff; }
.flow-node.google  .node-icon { background: #fff; color: #4285F4; }
.flow-node.li      .node-icon { background: #0A66C2; color: #fff; }
.flow-node.tiktok  .node-icon { background: #000; color: #fff; }
.flow-node.crm     .node-icon { background: #FF7A59; color: #fff; }
.flow-node.pipe    .node-icon { background: var(--blue); color: #fff; }
.flow-node.rev     .node-icon { background: var(--green); color: #fff; }
.flow-node.engine  {
  border-color: rgba(66,59,158,0.30);
  background: linear-gradient(135deg, rgba(66,59,158,0.07), rgba(66,59,158,0.03));
  flex-direction: column;
  align-items: flex-start;
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.flow-node.engine .engine-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 4px;
}

/* Connecting lines */
.flow-lines {
  flex: 1;
  position: relative;
  height: 100%;
}
.flow-line-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

/* Animated particles on lines */
@keyframes particle-flow {
  0%   { offset-distance: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.flow-particle {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  position: absolute;
  animation: particle-flow 2.4s linear infinite;
}
.flow-particle.green { background: var(--green); }

/* ================================================================
   PROBLEM STATEMENT
   ================================================================ */
.problem-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}

.problem-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s;
}
.problem-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.problem-card.meta::before   { background: #1877F2; }
.problem-card.google::before { background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335); }
.problem-card.crm::before    { background: #FF7A59; }
.problem-card.finance::before{ background: var(--green); }

.problem-card-logo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.problem-card-logo .logo-dot {
  width: 20px; height: 20px;
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.problem-card.meta   .logo-dot { background: #1877F2; }
.problem-card.google .logo-dot { background: #4285F4; }
.problem-card.crm    .logo-dot { background: #FF7A59; }
.problem-card.finance .logo-dot { background: var(--green); }

.problem-metric {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.problem-card.meta    .problem-metric,
.problem-card.google  .problem-metric,
.problem-card.crm     .problem-metric { color: var(--ink); }
.problem-card.finance .problem-metric { color: var(--green); }

.problem-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.problem-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-light);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.problem-card.finance .problem-note {
  color: var(--ink-3);
  background: var(--surface-2);
}

.problem-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 16px;
}
.problem-insight {
  background: var(--grad-field);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px 36px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
  max-width: 680px;
  margin: 40px auto 0;
  box-shadow: var(--shadow-lg);
}
.problem-insight em { font-style: normal; color: #EAFBF3; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); text-underline-offset: 3px; }

/* ================================================================
   METHODOLOGY / CLOSED-LOOP SYSTEM
   ================================================================ */
.system-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 64px;
  position: relative;
}
.system-flow::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(10%);
  right: calc(10%);
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  z-index: 0;
}

.system-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.step-icon {
  width: 76px; height: 76px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--r-xl);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-size: 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.step-icon.active,
.system-step:hover .step-icon {
  border-color: rgba(66,59,158,0.40);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* ================================================================
   DASHBOARD MOCKUP
   ================================================================ */
.dashboard-wrap {
  margin-top: 64px;
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.dash-chrome {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--dark-3);
  border-bottom: 1px solid var(--dark-border);
  gap: 8px;
}
.dash-dot { width: 12px; height: 12px; border-radius: 50%; }
.dash-dot.red    { background: #FF5F57; }
.dash-dot.amber  { background: #FEBC2E; }
.dash-dot.green  { background: #28C840; }
.dash-url {
  flex: 1;
  background: var(--dark-4);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-sm);
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--ff-mono);
  color: var(--on-dark-2);
  text-align: center;
}

.dash-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 460px;
}

.dash-sidebar {
  background: var(--dark-3);
  border-right: 1px solid var(--dark-border);
  padding: 20px 0;
}
.dash-logo-mini {
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--dark-border);
  font-size: 15px;
  font-weight: 800;
  color: var(--on-dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.dash-logo-mini span { color: var(--blue); }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--on-dark-2);
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.dash-nav-item:hover {
  background: rgba(66,59,158,0.06);
  color: var(--ink);
}
.dash-nav-item.active {
  background: rgba(66,59,158,0.10);
  color: var(--blue-deep);
  font-weight: 600;
}
.dash-nav-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--dark-4);
  flex-shrink: 0;
}
.dash-nav-item.active .dash-nav-dot { background: var(--blue); }

.dash-main { padding: 24px; overflow: hidden; }
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dash-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--on-dark);
  letter-spacing: -0.02em;
}
.dash-period {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-dark-2);
  background: var(--dark-4);
  border: 1px solid var(--dark-border);
  padding: 5px 12px;
  border-radius: var(--r-sm);
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--dark-3);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--on-dark);
  margin-bottom: 6px;
}
.kpi-delta {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }

.dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-chart {
  background: var(--dark-3);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-md);
  padding: 16px;
}
.dash-chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-dark-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 80px 1fr 48px; gap: 10px; align-items: center; }
.bar-name { font-size: 12px; color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--dark-4); border-radius: var(--r-pill); height: 8px; overflow: hidden; }
.bar-fill  { height: 100%; width: 100%; border-radius: var(--r-pill); transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.bar-val   { font-size: 12px; font-weight: 600; color: var(--on-dark); text-align: right; font-family: var(--ff-mono); }

/* Attribution pie-ish chart */
.attr-rows { display: flex; flex-direction: column; gap: 8px; }
.attr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.attr-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.attr-channel { flex: 1; color: var(--on-dark-2); }
.attr-pct { font-weight: 700; color: var(--on-dark); font-family: var(--ff-mono); }
.attr-bar { flex: 1.5; background: var(--dark-4); border-radius: var(--r-pill); height: 6px; overflow: hidden; }
.attr-bar-fill { height: 100%; border-radius: var(--r-pill); transform-origin: left; transition: transform 1s cubic-bezier(.2,.7,.2,1); will-change: transform; }

/* ================================================================
   OUTCOMES GRID
   ================================================================ */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.outcome-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-xl);
  padding: 32px;
  transition: border-color 0.25s, transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s;
}
.outcome-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.outcome-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--grad-primary-soft);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.outcome-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
}
.outcome-card p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0; }

/* ================================================================
   INTEGRATIONS
   ================================================================ */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
.integration-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s cubic-bezier(.2,.7,.2,1), box-shadow 0.2s;
  cursor: default;
}
.integration-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.integration-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.integration-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}
.integration-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

/* ================================================================
   CASE STUDIES
   ================================================================ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.case-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: border-color 0.25s, transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s;
}
.case-card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.case-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  border: 1px solid rgba(66,59,158,0.18);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  display: inline-block;
}

.case-problem {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--on-dark);
  line-height: 1.25;
  margin: 0;
}

.case-body { font-size: 14px; line-height: 1.65; color: var(--on-dark-2); margin: 0; }

.case-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--dark-border);
}
.case-metric-val {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--green);
}
.case-metric-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-top: 4px;
}

/* ================================================================
   PROCESS STEPS
   ================================================================ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 64px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.process-step:last-child { border-bottom: none; }
.process-step-num {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-family: var(--ff-mono);
  box-shadow: var(--shadow-md);
}
.process-step h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
  padding-top: 8px;
}
.process-step p { font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0; }
.process-step .step-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

/* ================================================================
   FINAL CTA
   ================================================================ */
.cta-section {
  background: var(--grad-field);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  margin: 0 16px;
  box-shadow: var(--shadow-lg);
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(255,255,255,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 12% -10%, rgba(255,255,255,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.cta-section .wrap { position: relative; z-index: 1; text-align: center; }
/* scope text tokens to white so inline on-dark refs read on the purple field */
.cta-section { --on-dark: #ffffff; --on-dark-2: rgba(255,255,255,0.85); }
.cta-section h2,
.cta-section .display-xl,
.cta-section .display-lg,
.cta-section .display-md { color: #fff; margin: 0 0 20px; text-wrap: balance; }
.cta-section .lead { color: rgba(255,255,255,0.90); margin: 0 auto 40px; }
.cta-section .eyebrow { color: #fff; }
.cta-section .eyebrow::before { background: rgba(255,255,255,0.85); }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { }
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--on-dark);
  letter-spacing: -0.02em;
}
.footer-tagline {
  font-size: 14px;
  line-height: 1.65;
  color: var(--on-dark-2);
  max-width: 280px;
  margin-bottom: 24px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin: 0 0 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  font-size: 14px;
  color: var(--on-dark-2);
  transition: color 0.15s;
}
.footer-col ul a:hover { color: var(--on-dark); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--on-dark-2);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--on-dark-2); }
.footer-bottom-links a:hover { color: var(--on-dark); }

/* ================================================================
   REVEAL ANIMATION
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(.2,.7,.2,1),
              transform 0.75s cubic-bezier(.2,.7,.2,1);
}
.reveal.stagger-1 { transition-delay: 0.1s; }
.reveal.stagger-2 { transition-delay: 0.2s; }
.reveal.stagger-3 { transition-delay: 0.3s; }
.reveal.stagger-4 { transition-delay: 0.4s; }
.reveal.stagger-5 { transition-delay: 0.5s; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ================================================================
   SECTION DIVIDERS
   ================================================================ */
.section-label { margin-bottom: 56px; }
.section-label .display-lg,
.section-label .display-md { margin: 8px 0 0; }
.section-label-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .problem-cards { grid-template-columns: repeat(2,1fr); }
  .integrations-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .system-flow { grid-template-columns: 1fr; }
  .system-flow::before { display: none; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-kpis { grid-template-columns: repeat(2,1fr); }
  .dash-charts { grid-template-columns: 1fr; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .integrations-grid { grid-template-columns: repeat(2,1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 40px; }
  .nav-links, .nav-badge, .nav-right { display: none; }
  .nav .nav-mobile-toggle { display: flex; }
}

/* ================================================================
   MOBILE NAV TOGGLE
   ================================================================ */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
  flex-shrink: 0;
}
.nav-mobile-toggle:hover { background: rgba(255,255,255,0.07); }
.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--on-dark-2);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}
.nav-mobile-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* ================================================================
   MOBILE MENU OVERLAY
   ================================================================ */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 180;
  background: var(--page);
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
}
#mobile-menu.open { display: flex; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-link {
  font-family: var(--ff-serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  padding: 10px 0;
  transition: color 0.15s;
  line-height: 1.2;
}
.mobile-nav-link:hover { color: var(--on-dark); }
.mobile-nav-cta {
  margin-top: 28px;
  align-self: flex-start;
}

/* ================================================================
   ICON STYLES
   ================================================================ */
.step-icon svg   { color: var(--blue); }
.outcome-icon svg { color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
