:root {
  color-scheme: dark;
  --deep: #220528;
  --purple: #58015f;
  --gold: #fdd400;
  --amber: #f7a900;
  --ink: #fff9ed;
  --muted: #ede0ee;
  --rule: #fdd40046;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 75% 48%, #76267b 0%, #58015f 30%, transparent 67%),
    linear-gradient(145deg, #25042d 3%, #400749 56%, var(--deep) 100%);
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.page {
  width: min(75rem, calc(100% - clamp(2rem, 8vw, 8rem)));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo, .wheel-logo {
  display: block;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  clip-path: circle(48.7%);
}

.brand-logo { width: 3.15rem; }

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.brand-name span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0;
}

.instagram {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--gold);
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
}

.instagram:hover { text-decoration: underline; }

.campaign {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  grid-template-areas: "intro wheel" "deadline wheel" "play wheel" "terms wheel";
  align-content: center;
  align-items: center;
  gap: 1.35rem clamp(1.75rem, 4vw, 4.4rem);
  min-height: calc(100svh - 5.5rem);
  padding: clamp(2.75rem, 6vw, 6rem) 0;
}

.intro { grid-area: intro; }

.campaign-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.05rem;
  color: var(--gold);
  font-size: 0.77rem;
  font-weight: 790;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.campaign-name::before {
  content: "";
  width: 1.7rem;
  height: 2px;
  background: var(--gold);
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5.6vw, 5.05rem);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.99;
}

h1 span {
  display: block;
  color: var(--gold);
}

.lede {
  max-width: 30rem;
  margin: 1.16rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.24rem);
  line-height: 1.55;
}

.lede strong { color: var(--ink); }

.deadline {
  grid-area: deadline;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.65rem 0.88rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: #26032f9e;
}

.deadline-title {
  max-width: 7.3rem;
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.25;
}

.countdown {
  display: flex;
  align-items: start;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.countdown div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.15rem;
}

.unit-label {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.1;
}

.unit-value {
  order: -1;
  margin: 0 0 0.13rem;
  color: var(--gold);
  font-size: 1.58rem;
  font-weight: 820;
  line-height: 1;
}

.separator {
  padding-top: 0.13rem;
  color: #fde1969c;
  font-size: 1.1rem;
  font-weight: 620;
  line-height: 1;
}

.wheel-stage {
  grid-area: wheel;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  padding: clamp(0.6rem, 2vw, 1.4rem);
}

.wheel-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle, #ea7a1752 0%, #ffb90031 48%, transparent 72%);
  pointer-events: none;
}

.wheel-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 30.5rem);
  aspect-ratio: 1;
  padding: clamp(0.38rem, 1.1vw, 0.78rem);
  border: 1px solid #ffe881;
  border-radius: 50%;
  background: linear-gradient(138deg, #ec9404 0%, #fdd400 28%, #ffe478 47%, #f6a100 71%, #fdd400 100%);
  box-shadow: 0 0 0 0.45rem #ffd3002e, 0 0 0 0.85rem #ffd30014, 0 1.45rem 3.5rem #1d002d98;
}

.wheel-face {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #8b300e80;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: inset 0 0 1.6rem #2b032b55;
  transform: rotate(var(--wheel-rotation, 0deg));
}

.wheel-face.is-spinning {
  transition: transform var(--spin-duration) cubic-bezier(0.12, 0.63, 0.12, 1);
}

