/* ROACHY launch site — standalone, no frameworks. */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --bg: #241a12;
  --surface: #2e2115;
  --ink: #fff3df;
  --muted: #c9b49a;
  --accent: #ffce7a;
  --radius: 16px;
  --display: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--display); font-weight: 500;
}
.container { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem; max-height: 80px;
  background: linear-gradient(color-mix(in srgb, var(--bg) 88%, transparent), transparent);
}
.nav img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-link { color: var(--ink); text-decoration: none; font-size: 0.95rem; position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }
@media (max-width: 640px) { .nav-link { display: none; } }

.scurry {
  color: var(--accent); text-decoration: none; font-weight: 800;
  font-size: 1.05rem; position: relative; padding-bottom: 7px; display: inline-block;
}
.scurry::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%;
  background-image: radial-gradient(circle at 3px 2px, var(--accent) 2px, transparent 2.6px);
  background-size: 12px 4px; background-repeat: repeat-x;
  clip-path: inset(0 100% 0 0); transition: clip-path 0.45s ease;
}
.scurry:hover::after, .scurry:focus-visible::after { clip-path: inset(0 0 0 0); }
.scurry:active { transform: translateY(1px); }

/* ---------- scroll-scrub chapters ---------- */
.chapter { position: relative; height: 220vh; }
.chapter-sticky {
  position: sticky; top: 0; height: 100dvh; overflow: hidden; background: var(--bg);
}
.chapter video, .chapter .poster-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.chapter-copy {
  position: absolute; z-index: 2; bottom: 12dvh; max-width: 34rem;
  padding: 1.6rem 1.8rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(6px);
}
.chapter-copy.left { left: 5vw; }
.chapter-copy.right { right: 5vw; }
.kicker {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.8rem; color: var(--accent); margin: 0 0 0.5rem;
}
.chapter-copy h2, .hero-title {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.02;
  font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 0.7rem;
}
.chapter-copy p { color: var(--muted); line-height: 1.6; margin: 0; }
.tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; padding: 0; list-style: none; }
.tags li {
  font-family: var(--mono); font-size: 0.75rem; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px; padding: 0.25rem 0.7rem;
}
.chapter-actions { margin-top: 1.2rem; display: flex; gap: 1.4rem; align-items: center; }

/* progress rail */
.rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: grid; gap: 10px;
}
.rail a { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 25%, transparent); transition: background 0.3s, transform 0.3s; }
.rail a.active { background: var(--accent); transform: scale(1.3); }
@media (max-width: 640px) { .rail { display: none; } }

/* ---------- sections ---------- */
section.band { padding: 6.5rem 0; }
.plate {
  background-image: linear-gradient(rgba(36, 26, 18, 0.42), rgba(36, 26, 18, 0.62)),
    url("../assets/brand/plate-dark.png");
  background-size: cover; background-position: center;
}
.h2 {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  font-size: clamp(2.2rem, 5.4vw, 3.6rem); margin: 0.5rem 0 0.9rem;
}
.body { color: var(--muted); max-width: 65ch; line-height: 1.65; }
.center { text-align: center; }
.center .body { margin-inline: auto; }

/* arcade */
.arcade {
  border-radius: 26px; padding: 14px; margin-top: 2.4rem;
  background: linear-gradient(160deg, #6b4a2b, #3c2817 60%, #2b1c0f);
  box-shadow: 0 0 0 2px #1a110a, 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 44px rgba(255, 206, 122, 0.14);
}
.arcade-screen { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #120c07; }
.arcade-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.arcade-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%;
  background: rgba(18, 12, 7, 0.35); border: 0; cursor: pointer; transition: background 0.25s ease;
}
.play-btn:hover { background: rgba(18, 12, 7, 0.15); }
.play-btn:active { transform: scale(0.995); }
.play-btn span {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ink);
  background: rgba(36, 26, 18, 0.82); border: 2px solid var(--accent);
  border-radius: 999px; padding: 0.8rem 2rem; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.under-arcade { text-align: center; margin-top: 1.4rem; }
.under-arcade a { color: var(--muted); }

/* launch */
.launch-grid {
  display: grid; gap: 3rem; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.eyebrow {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.8rem; color: var(--accent); margin: 0;
}
.count { font-family: var(--mono); display: flex; gap: 1.4rem; flex-wrap: wrap; }
.count-num { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; }
.count-cell:first-child .count-num { font-size: clamp(4rem, 11vw, 8.5rem); color: var(--accent); }
.count-label { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.14em; margin-top: 0.4rem; }
.live-note { font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.6rem); color: var(--accent); }

.facts { display: grid; gap: 1.5rem; }
.fact { display: flex; gap: 0.9rem; align-items: center; }
.fact img { width: 40px; height: 40px; object-fit: contain; }
.fact-label { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--mono); }
.fact-value { font-size: 1rem; }

