/* ============================================================
   HERO SECTION — versión potente
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background-color: var(--color-bg-deep);
  /* Fondo decorativo fallback como data URI (siempre visible) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 1080' preserveAspectRatio='xMidYMid slice'><defs><radialGradient id='g1' cx='75%25' cy='50%25' r='50%25'><stop offset='0%25' stop-color='%234A8BB8' stop-opacity='0.45'/><stop offset='40%25' stop-color='%231B4D7A' stop-opacity='0.25'/><stop offset='100%25' stop-color='%230A1A35' stop-opacity='0'/></radialGradient><radialGradient id='g2' cx='80%25' cy='45%25' r='25%25'><stop offset='0%25' stop-color='%234A8BB8' stop-opacity='0.55'/><stop offset='100%25' stop-color='%230A1A35' stop-opacity='0'/></radialGradient><linearGradient id='g3' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' stop-color='%23050810'/><stop offset='100%25' stop-color='%230A1A35'/></linearGradient></defs><rect width='1920' height='1080' fill='url(%23g3)'/><rect width='1920' height='1080' fill='url(%23g1)'/><circle cx='1500' cy='540' r='220' fill='url(%23g2)'/><g opacity='0.06' stroke='%234A8BB8' stroke-width='1' fill='none'><circle cx='1500' cy='540' r='280'/><circle cx='1500' cy='540' r='360'/><circle cx='1500' cy='540' r='440'/></g></svg>");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

/* ---- Video de fondo (doble instancia para crossfade) ---- */
.hero__video-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: opacity;
  transition: opacity 0.3s ease-in-out;
}
.hero__video--a { opacity: 1; }
.hero__video--b { opacity: 0; }

/* ---- Scanlines sutiles sobre el video (efecto "técnico/científico") ---- */
.hero__scanlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.015) 3px,
    rgba(255, 255, 255, 0.015) 4px
  );
  mix-blend-mode: overlay;
}

/* ---- Grid sutil ---- */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 139, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 139, 184, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center;
  mask-image: radial-gradient(ellipse at 70% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, black 0%, transparent 70%);
}

/* ---- Overlay de legibilidad ---- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(10, 26, 53, 0.88) 0%,
    rgba(10, 26, 53, 0.65) 35%,
    rgba(10, 26, 53, 0.15) 60%,
    rgba(10, 26, 53, 0) 80%
  );
}
.hero__overlay::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 16, 0) 0%,
    rgba(5, 8, 16, 0.6) 100%
  );
}

/* ---- Glow animado en la esquina derecha ---- */
.hero__glow {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  transform: translateY(-50%);
  background: radial-gradient(
    circle,
    rgba(74, 139, 184, 0.35) 0%,
    rgba(74, 139, 184, 0.1) 30%,
    transparent 60%
  );
  z-index: 2;
  pointer-events: none;
  animation: heroGlowPulse 8s ease-in-out infinite;
}
@keyframes heroGlowPulse {
  0%, 100% { transform: translate(0, -50%) scale(1); opacity: 0.85; }
  50%      { transform: translate(2%, -50%) scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__glow { animation: none; }
}

/* ---- Composición de productos (lado derecho) ---- */
.hero__products {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 4vw, 5rem);
  transform: translateY(-50%);
  width: clamp(340px, 42vw, 640px);
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}
.hero__products-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
  /* Animación de entrada al cargar */
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  animation: heroProductsEnter 1.4s var(--ease-out-expo) 0.5s forwards;
}
@keyframes heroProductsEnter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Flotación sutil continua tras la entrada */
@media (prefers-reduced-motion: no-preference) {
  .hero__products {
    animation: heroProductsFloat 7s ease-in-out 1.9s infinite;
  }
}
@keyframes heroProductsFloat {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 14px)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__products-img {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---- Contenedor del contenido ---- */
.hero__container {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
}

/* Topbar interno del hero ocultado (usamos el navbar global) */
.hero__topbar { display: none; }

/* ---- Contenido textual ---- */
.hero__content {
  align-self: center;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* Animación de entrada cinemática */
.hero__content > * {
  opacity: 0;
  transform: translateY(28px);
  animation: heroEnter 1s var(--ease-out-expo) forwards;
}
.hero__content > *:nth-child(1) { animation-delay: 0.2s; }
.hero__content > *:nth-child(2) { animation-delay: 0.4s; }
.hero__content > *:nth-child(3) { animation-delay: 0.6s; }
.hero__content > *:nth-child(4) { animation-delay: 0.8s; }
.hero__content > *:nth-child(5) { animation-delay: 1.0s; }
@keyframes heroEnter {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__content > * {
    opacity: 1; transform: none; animation: none;
  }
}

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.hero__eyebrow::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-cyan-bright), transparent);
}

