/* =====================================================================
   Golden Goals — TPC Summer 2026 Competition
   Shared stylesheet (mobile-first)
   ===================================================================== */

/* --- Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1A1A1A;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: #1A1A1A; }

/* --- Design tokens --------------------------------------------------- */
:root {
  --tpc-black: #1A1A1A;
  --tpc-yellow: #F4E516;
  --white: #FFFFFF;
  --off-white: #F7F7F7;
  --grey: #666666;
  --light-grey: #E5E5E5;
  --max-width: 720px;
}

/* --- Header --------------------------------------------------------- */
.site-header {
  background: var(--tpc-black);
  color: var(--white);
  padding: 14px 20px;
  text-align: center;
  border-bottom: 4px solid var(--tpc-yellow);
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.site-header .logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.site-header .logo-campaign {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--tpc-yellow);
  border-left: 2px solid var(--tpc-yellow);
  padding-left: 12px;
  line-height: 1.1;
}

/* --- Hero ----------------------------------------------------------- */
.hero {
  background: var(--tpc-black);
  color: var(--white);
  padding: 36px 20px 44px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  padding: 6px 12px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 14px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero h1 .accent { color: var(--tpc-yellow); }
.hero .lede {
  max-width: 520px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
  color: #DDD;
}
.hero .dates {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #BBB;
}
.hero .dates strong { color: var(--white); }

/* --- Section base --------------------------------------------------- */
section { padding: 36px 20px; }
.container { max-width: var(--max-width); margin: 0 auto; }
.section-title {
  text-align: center;
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.section-sub {
  text-align: center;
  color: var(--grey);
  margin: 0 0 28px;
}

/* --- Steps ---------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.step {
  background: var(--off-white);
  padding: 22px 20px;
  border-left: 6px solid var(--tpc-yellow);
}
.step .num {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tpc-black);
  color: var(--tpc-yellow);
  font-weight: 800;
  line-height: 32px;
  text-align: center;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--grey); }

/* --- Prize ladder --------------------------------------------------- */
.prize-ladder { background: var(--off-white); }
.prize-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.prize {
  background: var(--white);
  border: 2px solid var(--tpc-black);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.prize.grand {
  background: var(--tpc-black);
  color: var(--white);
  border-color: var(--tpc-yellow);
}
.prize.grand .tier-label { background: var(--tpc-yellow); color: var(--tpc-black); }
.prize .tier-label {
  flex-shrink: 0;
  background: var(--tpc-black);
  color: var(--tpc-yellow);
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  width: 88px;
  text-align: center;
}
.prize .prize-name { font-weight: 700; font-size: 1.05rem; }
.prize .prize-sub {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--grey);
  margin-top: 2px;
}
.prize.grand .prize-sub { color: #BBB; }
.prize-spin {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  font-weight: 700;
  text-align: center;
}
.prize-spin small { display: block; font-weight: 400; margin-top: 4px; font-size: 0.85rem; }

/* --- Form ----------------------------------------------------------- */
.form-section { background: var(--tpc-black); color: var(--white); }
.form-section .section-title { color: var(--white); }
.form-section .section-sub { color: #BBB; }
.entry-form {
  background: var(--white);
  color: var(--tpc-black);
  padding: 24px 20px;
  margin-top: 8px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid var(--light-grey);
  border-radius: 0;
  background: var(--white);
  color: var(--tpc-black);
  font-family: inherit;
}
.field input:focus,
.field select:focus { outline: none; border-color: var(--tpc-black); }
.field .hint { font-size: 0.8rem; color: var(--grey); margin-top: 4px; }

.bonus-list {
  margin: 22px 0 18px;
  padding: 16px;
  background: var(--off-white);
  border-left: 4px solid var(--tpc-yellow);
}
.bonus-list h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
}
.check input[type="checkbox"] {
  margin: 4px 0 0;
  width: 20px;
  height: 20px;
  accent-color: var(--tpc-black);
  flex-shrink: 0;
}
.check label { font-weight: 500; line-height: 1.35; }
.check label strong { color: var(--tpc-black); }

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  text-decoration: none;
  width: 100%;
  text-align: center;
  transition: transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-dark { background: var(--tpc-black); color: var(--tpc-yellow); }

/* --- Dates --------------------------------------------------------- */
.dates-section { background: var(--white); }
.dates-list { list-style: none; padding: 0; margin: 0; }
.dates-list li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--light-grey);
  gap: 16px;
}
.dates-list li:last-child { border-bottom: none; }
.dates-list .date { font-weight: 700; color: var(--tpc-black); flex-shrink: 0; }
.dates-list .event { color: var(--grey); text-align: right; }

/* --- T&Cs accordion ------------------------------------------------- */
.terms { background: var(--off-white); }
.terms details {
  border: 2px solid var(--tpc-black);
  padding: 14px 18px;
  background: var(--white);
}
.terms summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.terms summary::-webkit-details-marker { display: none; }
.terms summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; line-height: 1; }
.terms details[open] summary::after { content: "−"; }
.terms .terms-body { margin-top: 14px; font-size: 0.9rem; color: #333; }
.terms .terms-body p { margin: 0 0 10px; }
.terms .terms-body ul { padding-left: 20px; margin: 0 0 10px; }

/* --- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--tpc-black);
  color: var(--white);
  text-align: center;
  padding: 30px 20px 22px;
}
.site-footer .footer-logo-img {
  height: 32px;
  width: auto;
  margin: 0 auto 10px;
  display: block;
}
.site-footer .footer-campaign {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--tpc-yellow);
  margin-bottom: 14px;
}
.footer-strap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  padding: 10px 16px;
  margin: 14px auto 0;
  max-width: 480px;
  flex-wrap: wrap;
}
.footer-strap span:not(:last-child)::after {
  content: "|";
  margin-left: 12px;
  opacity: 0.5;
}
.footer-small { margin-top: 18px; font-size: 0.8rem; color: #999; }

/* ============ Confirmation page ============ */
.confirmation-hero {
  background: var(--tpc-black);
  color: var(--white);
  padding: 36px 20px;
  text-align: center;
}
.confirmation-hero .ref-badge {
  display: inline-block;
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  font-size: 1.05rem;
  margin-top: 8px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.confirmation-hero h1 {
  font-size: 1.7rem;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.confirmation-hero p { margin: 0 auto; max-width: 480px; color: #DDD; }

.spin-section { padding: 30px 20px 40px; text-align: center; background: var(--off-white); }
.spin-section h2 { text-transform: uppercase; font-size: 1.3rem; margin: 0 0 6px; }
.spin-section .spin-sub { color: var(--grey); margin: 0 0 24px; }

.wheel-wrapper {
  position: relative;
  width: 300px;
  max-width: 90vw;
  margin: 0 auto 20px;
  aspect-ratio: 1 / 1;
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid var(--tpc-black);
  z-index: 3;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: var(--tpc-yellow);
  border-radius: 50%;
  border: 4px solid var(--tpc-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--tpc-black);
  z-index: 2;
  text-align: center;
  line-height: 1;
}
#wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 5.5s cubic-bezier(0.17, 0.67, 0.21, 1);
  transform-origin: center;
}

.spin-result {
  margin-top: 24px;
  padding: 22px 18px;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: none;
}
.spin-result.show { display: block; }
.spin-result .prize-line { font-size: 1.35rem; margin-top: 4px; }
.spin-result .prize-line strong { font-size: 1.6rem; }
/* Win variant — celebratory yellow */
.spin-result--win {
  background: var(--tpc-yellow);
  color: var(--tpc-black);
}
/* Miss variant — softer grey, still on-brand */
.spin-result--miss {
  background: var(--off-white);
  color: var(--tpc-black);
  border: 2px solid var(--light-grey);
}
.spin-result--miss .prize-line strong { color: var(--grey); }
/* Big-win variant — extra celebratory for TV / BBQ / PS5 / Ooni hits */
.spin-result--big-win {
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  border: 4px solid var(--tpc-black);
  box-shadow: 0 0 0 4px var(--tpc-yellow), 0 8px 24px rgba(0,0,0,0.18);
  position: relative;
  margin-top: 32px;
  margin-bottom: 12px;
}
.spin-result--big-win .prize-line { font-size: 1.6rem; }
.spin-result--big-win .prize-line strong { font-size: 1.9rem; }

.next-step { background: var(--white); padding: 32px 20px; text-align: center; }
.next-step-card {
  background: var(--tpc-black);
  color: var(--white);
  padding: 28px 22px;
  border-left: 6px solid var(--tpc-yellow);
  text-align: left;
}
.next-step-card h3 { margin: 0 0 10px; text-transform: uppercase; color: var(--tpc-yellow); }
.next-step-card p { margin: 0 0 14px; color: #DDD; }
.next-step-card .email-callout {
  background: rgba(244, 229, 22, 0.12);
  padding: 12px 14px;
  border-left: 3px solid var(--tpc-yellow);
  font-size: 0.95rem;
  color: var(--white);
}

/* ============ Form 2 ============ */
.form2-hero {
  background: var(--tpc-black);
  color: var(--white);
  padding: 36px 20px;
  text-align: center;
}
.form2-hero h1 { text-transform: uppercase; font-size: 1.7rem; margin: 0 0 10px; }
.form2-hero p { max-width: 460px; margin: 0 auto; color: #DDD; }
.form2-section { padding: 28px 20px 40px; background: var(--off-white); }
.form2-success {
  background: var(--tpc-yellow);
  color: var(--tpc-black);
  padding: 26px 22px;
  text-align: center;
  display: none;
}
.form2-success.show { display: block; }
.form2-success h2 { margin: 0 0 8px; text-transform: uppercase; }
.form2-success p { margin: 0; font-weight: 500; }

/* --- Validation messages -------------------------------------------- */
.field.error input,
.field.error select { border-color: #C92A2A; }
.error-msg {
  color: #C92A2A;
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}
.field.error .error-msg { display: block; }

/* --- Responsive --------------------------------------------------- */
@media (min-width: 640px) {
  .site-header .logo-img { height: 44px; }
  .site-footer .footer-logo-img { height: 38px; }
  .hero h1 { font-size: 2.6rem; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .entry-form { padding: 32px 32px; }
  section { padding: 48px 24px; }
  .wheel-wrapper { width: 360px; }
}

@media (min-width: 900px) {
  .hero { padding: 56px 24px 64px; }
  .hero h1 { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  #wheel-svg { transition: none !important; }
}


/* =====================================================================
   Win celebration — confetti + footballs falling and rising
   Triggered by JS from main.js after a winning spin.
   ===================================================================== */

#celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
  /* Allow the layer to exist even when empty; particles inserted by JS */
}

.celebration-particle {
  position: absolute;
  top: -8vh;
  --drift-x: 0px;
  --spin-end: 360deg;
  will-change: transform, opacity;
  animation: confetti-fall var(--dur, 3.5s) cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.celebration-particle.rise {
  top: auto;
  bottom: -8vh;
  animation-name: confetti-rise;
}

@keyframes confetti-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate3d(var(--drift-x), 120vh, 0) rotate(var(--spin-end)); opacity: 0.6; }
}

@keyframes confetti-rise {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate3d(var(--drift-x), -120vh, 0) rotate(var(--spin-end)); opacity: 0.6; }
}

/* === Particle shapes === */

/* Confetti squares */
.celebration-particle.sq-yellow { width: 10px; height: 14px; background: var(--tpc-yellow); }
.celebration-particle.sq-black  { width: 10px; height: 14px; background: var(--tpc-black);  }
.celebration-particle.sq-white  { width: 10px; height: 14px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }

/* Thin streamers — slightly different aspect for visual variety */
.celebration-particle.streamer-yellow { width: 4px; height: 18px; background: var(--tpc-yellow); }
.celebration-particle.streamer-black  { width: 4px; height: 18px; background: var(--tpc-black);  }

/* Footballs — TPC black-and-yellow */
.celebration-particle.ball-yellow {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--tpc-yellow);
  box-shadow: inset 0 0 0 2px var(--tpc-black), 0 1px 2px rgba(0,0,0,0.18);
}
.celebration-particle.ball-black {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--tpc-black);
  box-shadow: inset 0 0 0 2px var(--tpc-yellow), 0 1px 2px rgba(0,0,0,0.18);
}

/* Big-prize variant — slightly larger + denser */
.celebration-particle.big.ball-yellow,
.celebration-particle.big.ball-black { width: 22px; height: 22px; }
.celebration-particle.big.sq-yellow,
.celebration-particle.big.sq-black,
.celebration-particle.big.sq-white { width: 13px; height: 18px; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .celebration-particle {
    animation: none !important;
    opacity: 0 !important;
  }
}
