/* ============ Design tokens ============ */
:root {
  --habla-blue: #2b7cff;
  --habla-wat: #2b7cff;
  --habla-blue-dark: #1f5fd6;
  --habla-ink: #0a0a0a;
  --habla-muted: #555;
  --habla-bg: #ffffff;
  --habla-soft: #f5f7fb;
  --habla-wa: #ffffff;
  --habla-card-dark: #0f1419;
  --habla-border: rgba(0, 0, 0, 0.08);
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-md: 0 10px 30px rgba(15, 20, 25, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 20, 25, 0.12);
  --font-sans: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Sora', 'Poppins', sans-serif;
  --font-body: 'DM Sans', 'Poppins', sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--habla-ink);
  background: var(--habla-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 150%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5 { font-family: var(--font-sans); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.novedades-badge {
  position: center;
  top: 20px;
  right: 50px;
  width: 70%;
  height: 50%;
  background: var(--habla-wat);
  color: rgb(255, 255, 255);
  padding: 8px 8px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 40;
  box-shadow: 0 4px 15px rgba(43, 124, 255, 0.3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulseDemo 2s infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: 0;
}
.btn-primary {
  background: var(--habla-blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(43, 124, 255, 0.3);
}
.btn-primary:hover { background: var(--habla-blue-dark); transform: translateY(-2px); }

.btn-secundary {
  background: var(--habla-wa);
  color: var(--habla-wat);
  box-shadow: 0 10px 24px rgba(43, 124, 255, 0.3);
}
.btn-secundary:hover { background: #ffffff; transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--habla-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  color: var(--habla-ink);
}
.brand img { width: 40px; height: 40px; }

.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 6px;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  color: #222;
  transition: background .2s, color .2s;
}
.primary-nav a:hover { background: var(--habla-soft); color: var(--habla-blue); }
.caret { font-size: 12px; opacity: .7; }

.has-submenu { position: relative; }
.submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--habla-border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; }

/* Submenu de dos columnas para Sectores y Empresa */
.submenu-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  min-width: 480px;
  gap: 2px;
  padding: 12px;
  text-align: left;
}
.submenu-grid li { list-style: none; }
.site-header .primary-nav .submenu-grid a {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: left !important;
}
.site-header .primary-nav .submenu-grid a .sector-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--habla-dark);
  text-align: left !important;
  width: 100%;
}
.site-header .primary-nav .submenu-grid a .sector-desc {
  display: block;
  font-size: 12px;
  color: var(--habla-muted, #94a3b8);
  font-weight: 400;
  text-align: left !important;
  width: 100%;
}
.site-header .primary-nav .submenu-grid a:hover .sector-title { color: var(--habla-blue); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.account-link {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--habla-soft);
  color: #333;
}
.account-link:hover { background: #e7ecf5; color: var(--habla-blue); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ============ Hero ============ */
.hero { padding: 60px 0 40px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-display);
  color: var(--habla-blue);
  font-size: 18px;
  margin: 0 0 14px;
  font-weight: 600;
}
.eyebrow em { font-style: italic; }
.hero h1 {
  font-size: clamp(40px, 6vw, 67px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero-lead {
  font-size: 18px;
  color: var(--habla-muted);
  max-width: 520px;
  margin: 0 0 28px;
}

/* Hero CTA buttons wrapper */
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .hero-btns { gap: 10px; }
  .hero-btns .btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 10px 14px;
    font-size: 13px;
    min-width: 0;
  }
}
.hero-image img {
  width: 300%;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(43,124,255,0.18));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============ Features ============ */
.features { padding: 80px 0 40px; }
.features-header { max-width: 820px; }
.features-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
}
.features-sub {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--habla-blue);
  font-size: 28px;
  font-weight: 600;
  margin: 6px 0 18px;
}
.features-intro {
  font-size: 17px;
  color: var(--habla-muted);
  max-width: 640px;
}
.feature-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--habla-soft);
  border: 1px solid var(--habla-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .25s, box-shadow .25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}
