/* HEADER */

.main-header {
  transition: background 0.5s ease;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 500;
}

.main-header__container {
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-left: var(--base-space-sm);
  padding-right: var(--base-space-sm);
  max-width: var(--base-container-md);
  margin: 0 auto;
}

.main-header__button {
  text-decoration: none;
  background: var(--base-color-primary);
  height: var(--base-element-height-md);
  border-radius: 300px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 120px;
  font-family: var(--base-font-family);
  font-size: var(--base-font-size-sm);
  color: var(--base-color-primary-contrast);
}

.main-header__button:hover {
  background: var(--base-color-primary-hover);
}

.main-header--white {
  background: var(--base-color-white);
}

.logo {
  height: 40px;
  position: absolute;
  top: var(--base-space-md);
  left: var(--base-space-sm);
}

.logo--normal-clean {
  display: block;
}
.logo--normal {
  display: none;
}

@media (min-width: 500px) {
  .logo {
    height: 50px;
    width: auto;
    top: var(--base-space-xs);
    left: var(--base-space-xs);
  }
  .main-header__button {
    height: var(--base-element-height-lg);
    min-width: 150px;
    font-size: var(--base-font-size-md);
  }
}

@media (min-width: 800px) {
  .logo {
    height: 60px;
    width: auto;
    top: var(--base-space-xs);
    left: var(--base-space-xs);
  }
  .logo--normal-clean {
    display: none;
  }
  .logo--normal {
    display: block;
  }
  .main-header__button {
    height: var(--base-element-height-lg);
    min-width: 200px;
    font-size: var(--base-font-size-md);
  }
}

/* HERO */

.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url("../img/hero.png");
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--base-color-white);
}

.hero__title {
  text-align: center;
  color: var(--base-color-white);
  font-size: 50px;
  font-weight: 800;
}

@media (min-width: 800px) {
  .hero {
    /* Only have  parallax effect on desktop.
    ** Fixed value creates a blurry and weird positioned image on ios
    */
    background-attachment: fixed;
  }
  .hero__title {
    font-size: 78px;
  }
}

/* SECTION */

main {
  background: white;
  position: relative;
  z-index: 100;
  counter-reset: section;
}

.section {
  display: block;
  width: 100%;
  counter-increment: section;
}

.section__container {
  padding-top: var(--base-space-xl);
  padding-bottom: var(--base-space-xl);
  padding-left: var(--base-space-md);
  padding-right: var(--base-space-md);
  width: 100%;
  max-width: var(--base-container-md);
  margin: 0 auto;
}

.section__title {
  font-size: var(--base-font-size-sm);
  font-weight: 400;
  color: var(--base-color-primary);
  margin-bottom: var(--base-space-lg);
}

.section__title-number::before {
  margin-right: var(--base-space-md);
  content: counter(section, decimal-leading-zero);
}

.section__title-line {
  margin-right: var(--base-space-md);
  width: 200px;
  height: 2px;
  display: inline-block;
  background: var(--base-color-primary);
}

.section--dark {
  position: relative;
  background-image: url("../img/dark-bg.png");
  color: var(--base-color-white);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.section--dark::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.section--dark .section__container {
  position: relative;
}

.section--dark .section__title {
  color: var(--base-color-white);
}

.section--dark .section__title-line {
  background: var(--base-color-white);
}

.section--portfolio {
  padding-top: var(--base-space-xxl);
  margin-top: var(--base-space-xxl);
  position: relative;
  background-image: url("../img/portfolio.png");
  background-position: top left;
  background-size: 100%;
  background-repeat: no-repeat;
}

.section--portfolio .section__container::before {
  position: absolute;
  content: "";
  left: -100px;
  top: 0;
  width: 100px;
  height: 100%;
  background: var(--base-color-white);
}

.section--portfolio .section__container {
  background: var(--base-color-white);
  position: relative;
}

@media (min-width: 800px) {
  .section--portfolio {
    background-position: top left;
    background-size: 70%;
  }
  .section--portfolio .section__container {
    margin-top: var(--base-space-xxl);
  }
}

/* TESTEMONIAL LIST */

.testemonials {
  counter-reset: testemonial;
  padding: 0;
  margin: 0;
  list-style: none;
}

.testemonial {
  counter-increment: testemonial;
  display: block;
  margin-bottom: var(--base-space-xl);
}

.testemonial__counter {
  display: flex;
  align-items: baseline;
  width: 100%;
  color: var(--base-color-primary);
  margin-bottom: var(--base-space-lg);
}

.testemonial__counter::before {
  margin-right: var(--base-space-md);
  content: counter(testemonial, decimal-leading-zero);
}

.testemonial__counter::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--base-color-primary);
}

