/* =====================================================================
   Claw Back - design tokens (locked)

   palette, sampled off the approved avatar/banner:
     sky       #80b1cf  the render's own flat backdrop, page bg matches it
     sky-deep  #5a86a6  darker panel/footer band
     pig       #fc877b  piggy bank pink, used sparingly for warmth
     coin      #eaaa0e  coin gold
     coin-dark #a3760a  coin shadow edge
     claw      #3d332e  mechanical arm, dark matte metal
     claw-dark #221b17  claw joints/shadow
     ink       #12222b  body text, dark enough for AA on sky
     paper     #eef6fb  light chip/plate fill
     lime      #ccff00  robinhood chain accent, used only on the CA plate
                         rim and the drop button edge, never a fill

   type: Lilita One (display/counter, chunky toy-catalog lettering) +
         Manrope (HUD labels/body) + JetBrains Mono (CA, real case)
   spacing: 8px grid, 8 / 16 / 24 / 32 / 48 / 64
   radius: 14px on plastic chrome (buttons, chips, plates) - the
           register is a toy/game asset, not a SaaS card, so molded
           rounded edges are the concept, not decoration
   motion: click DROP -> a coin arcs into the slot -> a second claw
           rig reaches out of the slot two seconds later, grips, and
           hauls a coin back out. that cycle is the whole site.
   ===================================================================== */

@font-face { font-family: 'Lilita One'; src: url('assets/fonts/lilita-one-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --sky: #80b1cf;
  --sky-deep: #5a86a6;
  --pig: #fc877b;
  --coin: #eaaa0e;
  --coin-dark: #a3760a;
  --claw: #3d332e;
  --claw-dark: #221b17;
  --ink: #12222b;
  --paper: #eef6fb;
  --lime: #ccff00;

  --font-display: 'Lilita One', 'Arial Black', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  flex: 0 0 auto;
}

.ticker-chip {
  font-family: var(--font-display);
  font-size: clamp(16px, 2.6vw, 22px);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.chain-tag {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.6;
}

main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 var(--sp-3);
}

.stage {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.hero-frame {
  position: relative;
  width: min(72vh, 92vw, 460px);
  aspect-ratio: 1 / 1;
}

.pig-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* stamped onto the pig's own flank, over the flat body area of the render */
.ca-plate {
  position: absolute;
  left: 68%;
  top: 63%;
  transform: translate(-50%, -50%) rotate(-3deg);
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: rgba(238, 246, 251, 0.92);
  border: 2px solid var(--lime);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  line-height: 1;
  max-width: 66%;
  box-shadow: 0 2px 0 rgba(34, 27, 23, 0.35);
}

.ca-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--claw);
  white-space: nowrap;
}

.ca-value {
  font-size: clamp(10px, 2.6vw, 13px);
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the slot mechanism, drawn as its own close-up widget instead of on top
   of the render, so the live coin/claw animation never fights the art's
   own painted claw and coins for the same pixels */
.slot-plate {
  position: relative;
  width: min(46vh, 62vw, 230px);
  aspect-ratio: 8 / 5;
  background: var(--pig);
  border: 2px solid var(--claw-dark);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--claw-dark);
  overflow: hidden;
}

.slot-mouth {
  position: absolute;
  left: 28%;
  top: 10%;
  width: 44%;
  height: 20%;
  background: var(--claw-dark);
  border-radius: 5px;
  box-shadow: 0 0 0 3px var(--lime);
}

.mech-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.coin {
  position: absolute;
  width: 15%;
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 86%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe27a, var(--coin) 55%, var(--coin-dark) 100%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  opacity: 0;
}

.coin.dropping {
  animation: coinDrop 700ms cubic-bezier(0.32, 0.9, 0.4, 1.1) forwards;
}

@keyframes coinDrop {
  0%   { left: 50%; top: 86%; transform: translate(-50%, -50%) scale(1);   opacity: 1; }
  55%  { left: 50%; top: 45%; transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { left: 50%; top: 18%; transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
}

/* the claw stays tucked off to the right, out of sight, and only reaches
   in over the slot mouth to snatch the coin back out */
.claw-rig {
  position: absolute;
  left: 30%;
  top: 6%;
  width: 66%;
  aspect-ratio: 3 / 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  transform-origin: 100% 50%;
  transform: scaleX(0.08);
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.5, 0, 0.2, 1), opacity 200ms linear;
}

.claw-rig.extend {
  transform: scaleX(1);
  opacity: 1;
}

.claw-rig.retract {
  transition: transform 260ms cubic-bezier(0.6, 0, 1, 1), opacity 220ms linear 140ms;
  transform: scaleX(0.1);
  opacity: 0;
}

.claw-hand {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-right: 3px;
}

.finger {
  width: 100%;
  height: 40%;
  background: var(--claw);
  border: 2px solid var(--claw-dark);
  border-radius: 3px;
  transform-origin: right center;
  transition: transform 220ms ease-out;
}

.finger-top { transform: rotate(-14deg); }
.finger-bottom { transform: rotate(14deg); }

.claw-rig.grip .finger-top { transform: rotate(22deg); }
.claw-rig.grip .finger-bottom { transform: rotate(-22deg); }

.claw-arm {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
}

.claw-arm .seg {
  display: block;
  flex: 1;
  height: 55%;
  background: var(--claw);
  border: 2px solid var(--claw-dark);
  border-radius: 4px;
}

.coin-caught {
  position: absolute !important;
  left: 50% !important;
  top: 18% !important;
  width: 15% !important;
  opacity: 0;
  transition: opacity 140ms linear, left 260ms cubic-bezier(0.6, 0, 1, 1), top 260ms cubic-bezier(0.6, 0, 1, 1);
}

.coin-caught.grip {
  opacity: 1;
}

.coin-caught.retract {
  left: 92% !important;
  top: 15% !important;
  opacity: 0;
  transition: opacity 220ms linear 60ms, left 260ms cubic-bezier(0.6, 0, 1, 1), top 260ms cubic-bezier(0.6, 0, 1, 1);
}

.tagline {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.75;
  text-align: center;
}

.hud {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}

.drop-btn {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--claw-dark);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--claw-dark);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}

.drop-btn:active,
.drop-btn.pressed {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--claw-dark);
}

.drop-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.drop-btn:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.counter-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--paper);
  border: 2px solid var(--claw-dark);
  border-radius: 14px;
  padding: var(--sp-1) var(--sp-3);
  min-width: 148px;
}

.counter-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--claw);
}

.counter-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
}

.chrome {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  background: var(--sky-deep);
}

.chips {
  display: flex;
  gap: var(--sp-2);
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--claw-dark);
  transition: transform 120ms ease-out;
}

.chip:hover { transform: translateY(-2px); }

.chip-icon { color: var(--claw); }

.network-line,
.watch-line {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--paper);
  opacity: 0.75;
}

.watch-line { font-family: var(--font-mono); opacity: 0.55; }

@media (max-width: 640px) {
  html, body { overflow: visible; }
  body { min-height: 100dvh; }
  main { padding: var(--sp-2) var(--sp-2); }
  .hero-frame { width: min(58vh, 84vw, 380px); }
  .hud { gap: var(--sp-2); }
  .counter-value { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .coin.dropping,
  .claw-rig,
  .claw-rig.extend,
  .claw-rig.retract,
  .finger,
  .chip {
    transition: none !important;
    animation: none !important;
  }
}
