/**
 * hero.css — Estilos para el Hero Section 100% Full-Width de XETA 3D STUDIO.
 *
 * Principios:
 *  - Full-width inmersivo (edge-to-edge), sin cajas rígidas ni bordes restrictivos.
 *  - Tipografía Space Grotesk (técnica, geométrica, industrial).
 *  - Eliminación de ruido visual (enfoque en titular monumental, CTAs y pieza destacada).
 *  - Carrusel de piezas renderizadas (PNG estático) con transición suave, sin
 *    dependencia de WebGL para máxima velocidad de carga.
 *
 * @package Astra Child - Xeta 3D Studio
 */

/* ==========================================================================
   Desbloqueo Full-Width Total (Astra & Body Reset)
   ========================================================================== */
html,
body {
  /* overflow-x: clip (no overflow-x: hidden) evita el scroll horizontal
     sin convertir a html/body en un "scroll container" propio — eso es lo
     que rompía position: sticky en el header. */
  overflow-x: clip;
  background-color: #0c0d10 !important;
}

body.home,
body.front-page,
body.home #page,
body.home #content,
body.home #content > .ast-container,
body.home .site-content,
body.home .site-content > .ast-container,
body.home #primary,
body.home .xeta-front-page {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background-color: #0c0d10 !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   1. Contenedor Principal (100% Full Width & Inmersivo)
   ========================================================================== */
.xeta-hero {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background-color: var(--background, #0c0d10);
  color: var(--on-surface, #e2e2e8);
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 0 clamp(2.5rem, 6vh, 4.5rem) 0;
}

/* Resplandores ambientales cinemáticos */
.xeta-hero__ambient-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(255, 102, 0, 0.14) 0%,
      transparent 65%
    ),
    radial-gradient(
      circle at 80% 60%,
      rgba(104, 220, 247, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 20% 60%,
      rgba(255, 85, 0, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(circle at 50% 85%, #0c0d10 0%, #090a0d 100%);
  z-index: 1;
}

/* Retícula de coordenadas industrial abierta */
.xeta-hero__grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 52px 52px;
  background-position: center center;
  mask-image: radial-gradient(circle at 50% 40%, black 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(
    circle at 50% 40%,
    black 50%,
    transparent 85%
  );
  z-index: 1;
}

/* ==========================================================================
   2. Escenario Visual: Carrusel de Piezas Renderizadas (Background Estático)
   ========================================================================== */
.xeta-hero__stage {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  pointer-events: none;
}

.xeta-hero__carousel {
  position: absolute;
  inset: 4vh 6vw 34vh 6vw;
}

/* 4 posiciones fijas sobre una elipse imaginaria (frente / derecha / atrás /
   izquierda). Cada pieza arranca ya asignada a una de ellas — nunca en un
   punto compartido — y al girar el carrusel todas se desplazan juntas de
   una posición fija a la siguiente. Transform 2D puro (translate % + scale,
   sin perspectiva/rotación 3D), con easing tipo resorte. */
.xeta-hero__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 480px;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 90px rgba(255, 102, 0, 0.12));
  transition:
    transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.7s ease,
    filter 0.7s ease;
}

/* FRENTE (abajo en la elipse): pieza protagonista, tamaño completo */
.xeta-hero__frame.is-pos-front {
  transform: translate(-50%, calc(-50% + 10px)) scale(1);
  opacity: 1;
  z-index: 4;
}

/* DERECHA de la elipse — elipse más amplia: se ve completa, apenas atenuada */
.xeta-hero__frame.is-pos-right {
  transform: translate(20%, calc(-46% - 10px)) scale(0.58);
  opacity: 0.55;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5)) brightness(0.68);
}

/* IZQUIERDA de la elipse (espejo de la derecha) */
.xeta-hero__frame.is-pos-left {
  transform: translate(-120%, calc(-46% - 10px)) scale(0.58);
  opacity: 0.55;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5)) brightness(0.68);
}

/* ATRÁS (arriba en la elipse): la más lejana, pero aún visible */
.xeta-hero__frame.is-pos-back {
  transform: translate(-50%, calc(-50% - 130px)) scale(0.42);
  opacity: 0.32;
  z-index: 1;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45)) brightness(0.55);
}

/* Piezas sin posición asignada (más de 4 imágenes): ocultas hasta que
   entren al ciclo */
.xeta-hero__frame:not(.is-pos-front):not(.is-pos-right):not(.is-pos-left):not(.is-pos-back) {
  transform: translate(-50%, calc(-50% - 130px)) scale(0.42);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .xeta-hero__frame {
    transition-duration: 0.2s;
  }
}