.wheel-number {
  position: absolute;
  font-size: clamp(1.35rem, 3.25vw, 2.65rem);
  font-weight: 840;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.07em;
  transform: translate(-50%, -50%) rotate(var(--label-rotation));
  white-space: nowrap;
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 26%;
  aspect-ratio: 1;
  border: 1px solid #ffde38;
  border-radius: 50%;
  background: #500757;
  box-shadow: 0 0 0 0.25rem #34053d51, 0 0.3rem 0.9rem #28002a71;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.wheel-logo { width: 100%; }

.wheel-pointer {
  position: absolute;
  top: -4.5%;
  left: 50%;
  width: 10.4%;
  height: 14%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0.35rem 0.3rem #24012d9c);
  pointer-events: none;
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #fff0a2, #ffd400 50%, var(--amber));
  clip-path: polygon(13% 0, 87% 0, 100% 24%, 50% 100%, 0 24%);
}

.play { grid-area: play; }

.action {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.95rem;
  min-width: min(100%, 17.5rem);
  min-height: 3.6rem;
  padding: 0.76rem 1.22rem;
  border: 1px solid #ffe260;
  border-radius: 0.68rem;
  color: #26032c;
  background: linear-gradient(135deg, var(--gold) 8%, #ffc000 80%);
  box-shadow: 0 0.45rem 1.8rem #ffc40038;
  font: 810 1.07rem/1.25 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 150ms ease, filter 150ms ease;
}

.action-arrow {
  position: relative;
  display: block;
  flex: 0 0 1rem;
  height: 0.85rem;
}

.action-arrow::before, .action-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
}

.action-arrow::before {
  left: 0;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}

.action-arrow::after {
  width: 0.53rem;
  height: 0.53rem;
  border-top: 2px solid;
  border-right: 2px solid;
  transform: translateY(-50%) rotate(45deg);
}
.action:hover { filter: brightness(1.08); box-shadow: 0 0.5rem 2rem #ffc40062; }
.action:disabled { opacity: 0.78; cursor: wait; }

.small-copy, .closed-copy, .terms {
  color: var(--muted);
  line-height: 1.55;
}

.small-copy { margin: 0.65rem 0 0; font-size: 0.8rem; }
.closed-copy { margin: 0 0 0.75rem; }

.prize {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.3;
}

.prize-value {
  color: var(--gold);
  font-size: 2.85rem;
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.terms {
  grid-area: terms;
  max-width: 27rem;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 0.74rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 48rem) {
  body {
    background:
      radial-gradient(ellipse at 50% 55%, #76267b 0%, #58015f 30%, transparent 68%),
      linear-gradient(160deg, #2b0433, #3f0647 55%, #240429);
  }

  .site-header { min-height: 4rem; }
  .brand-logo { width: 2.55rem; }
  .brand-name { font-size: 1.14rem; }
  .brand-name span { font-size: 0.64rem; }

  .campaign {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "deadline" "wheel" "play" "terms";
    gap: 1.05rem;
    min-height: auto;
    padding: 1.45rem 0 1.65rem;
    text-align: center;
  }

  .campaign-name {
    justify-content: center;
    margin-bottom: 0.66rem;
    font-size: 0.69rem;
  }

  .campaign-name::before { width: 1.14rem; }
  h1 { font-size: clamp(2.27rem, 10vw, 4.15rem); }
  .lede { max-width: 26rem; margin: 0.64rem auto 0; font-size: 0.96rem; }

  .deadline {
    justify-self: center;
    gap: clamp(0.55rem, 3vw, 1rem);
    padding: 0.52rem 0.65rem;
  }

  .deadline-title { font-size: 0.72rem; text-align: left; }
  .countdown { gap: clamp(0.25rem, 1.2vw, 0.42rem); }
  .countdown div { min-width: 1.68rem; }
  .unit-label { font-size: 0.62rem; }
  .unit-value { font-size: 1.26rem; }
  .separator { padding-top: 0; }

  .wheel-stage { padding: 0.45rem 0.6rem 0.5rem; }
  .wheel-frame { width: min(100%, clamp(12.4rem, 64vw, 16.5rem)); }
  .wheel-number { font-size: clamp(1.35rem, 6.1vw, 2rem); }
  .action { width: min(100%, 21rem); min-height: 3.2rem; }
  .small-copy { max-width: 21rem; margin: 0.55rem auto 0; }
  .prize { justify-content: center; text-align: left; }
  .terms { width: min(100%, 25rem); margin-inline: auto; }
}

@media (max-width: 22rem) {
  .site-header { gap: 0.45rem; }
  .brand { gap: 0.32rem; }
  .brand-name span, .instagram { font-size: 0.65rem; }
  .lede { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .action, .wheel-face.is-spinning { transition: none; }
}
