/* ============================================================
   1. CSS Custom Properties — Full palette + tokens
   ============================================================ */
:root {
  /* Colour palette */
  --bg-deepest: #030014;
  --bg-elevated: #0a0a1a;
  --bg-surface: #111827;
  --bg-surface-hover: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #6f00ff;
  --accent-secondary: #00d4ff;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --success: #10b981;
  --error: #f43f5e;
  --warning: #f59e0b;

  /* Spacing & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Fonts */
  --font-heading: "Satoshi", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout */
  --nav-height: 72px;
  --max-width: 1280px;
  --container-padding: clamp(1rem, 5vw, 3rem);
  --section-gap: clamp(5rem, 12vw, 10rem);
}

/* ============================================================
   2. CSS Reset
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   3. Base Styles
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-deepest);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ============================================================
   4. Noise Overlay — G12: exact SVG data URI
   ============================================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ============================================================
   5. Typography — clamp() sizing, .gradient-text (G2), .overline
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* G2: solid color fallback before background-clip */
.gradient-text {
  color: var(--accent-primary);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
  display: block;
}

/* ============================================================
   6. Layout Utilities — .container, .section, grids, hero layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-header {
  max-width: 700px;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin-top: 0.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Hero layout — shared across all pages, G3 dvh fallback */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-mesh {
  position: absolute;
  inset: 0;
}

