/**
 * SignSafe Enterprise Design System
 * Fortune 50-Grade SaaS UI/UX
 * Version 3.0 - Enterprise Edition
 *
 * Inspired by: Stripe, Linear, Notion, Vercel
 * Focus: Trust, Security, Professional Excellence
 */

/* ============================================================================
   CSS Custom Properties - Enterprise Design Tokens
   ============================================================================ */
:root {
  /* === Brand Colors === */
  --brand-primary: #0066ff;
  --brand-primary-hover: #0052cc;
  --brand-primary-light: #e6f0ff;
  --brand-primary-dark: #003d99;

  /* === Semantic Colors === */
  --semantic-success: #00875a;
  --semantic-success-light: #e3fcef;
  --semantic-success-dark: #006644;

  --semantic-warning: #ff8b00;
  --semantic-warning-light: #fffae6;
  --semantic-warning-dark: #cc6d00;

  --semantic-danger: #de350b;
  --semantic-danger-light: #ffebe6;
  --semantic-danger-dark: #bf2600;

  --semantic-info: #0065ff;
  --semantic-info-light: #deebff;

  /* === Neutral Palette (Enterprise Gray Scale) - WCAG 2.2 AA Compliant === */
  --neutral-0: #ffffff;
  --neutral-50: #fafbfc;
  --neutral-100: #f4f5f7;
  --neutral-200: #ebecf0;
  --neutral-300: #dfe1e6;
  --neutral-400: #9ca3af; /* 4.5:1 on white - was #c1c7d0 */
  --neutral-500: #6b7280; /* 5.02:1 on white - was #a5adba (2.76:1) */
  --neutral-600: #4b5563; /* 7.02:1 on white - was #6b778c */
  --neutral-700: #374151; /* 10.69:1 on white - was #505f79 */
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  --neutral-950: #030712;

  /* === Typography === */
  --font-display:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;

  /* Font Sizes - Major Third Scale (1.25) */
  --text-xs: 0.64rem; /* 10.24px */
  --text-sm: 0.8rem; /* 12.8px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.25rem; /* 20px */
  --text-xl: 1.563rem; /* 25px */
  --text-2xl: 1.953rem; /* 31.25px */
  --text-3xl: 2.441rem; /* 39px */
  --text-4xl: 3.052rem; /* 48.8px */
  --text-5xl: 3.815rem; /* 61px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* === Spacing (4px base, 8px primary) === */
  --space-0: 0;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */
  --space-32: 8rem; /* 128px */

  /* === Border Radius === */
  --radius-none: 0;
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem; /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem; /* 16px */
  --radius-2xl: 1.5rem; /* 24px */
  --radius-3xl: 2rem; /* 32px */
  --radius-full: 9999px;

  /* === Shadows (Refined Enterprise) === */
  --shadow-xs: 0 1px 2px 0 rgba(23, 43, 77, 0.04);
  --shadow-sm:
    0 1px 3px 0 rgba(23, 43, 77, 0.06), 0 1px 2px -1px rgba(23, 43, 77, 0.06);
  --shadow-md:
    0 4px 6px -1px rgba(23, 43, 77, 0.08), 0 2px 4px -2px rgba(23, 43, 77, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(23, 43, 77, 0.08),
    0 4px 6px -4px rgba(23, 43, 77, 0.04);
  --shadow-xl:
    0 20px 25px -5px rgba(23, 43, 77, 0.1),
    0 8px 10px -6px rgba(23, 43, 77, 0.06);
  --shadow-2xl: 0 25px 50px -12px rgba(23, 43, 77, 0.25);

  /* Colored Shadows */
  --shadow-primary: 0 4px 14px 0 rgba(0, 102, 255, 0.25);
  --shadow-success: 0 4px 14px 0 rgba(0, 135, 90, 0.25);
  --shadow-danger: 0 4px 14px 0 rgba(222, 53, 11, 0.25);

  /* === Ring (Focus) === */
  --ring-offset: 2px;
  --ring-width: 2px;
  --ring-color: rgba(0, 102, 255, 0.5);

  /* === Transitions === */
  --duration-instant: 50ms;
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* === Z-Index Scale === */
  --z-base: 0;
  --z-docked: 10;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-overlay: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-toast: 1700;
  --z-tooltip: 1800;

  /* === Layout === */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Safe Areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* === Component Tokens === */
  --nav-height: 64px;
  --sidebar-width: 280px;
  --touch-target: 44px;

  /* === Surface Colors (Light Mode) === */
  --surface-ground: var(--neutral-50);
  --surface-card: var(--neutral-0);
  --surface-elevated: var(--neutral-0);
  --surface-overlay: rgba(23, 43, 77, 0.5);

  /* WCAG 2.2 AA compliant text colors */
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600); /* 7.02:1 on white */
  --text-tertiary: var(--neutral-500); /* 5.02:1 on white */
  --text-disabled: var(--neutral-400); /* 4.5:1 on white */
  --text-inverse: var(--neutral-0);

  --border-subtle: var(--neutral-200);
  --border-default: var(--neutral-300);
  --border-strong: var(--neutral-400);
}

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {
  :root {
    --surface-ground: #0d1117;
    --surface-card: #161b22;
    --surface-elevated: #21262d;
    --surface-overlay: rgba(0, 0, 0, 0.7);

    /* WCAG 2.2 AA compliant text colors on dark bg */
    --text-primary: #f0f6fc;
    --text-secondary: #b1bac4; /* 6.3:1 on #0d1117 - was #8b949e */
    --text-tertiary: #9ca3af; /* 4.6:1 on #0d1117 - was #6e7681 */
    --text-disabled: #8b949e; /* 4.0:1 on #0d1117 - disabled exempt but readable */
    --text-inverse: var(--neutral-900);

    --border-subtle: #21262d;
    --border-default: #30363d;
    --border-strong: #484f58;

    --brand-primary-light: rgba(0, 102, 255, 0.15);
    --semantic-success-light: rgba(0, 135, 90, 0.15);
    --semantic-warning-light: rgba(255, 139, 0, 0.15);
    --semantic-danger-light: rgba(222, 53, 11, 0.15);
    --semantic-info-light: rgba(0, 101, 255, 0.15);

    /* Dark mode shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  }
}

/* === Forced Dark Theme (for landing page) === */
.dark-theme {
  --surface-ground: #0d1117;
  --surface-card: #161b22;
  --surface-elevated: #21262d;
  --surface-overlay: rgba(0, 0, 0, 0.7);

  /* WCAG 2.2 AA compliant text colors on dark bg */
  --text-primary: #f0f6fc;
  --text-secondary: #b1bac4; /* 6.3:1 on #0d1117 - was #8b949e */
  --text-tertiary: #9ca3af; /* 4.6:1 on #0d1117 - was #6e7681 */
  --text-disabled: #8b949e; /* 4.0:1 on #0d1117 - disabled exempt but readable */
  --text-inverse: var(--neutral-900);

  --border-subtle: #21262d;
  --border-default: #30363d;
  --border-strong: #484f58;

  --brand-primary-light: rgba(0, 102, 255, 0.15);
  --semantic-success-light: rgba(0, 135, 90, 0.15);
  --semantic-warning-light: rgba(255, 139, 0, 0.15);
  --semantic-danger-light: rgba(222, 53, 11, 0.15);
  --semantic-info-light: rgba(0, 101, 255, 0.15);

  /* Dark mode shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.dark-theme .nav-enterprise {
  background: rgba(13, 17, 23, 0.8);
}

.dark-theme .nav-link:hover {
  background: var(--neutral-800);
}

.dark-theme .nav-mobile {
  background: var(--surface-card);
}

.dark-theme .nav-mobile-link:hover,
.dark-theme .nav-mobile-link:focus {
  background: var(--neutral-800);
}

.dark-theme .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.dark-theme .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.dark-theme .btn-ghost {
  color: var(--text-secondary);
}

.dark-theme .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.dark-theme .hero-enterprise {
  background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
}

.dark-theme .hero-enterprise::before {
  background-image:
    radial-gradient(
      circle at 20% 50%,
      rgba(0, 102, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(124, 58, 237, 0.12) 0%,
      transparent 50%
    );
}

.dark-theme .hero-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .hero-stats {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .format-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.dark-theme .feature-card {
  background: var(--surface-card);
  border-color: var(--border-subtle);
}

.dark-theme .feature-card:hover {
  border-color: var(--brand-primary);
}

.dark-theme .step-card {
  background: var(--surface-card);
  border-color: var(--border-subtle);
}

.dark-theme .security-icon {
  background: rgba(0, 135, 90, 0.15);
}

.dark-theme .roi-preview {
  background: var(--surface-card);
  border-color: var(--border-subtle);
}

.dark-theme .pricing-card {
  background: var(--surface-card);
  border-color: var(--border-subtle);
}

.dark-theme .pricing-card.featured {
  border-color: var(--brand-primary);
}

.dark-theme .pricing-feature {
  border-bottom-color: var(--border-subtle);
}

.dark-theme .testimonial-card {
  background: var(--surface-card);
  border-color: var(--border-subtle);
}

.dark-theme .compliance-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   Reset & Base Styles
   ============================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-ground);
  min-height: 100vh;
  /* Performance: prevent layout thrash */
  -webkit-overflow-scrolling: touch;
}

/* Performance Optimizations */
.feature-card,
.pricing-card,
.testimonial-card,
.step-card,
.auth-card {
  contain: layout style;
}

section {
  contain: layout;
}

/* GPU acceleration for animations */
.nav-enterprise,
.btn,
[class*="floating"] {
  will-change: transform;
  transform: translateZ(0);
}

/* 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;
  }
}

/* ============================================================================
   Typography
   ============================================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.display-1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1.1;
}

.display-2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
}

h1,
.h1 {
  font-size: var(--text-3xl);
}
h2,
.h2 {
  font-size: var(--text-2xl);
}
h3,
.h3 {
  font-size: var(--text-xl);
}
h4,
.h4 {
  font-size: var(--text-lg);
}
h5,
.h5 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
h6,
.h6 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Text Colors */
.text-primary {
  color: var(--text-primary);
}
.text-secondary {
  color: var(--text-secondary);
}
.text-tertiary {
  color: var(--text-tertiary);
}
.text-brand {
  color: var(--brand-primary);
}
.text-success {
  color: var(--semantic-success);
}
.text-warning {
  color: var(--semantic-warning);
}
.text-danger {
  color: var(--semantic-danger);
}

/* ============================================================================
   Layout Components
   ============================================================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm {
  max-width: var(--container-sm);
}
.container-md {
  max-width: var(--container-md);
}
.container-lg {
  max-width: var(--container-lg);
}
.container-2xl {
  max-width: var(--container-2xl);
}

.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}
.section-lg {
  padding: var(--space-32) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

@media (max-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .lg\:grid-cols-1 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .md\:grid-cols-1 {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 var(--space-4);
  }
  .section {
    padding: var(--space-16) 0;
  }
}

/* Flex Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

/* ============================================================================
   Buttons - Enterprise Grade
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: var(--touch-target);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  box-shadow:
    0 0 0 var(--ring-offset) var(--surface-card),
    0 0 0 calc(var(--ring-offset) + var(--ring-width)) var(--ring-color);
}

.btn:disabled {
  /* v18.1: Disabled states exempt from WCAG but improved for readability */
  background: #e5e7eb !important; /* neutral-200 */
  color: #6b7280 !important; /* neutral-500 - 4.6:1 contrast on neutral-200 */
  border-color: #d1d5db !important; /* neutral-300 */
  box-shadow: none !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background: var(--brand-primary);
  color: var(--neutral-0);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(0, 102, 255, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  /* v18.0: More visible hover - neutral-100 instead of neutral-50 */
  background: var(--neutral-100);
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  /* v18.0: More visible hover with subtle shadow */
  background: var(--neutral-100);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Danger Button */
.btn-danger {
  background: var(--semantic-danger);
  color: var(--neutral-0);
}

.btn-danger:hover {
  background: var(--semantic-danger-dark);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  min-height: 32px;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  min-height: 52px;
  font-size: var(--text-base);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  min-height: 60px;
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

/* Button with Icon */
.btn svg,
.btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-icon {
  padding: var(--space-3);
  width: var(--touch-target);
  height: var(--touch-target);
}

/* ============================================================================
   Cards - Enterprise Design
   ============================================================================ */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-out);
}

.card-elevated {
  box-shadow: var(--shadow-md);
  border: none;
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ============================================================================
   Navigation - Enterprise Header
   ============================================================================ */
.nav-enterprise {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

@media (prefers-color-scheme: dark) {
  .nav-enterprise {
    background: rgba(13, 17, 23, 0.8);
  }
}

.nav-enterprise.scrolled {
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.nav-logo-mark {
  width: 48px;
  height: 48px;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--neutral-100);
}

.nav-link.active {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: calc(var(--z-sticky) + 10);
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-toggle-bar:nth-child(1) {
  margin-bottom: 6px;
}
.nav-toggle-bar:nth-child(3) {
  margin-top: 6px;
}

/* Hamburger to X animation */
.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.nav-mobile-overlay.active {
  opacity: 1;
}

/* Mobile menu panel */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--surface-card);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  padding: var(--space-6);
  padding-top: calc(var(--nav-height) + var(--space-4));
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
}

.nav-mobile.active {
  transform: translateX(0);
}

.nav-mobile-links {
  list-style: none;
  margin-bottom: var(--space-8);
}

.nav-mobile-links li {
  margin-bottom: var(--space-1);
}

.nav-mobile-link {
  display: block;
  padding: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: background var(--duration-fast) var(--ease-out);
}

.nav-mobile-link:hover,
.nav-mobile-link:focus {
  background: var(--neutral-100);
}

.nav-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nav-mobile-cta .btn {
  width: 100%;
  justify-content: center;
}

/* Mobile breakpoint */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-mobile-overlay,
  .nav-mobile {
    display: block;
  }
}

@media (prefers-color-scheme: dark) {
  .nav-mobile {
    background: var(--surface-card);
  }

  .nav-mobile-link:hover,
  .nav-mobile-link:focus {
    background: var(--neutral-800);
  }
}

/* ============================================================================
   Trust Signals - Enterprise Security Badges
   ============================================================================ */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-4) 0;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--semantic-success);
}