.feature-card p { color: var(--habla-muted); margin: 0; }

/* ============ Bento Grid ============ */
.bento-section { padding: 60px 0; }
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  min-height: 720px;
}
.bento-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .3s ease;
}
.bento-card:hover { transform: translateY(-4px); }
.bento-dark {
  background: var(--habla-card-dark);
  color: #fff;
}
.bento-light {
  background: #eaf2fc;
  color: var(--habla-ink);
}
.bento-text h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.bento-text p { color: rgba(255,255,255,0.7); margin: 0; }
.bento-light .bento-text p { color: var(--habla-muted); }

.bento-item-1 { grid-column: 1 / 2; grid-row: 1 / 3; }
.bento-item-2 { grid-column: 2 / 3; grid-row: 1 / 2; }
.bento-item-3 { grid-column: 3 / 4; grid-row: 1 / 2; }
.bento-item-4 { grid-column: 2 / 4; grid-row: 2 / 3; }

.bento-img-dashboard {
  margin-bottom: 22px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.bento-img-dashboard img { width: 100%; height: auto; }
.bento-img-canvas {
  margin-top: 22px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
}
.bento-img-canvas img { width: 100%; height: auto; }

.avatar-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.avatar-group img {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  margin-left: -18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.15);
}
.avatar-group img:first-child { margin-left: 0; }
.img-robot-solo {
  width: 80%;
  margin: auto;
  object-fit: contain;
}
.bento-item-3 { align-items: center; justify-content: center; }

/* ============ Big CTA ============ */
.big-cta {
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}
.big-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.big-cta-robot {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  filter: drop-shadow(0 30px 50px rgba(43,124,255,0.18));
}
.big-cta-copy h4 {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--habla-blue);
  font-size: 24px;
  margin-bottom: 10px;
}
.big-cta-copy h2 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.big-cta-copy p {
  font-size: 18px;
  color: var(--habla-muted);
  margin-bottom: 28px;
  max-width: 520px;
}

/* ============ Form CTA section ============ */
.form-cta-section {
  padding: 60px 20px 80px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}
