/* PokéVision site — palette lifted from the app (lib/theme.dart) */
:root {
  --surface: #f4f3ef;
  --card: #ffffff;
  --ink: #1b1b20;
  --text-2: #6f6f78;
  --accent: #ed7a3b;
  --accent-soft: #fbeee3;
  --green: #2e9e5b;
  --mint: #6bcb77; /* scan lock + price pills (app _green) */
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--surface);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header { padding: 22px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo {
  display: flex; align-items: center; gap: 10px;
  /* 26px — matches the brand title on the phone screen */
  font-weight: 800; font-size: 1.625rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo .mark { width: 34px; height: 34px; border-radius: 10px; display: block; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 96px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  /* scan-button gradient (home_screen.dart: accent → pink) as text fill */
  background: linear-gradient(135deg, #ed7a3b, #e85d75);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero p.lede {
  margin: 18px 0 30px; font-size: 1.15rem; color: var(--text-2); max-width: 30rem;
}
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 14px; padding: 12px 20px; font-weight: 700; font-size: 0.98rem;
  transition: transform 0.15s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 22px; height: 22px; }
.badge span small { display: block; font-weight: 500; font-size: 0.68rem; opacity: 0.75; }

/* phone */
.phone {
  width: 300px; max-width: 80vw; margin: 0 auto;
  border-radius: 44px; padding: 12px; background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(27, 27, 32, 0.35);
  position: relative;
  transform: rotate(2.5deg);
}
/* height:auto is load-bearing: without it the element's height attribute
   wins over the CSS width and the media stretches, blowing up the hero row
   and pushing the headline below the fold. */
.phone img,
.phone video { width: 100%; height: auto; display: block; border-radius: 24px; }
/* Brand title over the demo video — plain white type like the app's own
   title bar. (The real title row is cropped out of the clip because it
   carried the paywall pill.) */
.screen-brand {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  pointer-events: none; white-space: nowrap;
}
/* Running collection total under the brand — value driven by site.js,
   stepping in sync with the scans in the clip. */
.screen-total {
  position: absolute; top: 62px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 15, 18, 0.6); color: rgba(255, 255, 255, 0.85);
  font-size: 12px; font-weight: 500;
  padding: 5px 13px; border-radius: 999px; pointer-events: none;
  white-space: nowrap;
}
.screen-total b { color: #fff; font-weight: 800; margin-left: 2px; }
.screen-total.pop { animation: total-pop 0.35s ease; }
@keyframes total-pop {
  50% { transform: translateX(-50%) scale(1.14); }
}

/* ---------- onboarding stages (full-bleed dark, as in the app) ---------- */
.stage {
  position: relative; min-height: 100vh; overflow: hidden;
}
.stage-scan, .stage-marquee {
  /* scan_intro.dart / card_marquee.dart backdrop */
  background: radial-gradient(110% 110% at 50% 42%, #1b1522 0%, #0a0810 100%);
}
.stage-dex {
  /* dex_intro.dart backdrop */
  background: radial-gradient(110% 110% at 50% 45%, #23232f 0%, #101016 100%);
}
.stage-inner { position: absolute; inset: 0; }
.stage-inner > * { position: absolute; }

/* Title + tagline over the stage, exactly the app's _IntroPage treatment */
.stage-copy {
  position: absolute; left: 28px; right: 28px; bottom: 44px;
  text-align: center; z-index: 5; pointer-events: none;
}
.stage-copy h2 {
  color: #fff; font-size: clamp(26px, 3.4vw, 34px); font-weight: 900;
  letter-spacing: -0.6px; line-height: 1.15;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.87);
}
.stage-copy p {
  margin: 12px auto 0; max-width: 34rem;
  color: rgba(255, 255, 255, 0.78); font-size: clamp(15.5px, 1.6vw, 17px);
  font-weight: 500; line-height: 1.45;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.87);
}

/* Reticle: white brackets w/ soft pulsing halo; mint at lock (app _Reticle) */
.reticle { overflow: visible; color: #fff; }
.stage.locked .reticle { color: var(--mint); }
.reticle .line {
  fill: none; stroke: currentColor; stroke-opacity: 0.95;
  stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.reticle .halo {
  fill: none; stroke: currentColor;
  stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
  filter: blur(8px);
  animation: halo-pulse 1.5s linear infinite alternate;
}
.stage.locked .reticle .halo { animation: none; stroke-opacity: 0.34; }
@keyframes halo-pulse {
  from { stroke-opacity: 0.066; }
  to { stroke-opacity: 0.154; }
}

/* Sweeping scan line inside the reticle */
.sweep { pointer-events: none; color: #fff; }
.stage.locked .sweep { color: var(--mint); }
.sweep i {
  display: block; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent,
    currentColor 50%, transparent);
  opacity: 0.55;
  animation: sweep-line 1.5s linear infinite alternate;
}
@keyframes sweep-line {
  from { transform: translateY(0); }
  to { transform: translateY(var(--travel, 300px)); }
}

/* Flying / fanned cards. The flying card sits ABOVE the ????? label —
   the app draws the name label behind the scanning card. */
.fly-card, .fan-card { opacity: 0; will-change: transform, opacity; }
.fly-card { z-index: 2; }
.fly-card img, .fan-card img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 10px; display: block;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

/* Price pill: black glass, mint border + mint bold text (app _pricePill) */
.price-pill {
  left: 50%; transform: translateX(-50%);
  opacity: 0; z-index: 3;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(107, 203, 119, 0.5);
  color: var(--mint); font-weight: 800; font-size: 15px;
  padding: 5px 12px; border-radius: 18px; white-space: nowrap;
}

/* Fan-phase wordmark: gradient "Poké" + white "Vision" (app _wordmark) */
.wordmark {
  top: 12%; left: 50%; transform: translateX(-50%);
  opacity: 0; z-index: 2; white-space: nowrap;
  font-size: clamp(40px, 6vw, 60px); font-weight: 800; letter-spacing: -1.2px;
  text-shadow: 0.5px 2px 10px rgba(0, 0, 0, 0.4);
}
.wordmark .poke {
  background: linear-gradient(90deg, #f9a825, #ec5a2a);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.wordmark .vision { color: #fff; }

/* Dex stage: silhouette → revealed sprite, burst, ring, labels */
.sprite-silhouette, .sprite-revealed {
  object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
.sprite-silhouette { filter: brightness(0); opacity: 0; }
.sprite-revealed { opacity: 0; }
.burst {
  opacity: 0; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(237, 122, 59, 0.45) 0%, rgba(237, 122, 59, 0) 70%);
}
.ring {
  opacity: 0; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
}
.qmarks {
  left: 0; right: 0; text-align: center; opacity: 0;
  color: #fff; font-size: 26px; font-weight: 900; letter-spacing: 2px;
}
.gotem {
  left: 50%; transform: translateX(-50%);
  opacity: 0; text-align: center; white-space: nowrap;
}
.gotem-pill {
  display: inline-block;
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 900; letter-spacing: 1.2px;
  padding: 3px 12px; border-radius: 999px;
}
.gotem-name {
  display: block; margin-top: 8px;
  color: #fff; font-size: 30px; font-weight: 900; letter-spacing: -0.5px;
  line-height: 1.1;
}

/* Marquee stage: tilted drifting card wall + scrim (card_marquee.dart) */
.card-wall-clip {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-wall {
  transform: rotate(-11.5deg); /* -0.20 rad */
  display: flex; flex-direction: column;
  align-items: flex-start; /* rows anchor left — the wrap math needs this */
  justify-content: center;
  flex-shrink: 0;
}
.wall-row {
  display: flex; width: max-content;
  animation-name: wall-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.wall-row img {
  object-fit: cover; border-radius: 8px; flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
}
@keyframes wall-drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--unit, 1200px))); }
}
.stage-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(10, 8, 16, 0.45) 0%,
    rgba(10, 8, 16, 0.15) 50%,
    rgba(10, 8, 16, 0.92) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .wall-row, .sweep i, .reticle .halo { animation: none; }
}

/* ---------- footer ---------- */
footer { border-top: 1px solid #e5e3dc; padding: 34px 0 46px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--text-2); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
footer a:hover { color: var(--ink); }
footer .legal {
  flex-basis: 100%; color: var(--text-2); font-size: 0.8rem; margin-top: 6px;
}

/* ---------- legal / contact pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 24px 90px; }
.doc h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 26px 0 4px; }
.doc .updated { color: var(--text-2); font-size: 0.9rem; margin-bottom: 34px; }
.doc h2 { font-size: 1.2rem; margin: 34px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: #3c3c44; font-size: 1rem; }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.doc .cta {
  display: inline-block; margin-top: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 14px; padding: 12px 22px; font-weight: 700;
}

@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .wrap > div:first-child { text-align: center; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .badges { justify-content: center; }
  .phone { transform: none; }
  .stage { min-height: 88vh; }
  .stage-copy { bottom: 36px; }
}
