@font-face {
  font-family: "Anderson Helvetica Light";
  src: local("Helvetica Light"), local("Helvetica-Light"), local("Helvetica Neue Light"), local("HelveticaNeue-Light");
  font-style: normal;
  font-weight: 300;
}

:root {
  --card-ink: #781f25;
  color-scheme: light;
  font-family: "Anderson Helvetica Light", Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  background: #541b1f;
  color: #6c111a;
}

* { box-sizing: border-box; }
h1, h2, strong { font-weight: inherit; }
code { font-family: inherit; font-weight: inherit; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #ead8c5;
}

.scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  width: min(100%, max(390px, 56.28svh), 530px);
  aspect-ratio: 941 / 1672;
  background: radial-gradient(ellipse at 50% 56%, #fffaf1, #f4e2ce 80%);
  box-shadow: 0 12px 60px #5d2c2720;
}

.chest-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.intro {
  position: absolute;
  inset: 10.8% 9% auto;
  z-index: 3;
  text-align: center;
  color: var(--card-ink);
  pointer-events: none;
}
.scenery { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scenery-sun, .scenery-stars > *, .scenery-ribbon {
  transform-box: fill-box;
  transform-origin: center;
}
.scenery-sun { animation: sun-breathe 8s ease-in-out infinite; }
.scenery-ribbon { animation: ribbon-float 5.8s ease-in-out infinite; }
.scenery-ribbon-right { animation-delay: -2.2s; animation-direction: reverse; }
.scenery-stars > * { animation: star-twinkle 3.8s ease-in-out infinite; }
.scenery-stars > :nth-child(3n + 1) { animation-delay: -1.15s; }
.scenery-stars > :nth-child(3n + 2) { animation-delay: -2.4s; }
.brand-logo {
  position: relative;
  display: block;
  width: 34cqw;
  aspect-ratio: 5.45;
  margin: 0 auto 5cqw;
  overflow: hidden;
}
.brand-logo img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 133%;
  height: auto;
  transform: translate(-50%, -50%);
}
.intro h1 {
  margin: 0;
  font-size: clamp(28px, 9.3cqw, 48px);
  line-height: 1.02;
  text-wrap: balance;
}
.scene:not([data-state="ready"]) .intro { visibility: hidden; }

