/* ==========================================================================
   AskAiml — Landing page styles
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-alt: #0b1220;
  --surface: #0e1728;
  --surface-2: #131f36;
  --border: rgba(148, 163, 184, 0.12);
  --text: #e8edf7;
  --text-muted: #94a3b8;
  --primary: #6d5ef2;
  --primary-2: #9b5cf6;
  --accent: #22d3ee;
  --gradient: linear-gradient(135deg, #6d5ef2 0%, #9b5cf6 50%, #22d3ee 100%);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

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

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 760px;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(109, 94, 242, 0.6);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px -8px rgba(109, 94, 242, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.3);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: #fff;
  background: rgba(109, 94, 242, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: #fff;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  color: var(--primary);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.18s ease;
}

.main-nav a:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(109, 94, 242, 0.28) 0%,
    rgba(155, 92, 246, 0.12) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 34px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.hero-meta p strong {
  color: var(--text);
}

.avatars {
  display: flex;
}

.avatars span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-left: -10px;
}

.avatars span:first-child {
  margin-left: 0;
}

.avatars span:nth-child(1) { background: #6d5ef2; }
.avatars span:nth-child(2) { background: #0ea5e9; }
.avatars span:nth-child(3) { background: #f472b6; }
.avatars span:nth-child(4) { background: var(--surface-2); color: var(--text-muted); }

/* Demo card */
.hero-demo {
  margin-top: 64px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.traffic {
  display: flex;
  gap: 6px;
}

.traffic i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.traffic i:nth-child(1) { background: #f87171; }
.traffic i:nth-child(2) { background: #fbbf24; }
.traffic i:nth-child(3) { background: #34d399; }

.demo-title {
  color: var(--text-muted);
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", monospace;
  flex: 1;
}

.demo-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.demo-body {
  padding: 28px;
  display: flex;
  justify-content: center;
}

.demo-chat {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.55;
}

.msg.user {
  align-self: flex-end;
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg.ai {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.msg.ai p + p {
  margin-top: 10px;
}

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

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

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-2);
  margin-bottom: 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 17px;
}

.grid {
  display: grid;
  gap: 24px;
}

/* ==========================================================================
   Features
   ========================================================================== */

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(109, 94, 242, 0.4);
  background: var(--surface-2);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(109, 94, 242, 0.12);
  margin-bottom: 18px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ==========================================================================
   Steps
   ========================================================================== */

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

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px -6px rgba(109, 94, 242, 0.6);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats-section {
  padding: 64px 0;
}

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

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-muted);
  font-size: 15px;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

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

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial blockquote {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.testimonial figcaption strong {
  color: var(--text);
}

.t-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  flex-shrink: 0;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

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

.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.price-featured {
  border-color: var(--primary);
  box-shadow: 0 20px 60px -24px rgba(109, 94, 242, 0.6);
  transform: scale(1.03);
}

.badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}

.price {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.price-card ul {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
}

.price-card li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-muted);
  font-size: 15px;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--primary-2);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 24px 22px;
  color: var(--text-muted);
}

/* ==========================================================================
   CTA
   ========================================================================== */

.cta-section {
  padding-bottom: 120px;
}

.cta-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(109, 94, 242, 0.18), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(109, 94, 242, 0.35);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-card > p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.cta-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 460px;
  margin: 0 auto;
}

.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.18s ease;
}

.cta-form input:focus {
  border-color: var(--primary);
}

.cta-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 64px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 14px;
  max-width: 280px;
}

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

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 15px;
  padding: 6px 0;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.footer-social {
  display: flex;
  gap: 18px;
}

.footer-social a {
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.18s ease;
}

.footer-social a:hover {
  color: #fff;
}

/* ==========================================================================
   Reveal animations
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .features-grid,
  .steps,
  .testimonials-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

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

  .price-featured {
    transform: none;
  }

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

@media (max-width: 720px) {
  .main-nav,
  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }

  .main-nav.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .section {
    padding: 64px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
