* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  background-color: black;
}


.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  /* Cambiamos center por flex-start y añadimos un margen a la izquierda */
  justify-content: flex-start; 
  overflow: hidden;
  color: white;
  text-align: left;
}

.hero-content {
  margin-left: 55%;
}

/* Video a pantalla completa */
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Oscurecer un poco el video para que el texto sea legible */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

/* --- ANIMACIONES --- */

/* Título con Fade In de 1 segundo */
.titulo-fade {
font-size: 4rem;
  font-weight: bold;
  opacity: 0;
  margin-bottom: 0;
  animation: fadeIn 1s ease-out 1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Subtítulo con efecto de escritura */
.subtitulo-tipeo {
  font-size: 1.5rem;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #fff; /* El cursor */
  width: 0;
  /* El delay de 1.2s es para que empiece justo después del fade del título */
  animation: typing 2.5s steps(30, end) 1.2s forwards,
             blink 0.8s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: white; }
}




/* --- AJUSTES PARA MOBILE --- */
@media (max-width: 768px) {
  
  /* 1. Achicamos la altura del video/contenedor */
  .hero {
    height: 100vh; /* El video ahora ocupa solo el 60% de la pantalla */
    justify-content: center; /* Centra el bloque de texto horizontalmente */
    padding-left: 0; /* Eliminamos el desplazamiento que pusimos en desktop */
  }

  /* 2. Centramos el bloque de contenido */
  .hero-content {
    margin-left: 0; /* Quitamos el margen lateral */
    text-align: center; /* Centra el texto */
    width: 100%;
    padding: 0 20px; /* Margen de seguridad para que el texto no toque los bordes */
  }

  /* 3. Achicamos el tamaño de las fuentes */
  .titulo-fade {
    font-size: 2.2rem; /* Título más acorde al tamaño del celular */
    line-height: 1.1;
  }

  .subtitulo-tipeo {
    font-size: 1.1rem;
    margin-top: 10px;
    /* En mobile, el efecto de escritura puede ser difícil de leer si es muy largo, 
       pero con text-align center se mantendrá centrado. */
  }
  
  /* Opcional: Si el video queda muy pequeño, puedes subir el valor de height en .hero */
}
