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

:root {
  /* Color Palette — Calm, intelligent dark theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.04);

  --text-primary: #f0f0f5;
  --text-secondary: #9999b0;
  --text-muted: #5e5e78;

  --accent-indigo: #818cf8;
  --accent-emerald: #6ee7b7;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;

  --gradient-main: linear-gradient(135deg, #818cf8 0%, #6ee7b7 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(129,140,248,0.15) 0%, rgba(110,231,183,0.08) 100%);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(129, 140, 248, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

img, svg {
  display: block;
}

/* ===== AMBIENT BACKGROUND ===== */
.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(129,140,248,0.25) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(110,231,183,0.2) 0%, transparent 70%);
  top: 40%;
  right: -10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(129,140,248,0.15) 0%, transparent 70%);
  bottom: -5%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-indigo);
  margin-bottom: 16px;
  padding: 6px 16px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

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

.btn-primary {
  padding: 14px 32px;
  background: var(--gradient-main);
  color: #0a0a0f;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(129, 140, 248, 0.45);
}

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

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

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

.btn-nav {
  padding: 10px 24px;
  background: var(--gradient-main);
  color: #0a0a0f;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.3);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-xl {
  padding: 20px 48px;
  font-size: 1.1rem;
  border-radius: var(--radius-full);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

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

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

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon {
  width: 28px;
  height: 28px;
}

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

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

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

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

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

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

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

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mobile-menu.active {
  display: flex;
  opacity: 1;
}

.mobile-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.mobile-cta {
  margin-top: 16px;
}

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

.hero-container {
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

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

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

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 400;
}

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

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(129,140,248,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ===== DEMO SECTION ===== */
.demo {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

.demo-window {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--border-subtle);
}

.demo-input-panel,
.demo-output-panel {
  background: var(--bg-secondary);
  padding: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel-dot.red { background: #ff5f57; }
.panel-dot.yellow { background: #ffbd2e; }
.panel-dot.green { background: #28c840; }

.panel-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-input-area {
  padding: 32px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.input-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
}

.input-avatar svg {
  width: 20px;
  height: 20px;
}

.demo-user-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
  opacity: 0.9;
  padding-top: 8px;
}

.input-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.input-hint svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  fill: var(--text-muted);
}

.demo-cards {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(16px);
}

.demo-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.card-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card-insight .card-icon {
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-indigo);
}

.card-problem .card-icon {
  background: rgba(251, 113, 133, 0.12);
  color: var(--accent-rose);
}

.card-options .card-icon {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-amber);
}

.card-action .card-icon {
  background: rgba(110, 231, 183, 0.12);
  color: var(--accent-emerald);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.card-insight .card-label { color: var(--accent-indigo); }
.card-problem .card-label { color: var(--accent-rose); }
.card-options .card-label { color: var(--accent-amber); }
.card-action .card-label { color: var(--accent-emerald); }

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-action-text {
  color: var(--text-primary);
  font-weight: 500;
}

.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.option-chip {
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: rgba(251, 191, 36, 0.08);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ===== FEATURES ===== */
.features {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

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

.feature-card {
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

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

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  border: 1px solid rgba(129, 140, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-indigo);
}

.feature-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== WHY SECTION ===== */
.why {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

.why-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.why-text {
  margin-top: 32px;
}

.why-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.why-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.why-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-subtle);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 160px;
}

/* ===== FINAL CTA ===== */
.cta-final {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

.cta-content {
  text-align: center;
  position: relative;
}

.cta-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.cta-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

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

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
  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);
}

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

/* Staggered children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

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

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

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .demo-window {
    grid-template-columns: 1fr;
  }

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

  .feature-card {
    padding: 28px 24px;
  }

  .why-stats {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .demo,
  .features,
  .why {
    padding: 60px 0;
  }

  .cta-final {
    padding: 80px 0;
  }

  .btn-xl {
    padding: 16px 36px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .demo-input-area {
    padding: 20px 16px;
  }

  .demo-cards {
    padding: 16px;
  }

  .demo-card {
    padding: 14px;
  }

  .options-list {
    gap: 6px;
  }

  .option-chip {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}
