/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--cp-canvas, #f5f8fc);
  color: var(--cp-text, #26263b);
}

/* ==========================================================================
   Hero — a pantalla completa (min-height:100vh), fondo "aurora" animado
   (blobs con blur en movimiento lento) detrás del contenido, mockup de
   panel con flotación sutil, y barra de confianza + flecha de scroll
   abajo para indicar que hay más contenido.
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 24px 40px;
  overflow: hidden;
}

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
  animation: auroraFloat 24s ease-in-out infinite;
}

.hero-aurora span:nth-child(1) {
  width: 520px;
  height: 520px;
  background: var(--cp-accent, #303198);
  top: -180px;
  left: -140px;
  animation-duration: 22s;
}

.hero-aurora span:nth-child(2) {
  width: 460px;
  height: 460px;
  background: #8b7bf0;
  bottom: -180px;
  right: -120px;
  animation-duration: 28s;
  animation-delay: -8s;
}

.hero-aurora span:nth-child(3) {
  width: 320px;
  height: 320px;
  background: #5fd9c4;
  top: 20%;
  right: 8%;
  opacity: 0.3;
  animation-duration: 19s;
  animation-delay: -4s;
}

@keyframes auroraFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 24px) scale(0.94); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-aurora span {
    animation: none;
  }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}

.hero-content-reveal {
  animation: heroFadeUp 0.7s ease both;
}

.hero-content-reveal:nth-child(2) {
  animation-delay: 0.12s;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--cp-accent, #303198) 12%, white);
  color: var(--cp-accent, #303198);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--cp-text, #26263b);
  margin-bottom: 18px;
}

.hero-title span {
  color: var(--cp-accent, #303198);
}

.hero-subtitle {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--cp-text-muted, #6b7086);
  max-width: 460px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.home-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--cp-accent, #303198);
  color: white;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(48, 49, 152, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.home-cta-btn svg {
  flex-shrink: 0;
}

.home-cta-btn:hover {
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
  background-color: var(--cp-accent-dark, #242572);
  box-shadow: 0 6px 20px rgba(48, 49, 152, 0.32);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cp-surface, #fff);
  color: var(--cp-text, #26263b);
  border: 1px solid var(--cp-line, #e7e9f2);
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.hero-cta-secondary:hover {
  border-color: var(--cp-accent, #303198);
  color: var(--cp-accent, #303198);
  text-decoration: none;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--cp-text-muted, #6b7086);
}

.hero-trust-item svg {
  color: var(--cp-good, #1a8a5f);
  flex-shrink: 0;
}

/* ---- Flecha de scroll ---- */
.hero-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--cp-text-muted, #6b7086);
  font-size: 11.5px;
  letter-spacing: 0.3px;
}

.hero-scroll-cue svg {
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ---- Mockup de panel (visual), con flotación sutil ---- */
.hero-visual {
  position: relative;
}

.hero-mock {
  background: var(--cp-surface, #fff);
  border: 1px solid var(--cp-line, #e7e9f2);
  border-radius: 18px;
  box-shadow: 0 20px 48px -16px rgba(30, 30, 60, 0.18);
  overflow: hidden;
  animation: mockFloat 6s ease-in-out infinite;
}

@keyframes mockFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mock {
    animation: none;
  }
}

.hero-mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cp-line, #e7e9f2);
  background: #fafbfd;
}

.hero-mock-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2e4ee;
}

.hero-mock-body {
  padding: 20px;
}

