@font-face {
  font-family: "Modesto Fitness UP";
  src: url("assets/fonts/Modesto-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --up-black: #080808;
  --up-ink: #171717;
  --up-yellow: #ffd400;
  --up-gold: #f3a900;
  --up-white: #ffffff;
  --up-soft: #f3f3f3;
  --up-muted: #c7d3d2;
  --up-red: #e5312f;
  --up-green: #18a957;
  --up-cyan: #00a6d6;
  --petrol: #063f43;
  --petrol-dark: #041d22;
  --font-title: "Modesto Fitness UP", "Modesto Condensed", "Modesto Condensed Bold", "Modesto", Impact, "Arial Narrow", sans-serif;
  --font-body: "Montserrat", "Segoe UI", Arial, Helvetica, sans-serif;
  --shadow-strong: 0 22px 60px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--petrol-dark);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--up-white);
  background:
    linear-gradient(180deg, rgba(2, 28, 32, 0.76), rgba(3, 48, 54, 0.82) 45%, rgba(0, 0, 0, 0.9)),
    linear-gradient(135deg, rgba(0, 80, 88, 0.74), rgba(0, 0, 0, 0.52)),
    url("assets/hero-fitness-bg.png") center / cover fixed;
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 212, 0, 0.16), transparent 23%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 76px 100%;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100dvh;
  overflow: hidden;
}

.hero {
  width: min(980px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px 0 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 8px;
}

.brand-logo {
  display: block;
  width: min(92vw, 390px);
  height: clamp(118px, 25vw, 178px);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.48));
}

.hero-copy {
  text-align: center;
}

.modal-kicker,
.result-kicker {
  margin: 0 0 7px;
  color: var(--up-yellow);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--up-yellow);
  font-family: var(--font-title);
  font-size: 2.05rem;
  line-height: 0.9;
  font-weight: 900;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.58);
}

.subheadline {
  margin: 6px auto 0;
  color: var(--up-soft);
  font-size: 1rem;
  font-weight: 800;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.58);
}

.game-area {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  padding-top: 10px;
  min-height: 0;
}

.wheel-stage {
  position: relative;
  width: min(86vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.5));
}

.wheel-stage::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.14), rgba(0, 0, 0, 0.05) 52%, rgba(0, 0, 0, 0.44));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

.wheel-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.wheel-pointer {
  position: absolute;
  top: -28px;
  left: 50%;
  z-index: 4;
  width: 56px;
  height: 74px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 20%, #fff5b0, #f7c22a 34%, #a66508 72%, #5f3100);
  clip-path: polygon(50% 100%, 8% 34%, 23% 4%, 77% 4%, 92% 34%);
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.62));
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #fff9cf, #ffd400 62%, #b46e00);
  box-shadow: inset 0 0 0 2px rgba(117, 64, 0, 0.42);
}

.wheel-center {
  position: absolute;
  z-index: 3;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: radial-gradient(circle at 35% 28%, #ff5948, #9b1717 58%, #3c0707);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.wheel-center img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.36));
}

.spin-button,
.submit-button,
.done-button {
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  color: var(--up-black);
  background: linear-gradient(180deg, #fff172, var(--up-yellow) 60%, var(--up-gold));
  box-shadow: 0 8px 0 #8a5f00, 0 22px 36px rgba(0, 0, 0, 0.36);
  font-family: var(--font-title);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.spin-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 320px);
  min-height: 58px;
  font-size: 1.62rem;
  animation: spinButtonGlow 1.2s ease-in-out infinite;
}

.spin-button:hover,
.submit-button:hover,
.done-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.spin-button:active,
.submit-button:active,
.done-button:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 #8a5f00, 0 12px 22px rgba(0, 0, 0, 0.32);
}

.spin-button:disabled,
.submit-button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.spin-button:disabled {
  animation: none;
}

.spin-button::after {
  content: "";
  position: absolute;
  inset: -70% -40%;
  z-index: -1;
  background: linear-gradient(100deg, transparent 34%, rgba(255, 255, 255, 0.72) 48%, transparent 62%);
  transform: translateX(-115%) rotate(8deg);
  animation: spinButtonShine 1.9s ease-in-out infinite;
}

