/* ============================================
   SalesGraph AI — Premium Design System
   ============================================ */

/* ----- Reset & Tokens ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --bg:            #09090B;
  --bg-elevated:   #111114;
  --bg-card:       #16161B;
  --surface:       #1C1C22;
  --border:        #27272D;
  --border-light:  #2E2E36;
  --text:          #FAFAFA;
  --text-secondary:#A1A1AA;
  --text-muted:    #71717A;
  --accent:        #6365F1;
  --accent-light:  #818CF8;
  --accent-soft:   #4338CA;
  --accent-glow:   rgba(99, 101, 241, 0.15);
  --gradient-1:    #6365F1;
  --gradient-2:    #8B5CF6;
  --gradient-3:    #D946EF;
  --success:       #22C55E;

  /* Typography */
  --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     20px;

  /* Motion */
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ----- Ambient Background ----- */
.bg-ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.07;
}
.bg-glow-1 {
  width: 800px; height: 800px;
  background: var(--accent);
  top: -300px; left: -100px;
  animation: float-glow 20s ease-in-out infinite;
}
.bg-glow-2 {
  width: 600px; height: 600px;
  background: var(--gradient-3);
  bottom: -200px; right: -150px;
  animation: float-glow 25s ease-in-out infinite reverse;
}
@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.bg-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ----- Nav ----- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s var(--ease-out);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em;
}
.logo-mark { display: flex; flex-shrink: 0; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 450; letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { flex-shrink: 0; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 550; letter-spacing: 0.01em;
  border: none; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--gradient-2));
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 8px 24px rgba(99,101,241,0.25);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface); border-color: var(--border-light);
}
.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ----- Hero ----- */
.hero {
  position: relative; z-index: 1;
  padding: 160px 0 100px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  margin-bottom: 32px;
  background: var(--bg-elevated);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.hero-title {
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 960px; margin: 0 auto 28px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--accent-light), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px; color: var(--text-secondary);
  max-width: 680px; margin: 0 auto 40px;
  line-height: 1.75; font-weight: 380;
}
.hero-actions {
  display: flex; gap: 14px; justify-content: center;
  margin-bottom: 72px; flex-wrap: wrap;
}
.hero-metrics {
  display: flex; justify-content: center; align-items: center;
  gap: 40px; flex-wrap: wrap;
}
.metric { text-align: center; }
.metric-value {
  display: block; font-size: 42px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1;
  color: var(--text);
}
.metric-unit { font-size: 24px; font-weight: 500; color: var(--accent-light); }
.metric-label {
  display: block; font-size: 13px; color: var(--text-muted);
  margin-top: 4px; font-weight: 420;
}
.metric-divider {
  width: 1px; height: 40px; background: var(--border);
}

/* ----- Sections ----- */
.section { position: relative; z-index: 1; padding: 120px 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-elevated) 15%, var(--bg-elevated) 85%, transparent); }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-light);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 650; line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
  color: var(--text);
}

/* ----- Feature Cards ----- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all 0.3s var(--ease-out);
  position: relative;
}
.feature-card:hover {
  border-color: rgba(255,255,255,0.10);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.feature-icon {
  color: var(--accent-light);
  margin-bottom: 20px;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius);
}
.feature-card h3 {
  font-size: 17px; font-weight: 600; margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--text-secondary); font-size: 14px;
  line-height: 1.7; font-weight: 400;
}

/* ----- Pipeline ----- */
.pipeline {
  display: flex; gap: 0;
  position: relative;
}
.pipeline::before {
  content: '';
  position: absolute; top: 32px; left: 50px; right: 50px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--accent), var(--border));
  opacity: 0.5;
}
.pipeline-step {
  flex: 1; text-align: center;
  position: relative; z-index: 1;
}
.step-marker {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 15px; font-weight: 700; color: var(--accent-light);
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
}
.pipeline-step:hover .step-marker {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 30px var(--accent-glow);
}
.step-card h4 {
  font-size: 16px; font-weight: 600; margin-bottom: 8px;
}
.step-card p {
  color: var(--text-secondary); font-size: 13px;
  line-height: 1.65; max-width: 180px; margin: 0 auto;
}

/* ----- Compare ----- */
.compare {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 700px; margin: 0 auto;
}
.compare-item {
  display: flex; align-items: center; gap: 16px;
}
.compare-name {
  width: 150px; text-align: right;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  flex-shrink: 0;
}
.compare-item.highlight .compare-name {
  color: var(--accent-light); font-weight: 650;
}
.compare-track {
  flex: 1; height: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(99,101,241,0.3), rgba(139,92,246,0.2));
  border-radius: var(--radius-sm);
  width: var(--w);
  display: flex; align-items: center;
  padding-left: 14px;
  font-size: 12px; color: var(--text-secondary);
  transition: width 1s var(--ease-out);
}
.compare-bar.full {
  background: linear-gradient(90deg, var(--accent), var(--gradient-2));
  color: #fff; font-weight: 550;
}
.compare-note {
  text-align: center; color: var(--text-muted);
  font-size: 13px; margin-top: 20px; line-height: 1.6;
}

/* ----- CTA Card ----- */
.section-cta { padding: 100px 0 120px; }
.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 500px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.cta-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650; line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-desc {
  color: var(--text-secondary); font-size: 16px;
  margin-bottom: 32px; font-weight: 400;
}
.cta-input-group {
  display: flex; gap: 10px;
  max-width: 460px; margin: 0 auto;
}
.cta-input-group input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 15px; font-family: var(--font);
  outline: none; font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cta-input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.cta-note {
  margin-top: 14px; font-size: 13px; color: var(--text-muted);
}

/* ----- Footer ----- */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 64px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; letter-spacing: 0.02em; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; }
.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* ----- Toast ----- */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 200;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(12px);
  transition: all 0.35s var(--ease-out);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .pipeline { flex-direction: column; gap: 32px; }
  .pipeline::before { display: none; }
  .step-card p { max-width: 100%; }
  .step-marker { width: 48px; height: 48px; font-size: 13px; }
  .compare-name { width: 110px; font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { padding: 120px 0 60px; }
  .hero-metrics { gap: 20px; }
  .metric-value { font-size: 30px; }
  .metric-divider { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-input-group { flex-direction: column; }
  .cta-card { padding: 48px 24px; }
  .section { padding: 80px 0; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* ----- Scroll Reveal ----- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
