/* ── Mystery Discount Reveal — midnight magician's stage ────────────
   Emerald velvet curtain with spotlight pool, ink top hat on a
   pedestal, didone headline with gold italic, white-glove calling
   card form, sparkle burst + levitating playing-card code reveal. */

:root {
  --velvet: #0d2b22;
  --velvet-deep: #081b16;
  --spot: rgba(240, 230, 200, 0.1);
  --ivory: #f3ead6;
  --gold: #c9a24b;
  --gold-bright: #e3c274;
  --ink: #141419;
  --ink-soft: rgba(243, 234, 214, 0.6);
  --err: #ff9a86;
  --didone: 'Playfair Display', serif;
  --sans: 'Jost', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 34px, transparent 34px 68px),
    linear-gradient(180deg, var(--velvet), var(--velvet-deep));
  background-attachment: fixed;
  min-height: 100vh;
}

.stage { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.spotlight {
  position: fixed;
  top: 6vh;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--spot), transparent 62%);
  pointer-events: none;
}

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 24px; position: relative; }

main { flex: 1 0 auto; padding-bottom: 60px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 52px 24px 4px; }

.kicker {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--didone);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.1;
  color: var(--ivory);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
}

.sub { color: var(--ink-soft); max-width: 400px; margin: 14px auto 0; }

/* ── Hat scene ────────────────────────────────────────────────────── */
.act { text-align: center; }

.hat-scene { position: relative; margin: 18px auto 0; width: 200px; }

.hat {
  width: 140px;
  height: 110px;
  position: relative;
  z-index: 2;
  transition: transform 0.7s cubic-bezier(0.34, 1.4, 0.64, 1);
  transform-origin: 80% 90%;
}

.hat-scene.lifted .hat { transform: rotate(-24deg) translate(-26px, -40px); }

.pedestal {
  width: 170px;
  height: 16px;
  margin: -8px auto 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b2c1c, #241a0f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

/* sparkles */
.sparkles {
  position: absolute;
  inset: -20px 0 auto 0;
  height: 120px;
  pointer-events: none;
  z-index: 3;
}

.sparkles span {
  position: absolute;
  color: var(--gold-bright);
  font-size: 1.2rem;
  animation: pop 1.1s ease-out both;
}

.sparkles span:nth-child(1) { left: 12%; top: 44%; animation-delay: 0s; }
.sparkles span:nth-child(2) { left: 30%; top: 12%; animation-delay: 0.08s; font-size: 0.9rem; }
.sparkles span:nth-child(3) { left: 52%; top: 2%;  animation-delay: 0.16s; font-size: 1.5rem; }
.sparkles span:nth-child(4) { left: 70%; top: 16%; animation-delay: 0.24s; }
.sparkles span:nth-child(5) { left: 86%; top: 42%; animation-delay: 0.32s; font-size: 0.9rem; }
.sparkles span:nth-child(6) { left: 44%; top: 34%; animation-delay: 0.4s; font-size: 0.8rem; }

@keyframes pop {
  0% { opacity: 0; transform: scale(0.3) translateY(14px); }
  35% { opacity: 1; transform: scale(1.25) translateY(-6px); }
  100% { opacity: 0; transform: scale(0.7) translateY(-30px); }
}

/* ── Calling card ─────────────────────────────────────────────────── */
.calling-card {
  background: var(--ivory);
  color: var(--ink);
  border-radius: 10px;
  padding: 26px 28px 24px;
  margin-top: 28px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  text-align: left;
}

.card-script {
  font-family: var(--didone);
  font-style: italic;
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
  color: #6e5a33;
  margin-bottom: 16px;
}

.field { margin-bottom: 14px; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #6e5a33;
}

input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #ddd2b8;
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--gold); }
input.error { border-color: #c74630; }
input::placeholder { color: #b9ac8d; }

/* ── Button ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 8px;
  padding: 15px 30px;
  cursor: pointer;
  transition: transform 0.12s ease;
  box-shadow: 0 4px 0 #8a6c28;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--ivory); outline-offset: 3px; }

.btn-block { width: 100%; }

.form-error { color: #c74630; font-weight: 600; text-align: center; margin-top: 12px; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(20, 20, 25, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Playing card reveal ──────────────────────────────────────────── */
.playing-card {
  position: relative;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  border: 1.5px solid #d8cfb6;
  max-width: 320px;
  margin: 30px auto 0;
  padding: 40px 30px 30px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  animation: levitate 3.2s ease-in-out infinite alternate, appear 0.7s ease both;
}

@keyframes levitate { from { transform: translateY(0); } to { transform: translateY(-10px); } }

@keyframes appear {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pc-corner {
  position: absolute;
  font-size: 1.1rem;
  color: var(--ink);
}

.pc-corner.tl { top: 12px; left: 14px; }
.pc-corner.br { bottom: 12px; right: 14px; transform: rotate(180deg); }

.pc-label {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #6e5a33;
  margin-bottom: 8px;
}

.pc-code {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 7vw, 2rem);
  letter-spacing: 0.08em;
  color: var(--velvet);
  word-break: break-all;
}

.copy-btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--velvet);
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 14px;
  transition: transform 0.12s ease;
}

.copy-btn:hover { transform: translateY(-1px); }

.expires { font-size: 0.72rem; color: #8d7f61; margin-top: 10px; font-weight: 600; }

.pc-note { font-size: 0.8rem; color: #8d7f61; margin-top: 14px; font-style: italic; }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  position: relative;
  text-align: center;
  padding: 30px 20px;
  color: rgba(243, 234, 214, 0.45);
  font-size: 0.8rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .calling-card { padding: 22px 18px 18px; }
}
