/* ROBINJAK - design tokens (locked)
   Reference: classic black-line-on-white Wojak rage comic, no crypto-chrome trope.
   Signature: the drawing carries everything, chrome stays plain and out of its way.
   Palette (sampled from the approved art):
     --ink        #161616  (line art black)
     --paper      #FDFDFC  (art background, off-white)
     --hood-green #3B8633  (Robin Hood hood)
     --feather-red #CF0611 (Robin Hood feather)
   Type: plain system sans, no bundled webfont. The lane spec calls this out explicitly -
   "no styling needed, the drawing carries everything" - so this site is the one deliberate
   exception to the usual bundled-webfont default (RULES Visuals), justified by its own brief.
   Spacing scale: 8 / 12 / 16 / 24 / 32 / 48px. Corner radius: 10px (soft, not a card-grid look).
   Motion idiom: one click = one instant snap (no easing flourish) - matches "it never fires,
   nothing about him moves" deadpan joke.
*/

:root {
  --ink: #161616;
  --paper: #fdfdfc;
  --hood-green: #3b8633;
  --feather-red: #cf0611;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#err-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--feather-red);
  color: #fff;
  font: 12px/1.4 "SF Mono", Consolas, monospace;
  padding: var(--space-1) var(--space-3);
}

.stage {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-4);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chain-badge {
  font-size: clamp(10px, 2vw, 12px);
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.6;
  font-weight: 600;
}

.wordmark {
  margin: 0;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.tagline {
  margin: 0;
  font-size: clamp(12px, 2.6vw, 15px);
  opacity: 0.72;
  max-width: 34ch;
}

.scene {
  width: 100%;
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}

.scene-art {
  width: 100%;
  max-width: 620px;
  height: auto;
  max-height: 32vh;
  object-fit: contain;
  display: block;
}

.mechanic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
}

.bow-widget {
  width: 100%;
  max-width: 220px;
}

.bow-svg {
  width: 100%;
  height: auto;
  display: block;
}

#arrowGroup {
  transform: translateX(0px);
}

.draw-btn {
  font-family: inherit;
  font-size: clamp(13px, 2.8vw, 16px);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  transition: transform 60ms ease-out;
}

.draw-btn:active {
  transform: scale(0.96);
}

.draw-btn.kick {
  animation: kick 120ms ease-out;
}

@keyframes kick {
  0% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

.counter {
  margin: 0;
  font-size: clamp(12px, 2.6vw, 14px);
  font-variant-numeric: tabular-nums;
}

.signal {
  margin: 0;
  font-size: clamp(10px, 2.2vw, 12px);
  opacity: 0.55;
  font-family: "SF Mono", Consolas, monospace;
}

.chrome-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-top: 1.5px solid rgba(22, 22, 22, 0.12);
  padding-top: var(--space-3);
}

.ca-box {
  font-family: "SF Mono", Consolas, monospace;
  font-size: clamp(10px, 2.4vw, 12px);
  background: none;
  border: 1.5px dashed rgba(22, 22, 22, 0.35);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
  color: var(--ink);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-box .ca-value {
  opacity: 0.75;
}

.buy-btn {
  font-family: inherit;
  font-size: clamp(12px, 2.6vw, 14px);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--hood-green);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
}

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(22, 22, 22, 0.25);
}

.x-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 400px) {
  .stage {
    padding: var(--space-2) var(--space-2) var(--space-3);
    gap: var(--space-1);
  }
  .scene-art {
    max-height: 26vh;
  }
  .bow-widget {
    max-width: 170px;
  }
}

@media (min-width: 920px) {
  .stage {
    padding-top: var(--space-5);
    gap: var(--space-3);
  }
  .scene-art {
    max-height: 42vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .draw-btn,
  .draw-btn.kick {
    animation: none;
    transition: none;
  }
}
