/* =====================================================================
   styles.css — Primee Labs Landing
   ---------------------------------------------------------------------
   Bloques (en este orden):
     1.  Reset + variables
     2.  Animaciones (reveal, stagger, pulse)
     3.  Layout (container, sections)
     4.  Navbar
     5.  Botones reutilizables
     6.  Hero
     7.  Section header (tag/title/desc común)
     8.  Problema
     9.  Oferta / Demo (vídeo o placeholder)
     10. Stats / KPIs
     11. Servicios
     12. Cómo funciona (process)
     13. Beneficios
     14. Precios
     15. FAQ
     16. CTA final
     17. Footer
     18. Chatbot widget
     19. Responsive (media queries)
   ===================================================================== */


/* 1. RESET + VARIABLES =============================================== */

:root {
  --bg: #0F172A;
  --bg-deeper: #0B1220;
  --bg-card: #1E293B;
  --bg-card-hover: #263348;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-cyan: #22D3EE;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --border: rgba(59, 130, 246, 0.2);
  --border-soft: rgba(255, 255, 255, 0.08);
  --logo-bg: rgba(255, 255, 255, 0.04);
  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s ease;
  --shadow-blue: 0 4px 24px rgba(59, 130, 246, 0.35);
  --shadow-blue-lg: 0 8px 32px rgba(59, 130, 246, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

button {
  font-family: inherit;
}


/* 2. ANIMACIONES ===================================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.active > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.stagger.active > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.10s; }
.stagger.active > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.20s; }
.stagger.active > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.30s; }
.stagger.active > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
.stagger.active > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.50s; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}


/* 3. LAYOUT ========================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 5rem 0;
}

.bg-base { background: var(--bg); }
.bg-darker {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deeper) 100%);
}


/* 4. NAVBAR ========================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  transition: padding 0.25s ease, background 0.25s ease;
}
.nav.scrolled {
  padding: 0.6rem 0;
  background: rgba(15, 23, 42, 0.95);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  gap: 1rem;
}

/* Logo: wrapper sutil para integrar el PNG con el dark theme */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--logo-bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.4rem 0.7rem;
  transition: var(--transition);
}
.nav-logo:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--border);
}
.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}


/* 5. BOTONES ========================================================= */

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition);
  box-shadow: var(--shadow-blue);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue-lg);
}
.btn-primary.btn-large {
  font-size: 1.1rem;
  padding: 1.1rem 2.2rem;
}

.btn-ghost {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--text); }

.btn-outline {
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.btn-outline:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--accent);
}


/* 6. HERO ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 50%);
}
#particles-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-headline .hl-blue  { color: var(--accent); }
.hero-headline .hl-green { color: var(--accent-cyan); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-metrics {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.metric {
  display: flex;
  flex-direction: column;
}
.metric-value {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}
.metric-value span { color: var(--accent); }
.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}


/* 7. SECTION HEADER ================================================== */

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-title span { color: var(--accent); }
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}


/* 8. PROBLEMA ======================================================== */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}
.problem-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.problem-icon {
  font-size: 1.8rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}
.problem-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.problem-card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}


/* 9. OFERTA / DEMO =================================================== */

.offer {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deeper) 100%);
}
.offer-frame {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}
.offer-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.offer-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Placeholder cuando NO hay videoUrl */
.offer-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 70%),
    linear-gradient(135deg, #1E293B 0%, #162032 100%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.offer-placeholder-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1.2rem;
}
@media (max-width: 600px) {
  .offer-placeholder-content {
    padding: 1rem;
    gap: 0.7rem;
  }
  .offer-play-icon {
    width: 56px;
    height: 56px;
  }
  .offer-play-icon::after {
    border-left-width: 16px;
    border-top-width: 10px;
    border-bottom-width: 10px;
    margin-left: 4px;
  }
  .offer-placeholder-text {
    font-size: 0.88rem;
  }
}
.offer-play-icon {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.18);
  border: 2px solid rgba(59, 130, 246, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}
.offer-play-icon::after {
  content: '';
  width: 0; height: 0;
  border-left: 22px solid var(--accent);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
}
.offer-placeholder-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
}
.offer-placeholder-text {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 480px;
  line-height: 1.6;
}
.offer-cta-row {
  text-align: center;
  margin-top: 2rem;
}


