/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-card: #14141f;
  --bg-card-hover: #1a1a2e;
  --accent: #7c5cbf;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 191, 0.3);
  --text: #e4e4ef;
  --text-muted: #8888a0;
  --text-dim: #5a5a72;
  --border: #2a2a3e;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 960px;
  --transition: 0.3s ease;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 200;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: #c4b5fd;
}

img {
  max-width: 100%;
}

/* ===== Cursor paint trail ===== */
#paint-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Everything else above the trail */
section, footer, .legal {
  position: relative;
  z-index: 1;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

/* ===== Scroll animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax elements — transform set by JS */
.parallax {
  will-change: transform;
  transition: none;
}

/* Slide from sides */
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.slide-left.visible, .slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale reveal */
.scale-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== Header / Nav ===== */
.nav {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo span {
  color: var(--accent-light);
}
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.nav-links a:hover {
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero {
  --glow-offset: 0px;
}
.hero::before {
  content: '';
  position: absolute;
  top: calc(-40% + var(--glow-offset));
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  transition: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  position: relative;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  position: relative;
}
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 4px 24px var(--accent-glow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 92, 191, 0.45);
  color: #fff;
}

/* ===== Section titles ===== */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-title p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Features (cards) ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ===== Chat mockups ===== */
.examples {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mockups {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 520px;
  margin: 0 auto;
}
.mockup {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mockup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 20, 31, 0.6);
}
.mockup-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mockup-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.mockup-status {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.mockup-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
}
.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bot {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-time-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 4px 0;
}

/* ===== Pricing ===== */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.pricing-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.pricing-card.popular {
  border-color: var(--accent);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 50px;
  white-space: nowrap;
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 16px 0 4px;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-period {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}
.pricing-features li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.pricing-features li::before {
  content: '✓';
  color: var(--accent-light);
  margin-right: 8px;
  font-weight: 700;
}
.pricing-note {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.pricing-note strong {
  color: var(--accent-light);
}
.pricing-footnote {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Legal pages ===== */
.legal {
  padding-top: 40px;
  padding-bottom: 60px;
}
.legal h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.legal .legal-date {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 36px;
}
.legal h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--accent-light);
}
.legal p, .legal li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal ul, .legal ol {
  padding-left: 24px;
  margin-bottom: 12px;
}
.legal li {
  margin-bottom: 6px;
}
.legal a {
  color: var(--accent-light);
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.legal-back:hover {
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }
  .hero {
    padding: 60px 0 70px;
  }
  .hero p {
    font-size: 1rem;
  }
  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  .nav-links {
    gap: 16px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
  .msg {
    max-width: 90%;
  }
}
