/* ==========================================================================
   iLESSO — Hero dividido (Personas / Empresas)
   Paleta de marca: azul #1E2D3D · dorado #E8A030 · crema #FFF8EE
   Fondo en capas (degradado malla + patrón médico + brillo ambiental) y
   micro-animaciones enfocadas en conversión. Autocontenido.
   ========================================================================== */

.hero-split {
  --ilesso-azul: #1E2D3D;
  --ilesso-azul-2: #142230;
  --ilesso-dorado: #E8A030;
  --ilesso-crema: #FFF8EE;
  display: flex;
  width: 100%;
  min-height: calc(100dvh - 5rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-half {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
  transition: flex-grow 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 821px) and (hover: hover) {
  .hero-half:hover { flex-grow: 1.28; }
}

/* ---------- FONDOS EN CAPAS ---------- */
/* Izquierda · Personas — crema cálida con malla dorada suave + patrón de cruces */
.hero-personas {
  color: var(--ilesso-azul);
  background-color: var(--ilesso-crema);
  background-image:
    radial-gradient(120% 90% at 100% 0%, rgba(232, 160, 48, 0.16), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(232, 160, 48, 0.10), transparent 60%),
    linear-gradient(160deg, #FFFDF9 0%, #FFF4E4 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M20 9h4v7h7v4h-7v7h-4v-7h-7v-4h7z' fill='%23E8A030' fill-opacity='0.06'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, 44px 44px;
}

/* Derecha · Empresas — azul profundo con rejilla blueprint + halos dorados */
.hero-empresas {
  color: var(--ilesso-crema);
  background-color: var(--ilesso-azul);
  background-image:
    radial-gradient(100% 80% at 0% 0%, rgba(232, 160, 48, 0.16), transparent 55%),
    radial-gradient(90% 90% at 100% 100%, rgba(60, 100, 140, 0.28), transparent 60%),
    linear-gradient(155deg, #24384c 0%, var(--ilesso-azul) 45%, var(--ilesso-azul-2) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52'%3E%3Cpath d='M52 0H0v52' fill='none' stroke='%23E8A030' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, 52px 52px;
}

/* Viñeta sutil para dar profundidad a cada mitad */
.hero-half::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 30%, transparent 55%, rgba(0, 0, 0, 0.06) 100%);
}
.hero-empresas::before {
  background: radial-gradient(130% 120% at 50% 20%, transparent 50%, rgba(0, 0, 0, 0.28) 100%);
}

/* ---------- CAPA DECORATIVA (orbes + línea de pulso) ---------- */
.hero-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: heroFloat 14s ease-in-out infinite;
}
.hero-orb-1 {
  width: 22rem; height: 22rem;
  background: radial-gradient(circle, rgba(232, 160, 48, 0.22), transparent 68%);
  top: -7rem; right: -5rem;
}
.hero-orb-2 {
  width: 16rem; height: 16rem;
  background: radial-gradient(circle, rgba(232, 160, 48, 0.16), transparent 70%);
  bottom: -6rem; left: -4rem;
  animation-delay: -6s;
  animation-duration: 18s;
}
.hero-empresas .hero-orb-2 {
  background: radial-gradient(circle, rgba(86, 132, 173, 0.30), transparent 70%);
}

/* Línea de pulso (heartbeat) — acento médico animado */
.hero-pulse {
  position: absolute;
  left: 0;
  bottom: 8%;
  width: 100%;
  height: 3.5rem;
  color: var(--ilesso-dorado);
  opacity: 0.16;
}
.hero-pulse path {
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  animation: heroPulse 4.5s ease-in-out infinite;
}
.hero-empresas .hero-pulse { opacity: 0.22; }

.hero-half-inner {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* Entrada escalonada del contenido */
.hero-half-inner > * {
  opacity: 0;
  transform: translateY(14px);
  animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-half-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-half-inner > *:nth-child(2) { animation-delay: 0.12s; }
.hero-half-inner > *:nth-child(3) { animation-delay: 0.19s; }
.hero-half-inner > *:nth-child(4) { animation-delay: 0.26s; }
.hero-half-inner > *:nth-child(5) { animation-delay: 0.33s; }
.hero-half-inner > *:nth-child(6) { animation-delay: 0.40s; }
.hero-half-inner > *:nth-child(7) { animation-delay: 0.47s; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(2px);
}
.hero-personas .hero-badge {
  color: #9a6413;
  background: rgba(232, 160, 48, 0.16);
  border: 1px solid rgba(232, 160, 48, 0.35);
}
.hero-empresas .hero-badge {
  color: var(--ilesso-dorado);
  background: rgba(232, 160, 48, 0.12);
  border: 1px solid rgba(232, 160, 48, 0.30);
}

.hero-icon {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards, heroBob 6s ease-in-out 0.9s infinite;
}
.hero-personas .hero-icon {
  background: #fff;
  color: var(--ilesso-dorado);
  box-shadow: 0 12px 28px -10px rgba(30, 45, 61, 0.30);
}
.hero-empresas .hero-icon {
  background: rgba(255, 248, 238, 0.08);
  color: var(--ilesso-dorado);
  border: 1px solid rgba(232, 160, 48, 0.30);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.5);
}
.hero-icon svg { width: 1.95rem; height: 1.95rem; }

.hero-title {
  font-size: clamp(1.95rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}
.hero-title .hero-accent {
  color: var(--ilesso-dorado);
  position: relative;
  white-space: nowrap;
}
/* Subrayado dorado que se dibuja al cargar */
.hero-title .hero-accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.12em;
  height: 0.14em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ilesso-dorado), rgba(232, 160, 48, 0.2));
  transform: scaleX(0);
  transform-origin: left;
  animation: heroUnderline 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.hero-text {
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0 0 1.6rem;
  max-width: 26rem;
}
.hero-personas .hero-text { color: #45566a; }
.hero-empresas .hero-text { color: rgba(255, 248, 238, 0.82); }

.hero-points {
  list-style: none;
  margin: 0 0 1.9rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.hero-empresas .hero-points li { color: rgba(255, 248, 238, 0.9); }
.hero-check {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--ilesso-dorado);
  color: var(--ilesso-azul);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(232, 160, 48, 0.6);
}

/* ---------- CTA · enfocado en conversión ---------- */
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 1rem 1.9rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #F0AE3E 0%, var(--ilesso-dorado) 55%, #D98E1F 100%);
  color: #2a1e08;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 14px 28px -12px rgba(232, 160, 48, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}
.hero-cta span { position: relative; z-index: 1; }
/* Barrido de brillo al pasar el cursor */
.hero-cta::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
  z-index: 0;
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px -12px rgba(232, 160, 48, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.hero-cta:hover::before { left: 130%; }
.hero-cta:active { transform: translateY(-1px) scale(0.98); }
.hero-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hero-cta .hero-arrow { transition: transform 0.22s ease; }
.hero-cta:hover .hero-arrow { transform: translateX(5px); }

/* Anillo de pulso en el CTA principal (Personas) para atraer la mirada */
.hero-cta-personas::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(232, 160, 48, 0.55);
  animation: heroCtaPulse 2.6s ease-out infinite;
  z-index: 0;
}

.hero-help {
  margin-top: 1rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.hero-personas .hero-help { color: #7a8a9a; }
.hero-empresas .hero-help { color: rgba(255, 248, 238, 0.6); }
.hero-help a { color: var(--ilesso-dorado); text-decoration: none; font-weight: 800; }
.hero-help a:hover { text-decoration: underline; }

/* Divisor central con sello (solo desktop) */
.hero-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #F0AE3E, var(--ilesso-dorado));
  color: var(--ilesso-azul);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px -6px rgba(30, 45, 61, 0.55);
  border: 4px solid var(--ilesso-crema);
}

/* ---------- keyframes ---------- */
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroUnderline {
  to { transform: scaleX(1); }
}
@keyframes heroBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1.5rem, 1rem); }
}
@keyframes heroPulse {
  0% { stroke-dashoffset: 480; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -480; }
}
@keyframes heroCtaPulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 160, 48, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(232, 160, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 160, 48, 0); }
}

/* Responsive: apila en vertical */
@media (max-width: 820px) {
  .hero-split { flex-direction: column; min-height: auto; }
  .hero-half { flex: none; width: 100%; min-height: 60vh; }
  .hero-half-inner { align-items: flex-start; }
  .hero-divider { display: none; }
}

/* Accesibilidad: sin movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  .hero-half-inner > *,
  .hero-icon,
  .hero-title .hero-accent::after,
  .hero-orb,
  .hero-pulse path,
  .hero-cta-personas::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}
