:root {
  --espresso: #17100b;
  --gold: #e2c07a;
  --gold-light: #f5dca6;
  --gold-pale: #fbe9be;
  --gold-warm: #f0d595;
  --gold-deep: #c99a4f;
  --gold-script: #e9cc8c;
  --cream: #f3e9d8;
  --cream-body: #e8dcc6;
  --tan: #cdb68f;
  --muted: #9c8a6e;
  --ink: #1d130b;
  --serif: 'Playfair Display', Georgia, serif;
  --script: 'Pinyon Script', cursive;
  --sans: Jost, system-ui, sans-serif;
  --gold-fill: linear-gradient(180deg, #f0d595, #c99a4f);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
a:hover { color: var(--gold-light); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 3px; }

[hidden] { display: none !important; }

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #3a2616 0%, #22170f 45%, #140e09 100%);
}

/* Final-minute atmosphere: darker background, brighter sparkles */
.dim {
  position: absolute; inset: 0; pointer-events: none;
  background: #0a0705; opacity: 0; transition: opacity 1.2s ease;
}
.sparkles {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .55; transition: opacity 1.2s ease;
}
.sparkles span {
  position: absolute; opacity: 0;
  background: var(--gold-pale);
  box-shadow: 0 0 8px 2px rgba(251, 233, 190, .6);
  animation: twinkle var(--d) var(--delay) ease-in-out infinite;
}
.is-late .dim { opacity: .45; }
.is-late .sparkles { opacity: 1; }
.is-late .sparkles span { animation-duration: calc(var(--d) / 2); }

/* Hero */
.hero {
  position: relative;
  max-width: 620px; margin: 0 auto; padding: 28px 20px 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.eyebrow {
  font: 500 11px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--tan);
}
.title {
  margin: 22px 0 0; font-weight: 400;
  display: flex; flex-direction: column; align-items: center;
}
.title-designer {
  font: 500 13px/1 var(--serif); letter-spacing: .55em; margin-right: -.55em; color: var(--cream);
}
.title-purse {
  font: 900 clamp(68px, 20vw, 116px)/.9 var(--serif); letter-spacing: .02em; margin-top: 8px;
  background: linear-gradient(180deg, #fbe9be 0%, #e2c07a 38%, #a87a35 62%, #f0d595 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title-bingo {
  font: 400 clamp(48px, 14vw, 76px)/.8 var(--script); color: var(--gold-script); margin-top: -6px;
}
.tagline {
  margin-top: 18px; font: italic 500 17px/1.3 var(--serif); color: var(--cream); text-wrap: balance;
}
.when { margin-top: 8px; font: 400 14px/1.5 var(--sans); color: var(--tan); }
.rhinestones {
  width: 100%; max-width: 300px; height: 6px; margin: 24px 0 20px; opacity: .8;
  background: radial-gradient(circle, var(--gold) 1.4px, transparent 2px) 0 0 / 12px 6px repeat-x;
}

/* Countdown */
.timer { width: 100%; }
.opens {
  font: 600 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
}
.units {
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.unit {
  padding: 16px 4px 12px;
  border: 1px solid rgba(226, 192, 122, .35); border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 240, 210, .05), rgba(0, 0, 0, .18));
  transition: box-shadow .8s ease;
}
.unit-value {
  font: 700 clamp(36px, 11vw, 58px)/1 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--gold-light);
}
.unit-label {
  margin-top: 8px; font: 500 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--tan);
}
.is-final-min .unit { box-shadow: 0 0 24px -4px rgba(226, 192, 122, .55); }
.is-final-min .unit-value {
  text-shadow: 0 0 18px rgba(240, 213, 149, .75), 0 0 2px #fff4dc;
  animation: pulse 1s ease-in-out infinite;
}

/* Sponsor CTA */
.cta-wrap {
  width: 100%; margin-top: 22px;
  transition: opacity .8s ease, transform .8s ease;
}
.is-late .cta-wrap { opacity: .55; transform: scale(.96); }
.cta, .tickets {
  border-radius: 3px; text-decoration: none;
  background: var(--gold-fill); color: var(--ink);
}
.cta {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 20px;
  box-shadow: 0 10px 30px -12px rgba(226, 192, 122, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.cta:hover, .tickets:hover { color: var(--ink); filter: brightness(1.06); }
.cta-ask { font: 500 13px/1.3 var(--sans); }
.cta-main { font: 700 20px/1.1 var(--serif); }

/* Sponsor blurb */
.sponsor {
  position: relative;
  max-width: 980px; margin: 64px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 36px; align-items: center;
  scroll-margin-top: 24px;
}
.photo { padding: 8px; border: 1px solid rgba(226, 192, 122, .45); background: rgba(226, 192, 122, .06); }
.photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  filter: sepia(.18) saturate(.9);
}
.sponsor-copy { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.sponsor-heading { margin: 0; font: 400 40px/1 var(--script); color: var(--gold-script); }
.sponsor-copy p { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--cream-body); text-wrap: pretty; }
.perks {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  font: 400 15px/1.45 var(--sans); color: var(--cream-body);
}
.perks li { display: flex; gap: 12px; }
.perks strong { color: var(--gold-light); font-weight: 600; }
.gem { flex: none; width: 7px; height: 7px; margin-top: 8px; background: var(--gold); transform: rotate(45deg); }
.text-link {
  align-self: flex-start; padding: 12px 0;
  font: 600 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--gold); border-bottom: 1px solid rgba(226, 192, 122, .5);
}

