/* Pocket Sprouts — tokens, type, buttons, nav. Colours come from skins/pocket-sprouts/skin.json. */
@font-face { font-family: "Coiny"; src: url("../fonts/coiny.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --cream: #FFF6E4;
  --cream-light: #FFFBF2;
  --ink: #3B2A1A;
  --ink-soft: #6B5340;
  --leaf: #7CC84F;
  --primary: #5AA43C;
  --primary-dark: #3E7F28;
  --gold: #E3A92E;
  --gold-dark: #A9741A;
  --coral: #F28F7F;
  --blue: #41A5D6;
  --forest: #0E3B2E;
  --forest-deep: #072619;
  --night: #1B1430;
  --plum: #3A2350;
  --radius: 28px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --shadow-soft: 0 18px 40px -18px rgba(59, 42, 26, .45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 18px/1.55 "Fredoka", system-ui, sans-serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.display { font-family: "Coiny", "Fredoka", sans-serif; font-weight: 400; line-height: 1.02; letter-spacing: .005em; margin: 0; }
.h2 { font-size: clamp(38px, 5.4vw, 68px); text-wrap: balance; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 13px/1 "Fredoka", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 99px; background: rgba(90, 164, 60, .14); color: var(--primary-dark);
}
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--ink-soft); max-width: 36ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Buttons: the game's green / gold pill buttons, with a pressed lip. */
.btn {
  --bg: var(--primary); --lip: var(--primary-dark); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 99px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, #fff) 0%, var(--bg) 55%);
  box-shadow: 0 6px 0 var(--lip), 0 14px 24px -8px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .45);
  color: var(--fg); font: 700 19px/1 "Fredoka", sans-serif; text-decoration: none; cursor: pointer;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  transition: transform .18s var(--ease-spring), box-shadow .18s ease, filter .2s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); filter: saturate(1.1); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--lip), 0 6px 12px -6px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .45); }
.btn--gold { --bg: #F4BE3F; --lip: var(--gold-dark); --fg: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn--ghost { --bg: rgba(255, 255, 255, .16); --lip: rgba(0, 0, 0, .25); backdrop-filter: blur(8px); }
.btn--lg { min-height: 66px; padding: 0 36px; font-size: 22px; }
.btn img { width: 30px; height: 30px; }
.btn .shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.btn .shine::after {
  content: ""; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(18deg); animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px;
  border-radius: 14px; background: #111; color: #fff; text-decoration: none; font: 600 15px/1.1 "Fredoka", sans-serif;
  transition: transform .2s var(--ease-spring);
}
.badge:hover { transform: translateY(-3px); }
.badge.is-off { filter: grayscale(1); opacity: .78; background: #4a4a4a; color: #e8e8e8; cursor: default; }
.badge.is-off:hover { transform: none; }
.badge small { display: block; font-size: 11px; opacity: .75; font-weight: 500; }
.badge svg { width: 24px; height: 24px; }

/* Nav */
.nav {
  position: fixed; inset: 12px 0 auto; z-index: 50; pointer-events: none;
}
.nav__bar {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 16px; border-radius: 99px;
  background: rgba(255, 251, 242, .0); transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-scrolled .nav__bar { background: rgba(255, 251, 242, .86); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 10px 30px -14px rgba(59, 42, 26, .4); }
.nav__logo img { width: 104px; opacity: 0; transform: translateY(-10px) scale(.8); transition: opacity .35s, transform .45s var(--ease-spring); }
.nav.is-scrolled .nav__logo img { opacity: 1; transform: none; }
.nav__links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 10px 14px; border-radius: 99px; text-decoration: none; font-weight: 600; color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35); transition: background .2s, color .2s;
}
.nav.is-scrolled .nav__links a { color: var(--ink); text-shadow: none; }
.nav__links a:hover { background: rgba(124, 200, 79, .22); }
.nav .btn { min-height: 46px; padding: 0 20px; font-size: 16px; box-shadow: 0 4px 0 var(--lip), inset 0 2px 0 rgba(255, 255, 255, .45); }
@media (max-width: 860px) { .nav__links { display: none; } }

/* Reveal-on-scroll (main.js adds .is-in). */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.pop { opacity: 0; transform: scale(.6) translateY(30px); transition: opacity .5s ease, transform .8s var(--ease-spring); transition-delay: var(--d, 0s); }
.pop.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal, .pop { opacity: 1; transform: none; }
}
