/* ==========================================================================
   HLXperts Design System — Tokens, Color System & Base Foundation
   Caliber: Linear / Stripe / Vercel (Ultra-Fast 60-120fps Performance)
   ========================================================================== */

:root {
  /* Brand Core Colors (Strictly preserved from original codebase) */
  --brand-green: #98ca3a;
  --brand-green-hover: #a8db46;
  --brand-green-active: #86b432;
  --brand-green-soft: rgba(152, 202, 58, 0.12);
  --brand-green-glow: rgba(152, 202, 58, 0.35);
  --brand-green-border: rgba(152, 202, 58, 0.28);
  --brand-green-beam: #c3f16d;

  /* Deep Dark Surfaces (Linear / Vercel dark mode palette) */
  --bg-black: #000000;
  --bg-canvas: #070908;
  --bg-surface-1: #0a0f0d;
  --bg-surface-2: #0d1310;
  --bg-surface-3: #12171c;
  --bg-card: #141b18;
  --bg-card-hover: #19221e;
  --bg-elevated: #1a2029;
  --bg-glass: rgba(18, 23, 28, 0.85);
  --bg-glass-card: rgba(14, 19, 16, 0.85);
  --bg-input: rgba(255, 255, 255, 0.04);

  /* Accent & Status Colors (Preserved) */
  --accent-cyan: #00d9a6;
  --accent-blue: #188bf6;
  --accent-amber: #f5a623;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;

  /* Typography Colors */
  --text-primary: #f5f7f6;
  --text-secondary: #c3cdc7;
  --text-muted: #8b98a0;
  --text-subtle: #57656e;
  --text-inverse: #070908;

  /* Border & Divider Tokens */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(152, 202, 58, 0.45);
  --border-glass: rgba(255, 255, 255, 0.06);

  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 40px rgba(152, 202, 58, 0.18);
  --shadow-glow-strong: 0 0 60px rgba(152, 202, 58, 0.35);

  /* Typography Families */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-headline: 'Bebas Neue', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, monospace;

  /* Spacing Scale (8px base unit) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Container Widths */
  --container-max: 1200px;
  --container-narrow: 900px;
  --container-wide: 1360px;
  --gutter: 24px;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 30px;
  --radius-full: 9999px;

  /* Transitions - Tuned for Ultra-Responsive Physics */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CSS Reset & High-Performance Base Styles
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-black);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  background-color: #000000;
}

/* Scroll Lock State: Completely disables page scroll when revealing target sections or modals */
html.scroll-locked,
body.scroll-locked {
  overflow: hidden !important;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

/* Hardware-Accelerated Static Background Canvas (Zero repaint on scroll) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, #101912 0%, #070908 45%, #000000 100%);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}

/* Scroll Lock Indicator Toast */
.scroll-lock-indicator {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9999;
  background: rgba(13, 19, 16, 0.95);
  border: 1px solid var(--brand-green-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(152, 202, 58, 0.2);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  animation: fadeIn 0.3s ease forwards;
}

.scroll-lock-indicator.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Section Spotlight Active State */
.section-spotlight-active {
  position: relative;
  z-index: 40;
  transition: transform var(--transition-smooth);
}

.section-spotlight-active .workflow-canvas-wrap,
.section-spotlight-active .pricing-grid,
.section-spotlight-active .crm-dashboard-container {
  box-shadow: 0 0 80px rgba(152, 202, 58, 0.3), 0 30px 90px rgba(0, 0, 0, 0.9) !important;
  border-color: var(--brand-green) !important;
  transform: scale(1.01);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Spotlight Card Parent */
.spotlight-group {
  position: relative;
}

.spotlight-card {
  position: relative;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y), rgba(152, 202, 58, 0.14), transparent 75%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  z-index: 2;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
  background: #232b27;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #35423c;
}

::selection {
  background: rgba(152, 202, 58, 0.3);
  color: #ffffff;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  word-break: break-word;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* Focus Visible Accessibility */
:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 3px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section-wrapper {
  position: relative;
  padding: var(--space-20) 0;
  contain: layout style;
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }
  .section-wrapper {
    padding: var(--space-12) 0;
  }
}

/* Section Header Structure */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: var(--space-8);
  }
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-green-soft);
  border: 1px solid var(--brand-green-border);
  color: var(--brand-green);
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  box-shadow: 0 0 20px rgba(152, 202, 58, 0.1);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Text Highlights */
.highlight-green {
  color: var(--brand-green);
  background: linear-gradient(135deg, #a6dd3f 0%, #98ca3a 60%, #7dae28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #d1ded8 60%, #98ca3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* High-Performance Panel Style */
.glass-panel {
  background: rgba(14, 19, 16, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-panel:hover {
  border-color: var(--border-medium);
}
