/* Modern n8n-inspired design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Dark theme colors inspired by n8n */
  --color-primary: #ff6d5a;
  --color-primary-light: #ff8a7a;
  --color-primary-dark: #e55543;
  
  --color-accent: #ea4b71;
  --color-purple: #7b61ff;
  --color-blue: #0084ff;
  --color-green: #33d69f;
  
  /* Dark backgrounds */
  --bg-dark: #0e0918;
  --bg-dark-secondary: #1a1427;
  --bg-dark-card: #251d35;
  --bg-gradient: linear-gradient(135deg, #1a1427 0%, #251d35 100%);
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: #c4bbd3;
  --text-muted: #8b7c9d;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(255, 109, 90, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

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

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Header Navigation */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(14, 9, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(14, 9, 24, 0.95);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  min-height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.logo:hover {
  transform: translateX(5px);
}

.logo svg {
  height: 24px;
  width: auto;
}

.logo .path-icon {
  fill: var(--color-primary);
}

.logo .path-name {
  fill: var(--text-primary);
}

.logo-kz {
  font-weight: 800;
  font-size: 1.375rem;
  margin-left: -2px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition-base);
  position: relative;
}

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 109, 90, 0.4);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 109, 90, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.125rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-3xl)) var(--space-xl) var(--space-3xl);
  background: radial-gradient(ellipse at top, #251d35 0%, var(--bg-dark) 70%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 109, 90, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(255, 109, 90, 0.1);
  border: 1px solid rgba(255, 109, 90, 0.3);
  border-radius: var(--radius-xl);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease;
}

.hero h1 {
  margin-bottom: var(--space-xl);
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
  font-size: 1.375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* Animation utilities */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Features Section */
.features {
  padding: var(--space-3xl) 0;
  background: var(--bg-dark-secondary);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

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

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.feature-card {
  background: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-purple));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Stats Section */
.stats {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-secondary) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  text-align: center;
}

.stat-card {
  padding: var(--space-xl);
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-sm);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Integrations Section */
.integrations {
  padding: var(--space-3xl) 0;
  background: var(--bg-dark);
}

.integrations-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: center;
  margin-top: var(--space-2xl);
}

.integration-logo {
  width: 80px;
  height: 80px;
  background: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-size: 2rem;
  filter: grayscale(100%);
  opacity: 0.7;
}

.integration-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
  border-color: var(--color-primary);
}

/* Pricing Section */
.pricing {
  padding: var(--space-3xl) 0;
  background: var(--bg-dark-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.pricing-card {
  background: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  position: relative;
  transition: all var(--transition-base);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 109, 90, 0.2);
}

.pricing-card.featured::before {
  content: 'ПОПУЛЯРНЫЙ';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
  color: white;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.pricing-plan {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.pricing-period {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--space-xl);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-2xl);
}

.pricing-features li {
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-green);
  font-weight: bold;
  font-size: 1.25rem;
}

/* CTA Section */
.cta {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite reverse;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta h2 {
  color: white;
  margin-bottom: var(--space-lg);
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: var(--space-2xl);
}

/* Footer */
.footer {
  background: var(--bg-dark);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  font-size: 1.125rem;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: var(--space-xs) 0;
  transition: color var(--transition-base);
}

.footer-section a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

/* Responsive Design */
@media (max-width: 968px) {
  .container {
    padding: 0 1rem;
  }
  
  .nav {
    padding: 0.75rem 0;
  }
  
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links .btn {
    width: 100%;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

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

/* Glow effects */
.glow {
  box-shadow: 0 0 40px rgba(255, 109, 90, 0.3);
}

.text-glow {
  text-shadow: 0 0 40px rgba(255, 109, 90, 0.5);
}