/* ── Switchback ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'National Park';
  src: url('assets/fonts/NationalPark-Variable.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --sand:       #F6F0E2;
  --ink:        #2A2419;
  --body:       #463F30;
  --muted:      #5A523F;
  --faint:      #6F6650;
  --rule:       rgba(74, 53, 39, .14);

  --green:      #225B3F;
  --green-hover:#1E4D2E;
  --green-deep: #14331E;
  --mint:       #F2FBF3;
  --sage:       #CFE3D3;

  --amber:      #E0922F;
  --amber-lift: #EDA84B;
  --amber-deep: #C97A1F;
  --bark:       #3A2410;

  --teal:       #274F62;
  --canopy:     #1B2A16;

  --display: 'Fredoka', ui-sans-serif, system-ui, sans-serif;
  --text:    'Nunito', ui-sans-serif, system-ui, sans-serif;
  --trail:   'National Park', ui-sans-serif, system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--body);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--green); }

::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Small caps trail marker used for eyebrows and badges */
.eyebrow {
  font-family: var(--trail);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
}

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

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 240, 226, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  padding-block: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header a { font-size: 13px; }

.back {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.back:hover { color: var(--green); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
}

.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--green); }

.pill-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--green);
  color: var(--mint);
  font-weight: 700;
  box-shadow: 0 3px 0 var(--green-deep);
}
.site-nav .pill-cta:hover { background: var(--green-hover); color: var(--mint); }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--canopy);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 30, 18, .42) 0%,
    rgba(20, 30, 18, 0) 34%,
    rgba(20, 30, 18, .62) 88%
  );
}

.hero .wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  animation: riseIn .9s .18s cubic-bezier(.2, .7, .2, 1) both;
}

.btn-amber {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 26px;
  background: var(--amber);
  color: var(--bark);
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  box-shadow: 0 5px 0 var(--amber-deep);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-amber:hover { background: var(--amber-lift); color: var(--bark); }
.btn-amber:active { transform: translateY(5px); box-shadow: 0 0 0 var(--amber-deep); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(246, 240, 226, .16);
  border: 1px solid rgba(246, 240, 226, .3);
  color: #F4ECD8;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-family: var(--trail);
  backdrop-filter: blur(6px);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-lift);
  display: block;
}

/* ── The game ───────────────────────────────────────────────────────────── */

.section-what { padding: 88px 0 20px; }

.lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
  max-width: 20ch;
  text-wrap: pretty;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-top: 52px;
}

.card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 8px 22px rgba(74, 53, 39, .08);
}

.card .eyebrow { display: block; margin-bottom: 14px; }

.card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

/* ── Biome packs ────────────────────────────────────────────────────────── */

.section-packs { padding: 84px 0 20px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 34px;
  color: var(--ink);
  margin: 0;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.pack {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  box-shadow: 0 10px 26px rgba(74, 53, 39, .1);
}

.pack img { width: 100%; height: auto; display: block; }

.pack figcaption {
  padding: 20px 24px;
  font-size: 15px;
  color: var(--muted);
}

/* ── Trail run ──────────────────────────────────────────────────────────── */

.section-game { padding: 84px 0 20px; }

.runner-card {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--canopy);
  box-shadow: 0 10px 26px rgba(74, 53, 39, .12);
}

.runner-stage {
  position: relative;
  height: clamp(240px, 30vw, 340px);
  background: var(--canopy);
}

.runner-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;   /* no double-tap zoom while jumping */
  user-select: none;
}
.runner-canvas:focus { outline: none; }
.runner-canvas:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -4px;
}

.runner-hud {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  gap: 18px;
  pointer-events: none;
}

.runner-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--trail);
  color: #F4ECD8;
  text-shadow: 0 1px 3px rgba(12, 20, 12, .7);
}
.runner-stat i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .72;
}
.runner-stat b { font-size: 16px; font-weight: 500; letter-spacing: .06em; }

/* Start / game-over card, floating over the sky. Hidden while a run is live —
   and set high enough to clear the Hikee, who stands at the left of the trail. */
.runner-msg {
  position: absolute;
  inset: auto 0 34%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 22px;
  width: fit-content;
  max-width: min(90%, 460px);
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(14, 26, 16, .46);
  backdrop-filter: blur(4px);
  text-align: center;
  pointer-events: none;
}
.runner-msg[hidden] { display: none; }

.runner-msg strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(19px, 2.6vw, 26px);
  color: #FFF8EA;
  text-shadow: 0 2px 10px rgba(12, 20, 12, .8);
}

.runner-msg span {
  font-size: 13px;
  color: #E4DAC2;
  text-shadow: 0 1px 6px rgba(12, 20, 12, .85);
}

.runner-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 18px 24px;
  background: var(--sand);
  border-top: 1px solid var(--rule);
}

.runner-hint {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  text-wrap: pretty;
}

.runner-hint kbd {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  box-shadow: 0 2px 0 rgba(74, 53, 39, .18);
  color: var(--ink);
}

.runner-btn {
  padding: 12px 24px;
  border: 0;
  border-radius: 22px;
  background: var(--amber);
  color: var(--bark);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--amber-deep);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.runner-btn:hover { background: var(--amber-lift); }
