/* Navegación global.
   Geometría heredada del componente "Header" de Fuel (.framer-93osxn),
   adaptada a AERIA: la portada ahora es oscura, así que el texto pasa de
   --negro a --blanco, y la tarjeta "Meet the CEO" se sustituye por el bloque
   de acciones (enlace "Entrar" + botón .boton).

   La cabecera NO es una píldora ni se queda pegada arriba: es una barra
   transparente a ancho completo, colocada en absoluto dentro de la portada,
   que se va con el scroll. Por debajo de 1200 px se convierte en logotipo +
   hamburguesa y el menú se despliega en un panel.

   Color local que no está en tokens.css: ninguno. */

.navegacion {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 2;
}

.navegacion__barra {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  overflow: clip;
  background: transparent;
}

/* ---- Logotipo + hamburguesa ---- */
.navegacion__marca {
  display: flex;
  flex: none;
  flex-flow: row nowrap;
  align-items: center;
  gap: 10px;
  width: 22%;
}

/* Wordmark 511:160. A 120 px de ancho salen ~38 px de alto. */
.navegacion__logotipo {
  display: block;
  flex: none;
  width: 120px;
  height: auto;
  aspect-ratio: 511 / 160;
  overflow: clip;
}
.navegacion__logotipo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.navegacion__hamburguesa {
  display: none;
  flex: none;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}
.navegacion__raya {
  display: block;
  flex: none;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--blanco);
  transition: transform 0.4s cubic-bezier(0.44, 0, 0.34, 0.98);
}

/* ---- Enlaces de escritorio ---- */
.navegacion__enlaces {
  display: flex;
  flex: none;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 56px;          /* Fuel usaba 80; con cuatro nombres más largos no cabe a 1200 */
}

.navegacion__enlace {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-end;
  gap: 12px;
}

.navegacion__nombre {
  position: relative;
  display: block;
  height: 14px;        /* sí: menor que la línea del texto, es del original */
  font-family: var(--display);
  font-size: 12px;
  line-height: 16.2px;
  letter-spacing: -0.5px;
  font-weight: 500;
  color: var(--blanco);
  white-space: pre;
}

/* Subrayado: caja de 1×1 px que crece al 104 % en :hover y :focus-visible. */
.navegacion__subrayado {
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 1px;
  height: 1px;
  background: var(--blanco);
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.44, 0, 0.34, 0.98);
}
.navegacion__enlace:hover .navegacion__subrayado,
.navegacion__enlace:focus-visible .navegacion__subrayado { width: 104%; }

.navegacion__numero {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
  font-family: var(--display);
  font-size: 10px;
  line-height: 11.2px;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--blanco-80);
  white-space: pre;
}

/* ---- Acciones: "Entrar" + botón (donde Fuel ponía "Meet the CEO") ---- */
.navegacion__acciones {
  display: flex;
  flex: none;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  width: 22%;
}

.navegacion__entrar {
  position: relative;
  font-family: var(--display);
  font-size: 12px;
  line-height: 16.2px;
  letter-spacing: -0.5px;
  font-weight: 500;
  color: var(--blanco);
  white-space: pre;
}
.navegacion__entrar::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--blanco);
  transition: width 0.4s cubic-bezier(0.44, 0, 0.34, 0.98);
}
.navegacion__entrar:hover::after,
.navegacion__entrar:focus-visible::after { width: 100%; }

.navegacion__boton { flex: none; }

/* ---- Panel desplegable (solo < 1200 px) ---- */
.navegacion__panel { display: none; }
.navegacion__raya-panel {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--blanco-29);
}

/* ===================================================================
   Tablet y móvil: por debajo de 1200 px se usa la MISMA variante de
   móvil (logotipo + hamburguesa). No hay estado intermedio.
   =================================================================== */