/* Flechas de navegación del carrusel */
.xeta-hero__carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 15, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.xeta-hero__carousel-nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.25;
}

.xeta-hero__carousel-nav:hover {
  background: rgba(255, 102, 0, 0.18);
  border-color: rgba(255, 102, 0, 0.4);
}

.xeta-hero__carousel-nav--prev {
  left: clamp(0.5rem, 2vw, 2rem);
}

.xeta-hero__carousel-nav--prev svg {
  transform: rotate(180deg);
}

.xeta-hero__carousel-nav--next {
  right: clamp(0.5rem, 2vw, 2rem);
}

@media (max-width: 768px) {
  .xeta-hero__carousel-nav {
    width: 36px;
    height: 36px;
  }
}

/* Indicadores de carrusel (estilo Meshy) */
.xeta-hero__frame-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.xeta-hero__frame-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transition:
    background 0.4s ease,
    width 0.4s ease;
}

.xeta-hero__frame-dot.is-active {
  width: 20px;
  background: #ff6600;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

@media (max-width: 768px) {
  .xeta-hero__carousel {
    inset: 4vh 10vw 32vh 10vw;
  }

  .xeta-hero__frame {
    max-width: 82vw;
  }

  /* En móvil se ocultan las piezas laterales: no hay espacio para el efecto de rueda */
  .xeta-hero__frame:not(.is-pos-front) {
    opacity: 0;
  }

  .xeta-hero__carousel-nav {
    display: none;
  }
}

/* ==========================================================================
   3. Bloque Inferior Centrado: Titular, Lead & CTAs
   ========================================================================== */
.xeta-hero__wrapper--centered {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.xeta-hero__content--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  width: 100%;
  padding: clamp(1.25rem, 2.5vh, 2rem) clamp(1rem, 3vw, 2.5rem);
  border-radius: 24px;
  background: radial-gradient(
    ellipse at 50% 80%,
    rgba(12, 13, 16, 0.85) 0%,
    rgba(12, 13, 16, 0.5) 65%,
    transparent 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Titular Principal H1 */
.xeta-hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-family: "Space Grotesk", var(--font-heading, sans-serif) !important;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
}

.xeta-hero__title-line {
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.8);
}

.xeta-hero__title-accent {
  background: linear-gradient(135deg, #ffffff 10%, #ff7700 70%, #ff5500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 20px rgba(255, 102, 0, 0.4));
}

/* Lead / Párrafo Explicativo */
.xeta-hero__lead {
  margin: 0;
  font-family: "Space Grotesk", var(--font-body, sans-serif);
  font-size: clamp(0.95rem, 1.05vw, 1.2rem);
  line-height: 1.6;
  color: #a6abb8;
  max-width: 90%;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Acciones y CTAs Centrados */
.xeta-hero__actions--centered {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Párrafo de entrada suave (Plus Jakarta Sans) */
.xeta-hero__lead {
  margin: 0;
  font-family: var(--font-text, "Plus Jakarta Sans", -apple-system, sans-serif);
  font-size: clamp(0.95rem, 1.1vw, 1.12rem);
  font-weight: 400;
  line-height: 1.6;
  color: #9fa2b0;
  max-width: 100%;
}

/* Botones de acción */
.xeta-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.35rem;
}

.xeta-cta-btn--hero .xeta-cta-btn__surface {
  padding: 0.85rem 1.6rem !important;
  font-size: 0.92rem !important;
}

/* Botón Minimalista / Glass */
.xeta-btn-minimal {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e2e8 !important;
  font-family: var(--font-text, "Plus Jakarta Sans", -apple-system, sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
}

.xeta-btn-minimal__icon {
  display: flex;
  align-items: center;
  color: var(--tertiary, #68dcf7);
  transition: transform 0.25s ease;
}

.xeta-btn-minimal:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.xeta-btn-minimal:hover .xeta-btn-minimal__icon {
  transform: translateY(-1px) rotate(6deg);
}

/* ==========================================================================
   4. Indicador de Scroll
   ========================================================================== */
/* Indicador de scroll sutil en el fondo */
.xeta-hero__scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}

.xeta-hero__scroll-track {
  display: block;
  width: 24px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.xeta-hero__scroll-thumb {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--inverse-primary, #ff6600);
  box-shadow: 0 0 6px #ff6600;
  animation: xetaScrollThumb 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes xetaScrollThumb {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  80%,
  100% {
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
  }
}
