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

:root {
  --blanco: #ffffff;
  --negro: #000000;
  --gris: rgba(255, 255, 255, 0.70);
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--negro);
  color: var(--blanco);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

/* FONDO */

.background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url("fondo.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  animation: fondo 16s ease-in-out infinite alternate;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.55) 45%,
      rgba(0, 0, 0, 0.82) 100%
    );
}

/* CONTENEDOR */

.contenedor {
  width: min(1200px, 92%);
  min-height: calc(100vh - 55px);
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 0 90px;
}

/* ENCABEZADO */

.hero {
  text-align: center;
  margin-bottom: 55px;
  animation: aparecer 1.2s ease both;
}

.pretitle {
  font-size: 11px;
  letter-spacing: 6px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0.75;
}

h1 {
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -2px;
}

.linea {
  width: 70px;
  height: 1px;
  background: white;
  margin: 28px auto 20px;
}

.intro {
  color: var(--gris);
  font-size: 15px;
  letter-spacing: 2px;
}

/* MARCAS */

.marcas {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
}

.marca {
  width: 300px;
  color: white;
  text-decoration: none;
  opacity: 0;
  animation: tarjeta 0.9s ease forwards;
}

.marca:nth-child(1) {
  animation-delay: 0.35s;
}

.marca:nth-child(2) {
  animation-delay: 0.55s;
}

.marca:nth-child(3) {
  animation-delay: 0.75s;
}

.imagen {
  position: relative;
  width: 300px;
  height: 300px;
  overflow: hidden;
  background: #111;
}

.imagen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition:
    transform 0.7s cubic-bezier(.2,.8,.2,1),
    filter 0.7s ease;
}

.hover {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.10);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.marca h2 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2px;
  text-align: center;
  margin-top: 17px;
  transition: letter-spacing 0.4s ease;
}

.marca:hover .imagen img {
  transform: scale(1.07);
  filter: grayscale(0%);
}

.marca:hover .hover {
  opacity: 1;
}

.marca:hover h2 {
  letter-spacing: 4px;
}

/* FOOTER */

footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ANIMACIONES */

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

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

@keyframes tarjeta {
  from {
    opacity: 0;
    transform: translateY(35px);
  }

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

@keyframes fondo {
  from {
    transform: scale(1.04);
  }

  to {
    transform: scale(1.09);
  }
}

/* TABLET */

@media (max-width: 1050px) {
  .marcas {
    gap: 18px;
  }

  .marca,
  .imagen {
    width: 270px;
  }

  .imagen {
    height: 270px;
  }
}

/* MÓVIL */

@media (max-width: 760px) {
  .contenedor {
    padding: 60px 0 80px;
  }

  .hero {
    margin-bottom: 40px;
  }

  h1 {
    letter-spacing: -1px;
  }

  .marcas {
    flex-direction: column;
    align-items: center;
    gap: 38px;
  }

  .marca,
  .imagen {
    width: min(300px, 82vw);
  }

  .imagen {
    height: min(300px, 82vw);
  }

  footer {
    position: relative;
    margin-top: 20px;
    padding-bottom: 20px;
  }
}
