:root {
  --white: #fff;
  --black: #1f1f1f;
  --black-100: #313131;
  --orange: #f54932;
  --yellow: #fbce51;
  --gray: #d0d0d0;
  --blue: #3057a2;
  --beige: #e9ded4;

  --font-main: "Golos Text", Arial, Helvetica, sans-serif;
  --font-accent: "Merriweather", Georgia, "Times New Roman", serif;

  --container-width: min(calc(100vw - 144px), 1222px);
}

html {
  scrollbar-gutter: stable;
  scroll-padding-top: 100px;
}

body {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--white);
  font-family: var(--font-main);
  font-weight: 400;
  font-optical-sizing: auto;
  font-style: normal;
  color: var(--black-100);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

input,
textarea {
  background: transparent;
  border: none;
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  position: absolute;
  opacity: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  background: transparent;
  border: none;
  cursor: pointer;
}

ul li {
  list-style: none;
}

img {
  user-select: none;
  pointer-events: none;
}

h1,
h2,
h3 {
  font-family: var(--font-accent);
  font-variation-settings: "wdth" 100;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--black-100);
}

ins {
  text-decoration: none;
}

/* Utils */
.container {
  max-width: var(--container-width);
  margin: 0 auto;

  @media (max-width: 768px) {
    max-width: 100%;
    padding-inline: 20px;
  }
}

.cover-img,
.contain-img {
  width: 100%;
  height: 100%;
}

.cover-img {
  object-fit: cover;
}

.contain-img {
  object-fit: contain;
}

.heading-inner-section {
  font-size: clamp(28px, 2.64vw, 36px);
  line-height: 135%;
  text-wrap: balance;

  .text-accent {
    font-weight: 700;
    color: var(--orange);
  }
}

.heading-2 {
  font-size: clamp(36px, 3.96vw, 54px);
  line-height: 120%;

  @media (max-width: 768px) {
    line-height: 110%;
  }
}

.slider-nav {
  display: flex;
  align-items: center;

  .slider-nav__dots {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .slider-nav__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    transition: background-color 0.3s;

    &.slider-nav__dot--active {
      background: var(--black-100);
    }
  }

  .slider-nav__counter {
    line-height: 120%;
    min-width: 36px;
    text-align: center;
  }

  .slider-nav__button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--black-100);
    transition: color 0.3s;

    svg {
      path {
        color: var(--white);
      }
    }

    &:hover:not(:disabled) {
      color: var(--yellow);
    }

    &:focus-visible {
      outline: 2px solid var(--yellow);
      outline-offset: 2px;
    }

    &:disabled {
      color: var(--gray);
      cursor: not-allowed;
    }
  }
}

br.mobile-divider {
  display: none;

  @media (max-width: 768px) {
    display: block;
  }
}

/* End utils */

.intro {
  position: relative;

  .intro__background {
    position: absolute;
    z-index: -1;
    inset: 0;
  }

  .intro__content {
    width: min(542px, 100%);
    padding-block: 26px 130px;
  }

  .intro__logo {
    display: block;
    width: 245px;
    aspect-ratio: 6.81;
  }

  .intro__title {
    margin-top: 62px;
    font-size: clamp(36px, 4.4vw, 60px);
    line-height: 110%;

    span {
      display: block;
      text-align: center;
    }
  }

  .intro__text,
  .intro__buttons .button {
    line-height: 130%;
  }

  .intro__text {
    margin-block: 24px 40px;
    font-size: 18px;
    text-align: center;
  }

  .intro__buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 16px;

    .button {
      padding: 20px 49px;
      border: 2px solid var(--black);
      border-radius: 66px;
      font-weight: 500;
      text-align: center;
      text-wrap: balance;
      transition:
        background-color 0.3s,
        color 0.3s,
        border-color 0.3s;

      &:hover {
        background-color: var(--black);
        color: var(--white);
      }
    }

    .button--black {
      background: var(--black);
      color: var(--white);

      &:hover {
        background-color: var(--yellow);
        color: var(--black);
        border-color: var(--yellow);
      }
    }
  }

  .intro__marquee {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }

  @media (max-width: 768px) {
    .intro__content {
      padding-block: 18px 339px;
    }

    .intro__logo {
      width: 213px;
      aspect-ratio: 6.67;
    }

    .intro__title {
      margin-top: 40px;

      .third-string {
        text-align: right;
      }
    }

    .intro__text {
      margin-block: 24px 32px;
    }

    .intro__buttons {
      grid-template-columns: 1fr;
      row-gap: 14px;

      .button {
        padding: 18px 0;
        border: none;
        background: rgba(255, 255, 255, 0.9);
      }

      .button--black {
        background: var(--black);
        color: var(--white);
      }
    }

    .intro__marquee {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
    }
  }
}

