@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 100 999;
  font-display: swap;
  src: url("./sora-variable.ttf") format("truetype");
  font-variation-settings: "wdth" 0;
}

* {
  margin: 0;
  padding: 0;
  transition: all 0.6s ease;
  font-weight: 500;
  font-family: Sora, sans-serif;
}

*:focus {
  outline: none;
}

ul {
  list-style: none;
}

:root {
  --blue: #039;
  --green: #003c3a;
  --gray: #dfdfdf;
  --white: #f8f9fa;
  --dark: #000;

  --blur: 0rem;
}

body {
  height: 100dvh;
  background-color: var(--dark);
  place-items: center;
  background-size: cover;
}

button {
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.council {
  z-index: 99;
  position: absolute;
  justify-content: start;
  display: flex;
  margin: clamp(1rem, 7vw, 2rem) clamp(1rem, 7vw, 2rem);
  left: 0;
  top: 0;
  scale: 2;
  transform-origin: top left;
  filter: drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.4));
}

.container {
  height: 100dvh;
  display: flex;
  width: 100%;
  flex-direction: column-reverse;

  .bg-container {
    flex: 1 1 auto;
    min-height: 0; /* important: prevents flex item from overflowing */
    overflow: hidden;
    position: relative;
    width: 100%;

    video,
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      object-position: center top;
    }

    &::after {
      position: absolute;
      content: "";
      background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.2) 100%);
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
    }
  }

  .content {
    color: var(--green);
    flex: 0 0 auto;
    background: var(--white);
    padding: 1rem 7rem 1.25rem 2rem;
    backdrop-filter: blur(0.5rem);

    &.active {
      opacity: 1;
      translate: none;
    }

    h1 {
      font-size: clamp(1rem, 10vw, 1.5rem);
      word-break: break-word;
      font-weight: 400;
      hyphens: auto;
      a,
      a:hover,
      a:visited {
        font-weight: 400;
        color: var(--green);
        text-decoration: underline;
      }
    }

    .language-selector {
      anchor-name: --lang-btn;
      position: absolute;
      top: 0rem;
      right: 0rem;
      margin: 1.25rem;
      display: flex;
      gap: 0.5rem;
      align-items: center;
      padding: 0.5rem 1rem;
      color: var(--white);
      opacity: 0;
      background-color: var(--green);
      z-index: 99;

      svg {
        width: 1rem;
      }
      &.active {
        opacity: 1;
      }
      &:hover {
        background-color: var(--dark);
      }
    }

    .socials {
      display: flex;
      flex-direction: column;
      text-align: center;
      padding-top: 1rem;
      gap: 1rem;

      h4 {
        font-size: 1.5rem;
        margin: 0;
      }
      h3 {
        font-size: 26px;
      }
      .icons {
        display: flex;
        gap: 1rem;
        .bi {
          height: 1.5rem;
          width: 1.5rem;
          color: var(--green);
          &:hover {
            color: var(--dark);
          }
        }
      }
    }
  }
}

.modal {
  border: none;
}

@media (max-width: 599px) {
  .modal {
    color: var(--white);
    width: 100%;
    height: 100%;
    backdrop-filter: blur(1rem);
    z-index: 999;
    inset: 0;
    margin: auto;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;

    .modal-container {
      padding: 3rem;
      position: relative;
      .title {
        display: flex;
        gap: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 0 2rem 0 1rem;
        button {
          position: absolute;
          right: 3rem;
          width: 1rem;
          height: 1rem;
          background: transparent;
          border-radius: 50%;
          color: var(--white);
          scale: 3;
          &:hover {
            background: rgba(255, 255, 255, 0.1);
          }
        }
      }
    }
    ul {
      list-style: none;
      align-items: center;
      scale: 1.2;
      margin-top: 2rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      translate: 0 50%;
      li {
        width: min(80%, 18rem);

        button {
          background: var(--white);
          color: var(--dark);
          width: 100%;
          text-align: center;
          justify-content: center;
          position: relative;
          translate: -50% 0%;
          left: 50%;

          &.active {
            pointer-events: none;
            user-select: none;
            &::before {
              position: absolute;
              content: "";
              width: 0.3rem;
              height: 60%;
              left: 0.33rem;
              background-color: var(--green);
              padding: 0.2rem 0;
            }
          }
          &:hover {
            background: var(--gray);
          }
        }
      }
    }
  }
}

@media (min-width: 600px) {
  .modal {
    background-color: transparent;
    position: fixed;
    inset: auto;
    bottom: anchor(top);
    right: calc(anchor(left) - anchor-size(width));
    position-anchor: --lang-btn;
    padding: 1rem;
    color: var(--green);
    max-width: 18rem;
    .modal-container {
      padding: 1rem;
      position: relative;
      background-color: var(--white);
      box-shadow: 0.15rem 0.15rem 1rem rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      gap: 1rem;
      .title {
        display: flex;
        gap: 1rem;
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;

        h2 {
          font-size: 1.25rem;
          margin: 0;
        }
        .close {
          aspect-ratio: 1 / 1;
          height: 2rem;
          background: var(--gray);
          color: var(--green);
          /* padding: 0.33rem; */
          /* border-radius: 50%; */
          &:hover {
            background: var(--green);
            color: var(--white);
          }
        }
      }
      ul {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        li {
          width: 100%;
          button {
            width: 100%;
            position: relative;
            background: var(--gray);

            &.active {
              pointer-events: none;
              user-select: none;
              &::before {
                position: absolute;
                content: "";
                width: 0.3rem;
                height: 60%;
                left: 0.33rem;
                background-color: var(--green);
                padding: 0.2rem 0;
              }
            }
            &:hover {
              background: var(--green);
              color: var(--white);
            }
          }
        }
      }
    }
    .modal-container::after {
      content: "";
      position: absolute;
      z-index: 1;
      bottom: -1rem;
      right: 1rem;
      width: 0.5rem;
      height: 0.5rem;
      rotate: 135deg;
      scale: 0.5;
      border: 1rem solid var(--white);
      border-left-color: transparent;
      border-bottom-color: transparent;
    }
  }
}
