/* Hunt'em site. Tokens come straight from the app (lib/theme.ts). */
:root {
  --forest: #1f3d2b;
  --forest-deep: #163021;
  --cream: #faf3e3;
  --parchment: #f4e9d2;
  --edge: #e8d5b0;
  --gold: #d9a441;
  --ink: #3b2f2a;
  --ink-mid: #6b5a50;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  background: var(--forest);
}
.wordmark {
  font: 700 1.5rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--cream);
  text-decoration: none;
  display: inline-flex; align-items: center;
}
/* The apostrophe is a little gold Gem, as on the box. */
.gem-apos {
  width: 0.55em; height: 0.55em; margin: 0 0.06em 0.5em;
  background: var(--gold);
  border-radius: 45% 45% 50% 50% / 60% 60% 40% 40%;
  transform: rotate(-12deg);
  box-shadow: inset -2px -3px 0 rgba(0,0,0,0.18);
}
.bar nav { display: flex; gap: 20px; }
.bar nav a { color: var(--cream); font-weight: 600; text-decoration: none; }
.bar nav a:hover { color: var(--gold); }

/* Home hero: Gems tucked half out of sight round the edges, the way a child finds them. */
.hero {
  position: relative; overflow: hidden;
  background: var(--forest);
  color: var(--cream);
  padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(72px, 12vw, 150px);
}
.hero-text { position: relative; z-index: 1; max-width: 40rem; }
.hero h1 {
  margin: 0 0 24px;
  font: 700 clamp(2.4rem, 7vw, 4.4rem)/1.04 var(--display);
  letter-spacing: -0.01em;
}
.lede { margin: 0 0 20px; font-size: clamp(1.0625rem, 2.2vw, 1.25rem); max-width: 34rem; }
.status { margin: 0; color: var(--gold); font-weight: 700; }
.hid { position: absolute; width: clamp(64px, 14vw, 210px); filter: drop-shadow(0 8px 14px rgba(0,0,0,0.38)); }
/* Each one half out of sight: behind the left edge, under the fold, off the right edge. */
.g1 { left: -4%;  bottom: -9%;  transform: rotate(-18deg); }
.g2 { right: 14%; top: 12%;     transform: rotate(14deg); width: clamp(52px, 9vw, 140px); }
.g3 { right: -5%; bottom: 22%;  transform: rotate(-8deg); width: clamp(64px, 17vw, 260px); }
.g4 { right: 30%; bottom: -10%; transform: rotate(22deg); width: clamp(44px, 8vw, 120px); }
@media (max-width: 760px) {
  .g2 { top: auto; bottom: -5%; right: 36%; width: 60px; }
  .g3 { bottom: -4%; right: -6%; width: 96px; }
  .g4 { display: none; }
  .hero { padding-bottom: 96px; }
}

/* How a hunt works: a real sequence, so it is numbered. */
.how { padding: clamp(56px, 9vw, 104px) var(--gutter); max-width: 72rem; }
.how h2 { margin: 0 0 32px; font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.15 var(--display); color: var(--forest); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0;
  display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 14px;
  border: 3px solid var(--gold); border-radius: 50%;
  font: 700 1.35rem/1 var(--display); color: var(--forest);
}
.steps h3 { margin: 0 0 6px; font: 600 1.3rem/1.2 var(--display); color: var(--forest); }
.steps p { margin: 0; max-width: 30ch; color: var(--ink-mid); }
.reuse { margin: 40px 0 0; max-width: 40rem; font-weight: 600; }

/* Reading pages (Help, Privacy) */
.prose { max-width: 68ch; padding: clamp(40px, 7vw, 80px) var(--gutter) 72px; }
.prose h1 { margin: 0 0 8px; font: 700 clamp(2rem, 5vw, 2.8rem)/1.1 var(--display); color: var(--forest); }
.prose h2 { margin: 2.2em 0 0.4em; font: 600 1.35rem/1.25 var(--display); color: var(--forest); }
.prose h3 { margin: 1.6em 0 0.3em; font: 700 1.0625rem/1.4 var(--body); }
.prose p, .prose ul { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose .updated { color: var(--ink-mid); font-size: 0.95rem; margin-bottom: 2em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--edge); }
.prose th { font-weight: 700; }

/* "You found a Gem" and 404 */
.found {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 56px var(--gutter);
  background: var(--forest); color: var(--cream);
}
.found h1 { margin: 0 0 16px; font: 700 clamp(2rem, 6vw, 3.2rem)/1.1 var(--display); }
.found .lede { max-width: 30rem; }
.found a { color: var(--gold); }
.found .small { max-width: 26rem; font-size: 0.95rem; opacity: 0.85; margin-top: 28px; }
.found-gem { width: 132px; margin-bottom: 20px; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.4));
  animation: pop 700ms cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .found-gem { animation: none; } }
.button {
  display: inline-block; margin-top: 8px; padding: 14px 26px;
  background: var(--gold); color: var(--forest) !important; text-decoration: none;
  font: 600 1.1rem/1 var(--display); border-radius: 16px;
  box-shadow: 0 5px 0 #a97a2b;
}
.button:active { transform: translateY(3px); box-shadow: 0 2px 0 #a97a2b; }

/* Footer */
.foot { background: var(--forest-deep); color: var(--cream); padding: 28px var(--gutter); font-size: 0.92rem; }
.foot p { margin: 0 0 6px; max-width: 70ch; }
.foot a { color: var(--gold); }