.testemonial__content {
  display: block;
}

.testemonial__person {
  width: 100%;
  margin-bottom: var(--base-space-md);
}

.testemonial__text {
  width: 100%;
  font-weight: 600;
  font-size: var(--base-font-size-md);
  max-width: var(--base-container-sm);
}

@media (min-width: 800px) {
  .testemonial__content {
    display: flex;
  }

  .testemonial__person {
    flex: 1;
  }

  .testemonial__text {
    width: 100%;
    max-width: var(--base-container-sm);
  }
}

/* PROJECT LIST */

.projects {
  counter-reset: project;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.project {
  cursor: pointer;
  width: 100%;
  max-width: 650px;
  counter-increment: project;
  display: block;
  margin-bottom: var(--base-space-xl);
}

.project:nth-of-type(2n) {
  align-self: flex-end;
}

.project__counter {
  display: inline-flex;
  align-items: baseline;
  flex: 1;
  font-size: var(--base-font-size-md);
  max-width: 100px;
  padding-right: var(--base-space-md);
  color: var(--base-color-primary);
  margin-bottom: var(--base-space-lg);
}

.project__counter::before {
  margin-right: var(--base-space-md);
  content: counter(project, decimal-leading-zero);
}

.project__counter::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--base-color-primary);
}

.project__title {
  font-size: var(--base-font-size-md);
  color: var(--base-color-primary);
}

.project__img {
  transition: all 0.3s ease;
  position: relative;
  height: 400px;
  width: 90%;
  margin: 0 auto;
  transform: translateX(-10px) translateY(-10px);
  background: var(--base-color-primary);
  margin-bottom: var(--base-space-md);
}

.project__img img {
  position: absolute;
  left: 0;
  top: 0;
  transition: all 0.3s ease;
  transform: translateX(10px) translateY(10px);
  width: 100%;
  object-fit: cover;
  height: 100%;
}

.project:hover .project__img {
  transform: translateX(-15px) translateY(-15px);
}

.project:hover .project__img img {
  transform: translateX(15px) translateY(15px);
}

@media (min-width: 800px) {
  .project__counter {
    max-width: 200px;
  }
  .project__img {
    height: 400px;
    width: 100%;
  }
  .project__img img {
    filter: grayscale(1);
  }
  .project:hover .project__img img {
    filter: grayscale(0);
  }
}

/* LOGO GRID */

.logo-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  padding-bottom: var(--base-space-lg);
}

.logo-grid__item {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--base-color-ui);
}

.logo-grid__item img {
  max-height: 70%;
  max-width: 70%;
  filter: grayscale(0);
}

@media (min-width: 800px) {
  .logo-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  .logo-grid__item img {
    filter: grayscale(1);
  }
  .logo-grid__item:hover img {
    filter: grayscale(0);
  }
}

/* SERVICE LIST */

