/* ============================================
   HelloFactura Landing Page — Styles
   ============================================ */

/* --- Import Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Merriweather:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
  --hf-dark: #0f172a;
  --hf-darker: #020617;
  --hf-primary: #2563eb;
  --hf-primary-light: #3b82f6;
  --hf-accent: #f59e0b;
  --hf-green: #10b981;
  --hf-red: #ef4444;
  --hf-gray-50: #f8fafc;
  --hf-gray-100: #f1f5f9;
  --hf-gray-200: #e2e8f0;
  --hf-gray-300: #cbd5e1;
  --hf-gray-400: #94a3b8;
  --hf-gray-500: #64748b;
  --hf-gray-600: #475569;
  --hf-gray-700: #334155;
  --hf-gray-800: #1e293b;
  --hf-gray-900: #0f172a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--hf-gray-800);
  background: var(--hf-darker);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Scroll-driven background transitions --- */
.section-bg {
  position: relative;
  width: 100%;
  transition: background 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  z-index: 0;
}

/* Each section gets its own gradient overlay */
#hero { background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #1a1a2e 100%); }
#hero.visible::before {
  opacity: 0.3;
  background: radial-gradient(ellipse at 60% 40%, rgba(37,99,235,0.15) 0%, transparent 70%);
}

#features { background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 50%, #0c4a6e 100%); }
#features.visible::before {
  opacity: 0.2;
  background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.12) 0%, transparent 60%);
}

#sar-invoicing { background: linear-gradient(180deg, #0c4a6e 0%, #0f172a 50%, #064e3b 100%); }
#sar-invoicing.visible::before { opacity: 0.15; background: radial-gradient(ellipse at 70% 30%, rgba(16,185,129,0.1) 0%, transparent 60%); }

#ai-assistant { background: linear-gradient(180deg, #064e3b 0%, #0f172a 50%, #4c1d95 100%); }
#ai-assistant.visible::before { opacity: 0.2; background: radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.15) 0%, transparent 60%); }

#offline { background: linear-gradient(180deg, #4c1d95 0%, #0f172a 50%, #1e1b4b 100%); }
#offline.visible::before { opacity: 0.12; background: radial-gradient(ellipse at 60% 40%, rgba(59,130,246,0.08) 0%, transparent 60%); }

#printing { background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 50%, #0f2b1a 100%); }
#printing.visible::before { opacity: 0.15; background: radial-gradient(ellipse at 40% 50%, rgba(16,185,129,0.1) 0%, transparent 60%); }

#api { background: linear-gradient(180deg, #0f2b1a 0%, #0f172a 50%, #1a1a2e 100%); }
#api.visible::before { opacity: 0.15; background: radial-gradient(ellipse at 70% 40%, rgba(37,99,235,0.1) 0%, transparent 60%); }

#accounting { background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 50%, #0c1f3f 100%); }
#accounting.visible::before { opacity: 0.18; background: radial-gradient(ellipse at 50% 50%, rgba(245,158,11,0.1) 0%, transparent 60%); }

#reports { background: linear-gradient(180deg, #0c1f3f 0%, #0f172a 50%, #0f172a 100%); }
#reports.visible::before { opacity: 0.1; background: radial-gradient(ellipse at 50% 50%, rgba(37,99,235,0.08) 0%, transparent 60%); }

#platforms { background: #0f172a; }

#testimonials { background: linear-gradient(180deg, #0f172a 0%, #1a1a2e 100%); }
#testimonials.visible::before { opacity: 0.1; background: radial-gradient(ellipse at 50% 50%, rgba(245,158,11,0.08) 0%, transparent 60%); }

#pricing { background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 50%, #020617 100%); }
#pricing.visible::before { opacity: 0.12; background: radial-gradient(ellipse at 60% 60%, rgba(37,99,235,0.1) 0%, transparent 60%); }

#cta { background: linear-gradient(180deg, #020617 0%, #0f172a 100%); }
#cta.visible::before {
  opacity: 0.25;
  background: radial-gradient(ellipse at 50% 30%, rgba(37,99,235,0.2) 0%, transparent 60%);
}

/* --- Glassmorphism navbar --- */
.nav-glass {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hf-primary);
  color: #fff; font-weight: 600; font-size: 15px;
  padding: 14px 32px; border-radius: 12px;
  transition: all 0.3s ease; text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
}
.btn-primary:hover { background: var(--hf-primary-light); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37,99,235,0.45); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff; font-weight: 600; font-size: 15px;
  padding: 14px 32px; border-radius: 12px;
  transition: all 0.3s ease; text-decoration: none;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }

