:root {
  --c-bg: #ededed;
  --c-surface: #f6f4f2;
  --c-card: #fbfbfb;
  --c-ink: #0d0d0d;
  --c-ink-mute: #6b6863;
  --c-accent: #13c980;
  --c-accent-d: #009e5c;
  --c-border: #d9d9d9;
  --c-border-s: rgba(13, 13, 13, 0.18);
  --ff-display: 'Orbitron', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.25);
}

html,
body {
  height: 100%;
  font-family: var(--ff-display);
  background: var(--c-bg);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── QUIZ WRAPPER ─────────────────────────────────────── */
.quiz {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;

  &::after,
  &::before {
    content: '';
    position: absolute;
    top: 84px;
    width: 100dvw;
    height: 2px;
    background-color: #d9d9d9;
    z-index: 1;
  }

  &::after {
    top: 0;
    left: 84px;
    width: 2px;
    height: 100%;
  }

  .quiz__line {
    position: absolute;
    top: 0;
    right: 84px;
    width: 2px;
    height: 100%;
    background-color: #d9d9d9;
    z-index: 1;

    &.quiz__line--footer {
      display: none;
    }
  }
}
.side-decor {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 3;
  color: var(--c-accent);

  &.side-decor--right {
    right: 118px;
    top: 118px;
  }
  &.side-decor--left {
    left: 118px;
    bottom: 118px;
  }
}
.cross {
  position: relative;
  width: 22px;
  height: 22px;
  opacity: 1;

  &::after,
  &::before {
    content: '';
    position: absolute;
    inset: 50% auto auto 50%;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform-origin: center;
    translate: -50% -50%;
  }

  &::before {
    rotate: 45deg;
  }

  &::after {
    rotate: -45deg;
  }
}

.dot {
  border-radius: 50%;
  background: currentColor;
  opacity: 1;

  &.dot--md {
    width: 10px;
    height: 10px;
  }
  &.dot--sm {
    width: 8px;
    height: 8px;
  }
  &.dot--xs {
    width: 6px;
    height: 6px;
  }
}

.clipped-shape {
  --cut-size-x: 30px;
  --cut-size-y: 22px;
  clip-path: polygon(
    var(--cut-size-x) 0%,
    100% 0%,
    100% calc(100% - var(--cut-size-y)),
    calc(100% - var(--cut-size-x)) 100%,
    0% 100%,
    0% var(--cut-size-y)
  );
}

.button {
  color: #000;
  font-weight: 600;
  padding: 8px 65px;
  text-transform: uppercase;
  display: block;
  box-shadow: var(--box-shadow);
  transition: 0.3s;
}

.button-green {
  background: var(--c-accent);

  &:hover {
    background: #fff;
  }
}

.button-white {
  background: #fff;

  &:hover {
    background: var(--c-accent);
  }
}

.button-border {
  display: flex;
  justify-content: center;
  background: var(--c-accent);
  padding: 3px;
  filter: drop-shadow(var(--box-shadow));
  cursor: pointer;
  transition: 0.3s;
}

/* ── SCREEN BASE ──────────────────────────────────────── */
.quiz__screen {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  opacity: 0;
  padding-top: 85px;
  pointer-events: none;
  transform: translateX(40px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
  will-change: transform, opacity;
}
.quiz__screen[aria-hidden='false'] {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.quiz__screen[data-exiting] {
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
}

/* ── FOOTER ───────────────────────────────────────────── */
.quiz__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 94px;
  border-top: 2px solid var(--c-border);
  font-size: 16px;
  font-weight: 500;
}

.quiz__footer__link {
  color: var(--c-accent);
  text-decoration: underline;
}

.quiz__footer__copy {
  strong {
    color: var(--c-accent);
  }
}

/* ── LANDING ──────────────────────────────────────────── */
.landing__body {
  display: flex;
  padding: 33px 118px;
  align-items: start;
  overflow: hidden;
  background-image: url('../img/photo1.webp');
  background-size: 60%;
  background-position: right bottom;
  background-repeat: no-repeat;
}
.landing__visual {
  display: none;
}
.landing__content {
  display: flex;
  flex-direction: column;
  max-width: 751px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}
.landing__h1 {
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 800;
  line-height: normal;
  text-transform: uppercase;
  color: var(--c-ink);
  margin-bottom: 16px;
  text-wrap: balance;
}
.landing__h1 mark {
  background: none;
  color: var(--c-accent);
  position: relative;
}
.landing__lead {
  font-size: 22px;
  font-weight: 400;
  line-height: normal;
  color: #000;
  margin-bottom: 8px;
  max-width: 504px;
  text-transform: capitalize;
}
.landing__lead strong {
  font-weight: 500;
}
.landing__note {
  font-size: 22px;
  color: #000;
  margin-bottom: 32px;
}

.landing__cta {
  max-width: 260px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.landing__stats {
  display: flex;
  gap: 24px;
  margin-top: 28px;
}

.landing__stat-num {
  font-size: 26px;
  color: var(--c-ink);
  line-height: 1;
}
.landing__stat-num span {
  color: var(--c-accent);
}
.landing__stat-label {
  font-size: 10px;
  color: var(--c-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── QUESTION ─────────────────────────────────────────── */
.question__body {
  display: flex;
  flex-direction: column;
  padding: 33px 118px 60px;
  justify-content: space-between;
  gap: 40px;
  overflow: auto;
}
.question__left {
  display: flex;
  width: 100%;
  justify-content: space-between;
}
.question__progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  font-size: 26px;
  font-weight: 500;
  line-height: normal;
  text-transform: uppercase;
}
.question__progress-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #000;
  flex-shrink: 0;
}
.question__progress-of {
  color: #6b6b6b;
}
.question__progress-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--c-border);
  border-radius: 100px;
  overflow: hidden;
  max-width: 420px;
}
.question__progress-bar {
  height: 100%;
  background: var(--c-accent);
  border-radius: 100px;
  transition: width 0.5s var(--ease-out);
}

.question__h2 {
  font-size: clamp(26px, 3.2vw, 52px);
  text-transform: uppercase;
}
.question__h2 em {
  font-style: normal;
  color: var(--c-accent);
}
.question__options-wrap {
  max-width: 575px;
  width: 100%;
}
.question__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 575px;
}

