:root {
  --sky: #2f74f0;
  --sky-2: #1a4fd6;
  --sky-light: #7fb6ff;
  --navy: #141d5c;
  --yellow: #ffd23f;
  --orange: #ff8a1f;
  --red: #e8323c;
  --white: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.88);
  --line: rgba(255, 255, 255, 0.35);
  --danger: #e8323c;
  --heavy: 'Archivo Black', 'Arial Black', Impact, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    url("qmarks.svg") center top / 480px 480px repeat,
    #e66a24;
  background-attachment: fixed;
  color: var(--white);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding-inline: 16px;
}

html { scroll-behavior: smooth; }

/* Anchor targets land below the sticky nav bar instead of under it. */
#top, #how, #clues, #faq, #answer-section { scroll-margin-top: 90px; }

/* ---------- navigation bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline: -16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, calc((100% - 1100px) / 2)) 12px;
  background: var(--navy);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  flex: none;
  transition: transform 0.35s ease;
}
.logo:hover .logo-mark { transform: rotate(45deg); }

.logo-word {
  font-family: var(--heavy);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.12); color: var(--yellow); }

.menu-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 40px;
  padding: 0 10px;
  background: transparent;
  border: 2px solid var(--white);
  border-radius: 8px;
  box-shadow: none;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}
.menu-toggle:active { transform: none; box-shadow: none; }

@media (max-width: 860px) {
  .topbar { gap: 12px; }
  .menu-toggle { display: flex; }
  .nav { margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 8px 16px 16px;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding-block: 40px 60px;
}

.eyebrow {
  font-family: var(--heavy);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: var(--white);
  margin: 0 0 18px;
}

/* ---------- timer ---------- */

.timer {
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, 2vw, 14px);
  font-family: var(--heavy);
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(52px, 14vw, 84px);
}

.unit span {
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 0.06em var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--navy);
}

.unit label {
  margin-top: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}

.sep {
  font-size: clamp(2rem, 8vw, 3.4rem);
  color: var(--navy);
  line-height: 1;
}

.timer.ended .unit span { color: var(--danger); }

/* ---------- bounty ---------- */

.bounty {
  margin: 28px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  font-weight: normal;
}

.amount {
  position: relative;
  font-family: var(--heavy);
  font-size: clamp(5rem, 22vw, 10rem);
  background: var(--yellow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.amount::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--navy);
  -webkit-text-stroke: 0.1em var(--navy);
  text-shadow: 0 0.07em 0 var(--navy);
}

/* Navy banner strip, like "EVERYTHING YOU SHOULD KNOW" on the box. */
.word {
  font-family: var(--heavy);
  font-size: clamp(0.95rem, 3.4vw, 1.5rem);
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  padding: 8px 22px 6px;
  border-radius: 6px;
  margin-top: 18px;
  transform: rotate(-2deg);
}
@media (max-width: 520px) {
  .word { letter-spacing: 0.04em; padding: 8px 14px 6px; }
}

.pitch {
  color: var(--white);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 24px 0 12px;
}

.funding {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 24px;
  text-shadow: 0 1px 0 var(--navy);
}

/* ---------- answer box ---------- */

.answer {
  width: 100%;
  max-width: 640px;
  margin-bottom: 28px;
}
.answer form { max-width: 480px; margin: 0 auto; }

.answer h2 {
  font-family: var(--heavy);
  font-weight: normal;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--white);
  text-shadow: 0 2px 0 var(--navy);
}

.answer input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  color: var(--navy);
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 10px;
  outline: none;
}
.answer input[type="text"]:focus { border-color: var(--yellow); }

.answer-msg {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 1px 0 var(--navy);
}
.answer-msg.wrong { color: #ffe1dc; }
.answer-msg.win {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--navy);
  text-shadow: none;
  background: var(--yellow);
  border: 3px solid var(--navy);
}

/* ---------- signup card ---------- */

.card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 0 var(--navy);
}

.card h2 { margin: 0 0 6px; font-family: var(--heavy); font-size: 1.4rem; font-weight: normal; }
.muted { color: #4a6284; margin: 0 0 18px; }

form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type='email'],
input[type='password'] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  color: var(--navy);
  background: #eef4ff;
  border: 2px solid var(--sky);
  border-radius: 10px;
  outline: none;
}
input[type='email']:focus,
input[type='password']:focus { border-color: var(--navy); }

