/* Kimera Custom Styles */
/* Extends Tailwind CSS with custom properties and animations */

/* ================================
   CSS Custom Properties (Design Tokens)
   ================================ */
:root {
  /* Colors */
  --color-teal: #3ECFB2;
  --color-teal-dark: #34D399;
  --color-purple: #A855F7;
  --color-purple-deep: #7C3AED;
  --color-bg-primary: #0D0D14;
  --color-bg-card: #1A1A24;
  --color-bg-elevated: #252530;
  --color-bg-muted: #2D2D3A;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #E5E5E5;
  --color-text-muted: #9CA3AF;
  --color-text-dim: #6B7280;
  --color-success: #4ADE80;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-border: rgba(255, 255, 255, 0.05);
  --color-border-light: rgba(255, 255, 255, 0.1);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #A855F7 0%, #3ECFB2 100%);
  --gradient-hero-deep: linear-gradient(135deg, #7C3AED 0%, #3ECFB2 50%, #34D399 100%);
  --gradient-button: linear-gradient(90deg, #3ECFB2 0%, #34D399 100%);
  --gradient-card: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, rgba(62, 207, 178, 0.1) 100%);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow-teal: 0 0 20px rgba(62, 207, 178, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ================================
   Base Styles
   ================================ */
html {
  scroll-behavior: smooth;
}

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

/* Selection */
::selection {
  background-color: rgba(62, 207, 178, 0.3);
  color: var(--color-text-primary);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* ================================
   Typography Utilities
   ================================ */
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-overline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.text-mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' on, 'lnum' on;
}

/* ================================
   Component Styles
   ================================ */

/* Navigation */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(13, 13, 20, 0.85);
  border-bottom: 1px solid var(--color-border);
}

.nav-link {
  position: relative;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-button);
  color: var(--color-bg-primary);
  box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid rgba(61, 61, 74, 1);
}

.btn-secondary:hover {
  border-color: var(--color-teal);
  color: var(--color-text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--color-teal);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-light);
  transform: translateY(-4px);
}

.card-elevated {
  background: var(--color-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
}

.card-gradient {
  background: var(--gradient-card);
  border: 1px solid var(--color-border-light);
}

/* Glass effect */
.glass {
  background: rgba(26, 26, 36, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-light);
}

/* Tags/Badges */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(62, 207, 178, 0.15);
  color: var(--color-teal);
}

/* Stats */
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

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

/* Step indicators */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Feature icons */
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(62, 207, 178, 0.1);
  color: var(--color-teal);
  flex-shrink: 0;
}

/* Image placeholders */
.placeholder-image {
  background: var(--gradient-card);
  border: 1px dashed var(--color-border-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ================================
   Animation Classes
   ================================ */

/* Fade in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse animation for CTAs */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(62, 207, 178, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(62, 207, 178, 0.2);
  }
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* Float animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Gradient shift */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
}

/* ================================
   Mobile Menu
   ================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-primary);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  transition: color var(--transition-base);
}

.mobile-menu a:hover {
  color: var(--color-teal);
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 51;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================
   Section Styles
   ================================ */

/* Hero section gradient orbs */
.hero-bg {
  position: relative;
  overflow: hidden;
}

.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  pointer-events: none;
}

.hero-bg::before {
  width: 600px;
  height: 600px;
  background: var(--color-purple);
  top: -200px;
  right: -200px;
}

.hero-bg::after {
  width: 400px;
  height: 400px;
  background: var(--color-teal);
  bottom: -100px;
  left: -100px;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-light), transparent);
}

/* ================================
   FAQ Accordion
   ================================ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}

.faq-question:hover {
  color: var(--color-teal);
}

.faq-icon {
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

/* ================================
   Comparison Table
   ================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.875rem;
}

.comparison-table td:first-child {
  color: var(--color-text-muted);
}

.comparison-table td:last-child {
  color: var(--color-teal);
  font-weight: 500;
}

/* ================================
   Testimonials
   ================================ */
.testimonial-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.testimonial-card blockquote {
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.testimonial-card cite {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-style: normal;
}

/* ================================
   Footer
   ================================ */
.footer {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
}

.footer-link {
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--color-teal);
}

/* Social icons */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  transition: all var(--transition-base);
}

.social-icon:hover {
  background: var(--color-teal);
  color: var(--color-bg-primary);
}

/* ================================
   Responsive Utilities
   ================================ */
@media (max-width: 768px) {
  .stat-value {
    font-size: 2rem;
  }

  .step-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
}

/* ================================
   Print Styles
   ================================ */
@media print {
  .nav-fixed,
  .mobile-menu,
  .hamburger,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}