.hero-noise {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1.5rem auto 0;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

/* ============================================================
   7. Navigation — G1 webkit backdrop-filter, G16 active link
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--container-padding);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.nav.scrolled {
  background: rgba(3, 0, 20, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* G16: Active page highlight — desktop and mobile overlay */
.nav-links a.active,
.nav-overlay a.active {
  color: var(--accent-secondary);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

/* Mobile nav overlay — G1 webkit backdrop */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 101; /* must exceed .nav (100) so close button is not occluded */
  background: rgba(3, 0, 20, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.2s;
}

.nav-overlay a:hover {
  color: var(--accent-secondary);
}

.nav-overlay-close {
  position: absolute;
  top: 1.5rem;
  right: var(--container-padding);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-actions .btn-primary {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ============================================================
   8. Buttons — .btn-primary gradient + glow, .btn-secondary ghost
   ============================================================ */
.btn-primary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #7c10ff 0%, #5800d4 100%);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition:
    transform 0.2s,
    box-shadow 0.3s,
    background 0.3s;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(111, 0, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 48px rgba(111, 0, 255, 0.45);
  background: linear-gradient(135deg, #8c1fff 0%, #6600e8 100%);
}

.btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition:
    border-color 0.3s,
    background 0.3s;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   9. Glassmorphic Cards — G1 webkit backdrop, G8 mask-composite
   ============================================================ */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.3s;
}

.card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
  box-shadow:
    0 8px 40px rgba(111, 0, 255, 0.1),
    0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Gradient border on hover via ::before — G8 */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* ============================================================
   10. Card Icon — 48x48, gradient bg
   ============================================================ */
.card-illustration {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-illustration svg {
  width: 100px;
  height: 80px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(111, 0, 255, 0.2),
    rgba(0, 212, 255, 0.2)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.card h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   11. Stats — .stat-number gradient text (G2), .stat-label
   ============================================================ */
.stats-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3rem 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 1rem 2rem;
  overflow: visible;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--border-subtle);
}

/* G2: solid color fallback */
.stat-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25em;
  color: var(--accent-primary);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   12. Dashboard Mock — .dashboard-window, .dashboard-chrome, .dash-queue, .dash-results, .dash-pipeline
   ============================================================ */
.dashboard-window {
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  overflow: hidden;
  margin-top: 3rem;
  box-shadow:
    0 0 80px rgba(111, 0, 255, 0.14),
    0 0 160px rgba(0, 212, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Always-visible gradient border — G8 mask-composite */
.dashboard-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.dashboard-chrome {
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.chrome-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}

.chrome-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.dashboard-body {
  display: flex;
  position: relative;
  z-index: 2;
  min-height: 400px;
}

/* Left panel — Document Queue (30%) */
.dash-queue {
  width: 30%;
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.dash-queue-header,
.dash-results-header,
.dash-pipeline-header {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border-subtle);
}

.queue-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s;
}

.queue-item:last-child {
  border-bottom: none;
}
.queue-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.queue-item.active {
  background: rgba(111, 0, 255, 0.08);
}

.queue-filename {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-type {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.queue-status-row {
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}

.status-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  line-height: 1;
}

.status-pill-processed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.status-pill-processing {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  animation: pulse-amber 1.8s ease-in-out infinite;
}
.status-pill-queued {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

@keyframes pulse-amber {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Centre panel — Extraction Results (45%) */
.dash-results {
  flex: 1;
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem;
  min-width: 0;
}

/* Right panel — Processing Pipeline (25%) */
.dash-pipeline {
  width: 25%;
  padding: 1.25rem;
  flex-shrink: 0;
}

.dash-results-file {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.results-table thead tr {
  background: rgba(255, 255, 255, 0.04);
}

.results-table th {
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0.5rem 0.625rem;
  text-align: left;
  white-space: nowrap;
}

.results-table td {
  padding: 0.45rem 0.625rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}
.results-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.field-name {
  color: var(--text-secondary);
  font-size: 0.76rem;
  white-space: nowrap;
}

.field-value {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.conf-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.conf-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.8rem;
}

.conf-bar-track {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.conf-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.conf-green .conf-label {
  color: var(--success);
}
.conf-green .conf-bar-fill {
  background: var(--success);
}
.conf-amber .conf-label {
  color: var(--warning);
}
.conf-amber .conf-bar-fill {
  background: var(--warning);
}
.conf-red .conf-label {
  color: var(--error);
}
.conf-red .conf-bar-fill {
  background: var(--error);
}

/* Pipeline Stepper (inside dashboard) */
.pipeline-steps {
  display: flex;
  flex-direction: column;
}

.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 14px;
}

.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-dot-complete {
  background: var(--success);
}

.step-dot-active {
  background: transparent;
  border: 2px solid var(--warning);
  animation: pulse-pipeline 1.8s ease-in-out infinite;
}

.step-dot-active::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--warning);
  border-radius: 50%;
}

.step-dot-pending {
  background: transparent;
  border: 2px solid rgba(148, 163, 184, 0.25);
}

@keyframes pulse-pipeline {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0);
  }
}

.step-line {
  width: 2px;
  height: 20px;
  flex-shrink: 0;
  margin: 2px 0;
}

.step-line-complete {
  background: var(--success);
}
.step-line-upcoming {
  background: rgba(148, 163, 184, 0.15);
}

.step-content {
  padding-top: 0;
  padding-bottom: 0.1rem;
  line-height: 1.3;
  min-height: 14px;
  display: flex;
  align-items: center;
}

.step-label {
  font-size: 0.76rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.step-label-complete {
  color: var(--text-secondary);
}
.step-label-active {
  color: var(--warning);
}
.step-label-pending {
  color: var(--text-muted);
}

.step-spacer {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.balance-verified {
  margin-top: 1.25rem;
  padding: 0.625rem 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
}

.balance-verified-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--success);
  margin-bottom: 0.2rem;
}

.balance-verified-eq {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   13. Excel Spreadsheet Mock — G17 ribbon #217346
   ============================================================ */
.excel-scroll-wrapper {
  overflow-x: auto;
}

.excel-window {
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  overflow: hidden;
  margin-top: 3rem;
  box-shadow:
    0 0 80px rgba(111, 0, 255, 0.14),
    0 0 160px rgba(0, 212, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Always-visible gradient border — G8 */
.excel-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

/* G17: Excel ribbon green */
.excel-ribbon {
  background: #217346;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.excel-ribbon-tab {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.375rem 0.875rem;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: background 0.2s;
}

.excel-ribbon-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.excel-ribbon-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Formula bar */
.excel-formula-bar {
  height: 28px;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  position: relative;
  z-index: 2;
}

.excel-cell-ref {
  padding: 0 0.5rem;
  border-right: 1px solid var(--border-default);
  color: var(--text-secondary);
  min-width: 40px;
  text-align: center;
}

.excel-formula {
  padding: 0 0.5rem;
  color: var(--text-muted);
  flex: 1;
}

/* Grid */
.excel-grid {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: fixed;
}

/* Column headers (A, B, C…) */
.excel-table thead th {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  text-align: center;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
}

/* Row number column */
.excel-table .excel-row-num {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  width: 32px;
  min-width: 32px;
  padding: 0.3rem;
}

/* Data cells */
.excel-table td {
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.excel-table td.text-cell {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.78rem;
}

.excel-table td.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Header row */
.excel-table tr.header-row td {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

/* Cell A1 selection indicator — G17 Excel green */
.excel-table td.active-cell {
  outline: 2px solid #217346;
  outline-offset: -1px;
}

/* Status text */
.excel-table .status-verified {
  color: var(--success);
}

/* Sheet tabs */
.excel-sheet-tabs {
  height: 28px;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 0 0.5rem;
  position: relative;
  z-index: 2;
}

.excel-sheet-tab {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-right: 1px solid var(--border-subtle);
  cursor: pointer;
}

.excel-sheet-tab.active {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.excel-sheet-tab-add {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

/* Status bar */
.excel-status-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 0 0.75rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 2;
}

/* ============================================================
   14. Document Preview Mock — PDF to data
   ============================================================ */
.doc-preview-container {
  display: flex;
  align-items: stretch;
  margin-top: 3rem;
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  overflow: hidden;
  box-shadow:
    0 0 80px rgba(111, 0, 255, 0.14),
    0 0 160px rgba(0, 212, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Gradient border — G8 */
.doc-preview-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.doc-preview-pdf {
  width: 40%;
  padding: 1.5rem;
  border-right: 1px solid var(--border-subtle);
  position: relative;
  z-index: 2;
}

.doc-preview-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 2;
}

.doc-preview-arrow-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  white-space: nowrap;
}

.doc-arrow-line {
  animation: pipeline-dash 2s linear infinite;
}

.doc-preview-data {
  flex: 1;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

/* Redacted line bars for PDF mock */
.redacted-bar {
  background: var(--text-muted);
  opacity: 0.15;
  border-radius: 4px;
  height: 10px;
  margin-bottom: 6px;
}

.redacted-bar.thin {
  height: 6px;
  margin-bottom: 4px;
}

/* ============================================================
   15. Pipeline Flow — stroke-dashoffset animation (marching-ants effect on SVG connector lines)
   ============================================================ */
.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0;
  position: relative;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.pipeline-node-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  position: relative;
  color: var(--accent-secondary);
}

/* Gradient border on pipeline node */
.pipeline-node-circle::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  z-index: -1;
}

.pipeline-node-circle::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--bg-surface);
  z-index: -1;
}

.pipeline-node-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-connector {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 100px;
}

.pipeline-connector svg {
  width: 100%;
  height: 4px;
  overflow: visible;
}

.pipeline-connector-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  white-space: nowrap;
}

.pipeline-line {
  stroke-dasharray: 8 4;
  animation: pipeline-dash 2s linear infinite;
}

@keyframes pipeline-dash {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ============================================================
   16. Before/After — compact 1-row layout
   ============================================================ */
.ba-section {
  padding: 6rem 0;
}

.ba-section h2 {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.ba-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.ba-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ba-card.ba-before {
  border-top: 3px solid var(--error);
}

.ba-card.ba-after {
  border-top: 3px solid var(--success);
}

.ba-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ba-card.ba-before .ba-card-header {
  color: var(--error);
}
.ba-card.ba-after .ba-card-header {
  color: var(--success);
}

.ba-card.ba-before h3 {
  color: var(--error);
}
.ba-card.ba-after h3 {
  color: var(--success);
}

.ba-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.ba-card li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ba-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.5rem;
}

.ba-arrow-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   17. Why AI Stone (objections rework) — uses .card + .grid-3
   ============================================================ */
.why-section {
  background: var(--bg-elevated);
}

.why-section h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

/* ============================================================
   18. How It Works — step circles + connecting lines
   ============================================================ */
.how-it-works-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.how-it-works-steps {
  display: flex;
  gap: 0;
  position: relative;
}

.how-it-works-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
}

/* Connecting line between step circles */
.how-it-works-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(111, 0, 255, 0.5),
    rgba(0, 212, 255, 0.5)
  );
  z-index: 0;
}

.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-bottom: 1.25rem;
}

/* Gradient border on step circle */
.step-circle::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  z-index: -1;
}

.step-circle::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--bg-surface);
  z-index: -1;
}

.how-it-works-step h4 {
  margin-bottom: 0.5rem;
}

.step-time-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-secondary);
  background: rgba(0, 212, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  margin-bottom: 1rem;
}

