/* Animalis public site. Palette mirrors the game:
   navy #1a1a2e (splash/app-icon bg), gold #e3b04b (wordmark),
   grass #7ec850 / #58904c, water #4a8ec2, warm beige panels #f0ede8
   (in-game modal bg), accentYellow #f8d030. System fonts, like the app.
   Layout is deliberately nav-bar-free: floating brand chip, nature
   side panels, links live in the footer. */

:root {
  --navy: #1a1a2e;
  --navy-soft: #232342;
  --gold: #e3b04b;
  --gold-bright: #f8d030;
  --gold-deep: #a07820;
  --grass: #7ec850;
  --grass-dark: #58904c;
  --water: #4a8ec2;
  --beige: #f0ede8;
  --beige-border: #c8c0b4;
  --card: #ffffff;
  --text-dark: #1a1a1a;
  --text-light: #f8f8f8;
  --text-muted: #5e5e5e;
  --text-faint: #a8a8c0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--navy);
  color: var(--text-light);
  line-height: 1.55;
}

a { color: var(--water); }

img { max-width: 100%; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- floating brand chip (no nav bar) ---------- */

.brand-chip {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: rgba(26, 26, 46, 0.55);
  border-radius: 14px;
  padding: 6px 12px 6px 6px;
  backdrop-filter: blur(4px);
}

.brand-chip img { width: 34px; height: 34px; border-radius: 9px; }

.brand-chip span {
  color: var(--gold);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 2.5px;
}

/* ---------- nature side panels (wide screens only) ----------
   Photographic woodland / lakeside edges fill the page's left and
   right thirds and dissolve into the navy centre. The CSS mask guarantees
   the fade regardless of the image's own edge. */

.nature-side {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(30vw, 470px);
  z-index: 0;
  display: none;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.nature-left {
  left: 0;
  background-image: url("/static/site/art/side-woodland.jpg?v=1");
  -webkit-mask-image: linear-gradient(to right, black 0%, black 30%, transparent 92%);
  mask-image: linear-gradient(to right, black 0%, black 30%, transparent 92%);
}

.nature-right {
  right: 0;
  background-image: url("/static/site/art/side-lake.jpg?v=1");
  -webkit-mask-image: linear-gradient(to left, black 0%, black 30%, transparent 92%);
  mask-image: linear-gradient(to left, black 0%, black 30%, transparent 92%);
}

@media (min-width: 1180px) {
  .nature-side { display: block; }
}

/* phones/tablets: the woodland becomes a faint backdrop behind the
   hero, fading out before the content sections */
@media (max-width: 1179px) {
  .nature-left {
    display: block;
    position: absolute;
    width: 100%;
    height: 72vh;
    opacity: 0.4;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 95%);
    mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 95%);
  }
}

/* content sits above the panels */
.hero, .section, .screens-band, .mission-band, .site-footer, .prose {
  position: relative;
  z-index: 1;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 26px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(300px, 440px) 1fr;
  gap: 26px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.hero p.lede {
  font-size: 17px;
  color: var(--text-light);
  opacity: 0.92;
  margin: 0 0 24px;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-row .badge img { width: 162px; height: 48px; display: block; }

.qr-chip {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(227, 176, 75, 0.25);
  border-radius: 14px;
  padding: 9px 14px;
}

.qr-chip img { width: 88px; height: 88px; background: #fff; border-radius: 8px; padding: 5px; }

.qr-chip span { font-size: 12.5px; color: var(--text-faint); max-width: 140px; }

/* ---------- globe ---------- */

.globe-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.globe-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 52%,
    rgba(74, 142, 194, 0.28) 0%,
    rgba(74, 142, 194, 0.10) 38%,
    transparent 62%
  );
  pointer-events: none;
}

#globe-mount {
  position: relative;
  width: min(560px, 92vw);
  aspect-ratio: 1;
  /* pan-y: vertical swipes keep scrolling the page on touch — zoom
     lives on the buttons / wheel (wheel passes through at the
     zoom-out limit so the page still scrolls) */
  touch-action: pan-y;
  overflow: hidden; /* clip limb markers; nothing may widen the page */
  /* gold paw cursor — signals "this is a game thing you can poke" */
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 34 34"><g stroke="%231a1a2e" stroke-width="1.6"><ellipse cx="11" cy="9" rx="3.4" ry="4.6" fill="%23f8d030"/><ellipse cx="23" cy="9" rx="3.4" ry="4.6" fill="%23f8d030"/><ellipse cx="5.5" cy="16" rx="3" ry="4" fill="%23f8d030"/><ellipse cx="28.5" cy="16" rx="3" ry="4" fill="%23f8d030"/><path d="M17 14c5 0 9 4.2 9 8.6 0 3.6-2.6 5.4-5.4 4.6-1.6-.5-2.4-.7-3.6-.7s-2 .2-3.6.7c-2.8.8-5.4-1-5.4-4.6 0-4.4 4-8.6 9-8.6z" fill="%23f8d030"/></g></svg>') 14 14, grab;
}

