:root {
  --ink: #080808;
  --paper: #fff;
  --red: #ff0707;
  --green: #2dbd08;
  --dark-footer: #242424;
  --soft-shadow: 0 5px 3px rgb(0 0 0 / 24%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

.hidden {
  display: none !important;
}

.visible {
  display: block;
}

.landing-shell {
  width: min(100%, 1024px);
  min-height: 100svh;
  margin-inline: auto;
  background: var(--paper);
}

.expiry-bar {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 7px 16px;
  background: #000;
  color: #fff;
  font-size: clamp(22px, 3.1vw, 31px);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.landing-main {
  padding: 18px 42px 25px;
}

.price-line {
  margin: 0 0 42px;
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.game-status {
  width: fit-content;
  margin: -25px auto 20px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef8e9;
  color: #247e0b;
  font-size: 14px;
  font-weight: 800;
}

.gift-stage {
  position: relative;
  width: min(100%, 910px);
  margin-inline: auto;
}

.gift-main,
.detail-lens,
.final-gift {
  background-image: url("./gift-card-reference.png");
  background-image: image-set(
    url("./gift-card-reference-v2.webp") type("image/webp"),
    url("./gift-card-reference.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-color: #fff;
}

.gift-main {
  width: 54%;
  aspect-ratio: 885 / 672;
  margin-inline: auto;
  border-radius: 14px;
  background-size: 196.3% 210.6%;
  background-position: 48.8% 20.7%;
  box-shadow: 0 3px 9px rgb(0 0 0 / 12%);
  transition: transform 140ms ease-out;
}

.detail-lens {
  position: absolute;
  top: 17%;
  width: 25%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 28%);
}

.detail-lens--front {
  left: 0;
  background-size: 402% 327.5%;
  background-position: 2.3% 27.8%;
}

.detail-lens--back {
  right: 0;
  background-size: 402% 327.5%;
  background-position: 97.5% 27.8%;
}

.question-block {
  margin: 42px auto 0;
  text-align: center;
}

.question-block h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 500;
  line-height: 1.15;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 176px));
  justify-content: center;
  gap: 26px;
  margin-top: 15px;
}

.choice {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: clamp(20px, 2.5vw, 27px);
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 2px 2px rgb(0 0 0 / 28%);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.choice--no {
  background: var(--red);
}

.choice--yes {
  background: var(--green);
  transform-origin: center;
  animation: yes-attention 1.8s ease-in-out infinite;
}

.choice--yes:hover,
.choice--yes:focus-visible,
.choice--yes:active {
  animation: none;
}

.choice:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.choice:active {
  transform: translateY(2px);
  box-shadow: 0 2px 2px rgb(0 0 0 / 20%);
}

.description {
  width: min(100%, 580px);
  margin: 40px auto 0;
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.13;
  text-align: center;
}

.legal-footer {
  position: relative;
  min-height: 155px;
  padding: 20px 110px 16px;
  overflow: hidden;
  background: var(--dark-footer);
  color: #fff;
  text-align: center;
}

.legal-footer::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: 25px;
  width: 43px;
  aspect-ratio: 1;
  background: #b7b7b7;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}

.legal-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 15px;
}

.legal-link {
  color: inherit;
  font-size: 12px;
  text-decoration: none;
}

.legal-footer p {
  width: min(100%, 570px);
  margin: 0 auto;
  font-size: 9px;
  line-height: 1.08;
}

.game {
  min-height: 100svh;
}

.game.blur {
  filter: none;
  pointer-events: none;
  user-select: none;
}

.game__main__image-rotate-1 {
  transform: rotate(-1.25deg) scale(1.012);
}

.game__main__image-rotate-2 {
  transform: rotate(1.25deg) scale(1.012);
}

.game__main__bonus-container {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.game__main__bonus-value {
  position: absolute;
  color: #168700;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
  text-shadow: 0 1px 2px #fff;
  animation: bonus-rise 900ms ease-out forwards;
}

.game__progress {
  width: min(100%, 382px);
  height: 8px;
  margin: 26px auto 0;
  border-radius: 999px;
  background: #ddd;
}

.game__progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 1s linear;
}

.game__progress__text {
  margin: 7px 0 0;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background: #fff;
}

.modal__window {
  width: 100%;
  min-height: 100%;
}

.game-final-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  background: #fff;
}

.game-final-screen.visible {
  display: block;
}

body:has(.game-final-screen.visible) {
  overflow: hidden;
}

.final-layout {
  display: flex;
  flex-direction: column;
}

.final-main {
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  padding-block: 42px;
  text-align: center;
}

.final-kicker {
  margin: 0 0 8px;
  color: #238600;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.final-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.game__header__text {
  margin: 12px 0 0;
  font-size: 17px;
}

.final-gift {
  width: min(86vw, 440px);
  aspect-ratio: 885 / 672;
  margin: 30px auto;
  border-radius: 14px;
  background-size: 196.3% 210.6%;
  background-position: 48.8% 20.7%;
  box-shadow: 0 5px 16px rgb(0 0 0 / 16%);
}

.final-button {
  width: min(86vw, 390px);
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.compact-footer {
  min-height: 105px;
}

@keyframes yes-attention {
  0%,
  72%,
  100% {
    transform: translateX(0) rotate(0);
  }

  76% {
    transform: translateX(-7px) rotate(-2deg);
  }

  80% {
    transform: translateX(7px) rotate(2deg);
  }

  84% {
    transform: translateX(-5px) rotate(-1.3deg);
  }

  88% {
    transform: translateX(5px) rotate(1.3deg);
  }

  92% {
    transform: translateX(0) rotate(0);
  }
}

@keyframes bonus-rise {
  from { opacity: 1; transform: translateY(0) scale(0.8); }
  to { opacity: 0; transform: translateY(-45px) scale(1.15); }
}

@media (max-width: 640px) {
  .expiry-bar {
    min-height: 44px;
    font-size: 19px;
  }

  .landing-main {
    padding: 18px 16px 28px;
  }

  .price-line {
    margin-bottom: 30px;
    font-size: 22px;
  }

  .gift-main {
    width: 60%;
  }

  .detail-lens {
    top: 17%;
    width: 29%;
  }

  .question-block {
    margin-top: 30px;
  }

  .question-block h1 {
    font-size: 23px;
  }

  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    width: min(100%, 360px);
  }

  .choice {
    min-height: 52px;
    font-size: 22px;
  }

  .description {
    margin-top: 34px;
    font-size: 14px;
    line-height: 1.2;
  }

  .legal-footer {
    min-height: 175px;
    padding: 20px 46px 18px 18px;
  }

  .legal-footer::after {
    right: 13px;
    bottom: 20px;
    width: 30px;
  }

  .legal-footer p {
    font-size: 8px;
    line-height: 1.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .choice--yes {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