.how-it-works-step p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 280px;
}

/* ============================================================
   19. Marquee — @keyframes + edge fade
   ============================================================ */
.marquee {
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-deepest), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-deepest), transparent);
}

.marquee-track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-content {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.marquee-content span {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ============================================================
   20. Infrastructure — .infra-quote glassmorphic + gradient bar
   ============================================================ */
.infra-quote {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 3rem 3.5rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.infra-quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 0 0 3px 3px;
}

.infra-quote h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.infra-quote p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================================
   21. Contact
   ============================================================ */
.contact-section {
  text-align: center;
  padding: 8rem 0;
  position: relative;
}

.contact-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-section .contact-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.contact-details a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-details a:hover {
  color: var(--text-primary);
}

/* ============================================================
   22. Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  background: var(--bg-deepest);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ============================================================
   23. Closing Quotes
   ============================================================ */
.closing-quotes {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.closing-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
  border: none;
  padding: 0;
  position: relative;
}

.closing-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.25rem;
  color: var(--accent-primary);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.5;
}

.closing-quote-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  margin: 0 auto;
  border-radius: 2px;
}

/* ============================================================
   24. Accessibility — .skip-link, :focus-visible, reduced motion
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-family: var(--font-body);
  z-index: 10000;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* G11: Disable CSS animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .status-pill-processing,
  .step-dot-active,
  .marquee-track,
  .pipeline-line,
  .hero-mesh {
    animation: none;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 4px;
  border-radius: var(--radius-full);
}

/* ============================================================
   26. Challenge Section — counter-stat grid with SVG illustrations
   ============================================================ */