@media (max-width: 1199.98px) {
  .navegacion { top: 0; left: 0; right: 0; }

  .navegacion__barra {
    flex-flow: column nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 40px;
    padding: 24px;
    overflow: visible;
    transition:
      background-color 0.4s cubic-bezier(0.44, 0, 0.34, 0.98),
      box-shadow 0.4s cubic-bezier(0.44, 0, 0.34, 0.98);
  }

  .navegacion__marca {
    order: 0;
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }
  .navegacion__logotipo { order: 0; }
  .navegacion__hamburguesa { display: flex; order: 1; }

  .navegacion__enlaces { display: none; }
  .navegacion__acciones { display: none; }

  .navegacion__panel {
    display: none;
    order: 1;
    flex-flow: column nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }
  .navegacion__enlace--panel { opacity: 0.5; transition: opacity 0.25s ease; }
  .navegacion__enlace--panel:hover,
  .navegacion__enlace--panel:focus-visible { opacity: 1; }

  /* --- abierto --- */
  .navegacion--abierta .navegacion__barra {
    background: var(--carbon);
    box-shadow: 0 22px 40px 20px var(--negro-80);
  }
  .navegacion--abierta .navegacion__panel { display: flex; }
  .navegacion--abierta .navegacion__acciones {
    display: flex;
    order: 2;
    width: 100%;
    justify-content: space-between;
  }
  .navegacion--abierta .navegacion__raya {
    position: absolute;
    top: calc(50% - 1px);
    left: calc(50% - 9px);
  }
  .navegacion--abierta .navegacion__raya:first-child { transform: rotate(45deg); }
  .navegacion--abierta .navegacion__raya:last-child  { transform: rotate(-45deg); }
}

/* ===================================================================
   Entrada. La regla que esconde cuelga de .navegacion--entrada, que pone
   el JS: sin JS la cabecera se ve tal cual.
   Original: opacity .001 → 1 y translateY(-100px) → 0, muelle
   (damping 60, stiffness 300, mass 1) con 0.3 s de retardo. Aquí va como
   curva equivalente porque no hay librería de muelles.
   =================================================================== */
.navegacion--entrada .navegacion__barra {
  opacity: 0.001;
  transform: translateY(-100px);
}
.navegacion--entrada.navegacion--dentro .navegacion__barra {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s,
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

/* Los enlaces entran escalonados: 0.4 / 0.5 / 0.6 / 0.7 s y las acciones a
   0.8 s, 0.5 s, cubic-bezier(.44,0,.34,.98), desde opacity .001 y y = -10px. */
.navegacion--entrada .navegacion__enlaces > .navegacion__enlace,
.navegacion--entrada .navegacion__acciones {
  opacity: 0.001;
  transform: translateY(-10px);
}
.navegacion--entrada.navegacion--dentro .navegacion__enlaces > .navegacion__enlace,
.navegacion--entrada.navegacion--dentro .navegacion__acciones {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s cubic-bezier(0.44, 0, 0.34, 0.98),
              transform 0.5s cubic-bezier(0.44, 0, 0.34, 0.98);
}
.navegacion--entrada.navegacion--dentro .navegacion__enlaces > .navegacion__enlace:nth-child(1) { transition-delay: 0.4s; }
.navegacion--entrada.navegacion--dentro .navegacion__enlaces > .navegacion__enlace:nth-child(2) { transition-delay: 0.5s; }
.navegacion--entrada.navegacion--dentro .navegacion__enlaces > .navegacion__enlace:nth-child(3) { transition-delay: 0.6s; }
.navegacion--entrada.navegacion--dentro .navegacion__enlaces > .navegacion__enlace:nth-child(4) { transition-delay: 0.7s; }
.navegacion--entrada.navegacion--dentro .navegacion__acciones { transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .navegacion--entrada .navegacion__barra,
  .navegacion--entrada .navegacion__enlaces > .navegacion__enlace,
  .navegacion--entrada .navegacion__acciones {
    opacity: 1;
    transform: none;
  }
}