/* Footer */
.footer {
  position: relative;
  max-width: 980px; margin: 72px auto 0; padding: 28px 20px 40px;
  border-top: 1px solid rgba(226, 192, 122, .25);
  display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center;
}
.credits {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  font: 400 13px/1.4 var(--sans); color: var(--tan);
}
.credits .hi { color: var(--cream); }
.social { display: flex; gap: 24px; font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.social a { text-decoration: none; }
.fineprint { font: 400 12px/1.4 var(--sans); color: var(--muted); }

/* State 3: final 10 seconds */
.final10 {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(80% 60% at 50% 50%, #2c1d11 0%, #0d0906 100%);
  animation: fadein .5s ease;
}
.final10-label {
  font: 600 12px/1 var(--sans); letter-spacing: .4em; text-transform: uppercase; color: var(--gold);
}
.shake { --s: 0; animation: shake .18s linear infinite; }
.big-seconds {
  font: 900 clamp(180px, 55vw, 420px)/.85 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
  background: linear-gradient(180deg, #fbe9be 0%, #e2c07a 45%, #a87a35 70%, #f0d595 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px rgba(240, 213, 149, .35));
}
.big-seconds.beat { animation: beat .6s ease-out; }
.sound {
  position: absolute; bottom: 24px; right: 20px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(226, 192, 122, .4); border-radius: 22px;
  background: transparent; color: var(--tan);
  font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.sound[aria-pressed="true"] { color: var(--gold-light); border-color: var(--gold); }

/* State 4: zero */
.zero {
  position: fixed; inset: 0; z-index: 30; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  background: radial-gradient(70% 55% at 50% 45%, #4a3018 0%, #1a110a 60%, #0d0906 100%);
}
.burst {
  position: absolute; left: 50%; top: 45%;
  width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 200, .9) 0%, rgba(226, 192, 122, .5) 35%, transparent 70%);
  animation: burst 1.4s ease-out forwards;
}
.confetti span {
  position: absolute; top: 0; border-radius: 1px;
  transform: translate3d(0, -10vh, 0);
  animation: fall var(--d) var(--delay) cubic-bezier(.3, .6, .5, 1) forwards;
}
.confetti .gem-bit { background: #fff8e8; box-shadow: 0 0 10px 2px rgba(255, 244, 220, .8); }
.zero-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  animation: rise .8s .3s ease both;
}
.zero-headline {
  font: 400 clamp(44px, 13vw, 84px)/1 var(--script); color: var(--gold-warm);
  text-shadow: 0 0 30px rgba(240, 213, 149, .45);
}
.zero-sub { font: 400 15px/1.5 var(--sans); color: var(--cream-body); }
.tickets {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 0 40px;
  font: 700 22px/1 var(--serif);
  box-shadow: 0 14px 40px -10px rgba(240, 213, 149, .7);
}

@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(45deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.05); } }
@keyframes beat { 0% { transform: scale(1.25); opacity: .4; } 25% { transform: scale(.97); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(calc(var(--s) * -1px), calc(var(--s) * .5px)); }
  50% { transform: translate(calc(var(--s) * 1px), calc(var(--s) * -.5px)); }
  75% { transform: translate(calc(var(--s) * -.5px), calc(var(--s) * 1px)); }
}
@keyframes fall { 0% { transform: translate3d(0, -10vh, 0) rotate(0); } 100% { transform: translate3d(var(--dx), 110vh, 0) rotate(720deg); } }
@keyframes burst { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes rise { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
@keyframes fadein { 0% { opacity: 0; } 100% { opacity: 1; } }

/* Reduced motion: no shake, pulse or beat; the big number fades in instead */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .shake { animation: none; }
  .is-final-min .unit-value { animation: none; }
  .big-seconds.beat { animation: fadein .4s ease !important; }
}
