/* Same colours as the app (src/theme.ts). */
:root {
  --bar: #000000;
  --page: #0b0b0b;
  --band: #1a1a1a;
  --line: #2c2c2c;
  --ink: #ffffff;
  --soft: #d4d4d4;
  --muted: #9a9a9a;
  --green: #22e61e;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }

/* Top bar: logo and wordmark only, like the app's bar without the balance, bell and avatar. */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.bar a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bar img { height: 26px; width: auto; display: block; }
.wordmark { font-weight: 900; font-size: 17px; letter-spacing: 0.3px; color: var(--ink); white-space: nowrap; }
.wordmark .r { text-shadow: 0 0 8px rgba(76, 240, 72, 0.6); }
.wordmark svg { display: inline-block; vertical-align: -0.08em; margin: 0 0.01em; filter: drop-shadow(0 0 4px rgba(76, 240, 72, 0.5)); }

main { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }

.hero { display: grid; gap: 32px; align-items: center; padding: 48px 0 40px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 0.9fr; padding: 72px 0 56px; } }
/* Same as the QUEST ROBUX wordmark: Inter Black, all capitals, the same letter spacing. */
.hero h1 { margin: 0 0 14px; font-size: clamp(30px, 5.4vw, 46px); line-height: 1.12; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; }
.hero h1 .g { color: var(--green); }
.hero p { margin: 0 0 24px; color: var(--soft); font-size: 17px; max-width: 34em; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 14px;
  background: var(--green); color: #000; font: inherit; font-weight: 800; font-size: 16px;
  cursor: pointer; border-bottom: 4px solid #17a314;
}
.btn:hover { filter: brightness(1.05); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* The floating phone, with a yellow shine and Quest Points coins falling behind it. */
.stage { position: relative; isolation: isolate; width: min(100%, 440px); margin: 0 auto; }
.phone {
  position: relative; z-index: 2; display: block; width: 100%; height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7)); animation: float 6s ease-in-out infinite;
}
/* Light spilling out around the phone's edges: copies of the phone turned warm white and blurred. */
.halo {
  position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: auto; pointer-events: none;
  animation: float 6s ease-in-out infinite;
}
.halo.wide { filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(-8deg) blur(26px); opacity: 0.75; scale: 1.04; }
.halo.rim { filter: brightness(0) invert(1) sepia(0.5) saturate(3) blur(7px); opacity: 0.85; scale: 1.015; }

.shine {
  position: absolute; z-index: 0; left: 50%; top: 48%; width: 160%; aspect-ratio: 1; translate: -50% -50%;
  /* Rays fade in and out smoothly (no hard stripe edges) and are blurred, so they read as soft light. */
  background:
    radial-gradient(closest-side, rgba(255, 220, 70, 0.55), rgba(255, 190, 30, 0.22) 40%, transparent 70%),
    repeating-conic-gradient(from 0deg, rgba(255, 220, 90, 0) 0deg, rgba(255, 220, 90, 0.16) 7deg, rgba(255, 220, 90, 0) 14deg, rgba(255, 220, 90, 0) 24deg);
  /* Long, gradual fade so the rays melt into the page instead of ending in a circle. */
  -webkit-mask: radial-gradient(closest-side, #000 5%, rgba(0, 0, 0, 0.7) 22%, rgba(0, 0, 0, 0.38) 40%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.05) 76%, transparent 95%);
  mask: radial-gradient(closest-side, #000 5%, rgba(0, 0, 0, 0.7) 22%, rgba(0, 0, 0, 0.38) 40%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.05) 76%, transparent 95%);
  filter: blur(6px);
  animation: spin 60s linear infinite; pointer-events: none;
}
/* Same look as the app's Quest Points coin: black disc, thin white ring, white logo. */
.coin {
  position: absolute; top: 0; left: var(--x); width: var(--s); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a2a2a, #050505 60%);
  box-shadow: inset 0 0 0 calc(var(--s) * 0.05) #050505, inset 0 0 0 calc(var(--s) * 0.075) #fff, 0 0 calc(var(--s) * 0.5) rgba(255, 205, 50, 0.45);
  display: grid; place-items: center; filter: blur(var(--b, 0));
  animation: fall var(--d) linear var(--delay) infinite; translate: 0 -120%;
}
.coin img { width: 52%; height: auto; }
@keyframes fall {
  from { translate: 0 -120%; rotate: var(--r0); }
  to { translate: var(--dx) calc(var(--fall) + 120%); rotate: var(--r1); }
}
/* Whole-page coin rain, behind everything and fixed to the screen. */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
main, footer { position: relative; z-index: 1; }

/* Soft light glowing up from the bottom of the screen: a white-gold core and a gentle bloom,
   added on top with "screen" so it brightens like real light instead of covering things. */
.glow {
  position: fixed; left: 0; right: 0; bottom: 0; height: 45vh; z-index: 5; pointer-events: none;
  mix-blend-mode: screen; overflow: hidden;
  background:
    radial-gradient(55% 18% at 50% 100%, rgba(255, 252, 235, 0.28), transparent 70%),
    radial-gradient(80% 40% at 50% 100%, rgba(255, 214, 90, 0.14), transparent 72%),
    radial-gradient(120% 75% at 50% 100%, rgba(255, 160, 30, 0.06), transparent 75%);
  animation: breathe 7s ease-in-out infinite;
}
.glow .core {
  position: absolute; left: 50%; bottom: -14px; width: 60%; height: 24px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 253, 242, 0.6), rgba(255, 236, 160, 0.35) 40%, transparent);
  filter: blur(6px);
}

