:root {
  /* colors  */
  --color-black: hsl(0, 0%, 10%);
  --color-white: hsl(0, 0%, 95%);

  --row-gap: 2rem;
  --col-gap: 1rem;
  --p-inline: 2rem;
  --p-block: 1rem;

  /* font sizes  */
  --fs-base: 16px;
  --fs-small: clamp(0.75rem, 0.6286rem + 0.5178vw, 1.25rem);
  --fs-medium: clamp(1rem, 0.6966rem + 1.045vw, 2.5rem);
  --fs-large: clamp(2rem, 1.0291rem + 4.1424vw, 6rem);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  width: 100vw;
  font-family: "Poppins";
  background-color: var(--color-white);
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
}

ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}

.awards {
  width: 100%;
  display: flex;
  justify-content: center;

  & .section-wrapper {
    width: min(100%, 1440px);
    display: flex;
    flex-direction: column;
    row-gap: var(--row-gap);
  }

  & .awards-header {
    font-size: var(--fs-large);
  }
  & .awards-list {
    display: flex;
    flex-direction: column;
  }

  & .award-list__item {
    width: 100%;
    height: fit-content;
    position: relative;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-black);
    container-type: inline-size;
    container-name: award-list__item;

    &::before {
      width: 0%;
      height: 100%;
      background-color: black;
      display: block;
      content: "";
      position: absolute;
      top: 0;
      transition: width 2s cubic-bezier(1, 0.09, 0.02, 1.05);
    }
  }

  & .award-list__item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: calc(var(--p-block) * 2);
    padding-inline: calc(var(--p-inline) * 0.25);
    position: relative;
    transition: padding-inline 0.75s ease-in;
    font-size: var(--fs-medium);
    column-gap: calc(var(--col-gap) * 1.5);

    & > * {
      color: white;
      mix-blend-mode: difference;
    }
  }

  & .award-list__item-description {
    min-width: 30ch;
    opacity: 0;
    transition: opacity 1s cubic-bezier(1, 0.09, 0.02, 1.05);
    flex-shrink: 1;
    flex-grow: 0;
    max-width: 35ch;

    & .scroll-section {
      min-width: 35ch;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  & .award-list__item-title {
    flex-grow: 1;
  }

  & .award-list__item-icon {
    & path {
      fill: white;
    }
  }

  & .award-list__item.active {
    &::before {
      width: 100%;
    }

    & .award-list__item-link {
      padding-inline: calc(var(--p-inline) * 1);
    }

    & .award-list__item-description {
      opacity: 1;

      &:hover {
        & .scroll-section {
          animation-play-state: paused;
        }
      }
    }
    & .scroll-section {
      animation: scroll 10s linear infinite;
    }
  }
}

.horizontal-scroll {
  display: flex;
  align-items: center;
  overflow: hidden;
  justify-items: flex-start;

  & .scroll-section {
    --gap: 0px;
    text-wrap: nowrap;
    padding-inline: calc(var(--p-inline) * 0.25);
  }
}

@container award-list__item (width < 768px) {
  .award-list__item-description {
    display: none;
  }
}

@keyframes scroll {
  to {
    transform: translateX(calc(100% * -1));
  }
}