.btn-accent {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hf-accent);
  color: #0f172a; font-weight: 700; font-size: 15px;
  padding: 14px 36px; border-radius: 12px;
  transition: all 0.3s ease; text-decoration: none;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245,158,11,0.5); }

/* --- Feature cards --- */
.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
}
.feature-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 24px;
}
.icon-blue { background: rgba(37,99,235,0.15); color: #60a5fa; }
.icon-green { background: rgba(16,185,129,0.15); color: #34d399; }
.icon-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.icon-amber { background: rgba(245,158,11,0.15); color: #fbbf24; }
.icon-rose { background: rgba(244,63,94,0.15); color: #fb7185; }
.icon-cyan { background: rgba(6,182,212,0.15); color: #22d3ee; }
.icon-indigo { background: rgba(99,102,241,0.15); color: #818cf8; }
.icon-emerald { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.icon-sky { background: rgba(14,165,233,0.15); color: #38bdf8; }

/* --- Text utilities --- */
.text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #fbbf24 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-warm {
  background: linear-gradient(135deg, #fbbf24 0%, #fb923c 50%, #ef4444 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Badge --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.badge-primary { background: rgba(37,99,235,0.15); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-amber { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-coming-soon {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px;
  padding: 3px 10px;
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 20px;
  font-size: 0.7rem; font-weight: 600;
}

/* ── WhatsApp mockup ── */
.whatsapp-mockup {
  background: #0a332c;
  border: 1px solid rgba(37,211,102,0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.wp-header {
  background: #075e54;
}
.msg-client {
  background: #202c33;
  border-radius: 8px 8px 8px 0;
  padding: 8px 12px;
  color: #e9edef;
}
.msg-bot-sales {
  background: #005c4b;
  border-radius: 8px 8px 0 8px;
  padding: 8px 12px;
  color: #e9edef;
}
.msg-bot-sales strong {
  color: #fbbf24;
}

/* --- Scroll indicator --- */
.scroll-down {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.scroll-down .mouse {
  width: 26px; height: 40px; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 13px; position: relative;
}
.scroll-down .mouse::after {
  content: ''; width: 4px; height: 8px; background: rgba(255,255,255,0.5);
  border-radius: 2px; position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%); animation: scroll 1.5s infinite;
}
@keyframes scroll { 0% { opacity: 1; top: 8px; } 100% { opacity: 0; top: 22px; } }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }

/* --- Pricing cards --- */
.pricing-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 2.5rem 2rem;
  transition: all 0.4s ease; position: relative;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.pricing-card.popular {
  border-color: var(--hf-primary);
  background: rgba(37,99,235,0.06);
  box-shadow: 0 0 40px rgba(37,99,235,0.1);
}

/* --- Testimonial cards --- */
.testimonial-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 2rem;
  min-width: 340px; flex-shrink: 0;
}

/* --- Section accents --- */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--hf-primary-light); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 1rem;
}
.section-label::before {
  content: ''; width: 24px; height: 2px;
  background: var(--hf-primary-light); border-radius: 1px;
}

/* --- Grid backgrounds --- */
.bg-dots {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- API code block --- */
.code-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 1.5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px; color: #e2e8f0;
  overflow-x: auto;
}
.code-block .key { color: #60a5fa; }
.code-block .str { color: #34d399; }
.code-block .num { color: #fbbf24; }
.code-block .comment { color: #64748b; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .feature-card { padding: 1.5rem; }
  .pricing-card { padding: 2rem 1.5rem; }
  h2 { font-size: 1.75rem !important; }
}

/* --- Loading shimmer for mockups --- */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Section transitions --- */
.section-bg { transition: background 1.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s ease; }

/* --- Pulsing glow orb --- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
  position: relative;
  overflow: hidden;
}

.hero-slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
  opacity: 0.4;
  transition: opacity 0.4s ease;
  transform: scale(0.95);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.slider-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.slider-dot.active {
  width: 28px;
  border-radius: 5px;
  background: #2563eb;
}

.msg-bot {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  color: #e2e8f0;
  line-height: 1.5;
}

.msg-user {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  color: #e2e8f0;
  line-height: 1.5;
}

.msg-bot strong {
  color: #fbbf24;
}
