/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #253347;
  --primary: #3B82F6;
  --primary-light: #60A5FA;
  --accent: #10B981;
  --accent-light: #34D399;
  --purple: #8B5CF6;
  --orange: #F59E0B;
  --text: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --glow-primary: rgba(59, 130, 246, 0.15);
  --glow-accent: rgba(16, 185, 129, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--primary-light);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(4px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(4px);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 24px 60px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  will-change: transform;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
}

.hero-glow-2 {
  width: 500px;
  height: 500px;
  bottom: -10%;
  right: -5%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 24px;
  animation: badgePulse 3s ease-in-out infinite;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08); }
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563EB);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border-hover);
}

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

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-image {
  width: 100%;
  border-radius: var(--radius);
  transition: var(--transition-slow);
}

.hero-image-wrapper:hover .hero-image {
  transform: scale(1.02);
}

.hero-image-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.06));
  pointer-events: none;
}

/* ===== HERO STATS ===== */
.hero-stats {
  max-width: var(--max-width);
  margin: 80px auto 0;
  width: 100%;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--border-hover);
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-2px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== SECTIONS COMMON ===== */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== FEATURES ===== */
.features {
  padding: 120px 0;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 36px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.04), transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
}

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

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 20px;
  position: relative;
}

.feature-icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-light);
}

.feature-icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-light);
}

.feature-icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #A78BFA;
}

.feature-icon-orange {
  background: rgba(245, 158, 11, 0.1);
  color: #FBBF24;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tags span {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  transition: var(--transition);
}

.feature-card:hover .feature-tags span {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 120px 0;
  position: relative;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.pipeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pipeline-line {
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.2;
}

.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 20px 0;
  position: relative;
}

.step-node {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.pipeline-step:hover .step-node {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.step-content {
  padding-top: 4px;
}

.step-number {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== TECH STACK ===== */
.tech-stack {
  padding: 120px 0;
  position: relative;
}

.tech-stack::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 20px;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.tech-card:hover {
  border-color: var(--border-hover);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.4);
}

.tech-icon {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-card:hover .tech-icon {
  color: var(--primary-light);
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.tech-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-card:hover .tech-name {
  color: var(--text);
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 120px 0;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.05), transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.cta-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 5px 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--text);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hero elements animate on load */
.hero-content {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-visual {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link,
  .nav-cta {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    margin-left: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero {
    padding-top: 100px;
    min-height: auto;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 48px;
  }

  .stat-number {
    font-size: 2rem;
  }

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

  .footer-top {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cta-card {
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-item {
    padding: 16px 12px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

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

  .footer-links-group {
    grid-template-columns: 1fr 1fr;
  }

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

  .pipeline-step {
    gap: 16px;
  }

  .step-node {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .pipeline-line {
    left: 22px;
  }
}