.runner-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--amber-deep); }

/* ── Follow ─────────────────────────────────────────────────────────────── */

.section-follow { padding: 88px 0 96px; }

.follow-card {
  background: var(--green);
  border-radius: 28px;
  padding: clamp(34px, 5vw, 60px);
  color: var(--mint);
  box-shadow: 0 8px 0 var(--green-deep);
}

.follow-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--bark);
  font-family: var(--trail);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.follow-card h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 42px);
  margin: 0 0 14px;
  color: var(--mint);
  text-wrap: pretty;
}

.follow-card > p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--sage);
  margin: 0 0 32px;
  max-width: 52ch;
  text-wrap: pretty;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 24px;
  border-radius: 22px;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.social:hover { background: #FFFFFF; color: var(--ink); }
.social:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(0, 0, 0, .22); }

.social svg { display: block; flex: none; }

/* A flower springs up behind the button on hover or keyboard focus. */
.plant {
  position: absolute;
  left: 28px;
  bottom: calc(100% - 6px);
  width: 30px;
  height: 46px;
  pointer-events: none;
  transform-origin: bottom center;
  transform: translateX(-50%) scale(0) rotate(-14deg);
  opacity: 0;
  transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}

.social:hover .plant,
.social:focus-visible .plant {
  transform: translateX(-50%) scale(1) rotate(0deg);
  opacity: 1;
}

.plant i {
  position: absolute;
  display: block;
}

.plant .stem   { left: 13px; bottom: 0; width: 4px; height: 26px; border-radius: 2px; background: #4C8A63; }
.plant .leaf-l { left: 0; bottom: 12px; width: 13px; height: 9px; border-radius: 9px 0 9px 0; background: #7BAE8A; transform: rotate(-10deg); }
.plant .leaf-r { right: 0; bottom: 18px; width: 13px; height: 9px; border-radius: 0 9px 0 9px; background: #9DB05E; transform: rotate(10deg); }

.plant .petal  { width: 10px; height: 10px; border-radius: 50%; background: var(--petal); }
.plant .p1 { left: 10px; top: 0; }
.plant .p2 { left: 4px;  top: 7px; }
.plant .p3 { left: 16px; top: 7px; }
.plant .p4 { left: 10px; top: 13px; background: var(--petal-soft); }

.plant .core { left: 11px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--core); }

.plant-yt { --petal: #C77FA6; --petal-soft: #D79CBC; --core: #E0922F; }
.plant-tt { --petal: #EDA84B; --petal-soft: #F4C079; --core: #B5482E; }
.plant-ig { --petal: #8FBFD9; --petal-soft: #C3E2EE; --core: #E0922F; }

/* ── Legal pages ────────────────────────────────────────────────────────── */

.legal { padding: 64px 0 96px; }

.legal-wrap { max-width: 860px; }

.legal-head { margin-bottom: 40px; }

.legal-head h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 14px 0 0;
}

.legal-date {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--faint);
}

.legal-toc {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 8px 22px rgba(74, 53, 39, .08);
  margin-bottom: 48px;
}

.legal-toc .eyebrow { display: block; margin-bottom: 16px; }

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 34px;
}

.legal-toc li {
  break-inside: avoid;
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.5;
}

.legal-body { font-size: 17px; line-height: 1.7; }

.legal-body p { margin: 0 0 18px; text-wrap: pretty; }

.legal-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.25;
  color: var(--ink);
  margin: 56px 0 18px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 84px;
  text-wrap: pretty;
}

.legal-body h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  margin: 36px 0 12px;
  scroll-margin-top: 84px;
  text-wrap: pretty;
}

.legal-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.legal-body li {
  margin-bottom: 10px;
  text-wrap: pretty;
}

.legal-body li::marker { color: var(--amber-deep); }

.legal-body strong { color: var(--ink); font-weight: 700; }

/* Contact details and other short standalone notes */
.legal-callout {
  background: var(--mint);
  border: 1px solid var(--sage);
  border-radius: 18px;
  padding: 18px 22px;
  margin: 0 0 18px;
}

@media (max-width: 640px) {
  .legal { padding-top: 44px; }
  .legal-toc ol { columns: 1; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--rule); }

.site-footer .wrap {
  padding: 30px 26px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a { color: var(--faint); }
.footer-links a:hover { color: var(--green); }

/* ── Cookie notice ──────────────────────────────────────────────────────── */

/* Hidden until the script decides the visitor is outside the US. */
.cookie-notice[hidden] { display: none; }

.cookie-notice {
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  animation: riseIn .5s cubic-bezier(.2, .7, .2, 1) both;
}

.cookie-card {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  padding: 22px 26px;
  border-radius: 24px;
  border: 1px solid var(--rule);
  background: var(--sand);
  box-shadow: 0 10px 30px rgba(42, 36, 25, .22);
}

.cookie-card p {
  flex: 1 1 300px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

/* Both choices share one look, so neither is nudged. */
.cookie-btn {
  flex: 1 1 auto;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(74, 53, 39, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cookie-btn:hover { background: var(--mint); }
.cookie-btn:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(74, 53, 39, .22); }

@media (max-width: 560px) {
  .cookie-actions { width: 100%; }
}

/* ── Motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
