*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
}
body {
  min-height: 100vh;
  line-height: 1.15;
}
h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
}
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}
img,
picture {
  max-width: 100%;
  display: block;
}
input,
button,
textarea,
select {
  font: inherit;
}
textarea:not([rows]) {
  min-height: 10em;
}
:target {
  scroll-margin-block: 5ex;
}

:root {
  --text---primary: #fff;
  --text---accent: #f8ff13;
  --button--accent: #f8ff13;
  --text---invert: #000;
}

html {
  font-family: "Rubik", serif;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}
body {
  display: grid;
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: url("img/bg-mob.webp") center no-repeat;
  background-size: cover;

  @media (min-width: 768px) {
    background: url("img/bg-desk.webp") center no-repeat;
    background-size: cover;
  }
}

.logo-wrapper {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  margin-top: 50px;

  @media (min-width: 1024px) {
    padding: 24px 48px;
  }

  img {
    display: block;
    max-height: 20px;

    @media (min-width: 1024px) {
      min-height: 40px;
    }
  }
}

.welcome-text {
  font-weight: 500;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--text---primary);
  padding: 0 24px;

  span {
    font-weight: 700;
    font-size: 32px;
    color: var(--text---accent);

    @media (min-width: 768px) {
      font-size: 44px;
    }
  }

  @media (min-width: 768px) {
    font-size: 32px;
  }
  @media (min-width: 1024px) {
    display: flex;
  }

  &__wrapper {
    @media (min-width: 1024px) {
      margin: auto;
    }
  }
}

.bottom-block {
  position: relative;
  display: grid;
  bottom: 0;
  width: 100%;

  &__shadow-block {
    width: 100%;
    height: 60px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  }

  &__spin {
    display: block;
    position: relative;
    filter: drop-shadow(0 4px 20px rgba(248, 255, 19, 0.8));
    border-radius: 4px;
    padding: 20px 24px;
    width: 250px;
    height: 60px;
    background: var(--button--accent);
    margin: auto;
    border: 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 110%;
    color: var(--text---invert);
    cursor: pointer;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: pulse;
    animation-timing-function: ease-in-out;
    overflow: hidden;
    z-index: 1;
  }

  &__button-wrapper {
    position: relative;
    margin-bottom: 5vh;
  }
}
.girl1,
.girl2 {
  position: absolute;
  bottom: 0;
  height: auto;
}
.girl1 {
  inset-inline-start: 0;
  max-width: 189px;

  @media (min-width: 1024px) {
    max-width: 477px;
  }

  @media (min-width: 1280px) {
    inset-inline-start: 7%;
  }
}
.girl2 {
  bottom: 30px;
  inset-inline-end: 0;
  max-width: 116px;

  @media (min-width: 1024px) {
    max-width: 260px;
    inset-inline-end: 13%;
  }
}
.gifts {
  position: relative;
  z-index: -1;
  width: 250px;
  margin: auto;
  transform: translateY(20px);

  @media (min-width: 1024px) {
    width: 330px;
    z-index: 1;
  }
}

.wheel {
  --_items: 6;
  all: unset;
  transform: translateZ(0);
  margin: auto;
  aspect-ratio: 1 / 1;
  display: grid;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: url(img/stroke.webp) no-repeat center;
  background-size: contain;
  border-radius: 50%;
  position: relative;
  max-width: calc(100% - 10px);
  container-type: inline-size;

  @media (min-width: 360px) {
    max-width: 345px;
  }

  @media (min-width: 768px) {
    max-width: 420px;
  }

  & > * {
    position: absolute;
  }

  &__body {
    filter: drop-shadow(0 0 20px rgba(255, 252, 163, 0.8));
    overflow: hidden;
    padding-top: 15px;
  }
  &__wrapper {
    position: relative;
    max-width: 350px;
    margin: auto;
  }

  &__container {
    all: unset;
    clip-path: inset(13px 14px 14px 14px round 50%);
    display: grid;
    inset: 0;
    place-content: center start;
    z-index: 2;
    background: radial-gradient(50% 50% at 50% 50%, rgb(90, 7, 102) 0%, rgb(100, 17, 113) 100%);
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: wheelStart;
    animation-timing-function: ease-in-out;

    &:before {
      display: block;
      content: "";
      background: radial-gradient(50% 50% at 50% 50%, rgb(255, 255, 255) 81%, rgb(157, 113, 37) 100%);
      position: absolute;
      width: 100%;
      height: 100%;
      mix-blend-mode: multiply;
      z-index: 1;
    }
  }

  &__item {
    align-content: center;
    aspect-ratio: 1 / calc(2 * tan(180deg / var(--_items)));
    color: var(--text---primary);
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
    display: grid;
    grid-area: 1 / -1;
    padding: 0 25px;
    rotate: calc(360deg / var(--_items) * calc(var(--_idx) - 1));
    transform-origin: center right;
    user-select: none;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
    line-height: 110%;
    text-align: center;

    @supports (container-type: inline-size) {
      width: 50cqi;
    }

    @supports not (container-type: inline-size) {
      width: calc(345px / 2);
    }
    font-size: 10px;

    @media (min-width: 320px) {
      font-size: 18px;
    }
    @media (min-width: 768px) {
      padding: 0 40px;
      @supports (container-type: inline-size) {
        width: 50cqi;
      }

      @supports not (container-type: inline-size) {
        width: calc(450px / 2);
      }
    }

    span {
      transform: translateX(-30px) rotate(270deg);
    }

    &:nth-of-type(1) {
      --_idx: 1;
    }
    &:nth-of-type(2) {
      --_idx: 2;
    }
    &:nth-of-type(3) {
      --_idx: 3;
    }
    &:nth-of-type(4) {
      --_idx: 4;
    }
    &:nth-of-type(5) {
      --_idx: 5;
    }
    &:nth-of-type(6) {
      --_idx: 6;
    }
    &:nth-child(odd) {
      background: radial-gradient(50% 50% at 50% 50%, rgb(114, 6, 130) 0%, rgb(129, 21, 144) 100%);
      font-size: 15px;

      @media (min-width: 320px) {
        font-size: 18px;
      }

      @media (min-width: 768px) {
        font-size: 20px;
      }
    }
  }

  &__tongue {
    position: absolute;
    max-width: 37px;
    left: 50%;
    top: -13px;
    z-index: 5;
    transform: translateX(-50%);

    @media (min-width: 768px) {
      width: 30px;
    }
  }

  &__spin-button {
    position: absolute;
    top: calc(50% - 40px);
    inset-inline-start: calc(50% - 40px);
    width: 80px;
    cursor: pointer;
    z-index: 3;
    transform: translateZ(0);
    filter: drop-shadow(0 0 20px rgba(248, 255, 19, 0.8));
    place-self: center;
    background: none;
    border: none;
    padding: 0;
    outline: none;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: pulse;
    animation-timing-function: ease-in-out;

    img {
      @media (min-width: 768px) {
        width: 100px;
      }
    }
  }
}

