/* ============================================================
   HERO — Sticky, partículas, cubo 3D, CTA y autoscroll.
   (El scrollbar global vive en global.css)
   ============================================================ */

/* ------------------------------------------------------------
   Contenedor principal
   150vh = recorrido de scroll antes de que el hero se libere.
   ------------------------------------------------------------ */
.GO-hero-wrapper {
  background-color: transparent;
  color: #fff;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 150vh;
  position: relative;
  z-index: 1;
}

.GO-hero-wrapper .GO_hero_sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;              /* reserva el alto del header fijo */
}

/* --- Capa 1: gradiente oscuro --- */
.GO-hero-wrapper .GO_gradient_bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(
    circle at 50% 100%,
    #1a5c8a 0%,
    #0a1c2e 45%,
    #010102 85%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: GO_fade_in 1s ease-out forwards;
}

/* --- Capa 2: blanco que SUBE desde abajo ---
   El tamaño de la elipse lo controla hero.js con --GO-rx y --GO-ry.
   Está por encima del contenido (z-5) a propósito: al crecer tapa todo. */
.GO-hero-wrapper .GO_bg_white {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse var(--GO-rx, 20%) var(--GO-ry, 20%) at 50% 100%,
    rgba(255, 255, 255, 1)    0%,
    rgba(255, 255, 255, 1)    45%,
    rgba(255, 255, 255, 0.92) 55%,
    rgba(255, 255, 255, 0.70) 66%,
    rgba(255, 255, 255, 0.42) 77%,
    rgba(255, 255, 255, 0.18) 88%,
    rgba(255, 255, 255, 0)    100%
  );
}

/* Estado final: blanco sólido total */
.GO-hero-wrapper .GO_bg_white.GO_done {
  background: #ffffff;
}

@keyframes GO_fade_in { to { opacity: 1; } }

/* --- Capa 3: partículas --- */
.GO-hero-wrapper .GO_canvas_wrapper {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
}

.GO-hero-wrapper #GO_canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: GO_fade_in 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* ============================================================
   Contenido (texto + cubo)
   ============================================================ */