/* 10. STATS / KPIs =================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.stat-value {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.stat-label {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.stat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* 11. SERVICIOS ====================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.service-num {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(59, 130, 246, 0.08);
  line-height: 1;
}
.service-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.service-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.service-benefit {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
}


/* 12. CÓMO FUNCIONA (process) ======================================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}
.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: left;
  position: relative;
  transition: var(--transition);
}
.process-step:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.process-num {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(59, 130, 246, 0.18);
}
.process-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.process-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.process-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}


/* 13. BENEFICIOS ===================================================== */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  transition: var(--transition);
  text-align: left;
}
.benefit-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.85rem;
}
.benefit-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.benefit-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}


/* 14. PRECIOS ======================================================== */

.pricing {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deeper) 100%);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, #1E293B, #162032);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.2);
  transform: scale(1.03);
}
.featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--accent);
}
.plan-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.plan-setup {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.plan-monthly {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}
.plan-monthly span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.plan-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.plan-features li::before {
  content: '✓';
  color: var(--accent-cyan);
  font-weight: 700;
  flex-shrink: 0;
}
.plan-cta {
  width: 100%;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: var(--transition);
  display: block;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.plan-cta-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.plan-cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.plan-cta-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.plan-cta-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}


/* 15. FAQ ============================================================ */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
}
.faq-icon {
  width: 24px;
  height: 24px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  transition: var(--transition);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: white;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 320px;
  padding: 0 1.5rem 1.25rem;
}
.faq-cta {
  text-align: center;
  margin-top: 2.5rem;
}
.faq-cta p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}


/* 16. CTA FINAL ====================================================== */

.final-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-deeper) 100%);
  text-align: center;
  padding: 6rem 0;
}
.final-cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  z-index: 0;
}
#particles-cta {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}
.final-cta-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem;
}
.urgency-tag {
  display: inline-block;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.final-headline {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.final-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.final-disclaimer {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 1rem;
}


/* 17. FOOTER ========================================================= */

footer {
  background: #080E1C;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  background: var(--logo-bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.4rem 0.7rem;
  margin-bottom: 0.5rem;
}
.footer-logo img {
  height: 24px;
  width: auto;
  display: block;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-social {
  display: flex;
  gap: 1rem;
}
.social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}


/* 18. CHATBOT WIDGET ================================================= */

#chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}
#chat-toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
#chat-toggle:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.45);
}
#chat-toggle .chat-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#chat-toggle .chat-close-x {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #334155;
  opacity: 0;
  transform: rotate(-90deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#chat-widget.open #chat-toggle .chat-logo-img {
  opacity: 0;
  transform: rotate(90deg);
}
#chat-widget.open #chat-toggle .chat-close-x {
  opacity: 1;
  transform: rotate(0deg);
}

#chat-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 340px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: bottom right;
}
#chat-widget.open #chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #162032, #1a2844);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-header-avatar img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.chat-header-name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.chat-header-status {
  font-size: 0.75rem;
  color: #4ade80;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scroll-behavior: smooth;
}
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 4px; }

.chat-msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  animation: msgIn 0.2s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  background: #1E293B;
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.9rem;
  background: #1E293B;
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1); }
}

#chat-quick-replies {
  padding: 0 0.8rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}
.chat-qr-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 100px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.chat-qr-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}
#chat-input:focus { border-color: var(--accent); }
#chat-input::placeholder { color: var(--text-muted); }
#chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
#chat-send:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}
#chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* 19. RESPONSIVE ===================================================== */

@media (max-width: 960px) {
  .process-grid  { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid    { grid-template-columns: repeat(3, 1fr); }
  .nav-links     { display: none; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: scale(1); }
  .problem-grid  { grid-template-columns: 1fr; }
  .stats-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container       { padding: 0 1.25rem; }
  .hero-headline   { font-size: clamp(2rem, 8vw, 2.8rem); }
  .section-padding { padding: 3.5rem 0; }
  .services-grid   { grid-template-columns: 1fr; }
  .pricing-grid    { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: scale(1); }
  .problem-grid    { grid-template-columns: 1fr; }
  .process-grid    { grid-template-columns: 1fr; }
  .benefits-grid   { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: 1fr; }
  .hero-metrics    { gap: 1.5rem; }
  .hero-actions    { flex-direction: column; align-items: stretch; }
  .btn-primary     { width: 100%; justify-content: center; min-height: 52px; }
  .footer-inner    { flex-direction: column; text-align: center; }
  .footer-copy     { text-align: center; }
  .footer-social   { justify-content: center; }
  .footer-logo     { margin: 0 auto 0.5rem; }
  #chat-panel      { width: calc(100vw - 3rem); right: 0; bottom: 70px; }
  .nav-cta         { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
  .nav-logo img    { height: 24px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