.challenge-section {
  background: var(--bg-elevated);
}

.challenge-section h2 {
  text-align: center;
  margin-bottom: 3.5rem;
}

.challenge-stats {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}

.challenge-stat {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.challenge-stat + .challenge-stat {
  border-left: 1px solid var(--border-subtle);
}

.challenge-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  width: 140px;
  height: 140px;
  max-width: 100%;
  overflow: hidden;
}

.challenge-stat-icon svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ── Illustration ambient animations (prefers-reduced-motion gated) ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ill-processing-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.3;
    }
  }
  @keyframes ill-cell-fill {
    0% {
      fill-opacity: 0;
    }
    15% {
      fill-opacity: 0.25;
    }
    85% {
      fill-opacity: 0.25;
    }
    100% {
      fill-opacity: 0;
    }
  }
  @keyframes ill-row-scroll {
    0% {
      transform: translateY(0);
    }
    100% {
      transform: translateY(-32px);
    }
  }
  @keyframes ill-data-loop {
    0%,
    100% {
      opacity: 0.4;
    }
    50% {
      opacity: 1;
    }
  }
  @keyframes ill-scan-sweep {
    0% {
      transform: translateY(-10px);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: translateY(30px);
      opacity: 0;
    }
  }
  @keyframes ill-gear-rotate {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  @keyframes ill-doc-wobble {
    0%,
    100% {
      transform: rotate(0deg) translate(0, 0);
    }
    25% {
      transform: rotate(0.5deg) translate(0.5px, -0.5px);
    }
    75% {
      transform: rotate(-0.5deg) translate(-0.5px, 0.5px);
    }
  }
}

.challenge-stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--accent-primary);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.challenge-stat-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.375rem;
}

