@import url("./fonts.css");

:root {
  --color: #333333;
  --accent-color: #00921d;
  --disabled-color: #33333338;
  --disabled-bg: #f3f5f8;
  --btn-color: #ffffff;
  --btn-bg: linear-gradient(
    91.37deg,
    #ff5300 0.92%,
    #ff5c00 32.17%,
    #ff0000 91.21%
  );
  --btn-bg-hover: linear-gradient(
    91.37deg,
    #ff5300 0.92%,
    #ff0000 32.17%,
    #ff0000 91.21%
  );
  --btn-bg-active: #f96401;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  font-family: "5ka", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 120%;
  color: var(--color);
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

h1 {
  font-weight: 900;
  font-size: 40px;
  line-height: 100%;
}

h2 {
  font-weight: 900;
  font-size: 24px;
  line-height: 120%;
}

button {
  cursor: pointer;
  font-family: inherit;
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}

a {
  text-decoration: none;
  cursor: pointer;
}

section {
  pointer-events: auto;
}

.quiz {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  position: relative;

  display: grid;
  grid-template-rows: 1fr auto;
}
.logo,
.logo2 {
  display: none;
}

.logo__desktop {
  position: static;
  justify-self: end;
  align-self: end;
  width: 110px;
  margin: 0 20px 5px 0;
  opacity: 0.8;
}

.logo img,
.logo2 img,
.logo__desktop img {
  width: 100%;
}
.quiz .background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    -webkit-image-set(
      url("../assets/image/bg.webp") type("image/webp"),
      url("../assets/image/bg.png") type("image/png")
    ),
    linear-gradient(275.48deg, #001808 3.06%, #12482b 95.5%);
  background-image:
    image-set(
      url("../assets/image/bg.webp") type("image/webp"),
      url("../assets/image/bg.png") type("image/png")
    ),
    linear-gradient(275.48deg, #001808 3.06%, #12482b 95.5%);
  background-size: cover;
  background-position: center;
}

.quiz-overlay__blend {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  inset: 0;

  background: linear-gradient(0deg, rgba(0, 63, 3, 0.65), rgba(0, 63, 3, 0.65));
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.quiz-overlay__blend.is-active {
  opacity: 1;
  transition: opacity 0.7s ease;
}
.blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  inset: 0;
  backdrop-filter: blur(7.4px);
  -webkit-backdrop-filter: blur(7.4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.blur.is-active {
  opacity: 1;
  transition: opacity 0.7s ease;
}

.quiz-overlay__blend::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: -webkit-image-set(
    url("../assets/image/texture.webp") type("image/webp"),
    url("../assets/image/texture.png") type("image/png")
  );
  background-image: image-set(
    url("../assets/image/texture.webp") type("image/webp"),
    url("../assets/image/texture.png") type("image/png")
  );
  opacity: 0.7;

  mix-blend-mode: overlay;
  pointer-events: none;
}
.start__screen,
.question__screen,
.result__screen {
  height: 100%;
}

.start__screen {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.start__screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.7s ease;
}

.quiz-start {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
  margin: 14px 10px 50px 10px;
}

.quiz-start__container {
  position: relative;
  padding: 16px;
  background-image: url("../assets/image/start-bg.png");

  background-size: 100% 100%;
  background-repeat: no-repeat;

  background-position: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-start__header {
  background-image: url("../assets/image/start-header.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--btn-color);
  padding: 40px 49px 42px;
  z-index: 2;
}

.quiz-start__content {
  background-image: url("../assets/image/start-content.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 30px 35px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.mobile-hidden {
  display: block;
}

.button {
  z-index: 3;
  width: 100%;
  flex-shrink: 0;
  max-width: 600px;
  height: 96px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("../assets/image/btn-default.png");

  color: var(--btn-color);
  font-family: inherit;
  font-weight: 600;
  font-size: 18px;
  line-height: 120%;
  cursor: pointer;
}
.button:disabled {
  background-image: url("../assets/image/btn-disabled.png");
  color: var(--disabled-color);
  cursor: default;
}
.question__screen {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.question__screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.7s ease;
}
.question__screen-content {
  margin-bottom: 30px;
}
.quiz-question {
  margin: 15px 10px 0;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.quiz-question__content {
  position: relative;
  background-image: url("../assets/image/question-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 34px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.quiz-question__title,
.quiz-question__answers {
  z-index: 2;
}
.quiz-header {
  color: var(--btn-color);
  text-align: center;
  text-wrap: nowrap;
  margin-bottom: 40px;
  margin-top: 20px;
  z-index: 2;
}
.quiz-question__answers {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: column;
  gap: 7px;
}

.answer-btn {
  background-image: url("../assets/image/answer-btn.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color);
  font-weight: inherit;
  font-size: inherit;
  line-height: 100%;

  padding: 21px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  overflow: hidden;
}

.answer-btn_active {
  background-image: url("../assets/image/answer-btn-active.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--btn-color);
}

.answer-btn__num {
  height: 100%;
  background-color: var(--btn-color);
  border-radius: 123px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 24px;
  line-height: 120%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-btn__text {
  text-align: start;
  padding: 5px 0;
}

.result__screen {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.result__screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.7s ease;
}

.quis-result {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
  margin-bottom: 10px;
}
.quis-result-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 15px;
}
.quis-result .quiz-header {
  margin-top: 40px;
}
.quiz-result-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  position: relative;
}

.quiz-result-content {
  background-image: url("../assets/image/result-bg.png");

  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;

  display: flex;
  flex-direction: column;
  padding: 28px 42px;
  gap: 2px;
}

.quiz-result-title {
  color: var(--btn-color);
  font-weight: 900;
  font-size: 60px;
  line-height: 120%;
}

.quiz-result-text {
  color: var(--btn-color);
  font-weight: 400;
  line-height: 120%;
}

.quiz-result-role-wrapper {
  background-image: url("../assets/image/role-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 19px 24px;
  margin: 15px 0;
}
.quiz__picture {
  max-width: 700px;
  margin-left: -100px;
  position: relative;
}
.quiz-result-img {
  width: 100%;
  height: 100%;
}

/* === @MEDIA === */
@media (max-width: 1200px) {
  .quiz__picture {
    width: 50%;
    margin-left: -80px;
    position: relative;
  }
}
@media (max-width: 1000px) {
  .quiz-result-title {
    font-size: 45px;
  }
  .quiz-result-text {
    font-size: 18px;
  }
  .quiz-result-role-wrapper h2 {
    font-size: 22px;
  }
  .quiz-result-role {
    font-size: 18px;
  }
  .quiz-result-container {
    width: 62%;
  }
}
@media (max-width: 900px) {
  .answer-btn__text {
    font-size: 18px;
  }
}
@media (max-width: 768px) {
  .quiz {
    background: none;
  }
  .quiz .background {
    background-image: -webkit-image-set(
      url("../assets/image/bg-mobile.webp") type("image/webp"),
      url("../assets/image/bg-mobile.png") type("image/png")
    );
    background-image: image-set(
      url("../assets/image/bg-mobile.webp") type("image/webp"),
      url("../assets/image/bg-mobile.png") type("image/png")
    );
    position: fixed;
    top: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.5);
    transition: transform 0.9s ease-out;
    will-change: transform;
    pointer-events: none;
  }

  .quiz.isStart .background {
    transform: scale(1);
  }

  .quiz-overlay__blend::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 324px;
    left: 0;
    bottom: 0;
    background: linear-gradient(
      180deg,
      rgba(0, 29, 21, 0) 0%,
      rgba(0, 29, 21, 0.83) 100%
    );
    mix-blend-mode: soft-light;
  }

  .quiz-question__answers {
    grid-template-rows: repeat(4, 1fr);
    grid-template-columns: repeat(1, 1fr);
    grid-auto-flow: column;
    gap: 7px;
  }
  .mobile-hidden {
    display: none;
  }

  .start__screen {
    align-items: self-start;
  }
  .quiz-start .button {
    position: fixed;
    bottom: 40px;
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
  }
  .quiz-start__container {
    position: relative;
    padding: 16px;
  }
  .quiz-question__content {
    background-image: url("../assets/image/question-bg-m.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
  }

  .logo {
    display: block;
    position: fixed;
    width: 110px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 69px;
    z-index: 0;
    opacity: 0.8;
  }
  .logo2 {
    display: block;
    opacity: 0.8;
  }
  .logo__desktop {
    display: none;
  }
  .quis-result-box {
    flex-direction: column-reverse;
    padding-bottom: 30px;
  }
  .quiz-result-container {
    width: 100%;
    z-index: 2;
  }
  .quiz__picture {
    width: 85%;
    margin-left: 0;
    margin-bottom: -25%;
  }
  .quis-result .quiz-header {
    margin-top: 20px;
    margin-bottom: 25px;
  }
  .quiz-start__header {
    padding: 30px 40px 35px;
  }
}
@media (max-width: 550px) {
  .quiz-header {
    font-size: 30px !important;
  }
  .quiz-question__title {
    font-size: 18px !important;
  }
  .answer-btn__text {
    font-size: 16px;
  }
  .quiz-question__content {
    padding: 22px 28px 22px;
  }
  .quiz-header {
    margin-bottom: 25px;
  }
  .logo2 {
    width: 110px;
  }
  ё .answer-btn {
    padding: 16px;
  }
  .quiz-result-title {
    font-size: 36px;
  }
  .quiz-result-text {
    font-size: 16px;
  }
  .quiz-result-role-wrapper h2 {
    font-size: 20px;
  }
  .quiz-result-role-wrapper {
    font-size: 14px 22px;
  }
  .quiz-result-role {
    font-size: 16px;
    line-height: 120%;
  }
  .quiz-result-container .buttomn {
    height: 85px;
  }
  .quiz-start__content {
    padding: 20px 25px;
    gap: 8px;
  }
}
@media (max-width: 475px) {
  .quiz-start__header {
    padding: 25px 30px 25px;
  }
  .quiz-start__header h1 {
    font-size: 30px;
  }

  .quiz-start__content h2 {
    font-size: 20px;
  }
  .quiz-start__content p {
    font-size: 18px;
  }
  .button {
    height: 75px;
  }
  .quiz-result-content {
    padding: 25px 30px;
  }
  .quiz-result-role-wrapper {
    padding: 12px 24px;
  }
}
@media (max-width: 440px) {
  .answer-btn__text {
    padding: 3px 0;
  }
  .quiz-start__container {
    padding: 11px;
  }
  .quiz-start__header {
    padding: 16px 25px 16px;
  }
  .quiz-start__header h1 {
    font-size: 28px;
  }
  .quiz-start__content {
    padding: 16px 20px;
    gap: 12px;
  }
  .quiz-start__content h2 {
    font-size: 16px;
  }
  .quiz-start__content p {
    font-size: 14px;
    line-height: 130%;
  }
  .button {
    height: 75px;
  }
  .quiz-question__title {
    font-size: 16px !important;
  }
  .answer-btn__text {
    font-size: 14px;
  }
  .answer-btn {
    padding: 10px 12px;
  }
  .quiz-header {
    font-size: 24px !important;
  }
  .quiz-result-title {
    font-size: 32px;
  }
  .quiz-result-role-wrapper h2 {
    font-size: 16px;
  }
  .quiz-result-text,
  .quiz-result-role {
    font-size: 14px;
  }
  .quiz-result-content {
    padding: 20px 25px;
  }
}

@media (min-width: 768px) {
  .answer-btn:hover {
    background-image: url("../assets/image/answer-btn-active.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--btn-color);
  }
}

button,
a,
.answer-btn,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

button:focus,
a:focus,
.answer-btn:focus {
  outline: none;
}
.hidden {
  display: none;
  opacity: 0;
}

.visible {
  opacity: 1;
}
.question__screen,
.result__screen,
.quis-result {
  justify-content: safe center;
}
.glyphs {
  font-feature-settings: "ss02";
}

.accent-text {
  color: var(--accent-color);
}

.bold-text {
  font-weight: 600;
}