.hero-mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.hero-mock-stat {
  background: var(--cp-canvas, #f5f8fc);
  border: 1px solid var(--cp-line, #e7e9f2);
  border-radius: 10px;
  padding: 10px 12px;
}

.hero-mock-stat-label {
  display: block;
  font-size: 11px;
  color: var(--cp-text-muted, #6b7086);
  margin-bottom: 4px;
}

.hero-mock-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--cp-text, #26263b);
}

.hero-mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 96px;
  padding: 12px;
  background: var(--cp-canvas, #f5f8fc);
  border: 1px solid var(--cp-line, #e7e9f2);
  border-radius: 10px;
  margin-bottom: 14px;
}

.hero-mock-chart span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--cp-accent, #303198) 0%, color-mix(in srgb, var(--cp-accent, #303198) 45%, white) 100%);
}

.hero-mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--cp-line, #e7e9f2);
}

.hero-mock-row:first-of-type {
  border-top: none;
}

.hero-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cp-good, #1a8a5f);
  flex-shrink: 0;
}

.hero-mock-row-text {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #eceef6;
}

.hero-mock-row-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--cp-text, #26263b);
}

/* Variante corta para páginas secundarias (plantillas, qrscan): no
   necesitan ocupar el viewport completo como la home. */
.hero-short {
  min-height: auto;
  padding: 64px 24px 56px;
}

.hero-short .hero-scroll-cue {
  display: none;
}

.hero-inner-single {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-inner-single .hero-subtitle,
.hero-inner-single .hero-actions {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.hero-inner-single .hero-subtitle {
  max-width: 100%;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-visual {
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 27px;
  }
}

/* ==========================================================================
   Grilla de características — íconos con fondo suave, no gradiente sólido.
   ========================================================================== */
.home-caract-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 30px 24px 60px;
  max-width: 1160px;
  margin: 0 auto;
}

.home-caract-card {
  background-color: var(--cp-surface, #fff);
  border: 1px solid var(--cp-line, #e7e9f2);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(30, 30, 60, 0.05);
  padding: 26px;
  text-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-caract-icon {
  background: color-mix(in srgb, var(--cp-accent, #303198) 12%, white);
  color: var(--cp-accent, #303198);
  border-radius: 12px;
  margin-bottom: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-caract-icon svg {
  width: 24px;
  height: 24px;
}

.home-caract-card h3 {
  color: var(--cp-text, #26263b);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.home-caract-card p {
  color: var(--cp-text-muted, #6b7086);
  font-size: 13.5px;
  line-height: 1.55;
}

.home-caract-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(30, 30, 60, 0.1);
  border-color: var(--cp-accent, #303198);
}

@media (max-width: 480px) {
  .home-caract-card-container {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 16px 40px;
  }
}

/* ==========================================================================
   CTA final — tarjeta contenida con acento, ya no un banner a todo el ancho.
   ========================================================================== */
.home-cta-section {
  max-width: 1000px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.home-cta-section-inner {
  background: linear-gradient(135deg, var(--cp-accent, #303198) 0%, var(--cp-accent-dark, #242572) 100%);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  color: white;
  box-shadow: 0 20px 40px -18px rgba(48, 49, 152, 0.4);
}

.home-cta-heading {
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 10px;
}

.home-cta-text {
  font-size: 14.5px;
  opacity: 0.9;
  max-width: 460px;
  margin: 0 auto 22px;
}

.home-cta-section .home-cta-btn {
  background-color: white;
  color: var(--cp-accent-dark, #242572);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.home-cta-section .home-cta-btn:hover {
  background-color: #f3f0ff;
  color: var(--cp-accent-dark, #242572);
}

@media (max-width: 480px) {
  .home-cta-section-inner {
    padding: 36px 20px;
    border-radius: 16px;
  }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  width: 58px;
  height: 58px;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 2;
}

.whatsapp-halo {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(37, 211, 102, 0.5);
  animation: pulse 1.5s infinite;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ==========================================================================
   Reveal-on-scroll — usado por el <script> al final de GEN_home.tpl /
   GEN_creartienda.tpl vía IntersectionObserver. Si JS está deshabilitado
   o prefers-reduced-motion está activo, el contenido queda visible igual
   (fallback: opacity/transform sólo se aplican con .reveal sin
   .reveal-visible, y ese estado inicial ya es "casi visible").
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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