/* CapnAI Landing Page */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700&display=swap');

:root {
  --primary: #8B5CF6;
  --secondary: #06B6D4;
  --accent: #F472B6;
  --bg: #0F0A1A;
  --bg-alt: #1A1230;
  --surface: #1E1640;
  --surface-light: #2A1F50;
  --text: #F0F0F0;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 92, 246, 0.35);
  --glass-bg: rgba(30, 22, 64, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 12px;
  --radius: 16px;
  --max-width: 1100px;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-accent: linear-gradient(135deg, var(--primary), var(--accent));
}

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

html { scroll-behavior: smooth; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Floating Particles --- */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 24px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
}

.hero-icon {
  font-size: 72px;
  margin-bottom: 20px;
  animation: fade-in-up 0.8s ease forwards;
}

.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fade-in-up 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero .tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fade-in-up 0.8s ease 0.4s forwards;
  opacity: 0;
}

.store-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-in-up 0.8s ease 0.6s forwards;
  opacity: 0;
}

.store-badge {
  height: 48px;
  border-radius: 12px;
  transition: transform 0.2s;
}

.store-badge:hover { transform: scale(1.05); }

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}

.badge-link:hover {
  border-color: var(--border-hover);
  transform: scale(1.03);
}

.badge-link svg {
  width: 20px;
  height: 20px;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section --- */
section {
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 16px;
  margin-bottom: 40px;
}

/* --- How It Works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.step:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.step-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.step h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
}

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

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.pro-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gradient-accent);
  color: #fff;
  letter-spacing: 0.5px;
}

/* --- Screenshot Gallery --- */
.gallery {
  padding: 40px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.gallery-track {
  display: flex;
  gap: 20px;
  animation: scroll-gallery 40s linear infinite;
  width: max-content;
}

.gallery-track:hover {
  animation-play-state: paused;
}

.gallery-item {
  flex-shrink: 0;
  width: 280px;
  height: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.3s;
}

.gallery-item:hover { transform: scale(1.03); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes scroll-gallery {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Pricing --- */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-cards.three-col {
  max-width: 960px;
}

.pricing-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: var(--surface-light);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--gradient);
  color: #fff;
  letter-spacing: 0.5px;
}

.pricing-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-family: 'Fredoka', sans-serif;
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-card .period {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.pricing-card .save-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-top: 16px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--secondary);
  font-weight: 700;
}

/* --- CTA --- */
.cta {
  text-align: center;
  padding: 80px 0;
}

.cta h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 16px;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

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

footer p {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

/* --- Legal Pages --- */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.legal-page h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--primary);
}

.legal-page p, .legal-page li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

/* --- Support Page --- */
.support-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.support-page h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px;
  margin-bottom: 32px;
}

.faq-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.faq-item h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-card {
  margin-top: 40px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.contact-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.contact-card a:hover { text-decoration: underline; }

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Mobile --- */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 10, 26, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .hero { padding: 48px 0 40px; }
  .hero-icon { font-size: 56px; }

  .gallery-item {
    width: 200px;
    height: 400px;
  }

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

  .pricing-cards {
    grid-template-columns: 1fr;
  }

  footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