.challenge-stat-detail {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Glow pulse class — toggled by GSAP on counter completion */
.challenge-stat-number.glow {
  text-shadow:
    0 0 30px rgba(111, 0, 255, 0.4),
    0 0 60px rgba(0, 212, 255, 0.2);
  transition: text-shadow 0.4s ease-out;
}

.challenge-stat-number.glow-fade {
  text-shadow: none;
  transition: text-shadow 0.6s ease-out;
}

/* ============================================================
   27. Card "Replaces" Tag — mono metadata under service cards
   ============================================================ */
.card-replaces {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ============================================================
   28. Outcome Section — reuses .card + .cards-grid, outcome-specific header
   ============================================================ */
.outcome-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.outcome-section .card h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.outcome-section .card p {
  font-size: 0.9375rem;
}

/* ============================================================
   29. Hero bridge text — reality line between h1 and subtitle
   ============================================================ */
.hero-bridge {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 1.25rem auto 0;
  line-height: 1.7;
  text-align: center;
}

/* ============================================================
   25. Responsive — @media 1024px + 768px
   ============================================================ */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-body {
    flex-direction: column;
  }

  .dash-queue,
  .dash-results,
  .dash-pipeline {
    width: 100%;
  }

  .dash-queue {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .dash-results {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 768px) {
  .cards-grid,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  /* Stats 2-col on mobile */
  .stats-grid .stat-item {
    flex: 0 0 50%;
  }

  .stats-grid .stat-item:nth-child(3) {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .stats-grid .stat-item:nth-child(4) {
    border-top: 1px solid var(--border-subtle);
  }

  .nav-actions .btn-primary {
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
  }

  /* Mobile nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  :root {
    --nav-height: 64px;
  }

  .dash-results {
    overflow-x: auto;
  }

  /* Excel mock mobile: horizontal scroll with min-width */
  .excel-window {
    min-width: 640px;
  }

  /* Before/After stacks vertically */
  .ba-row {
    flex-direction: column;
  }

  .ba-arrow {
    transform: rotate(90deg);
  }

  /* How It Works vertical stack */
  .how-it-works-steps {
    flex-direction: column;
    gap: 2rem;
  }

  .how-it-works-step:not(:last-child)::after {
    display: none;
  }

  .how-it-works-step {
    padding: 0 0 2rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .how-it-works-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Doc preview stacks vertically */
  .doc-preview-container {
    flex-direction: column;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .doc-preview-results {
    min-width: 0;
    overflow-x: auto;
  }

  .results-table {
    font-size: 0.7rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.4rem 0.5rem;
  }

  .doc-preview-pdf {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .doc-preview-arrow {
    transform: rotate(90deg);
  }

  /* Pipeline flow wraps */
  .pipeline-flow {
    flex-direction: column;
    gap: 1.5rem;
  }

  .pipeline-connector {
    min-width: auto;
    transform: rotate(90deg);
  }

  /* Footer stacks */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Infra quote padding */
  .infra-quote {
    padding: 2rem 1.5rem;
  }

  /* Challenge stats stack vertically on mobile */
  .challenge-stats {
    flex-direction: column;
    gap: 2.5rem;
  }

  .challenge-stat {
    width: 100%;
    padding: 1.5rem 1rem;
  }

  .challenge-stat + .challenge-stat {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2.5rem;
  }

  .challenge-stat-number {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .challenge-stat-icon {
    width: 100px;
    height: 100px;
  }

  .dashboard-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-body > * {
    min-width: 0;
  }
}

/* ── Illustration layout classes ── */
.card-illustration-lg {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 0;
  margin-bottom: 0.5rem;
}
.card-illustration-lg svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}
.step-illustration {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.step-illustration svg {
  width: 80px;
  height: 80px;
}
.ba-illustration {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.ba-illustration svg {
  width: 100%;
  max-width: 200px;
  height: auto;
}
.infra-illustration {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}
.infra-illustration svg {
  width: 100%;
  max-width: 600px;
  height: auto;
}

/* ============================================================
   30. Solution Demo — extend.ai-style document scanner
   ============================================================ */
.solution-section {
  background: var(--bg-deepest);
}

.solution-layout {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-top: 3rem;
}

/* ── The visual scene ── */
.solution-visual {
  flex: 0 0 58%;
  display: flex;
  justify-content: center;
}

.solution-scene {
  position: relative;
  padding: 2rem;
  border-radius: 16px;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      rgba(111, 0, 255, 0.06) 0%,
      transparent 70%
    ),
    linear-gradient(rgba(111, 0, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 0, 255, 0.025) 1px, transparent 1px);
  background-size:
    100% 100%,
    20px 20px,
    20px 20px;
}

.solution-doc-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  -webkit-transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg);
  transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* ── Floating extraction tags ── */
.extract-tags {
  position: absolute;
  top: 0;
  right: -12px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 3rem 0;
  pointer-events: none;
}

.extract-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(111, 0, 255, 0.2);
  border-radius: 20px;
  opacity: 0;
  transform: translateX(-10px) scale(0.9);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  white-space: nowrap;
}

.extract-tag.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

.tag-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
}

/* ── Capabilities column ── */
.solution-capabilities {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.solution-capability {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  opacity: 0.4;
  transition:
    opacity 0.4s ease,
    border-color 0.4s ease;
  padding-left: 1.25rem;
  border-left: 2px solid transparent;
}

.solution-capability.active {
  opacity: 1;
  border-left-color: var(--accent-primary);
}

.solution-capability.active .capability-icon {
  box-shadow:
    0 0 16px rgba(111, 0, 255, 0.35),
    0 0 32px rgba(0, 212, 255, 0.15);
}

.capability-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(111, 0, 255, 0.2),
    rgba(0, 212, 255, 0.2)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-secondary);
  transition: box-shadow 0.4s ease;
}

.capability-icon svg {
  width: 20px;
  height: 20px;
}

.capability-text h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.capability-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .solution-layout {
    flex-direction: column;
  }
  .solution-visual {
    flex: none;
    width: 100%;
  }
  .solution-scene {
    padding: 1rem;
  }
  .solution-doc-svg {
    -webkit-transform: none;
    transform: none;
  }
  .extract-tags {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    transform: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-around;
    gap: 0;
    padding: 2rem 0;
  }
  .extract-tag {
    opacity: 1;
    transform: none;
    padding: 3px 6px;
  }
  .extract-tag .tag-label {
    font-size: 0.5rem;
  }
  .tag-dot {
    width: 4px;
    height: 4px;
  }
  .solution-capabilities {
    gap: 1.5rem;
  }
}