/* Trust logo component for company logos in trust bar */
.trust-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.trust-logo svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Trust bar layout */
.trust-bar-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-4);
}

.trust-bar-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

/* ============================================================================
   Bento Grid System
   ============================================================================ */
.bento-grid {
  display: grid;
  gap: var(--space-6);
  width: 100%;
}

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

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

.bento-grid.bento-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

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

.bento-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.bento-card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.bento-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Feature Icon Wrappers */
.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.feature-icon-wrap.violet {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.feature-icon-wrap.electric {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.feature-icon-wrap.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.feature-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.feature-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

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

.section-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

/* Stat display */
.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Hero actions - CTA button group */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.compliance-badges {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.compliance-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.compliance-badge svg {
  width: 16px;
  height: 16px;
}

.compliance-badge.verified {
  border-color: var(--semantic-success);
  color: var(--semantic-success);
}

/* Client Logos */
.client-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all var(--duration-slow) var(--ease-out);
}

.client-logos:hover {
  opacity: 0.8;
  filter: grayscale(50%);
}

.client-logo {
  height: 28px;
  width: auto;
}

/* ============================================================================
   Hero Section - Enterprise Landing
   ============================================================================ */
.hero-enterprise {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-20);
  background: linear-gradient(
    180deg,
    var(--brand-primary-light) 0%,
    var(--surface-ground) 100%
  );
  overflow: hidden;
}

.hero-enterprise::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 20% 50%,
      rgba(0, 102, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(124, 58, 237, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
}

.hero-title {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 640px;
  margin: 0 auto var(--space-8);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
}

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

.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ============================================================================
   Feature Grid - Enterprise
   ============================================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

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

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

.feature-card {
  padding: var(--space-8);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.feature-icon.primary {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.feature-icon.success {
  background: var(--semantic-success-light);
  color: var(--semantic-success);
}

.feature-icon.warning {
  background: var(--semantic-warning-light);
  color: var(--semantic-warning);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.feature-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================================
   Pricing - Enterprise Tiers
   ============================================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 968px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

.pricing-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: var(--space-1) var(--space-4);
  background: var(--brand-primary);
  color: var(--neutral-0);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.pricing-card.enterprise {
  background: linear-gradient(
    135deg,
    var(--neutral-900) 0%,
    var(--neutral-800) 100%
  );
  color: var(--neutral-0);
  border: none;
}

.pricing-card.enterprise .pricing-price,
.pricing-card.enterprise .pricing-tier {
  color: var(--neutral-0);
}

.pricing-card.enterprise .pricing-feature {
  color: var(--neutral-300);
}

.pricing-tier {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.pricing-price span {
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--text-secondary);
}

.pricing-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-6);
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-feature:last-child {
  border-bottom: none;
}

.pricing-feature svg {
  width: 18px;
  height: 18px;
  color: var(--semantic-success);
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-card.enterprise .pricing-feature svg {
  color: var(--semantic-success);
}

/* ============================================================================
   Testimonials - Enterprise Social Proof
   ============================================================================ */
.testimonial-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.testimonial-quote {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-semibold);
  color: var(--brand-primary);
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.testimonial-role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.testimonial-company-logo {
  height: 24px;
  width: auto;
  opacity: 0.7;
}

/* ============================================================================
   Forms - Enterprise Input
   ============================================================================ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-input:hover {
  border-color: var(--border-strong);
}

.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

/* ============================================================================
   Badges & Pills
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
}

.badge-primary {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.badge-success {
  background: var(--semantic-success-light);
  color: var(--semantic-success);
}

.badge-warning {
  background: var(--semantic-warning-light);
  color: var(--semantic-warning);
}

.badge-danger {
  background: var(--semantic-danger-light);
  color: var(--semantic-danger);
}

.badge-neutral {
  background: var(--neutral-100);
  color: var(--text-secondary);
}

/* Status Dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--semantic-success);
}
.status-dot.warning {
  background: var(--semantic-warning);
}
.status-dot.offline {
  background: var(--semantic-danger);
}

/* ============================================================================
   Progress & Loaders
   ============================================================================ */
.progress-bar {
  height: 8px;
  background: var(--neutral-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--brand-primary) 0%,
    var(--brand-primary-hover) 100%
  );
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--brand-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--neutral-100) 25%,
    var(--neutral-200) 50%,
    var(--neutral-100) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================================
   Footer - Enterprise
   ============================================================================ */
.footer-enterprise {
  background: var(--neutral-950);
  color: #9ca3af; /* WCAG 2.2 AA: 6.14:1 on #030712 dark bg */
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

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

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

.footer-brand {
  grid-column: span 1;
}

@media (max-width: 1024px) {
  .footer-brand {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .footer-brand {
    grid-column: span 2;
  }
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 300px;
  margin-top: var(--space-4);
}

.footer-links h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--neutral-0);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: #9ca3af; /* WCAG 2.2 AA: 6.14:1 on dark bg */
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer-links a:hover {
  color: var(--neutral-0);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--neutral-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  font-size: var(--text-sm);
  color: #9ca3af; /* WCAG 2.2 AA: 6.14:1 on dark bg */
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--neutral-0);
}

/* ============================================================================
   Analyzer Dashboard - Enterprise UX
   ============================================================================ */
.analyzer-container {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: var(--space-6);
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-6);
}

@media (max-width: 1024px) {
  .analyzer-container {
    grid-template-columns: 1fr;
  }
}

.analyzer-sidebar {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.analyzer-main {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

/* Upload Zone */
.upload-zone-enterprise {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  background: var(--surface-ground);
}

.upload-zone-enterprise:hover,
.upload-zone-enterprise.dragover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.upload-zone-enterprise.processing {
  pointer-events: none;
  opacity: 0.7;
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--brand-primary-light);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon svg {
  width: 32px;
  height: 32px;
  color: var(--brand-primary);
}

.upload-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.upload-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.upload-formats {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.format-tag {
  padding: var(--space-1) var(--space-2);
  background: var(--neutral-100);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

/* Analysis Results */
.analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.analysis-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.analysis-actions {
  display: flex;
  gap: var(--space-3);
}

/* Risk Score Display */
.risk-score-card {
  background: var(--surface-ground);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-6);
}

.risk-score-value {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.risk-score-value.safe {
  color: var(--semantic-success);
}
.risk-score-value.caution {
  color: var(--semantic-warning);
}
.risk-score-value.danger {
  color: var(--semantic-danger);
}

.risk-score-label {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.risk-score-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Risk Items */
.risk-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.risk-item {
  padding: var(--space-4);
  background: var(--surface-ground);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
}

.risk-item.critical {
  border-left-color: var(--semantic-danger);
}
.risk-item.high {
  border-left-color: var(--semantic-warning);
}
.risk-item.medium {
  border-left-color: #f59e0b;
}
.risk-item.low {
  border-left-color: var(--neutral-400);
}

.risk-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.risk-item-title {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.risk-item-severity {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.risk-item.critical .risk-item-severity {
  color: var(--semantic-danger);
}
.risk-item.high .risk-item-severity {
  color: var(--semantic-warning);
}

.risk-item-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Good Terms */
.good-term-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--semantic-success-light);
  border-radius: var(--radius-lg);
}

.good-term-item svg {
  width: 20px;
  height: 20px;
  color: var(--semantic-success);
  flex-shrink: 0;
  margin-top: 2px;
}

.good-term-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* ============================================================================
   Utilities
   ============================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* Spacing */
.mt-0 {
  margin-top: 0 !important;
}
.mt-2 {
  margin-top: var(--space-2) !important;
}
.mt-4 {
  margin-top: var(--space-4) !important;
}
.mt-6 {
  margin-top: var(--space-6) !important;
}
.mt-8 {
  margin-top: var(--space-8) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-2 {
  margin-bottom: var(--space-2) !important;
}
.mb-4 {
  margin-bottom: var(--space-4) !important;
}
.mb-6 {
  margin-bottom: var(--space-6) !important;
}
.mb-8 {
  margin-bottom: var(--space-8) !important;
}

.pt-0 {
  padding-top: 0 !important;
}
.pb-0 {
  padding-bottom: 0 !important;
}

.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

/* Width */
.w-full {
  width: 100%;
}
.max-w-sm {
  max-width: var(--container-sm);
}
.max-w-md {
  max-width: var(--container-md);
}
.max-w-lg {
  max-width: var(--container-lg);
}

/* Focus Ring */
.focus-ring:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 var(--ring-offset) var(--surface-card),
    0 0 0 calc(var(--ring-offset) + var(--ring-width)) var(--ring-color);
}

/* Transitions */
.transition-all {
  transition: all var(--duration-normal) var(--ease-out);
}

/* ============================================================================
   Animations
   ============================================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}
.animate-fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}
.animate-fade-in-down {
  animation: fadeInDown var(--duration-slow) var(--ease-out);
}
.animate-scale-in {
  animation: scaleIn var(--duration-normal) var(--ease-out);
}
.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

/* Stagger animations */
.stagger-1 {
  animation-delay: 50ms;
}
.stagger-2 {
  animation-delay: 100ms;
}
.stagger-3 {
  animation-delay: 150ms;
}
.stagger-4 {
  animation-delay: 200ms;
}
.stagger-5 {
  animation-delay: 250ms;
}

/* ============================================
   Score Card Reaction Animations
   ============================================ */

/* Score card celebration animation */
.score-card.celebrate {
  animation: celebratePulse 0.6s ease-out;
}

@keyframes celebratePulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
}

/* Warning shake animation */
.score-card.warning-shake {
  animation: warningShake 0.5s ease-in-out;
}

@keyframes warningShake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

/* Caution pulse animation */
.score-card.caution-pulse {
  animation: cautionPulse 0.8s ease-in-out;
}

@keyframes cautionPulse {
  0%,
  100% {
    box-shadow: var(--shadow-md);
  }
  50% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  }
}

/* Score particle animation */
@keyframes scoreParticle {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle))
      translateY(calc(-1 * var(--distance)));
  }
}

.score-particle {
  top: 50%;
  left: 50%;
  z-index: 100;
}

/* Typewriter cursor effect */
.typing::after {
  content: "|";
  animation: blink 0.7s step-end infinite;
  color: var(--primary);
  font-weight: 300;
}

.typing-complete::after {
  content: "";
}

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