/* ============================================
   iTriage Landing Page — Dark/Light Theme
   ============================================ */

/* --- Theme Variables --- */
:root,
[data-theme="dark"] {
  --bg-primary: #18181b;
  --bg-secondary: #27272a;
  --bg-tertiary: #1f1f23;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-soft: rgba(59, 130, 246, 0.12);
  --success: #22c55e;
  --navbar-bg: rgba(24, 24, 27, 0.7);
  --navbar-scrolled: rgba(24, 24, 27, 0.97);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #f4f4f5;
  --bg-secondary: #ebebee;
  --bg-tertiary: #e4e4e7;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-hover: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.18);
  --accent-soft: rgba(59, 130, 246, 0.1);
  --success: #16a34a;
  --navbar-bg: rgba(244, 244, 245, 0.6);
  --navbar-scrolled: rgba(244, 244, 245, 0.95);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* --- Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

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

/* Spider dots background canvas */
#spiderCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* All content above canvas */
.hero,
.stats-bar,
.section-padding,
.signup-section,
.site-footer,
.cta-section {
  position: relative;
  z-index: 1;
}

/* --- Navbar --- */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  padding: 0.75rem 0;
}

.navbar.scrolled {
  background: var(--navbar-scrolled);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary) !important;
}

.navbar-brand .logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.navbar .nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover {
  color: var(--text-primary) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem;
  color: var(--text-primary);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  filter: var(--text-primary);
}

[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248,250,252,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15,23,42,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--surface);
}

.btn-cta {
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
  color: #fff !important;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 8rem 0 5rem;
  background: transparent;
  overflow: hidden;
}

/* Entity link graph canvas — removed, now using pipeline demo + neural canvas */

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(161, 161, 170, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 3.5rem; }
}

@media (min-width: 992px) {
  .hero h1 { font-size: 4rem; }
}

.gradient-text {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

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

/* --- Threat Flow Pipeline --- */
.pipeline {
  max-width: 860px;
  margin: 3.5rem auto 0;
  position: relative;
}

.pipeline-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 140px;
}

.pipeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.5s ease;
  position: relative;
}

.pipeline-step.active .pipeline-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.pipeline-label {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.5s ease;
}

.pipeline-step.active .pipeline-label {
  color: var(--text-primary);
}

.pipeline-sublabel {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.4s ease;
}

.pipeline-step.active .pipeline-sublabel {
  opacity: 1;
  transform: translateY(0);
}

/* Connector arrows between steps */
.pipeline-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  position: relative;
  min-width: 40px;
  max-width: 80px;
  transition: background 0.5s ease;
}

.pipeline-connector.active {
  background: var(--accent);
}

/* Animated dash traveling along connector */
.pipeline-connector::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 16px;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pipeline-connector.active::after {
  opacity: 1;
  animation: dashTravel 0.6s ease-out forwards;
}

@keyframes dashTravel {
  0% { left: 0; }
  100% { left: calc(100% - 16px); }
}

/* Output card below pipeline */
.pipeline-output {
  margin-top: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.5s ease;
  text-align: left;
}

.pipeline-output.visible {
  opacity: 1;
  transform: translateY(0);
}

.pipeline-output-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pipeline-output-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
}