.question__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-card);
  border: 1px solid #e6e6e7;
  border-radius: 24px;
  padding: 30px 24px;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.18s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;

  &:hover {
    transform: translateX(3px);

    .question__option__arrow {
      transform: translateX(3px);
    }

    .question__option__radio {
      &::after {
        opacity: 1;
        transform: scale(1);
        background-color: var(--c-accent);
      }
    }
  }
}

.question__option--selected {
  border-color: #e6e6e7;
  background: var(--c-accent);

  .question__option__arrow {
    color: #fff;
  }

  .question__option__radio {
    &::after {
      opacity: 1;
      transform: scale(1);
      background-color: var(--c-accent);
    }
  }
}
.question__option__inner {
  display: flex;
  align-items: center;
  gap: 30px;
}
.question__option__radio {
  position: relative;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid #7e7d7e;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition:
    border-color 0.18s,
    background 0.18s;

  &::after {
    content: '';
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transform: scale(0);
    transition:
      opacity 0.18s,
      transform 0.22s var(--ease-spring);
  }
}

.question__option__text {
  color: #000;
  font-size: 32px;
  font-weight: 500;
  text-align: start;
}
.question__option__arrow {
  color: var(--c-accent);
  transition: transform 0.18s;
  flex-shrink: 0;
}

.question__social {
  margin-top: 16px;
  color: #6b6b6b;
  font-size: 16px;
  font-weight: 500;
}