.habla-cta {
  position: relative;
  background: linear-gradient(180deg, #2b7cff 0%, var(--habla-blue) 100%);
  border-radius: 28px;
  overflow: hidden;
  padding: 72px 40px 64px;
  max-width: 960px;
  margin: 0 auto;
}
.cta-inner { position: relative; z-index: 1; }
.cta-header { text-align: center; margin-bottom: 40px; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 14px;
}
.cta-title em { font-style: italic; }
.cta-subtitle {
  font-size: 16px;
  color: #ffffff;
  max-width: 520px;
  margin: 0 auto;
}
.cta-form {
  background: #ffffff;
  border: 1px solid var(--habla-border);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  box-shadow: 0 10px 24px rgba(43, 124, 255, 0.3);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: #000;
}
.field-group input, .field-group select {
  background: #F9FAFB;
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #000;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-group input:focus, .field-group select:focus {
  border-color: var(--habla-blue);
  box-shadow: 0 0 0 3px rgba(43,124,255,0.15);
}
.btn-probar {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--habla-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(43,124,255,0.25);
}
.btn-probar:hover { transform: translateY(-2px); background: var(--habla-blue-dark); }
.btn-probar:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.checkboxes { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; cursor: pointer; }

#success-message {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.success-icon { font-size: 40px; margin-bottom: 15px; }
#success-message h3 { font-family: var(--font-display); margin-bottom: 10px; }

/* ============ Footer ============ */
.site-footer {
  background: #0a0a0a;
  color: #cfd3da;
  padding: 60px 0 0;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 700;
}
.footer-col a {
  color: #cfd3da;
  font-size: 14px;
  line-height: 2;
  transition: color .2s;
}
.footer-col a:hover { color: var(--habla-blue); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.socials a:hover { background: var(--habla-blue); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 50px;
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: #8a909a;
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .primary-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { order: 1; max-width: 340px; margin: 20px auto 0; }
  .hero-image img { width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .bento-item-1, .bento-item-2, .bento-item-3, .bento-item-4 {
    grid-column: auto; grid-row: auto;
  }
  .big-cta-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-cta-section { padding: 30px 12px 50px; }
  .habla-cta { padding: 30px 16px; border-radius: 20px; }
  .cta-form { padding: 24px 18px 20px; }
  .cta-header { margin-bottom: 24px; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── FAQ section (shared) ── */
.faq-section { padding: 60px 20px 80px; }
.faq-heading-block { margin-bottom: 50px; }
.faq-section-title { font-size: 36px; font-weight: 800; color: #0b1c2d; margin: 0; line-height: 1.25; }
.faq-wrapper { font-family: 'Inter', system-ui, sans-serif; max-width: 900px; margin: 0 auto; width: 100%; }
.faq-item { border-bottom: 2px solid rgba(43,124,255,0.2); margin-bottom: 10px; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: none; padding: 20px 0;
  font-size: 18px; font-weight: 700; color: #0b1c2d;
  text-align: left; cursor: pointer; transition: color 0.3s ease; font-family: inherit;
}
.faq-question:hover { color: #2b7cff; }
.faq-icon { flex-shrink: 0; margin-left: 20px; width: 24px; height: 24px; transition: transform 0.3s ease; fill: #2b7cff; }
.faq-item.is-open .faq-icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.is-open .faq-answer { max-height: 400px; }
.faq-answer-content { padding-bottom: 20px; color: #475569; font-size: 16px; line-height: 1.6; }
@media (max-width: 768px) { .faq-section-title { font-size: 26px; } }
@media (max-width: 600px) { .faq-question { font-size: 15px; padding: 16px 0; } }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile CTA (injected into nav) ── */
.mobile-cta-item { display: none; }

@media (max-width: 960px) {
  .mobile-cta-item {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
  }
  .mobile-cta-item .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  /* Hero: keep badge readable on small screens */
  .novedades-badge {
    width: auto !important;
    max-width: 90%;
    font-size: 11px !important;
  }
  .hero { padding: 30px 0 20px; }
  .hero h1 { font-size: clamp(32px, 8vw, 48px); }
}

/* Mobile menu open state */
.mobile-open .primary-nav {
  display: block;
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--habla-border);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  z-index: 9998;
}
.mobile-open .primary-nav > ul {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.mobile-open .primary-nav a {
  font-size: 15px;
  padding: 8px 10px;
}
/* Acordeón móvil: submenús colapsados por defecto; se abren al tocar el apartado */
.mobile-open .submenu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: 0;
  background: transparent;
  min-width: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 0 0 12px;
  transition: max-height .32s ease, padding .32s ease;
}
.mobile-open .has-submenu.submenu-open > .submenu {
  max-height: 720px;
  padding: 4px 0 6px 12px;
}
.mobile-open .submenu a {
  font-size: 13px;
  padding: 6px 10px;
  color: #64748b;
}
.mobile-open .submenu-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-open .submenu-grid .sector-desc { display: none; }

/* Flecha indicadora en el apartado padre (solo móvil) */
.mobile-open .has-submenu > a { justify-content: space-between; }
.mobile-open .has-submenu > a .caret::after {
  content: "\2304"; /* ⌄ */
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform .25s ease;
}
.mobile-open .has-submenu.submenu-open > a .caret::after {
  transform: rotate(180deg);
}

/* ── Stats strip ── */
.stats-strip { padding: 0 20px 60px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.stat-card {
  background: #2b7cff;
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(43, 124, 255, 0.3);
}
.stat-card:hover {
  transform: translateY(-2px);
}
.stat-value {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
.stat-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-value  { font-size: 28px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card   { padding: 22px 16px; }
}

/* =====================================================
   Professional Animations — Home Page
   ===================================================== */

/* ── Keyframes ─────────────────────────────────────── */
@keyframes pulseDemo {
  0%, 100% { box-shadow: 0 4px 15px rgba(43,124,255,0.3); }
  50%       { box-shadow: 0 4px 32px rgba(43,124,255,0.65), 0 0 0 8px rgba(43,124,255,0.1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(56px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes scaleReveal {
  from { opacity: 0; transform: scale(0.82) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(43,124,255,0.3); }
  50%       { box-shadow: 0 12px 44px rgba(43,124,255,0.65), 0 0 0 6px rgba(43,124,255,0.1); }
}

@keyframes headerIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0);     }
}

@keyframes gradientShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Header ─────────────────────────────────────────── */
.site-header { animation: headerIn .55s cubic-bezier(.22,1,.36,1) both; }
.site-header.scrolled {
  box-shadow: 0 8px 32px rgba(15,20,25,0.1);
  background: rgba(255,255,255,0.97);
  transition: box-shadow .3s ease, background .3s ease;
}

/* ── Hero staggered entrance ─────────────────────────
   hero-copy / hero-image are removed from the IO observer
   so these CSS animations run on page load without conflict.  */
.hero-copy .novedades-badge {
  animation: fadeUp .55s cubic-bezier(.22,1,.36,1) .15s both,
             pulseDemo 2.5s ease-in-out 1.2s infinite;
}
.hero-copy .eyebrow   { animation: fadeUp .55s cubic-bezier(.22,1,.36,1) .30s both; }
.hero-copy h1         { animation: fadeUp .70s cubic-bezier(.22,1,.36,1) .45s both; }
.hero-copy .hero-lead { animation: fadeUp .55s cubic-bezier(.22,1,.36,1) .60s both; }
.hero-copy .hero-btns { animation: fadeUp .55s cubic-bezier(.22,1,.36,1) .75s both; }
.hero-image           { animation: fadeLeft .90s cubic-bezier(.22,1,.36,1) .25s both; }

/* Hero primary CTA glow pulse */
.hero-btns .btn-primary { animation: glowPulse 2.8s ease-in-out 2s infinite; }

/* ── Stat cards — scale-in + stagger ─────────────────── */
.stat-card.reveal {
  transform: scale(0.88) translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1);
}
.stat-card.reveal.in-view   { transform: scale(1) translateY(0); }
.stat-card:nth-child(1).reveal { transition-delay: 0s;   }
.stat-card:nth-child(2).reveal { transition-delay: .1s;  }
.stat-card:nth-child(3).reveal { transition-delay: .2s;  }
.stat-card:nth-child(4).reveal { transition-delay: .3s;  }

/* Stat value spring-pop when card comes into view */
.stat-card.in-view .stat-value {
  animation: scaleReveal .45s cubic-bezier(.34,1.56,.64,1) .45s both;
}

/* Shimmer sweep on hover */
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: '';
  position: absolute;
  top: -60%; left: -80%;
  width: 50%; height: 220%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left .55s ease;
}
.stat-card:hover::after { left: 130%; }

/* ── Feature cards — stagger + inner glow + tilt ─────── */
.feature-grid { perspective: 1000px; }

.feature-card { position: relative; overflow: hidden; }
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(43,124,255,0.09) 0%, transparent 68%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  border-radius: inherit;
}
.feature-card:hover::before { opacity: 1; }

.feature-card:nth-child(1).reveal { transition-delay: 0s;   }
.feature-card:nth-child(2).reveal { transition-delay: .12s; }
.feature-card:nth-child(3).reveal { transition-delay: .24s; }

/* ── Empresa CTA buttons ─────────────────────────────── */
.empresa-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 50px;
}
.empresa-btn { transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, background .2s, color .2s; }
.empresa-btn:hover { transform: translateY(-3px); }
.empresa-btn svg { transition: transform .2s ease; }
.empresa-btn:hover svg { transform: translateX(4px); }

.empresa-btn:nth-child(1).reveal { transition-delay: 0s; }
.empresa-btn:nth-child(2).reveal { transition-delay: .12s; }

/* ── Big CTA — directional slides ───────────────────── */
.big-cta-robot.reveal {
  transform: translateX(-44px);
  transition: opacity .85s ease, transform .85s cubic-bezier(.22,1,.36,1);
}
.big-cta-robot.reveal.in-view { transform: translateX(0); }

.big-cta-copy.reveal {
  transform: translateX(44px);
  transition: opacity .85s ease .1s, transform .85s cubic-bezier(.22,1,.36,1) .1s;
}
.big-cta-copy.reveal.in-view { transform: translateX(0); }

/* ── Form CTA — animated gradient background ─────────── */
.habla-cta {
  background: linear-gradient(135deg, #1865f5 0%, #2b7cff 48%, #4a92ff 100%);
  background-size: 250% 250%;
  animation: gradientShift 7s ease infinite;
}

/* ── Reduced-motion safeguard ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:        .01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:       .01ms !important;
    transition-delay:          0ms   !important;
  }
}

/* =====================================================
   Demo Call Section
   ===================================================== */

.demo-card-hidden { display: none !important; }

/* ── Section shell ─────────────────────────────────── */
.demo-section {
  background: linear-gradient(140deg, #07101f 0%, #0d1c38 55%, #060e1c 100%);
  padding: 96px 0 104px;
  position: relative;
  overflow: hidden;
}
.demo-section::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  top: -240px; right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,124,255,.16) 0%, transparent 68%);
  pointer-events: none;
}
.demo-section::after {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  bottom: -160px; left: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,124,255,.1) 0%, transparent 68%);
  pointer-events: none;
}

/* ── Grid ──────────────────────────────────────────── */
.demo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Left copy ─────────────────────────────────────── */
.demo-copy.reveal {
  transform: translateX(-44px);
  transition: opacity .85s ease, transform .85s cubic-bezier(.22,1,.36,1);
}
.demo-copy.reveal.in-view { transform: translateX(0); }

.demo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(43,124,255,.18);
  border: 1px solid rgba(43,124,255,.35);
  color: #7fb4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.demo-copy h2 {
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.demo-copy h2 em { font-style: italic; color: #5aa8ff; }
.demo-desc {
  font-size: 17px;
  color: rgba(255,255,255,.6);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 440px;
}
.demo-perks {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.demo-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.82);
  font-size: 15px;
  font-weight: 500;
}
.perk-check {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(43,124,255,.22);
  border: 1px solid rgba(43,124,255,.45);
  display: flex; align-items: center; justify-content: center;
  color: #5aa8ff;
}

/* ── Card wrap ─────────────────────────────────────── */
.demo-card-wrap.reveal {
  transform: translateX(44px);
  transition: opacity .85s ease .1s, transform .85s cubic-bezier(.22,1,.36,1) .1s;
}
.demo-card-wrap.reveal.in-view { transform: translateX(0); }

/* ── Card ──────────────────────────────────────────── */
@keyframes demoCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.demo-card {
  background: #fff;
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04);
  animation: demoCardIn .4s cubic-bezier(.22,1,.36,1) both;
}

/* ── Step progress dots ────────────────────────────── */
.demo-steps-progress {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.demo-step-dot {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #f1f5f9; color: #64748b;
  border: 2px solid #e2e8f0;
  transition: all .3s ease;
  position: relative; z-index: 1;
}
.demo-step-dot.active {
  background: var(--habla-blue); color: #fff;
  border-color: var(--habla-blue);
  box-shadow: 0 0 0 4px rgba(43,124,255,.18);
}
.demo-step-dot.done {
  background: #10b981; color: #fff; border-color: #10b981;
}
.demo-step-line {
  flex: 1; height: 2px;
  background: #e2e8f0;
  transition: background .4s ease .15s;
}
.demo-step-line.active { background: var(--habla-blue); }

/* ── Card text ─────────────────────────────────────── */
.demo-card h3 { font-size: 20px; font-weight: 700; color: #0a0a0a; margin-bottom: 6px; }
.demo-card-sub { font-size: 14px; color: #64748b; margin-bottom: 24px; }

/* ── Form fields ───────────────────────────────────── */
.demo-field {
  display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px;
}
.demo-field label { font-size: 13px; font-weight: 600; color: #374151; }
.demo-field input[type="text"],
.demo-phone-input {
  background: #f9fafb; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 13px 16px; font-family: var(--font-body); font-size: 15px; color: #0a0a0a;
  outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.demo-field input[type="text"]:focus,
.demo-phone-input:focus {
  border-color: var(--habla-blue);
  box-shadow: 0 0 0 3px rgba(43,124,255,.12);
}

/* ── Phone row ─────────────────────────────────────── */
.demo-phone-row { display: flex; gap: 10px; align-items: stretch; }
.demo-phone-input { flex: 1 1 auto; min-width: 0; }

/* ── Dial dropdown ─────────────────────────────────── */
.demo-dial { position: relative; flex: 0 0 auto; width: 128px; }
.demo-dial-btn {
  width: 100%; height: 100%; min-height: 48px;
  display: flex; align-items: center; gap: 7px; padding: 10px 12px;
  background: #f9fafb; border: 1.5px solid #e2e8f0; border-radius: 12px;
  cursor: pointer; font-family: var(--font-body); font-size: 14px; color: #0a0a0a;
  transition: border-color .2s, box-shadow .2s;
}
.demo-dial-btn:focus, .demo-dial.open .demo-dial-btn {
  border-color: var(--habla-blue);
  box-shadow: 0 0 0 3px rgba(43,124,255,.12);
  outline: none;
}
.demo-dial-flag { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.demo-dial-code { font-weight: 600; flex: 1; text-align: left; }
.demo-dial-caret { color: #64748b; flex-shrink: 0; transition: transform .25s ease; }
.demo-dial.open .demo-dial-caret { transform: rotate(180deg); }
.demo-dial-menu {
  position: absolute; top: calc(100% + 6px); left: 0; width: 264px;
  max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 14px 44px rgba(0,0,0,.14); z-index: 200; padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.demo-dial.open .demo-dial-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.demo-dial-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: background .15s;
}
.demo-dial-opt:hover { background: #f1f5f9; }
.demo-dial-opt.selected { background: #eff6ff; }
.demo-dial-opt-name { flex: 1; font-size: 13px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-dial-opt-code { font-size: 12.5px; color: #64748b; font-weight: 600; flex-shrink: 0; }

/* ── Action button ─────────────────────────────────── */
.demo-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 15px;
  background: var(--habla-blue); color: #fff;
  font-family: var(--font-sans); font-size: 15px; font-weight: 700;
  border: none; border-radius: 100px; cursor: pointer;
  margin-top: 20px;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 24px rgba(43,124,255,.3);
}
.demo-action-btn:hover:not(:disabled) {
  background: var(--habla-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(43,124,255,.45);
}
.demo-action-btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Step 2 SMS icon ───────────────────────────────── */
.demo-sms-icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  display: flex; align-items: center; justify-content: center;
  color: var(--habla-blue); margin-bottom: 16px;
}

/* ── OTP digit inputs ──────────────────────────────── */
.demo-code-row {
  display: flex; gap: 12px; justify-content: center;
  margin: 20px 0 14px;
}
.demo-digit {
  width: 60px; height: 64px;
  text-align: center;
  font-family: var(--font-sans); font-size: 28px; font-weight: 700;
  color: #0a0a0a; background: #f8fafc;
  border: 2px solid #e2e8f0; border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.demo-digit:focus {
  border-color: var(--habla-blue);
  box-shadow: 0 0 0 3px rgba(43,124,255,.12);
  transform: scale(1.06);
}
.demo-digit.filled { border-color: var(--habla-blue); background: #eff6ff; }
.demo-code-hint {
  text-align: center; font-size: 13px; color: #64748b; margin-bottom: 2px;
}
.demo-code-hint strong { color: var(--habla-blue); }

/* ── Step 3 success ────────────────────────────────── */
.demo-success-wrap { text-align: center; padding: 8px 0; }
.demo-check-circle {
  width: 84px; height: 84px; border-radius: 50%;
  background: #ecfdf5; border: 2px solid #6ee7b7;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.demo-check-path {
  stroke-dasharray: 45;
  stroke-dashoffset: 45;
}
@keyframes checkCirclePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes checkDraw {
  from { stroke-dashoffset: 45; }
  to   { stroke-dashoffset: 0;  }
}
.demo-success-wrap h3 { font-size: 22px; font-weight: 800; color: #0a0a0a; margin-bottom: 10px; }
.demo-success-wrap > p {
  font-size: 15px; color: #64748b; margin-bottom: 28px;
  max-width: 290px; margin-left: auto; margin-right: auto;
}

/* Calling dots */
.demo-calling-pulse {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin-bottom: 28px;
}
.demo-calling-pulse span {
  width: 10px; height: 10px; border-radius: 50%; background: #10b981;
  animation: callingDot 1.2s ease-in-out infinite;
}
.demo-calling-pulse span:nth-child(2) { animation-delay: .2s; }
.demo-calling-pulse span:nth-child(3) { animation-delay: .4s; }
@keyframes callingDot {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%       { transform: scale(.35); opacity: .2; }
}
.demo-cta-link {
  display: inline-block; font-weight: 600; font-size: 14px;
  color: var(--habla-blue);
  border-bottom: 1.5px solid rgba(43,124,255,.3);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.demo-cta-link:hover { color: var(--habla-blue-dark); border-color: var(--habla-blue-dark); }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .demo-inner { grid-template-columns: 1fr; gap: 40px; }
  .demo-copy h2 { font-size: clamp(28px, 6vw, 40px); }
  .demo-desc { max-width: 100%; }
}
@media (max-width: 560px) {
  .demo-card { padding: 24px 18px; }
  .demo-digit { width: 52px; height: 58px; font-size: 22px; }
  .demo-code-row { gap: 8px; }
}
/* =====================================================
   Accesibilidad (WCAG 2.1 AA)
   ===================================================== */
/* Skip link: oculto hasta recibir foco por teclado (Tab) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: #2b7cff;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid #0b1c2d;
  outline-offset: 2px;
}

/* Foco visible por teclado (anula los outline:none de inputs/botones para usuarios de teclado) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.menu-btn:focus-visible,
.faq-question:focus-visible {
  outline: 3px solid #2b7cff !important;
  outline-offset: 2px;
  border-radius: 4px;
}
main:focus { outline: none; }

/* =====================================================
   Animación de entrada — páginas de la sección Empresa
   (body.anim-page; keyframe fadeUp ya definido arriba)
   ===================================================== */
.anim-page main > *,
.anim-page > section.faq-section,
.anim-page > section.form-cta-section {
  animation: fadeUp .6s cubic-bezier(.22, 1, .36, 1) both;
}
.anim-page main > *:nth-child(2) { animation-delay: .08s; }
.anim-page main > *:nth-child(3) { animation-delay: .16s; }
.anim-page main > *:nth-child(4) { animation-delay: .24s; }
.anim-page main > *:nth-child(5) { animation-delay: .32s; }
.anim-page main > *:nth-child(6) { animation-delay: .40s; }
.anim-page main > *:nth-child(n+7) { animation-delay: .46s; }
.anim-page > section.faq-section { animation-delay: .10s; }
.anim-page > section.form-cta-section { animation-delay: .18s; }