.pipeline-output-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.pipeline-output-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pipeline-output-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.pipeline-output-tag .tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Mobile: stack vertically */
@media (max-width: 767.98px) {
  .pipeline { margin-top: 2.5rem; }

  .pipeline-track {
    flex-direction: column;
    gap: 0;
  }

  .pipeline-step { width: auto; }

  .pipeline-connector {
    width: 2px;
    height: 28px;
    min-width: unset;
    max-width: unset;
  }

  .pipeline-connector::after {
    top: 0;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .pipeline-connector.active::after {
    animation: dashTravelVertical 0.6s ease-out forwards;
  }

  @keyframes dashTravelVertical {
    0% { top: 0; }
    100% { top: calc(100% - 8px); }
  }

  .pipeline-output { margin-top: 1.5rem; }
}

/* --- Stats Bar --- */
.stats-bar {
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.stat-block {
  text-align: center;
}

.stat-icon {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.stat-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Glass Cards (Features + Form) --- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s ease;
  height: 100%;
}

.glass-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: var(--card-shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-icon.amber,
.feature-icon.red,
.feature-icon.blue,
.feature-icon.purple,
.feature-icon.green,
.feature-icon.cyan {
  background: var(--accent-soft);
  color: var(--accent);
}

.glass-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-header h2 { font-size: 2.5rem; }
}

.section-header p {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.section-padding {
  padding: 5rem 0;
}

/* --- How It Works --- */
.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-connector {
  display: none;
}

@media (min-width: 768px) {
  .step-connector {
    display: block;
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 10rem);
    height: 2px;
    background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
    opacity: 0.5;
    z-index: 0;
  }
}

/* --- Early Access Form --- */
.signup-section {
  background: transparent;
  position: relative;
}

.signup-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.signup-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
}

.signup-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.signup-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-control,
.form-select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success-state {
  text-align: center;
  padding: 2rem 0;
}

.success-state .check-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.success-state h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.success-state p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.8125rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* --- Footer --- */
.site-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-brand .logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 300px;
  line-height: 1.7;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icons a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.social-icons a:hover {
  color: var(--text-primary);
}

.social-icons svg {
  width: 20px;
  height: 20px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.625rem;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.lang-switch {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger .reveal {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
  .hero { padding: 6rem 0 3rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-sub { font-size: 1rem; }
  .stat-number { font-size: 2rem; }
  .section-padding { padding: 3.5rem 0; }
  .signup-card { padding: 1.5rem; margin: 0 0.75rem; }
  .pipeline { margin-top: 2rem; }
  .glass-card:hover { transform: none; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* --- Before / After --- */
.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .before-after-grid {
    grid-template-columns: 1fr;
  }
}

.before-after-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.before-after-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow);
}

.before-after-card.without {
  border-top: 3px solid #ef4444;
}

.before-after-card.with {
  border-top: 3px solid #22c55e;
}

.before-after-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.before-after-card h3 svg {
  flex-shrink: 0;
}

.before-after-card.without h3 { color: #ef4444; }
.before-after-card.with h3 { color: #22c55e; }

.before-after-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.before-after-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.before-after-card.without .before-after-item svg { color: #ef4444; opacity: 0.7; }
.before-after-card.with .before-after-item svg { color: #22c55e; opacity: 0.7; }

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

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

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

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

.pricing-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: var(--card-shadow);
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
  color: var(--text-primary);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  min-height: 3.2rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pricing-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

.pricing-card .btn-cta {
  width: 100%;
  justify-content: center;
}

.pricing-card .btn-cta.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary) !important;
}

.pricing-card .btn-cta.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-soft);
  box-shadow: none;
}

.pricing-footer-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pricing-footer-note a {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 767.98px) {
  .pricing-card:hover { transform: none; }
}

/* Pricing blur overlay */
.pricing-blur-wrapper {
  position: relative;
}

.pricing-blur-wrapper .pricing-grid {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.pricing-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.pricing-overlay-content {
  text-align: center;
  max-width: 420px;
  padding: 2.5rem 2rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.pricing-overlay-content svg {
  color: var(--accent);
  margin-bottom: 1rem;
}

.pricing-overlay-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pricing-overlay-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.pricing-overlay-content .btn-cta {
  padding: 0.625rem 1.5rem;
}

/* --- Testimonials --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

.testimonial-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: var(--card-shadow);
}

.testimonial-stars {
  display: flex;
  gap: 0.125rem;
  margin-bottom: 1rem;
  color: #f59e0b;
}

.testimonial-quote {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
}

.testimonial-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* --- FAQ Accordion --- */
.faq-section {
  max-width: 760px;
  margin: 0 auto;
}

.faq-section .accordion-item {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-section .accordion-button {
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  box-shadow: none !important;
}

.faq-section .accordion-button:not(.collapsed) {
  color: var(--accent);
  background: transparent;
}

.faq-section .accordion-button::after {
  filter: brightness(0) saturate(100%) invert(50%);
  transition: transform 0.3s ease;
}

[data-theme="dark"] .faq-section .accordion-button::after {
  filter: brightness(0) saturate(100%) invert(70%);
}

.faq-section .accordion-body {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 0 auto 1rem;
}

@media (min-width: 768px) {
  .cta-section h2 { font-size: 2.5rem; }
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Intelligence Pipeline Demo --- */

.pipeline-demo {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Vertical timeline line */
.pipeline-demo::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

[dir="rtl"] .pipeline-demo::before {
  left: auto;
  right: 24px;
}

.demo-stage {
  position: relative;
  padding-left: 64px;
  padding-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[dir="rtl"] .demo-stage {
  padding-left: 0;
  padding-right: 64px;
}

.demo-stage.active {
  opacity: 1;
  transform: translateY(0);
}

.demo-stage:last-child {
  padding-bottom: 0;
}

/* Stage number dot on timeline */
.demo-stage-num {
  position: absolute;
  left: 12px;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.4s ease;
  z-index: 1;
}

[dir="rtl"] .demo-stage-num {
  left: auto;
  right: 12px;
}

.demo-stage.active .demo-stage-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.demo-stage-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.demo-stage.active .demo-stage-label {
  color: var(--accent);
}

/* Stage 1: Source items */
.source-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  line-height: 1.4;
}

[dir="rtl"] .source-item {
  transform: translateX(12px);
}

.demo-stage.active .source-item {
  opacity: 1;
  transform: translateX(0);
}

.demo-stage.active .source-item:nth-child(1) { transition-delay: 0.1s; }
.demo-stage.active .source-item:nth-child(2) { transition-delay: 0.25s; }
.demo-stage.active .source-item:nth-child(3) { transition-delay: 0.4s; }
.demo-stage.active .source-item:nth-child(4) { transition-delay: 0.55s; }
.demo-stage.active .source-item:nth-child(5) { transition-delay: 0.7s; }

.source-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #fff;
}

.source-badge.rss { background: #3f3f46; }
.source-badge.api { background: #27272a; }
.source-badge.gov { background: #18181b; }

/* Stage 2: Entity extraction */
.entity-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.demo-stage.active .entity-tag {
  opacity: 1;
  transform: scale(1);
}

.demo-stage.active .entity-tag:nth-child(1) { transition-delay: 0.05s; }
.demo-stage.active .entity-tag:nth-child(2) { transition-delay: 0.15s; }
.demo-stage.active .entity-tag:nth-child(3) { transition-delay: 0.25s; }
.demo-stage.active .entity-tag:nth-child(4) { transition-delay: 0.35s; }
.demo-stage.active .entity-tag:nth-child(5) { transition-delay: 0.45s; }
.demo-stage.active .entity-tag:nth-child(6) { transition-delay: 0.55s; }
.demo-stage.active .entity-tag:nth-child(7) { transition-delay: 0.65s; }
.demo-stage.active .entity-tag:nth-child(8) { transition-delay: 0.75s; }

.entity-tag.actor     { background: rgba(63, 63, 70, 0.20); color: #52525b; border: 1px solid rgba(63, 63, 70, 0.30); }
.entity-tag.technique { background: rgba(63, 63, 70, 0.14); color: #3f3f46; border: 1px solid rgba(63, 63, 70, 0.22); }
.entity-tag.target    { background: rgba(63, 63, 70, 0.12); color: #52525b; border: 1px solid rgba(63, 63, 70, 0.18); }
.entity-tag.ioc       { background: rgba(63, 63, 70, 0.10); color: #3f3f46; border: 1px solid rgba(63, 63, 70, 0.16); }
.entity-tag.cve       { background: rgba(63, 63, 70, 0.16); color: #52525b; border: 1px solid rgba(63, 63, 70, 0.24); }

[data-theme="dark"] .entity-tag.actor     { color: #d4d4d8; }
[data-theme="dark"] .entity-tag.technique { color: #a1a1aa; }
[data-theme="dark"] .entity-tag.target    { color: #a1a1aa; }
[data-theme="dark"] .entity-tag.ioc       { color: #d4d4d8; }
[data-theme="dark"] .entity-tag.cve       { color: #a1a1aa; }

/* Dot before entity tag name */
.entity-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* Connection lines between entities */
.entity-links-row {
  display: flex;
  gap: 0;
  margin-top: 0.75rem;
  height: 20px;
  position: relative;
  overflow: hidden;
}

.entity-link-line {
  flex: 1;
  height: 2px;
  margin-top: 9px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.4s ease, transform 0.6s ease;
}

[dir="rtl"] .entity-link-line {
  transform-origin: right;
}

.demo-stage.active .entity-link-line {
  opacity: 0.35;
  transform: scaleX(1);
}

.demo-stage.active .entity-link-line:nth-child(1) { transition-delay: 0.8s; }
.demo-stage.active .entity-link-line:nth-child(2) { transition-delay: 1s; }
.demo-stage.active .entity-link-line:nth-child(3) { transition-delay: 1.2s; }

.entity-link-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  margin-top: 6px;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.demo-stage.active .entity-link-dot {
  opacity: 0.5;
}

.demo-stage.active .entity-link-dot:nth-child(1) { transition-delay: 0.7s; }
.demo-stage.active .entity-link-dot:nth-child(2) { transition-delay: 0.95s; }
.demo-stage.active .entity-link-dot:nth-child(3) { transition-delay: 1.15s; }
.demo-stage.active .entity-link-dot:nth-child(4) { transition-delay: 1.35s; }

/* Stage 3: Enrichment badges */
.enrich-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 575.98px) {
  .enrich-grid { grid-template-columns: 1fr; }
}

.enrich-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-stage.active .enrich-badge {
  opacity: 1;
  transform: translateY(0);
}

.demo-stage.active .enrich-badge:nth-child(1) { transition-delay: 0.1s; }
.demo-stage.active .enrich-badge:nth-child(2) { transition-delay: 0.3s; }
.demo-stage.active .enrich-badge:nth-child(3) { transition-delay: 0.5s; }

.enrich-badge-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.enrich-badge-value {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.enrich-badge.mitre  { border-left: 3px solid #52525b; }
.enrich-badge.diamond { border-left: 3px solid #3f3f46; }
.enrich-badge.score   { border-left: 3px solid #52525b; }

[dir="rtl"] .enrich-badge.mitre  { border-left: none; border-right: 3px solid #52525b; }
[dir="rtl"] .enrich-badge.diamond { border-left: none; border-right: 3px solid #3f3f46; }
[dir="rtl"] .enrich-badge.score   { border-left: none; border-right: 3px solid #52525b; }

/* Stage 4: Report card */
.demo-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid #3f3f46;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease;
}

[dir="rtl"] .demo-report-card {
  border-left: none;
  border-right: 4px solid #3f3f46;
}

.demo-stage.active .demo-report-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.report-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.report-priority {
  flex-shrink: 0;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 2px;
}

.report-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.report-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.report-correlated {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.875rem;
}

.report-tag {
  font-size: 0.675rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(63, 63, 70, 0.12);
  color: #52525b;
  border: 1px solid rgba(63, 63, 70, 0.2);
}

[data-theme="dark"] .report-tag {
  color: #a1a1aa;
}

.report-why {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 0.75rem;
  background: rgba(63, 63, 70, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(63, 63, 70, 0.10);
  margin-bottom: 0.875rem;
}

.report-why strong {
  color: var(--text-primary);
}

.report-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:first-child {
  background: var(--accent);
  color: #fff;
}

.action-btn.outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Neural network canvas (inline within stage 2) */
.neural-network-wrap {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--bg-secondary) 20%, transparent 75%);
  border: none;
  aspect-ratio: 16/9;
  min-height: 320px;
  margin-top: 1.25rem;
  border-radius: 1rem;
}

.neural-network-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.neural-network-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.6;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .demo-stage { padding-left: 48px; }
  [dir="rtl"] .demo-stage { padding-left: 0; padding-right: 48px; }
  .pipeline-demo::before { left: 16px; }
  [dir="rtl"] .pipeline-demo::before { left: auto; right: 16px; }
  .demo-stage-num { left: 4px; }
  [dir="rtl"] .demo-stage-num { left: auto; right: 4px; }
  .neural-network-wrap { display: none; }
  .report-header { flex-direction: column; gap: 0.5rem; }
  .report-actions { flex-direction: column; }
  .action-btn { text-align: center; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