button {
  flex: 1 1 auto;
  padding: 14px 20px;
  font-family: var(--heavy);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: linear-gradient(180deg, var(--yellow), var(--orange));
  border: 2px solid var(--navy);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--navy);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }
button:disabled { opacity: 0.6; cursor: wait; }

.error { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: 12px 0 0; font-size: 0.9rem; }

/* ---------- clues ---------- */

.clues {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.clue {
  border: 3px solid var(--navy);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--white);
  color: var(--navy);
}

.clue-num {
  font-family: var(--heavy);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-2);
  margin-bottom: 8px;
}

.clue p { margin: 0; line-height: 1.6; font-size: 1.05rem; white-space: pre-wrap; }

.clue.unlocked {
  box-shadow: 0 6px 0 var(--navy);
  animation: reveal 0.5s ease-out both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- live counter ---------- */

.live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--navy);
}
.live strong { font-family: var(--heavy); font-weight: normal; font-size: 1.1rem; }

.live-dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  animation: ping 1.4s ease-out infinite;
}
@keyframes ping {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(2.6); opacity: 0; }
}

.footer {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-inline: -16px;
  padding: 20px 16px;
  background: var(--navy);
}
.footer p { margin: 0; }

/* ---------- header auth ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-email {
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-ghost,
.btn-small {
  flex: none;
  padding: 9px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-ghost {
  color: var(--white);
  background: transparent;
  border: 2px solid var(--white);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn-ghost:active { transform: translateY(1px); box-shadow: none; }

.btn-small { box-shadow: 0 3px 0 var(--navy); }

@media (max-width: 640px) {
  .nav-email { display: none; }
  .btn-ghost, .btn-small { padding: 8px 12px; font-size: 0.75rem; }
}

/* ---------- auth modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 29, 92, 0.6);
}

.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--white);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--navy);
  padding: 28px 24px 22px;
  animation: reveal 0.2s ease-out;
}

.modal h2 {
  font-family: var(--heavy);
  font-weight: normal;
  font-size: 1.5rem;
  margin: 18px 0 16px;
}

.modal form { flex-direction: column; }
.modal input { flex: none; }

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--navy);
  background: transparent;
  border: none;
  box-shadow: none;
}
.modal-close:active { transform: none; box-shadow: none; }

.tabs {
  display: flex;
  gap: 6px;
  background: #eef4ff;
  border-radius: 10px;
  padding: 4px;
  margin-right: 36px;
}

.tab {
  flex: 1;
  padding: 9px 10px;
  font-size: 0.85rem;
  color: var(--navy);
  background: transparent;
  border: none;
  border-radius: 8px;
  box-shadow: none;
}
.tab.active {
  background: var(--navy);
  color: var(--white);
}
.tab:active { transform: none; box-shadow: none; }

.auth-note {
  margin: -8px 0 16px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  background: #fff3c4;
  border: 2px solid var(--yellow);
  border-radius: 10px;
}

.unlock-btn { width: 100%; }

.clues-anchor {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- how it works ---------- */

.how {
  width: 100%;
  max-width: 640px;
  margin-top: 56px;
  text-align: left;
}

.how h2 {
  font-family: var(--heavy);
  font-weight: normal;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  text-align: center;
  margin: 0 0 20px;
  color: var(--white);
  -webkit-text-stroke: 0.06em var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--navy);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  color: var(--navy);
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--navy);
}

.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--heavy);
  font-size: 1.1rem;
  color: var(--navy);
  background: var(--yellow);
  border: 2px solid var(--navy);
  border-radius: 50%;
}

.steps strong { font-family: var(--heavy); font-weight: normal; font-size: 1.05rem; }
.steps p { margin: 4px 0 0; line-height: 1.5; color: #3d4f73; }

/* ---------- FAQ ---------- */

.faq {
  width: 100%;
  max-width: 640px;
  margin-top: 56px;
  text-align: left;
}

.faq h2 {
  font-family: var(--heavy);
  font-weight: normal;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  text-align: center;
  margin: 0 0 20px;
  color: var(--white);
  -webkit-text-stroke: 0.06em var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--navy);
}

.faq details {
  margin-bottom: 12px;
  color: var(--navy);
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--navy);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-family: var(--heavy);
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  line-height: 1;
  background: var(--yellow);
  border: 2px solid var(--navy);
  border-radius: 50%;
}
.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: 0;
  padding: 0 18px 16px;
  line-height: 1.55;
  color: #3d4f73;
}