.marquee {
  overflow: hidden;
  padding-block: 18px;
  background: var(--orange);
  color: var(--white);

  .marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
    will-change: transform;
  }

  .marquee__content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 12px;

    span {
      font-family: var(--font-accent);
      font-size: 22px;
      font-variation-settings: "wdth" 100;
      text-transform: uppercase;

      &:where([class]) {
        width: 6px;
        height: 6px;
        margin-inline: 12px;
        border-radius: 50%;
        background: var(--white);
      }
    }
  }

  @media (max-width: 768px) {
    padding-block: 10px;

    .marquee__content {
      span {
        font-size: 16px;
      }
    }
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.event-promo {
  margin-block: 140px 187px;

  .event-promo__lecture,
  .event-promo__workshop {
    display: flex;
  }

  .event-promo__lecture {
    align-items: center;
    justify-content: space-between;

    .heading-2 {
      width: min(764px, 100%);
    }

    .divider {
      display: contents;
    }

    img {
      width: min(394px, 33%);
      aspect-ratio: 1.58;
    }
  }

  .event-promo__workshop {
    margin-top: 36px;
    max-width: calc(var(--container-width) + 23px);
    margin-inline: 45px 72px;
    column-gap: 16px;

    @media (min-width: 1367px) {
      margin-inline: auto;
    }

    .event-promo__workshop-image {
      position: relative;

      flex: 0 0 527px;
      min-width: 0;
      aspect-ratio: 0.93;

      .overlay {
        position: absolute;
        inset: 0;
        mix-blend-mode: color-burn;
      }
    }

    .event-details {
      margin-block: 60px 48px;

      .event-details__row {
        display: flex;

        &:not(:last-child) {
          border-bottom: 2px solid var(--gray);
        }

        &:first-child {
          .event-details__term,
          .event-details__definition {
            padding-block: 0 16px;
          }
        }

        &:last-child {
          .event-details__term,
          .event-details__definition {
            padding-block: 16px 0;
          }
        }

        .event-details__term,
        .event-details__definition {
          font-size: 20px;
          line-height: 120%;
        }

        .event-details__term {
          padding: 16px 16px 16px 0;
          flex: 0 0 43.47%;
          border-right: 2px solid var(--gray);
        }

        .event-details__definition {
          padding: 16px;
          flex: auto;
          font-weight: 600;

          del {
            display: inline-block;
            margin-right: 12px;
            text-decoration-color: var(--orange);
          }
        }
      }
    }

    .event-promo__feedback {
      font-size: 20px;
      line-height: 120%;
      color: var(--blue);
    }
  }

  @media (max-width: 1100px) {
    .event-promo__lecture {
      gap: 24px;

      .heading-2 {
        width: 100%;
      }

      img {
        width: min(394px, 100%);
      }
    }

    .event-promo__workshop {
      margin-inline: auto;
      flex-wrap: wrap;
    }
  }

  @media (max-width: 768px) {
    margin-block: 139px 120px;

    .event-promo__workshop {
      flex-direction: column;
    }

    .event-promo__lecture {
      position: relative;
      align-items: center;
      justify-content: space-between;

      .divider {
        display: block;
        margin-top: 261px;
      }

      img {
        position: absolute;
        width: calc(100% - 40px);
        height: auto;
        aspect-ratio: 1.58;
      }
    }

    .event-promo__workshop {
      max-width: 100%;
      margin-top: 21px;
      margin-inline: 0;
      row-gap: 19px;

      .event-promo__workshop-image {
        flex: none;
        width: 100%;
        aspect-ratio: 1.12;
      }

      .event-promo__workshop-information {
        padding-inline: 20px;
      }

      .event-details {
        margin-block: 44px 40px;

        .event-details__row {
          flex-wrap: wrap;
          gap: 12px;
          padding-block: 16px;

          &:first-child {
            padding-block: 0 16px;

            .event-details__term,
            .event-details__definition {
              padding-block: 0;
            }
          }

          &:last-child {
            padding-block: 16px 0;

            .event-details__term,
            .event-details__definition {
              padding-block: 0;
            }
          }

          .event-details__term {
            padding: 0;
            flex: none;
            border-right: none;
          }

          .event-details__definition {
            padding: 0;
          }
        }
      }

      .event-promo__feedback {
        font-size: 18px;
      }
    }
  }
}

.stages {
  overflow: clip;

  .stages__inner {
    position: relative;

    .stages__plane {
      position: absolute;
      bottom: 40px;
      right: -47px;
      width: 374px;
      aspect-ratio: 2.56;
      object-fit: contain;
      transform: rotate(-15deg);

      @media (max-width: 1100px) {
        right: -180px;
      }
    }
  }

  .stages__header {
    position: relative;
    width: min(806px, 100%);

    .stages__subtitle {
      position: absolute;
      bottom: 10px;
      right: 225px;
      width: 280px;
      font-size: 20px;
      line-height: 120%;
      text-wrap: balance;
      color: var(--blue);
    }

    @media (max-width: 1100px) {
      width: min(720px, 100%);

      .stages__subtitle {
        bottom: 6px;
      }
    }
  }

  .stages__navigation {
    display: none;
  }

  .stages__list {
    margin-top: 54px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    grid-auto-rows: minmax(112px, auto);
    list-style: none;
    counter-reset: stages-counter;

    .stages__slide {
      display: contents;

      &:nth-child(2) {
        .stages__item {
          grid-row: span 2;
        }
      }

      &:last-child {
        .stages__item {
          padding-right: min(290px, 28%);
          grid-column: span 2;
        }
      }
    }

    .stages__item {
      position: relative;
      padding: 20px 20px 20px 72px;
      counter-increment: stages-counter;
      background-image: url("/images/stages-item-bg.webp");
      background-repeat: no-repeat;
      background-size: cover;
      font-size: 20px;
      font-weight: 500;
      line-height: 120%;

      &::before {
        content: counter(stages-counter);
        position: absolute;
        top: 20px;
        left: 20px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--white);
        color: var(--black-100);
        font-size: 20px;
        line-height: 120%;
        font-weight: 600;
      }
    }
  }

  @media (max-width: 768px) {
    .stages__inner {
      .stages__plane {
        top: 230px;
        bottom: unset;
        right: 0;
        width: 317px;
        aspect-ratio: 2.58;
        transform: rotate(-18deg);
      }
    }

    .stages__header {
      .stages__subtitle {
        position: static;
        width: 100%;
        margin-top: 12px;
        font-size: 18px;
      }
    }

    .stages__list {
      margin-top: 148px;
      grid-template-columns: 1fr;
      grid-auto-rows: auto;

      .stages__slide {
        display: block;
        min-height: 300px;
        padding: 62px 20px 62px 72px;
        background-image: url("/images/stages-item-bg.webp");
        background-repeat: no-repeat;
        background-size: cover;

        &:nth-child(2) {
          .stages__item {
            grid-row: 1;
          }
        }

        &:last-child {
          .stages__item {
            padding-right: 0;
            grid-column: 1;
          }
        }
      }

      .stages__item {
        padding: 0;
        background-image: none;
        font-size: 18px;

        &::before {
          top: 0;
          left: -16px;
          transform: translateX(-100%);
        }

        &:not(:last-child) {
          margin-bottom: 28px;
        }
      }
    }

    .stages__navigation {
      display: flex;
      justify-content: center;
      margin-top: 24px;
      column-gap: 16px;
    }
  }
}