.GO-hero-wrapper .GO_hero_inner {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.GO-hero-wrapper .GO_exit_left,
.GO-hero-wrapper .GO_exit_right {
  will-change: transform, opacity;
}

.GO-hero-wrapper .GO_exit_left {
  flex: 1;
  max-width: 600px;
}

.GO-hero-wrapper .GO_exit_right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.GO-hero-wrapper .GO_hero_content {
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  animation: GO_fade_in_up 1s ease-out forwards;
  animation-delay: 1.5s;
}

@keyframes GO_fade_in_up {
  to { opacity: 1; transform: translateY(0); }
}

.GO-hero-wrapper .GO_h2 {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: var(--fs-small);              /* ⚠ Montserrat debe cargar @100 o cae a 400 */
  margin: 0 0 15px 0;
  color: #f5f5f7;
  letter-spacing: var(--tracking-small);
}

.GO-hero-wrapper .GO_h1 {
  font-size: var(--fs-hero-h1);
  font-weight: var(--fw-hero-h1);
  margin: 0 0 25px 0;
  line-height: var(--lh-hero-h1);
  letter-spacing: var(--tracking-hero-h1);
  background: var(--grad-h2);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Efecto máquina de escribir --- */
.GO-hero-wrapper .GO_P {
  font-size: 26px;
  font-weight: 300;
  color: #e0e0e0;
  margin: 0 0 40px 0;
  line-height: 1.3;
  letter-spacing: 0.01em;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #e0e0e0;
  width: 0;
  opacity: 0;
  animation:
    GO_typing       1.5s steps(50, end) forwards,
    GO_blink_cursor 0.75s step-end     infinite,
    GO_show_P       0.1s              forwards;
  animation-delay: 2s;           /* ✔ antes: 2s, 2s, 2s — redundante */
}

@keyframes GO_typing      { from { width: 0;   } to { width: 100%; } }
@keyframes GO_blink_cursor {
  from, to { border-color: transparent; }
  50%      { border-color: #e0e0e0;     }
}
@keyframes GO_show_P      { to { opacity: 1; } }

/* --- Bloque CTA --- */
.GO-hero-wrapper .GO_cta_block {
  display: flex;                 /* ✔ antes: inline-flex + width: 100% → el inline era inútil */
  align-items: center;
  justify-content: space-between;
  background-color: #1c1c1e;
  border-radius: 50px;
  padding: 16px 20px 16px 24px;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(20px);
  animation: GO_fade_in_up 0.8s ease-out forwards;
  animation-delay: 2.5s;
  max-width: 650px;
  width: 100%;
}

.GO-hero-wrapper .GO_cta_text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.GO-hero-wrapper .GO_cta_title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.GO-hero-wrapper .GO_cta_subtext {
  font-size: 13px;
  color: #a1a1a6;
  line-height: 1.4;
}

/* ============================================================
   Cubo 3D
   ============================================================ */
.GO-hero-wrapper .GO_hero_visual {
  opacity: 0;
  transform: scale(0.8);
  animation: GO_fade_in_scale 1s ease-out forwards;
  animation-delay: 2.5s;
}

@keyframes GO_fade_in_scale {
  to { opacity: 1; transform: scale(1); }
}

.GO-hero-wrapper .GO_cube_wrapper {
  perspective: 1000px;
  width: 280px;
  height: 280px;
}

.GO-hero-wrapper .GO_cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: GO_spin_cube 12s infinite linear;
}

.GO-hero-wrapper .GO_face {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 113, 227, 0.3);
  overflow: hidden;
  border-radius: 12px;
  background-color: #000;
}

.GO-hero-wrapper .GO_face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.GO-hero-wrapper .GO_face:hover img { opacity: 1; }

.GO-hero-wrapper .GO_front  { transform: rotateY(  0deg) translateZ(140px); }
.GO-hero-wrapper .GO_back   { transform: rotateY(180deg) translateZ(140px); }
.GO-hero-wrapper .GO_right  { transform: rotateY( 90deg) translateZ(140px); }
.GO-hero-wrapper .GO_left   { transform: rotateY(-90deg) translateZ(140px); }
.GO-hero-wrapper .GO_top    { transform: rotateX( 90deg) translateZ(140px); }
.GO-hero-wrapper .GO_bottom { transform: rotateX(-90deg) translateZ(140px); }

@keyframes GO_spin_cube {
  0%   { transform: rotateX(0deg)   rotateY(0deg);   }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ============================================================
   Botón de autoscroll
   ============================================================ */
.GO_autoscroll_btn {
  position: fixed;
  bottom: 100px;
  right: 100px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    opacity    0.4s ease,
    transform  0.4s ease,
    background 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.GO_autoscroll_btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.GO_autoscroll_btn:hover {
  background: rgba(0, 113, 227, 1);
  transform: translateY(3px);    /* efecto "press" hacia abajo */
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  /* ✔ eliminado: .GO-hero-wrapper { height: 150vh; } ya es el valor por defecto */

  .GO-hero-wrapper .GO_hero_inner {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
    gap: 30px;
  }

  .GO-hero-wrapper .GO_exit_left {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* El efecto máquina de escribir se desactiva en móvil */
  .GO-hero-wrapper .GO_P {
    width: auto;                 /* 🔴 FIX CRÍTICO: sin esto el texto queda con ancho 0 e invisible */
    white-space: normal;
    border-right: none;
    animation: GO_show_P 0.1s forwards;
    animation-delay: 3s;
  }

  .GO-hero-wrapper .GO_cta_block {
    flex-direction: column;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    max-width: 100%;
  }

  .GO-hero-wrapper .GO_cta_text {
    align-items: center;
    text-align: center;
  }

  .GO-hero-wrapper .GO_btn {
    width: 100%;
    max-width: 260px;
  }

  .GO-hero-wrapper .GO_cube_wrapper {
    width: 180px;
    height: 180px;
  }

  .GO-hero-wrapper .GO_face {
    width: 180px;
    height: 180px;
  }

  .GO-hero-wrapper .GO_front  { transform: rotateY(  0deg) translateZ(90px); }
  .GO-hero-wrapper .GO_back   { transform: rotateY(180deg) translateZ(90px); }
  .GO-hero-wrapper .GO_right  { transform: rotateY( 90deg) translateZ(90px); }
  .GO-hero-wrapper .GO_left   { transform: rotateY(-90deg) translateZ(90px); }
  .GO-hero-wrapper .GO_top    { transform: rotateX( 90deg) translateZ(90px); }
  .GO-hero-wrapper .GO_bottom { transform: rotateX(-90deg) translateZ(90px); }
}

/* --- Autoscroll en móvil --- */
@media (max-width: 900px) {
  .GO_autoscroll_btn {
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }
}