#globe-mount.zoomable:active { cursor: grabbing; }

.globe-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 15;
  display: grid;
  gap: 7px;
}

.globe-zoom button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(227, 176, 75, 0.55);
  background: rgba(26, 26, 46, 0.82);
  color: var(--gold-bright);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.globe-zoom button:hover { background: rgba(227, 176, 75, 0.25); }

#globe-mount canvas { display: block; width: 100%; height: 100%; }

/* DOM markers projected over the canvas */

.globe-marker {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  will-change: transform;
}

.marker-gym { width: 30px; height: 30px; cursor: pointer; }

.marker-gym svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }


/* bare pixel-art icon straight on the globe — no ring, no chrome */
.marker-animal {
  width: 34px;
  height: 34px;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.marker-animal img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated; /* the icons are genuine pixel art */
}

/* ---------- in-game screen mocks (how-it-works cards) ----------
   Drawn from the real screens' styles: battle arena #78a838 +
   6px HP bars (app/battle.tsx), discover overlay text (app/result.tsx). */

.mock-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 15px;
}

.mock-camera { background-size: cover; background-position: center; }

.mock-battle { background: #78a838; }

/* real in-game terrain decoration sprites, scattered like
   TerrainOverlay does (40px on a 390pt screen ≈ 10%, 0.7 opacity,
   squashed 0.5) */
.mock-battle .mb-tuft {
  position: absolute;
  width: 12%;
  opacity: 0.7;
  transform: scaleY(0.5);
  image-rendering: auto;
}

.mock-battle .mb-sprite {
  position: absolute;
  width: 31%; /* 120px on a 390pt screen, like battle.tsx */
  aspect-ratio: 1;
  image-rendering: pixelated;
  z-index: 5;
}

/* wildArea: info panel right-aligned with the sprite directly below
   it (marginTop 4 in battle.tsx) */
.mock-battle .mb-wild { top: 13.5%; right: 7%; }

/* player: sprite bottom-left, info panel bottom-right — positioned
   independently, like the real screen */
.mock-battle .mb-player { bottom: 29%; left: 7%; transform: scaleX(-1); }

/* soft ellipse shadow under each sprite (battleSpriteStyles.oppShadow) */
.mock-battle .mb-shadow {
  position: absolute;
  width: 19%;
  height: 3%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}

.mock-battle .mb-shadow.wild { top: 26.5%; right: 12%; }

.mock-battle .mb-shadow.player { bottom: 28.6%; left: 12%; }

.mock-battle .mb-panel {
  position: absolute;
  width: 56%;
  font-size: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 7px;
  padding: 4px 6px;
}

.mock-battle .mb-panel.wild { top: 6%; right: 5%; }

.mock-battle .mb-panel.player { bottom: 30.5%; right: 5%; }

.mock-battle .mb-name-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.mock-battle .mb-lv { opacity: 0.7; font-weight: 600; }

.mock-battle .mb-hp {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin-top: 3px;
  overflow: hidden;
}

.mock-battle .mb-hp i { display: block; height: 100%; border-radius: 2px; }

.mock-battle .mb-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background: var(--beige);
  border-top: 2px solid #c8c0b4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 6px;
}

