/* THE VAULT — simple, premium, editorial. Hyro x Creatine $50k.
   Deep warm near-black canvas, generous negative space, one red accent.
   The "vault" reads through restraint: a single hairline seam, a tactile
   4-digit entry, and one confident unlock moment. No 3D safe, no chrome,
   no gimmick motion. Apple/luxury landing language. */

:root {
  --red: #fb0d1b;
  --red-soft: #ff2b38;
  --ink: #0a0807;            /* near-black, warm */
  --ink-2: #110d0c;
  --paper: #f6f1ea;          /* warm off-white */
  --paper-dim: rgba(246, 241, 234, 0.62);
  --paper-faint: rgba(246, 241, 234, 0.34);
  --line: rgba(246, 241, 234, 0.12);
  --line-strong: rgba(246, 241, 234, 0.24);
  --serif: "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100dvh; }

/* warm radial vignette — subtle, expensive, not busy */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(80, 22, 18, 0.42), transparent 55%),
    radial-gradient(140% 120% at 50% 120%, rgba(20, 12, 10, 0.9), var(--ink) 70%);
  pointer-events: none;
  z-index: 0;
}

.vault-root {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 72px) 24px;
  text-align: center;
}

/* ---------------------------------------------------------------- */
/* Type                                                              */
/* ---------------------------------------------------------------- */
.kicker {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 600;
  margin-bottom: 22px;
}

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--paper);
}
.headline .amt { color: var(--red); font-style: italic; }

.sub {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 30ch;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* ---------------------------------------------------------------- */
/* The seam — the one ornament. A thin vertical line of light that   */
/* "splits" on the win moment. Reads as a vault door joint.          */
/* ---------------------------------------------------------------- */
.seam {
  position: relative;
  width: 1px;
  height: clamp(48px, 9vh, 90px);
  margin: 0 auto 38px;
  background: linear-gradient(var(--line-strong), transparent);
}
.seam::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(251, 13, 27, 0.7);
}

/* ---------------------------------------------------------------- */
/* Countdown — clean, airy, mono-ish numerals                        */
/* ---------------------------------------------------------------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  margin: 6px auto 42px;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.cd-num {
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.cd-lbl {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.cd-sep {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  color: var(--line-strong);
  line-height: 1;
  align-self: flex-start;
}

/* ---------------------------------------------------------------- */
/* Buttons / CTA                                                     */
/* ---------------------------------------------------------------- */
.cta, .unlock-btn, .again-btn {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  transition: transform 0.18s cubic-bezier(.16,1,.3,1), background 0.18s, opacity 0.18s;
}
.cta {
  display: inline-block;
  text-decoration: none;
  background: var(--red);
  color: #fff;
  padding: 15px 34px;
  box-shadow: 0 10px 30px -12px rgba(251, 13, 27, 0.7);
}
.cta:hover, .unlock-btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--red-soft); }
.cta:active, .unlock-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }

.fine {
  margin: 22px auto 0;
  font-size: 12px;
  color: var(--paper-faint);
  max-width: 34ch;
  line-height: 1.5;
}

.tc-link {
  display: inline-block;
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.tc-link:hover { color: var(--paper-dim); }

/* ---------------------------------------------------------------- */
/* Email gate                                                        */
/* ---------------------------------------------------------------- */
.panel { width: 100%; max-width: 460px; }

.entry h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 20px;
  color: var(--paper);
}
.entry input,
.email-field {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  text-align: center;
  padding: 14px 6px;
  outline: none;
  transition: border-color 0.2s;
}
.entry input::placeholder { color: var(--paper-faint); }
.entry input:focus { border-color: var(--red); }
.entry .unlock-btn { margin-top: 26px; }

.unlock-btn {
  background: var(--red);
  color: #fff;
  padding: 14px 38px;
  box-shadow: 0 10px 30px -12px rgba(251, 13, 27, 0.7);
}
.unlock-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.unlock-btn.big { padding: 16px 52px; font-size: 14px; margin-top: 8px; }

/* ---------------------------------------------------------------- */
/* The lock — premium tactile 4-digit entry                          */
/* ---------------------------------------------------------------- */
.lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
}

.attempts-left {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 26px;
}
.attempts-left.none { color: var(--red); }