/* Warm light glowing from behind the middle of the phone. */
.mid-light {
  /* A perfect circle (aspect-ratio 1), much bigger than the phone. */
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  /* Light fades off gradually, many small steps like real light, so no edge of the circle shows. */
  background:
    radial-gradient(circle closest-side, rgba(255, 250, 225, 0.55), rgba(255, 246, 210, 0.36) 5%, rgba(255, 240, 190, 0.2) 10%,
      rgba(255, 235, 170, 0.08) 16%, rgba(255, 235, 170, 0) 24%),
    radial-gradient(circle closest-side, rgba(255, 205, 80, 0.5), rgba(255, 200, 75, 0.4) 8%, rgba(255, 195, 70, 0.3) 16%,
      rgba(255, 185, 60, 0.21) 25%, rgba(255, 175, 50, 0.14) 35%, rgba(255, 165, 45, 0.085) 46%, rgba(255, 160, 40, 0.045) 58%,
      rgba(255, 155, 35, 0.02) 71%, rgba(255, 150, 30, 0.006) 85%, rgba(255, 150, 30, 0) 100%);
  animation: breathe 7s ease-in-out infinite;
}

/* Soft black shadow on the "floor" under the phone. It shrinks and fades as the phone floats up. */
.ground {
  position: absolute; z-index: 1; left: 47%; bottom: -3%; width: 70%; height: 8%; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0) 100%);
  filter: blur(5px); animation: ground 6s ease-in-out infinite; pointer-events: none;
}
@keyframes ground { 50% { transform: scale(0.82); opacity: 0.7; } }

