@import "modules.css";

* {
  font-family: var(--main-font);
}

body {
  background-color: var(--main-color);
  color: var(--text-color);
}

a,
li {
  color: var(--text-color);
  text-decoration: none;
  list-style: none;
  opacity: 0.7;
  transition: all 200ms ease;
  font-size: var(--font-size-body);
  &:hover {
    opacity: 1;
    color: var(--text-color);
  }
}
button {
  appearance: none;
}
p {
  font-size: var(--font-size-body);
  font-weight: 400;
  text-wrap: pretty;
}
h2 {
  font-size: var(--font-size-heading);
  margin-bottom: 1rem;
  font-weight: 700;
}
h3 {
  font-size: 20px;
  font-weight: 700;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
header {
  position: sticky;
  background-color: var(--main-color);
  top: 0;
  z-index: 9999;
  .container {
    padding: 2rem 1rem 0.5rem 1rem;
    .col-12 {
      display: flex;
      align-items: center;
      justify-content: space-between;
      nav {
        margin-left: auto;
        ul li {
          text-align: right;
        }
      }
      .lang-switcher.mobile {
        display: none;
        margin: 0;
        a:first-child::after {
          content: "/";
          display: inline-block;
          margin-inline: 0.5rem;
        }
      }
      .lang-switcher {
        margin-left: auto;
        margin-right: 2rem;
        a.active {
          opacity: 1;
          font-weight: 700;
        }

        ul {
          margin: 0;
          padding: 0;
          display: flex;
          li {
            &:first-child::after {
              content: "/";
              display: inline-block;
              margin-inline: 0.5rem;
            }
          }
        }
      }
    }
    img {
      height: 60px;
    }
    .navbar-toggler {
      &:focus {
        box-shadow: none;
      }
      img,
      svg {
        height: 36px;
      }
    }
  }
}
.navbar-toggler {
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle .line {
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.menu-toggle .top {
  transform-origin: 3px 6px; /* pivot from left */
}
.menu-toggle .bottom {
  transform-origin: 7px 18px;
}

.menu-open .top {
  transform: rotate(45deg) translate(1px, -2px);
}
.menu-open .middle {
  opacity: 0;
}
.menu-open .bottom {
  transform: rotate(-45deg) translate(3px, -1px);
}

nav {
  ul {
    padding-inline: 0;
    gap: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }
  ul.open {
    max-height: 500px;
  }
}

main {
  .content {
    margin-bottom: 2rem;
    .col-12 {
      display: grid;
      @media (max-width: 600px) {
        margin-top: 10rem;
      }

      > * {
        grid-area: 1/1;
      }
    }
    .text-content {
      max-width: 70ch;
      align-self: end;
      li {
        list-style-type: disc;
        opacity: 1;
        margin-bottom: 0.2rem;
      }
      a.inline-link {
        display: block;
        margin-left: 1rem;
        max-width: fit-content;
        &:first-child {
          margin-top: 1rem;
        }
        &:after {
          display: none !important;
        }
      }
      a:not(.mail) {
        text-decoration: underline;
        &:after {
          content: url("../assets/logos/open-in-new.svg");
          display: inline-block;
          height: var(--font-size-body);
          width: var(--font-size-body);
          position: relative;
          top: 5px;
          left: 5px;
        }
      }
    }
    &:not(.no-line)::after {
      margin-top: 2rem;
      content: "";
      width: 100%;
      height: 2px;
      background: white;
      display: block;
      opacity: 0.2;
    }
    video,
    .background-image {
      pointer-events: none;
      @media (max-width: 600px) {
        position: relative;
        top: -200px;
      }
      object-fit: cover;
      height: 100%;
      width: 100%;
      object-position: center;
      opacity: 0.2;
      z-index: -1;
    }
  }
}
article {
  scroll-margin-top: 116px;
  @media (max-width: 600px) {
    scroll-margin-top: 92px;
  }
}
#contact {
  background-color: var(--secondary-color);
  padding-block: 3rem;
  .text-content {
    .mail {
      margin-bottom: 2rem;
      p {
        margin-bottom: 0.1rem;
      }
      a {
        opacity: 1;
        text-decoration: underline;
        display: block;
      }
    }
  }
}
footer {
  padding-block: 2rem;
  background-color: var(--tertiary-color);
  nav {
    ul {
      height: 36px;
      max-height: 36px;
      margin-left: 0;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      img {
        height: 18px;
      }
      li {
        a {
          img.changeventureslogo {
            height: 25px;
            margin-top: 5px;
          }
        }
      }
    }
  }
}

.square-video.square-video {
  width: 80%;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 992px) {
  :root {
    --font-size-body: 14px;
    --font-size-heading: 18px;
  }
  main {
    .content {
      min-height: 90vh;
    }
  }
  header {
    .container {
      img {
        height: 36px;
      }
    }
  }
}

@media (max-width: 600px) {
  .square-video.square-video {
    width: 100%;
    margin: 0 auto;
  }

  header {
    .container {
      .navbar-toggler {
        img {
          height: 24px;
        }
      }
      img {
        height: 24px;
      }
      .lang-switcher.mobile {
        display: block !important;
      }
      .lang-switcher {
        display: none !important;
      }
    }
  }
}
