/* gamestonk.gg - design system */
:root {
  --red: #cf2b25;
  --red-deep: #a91f1a;
  --ink: #17181a;
  --grey: #6b6f75;
  --line: #e8e6e2;
  --wash: #faf8f5;
  --white: #ffffff;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--white); scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.px { font-family: "Silkscreen", monospace; letter-spacing: 0.02em; }

a { color: var(--red-deep); text-underline-offset: 3px; }
a:hover { color: var(--red); }

/* Top strip */
.topstrip {
  background: var(--ink); color: #f5efe6;
  font-size: 10px; letter-spacing: 0.05em;
  text-align: center; padding: 8px 16px;
}

/* Header */
header.site { border-bottom: 3px solid var(--ink); background: var(--white); position: sticky; top: 0; z-index: 50; }
.headwrap {
  max-width: 1020px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 16px;
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo .t { font-family: "Archivo Black", "Archivo", sans-serif; font-size: 21px; letter-spacing: 0.01em; }
.logo .t em { font-style: normal; color: var(--red); }
nav.top { display: flex; gap: 2px; flex-wrap: wrap; }
nav.top a {
  font-size: 14px; font-weight: 600; color: var(--grey);
  text-decoration: none; padding: 7px 12px; border-radius: 8px;
}
nav.top a:hover { color: var(--ink); background: var(--wash); }
nav.top a.active { color: var(--red-deep); background: #fbeeed; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; margin: 0 auto; padding: 0 20px; }

/* Ticker tape */
.tape {
  background: var(--red); color: #fff;
  overflow: hidden; white-space: nowrap;
  border-bottom: 3px solid var(--ink);
  padding: 7px 0;
}
.tape-inner {
  display: inline-block;
  animation: tape 36s linear infinite;
}
.tape .px { font-size: 10.5px; letter-spacing: 0.08em; }
.tape b { color: #ffe8b3; font-weight: 400; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape:hover .tape-inner { animation-play-state: paused; }

/* Hero */
.hero {
  text-align: center; padding: 44px 0 14px;
  position: relative;
  background:
    linear-gradient(rgba(207,43,37,0.035), transparent 60%),
    repeating-linear-gradient(0deg, rgba(23,24,26,0.028) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(23,24,26,0.028) 0 1px, transparent 1px 22px);
}
.hero::before {
  content: "$GAMESTONK";
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  font-family: "Silkscreen", monospace;
  font-size: clamp(40px, 9vw, 110px);
  color: rgba(207, 43, 37, 0.05);
  pointer-events: none; white-space: nowrap;
}
.hero > * { position: relative; }
.hero .banner {
  max-width: 880px; width: 100%; height: auto;
  margin: 0 auto 28px; display: block;
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 0 28px 60px -34px rgba(23, 24, 26, 0.45);
}
h1 {
  font-family: "Archivo Black", "Archivo", sans-serif;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.05; letter-spacing: -0.01em;
  margin-bottom: 14px;
}
h1 .r { color: var(--red); }
.standfirst { font-size: 18.5px; color: var(--grey); max-width: 640px; margin: 0 0 22px; }
.hero .standfirst { margin: 0 auto 22px; }

.unofficial {
  display: inline-block;
  font-family: "Silkscreen", monospace;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--red-deep);
  border: 2px solid var(--red);
  border-radius: 6px;
  padding: 5px 12px;
  margin-bottom: 18px;
  background: #fff5f4;
}

/* Live stats */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 12px; max-width: 940px; margin: 24px auto;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--wash); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; text-align: center;
}
.stat .v { font-family: "Archivo Black", sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat .v.up { color: #1d8a4a; }
.stat .v.down { color: var(--red-deep); }
.stat .v.flash { animation: statflash .5s ease; }
@keyframes statflash { 50% { transform: scale(1.12); } }
.stat .k { font-family: "Silkscreen", monospace; font-size: 9.5px; color: var(--grey); margin-top: 4px; text-transform: uppercase; }
.stat.live .v { color: var(--red-deep); }
.stats-note { text-align: center; font-size: 12.5px; color: #b3aea6; margin-top: 4px; }

/* Contract bar */
.contract {
  max-width: 860px; margin: 18px auto;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.contract .addr { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; word-break: break-all; }
.contract .lbl { font-family: "Silkscreen", monospace; font-size: 9.5px; color: #f0b3b0; display: block; margin-bottom: 3px; }
.copybtn {
  background: var(--red); color: #fff; border: none; border-radius: 8px;
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 13px;
  padding: 9px 16px; cursor: pointer; flex-shrink: 0;
}
.copybtn:hover { background: #e23c36; }

/* Sections */
section.band { padding: 40px 0; }
section.band.tint { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 {
  font-family: "Archivo Black", "Archivo", sans-serif;
  font-size: 27px; letter-spacing: -0.01em;
  margin: 32px 0 12px;
}
h2::after {
  content: "";
  display: block; width: 78px; height: 6px; margin-top: 7px;
  background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 13px);
}
h2 .r { color: var(--red); }
h3 { font-weight: 700; font-size: 17.5px; margin: 22px 0 8px; }
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 14px 22px; }
li { margin-bottom: 7px; }

/* Chain narrative */
.chain {
  display: flex; flex-wrap: wrap; gap: 10px 6px; align-items: center;
  margin: 22px 0; justify-content: center;
}
.chain .seg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chain .step {
  font-family: "Silkscreen", monospace; font-size: 11px;
  background: var(--white); border: 2px solid var(--ink); border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}
.chain .step.hot {
  background: var(--red); border-color: var(--ink); color: #fff;
  box-shadow: 3px 3px 0 var(--ink); font-size: 13px; padding: 10px 16px;
  animation: hotglow 1.8s ease-in-out infinite;
}
@keyframes hotglow {
  0%, 100% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 rgba(207,43,37,0); }
  50% { box-shadow: 3px 3px 0 var(--ink), 0 0 26px rgba(207,43,37,0.55); }
}
.chain .step { animation: popin .45s cubic-bezier(.2,1.4,.4,1) backwards; }
.chain > .step { animation-delay: .05s; }
.chain .seg:nth-child(2) .step { animation-delay: .18s; }
.chain .seg:nth-child(3) .step { animation-delay: .31s; }
.chain .seg:nth-child(4) .step { animation-delay: .44s; }
.chain .seg:nth-child(5) .step { animation-delay: .57s; }
.chain .seg:nth-child(6) .step { animation-delay: .74s, 0s; animation-name: popin, hotglow; }
@keyframes popin { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.chain .arr { color: var(--red); font-weight: 900; font-size: 16px; }

.note {
  background: var(--white); border: 2px solid var(--line); border-left: 5px solid var(--red);
  border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; font-size: 15px;
}
.note .lbl { display: block; font-family: "Silkscreen", monospace; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--red-deep); margin-bottom: 6px; }

.factbox { background: var(--wash); border: 2px solid var(--line); border-radius: var(--radius); margin: 18px 0; overflow: hidden; }
.factbox table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.factbox th, .factbox td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.factbox tr:last-child th, .factbox tr:last-child td { border-bottom: none; }
.factbox th { color: var(--grey); font-weight: 600; width: 38%; }
.factbox td { overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }

.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.card {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none; color: var(--ink); display: block;
}
.card { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.card:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(207, 43, 37, 0.45); }
.stat { transition: border-color .12s ease; }
.stat:hover { border-color: var(--red); }
.card h3 { margin: 0 0 6px; font-family: "Archivo Black", sans-serif; font-size: 17px; }
.card p { color: var(--grey); font-size: 14px; margin: 0; }

details { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 15px 20px; margin-bottom: 12px; }
details summary { font-weight: 700; cursor: pointer; font-size: 16px; }
details p { margin: 10px 0 0; color: var(--grey); }

.src { font-size: 13px; color: #b3aea6; }
.crumbstamp { font-size: 13px; color: #b3aea6; margin: 24px 0 6px; }

footer.site { border-top: 3px solid var(--ink); margin-top: 56px; padding: 24px 0; }
.footwrap {
  max-width: 1020px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--grey);
}
.footwrap a { color: var(--grey); text-decoration: none; }
.footwrap a:hover { color: var(--ink); }

.konami-hint { font-family: "Silkscreen", monospace; font-size: 9px; color: #d9d4cc; user-select: none; }

@media (prefers-reduced-motion: reduce) {
  .tape-inner, .chain .step, .chain .step.hot, .stat .v.flash { animation: none !important; }
}

/* easter eggs */
.egg-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff;
  font-family: "Silkscreen", monospace; font-size: 11px;
  padding: 12px 18px; border-radius: 10px; border: 2px solid var(--red);
  opacity: 0; transition: opacity .3s ease, transform .3s ease;
  z-index: 999; max-width: 90vw; text-align: center;
}
.egg-toast.on { opacity: 1; transform: translate(-50%, 0); }
.stonk-float {
  position: fixed; bottom: -40px; z-index: 998; pointer-events: none;
  animation: stonkup linear forwards;
}
@keyframes stonkup {
  from { transform: translateY(0) rotate(-8deg); opacity: 1; }
  to { transform: translateY(-110vh) rotate(8deg); opacity: 0; }
}
body.stonks-mode .hero .banner { transform: rotate(-1.2deg); transition: transform .4s ease; }
body.stonks-mode h1 .r, body.stonks-mode h2 .r { animation: stonkpulse 1.2s ease infinite; display: inline-block; }
@keyframes stonkpulse { 50% { transform: translateY(-4px); } }

@media (max-width: 640px) {
  .headwrap { flex-direction: column; align-items: flex-start; gap: 8px; }
  .contract { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .copybtn { align-self: center; padding: 10px 26px; }
  .factbox th, .factbox td { display: block; width: auto; padding: 4px 16px; }
  .factbox th { padding-top: 10px; font-size: 12px; }
  .factbox td { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .factbox tr:last-child td { border-bottom: none; }
  .factbox tr th { border-bottom: none; }
}