.hero__title {
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--color-text-primary);
  text-wrap: pretty;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-cyan-electric) 0%, var(--color-cyan-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 32em;
  margin: 0;
}

/* ---- CTAs ---- */
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.hero__btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 1.125rem 2.25rem;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: all 0.4s var(--ease-out-quart);
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.hero__btn--primary {
  background: var(--color-text-primary);
  color: var(--color-bg-deep);
  border-color: var(--color-text-primary);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}
.hero__btn--primary:hover {
  background: linear-gradient(135deg, var(--color-cyan-bright) 0%, var(--color-cyan-electric) 100%);
  border-color: var(--color-cyan-bright);
  color: var(--color-text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74, 139, 184, 0.45);
}
.hero__btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero__btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.hero__btn-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out-quart);
}
.hero__btn:hover .hero__btn-arrow {
  transform: translateX(4px);
}

/* ---- Indicadores de marcas ---- */
.hero__brands {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero__brands-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hero__brands-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero__brand-tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.375rem;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-quart);
  opacity: 0.85;
}
.hero__brand-tag img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.hero__brand-tag--six img { height: 36px; }
.hero__brand-tag--den3 img { height: 28px; }

.hero__brand-tag::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--color-cyan-electric);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-quart);
}
.hero__brand-tag:hover,
.hero__brand-tag:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}
.hero__brand-tag:hover::after,
.hero__brand-tag:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ---- Scroll indicator ---- */
.hero__scroll {
  position: absolute;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  right: clamp(1.5rem, 5vw, 5rem);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.hero__scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--color-cyan-electric));
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(0); }
  100% { transform: translateY(112px); }
}

/* ---- Meta inferior ---- */
.hero__meta {
  position: absolute;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  left: clamp(1.5rem, 5vw, 5rem);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hero__meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cyan-electric);
  box-shadow: 0 0 0 4px rgba(74, 139, 184, 0.15);
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74, 139, 184, 0.15); }
  50%      { box-shadow: 0 0 0 10px rgba(74, 139, 184, 0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero__content { max-width: 60%; }
  .hero__scroll { display: none; }
  .hero__products {
    width: clamp(300px, 40vw, 440px);
    opacity: 0.9;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    height: auto;
  }
  .hero__container {
    padding: 5rem 1.5rem 3rem;
    gap: 1.5rem;
  }
  .hero__content {
    max-width: 100%;
    padding-top: 1rem;
  }
  /* En móvil la imagen pasa a ser un fondo tenue detrás del texto */
  .hero__products {
    top: auto;
    bottom: 4%;
    right: 50%;
    transform: translateX(50%);
    width: min(88vw, 460px);
    opacity: 0.28;
    z-index: 1;
    animation: none;
  }
  .hero__products-img {
    filter: none;
    animation: heroProductsEnter 1.2s var(--ease-out-expo) 0.4s forwards;
  }
  .hero__overlay {
    background: linear-gradient(
      to bottom,
      rgba(10, 26, 53, 0.85) 0%,
      rgba(10, 26, 53, 0.7) 50%,
      rgba(10, 26, 53, 0.9) 100%
    );
  }
  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__btn { width: 100%; }
  .hero__brands {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hero__brands-list { gap: 1.5rem; }
  .hero__meta { display: none; }
  .hero__grid { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__video-stage { display: none; }
  .hero__scroll-line::after,
  .hero__meta-dot { animation: none; }
}