.spin-button:disabled::after {
  display: none;
}

.modal,
.result-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 18px;
}

.modal.is-open,
.result-screen.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.modal-panel,
.result-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 212, 0, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(6, 63, 67, 0.86), rgba(12, 14, 14, 0.96)),
    #111111;
  box-shadow: var(--shadow-strong);
}

.modal-panel {
  padding: 22px;
}

.modal-header h2,
.result-panel h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.9rem;
  line-height: 0.96;
  text-transform: uppercase;
}

.modal-header p:last-child {
  margin: 8px 0 0;
  color: var(--up-soft);
  font-weight: 700;
}

.lead-form {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.field-group {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group label,
.field-group legend {
  color: var(--up-soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-group input[type="text"],
.field-group input[type="tel"] {
  width: 100%;
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--up-black);
  background: var(--up-white);
}

.field-group input:focus {
  outline: none;
  border-color: var(--up-yellow);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.18);
}

.radio-group {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-group legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.radio-group input,
.terms-check input {
  accent-color: var(--up-yellow);
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--up-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

.terms-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.form-message {
  min-height: 21px;
  margin: 0;
  color: #ff8d8b;
  font-size: 0.88rem;
  font-weight: 800;
}

.form-message.is-success {
  color: #6eed9c;
}

.submit-button,
.done-button {
  width: 100%;
  font-size: 1.2rem;
}

.result-screen {
  z-index: 12;
  background: rgba(0, 0, 0, 0.78);
}

.result-panel {
  padding: 28px 22px;
  text-align: center;
}

.result-panel h2 span {
  display: block;
  margin-top: 8px;
  color: var(--up-yellow);
}

.result-panel p {
  margin: 16px auto 20px;
  color: var(--up-soft);
  font-size: 1rem;
  line-height: 1.45;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 13;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body.modal-open,
body.result-open {
  overflow: hidden;
}

@media (max-height: 680px) {
  .hero {
    padding-top: 12px;
    gap: 6px;
  }

  .brand-logo {
    width: min(88vw, 340px);
    height: 112px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .subheadline {
    margin-top: 7px;
    font-size: 0.92rem;
  }

  .wheel-stage {
    width: min(84vw, 320px);
  }

  .spin-button {
    min-height: 56px;
    font-size: 1.45rem;
  }
}

@media (min-width: 760px) {
  .hero {
    padding: 14px 0 12px;
    gap: 8px;
  }

  .brand-logo {
    width: min(84vw, 370px);
    height: 140px;
  }

  h1 {
    font-size: 3.35rem;
  }

  .subheadline {
    font-size: 1.16rem;
  }

  .wheel-stage {
    width: 360px;
  }
}

@media (min-width: 1040px) {
  h1 {
    font-size: 3.55rem;
  }

  .wheel-stage {
    width: 350px;
  }
}

@media (min-width: 760px) and (min-height: 820px) {
  .hero {
    padding: 24px 0 28px;
    gap: 14px;
  }

  .brand-logo {
    width: min(72vw, 460px);
    height: 178px;
  }

  h1 {
    font-size: 4.7rem;
  }

  .wheel-stage {
    width: 430px;
  }

  .spin-button {
    min-height: 64px;
    font-size: 1.85rem;
  }
}

@keyframes spinButtonGlow {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 8px 0 #8a5f00, 0 18px 34px rgba(255, 212, 0, 0.28), 0 0 0 rgba(255, 212, 0, 0);
  }

  50% {
    filter: brightness(1.16);
    box-shadow: 0 8px 0 #8a5f00, 0 24px 44px rgba(255, 212, 0, 0.48), 0 0 28px rgba(255, 212, 0, 0.62);
  }
}

@keyframes spinButtonShine {
  0% {
    transform: translateX(-115%) rotate(8deg);
    opacity: 0;
  }

  24% {
    opacity: 0.72;
  }

  52%, 100% {
    transform: translateX(115%) rotate(8deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
