/* DJT tokens. Pulled off the avatar: sky #46A8D8, coin gold #FFD700, coin rim #C97C17, ink #1F051E,
   screen red #E8466E, screen green #14C25E, panel cream #FFF3C4. Spacing 8/16/24/40. Radius 0.
   Shadows: hard 4px ink offset only. Motion idiom: stepped pixel frames. */
@font-face { font-family: "Press Start 2P"; src: url(assets/fonts/press-start-2p-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url(assets/fonts/dm-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --sky: #46A8D8; --sky-d: #2F86B6; --floor: #5DB3DE;
  --gold: #FFD700; --rim: #C97C17; --ink: #1F051E;
  --red: #E8466E; --green: #14C25E; --cream: #FFF3C4;
  --px: "Press Start 2P", ui-monospace, monospace;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --hard: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 400 18px/1.5 var(--body);
  background-color: var(--sky);
  background-image: conic-gradient(var(--sky-d) 25%, transparent 0 50%, var(--sky-d) 0 75%, transparent 0);
  background-size: 8px 8px; background-blend-mode: soft-light;
  min-height: 100vh; overflow-x: hidden;
}
img { image-rendering: pixelated; display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }

/* HUD */
.hud { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; position: relative; z-index: 5; }
.mark { font: 24px/1 var(--px); text-decoration: none; color: var(--gold); text-shadow: 3px 3px 0 var(--ink); letter-spacing: 2px; }
.hud-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.px-btn {
  font: 12px/1 var(--px); padding: 12px 14px; background: var(--gold); color: var(--ink); text-decoration: none;
  border: 4px solid var(--ink); box-shadow: var(--hard); display: inline-block;
}
.px-btn.alt { background: var(--cream); }
.px-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.px-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

/* STAGE */
.stage {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-areas: "copy copy" "coin rig";
  gap: 8px 40px; padding: 0 40px 48px; max-width: 1280px; margin: 0 auto; position: relative; align-items: end;
}
.stage-copy { grid-area: copy; max-width: 640px; }
h1 { font: 22px/1.5 var(--px); margin: 8px 0 16px; text-shadow: 3px 3px 0 var(--sky-d); }
h1 .hl { background: var(--ink); color: var(--red); padding: 0 8px; text-shadow: none; }
.stage-copy p { margin: 0; font-size: 20px; max-width: 30ch; font-weight: 700; }

.coin-zone { grid-area: coin; position: relative; align-self: end; justify-self: start; width: min(100%, 520px); padding-top: 56px; }
.coin { display: block; width: 100%; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.coin-body { display: block; position: relative; transform-origin: 50% 92%; will-change: transform; }
.coin-img { width: 100%; height: auto; }
.eye { position: absolute; width: 19.2%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; top: 34.1%; }
.eye.l { left: 29.2%; } .eye.r { left: 53.2%; }
.eye img { width: 100%; height: 100%; }
.eye { animation: spin 6s steps(24) infinite; }
.eye.r { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.shadow { height: 20px; width: 70%; margin: -6px auto 0; background: rgba(31, 5, 30, .28); }
.halo { position: absolute; left: 16%; right: 16%; top: 4px; height: 56px; pointer-events: none; z-index: 2; }
.halo i { position: absolute; width: 12px; height: 12px; background: var(--gold); box-shadow: 0 0 0 3px var(--ink); animation: twinkle 1.2s steps(2) infinite; }
.halo i:nth-child(1) { left: 4%; top: 30px; } .halo i:nth-child(2) { left: 22%; top: 8px; animation-delay: .2s; }
.halo i:nth-child(3) { left: 44%; top: 0; animation-delay: .4s; } .halo i:nth-child(4) { left: 66%; top: 8px; animation-delay: .6s; }
.halo i:nth-child(5) { left: 84%; top: 30px; animation-delay: .8s; } .halo i:nth-child(6) { left: 52%; top: 22px; animation-delay: 1s; width: 8px; height: 8px; }
@keyframes twinkle { 50% { transform: translateY(-6px); background: #fff; } }
.pokes { font: 10px/1.6 var(--px); margin: 16px 0 0; }
.pokes b { background: var(--ink); color: var(--gold); padding: 2px 6px; }
.floater { position: absolute; font: 28px/1 var(--px); color: var(--ink); background: var(--gold); border: 4px solid var(--ink); padding: 6px 8px; left: 70%; top: 40px; opacity: 0; pointer-events: none; z-index: 4; }
.floater.go { animation: pop .7s steps(7) forwards; }
@keyframes pop { 0% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-48px); } }

/* RIG: monitor + plate */
.rig { grid-area: rig; align-self: end; padding-bottom: 8px; }
.monitor { background: var(--cream); border: 6px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 16px; position: relative; transform: translateY(-24px); }
.screen { background: var(--ink); color: #fff; padding: 12px; border: 4px solid #3a1738; }
.scr-top { display: flex; justify-content: space-between; align-items: center; }
.tk { font: 40px/1 var(--px); color: var(--red); letter-spacing: 2px; }
.live { font: 9px/1 var(--px); color: var(--green); }
.scr-px { display: flex; align-items: baseline; gap: 16px; margin: 12px 0 8px; font-family: var(--px); }
#px { font-size: 24px; color: #fff; }
#dx { font-size: 12px; }
.up { color: var(--green); } .dn { color: var(--red); }
canvas { width: 100%; height: auto; aspect-ratio: 144 / 54; image-rendering: pixelated; background: #2b0b29; display: block; }
.tape { display: flex; justify-content: flex-end; gap: 16px; overflow: hidden; white-space: nowrap; margin-top: 8px; font: 9px/1.4 var(--px); min-height: 14px; }
.tape span { flex: none; animation: slide .3s steps(4) both; }
@keyframes slide { from { transform: translateX(24px); } }
.scr-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font: 11px/1.3 var(--mono); color: #b9a6b8; flex-wrap: wrap; }
.scr-foot b { color: #fff; font-weight: 400; }
.neck { width: 56px; height: 20px; background: var(--rim); border: 4px solid var(--ink); border-top: 0; margin: 0 auto; position: absolute; left: 0; right: 0; bottom: -24px; }
.foot { width: 160px; height: 12px; background: var(--rim); border: 4px solid var(--ink); position: absolute; left: 0; right: 0; bottom: -36px; margin: 0 auto; }
.plate { margin-top: 24px; background: var(--rim); border: 4px solid var(--ink); box-shadow: var(--hard); padding: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; position: relative; }
.plate-k { font: 12px/1 var(--px); color: var(--ink); background: var(--gold); border: 3px solid var(--ink); padding: 8px; }
.ca { font: 400 14px/1.3 var(--mono); background: var(--cream); border: 3px solid var(--ink); padding: 8px 10px; text-align: left; word-break: break-all; flex: 1 1 200px; min-width: 0; }
.ca:hover { background: #fff; }
.copied { font: 10px/1 var(--px); color: var(--ink); position: absolute; right: 12px; top: -26px; background: var(--green); border: 3px solid var(--ink); padding: 4px 6px; display: none; }
.copied.on { display: block; }

/* SECTIONS */
section { max-width: 1280px; margin: 0 auto; padding: 56px 40px; }
.tag { font: 28px/1.4 var(--px); margin: 0 0 24px; color: var(--gold); text-shadow: 4px 4px 0 var(--ink); }
.tag.small { font-size: 18px; }

.lore { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.lore .tag { position: sticky; top: 24px; margin: 0; }
.dialog { background: var(--cream); border: 6px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 24px 24px 16px; }
.dialog .line { margin: 0 0 16px; font-size: 20px; max-width: 38ch; overflow: hidden; }
.dialog .line:nth-child(even) { margin-left: 24px; }
.js .dialog .line { visibility: hidden; }
.js .dialog .line.in { visibility: visible; clip-path: inset(0 100% 0 0); animation: type 1.1s steps(28) forwards; }
@keyframes type { to { clip-path: inset(0 0 0 0); } }
.caret { display: inline-block; width: 12px; height: 20px; background: var(--ink); vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.faq { display: grid; grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr); gap: 40px; align-items: start; padding-top: 24px; }
.faq .tag { margin: 0; }
.menu { border: 6px solid var(--ink); background: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.menu details { background: var(--cream); border-bottom: 4px solid var(--ink); }
.menu details:last-child { border-bottom: 0; }
.menu summary { list-style: none; font: 12px/1.6 var(--px); padding: 16px 16px 16px 40px; cursor: pointer; position: relative; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: ""; position: absolute; left: 16px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 10px solid var(--ink); }
.menu details[open] summary::before { border: 6px solid transparent; border-top: 10px solid var(--ink); margin-top: -3px; margin-left: -2px; }
.menu summary:hover { background: var(--gold); }
.menu details p { margin: 0; padding: 0 16px 16px 40px; max-width: 52ch; }

.s { margin: 0; background: var(--cream); border: 4px solid var(--ink); box-shadow: var(--hard); padding: 8px 8px 0; }
.s img { width: 100%; height: auto; }
.s figcaption { font: 9px/1 var(--px); padding: 12px 4px; }

.foot-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 40px; background: var(--ink); color: var(--gold); font: 10px/1.6 var(--px); }
.fl { display: flex; gap: 24px; }
.fl a { text-decoration: none; } .fl a:hover { color: #fff; }
.ns { margin: 0; padding: 16px 40px; background: var(--gold); font-weight: 700; }

/* NARROW */
@media (max-width: 860px) {
  .hud { padding: 12px 16px; flex-wrap: wrap; }
  .mark { font-size: 20px; }
  .px-btn { font-size: 10px; padding: 10px 10px; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "coin" "rig"; padding: 0 16px 32px; gap: 16px; }
  h1 { font-size: 14px; overflow-wrap: anywhere; }
  .stage-copy p { font-size: 18px; }
  .coin-zone { justify-self: center; width: min(100%, 400px); }
  .monitor { transform: none; margin-bottom: 48px; }
  .tk { font-size: 28px; }
  section { padding: 40px 16px; }
  .lore, .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lore .tag { position: static; }
  .tag { font-size: 20px; } .tag.small { font-size: 15px; }
  .dialog .line:nth-child(even) { margin-left: 0; }
  .foot-bar { padding: 16px; }
}
@media (max-width: 400px) {
  .px-btn { font-size: 9px; padding: 8px; box-shadow: 3px 3px 0 var(--ink); }
  .ca { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eye, .halo i, .caret, .tape span { animation: none !important; }
  .js .dialog .line.in { animation: none; clip-path: none; }
  .floater.go { animation: none; opacity: 1; }
}