/* Tiny four-point stars twinkling behind the phone. */
.stars { position: absolute; z-index: 1; inset: -12% -22%; pointer-events: none; }
.star {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1;
  background: radial-gradient(circle, #fff 0 18%, #ffe9a8 40%, rgba(255, 220, 120, 0.4) 70%);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  opacity: 0; animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}
@keyframes breathe { 50% { opacity: 0.8; } }

@keyframes float { 50% { translate: 0 -12px; } }
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .phone, .halo, .shine, .glow, .mid-light, .ground { animation: none; }
  .star { animation: none; opacity: 0.6; }
  .coin { animation-duration: 0s; animation-iteration-count: 1; animation-fill-mode: forwards; animation-timing-function: steps(1); }
}

/* scroll-margin keeps a section's heading clear of the sticky top bar when a top link jumps to it. */
.section { padding: 44px 0; border-top: 1px solid var(--line); scroll-margin-top: 30px; }
.section h2 { margin: 0 0 12px; font-size: 28px; font-weight: 900; }
.section .lead { margin-bottom: 22px; max-width: 40em; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: linear-gradient(180deg, #1f1f1f, var(--band)); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(34, 230, 30, 0.5); }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card p { margin: 0; color: var(--soft); font-size: 14.5px; }
.icon { margin-bottom: 12px; }
.icon svg { display: block; width: 44px; height: 44px; fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.icon svg .fill { fill: var(--green); stroke: none; }
.icon svg .fill-soft { fill: rgba(34, 230, 30, 0.3); }
.icon svg .q { fill: var(--green); stroke: none; font: 900 16px Inter, sans-serif; }
.lead { margin: 0; color: var(--soft); font-size: 17px; }
.steps { margin: 0; padding-left: 20px; color: var(--soft); }
.steps li { margin-bottom: 8px; }

/* Top bar links */
.links { margin-left: auto; display: flex; gap: 18px; }
.links a { color: var(--soft); text-decoration: none; font-weight: 600; font-size: 14px; }
.links a:hover { color: var(--green); }
@media (max-width: 480px) { .links { display: none; } }

.pill {
  display: inline-block; margin-bottom: 16px; padding: 6px 12px; border-radius: 999px;
  background: rgba(34, 230, 30, 0.12); color: var(--green); font-weight: 800; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(34, 230, 30, 0.35);
}
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); border-bottom-width: 4px; text-decoration: none; }
.hero { position: relative; }
.hero::before {
  content: ''; position: absolute; top: 10%; right: 0; width: min(420px, 100%); height: 420px; z-index: -1;
  background: radial-gradient(closest-side, rgba(34, 230, 30, 0.16), transparent); pointer-events: none;
}

/* Quick facts strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 8px;
  background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.stats div { background: var(--band); padding: 20px 14px; text-align: center; }
.stats b { display: block; font-size: 30px; font-weight: 900; color: var(--green); line-height: 1.1; }
.stats span { color: var(--soft); font-size: 13.5px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Numbered how-it-works steps */
.steps.big { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps.big li {
  counter-increment: s; margin: 0; padding: 20px; border-radius: 18px; background: var(--band); border: 1px solid var(--line);
}
.steps.big li::before {
  content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px;
  border-radius: 12px; background: var(--green); color: #000; font-weight: 900; font-size: 18px;
}
.steps.big b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* Levels ladder */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.rung {
  border-radius: 16px; padding: 16px 12px; text-align: center; background: var(--band); border: 1px solid var(--line);
}
.rung:nth-child(1) { min-height: 120px; }
.rung:nth-child(2) { min-height: 145px; }
.rung:nth-child(3) { min-height: 170px; }
.rung.top { min-height: 195px; border-color: var(--green); box-shadow: 0 0 24px rgba(34, 230, 30, 0.25); }
.rung .lv { display: block; color: var(--muted); font-weight: 700; font-size: 13px; }
.rung b { display: block; font-size: 30px; font-weight: 900; color: var(--green); margin: 6px 0 2px; }
.rung small { color: var(--soft); }
@media (max-width: 560px) { .ladder { grid-template-columns: repeat(2, 1fr); } .rung { min-height: 0 !important; } }

/* FAQ */
details { background: var(--band); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--green); font-size: 20px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 0 0 16px; color: var(--soft); }

/* Closing call to action */
.cta { margin-top: 20px; padding: 40px 20px; text-align: center; }
.cta h2 { margin: 0 0 18px; font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
.note { color: var(--muted); font-size: 14px; }

/* Download panel: the QR code goes here once the app is on Google Play. */
dialog {
  border: 1px solid var(--line); border-radius: 20px; background: var(--band); color: var(--ink);
  padding: 24px; width: min(92vw, 360px); text-align: center;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h3 { margin: 0 0 14px; }
.qr {
  width: 200px; height: 200px; margin: 0 auto 14px; border-radius: 14px;
  border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 14px; padding: 12px;
}
dialog .close { margin-top: 8px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-bottom-width: 1px; }

footer { border-top: 1px solid var(--line); padding: 24px 16px 40px; text-align: center; color: var(--muted); font-size: 13.5px; }
footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
footer p { margin: 4px 0; }

/* Privacy page */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 16px 56px; }
.doc h1 { font-size: 34px; font-weight: 900; margin: 0 0 6px; }
.doc h2 { font-size: 19px; margin: 28px 0 8px; }
.doc p { color: var(--soft); margin: 0 0 10px; }