.ticket {
  display: inline-flex; align-items: stretch; text-decoration: none; width: fit-content;
  font-family: var(--mono); color: #3c2817; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}
.ticket-body { background: var(--accent); padding: 0.95rem 1.5rem; font-size: 1rem; border-radius: 12px 0 0 12px; }
.ticket-stub {
  background: var(--accent); padding: 0.95rem 0.9rem; border-radius: 0 12px 12px 0;
  border-left: 2px dashed rgba(60, 40, 23, 0.55); display: grid; place-items: center;
  transition: transform 0.25s ease;
}
.ticket:hover .ticket-stub { transform: translateX(5px) rotate(4deg); }
.ticket:active { transform: skewX(-1.5deg) scale(0.985); }

.ca {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  font-family: var(--mono); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 0.9rem 1.2rem;
}
.ca .value { flex: 1; min-width: 12ch; overflow-wrap: anywhere; }
.ca button {
  font-family: var(--mono); font-size: 0.85rem; cursor: pointer; color: var(--accent);
  background: none; border: 1px solid var(--accent); border-radius: 8px; padding: 0.35rem 0.8rem;
}
.ca button:disabled { opacity: 0.6; cursor: default; }
.ca button:active { transform: scale(0.96); }

/* footer */
.vf-row { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.vf { position: relative; display: inline-block; padding: 0.7rem 1.1rem; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.vf::before, .vf::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--accent); transition: all 0.25s ease; opacity: 0.55;
}
.vf::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vf::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.vf:hover::before { top: -3px; left: -3px; opacity: 1; }
.vf:hover::after { bottom: -3px; right: -3px; opacity: 1; }
.mascots { display: flex; justify-content: center; gap: 2.5rem; align-items: flex-end; margin-bottom: 2rem; }
.mascots img { height: 110px; width: auto; }
.mascots img + img { height: 130px; }
.fineprint { color: var(--muted); font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scurry::after { clip-path: inset(0 0 0 0); transition: none; }
  .nav-link::after, .ticket-stub, .vf::before, .vf::after { transition: none; }
  .chapter { height: auto; }
  .chapter-sticky { position: relative; height: 72dvh; }
  .chapter video { display: none; }
}

/* CA pill + hero variant */
.ca-label { color: var(--muted); }
.ca-hero { margin-top: 1.2rem; padding: 0.55rem 0.9rem; font-size: 0.9rem; width: fit-content; gap: 0.7rem; }
.ca-hero .value { flex: none; min-width: 0; }

/* subpages */
.page-main { padding-top: 7rem; }
.page-head { padding-bottom: 2.5rem; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { width: 100%; }
.doc-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-bottom: 3rem; }
.doc-card { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.doc-card img { width: 46px; height: 46px; object-fit: contain; margin-bottom: 0.8rem; }
.doc-card h2 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.doc-card p { color: var(--muted); line-height: 1.6; margin: 0; }
.doc-tips { padding-bottom: 5rem; }
.doc-list { padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.doc-block { padding-bottom: 2.6rem; max-width: 760px; }
.doc-block h2 { font-size: 1.4rem; margin: 0 0 0.7rem; }
.tok-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tok-cell { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.tok-num { font-family: var(--mono); font-size: 2.6rem; color: var(--accent); line-height: 1; }
.tok-label { color: var(--muted); margin-top: 0.6rem; font-size: 0.9rem; }
.faq-list { display: grid; gap: 0.9rem; max-width: 760px; padding-bottom: 4rem; }
.faq-list details { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.3rem; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.faq-list summary { cursor: pointer; font-weight: 800; font-size: 1.02rem; }
.faq-list details[open] summary { color: var(--accent); }
.faq-list details p { margin: 0.7rem 0 0; }
.page-main .container:last-child { padding-bottom: 4rem; }

/* live API widgets */
.alltime { margin-top: 3rem; text-align: left; max-width: 460px; margin-inline: auto;
  background: var(--surface); border-radius: var(--radius); padding: 1.4rem 1.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.alltime h3 { margin: 0 0 0.8rem; color: var(--accent); font-size: 1.05rem; }
.alltime ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.45rem; color: var(--ink); }
.alltime li span { color: var(--muted); font-family: var(--mono); }