.services {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.service {
  text-align: center;
  display: block;
  border-top: 1px solid var(--base-color-ui);
  padding-top: var(--base-space-lg);
  padding-bottom: var(--base-space-lg);
}

.service__icon {
  text-align: center;
  width: 100%;
  margin-bottom: var(--base-space-md);
}

.service__icon img {
  width: 80px;
}

.service__content {
  width: 100%;
}

.service__title {
  font-size: var(--base-font-size-lg);
  font-weight: 600;
  margin-bottom: var(--base-space-md);
}

.service__tag {
  display: inline-block;
  margin-bottom: var(--base-space-md);
  background: var(--base-color-white);
  margin-right: var(--base-space-md);
  position: relative;
  font-size: var(--base-font-size-sm);
  border: 1px solid var(--base-color-ui);
  border-radius: 300px;
  padding: var(--base-space-xs) var(--base-space-md);
}

.service__tag svg {
  vertical-align: middle;
  fill: var(--base-color-primary);
}

@media (min-width: 800px) {
  .service {
    text-align: left;
    display: flex;
    border-top: 1px solid var(--base-color-ui);
    padding-top: var(--base-space-lg);
    padding-bottom: var(--base-space-lg);
  }
  .service__icon {
    text-align: left;
    width: 80px;
  }
  .service__icon img {
    width: 100%;
  }
  .service__content {
    width: 100%;
    padding-left: var(--base-space-xxl);
  }
}

/* FOOTER */

.main-footer {
  color: var(--base-color-white);
  background-image: url("../img/footer.png");
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 40vh;
  transform: translateY(-500px);
  z-index: 0;
}

.main-footer__container {
  padding-top: var(--base-space-xl);
  padding-bottom: var(--base-space-xl);
  padding-left: var(--base-space-md);
  padding-right: var(--base-space-md);
  width: 100%;
  max-width: var(--base-container-sm);
  margin: 0 auto;
}

.main-footer__submit-container {
  text-align: center;
}

@media (min-width: 800px) {
  .main-footer__submit-container {
    text-align: right;
  }
}

.main-footer__submit-button {
  background: var(--base-color-primary);
  height: var(--base-element-height-lg);
  border-radius: 300px;
  border: 0;
  min-width: 200px;
  font-family: var(--base-font-family);
  font-size: var(--base-font-size-md);
  color: var(--base-color-white);
}

/* INPUT */

.input {
  display: block;
  width: 100%;
  position: relative;
  margin-bottom: var(--base-space-xl);
}

.input__label {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  transition: 0.2s ease;
  transform-origin: left;
  color: var(--base-color-ui-weak);
  transform: scale(1) translateY(10px);
}

.input__field {
  color: var(--base-color-ui-weak);
  background: transparent;
  display: block;
  border: 0;
  box-shadow: none;
  width: 100%;
  outline: 0;
  font-family: var(--base-font-family);
  font-size: var(--base-font-size-md);
  border-bottom: 1px solid var(--base-color-ui-strong);
  height: var(--base-element-height-lg);
}

.input__field:focus,
.input__field:hover {
  border-bottom: 1px solid var(--base-color-white);
}

.input__field:focus ~ .input__label,
.input__field:valid ~ .input__label,
.input__field:not([empty="true"]) ~ .input__label {
  color: var(--base-color-white);
  transform: scale(0.8) translateY(-20px);
}

/* MODAL */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal__container {
  animation: fade-up 0.3s ease;
  position: relative;
  box-shadow: var(--base-depth-md);
  background: var(--base-color-white);
  padding-top: var(--base-space-xl);
  padding-bottom: var(--base-space-xl);
  padding-left: var(--base-space-lg);
  padding-right: var(--base-space-lg);
  width: calc(100% - var(--base-space-md));
  min-height: 60vh;
  max-height: 90vh;
  max-width: var(--base-container-md);
  margin: 0 auto;
}

.modal__header {
  text-align: right;
  margin-bottom: var(--base-space-lg);
}

.modal__close {
  position: absolute;
  right: var(--base-space-lg);
  top: var(--base-space-lg);
  fill: var(--base-color-primary);
  outline: 0;
  border: 0;
  background: none;
}

@media (min-width: 800px) {
  .modal__container {
    padding-top: var(--base-space-xxl);
    padding-bottom: var(--base-space-xxl);
    padding-left: var(--base-space-xxl);
    padding-right: var(--base-space-xxl);
  }
}

@keyframes fade-up {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* TRANSITIONS */

.logo-leave-active,
.logo-enter-active {
  transition: all 0.3s ease;
}

.logo-leave {
  opacity: 1;
  transform: translateY(0px);
}

.logo-enter {
  opacity: 0;
  transform: translateY(-20px);
}

.logo-leave-to {
  opacity: 0;
  transform: translateY(20px);
}

.logo-leave-to {
  opacity: 0;
  transform: translateY(20px);
}
