:root {
  --up-yellow: #ffd405;
  --up-petrol: #012a2f;
  --up-black: #020606;
  --up-white: #ffffff;
  --up-mint: #24d38c;
  --ink: #071417;
  --muted: rgba(255, 255, 255, 0.72);
  --font-sans: "Montserrat", "Arial", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--up-petrol);
  color: var(--up-white);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: #012a2f;
  color: var(--up-white);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  background: #012a2f;
  overflow-x: hidden;
}

.campaign-hero {
  display: grid;
  min-height: 100svh;
  align-content: start;
  gap: clamp(1.45rem, 4.4svh, 2.15rem);
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: max(0.28rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.brand-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.brand-logo {
  width: clamp(5.9rem, 31vw, 8.5rem);
  height: auto;
  filter: drop-shadow(0 0.8rem 1.7rem rgba(0, 0, 0, 0.28));
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.brand-pill {
  border: 1px solid rgba(255, 212, 5, 0.42);
  border-radius: 999px;
  padding: 0.48rem 0.64rem;
  background: rgba(255, 212, 5, 0.1);
  color: var(--up-yellow);
  font-size: clamp(0.56rem, 2.45vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.info-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.82rem;
  height: 1.82rem;
  border: 1px solid rgba(255, 212, 5, 0.58);
  border-radius: 50%;
  background: rgba(255, 212, 5, 0.12);
  color: var(--up-yellow);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
}

.info-button:focus-visible {
  outline: 2px solid var(--up-white);
  outline-offset: 3px;
}

.info-popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 20;
  width: min(24rem, calc(100vw - 2rem));
  border: 1px solid rgba(255, 212, 5, 0.35);
  border-radius: 8px;
  padding: 0.85rem 0.92rem;
  background: var(--up-white);
  color: var(--ink);
  box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, 0.28);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.38;
  text-align: left;
  user-select: text;
}

.info-popover p {
  margin: 0;
}

.info-popover p + p {
  margin-top: 0.55rem;
}

.info-popover ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.info-popover li + li {
  margin-top: 0.16rem;
}

.info-popover a {
  color: var(--up-petrol);
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.hero-copy {
  display: grid;
  margin-block: clamp(0.82rem, 2.8svh, 1.28rem) clamp(1.18rem, 3.7svh, 1.85rem);
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  margin: 0 auto;
  color: var(--up-white);
  font-size: clamp(2rem, 10.6vw, 4.25rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.94;
  text-wrap: balance;
}

.scratch-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: clamp(0.68rem, 3.4vw, 1rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)), rgba(255, 255, 255, 0.08);
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateZ(0);
  transition: filter 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.scratch-panel.is-gated {
  filter: blur(4px);
  opacity: 0.74;
  transform: scale(0.985);
}

.scratch-panel.is-complete {
  pointer-events: none;
}

.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 2.4vw, 0.78rem);
  touch-action: none;
}

.scratch-cell {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: clamp(0.16rem, 0.9vw, 0.24rem) solid rgba(255, 212, 5, 0.96);
  border-radius: 50%;
  background: radial-gradient(circle at 45% 32%, rgba(255, 255, 255, 0.48), transparent 18%), radial-gradient(circle at 50% 44%, #ffdd31 0%, #ffd405 48%, #e8b900 100%);
  box-shadow: inset 0 -0.8rem 1.15rem rgba(1, 42, 47, 0.24), 0 0.64rem 1.15rem rgba(0, 0, 0, 0.25);
  contain: layout paint;
  isolation: isolate;
  touch-action: none;
}

.scratch-cell::after {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 54%, rgba(1, 42, 47, 0.14));
  content: "";
  pointer-events: none;
  z-index: 1;
}

.scratch-cell.is-revealed .prize-text {
  transform: scale(1.02);
}

.scratch-cell.is-winner {
  animation: winnerPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.8), 0 0 1.6rem rgba(255, 212, 5, 0.9), inset 0 -0.8rem 1.15rem rgba(1, 42, 47, 0.24);
}

.prize-text {
  width: 86%;
  color: var(--up-petrol);
  font-size: clamp(0.74rem, 3.35vw, 1.16rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
  transform: translateZ(0);
  transition: transform 180ms ease;
  z-index: 0;
}

.prize-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}

.scratch-canvas:active {
  cursor: grabbing;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(14px);
}

.lead-modal,
.winner-modal {
  position: relative;
  display: grid;
  width: min(100%, 27rem);
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
  gap: 0.82rem;
  border: 1px solid rgba(255, 212, 5, 0.32);
  border-radius: 8px;
  padding: clamp(1rem, 4.5vw, 1.35rem);
  background: var(--up-white);
  color: var(--ink);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.42);
  user-select: text;
}

.modal-kicker {
  color: var(--up-petrol);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
}

