/* ==================== ENTERPRISE ENHANCEMENTS ==================== */
/* Additional variables and patterns for enterprise-grade UI */

:root {
  /* Enhanced Enterprise Colors */
  --enterprise-blue: #1E40AF;
  --success-green: #059669;
  --warning-amber: #D97706;
  --error-red: #DC2626;
  
  /* Refined Spacing (8px grid) */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */
  --space-16: 8rem;    /* 128px */
  
  /* Enterprise Typography Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  
  /* Enterprise Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Refined Transitions (enterprise feel) */
  --ease-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-gentle: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
}

/* ==================== ENTERPRISE MICRO-INTERACTIONS ==================== */

/* Refined Button Hover - Soft Glow */
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 170, 156, 0.25);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.btn:active {
  transform: translateY(0);
  transition: all var(--duration-fast) var(--ease-smooth);
}

/* Primary CTA with Subtle Glow */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left var(--duration-slower) var(--ease-smooth);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Card Hover - Elevation + Border Highlight */
.card {
  transition: all var(--duration-normal) var(--ease-smooth);
  border: 1px solid var(--border-primary);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-primary);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 
              0 0 0 1px var(--teal-primary);
}

/* Navigation Active State - Smooth Underline */
.nav-menu a {
  position: relative;
  padding-bottom: 4px;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal-primary);
  transition: width var(--duration-normal) var(--ease-smooth);
}

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

/* Sequential Fade-In for Diagrams */
.diagram-element {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--duration-slow) var(--ease-gentle) forwards;
}

.diagram-element:nth-child(1) { animation-delay: 0ms; }
.diagram-element:nth-child(2) { animation-delay: 100ms; }
.diagram-element:nth-child(3) { animation-delay: 200ms; }
.diagram-element:nth-child(4) { animation-delay: 300ms; }
.diagram-element:nth-child(5) { animation-delay: 400ms; }

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

/* Metric Count-Up Animation */
.metric-number {
  font-variant-numeric: tabular-nums;
}

/* Scroll Reveal - Subtle Entrance */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slower) var(--ease-gentle),
              transform var(--duration-slower) var(--ease-gentle);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enterprise Input Focus */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(24, 170, 156, 0.1);
  transition: all var(--duration-normal) var(--ease-smooth);
}

/* Refined Link Hover */
a:not(.btn) {
  position: relative;
  color: var(--teal-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

a:not(.btn):hover {
  color: var(--teal-bright);
}

/* Section Dividers with Subtle Glow */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--teal-primary) 50%, 
    transparent 100%);
  opacity: 0.3;
}

/* Enterprise Module Cards */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-teal);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
}

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

.module-card:hover {
  transform: translateY(-6px);
  border-color: var(--teal-primary);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

/* Architecture Diagram Lines */
.arch-line {
  stroke: var(--teal-primary);
  stroke-width: 2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s var(--ease-smooth) forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Enterprise Badge/Tag */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: rgba(24, 170, 156, 0.1);
  color: var(--teal-bright);
  border: 1px solid rgba(24, 170, 156, 0.2);
}

/* Refined Shadow Layers */
.shadow-enterprise {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
}

.shadow-enterprise-md {
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-enterprise-lg {
  box-shadow: 
    0 10px 15px rgba(0, 0, 0, 0.1),
    0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Platform Module Icon Glow */
.module-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 170, 156, 0.1);
  border-radius: var(--radius-md);
  color: var(--teal-primary);
  font-size: 2rem;
  transition: all var(--duration-normal) var(--ease-smooth);
}

.module-card:hover .module-icon {
  background: rgba(24, 170, 156, 0.2);
  box-shadow: 0 0 20px rgba(24, 170, 156, 0.4);
  transform: scale(1.05);
}

/* Refined Typography Styles */
.text-gradient {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-balance {
  text-wrap: balance;
}

/* Enterprise Loading State */
.loading-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-elevated) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

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

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
