/********/
/* HERO */
/********/
#hero {
  display: grid;
  min-height: 500px;
  max-width: 1200px;
  padding: 4rem 1rem;
  justify-self: center;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "text contact";
  justify-content: center;
  margin-top: var(--nav-height);
}

#hero-text {
  display: grid;
  align-self: center;
  justify-self: center;
  grid-area: text;
}

#hero-title {
  color: var(--text-dark);
  font-size: 24pt;
}

#hero-subtitle {
  align-self: center;
  justify-self: center;
  color: var(--text-light);
  margin-top: 1rem;
}

#hero-supertitle {
  align-self: center;
  color: var(--accent);
  margin-top: 1rem;
  font-size: 12pt;
  margin-bottom: 0.5rem;
}

#hero-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}

#hero-contact {
  display: grid;
  justify-items: center;
  align-items: center;
  justify-self: center;
  align-self: center;
  grid-area: contact;
}
#hero-contact img {
  height: auto;
  width: 50%;
}

.hero-card {
  display: grid;
  gap: 1rem;
  align-content: start;
  grid-template-columns: auto 1fr;
  justify-content: start;
}

.hero-card .title {
  font-size: 14pt;
}

/****************/
/* CONTACT FORM */
/****************/

#contact-form {
  max-width: 1200px;
  justify-self: center;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
}

#contact-title {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

#contact-form label {
  font-size: 12pt;
}

#contact-form input {
  margin-bottom: 0.5rem;
  margin-top: 0.2rem;
}
#contact-form textarea {
  margin-bottom: 0.5rem;
  margin-top: 0.2rem;
}

/************/
/* SERVICES */
/************/
#services {
  display: grid;
}

#services-grid {
  max-width: 1200px;
  justify-self: center;
  padding: 4rem 0.5rem;
  display: grid;
  border-top: 1px solid var(--rule);
}

#services-supertitle {
  align-self: center;
  color: var(--accent);
  font-size: 12pt;
  margin-bottom: 0.5rem;
}

#services-title {
  margin-bottom: 2rem;
  justify-self: start;
  border-bottom: 2px solid var(--red-1);
  color: var(--text-dark);
}

#services-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.services-card {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1rem;
}

.services-card .title {
  color: var(--text-dark);
  font-size: 16pt;
  justify-self: center;
  display: inline-block;
  position: relative;
}

.services-card .title::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
  cursor: pointer;
}

.services-card:hover .title::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.services-card:hover {
}

.services-card:hover img {
  transform: scale(1.2);
}

.services-card .description {
  font-size: 12pt;
}

/**************/
/* LIGHTHOUSE */
/**************/
#lighthouse {
  display: grid;
  background-color: white;
}

#lighthouse-grid {
  max-width: 1200px;
  justify-self: center;
  padding: 4rem 0.5rem;
  display: grid;
  border-top: 1px solid var(--rule);
}

#lighthouse-supertitle {
  align-self: center;
  color: var(--accent);
  font-size: 12pt;
  margin-bottom: 0.5rem;
}

#lighthouse-title {
  margin-bottom: 2rem;
  justify-self: start;
  border-bottom: 2px solid var(--red-1);
  color: var(--text-dark);
}

#lighthouse-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

.lighthouse-card {
  display: grid;
  gap: 0.5rem;
  justify-content: center;
  align-content: start;
  padding: 1rem;
}

.lighthouse-card:first-child {
  border-right: 1px solid var(--rule);
}

.lighthouse-card img {
  width: 100%;
  height: auto;
  max-width: 20rem;
}

.lighthouse-card div {
  text-align: center;
  font-size: 12pt;
  color: var(--text-dark);
}

/*************/
/* PORTFOLIO */
/*************/

#portfolio {
  display: grid;
}

#portfolio-grid {
  max-width: 1200px;
  justify-self: center;
  padding: 4rem 0.5rem;
  display: grid;
  border-top: 1px solid var(--rule);
}

#portfolio-supertitle {
  align-self: center;
  color: var(--accent);
  margin-top: 1rem;
  font-size: 12pt;
  margin-bottom: 0.5rem;
}

#portfolio-title {
  margin-bottom: 2rem;
  justify-self: start;
  border-bottom: 2px solid var(--red-1);
  color: var(--text-dark);
}

#portfolio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.portfolio-card {
  display: grid;
  align-content: start;
  padding: 2rem;
}

.portfolio-card:hover img {
  transform: scale(1.1);
}

.portfolio-card .portfolio-image {
  height: auto;
  width: 100%;
  margin-bottom: 0.5rem;
  transition: transform 0.2s;
}

.portfolio-card .subtitle {
  color: var(--accent);
  font-size: 10pt;
}

.portfolio-card .title {
  color: var(--text-dark);
  font-size: 16pt;
}

.portfolio-card .description {
  margin-top: 1rem;
  font-size: 12pt;
}

.portfolio-card .links {
  margin-top: 1rem;
  display: flex-wrap;
}

.portfolio-card .links a {
  margin-right: 1rem;
}

@media (max-width: 900px) {
  #hero {
    margin-top: 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "contact"
      "text";
  }

  #hero-title {
    justify-self: center;
  }
  #hero-supertitle {
    justify-self: center;
  }
  #hero-subtitle {
    justify-self: center;
  }
  #hero-contact img {
    max-width: 10rem;
  }

  #services-grid {
    justify-self: start;
  }
  #services-cards {
    grid-template-columns: 1fr;
  }

  #lighthouse-grid {
    justify-self: start;
  }
  #lighthouse-cards {
    grid-template-columns: 1fr;
  }
  .lighthouse-card:first-child {
    border-bottom: 1px solid var(--rule);
    border-right: none;
  }

  #portfolio-grid {
    justify-self: start;
  }
  #portfolio-cards {
    grid-template-columns: 1fr;
  }
  .portfolio-card .portfolio-image {
    width: 10rem;
    max-width: 100%;
  }
}