.lead-modal h2,
.winner-modal h2 {
  color: var(--ink);
  font-size: clamp(1.42rem, 6vw, 1.9rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.02;
  text-wrap: balance;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span,
.member-field legend {
  color: rgba(7, 20, 23, 0.78);
  font-size: 0.82rem;
  font-weight: 850;
}

.field input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(1, 42, 47, 0.18);
  border-radius: 8px;
  padding: 0.82rem 0.88rem;
  background: #f5f7f7;
  color: var(--ink);
  outline: none;
  user-select: text;
}

.field input:focus {
  border-color: var(--up-yellow);
  box-shadow: 0 0 0 0.2rem rgba(255, 212, 5, 0.22);
}

.field em,
.member-field em,
.terms-error {
  color: #a5341f;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.member-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  border: 0;
  padding: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.segmented button {
  min-height: 2.75rem;
  border: 1px solid rgba(1, 42, 47, 0.16);
  border-radius: 8px;
  background: #f5f7f7;
  color: var(--ink);
  font-weight: 900;
}

.segmented button[aria-pressed="true"] {
  border-color: var(--up-yellow);
  background: var(--up-yellow);
  color: var(--up-petrol);
}

.terms-field {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  align-items: start;
  gap: 0.62rem;
  color: rgba(7, 20, 23, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.28;
}

.terms-field input {
  width: 1.08rem;
  height: 1.08rem;
  margin: 0.08rem 0 0;
  accent-color: var(--up-petrol);
}

.submit-button {
  display: inline-grid;
  min-height: 3.05rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1.2rem;
  background: var(--up-petrol);
  color: var(--up-yellow);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 0.75rem 1.35rem rgba(1, 42, 47, 0.24);
  transition: opacity 160ms ease, transform 160ms ease;
}

.submit-button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button,
.restart-button {
  display: inline-grid;
  min-height: 2.72rem;
  place-items: center;
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.secondary-button {
  border: 1px solid rgba(1, 42, 47, 0.18);
  background: transparent;
  color: rgba(7, 20, 23, 0.72);
}

.restart-button {
  justify-self: center;
  border: 1px solid rgba(255, 212, 5, 0.46);
  background: rgba(255, 212, 5, 0.12);
  color: var(--up-yellow);
  box-shadow: 0 0.75rem 1.35rem rgba(0, 0, 0, 0.22);
}

.winner-modal {
  justify-items: center;
  overflow: hidden;
  padding-top: 1.5rem;
  text-align: center;
}

.winner-burst {
  position: absolute;
  inset: -38% -22% auto;
  height: 12rem;
  background: radial-gradient(circle, rgba(255, 212, 5, 0.42), transparent 64%);
  pointer-events: none;
}

.winner-modal strong {
  display: block;
  width: 100%;
  border-radius: 8px;
  padding: 0.9rem 0.8rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent), var(--up-yellow);
  color: var(--up-petrol);
  font-size: clamp(1.35rem, 7vw, 2.1rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.winner-modal p {
  color: rgba(7, 20, 23, 0.76);
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.35;
}

.winner-modal small {
  color: #8b3a23;
  font-size: 0.72rem;
  font-weight: 750;
}

.particle-layer,
.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}

.scratch-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0.35rem rgba(255, 255, 255, 0.45);
  animation: scratchParticle 650ms ease-out forwards;
}

.confetti-piece {
  position: absolute;
  left: var(--left);
  top: -1rem;
  width: 0.48rem;
  height: 0.82rem;
  border-radius: 2px;
  background: var(--color);
  transform: rotate(var(--rotate));
  animation: confettiFall var(--duration) cubic-bezier(0.18, 0.74, 0.26, 1) var(--delay) forwards;
}

@keyframes scratchParticle {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.42);
  }
}

@keyframes confettiFall {
  72% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate3d(-1rem, 108svh, 0) rotate(calc(var(--rotate) + 420deg));
  }
}

@keyframes winnerPulse {
  50% {
    transform: scale(1.035);
  }
}

@media (min-width: 720px) {
  .campaign-hero {
    align-content: center;
    width: min(100%, 58rem);
    grid-template-columns: 0.9fr 1fr;
    align-items: center;
    column-gap: 2.3rem;
    padding-inline: 1.5rem;
  }

  .brand-bar {
    grid-column: 1 / -1;
  }

  .info-button {
    width: 2rem;
    height: 2rem;
  }

  .hero-copy {
    margin-block: 0;
    text-align: left;
  }

  h1 {
    max-width: 11ch;
    margin: 0;
  }

  .scratch-panel {
    align-self: center;
  }
}

@media (max-height: 690px) and (max-width: 719px) {
  .campaign-hero {
    gap: 1.05rem;
  }

  .hero-copy {
    margin-block: 0.58rem 0.92rem;
  }

  .brand-logo {
    width: 5.6rem;
  }

  h1 {
    font-size: clamp(1.72rem, 8.6vw, 2.15rem);
    max-width: 14ch;
  }

  .scratch-panel {
    padding: 0.54rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
