@charset "UTF-8";

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


/* RESET BASE */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
    font-family: "Barlow", sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size:10px;
}

section {
  scroll-margin-top: 10rem;
}


/* ================= HEADER ================= */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 6rem;
  margin: 0 auto;
  z-index: 10;
  color: white;
  transition: all 0.3s ease;
}

.main-header.scrolled {
  background: white;
  color: black;
  box-shadow: 0 .2rem 1rem rgba(0,0,0,0.05);
}

/* LOGO */
.logo img {
  height: 6rem;
  transition: all 0.3s ease;
}

.main-header.scrolled .logo img {
  height: 4rem;
}

.logo-black { display: none; }

.main-header.scrolled .logo-white { display: none; }
.main-header.scrolled .logo-black { display: block; }


/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.main-nav a {
  text-decoration: none;
  color: inherit;
  font-size: 1.6rem;
  position: relative;
}

/* hover elegante */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -.4rem;
  width: 0;
  height: .1rem;
  background: currentColor;
  transition: 0.3s;
}

.main-nav a:hover::after {
  width: 100%;
}

/* botón */
.btn-contacto {
  border: .1rem solid currentColor;
  padding: .8rem 1.6rem;
  border-radius: .2rem;
}


/* ================= HERO ================= */

.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  width: 100%;
  height: 120%;
  background-image: url('img/hero.jpg');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  will-change: transform;
  animation: heroPan 10s ease-in-out infinite alternate;
}

@keyframes heroPan {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-20%);
  }
}


.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}



.hero-content {
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 6rem 4rem;
  max-width: 140rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4rem;
  flex-wrap: wrap;
  color: white;
}

.tagline {
  max-width: 40rem;
  line-height: 1.4rem;
}

.stats {
  display: flex;
  gap: 4rem;
}

.stats div {
  display: flex;
  flex-direction: column;
}

.stats strong {
  font-size: 2rem;
}


/* ================= PROYECTOS ================= */

.projects {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

/* MENU */
.projects-nav {
  padding: 6rem;
  position: sticky;
  top: 8rem;
  height: 100vh;
}

.projects-nav h4 {
  margin-bottom: 2rem;
}

.projects-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects-nav a {
  text-decoration: none;
  color: #555;
  display: block;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  position: relative;
  transition: 0.3s;
}

.projects-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -.3rem;
  width: 0;
  height: .1rem;
  background: black;
  transition: 0.3s;
}

.projects-nav a.active::after {
  width: 100%;
}
/* LISTA */
.projects-list {
  width: 100%;
}

/* BLOQUE */
.project {
  display: grid;
  grid-template-columns: 1fr 2fr;
  margin-top: .2rem;
}

/* INFO */
.project .info {
  background: black;
  color: white;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-top h3 {
  margin: 0 0 .5rem;
}

.info-bottom {
  font-size: 1.4rem;
  color: #ccc;
}

/* IMAGEN */
.project .image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: gray;
}


/* ================= CONTACTO ================= */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10rem 6rem;
  gap: 6rem;
}

.contact-right h2 {
  margin-bottom: 2rem;
}

/* FORM */
.form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form input,
.form textarea,
.form select {
  border: none;
  border-bottom: .1rem solid #999;
  padding: 1rem;
  background: transparent;
  font-size: 1.4rem;
}

.form textarea {
  resize: none;
  height: 8rem;
}

.form button {
  align-self: flex-end;
  border: none;
  border-bottom: .1rem solid black;
  background: none;
  padding: 1rem 0;
  cursor: pointer;
}

/* INFO CONTACTO */
.contact-info {
  margin-top: 4rem;
  font-size: 1.4rem;
  color: #444;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {

  .stats {
    flex-wrap: wrap;
    gap: 2rem;
  }

}

@media (max-width: 768px) {

  /* HEADER */
  .main-header {
    padding: 2rem;
  }

  .main-nav {
    display: none;
  }

  /* HERO */
  .hero-content {
    padding: 3rem 2rem;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats {
    flex-direction: column;
    gap: 2rem;
  }

  /* PROYECTOS */
  .projects {
    grid-template-columns: 1fr;
  }

  .projects-nav {
    position: relative;
    height: auto;
    display: flex;
    overflow-x: auto;
    border-bottom: .1rem solid #ddd;
  }

  .projects-nav ul {
    display: flex;
    gap: 2rem;
  }

  /* BLOQUES */
  .project {
    grid-template-columns: 1fr;
  }

  .project .info {
    padding: 2rem;
  }

  .project .image {
    height: 25rem;
    aspect-ratio: unset;
  }

  /* CONTACTO */
  .contact {
    grid-template-columns: 1fr;
    padding: 4rem 2rem;
  }

}