.participants {
  overflow: clip;
  margin-block: 200px 140px;

  .participants__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .slider-nav {
      column-gap: 14px;
    }
  }

  .participants__slider-wrap {
    overflow: hidden;
    margin-top: 60px;
  }

  .participants__slider {
    display: flex;
    column-gap: 20px;
  }

  .participant {
    flex: 0 0 calc((100% - 40px) / 3);
    text-align: center;

    .participant__avatar {
      width: min(320px, 100%);
      margin: 0 auto 28px;
      aspect-ratio: 1;
      object-fit: cover;
    }

    .participant__name,
    .participant__rank,
    .participant__button-more {
      line-height: 120%;
    }

    .participant__name {
      font-size: 24px;
      font-weight: 600;
    }

    .participant__rank {
      margin-block: 6px 20px;
      font-size: 20px;
    }

    .participant__button-more {
      padding: 12px;
      border: 2px solid var(--blue);
      border-radius: 62px;
      line-height: 120%;
      font-weight: 500;
      color: var(--blue);
      transition:
        background-color 0.3s,
        color 0.3s;

      &:hover {
        background-color: var(--blue);
        color: var(--white);
      }
    }
  }

  @media (max-width: 768px) {
    margin-block: 120px 100px;

    .participants__inner {
      display: flex;
      flex-direction: column;
    }

    .participants__header {
      display: contents;

      .slider-nav {
        order: 2;
        justify-content: center;
      }
    }

    .participants__slider-wrap {
      overflow: hidden;
      margin-block: 40px;
    }

    .participants__slider {
      width: 100%;
    }

    .participant {
      flex: 0 0 100%;
      text-align: center;

      .participant__avatar {
        width: 244px;
        height: auto;
      }

      .participant__rank {
        margin-block: 8px 20px;
      }
    }
  }
}

.footer {
  background: var(--beige);

  .footer__inner {
    padding-block: 40px 72px;

    p {
      line-height: 120%;
    }
  }

  @media (max-width: 768px) {
    .footer__inner {
      padding-block: 40px 60px;
    }
  }
}
