/* playpulsedrop.com — the same tokens as the game's design system, so the site
   and the app read as one product. Values mirror lib/core/design_system.dart. */
:root {
  --navy: #08111f;
  --navy2: #0e1a2e;
  --surface: #13213a;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #3d7bff;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #f5c542;
  --text: #f4f7ff;
  --muted: #8fa3c7;
  --dim: #5b6e92;
  --display: Orbitron, "Segoe UI", system-ui, sans-serif;
  --body: Exo2, "Segoe UI", system-ui, -apple-system, sans-serif;
}

@font-face {
  font-family: Orbitron;
  src: url("/fonts/Orbitron.ttf") format("truetype-variations");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: Exo2;
  src: url("/fonts/Exo2.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The ambient ground: the same deep gradient and nebula the game draws. */
body {
  min-height: 100dvh;
  background:
    radial-gradient(60rem 40rem at 18% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(50rem 36rem at 92% 8%, rgba(61, 123, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #0f1d38 0%, var(--navy) 55%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem 3rem;
}
.wrap.narrow { max-width: 42rem; }

/* ---- brand ---- */
.logo {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: clamp(2rem, 8vw, 4rem);
  margin: 0.4em 0 0.1em;
  background: linear-gradient(100deg, #eaf2ff 10%, var(--cyan) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 2.4rem rgba(61, 123, 255, 0.35);
}
.logo.small { font-size: clamp(1.25rem, 5vw, 1.9rem); letter-spacing: 0.3em; }

.tagline {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.hero { text-align: center; position: relative; }
.hero canvas {
  display: block;
  margin: 0 auto -2.5rem;
  width: min(80vw, 24rem);
  height: auto;
  opacity: 0.95;
}

.lede { color: var(--muted); max-width: 40rem; margin-inline: auto; }

/* ---- buttons ---- */
.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0 0;
}
.btn {
  display: inline-block;
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(100deg, var(--blue), var(--violet));
  border-color: transparent;
  box-shadow: 0 0.6rem 2rem rgba(61, 123, 255, 0.38);
}
.btn.primary:hover { box-shadow: 0 0.8rem 2.6rem rgba(61, 123, 255, 0.5); }
.btn.disabled {
  opacity: 0.62;
  cursor: default;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}
.btn.disabled:hover { transform: none; }

/* ---- cards ---- */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 4rem;
}
.card, .panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.6rem;
  backdrop-filter: blur(8px);
}
.card h2 { font-size: 1.05rem; margin: 0 0 0.5rem; letter-spacing: 0.01em; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---- challenge ---- */
.panel { margin-top: 1.5rem; }
.challenge { text-align: center; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.4rem;
}
.score {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 16vw, 5.5rem);
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 3rem rgba(34, 211, 238, 0.4);
}
.sub { color: var(--dim); margin: 0.3rem 0 1.6rem; font-size: 0.95rem; }

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0;
  margin: 0 0 1.6rem;
}
.stats li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.7rem 0.2rem;
}
.stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.stats span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (max-width: 26rem) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.code { margin-top: 1.5rem; text-align: left; }
.code summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}
.code input {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.7rem 0.9rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}

.note {
  margin: 1.2rem 0 0;
  font-size: 0.85rem;
  color: var(--dim);
}
.note.verified::before {
  content: "✓ ";
  color: var(--cyan);
}

/* ---- prose (privacy, terms) ---- */
.prose { color: var(--muted); }
.prose h2 {
  color: var(--text);
  font-size: 1.4rem;
  margin: 2.2rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.prose h3 { color: var(--text); font-size: 1.05rem; margin: 1.6rem 0 0.4rem; }
.prose a { color: var(--cyan); }
.prose code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose ul { padding-left: 1.2rem; }

/* ---- footer ---- */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.25rem 2.2rem;
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.fineprint {
  margin: 1rem auto 0;
  max-width: 32rem;
  font-size: 0.82rem;
  color: var(--dim);
  text-align: center;
}

/* ---- store ---- */
.store .logo.small { display: inline-block; text-decoration: none; }
.store-status { min-height: 1.4em; margin: 0.8rem 0 0; color: var(--muted); font-size: 0.95rem; }
.store-status.good { color: var(--cyan); }
.store-status.bad { color: #ff7a90; }
.store-items { display: grid; gap: 0.75rem; margin-top: 1.2rem; }
.store-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}
.store-item.featured { border-color: rgba(61, 123, 255, 0.55); background: rgba(61, 123, 255, 0.08); }
.store-item h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.store-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.store-item .btn { flex: none; min-width: 6.5rem; justify-content: center; }
.store-item .btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.store-recover label { display: block; color: var(--muted); font-size: 0.85rem; margin: 0.8rem 0 0.4rem; }
.store-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.store-row input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 30rem) {
  .store-item { flex-direction: column; align-items: stretch; }
}
