/* ============================================================================
   RESULTANTAI DESIGN SYSTEM
   Version: 2.0 (Outcome-Driven Rebuild)
   ============================================================================ */

/* CSS Variables - Dark Mode (Default) */
:root {
  /* Core Colors */
  --bg-primary: #0a0f1a;
  --bg-secondary: #0f172a;
  --bg-card: #151d2e;
  --bg-card-hover: #1a2540;
  --border: #1e293b;
  --border-light: #334155;
  --border-glow: rgba(16, 185, 129, 0.3);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent - Emerald */
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dark: #059669;
  --accent-subtle: rgba(16, 185, 129, 0.08);
  --accent-glow: rgba(16, 185, 129, 0.4);

  /* Secondary Accents (for verticals) */
  --blue: #3b82f6;
  --blue-subtle: rgba(59, 130, 246, 0.1);
  --purple: #8b5cf6;
  --purple-subtle: rgba(139, 92, 246, 0.1);
  --orange: #f59e0b;
  --orange-subtle: rgba(245, 158, 11, 0.1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Light Mode Theme */
:root[data-theme="light"] {
  /* Core Colors - Light */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --border-glow: rgba(16, 185, 129, 0.2);

  /* Text - Light */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Accent stays the same but adjust subtle */
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --accent-glow: rgba(16, 185, 129, 0.3);

  /* Shadows - Light */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to right, rgba(16, 185, 129, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* Floating Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.orb-1 {
  top: 10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: var(--accent);
}

.orb-2 {
  bottom: 20%;
  right: 10%;
  width: 600px;
  height: 600px;
  background: var(--blue);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(10, 15, 26, 0.95);
  box-shadow: var(--shadow-lg);
}

/* Light mode navigation */
:root[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
}

:root[data-theme="light"] nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nav__logo span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--accent);
}

/* Light mode nav links - darker for better visibility */
:root[data-theme="light"] .nav__link {
  color: #475569;
  font-weight: 600;
}

:root[data-theme="light"] .nav__link:hover {
  color: var(--accent-dark);
}

.nav__cta {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav__cta:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* Light mode CTA button - ensure white text */
:root[data-theme="light"] .nav__cta {
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* Dropdown Menu */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  min-width: 500px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.nav__dropdown:hover .nav__dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.nav__dropdown-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.nav__dropdown-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav__dropdown-link:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* Hero Section */
.hero {
  padding-top: 140px;
  padding-bottom: var(--space-xl);
  text-align: center;
  position: relative;
}

.hero__label {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-lg);
  line-height: 1.8;
}

.hero__ctas {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-light);
}

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

.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Sections */
section {
  padding: var(--space-xl) 0;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

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

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: var(--space-sm);
}

.card__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.card__description {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.card__list {
  list-style: none;
  margin-bottom: var(--space-sm);
}

.card__list li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
}

.card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card__proof {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  transition: gap 0.2s ease;
}

.card__cta:hover {
  gap: 12px;
}

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

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

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

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

/* Trust Bar */
.trust-bar {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-bar__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.trust-bar__metric {
  text-align: center;
}

.trust-bar__metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.trust-bar__metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab:hover {
  color: var(--text-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ROI Calculator */
.roi-calculator {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  max-width: 700px;
  margin: 0 auto;
}

.roi-calculator__input-group {
  margin-bottom: var(--space-md);
}

.roi-calculator__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

.roi-calculator__input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-mono);
  transition: border-color 0.2s ease;
}

.roi-calculator__input:focus {
  outline: none;
  border-color: var(--accent);
}

.roi-calculator__results {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-top: var(--space-md);
  text-align: center;
}

.roi-calculator__results-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.roi-calculator__results-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: var(--space-sm);
}

/* Stats Callout */
.stats-callout {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  margin: var(--space-lg) 0;
}

.stats-callout__number {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}

.stats-callout__label {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* Testimonial */
.testimonial {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}

.testimonial__quote {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.testimonial__author {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.testimonial__author-name {
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-2xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.footer__brand span {
  color: var(--accent);
}

.footer__description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.footer__social-link:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.footer__section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.footer__links {
  list-style: none;
}

.footer__link {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .hero__title {
    font-size: 3rem;
  }

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

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: none;
  }

  .nav__dropdown-content {
    min-width: 300px;
  }

  .nav__dropdown-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .trust-bar__metrics {
    grid-template-columns: 1fr;
  }

  .stats-callout__number {
    font-size: 3rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

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

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

/* ============================================================================
   THEME TOGGLE
   ============================================================================ */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.theme-toggle .theme-label {
  font-size: 14px;
  font-weight: 500;
}

/* Hide sun in dark mode, moon in light mode */
.theme-toggle .sun-icon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

:root[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }
}