button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #fff8db; outline-offset: 4px; }
.chest, .terms {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
.chest { z-index: 3; inset: 40% 12% 29%; border-radius: 26%; }
.chest:focus-visible, .chest-slider input:focus-visible { outline: 2px solid var(--card-ink); outline-offset: 4px; }
.chest-slider { inset: 78.55% 14.8% 12.2%; border-radius: 100px; }
.chest-slider {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--card-ink);
  font-size: clamp(12px, 3.3cqw, 18px);
  background: linear-gradient(#fff4df, #f6d4a6);
  box-shadow: 0 3px 12px #40111730;
  overflow: hidden;
}
.slider-fill {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #ffdb92, #efab54);
  transform: scaleX(var(--charge, 0));
  transform-origin: left;
}
.chest-slider span { position: relative; padding: 0 11cqw; text-align: center; }
.chest-slider input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  border-radius: inherit;
  touch-action: none;
  cursor: ew-resize;
}
.chest-slider input::-webkit-slider-thumb {
  appearance: none;
  width: 10cqw;
  height: 10cqw;
  margin: 0;
  border: 2px solid #ffe5ac;
  border-radius: 50%;
  background: #781f25 center / 50% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13m-5-5 5 5-5 5' fill='none' stroke='%23fff4df' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 2px 5px #40111755;
}
.chest-slider input::-moz-range-thumb {
  width: 10cqw;
  height: 10cqw;
  border: 2px solid #ffe5ac;
  border-radius: 50%;
  background: #781f25 center / 50% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13m-5-5 5 5-5 5' fill='none' stroke='%23fff4df' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.scene:not([data-state="ready"]) .chest-slider { display: none; }
.terms { inset: 90% 27% 4.5%; border-radius: 12px; font-size: clamp(12px, 3.5cqw, 18px); }
.scene[data-state="opening"] .terms { visibility: hidden; }
.terms { color: var(--card-ink); text-decoration: underline; text-underline-offset: .2em; }
.scene:not([data-state="ready"]) .chest { pointer-events: none; }

.result {
  position: absolute;
  z-index: 2;
  inset: 16.5% 10% auto;
  padding: 1px;
  border-radius: clamp(15px, 5cqw, 25px);
  background: #fff5d6;
  border: 1px solid #ad3e39;
  box-shadow: 0 5cqw 15cqw #3c0c13a0;
  color: var(--card-ink);
  text-align: center;
}
.result[hidden] { display: none; }
.scene:not([data-state="ready"])::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 45%, #fff8e8, #f3dfbd);
  pointer-events: none;
}
.scene[data-state="opening"]:not([data-burst])::after { opacity: 0; }
.scene[data-state="opening"][data-burst]::after { animation: change-scene 510ms ease both; }
.reveal-heading {
  position: absolute;
  z-index: 2;
  top: 5.6%;
  inset-inline: 0;
  margin: 0;
  opacity: 0;
  text-align: center;
  color: var(--card-ink);
  font-size: clamp(23px, 8cqw, 42px);
  pointer-events: none;
}
.scene[data-state="opening"][data-burst] .reveal-heading { animation: reveal-prize 480ms 490ms ease-out both; }
.scene[data-state="revealed"] .reveal-heading { opacity: 1; }
.terms { z-index: 3; }
.prize-card {
  display: grid;
  perspective: 950px;
  margin: 3px 3px 0;
}
.card-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border-radius: clamp(12px, 4cqw, 21px);
  backface-visibility: hidden;
  transition: transform 540ms cubic-bezier(.22,.7,.28,1);
}
.card-brand {
  width: 28cqw;
  margin: 4cqw auto 0;
}
.card-illustration {
  position: relative;
  width: 90%;
  margin: auto;
  aspect-ratio: 640 / 371;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 3% 97%, transparent),
              linear-gradient(90deg, transparent, #000 12% 88%, transparent);
  mask-composite: intersect;
}
.front-art {
  position: absolute;
  top: -20.75%;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}