/* white 2x2 move grid — moveBtn: #fff, 2px #d0d0d0 border, r10,
   move name top + Pow/Acc + TypeBadge bottom (battle.tsx) */
.mock-battle .mb-move {
  background: #fff;
  border: 1.5px solid #d0d0d0;
  border-radius: 7px;
  font-size: 7.5px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 4px 5px 3px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mock-battle .mb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 6px;
  font-weight: 600;
  color: #777;
}

.mock-battle .mb-type {
  font-style: normal;
  color: #fff;
  font-size: 6px;
  font-weight: 700;
  border-radius: 2.5px;
  padding: 1.5px 0;
  width: 27px;
  text-align: center;
}

/* post-capture results screen (result.tsx: CAPTURED! + nickname
   field + CONTINUE), over the capture photo */
.mock-captured {
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
}

.mock-captured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.mock-captured > * { position: relative; }

.mock-captured .mc-title {
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 9px;
}

.mock-captured .mc-name {
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0 6px 3px;
  margin-bottom: 4px;
}

.mock-captured .mc-name::after { content: " ✏"; font-size: 7px; }

.mock-captured .mc-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 6.5px;
  font-style: italic;
  margin-bottom: 11px;
}

.mock-captured .mc-btn {
  background: #c83838; /* the game's accentRed */
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.6px;
  border-radius: 5px;
  padding: 4px 12px;
}

/* translucent so the map under the tooltip stays readable */
.globe-tip {
  position: absolute;
  z-index: 20;
  max-width: 230px;
  background: rgba(22, 22, 42, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: none;
}

.globe-tip .tip-title { font-weight: 800; text-align: center; color: var(--gold-bright); }

.globe-tip img.tip-sprite {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
  image-rendering: pixelated; /* battle sprites are pixel art too */
}

.globe-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 6px 0 0;
}

/* /get page QR card — white backing so the navy QR modules scan */
.qr-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  width: 200px;
  margin: 0 auto 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.qr-card img { display: block; width: 100%; height: auto; }

.qr-card span { display: block; color: var(--text-muted); font-size: 12px; margin-top: 8px; }

.globe-note {
  display: block;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
  opacity: 0.8;
  margin-top: 3px;
}

/* ---------- stats chips ---------- */

.stats-chips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(227, 176, 75, 0.3);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.stat-chip b {
  color: var(--gold-bright);
  font-size: 16px;
  font-weight: 900;
  margin-right: 5px;
}

/* ---------- light content sections ---------- */

.section { padding: 48px 0; }

/* light sections float as rounded parchment cards so the nature
   panels stay visible along the page edges */