.question__right {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  background-image: url(../img/bg-icon.webp);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.question__photo {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
  animation: float 3.5s ease-in-out infinite;
}

/* ── SUMMARY ──────────────────────────────────────────── */
.summary__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 33px 118px 68px;
  position: relative;
  z-index: 2;
  overflow: auto;
  background-image: url('../img/bg-icon.webp');
  background-position: center 100%;
  background-repeat: no-repeat;
  background-attachment: local;
}
.summary__heading {
  font-size: clamp(36px, 5vw, 64px);
  text-transform: uppercase;
  font-weight: 800;
  text-align: center;
  margin-bottom: 184px;
}
.summary__heading mark {
  background: none;
  color: var(--c-accent);
}
.summary__trophies {
  margin-top: -134px;
  animation: trophyIn 0.6s var(--ease-spring) both;
  z-index: 1;
}
@keyframes trophyIn {
  from {
    transform: scale(0.5) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.summary__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  border: 1px solid #e6e6e7;
  background: #fff;
  box-shadow: 0 6px 34px 0 rgba(0, 0, 0, 0.15);
  padding: 20px 94px;
  text-align: center;
  max-width: 780px;
  width: 100%;
  animation: cardIn 0.5s 0.2s var(--ease-out) both;
}

@keyframes cardIn {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.summary__card__heading {
  font-size: clamp(32px, 2.5vw, 38px);
  text-transform: uppercase;
  margin-block: 20px 8px;

  mark {
    background: none;
    color: var(--c-accent);
  }
}

.summary__card__desc {
  color: #000;
  text-align: center;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 30px;
}
.summary__card__btn {
  display: inline-block;
  max-width: 320px;
  width: 100%;
  padding: 5px;
  text-align: center;
}

.summary__card__note {
  color: #6b6b6b;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  margin-top: 28px;
}

/* ── CONFETTI ─────────────────────────────────────────── */
.confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (width < 992px) {
  .quiz {
    &::before {
      top: 12px;
    }
    &::after {
      left: 12px;
    }
    .quiz__line {
      right: 12px;

      &.quiz__line--footer {
        display: block;
        top: 98%;
        right: 0;
        width: 100dvw;
        height: 2px;
        background-color: #d9d9d9;
      }
    }
  }
  .side-decor {
    flex-direction: row;
    &.side-decor--right {
      right: 25px;
      top: 25px;
    }
    &.side-decor--left {
      left: 25px;
      bottom: 25px;
    }
    &.summary__side-decor--left {
      top: 25px;
      bottom: unset;
    }
  }
  .quiz__screen {
    padding-top: 12px;
  }
  .landing__footer {
    display: none;
  }
  .landing__body {
    padding: 28px 20px;
    background-image: none;
  }
  .landing__content {
    height: 100%;
    max-width: 100%;
    justify-content: center;
  }
  .landing__visual {
    display: flex;
    justify-content: center;
    margin-bottom: 34px;
  }

  .landing__cta {
    align-self: center;
  }
  .landing__lead {
    max-width: 100%;
  }
  .question__body {
    padding: 8px 20px;
    gap: 10px;
  }
  .question__left {
    flex-direction: column-reverse;
  }
  .question__right {
    justify-content: flex-start;
    max-width: 345px;
  }
  .question__option {
    padding: 20px 12px;
  }
  .question__progress-wrap {
    font-size: 20px;
    margin-bottom: 20px;
  }
  .question__progress-badge {
    width: 40px;
    height: 40px;
  }
  .question__option__inner {
    gap: 16px;
  }
  .question__option__text {
    font-size: 18px;
  }
  .quiz__footer {
    border-top: none;
    padding: 20px;
  }
  .quiz__footer__copy {
    display: none;
  }
  .question__option__radio {
    width: 24px;
    height: 24px;

    &::after {
      content: '';
      width: 18px;
      height: 18px;
    }
  }
  .summary__body {
    padding: 62px 25px 92px;
  }
  .summary__heading {
    margin-bottom: 100px;
  }
  .summary__card {
    padding: 20px;
  }
  .summary__card__desc {
    font-size: 15px;
    margin-bottom: 46px;
  }
  .summary__card__note {
    font-size: 12px;
    margin-top: 46px;
  }
  .button-white {
    padding: 8px 40px;
  }
  .summary__trophies {
    margin-top: -67px;
  }
  .summary__card__heading {
    margin-block: 10px 12px;
  }
}

@media (width < 768px) {
  .landing__lead {
    font-size: 16px;
    margin-bottom: 6px;
  }
  .landing__note {
    font-size: 14px;
  }
  .side-decor {
    gap: 10px;
  }
  .cross {
    width: 16px;
    height: 16px;
  }
  .dot {
    &.dot--md {
      width: 8px;
      height: 8px;
    }
    &.dot--sm {
      width: 6px;
      height: 6px;
    }
    &.dot--xs {
      width: 4px;
      height: 4px;
    }
  }
  .question__progress-bar-wrap {
    max-width: 180px;
  }
}

/* ── FOCUS / A11Y ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── LOADING REVEAL ───────────────────────────────────── */
.quiz__screen[aria-hidden='false'] .landing__tag,
.quiz__screen[aria-hidden='false'] .landing__h1,
.quiz__screen[aria-hidden='false'] .landing__lead,
.quiz__screen[aria-hidden='false'] .landing__note,
.quiz__screen[aria-hidden='false'] .landing__cta,
.quiz__screen[aria-hidden='false'] .landing__stats {
  animation: fadeUp 0.5s var(--ease-out) both;
}
.quiz__screen[aria-hidden='false'] .landing__h1 {
  animation-delay: 0.05s;
}
.quiz__screen[aria-hidden='false'] .landing__lead {
  animation-delay: 0.1s;
}
.quiz__screen[aria-hidden='false'] .landing__note {
  animation-delay: 0.15s;
}
.quiz__screen[aria-hidden='false'] .landing__cta {
  animation-delay: 0.2s;
}
.quiz__screen[aria-hidden='false'] .landing__stats {
  animation-delay: 0.25s;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
