/* ===== DESIGN TOKENS (locked from approved avatar/banner art) =====
   ui-ux-pro-max consulted (search: "kawaii chibi pastel baby mascot memecoin landing page")
   -> returned a navy/gold "vibrant block" system; overridden per lane spec, which fixes the
   palette to the approved pastel green/cream art itself. Kept from the skill: generous
   negative space cues, 200-300ms motion, visible focus states, no emoji-as-icon.
   Palette sampled directly from assets/avatar.png + assets/banner.png:
     cream bg       #FBF2D6   (page background, matches PNG background exactly - no alpha needed)
     hood green     #AED987
     hood green dk  #7FB85A   (shadow side of the felt hood)
     feather red    #FF715C
     skin           #FFE9C9
     cheek pink     #FFCBAA
     ink / outline  #5B3D29
   Type: Fredoka (rounded, blobby display - reads like a baby-brand wordmark) +
         Comfortaa (soft geometric sans - "soft rounded friendly sans" the lane spec asks for).
   Spacing scale: 8 / 12 / 16 / 24 / 32 / 48px. Radius: 20px (soft, felt-hood rounded).
   Motion idiom: one cute hop-arc keyframe on crawl, everything else eases 220ms. */

:root {
  --cream: #FBF2D6;
  --cream-deep: #F3E6BF;
  --green: #AED987;
  --green-dk: #7FB85A;
  --green-line: #5B3D29;
  --red: #FF715C;
  --skin: #FFE9C9;
  --cheek: #FFCBAA;
  --ink: #5B3D29;
  --ink-soft: rgba(91, 61, 41, 0.65);

  --sp-1: 8px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  overscroll-behavior: none;
}

body {
  font-family: 'Comfortaa', system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  overflow: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-2);
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cream);
  object-fit: cover;
}

.brand-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 2.4vw, 20px);
  letter-spacing: 0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.chain-pill, .status-pill {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}

.chain-pill {
  background: var(--green);
  color: var(--ink);
}

.status-pill {
  background: var(--cream);
  color: var(--ink-soft);
}

/* ---------- hero ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  text-align: center;
  min-height: 0;
}

.title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 6vw, 56px);
  margin: 0;
  line-height: 1;
  color: var(--green-dk);
  text-shadow: 2px 2px 0 var(--ink);
}

.tagline {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- scene ---------- */
.scene {
  position: relative;
  width: min(92vw, 620px);
  aspect-ratio: 3 / 1;
  height: auto;
  margin-top: var(--sp-1);
}

.ground-shadow {
  position: absolute;
  left: 4%;
  right: 8%;
  bottom: 4%;
  height: 12%;
  background: radial-gradient(ellipse at center, rgba(91,61,41,0.16) 0%, rgba(91,61,41,0) 72%);
  border-radius: 50%;
}

/* crop of assets/banner.png, original x[0,780] of 1500px -> 52% of scene width.
   Anchored at the left edge and stretched wider via scaleX as she crawls away
   from it (transform-origin: left) - real hand-drawn felt fabric being pulled
   taut reads as "the cape trailing further behind", where a synthetic filler
   shape between two real-art crops just looked like a stray UI box. */
.cape-curl {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52%;
  height: auto;
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 260ms ease-out;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* crop of assets/banner.png, original x[740,1240] of 1500px -> starts at 49.33%, 33.3% wide */
.baby {
  position: absolute;
  left: 49.33%;
  bottom: 0;
  width: 33.3%;
  height: auto;
  z-index: 3;
  transform: translateX(0px);
  transition: transform 260ms cubic-bezier(.34,1.56,.64,1);
  user-select: none;
  -webkit-user-drag: none;
}

.baby.hop {
  animation: hop 420ms cubic-bezier(.34,1.56,.64,1);
}

@keyframes hop {
  0%   { transform: translateX(var(--baby-x, 0px)) translateY(0) rotate(0deg); }
  35%  { transform: translateX(var(--baby-x, 0px)) translateY(-16px) rotate(-4deg); }
  65%  { transform: translateX(var(--baby-x, 0px)) translateY(-4px) rotate(2deg); }
  100% { transform: translateX(var(--baby-x, 0px)) translateY(0) rotate(0deg); }
}

/* ---------- controls ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--sp-1);
}

.crawl-btn {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.03em;
  color: var(--cream);
  background: var(--green-dk);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 14px 36px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.crawl-btn:hover {
  background: var(--green);
  color: var(--ink);
}

.crawl-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.crawl-btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.counter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.counter-value {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.mechanic-note {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ---------- footer chrome ---------- */
.chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.hem-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--cream-deep);
  border: 1.5px dashed var(--ink);
  border-radius: 10px;
  padding: 6px 12px;
}

.hem-tag-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hem-tag-ca {
  font-family: 'Comfortaa', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.buy-btn {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, background 150ms ease;
}

.buy-btn:hover {
  background: var(--red);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.buy-btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cream);
  transition: transform 150ms ease, background 150ms ease;
}

.x-link:hover {
  background: var(--green);
  transform: translateY(-2px);
}

.x-link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.canary {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- responsive: 360 / 390 / 1440 pass ---------- */
@media (max-width: 420px) {
  .page { padding: var(--sp-2) var(--sp-3); gap: var(--sp-1); }
  .tagline { max-width: 32ch; }
  .controls { gap: var(--sp-2); }
  .chrome { justify-content: center; text-align: center; }
  .canary { width: 100%; text-align: center; }
}

@media (min-width: 1200px) {
  .scene { width: min(70vw, 720px); }
}

@media (prefers-reduced-motion: reduce) {
  .baby, .cape-curl, .crawl-btn, .buy-btn, .x-link { transition-duration: 1ms; }
  .baby.hop { animation: none; }
}