.digits {
  display: flex;
  gap: clamp(10px, 3vw, 18px);
  justify-content: center;
  margin-bottom: 30px;
}
.digit {
  width: clamp(58px, 17vw, 76px);
  height: clamp(76px, 22vw, 98px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 46px);
  color: var(--paper);
  background: rgba(246, 241, 234, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.digit.filled { background: rgba(246, 241, 234, 0.06); }
.digit.active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(251, 13, 27, 0.35), 0 10px 30px -16px rgba(251, 13, 27, 0.8);
}
.digit.active::after {
  content: "";
  position: absolute;
  bottom: 14px;
  width: 1.5px; height: 22px;
  background: var(--red);
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Keypad */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 2.6vw, 14px);
  width: 100%;
  max-width: 300px;
  margin: 0 auto 28px;
}
.key {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(22px, 6vw, 28px);
  color: var(--paper);
  background: rgba(246, 241, 234, 0.04);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.12s, border-color 0.15s;
}
.key:hover { background: rgba(246, 241, 234, 0.09); border-color: var(--line-strong); }
.key:active { transform: scale(0.94); background: rgba(251, 13, 27, 0.18); border-color: var(--red); }
.key.fn {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  background: transparent;
  border-color: transparent;
}
.key.fn:hover { color: var(--paper-dim); background: rgba(246,241,234,0.04); }
.key.fn:active { transform: scale(0.94); }
.key[aria-disabled="true"] { opacity: 0.3; pointer-events: none; }

.dial-hint {
  font-size: 11px;
  color: var(--paper-faint);
  letter-spacing: 0.04em;
  margin-bottom: 26px;
}

/* ---------------------------------------------------------------- */
/* Unlocking + result                                                */
/* ---------------------------------------------------------------- */
.unlocking-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 18px 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

.result { margin-top: 8px; }
.result h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.result .r-miss { color: var(--paper); }
.result .r-dup, .result .r-err { color: var(--red); }
.result p { color: var(--paper-dim); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.again-btn {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 12px 30px;
}
.again-btn:hover { border-color: var(--red); color: #fff; transform: translateY(-1px); }

.view-wall {
  display: inline-block;
  margin-top: 26px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.view-wall:hover { color: var(--paper-dim); }

/* ---------------------------------------------------------------- */
/* Wall — minimal, eliminated codes                                  */
/* ---------------------------------------------------------------- */
.wall {
  margin: 30px auto 0;
  width: 100%;
  max-width: 460px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.wall-head {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wall-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.wall-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  max-height: 168px;
  overflow-y: auto;
}
.wall-code {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper-faint);
  position: relative;
  font-variant-numeric: tabular-nums;
}
.wall-code::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 52%;
  height: 1px;
  background: var(--red);
  opacity: 0.55;
}

/* ---------------------------------------------------------------- */
/* Win takeover — restrained, editorial, one big number              */
/* ---------------------------------------------------------------- */
.win-takeover {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background:
    radial-gradient(110% 80% at 50% 30%, rgba(80, 22, 18, 0.55), transparent 60%),
    var(--ink);
  animation: fadein 0.7s ease both;
  text-align: center;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.reveal { max-width: 540px; }
.rv-kicker {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 30px;
}
.rv-cash-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 12px;
}
.cash-amount {
  font-family: var(--serif);
  font-size: clamp(56px, 16vw, 124px);
  font-weight: 400;
  line-height: 0.95;
  color: var(--paper);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rv-aud {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-top: 14px;
}
.rv-code {
  margin-top: 34px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.rv-code b { color: var(--red); font-weight: 600; letter-spacing: 0.1em; }
.rv-winner {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--paper);
}
.rv-next {
  margin-top: 36px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s, transform 0.6s;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.rv-next.show { opacity: 1; transform: none; }
.rv-next-title {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 18px;
}
.rv-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  max-width: 380px;
  text-align: left;
}
.rv-steps li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: var(--paper-dim);
  line-height: 1.5;
  padding: 9px 0;
}
.rv-n {
  flex: none;
  font-family: var(--serif);
  color: var(--red);
  font-size: 15px;
  width: 18px;
}

/* Confetti — minimal: a few red + cream slivers only */
.cine-confetti { position: fixed; inset: 0; z-index: 41; pointer-events: none; overflow: hidden; }
.conf {
  position: absolute;
  top: -24px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--paper);
  animation-name: fall;
  animation-timing-function: cubic-bezier(.3,.6,.5,1);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
.conf-red { color: var(--red); }
.conf-cream { color: var(--paper); }
.conf-cash { color: var(--red); font-weight: 700; }
@keyframes fall {
  0% { transform: translate(0, -24px) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(var(--drift), 105vh) rotate(var(--rot)); opacity: 0; }
}

/* ---------------------------------------------------------------- */
/* Turnstile — visually hidden background widget                     */
/* ---------------------------------------------------------------- */
.ts-wrap {
  position: fixed;
  bottom: 0; left: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.ts-wrap.needs {
  width: auto; height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}
.ts-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--paper-dim);
  text-align: center;
}

/* hide Turnstile's own injected badge/iframe when not needed */
.ts-wrap:not(.needs) iframe { visibility: hidden; }

/* ---------------------------------------------------------------- */
/* Reduced motion                                                    */
/* ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .unlocking-label, .digit.active::after { animation: none; }
  .conf { display: none; }
  .win-takeover, .rv-next { animation: none; transition: none; opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .digit { border-radius: 11px; }
}