.card-title {
  margin: auto 0;
  padding: 1.6cqw 4.5cqw 4cqw;
  font-size: clamp(17px, 5.1cqw, 27px);
  line-height: 1.15;
  text-wrap: balance;
}
.card-conditions {
  margin: auto 0;
  padding: 3cqw 4.5cqw;
  font-size: clamp(13px, 3.95cqw, 21px);
  line-height: 1.34;
}
.front-face { transform: rotateY(0); }
.back-face { transform: rotateY(-180deg); }
.prize-card[data-side="back"] .front-face { transform: rotateY(180deg); }
.prize-card[data-side="back"] .back-face { transform: rotateY(0); }
.promo-details { padding: 0 12% 3px; }
.promo-details p { margin: 0 0 5px; font-size: clamp(13px, 3.65cqw, 18px); }
.promo-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  border: 1px solid #b8674b;
  border-radius: 9px;
  background: #fff7e1;
}
.promo-code { user-select: all; font-size: clamp(15px, 4.5cqw, 23px); letter-spacing: .045em; }
.copy-code {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}
.copy-code svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.copy-code:active { background: #efd2a5; }
.copy-code:focus-visible, .flip:focus-visible { outline-color: #781f25; outline-offset: 2px; }
.promo-details .copy-status { margin: 3px 0 0; min-height: 16px; font-size: 12px; }
.prize-footer { display: grid; justify-items: center; gap: 6px; padding: 2px 8px 12px; }
.flip {
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid #a54d40;
  border-radius: 999px;
  background: #fff6dc;
  color: inherit;
  font-size: clamp(14px, 4cqw, 20px);
}
.demo-caption { font-size: 12px; }
.scene[data-state="opening"]:not([data-burst]) .result.fly { opacity: 0; }
.scene[data-burst] .result.fly { animation: coupon-pop 520ms 590ms cubic-bezier(.2,.68,.34,1) both; }
.scene[data-burst] .result.fly::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 37%, #fff9e4 49%, transparent 62%);
  background-size: 230% 100%;
  animation: coupon-glint 820ms 725ms ease-in-out both;
}

.rules {
  width: min(calc(100% - 32px), 375px);
  padding: 24px;
  border: 1px solid #d59d60;
  border-radius: 20px;
  background: #fff1db;
  color: #6c111a;
}
.rules::backdrop { background: #320b10a8; }
.rules h2 { margin: 0; }
.rules p { line-height: 1.45; }
.rules-note { font-size: .875rem; }
.rules button { background: #781f25; color: #fff5de; padding: 11px 18px; border: 0; border-radius: 50px; }
.rules button:focus-visible { outline-color: #781f25; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes change-scene { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal-prize { from { opacity: 0; transform: translateY(2cqw) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes coupon-pop {
  0% { opacity: 0; transform: translateY(8cqw) scale(.86) rotate(-4deg); }
  69% { opacity: 1; transform: translateY(-.9cqw) scale(1.025) rotate(.7deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes coupon-glint {
  0% { opacity: 0; background-position: 100% 0; }
  24% { opacity: .58; }
  76% { opacity: .42; }
  100% { opacity: 0; background-position: 0 0; }
}
@keyframes sun-breathe {
  0%, 100% { transform: scale(.94); opacity: .64; }
  50% { transform: scale(1.12); opacity: .92; }
}
@keyframes ribbon-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}
@keyframes star-twinkle {
  0%, 100% { transform: scale(.78) rotate(0); opacity: .43; }
  52% { transform: scale(1.15) rotate(14deg); opacity: .95; }
}
@media (prefers-reduced-motion: reduce) {
  .scene *, .scene *::before, .scene *::after {
    animation: none !important;
    transition: none !important;
  }
  .scene:not([data-state="ready"]) .chest-stage { visibility: hidden; }
  .result.fly::after { display: none; }
}

.chest-stage { z-index: 2; }
.chest-slider, .result, .reveal-heading { z-index: 3; }
.terms { z-index: 4; }

.activation-form {
  display: grid;
  gap: 6px;
  padding: 0 9% 6px;
  text-align: left;
  font-size: clamp(13px, 3.7cqw, 17px);
}
.activation-form[hidden], .promo-details[hidden] { display: none; }
.activation-form input[type="tel"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ad6553;
  border-radius: 9px;
  padding: 7px 10px;
  background: #fff8e4;
  color: inherit;
  font: inherit;
  font-size: max(16px, 1em);
}
.activation-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 8px;
  padding: 3px 0;
  font-size: clamp(12px, 3.3cqw, 15px);
  line-height: 1.3;
  cursor: pointer;
}
.activation-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--card-ink);
}
.activation-documents {
  display: grid;
  gap: 3px;
  margin: 3px 0 4px;
  padding: 9px 11px;
  border: 1px solid #e4c39b;
  border-radius: 10px;
  background: #fff3d6;
}
.activation-documents-title {
  margin-bottom: 2px;
  font-size: clamp(11px, 3cqw, 13px);
  font-weight: 700;
}
.activation-documents a {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  color: var(--card-ink);
  font-size: clamp(11px, 3cqw, 13px);
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: #a57969;
  text-underline-offset: 2px;
}
.activation-documents a[hidden] { display: none; }
.activate-submit {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--card-ink);
  color: #fff8e4;
  padding: 6px 10px;
}
.activate-submit:disabled { opacity: .6; }
.activation-form p { margin: 0; font-size: clamp(11px, 3.2cqw, 14px); line-height: 1.25; }
.activation-form a { color: inherit; }
.activation-status:empty { display: none; }
.promo-details .promo-limit { margin: 6px 0 0; font-size: clamp(11px, 3.15cqw, 15px); line-height: 1.25; }
.page-status {
  position: absolute;
  z-index: 4;
  inset: auto 10% 24%;
  padding: 8px 12px;
  margin: 0;
  background: #fff4dc;
  color: var(--card-ink);
  border-radius: 10px;
  text-align: center;
}