.modal {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: 100vh;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;

  &::before {
    content: "";
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
  }

  &__box {
    max-width: 300px;
    width: calc(100% - 10px);
    padding: 24px;
    background: radial-gradient(50% 50% at 50% 50%, #5a0766 0%, #641171 100%);
    border: 4px solid var(--button--accent);
    border-radius: 8px;
    text-align: center;
    z-index: 2;

    @media (min-width: 768px) {
      max-width: 500px;
    }
  }

  &__text {
    font-weight: 500;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    color: var(--text---primary);
    margin-bottom: 30px;

    @media (min-width: 768px) {
      font-size: 32px;
      margin-bottom: 24px;
    }

    span {
      display: block;
      margin-bottom: 8px;
    }

    &._st2 {
      margin-bottom: 75px;

      @media (min-width: 1024px) {
        margin-bottom: 35px;
      }

      & > span {
        margin-bottom: 45px;
        @media (min-width: 1024px) {
          margin-bottom: 24px;
        }
      }
    }

    & ._gold {
      font-weight: 700;
      font-size: 24px;
      color: var(--text---accent);

      div {
        font-size: 24px;
        margin-bottom: 24px;

        @media (min-width: 1024px) {
          font-size: 44px;
          margin-bottom: 16px;
        }
      }
      div:last-child {
        margin-bottom: 0;
      }
      div:only-child {
        margin-bottom: 30px;
      }
    }
  }

  &__icon {
    width: 80px;
    margin: 30px auto 56px;
    transform: translateZ(0);
    filter: drop-shadow(0 0 20px rgba(248, 255, 19, 0.8));

    &.win {
      margin: 19px auto;
      width: 138px;
    }
  }

  &__button {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    background: var(--button--accent);
    border: none;
    border-radius: 4px;
    padding: 20px 24px;
    max-width: 250px;
    width: 100%;
    height: 63px;
    font-weight: 700;
    font-size: 18px;
    line-height: 110%;
    color: #000;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: pulse;
    animation-timing-function: ease-in-out;
    overflow: hidden;
    transform: translateZ(0);
    filter: drop-shadow(0 4px 20px rgba(248, 255, 19, 0.8));

    @media (min-width: 768px) {
      font-size: 20px;
    }
  }
}
.content {
  &__link-highlight {
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-name: highlight;
    animation-timing-function: ease-in-out;
    display: flex;
    gap: 20px;
    height: 100%;
    position: absolute;
    right: 0;
    top: -80px;
    transform: translateX(-100%);
    width: 100%;
    z-index: -1;
  }

  &__link-highlight:after,
  &__link-highlight:before {
    background-color: #fff;
    content: "";
    height: 500%;
    opacity: 0.4;
    transform: rotate(45deg);
  }

  &__link-highlight:before {
    width: 40px;
  }

  &__link-highlight:after {
    width: 10px;
  }
}

.hidden {
  display: none;
}

.visuallyhidden {
  opacity: 0;
  z-index: -1;
}

.offer {
  position: fixed;
  width: 100%;
  padding: 4px;
  text-align: center;
  background: #1f0d02;

  &__text {
    font-weight: 500;
    font-size: 10px;
    color: var(--text---primary);
    opacity: 0.6;
  }
  &__timer {
    font-weight: 700;
    font-size: 24px;
    text-transform: uppercase;
    color: var(--text---accent);
  }
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  padding: 12px 20px;
  background: var(--text---invert);
  z-index: 2;

  @media (min-width: 768px) {
    justify-content: center;
  }

  &__text {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 10px;
    color: var(--text---primary);
    opacity: 0.6;
  }
  &__img {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    img {
      max-height: 20px;
    }
  }
}

@keyframes animationSpin {
  0% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(1700deg);
  }
}

@keyframes animationSpinSecond {
  0% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(1590deg);
  }
}
@keyframes pulse {
  0%,
  to {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}
@keyframes wheelStart {
  0%,
  to {
    transform: rotate(10deg);
  }

  50% {
    transform: rotate(-10deg);
  }
}
@keyframes highlight {
  0% {
    transform: translateX(-150%);
  }

  to {
    transform: translateX(150%);
  }
}
