/* ===== DESIGN TOKENS ===== */
:root {
  --bg-primary: #06060b;
  --bg-secondary: #0c0c14;
  --bg-card: rgba(14, 14, 24, 0.7);
  --bg-card-hover: rgba(20, 20, 35, 0.8);

  --text-primary: #e8e8f0;
  --text-secondary: #8888a8;
  --text-muted: #555570;

  --accent-1: #6c5ce7;
  --accent-2: #a78bfa;
  --accent-3: #38bdf8;
  --accent-glow: rgba(108, 92, 231, 0.25);

  --gradient-main: linear-gradient(135deg, #6c5ce7 0%, #a78bfa 40%, #38bdf8 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(108,92,231,0.15) 0%, rgba(56,189,248,0.08) 100%);

  --border-color: rgba(136, 136, 168, 0.12);
  --border-glow: rgba(108, 92, 231, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== PARTICLE CANVAS ===== */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: all 0.4s var(--ease-out);
}

#navbar.scrolled {
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-accent {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
}

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

.nav-cta {
  padding: 8px 20px !important;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  border: 1px solid var(--border-glow);
  color: var(--accent-2) !important;
  transition: all 0.3s var(--ease-out) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: rgba(108, 92, 231, 0.2) !important;
  border-color: var(--accent-1);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.35s var(--ease-out);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 24px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.5);
}

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

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

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(108, 92, 231, 0.15) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: var(--gradient-subtle);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-line {
  display: block;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

/* ===== TERMINAL ===== */
.terminal-wrapper {
  perspective: 1000px;
}

.terminal {
  max-width: 680px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
  text-align: left;
  transform: rotateX(2deg);
  transition: transform 0.6s var(--ease-out);
}

.terminal:hover {
  transform: rotateX(0deg);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  min-height: 180px;
}

.terminal-line {
  color: var(--text-secondary);
  white-space: pre;
}

.terminal-line .prompt {
  color: var(--accent-3);
}

.terminal-line .success {
  color: #22c55e;
}

.terminal-line .info {
  color: var(--accent-2);
}

.terminal-line .warning {
  color: #fbbf24;
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-2);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== SECTIONS ===== */
section {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px;
}

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

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: var(--gradient-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-glow);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-glow);
  margin-bottom: 20px;
  color: var(--accent-2);
}

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

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== HOW IT WORKS (STEPS) ===== */
#how-it-works {
  background: var(--bg-secondary);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.4s var(--ease-out);
}

.step:hover {
  border-color: var(--border-glow);
  box-shadow: 0 8px 48px rgba(108, 92, 231, 0.08);
}

.step-number {
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  opacity: 0.5;
}

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

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

.step-code {
  background: rgba(6, 6, 11, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
}

.code-comment { color: var(--text-muted); }
.code-key { color: var(--accent-3); }
.code-prompt { color: var(--accent-3); }
.code-success { color: #22c55e; }
.code-info { color: var(--accent-2); }

/* ===== STATS ===== */
#stats {
  background: var(--bg-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.1);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
  letter-spacing: -0.03em;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

/* ===== CTA ===== */
#cta {
  background: var(--bg-secondary);
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(108, 92, 231, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
}

.cta-card > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 40px;
  position: relative;
}

.cta-form {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.input-group {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(6, 6, 11, 0.6);
  transition: border-color 0.3s;
}

.input-group:focus-within {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group input {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
}

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

.input-group .btn {
  padding: 12px 24px;
  white-space: nowrap;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  position: relative;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

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

/* ===== ANIMATIONS ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step {
    grid-template-columns: auto 1fr;
  }

  .step-code {
    grid-column: 1 / -1;
  }

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

@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .step {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  .input-group {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-inner {
    padding: 80px 16px;
  }

  .stat-card {
    padding: 32px 16px;
  }

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