.section.light {
  background: var(--beige);
  color: var(--text-dark);
  max-width: min(1100px, 94vw);
  margin: 26px auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.section h2.center { text-align: center; font-size: 30px; margin: 0 0 8px; }

.section p.center-sub {
  text-align: center;
  margin: 0 auto 30px;
  max-width: 620px;
  color: var(--text-muted);
}

.section.light h2 { color: var(--text-dark); }

/* 3-step story: identical phone frames, no card chrome */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.step { text-align: center; }

.step h3 { margin: 16px 0 6px; font-size: 17.5px; }

.step h3 .mini-icon { vertical-align: -4px; margin-right: 7px; }

.step p {
  margin: 0 auto;
  max-width: 290px;
  color: var(--text-muted);
  font-size: 14.5px;
  text-align: left;
}

/* every step uses the exact same phone frame + screen dimensions */
.phone-mini {
  width: 168px;
  margin: 0 auto;
  border-radius: 20px;
  border: 5px solid #34344e;
  background: #000;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

.phone-mini img { display: block; width: 100%; border-radius: 15px; }

/* the game's capture screen, mocked over a phone-camera wildlife
   photo: centre crosshair + the white-ring / red-core shutter from
   app/camera.tsx, so visitors instantly read "you photograph real
   animals in the app" */
.cam-ui { position: absolute; inset: 0; pointer-events: none; }

.cam-ui .cam-cross {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.cam-ui .cam-cross::before,
.cam-ui .cam-cross::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
}

.cam-ui .cam-cross::before {
  left: 50%; top: 0; bottom: 0; width: 1.6px; transform: translateX(-50%);
}

.cam-ui .cam-cross::after {
  top: 50%; left: 0; right: 0; height: 1.6px; transform: translateY(-50%);
}

.cam-ui .cam-shutter {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
}

.cam-ui .cam-shutter::after {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c83838; /* the game's accentRed shutter core */
}

.cam-ui .cam-disc {
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}

.cam-ui .cam-disc.left { left: 8px; }
.cam-ui .cam-disc.right { right: 8px; }

.card h3 { margin: 14px 4px 6px; font-size: 17.5px; }

.card h3 .mini-icon { vertical-align: -4px; margin-right: 7px; }

.card p { margin: 0 4px; color: var(--text-muted); font-size: 14.5px; }

/* ---------- screenshots strip ---------- */

.screens-band { padding: 50px 0 58px; }

.screens-band h2 { text-align: center; color: var(--gold); font-size: 30px; margin: 0 0 30px; }

.screens-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}

.phone {
  width: 200px;
  border-radius: 26px;
  border: 6px solid #34344e;
  background: #34344e;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.phone img { display: block; width: 100%; border-radius: 20px; }

.phone:nth-child(1) { transform: rotate(-2.4deg) translateY(8px); }
.phone:nth-child(2) { transform: rotate(1.2deg); }
.phone:nth-child(3) { transform: rotate(-1.1deg) translateY(10px); }
.phone:nth-child(4) { transform: rotate(2.2deg) translateY(2px); }

.phone:hover { transform: scale(1.04); }

/* ---------- mission band ---------- */

.mission-band { padding: 54px 0; text-align: center; }

.mission-band p.big {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  max-width: 740px;
  margin: 0 auto 18px;
  color: var(--text-light);
}

.mission-band p.big em { color: var(--grass); font-style: normal; }

.mission-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }

.mission-links a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(227, 176, 75, 0.35);
  border-radius: 999px;
  padding: 8px 18px;
}

.mission-links a:hover { background: rgba(227, 176, 75, 0.1); }

/* ---------- FAQ ---------- */

.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }

details.faq {
  background: var(--card);
  border: 1px solid #d8d0c4;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 13px 40px 13px 16px;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  color: var(--grass-dark);
  font-weight: 800;
  font-size: 18px;
}

details.faq[open] summary::after { content: "–"; }

details.faq summary .mini-icon { flex: none; }

details.faq .a { padding: 0 18px 14px 43px; color: var(--text-muted); font-size: 14.5px; }

.more-link { text-align: center; margin-top: 24px; }

.more-link a { color: var(--grass-dark); font-weight: 700; }

.mini-icon { width: 20px; height: 20px; display: inline-block; }

/* ---------- prose pages (about / faq) ---------- */

/* content pages share the landing chrome: navy + nature panels with
   the prose floating as a beige card */
.prose {
  max-width: 800px;
  margin: 84px auto 40px;
  padding: 28px 34px 36px;
  background: var(--beige);
  color: var(--text-dark);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.prose h1 { color: var(--text-dark); font-size: 32px; }

.prose p { font-size: 16px; }

.prose a:not(.btn-gold) { color: var(--grass-dark); }

.btn-gold {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--navy) !important;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-gold:hover { filter: brightness(1.06); }

/* ---------- footer ---------- */

.site-footer {
  padding: 30px 0 38px;
  background: var(--navy);
  color: var(--text-faint);
  font-size: 13.5px;
}

.site-footer .wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.site-footer a { color: var(--text-faint); text-decoration: none; font-weight: 600; }

.site-footer a:hover { color: var(--gold); }

.site-footer .credits {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  opacity: 0.65;
  margin-top: 8px;
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero { padding-top: 72px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .globe-shell { order: -1; min-height: 0; }
  #globe-mount { width: min(440px, 90vw); }
  .qr-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .phone { transition: none; }
}
