/* 03-final — base: tokens, reset, type, buttons, top bar, menu, toasts, footer. */

:root {
  --btc: #fc5c04;
  --beanie: #fc5c04;
  --night: #0b0b10;
  --amber: #fd8949;
  --green: #27f06b;
  --copium: #8bff3a;
  --red: #ff3b3b;
  --paper: #f4ecd8;
  --wojak: #f5f3ee;
  --wall: #15141a;
  --muted: #c9c1b1;

  --ff-display: "Bangers", "Impact", "Arial Narrow", sans-serif;
  --ff-hand: "Permanent Marker", "Comic Sans MS", cursive;
  --ff-body: "Rubik", "Segoe UI", Roboto, system-ui, sans-serif;
  --ff-pixel: "VT323", "Courier New", monospace;
  --ff-mono: "Space Mono", Consolas, "Courier New", monospace;
  /* numerals only (prices, BTC amounts): script-neutral, so the language layer keeps it */
  --ff-num: "Bangers", "Impact", "Arial Narrow", sans-serif;
  /* brand marks that never translate (Retarded Bitcoin, $RTC, Copium, X /
     Telegram / Dexscreener) and the PDF's English recurring lines on the tape:
     the same Latin lockup in every language */
  --ff-brand: "Bangers", "Impact", "Arial Narrow", sans-serif;
  /* the story's closing quotes stay in the PDF's English, and the act numerals are
     Roman: the same marker in every language */
  --ff-marker: "Permanent Marker", "Comic Sans MS", cursive;

  --topbar-h: 56px;
  --ease-pop: cubic-bezier(0.3, 1.6, 0.5, 1);
  color-scheme: dark;
}
@media (min-width: 760px) {
  :root { --topbar-h: 64px; }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
  scrollbar-gutter: stable;
  /* the room's wall runs down the whole page (it scrolls with it) */
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.028) 1px, transparent 1.6px) 0 0 / 7px 7px,
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.4)),
    #111015;
}
/* a link that was clicked or tabbed to glides to its anchor; find-in-page and
   scripted scrolls (the story reader, the room) jump or set their own behavior */
html:focus-within { scroll-behavior: smooth; }
html.has-panel, html.has-menu { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--paper);
  font: 400 16px/1.55 var(--ff-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 400; overflow-wrap: break-word; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* the real canonical head, used where an icon stands for RTC himself */
.ico--head { width: auto; height: 28px; object-fit: contain; filter: drop-shadow(1px 1px 0 #000); }
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 9999;
  padding: 10px 16px;
  border: 3px solid #000;
  border-radius: 12px;
  background: var(--btc);
  color: #000;
  font: 400 20px/1 var(--ff-display);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip:focus-visible { transform: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 24px 8px;
  border: 3px solid #000;
  border-radius: 999px;
  background: var(--paper);
  color: #000;
  font: 400 clamp(21px, 1.2vw + 14px, 26px)/1 var(--ff-display);
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.18s var(--ease-pop), box-shadow 0.18s, background-color 0.2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn .ico { width: 22px; height: 22px; stroke-width: 2.6; }
/* the shine sits under the label (the button is its own stacking context), so a label that wraps onto two lines on
   a narrow phone is never veiled by it */
.btn--buy {
  isolation: isolate;
  background: var(--btc);
  background-image: linear-gradient(180deg, #fd8b4c 0%, var(--btc) 55%, #fc5c04 100%);
}
.btn--buy::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 14px auto;
  height: 30%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.btn--ghost { background: #1d1c23; color: var(--paper); }
.btn--ghost:hover { background: #2a2930; }
.btn--sm { min-height: 44px; padding: 8px 16px 6px; font-size: 20px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 2px solid #000;
  border-radius: 12px;
  background: #24232a;
  color: var(--paper);
  box-shadow: 2px 2px 0 #000;
}
.icon-btn:hover { background: #33313a; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 10px;
  /* opaque: the hero's links and the story's text pass under it */
  background: linear-gradient(180deg, #0b0b10 0%, #101016 100%);
  border-bottom: 3px solid #000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--btc);
  text-decoration: none;
}
.logo__head { width: auto; height: 44px; filter: drop-shadow(2px 2px 0 #000); }
.logo__word {
  white-space: nowrap;
  font: 400 28px/1 var(--ff-brand);
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #000;
}
/* one line of links; the ones that do not fit are hidden by main.js (fitNav)
   and stay reachable in the Menu sheet */
.topnav {
  display: none;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 0 4px;
  max-height: 40px;
  margin-left: 12px;
  min-width: 0;
  overflow: hidden;
}
.topnav a {
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--muted);
  font: 600 15px/1 var(--ff-body);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.topnav a:hover { color: #fff; background: #1d1c23; }
@media (min-width: 1240px) {
  .topnav { display: flex; }
}
.topbar__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid #000;
  border-radius: 12px;
  background: #1d1c23;
  color: var(--paper);
  font: 600 14px/1 var(--ff-body);
  box-shadow: 2px 2px 0 #000;
}
.tool:hover { background: #2a2930; }
.tool--sound:not([aria-pressed="true"]) :is(.ico--on, .tool__label--on),
.tool--sound[aria-pressed="true"] :is(.ico--off, .tool__label--off) { display: none !important; }
.tool--sound[aria-pressed="true"] { color: var(--green); }
.topbar .tool__label { display: none; }
@media (min-width: 980px) {
  .topbar .tool__label { display: inline; }
}
.topbar .btn--sm { padding: 8px 14px 6px; font-size: 19px; }
@media (max-width: 480px) {
  .topbar { gap: 6px; padding: 0 8px; }
  .topbar__tools { gap: 6px; }
  .logo__word { display: none; }
  .topbar .langsw__btn .ico { display: none; }
  .topbar .btn--sm { padding: 8px 12px 6px; font-size: 18px; }
}
/* the smallest phones: Buy keeps its one line and the logo its head (the tools give up their padding) */
@media (max-width: 300px) {
  .topbar .btn--sm { padding-inline: 8px; font-size: 16px; white-space: nowrap; }
  .topbar .tool { padding-inline: 8px; }
  .logo { flex: none; }
}

/* language switcher (built by main.js from RTCI18N.languages) */
.langsw { position: relative; }
.langsw__btn { gap: 6px; padding: 0 10px; font: 700 13px/1 var(--ff-body); }
.langsw__btn .ico { width: 18px; height: 18px; }
.langsw__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 950;
  margin: 0;
  padding: 6px;
  min-width: 220px;
  max-height: min(70vh, 480px);
  overflow-y: auto;
  list-style: none;
  border: 3px solid #000;
  border-radius: 14px;
  background: #f4ecd8;
  color: #111;
  box-shadow: 5px 5px 0 #000;
}
/* phones: a wider Buy button (French « Acheter $RTC ») pushes the switcher left, and the 220 px menu,
   right-aligned to it, ran off the screen's left edge; it keeps to the screen's right gutter instead */
@media (max-width: 480px) {
  .langsw__menu { position: fixed; top: calc(var(--topbar-h) + 8px); right: 16px; left: auto; }
}
.langsw__opt, .langsw__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  cursor: pointer;
  font: 600 15px/1.2 var(--ff-body);
  text-align: left;
}
.langsw__opt { width: 100%; padding: 6px 10px; border-radius: 9px; background: none; color: #111; }
.langsw__opt:hover, .langsw__opt:focus-visible { background: #ffd79a; outline: none; }
.langsw__opt[aria-current="true"] { background: var(--btc); }
.langsw__short { min-width: 3.1em; font-weight: 800; }
.langsw__name { flex: 1 1 auto; }
.langsw__soon {
  flex: none;
  padding: 2px 7px 1px;
  border: 1.5px dashed currentColor;
  border-radius: 6px;
  font: 700 11px/1.3 var(--ff-body);
  opacity: 0.8;
}
.langsw__opt[aria-disabled="true"] { color: #5d564a; cursor: default; }
.langsw__opt[aria-disabled="true"]:hover { background: #ebe2cc; }
.langsw__row { display: flex; flex-wrap: wrap; gap: 8px; }
.langsw__chip {
  padding: 6px 12px;
  border: 2px solid #000;
  border-radius: 12px;
  background: #1d1c23;
  color: var(--paper);
  box-shadow: 2px 2px 0 #000;
}
.langsw__chip .langsw__name { display: none; }
.langsw__chip[aria-current="true"] { background: var(--btc); color: #000; }
.langsw__chip[aria-disabled="true"] { color: #b3ab9b; box-shadow: none; border-style: dashed; cursor: default; }

/* ---------- menu sheet ---------- */
.menu-sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100%);
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 3px solid #000;
  background: #121117;
  color: var(--paper);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.menu-sheet::backdrop { background: rgba(4, 4, 8, 0.6); }
.menu-sheet[open] { animation: sheetIn 0.32s cubic-bezier(0.2, 1, 0.3, 1); }
@keyframes sheetIn { from { transform: translateX(100%); } to { transform: none; } }
.menu-sheet__in { position: relative; height: 100%; overflow-y: auto; padding: 22px 18px 40px; }
.menu-sheet__close { position: absolute; right: 14px; top: 14px; }
.menu-sheet__title {
  margin: 6px 56px 12px 0;
  font: 400 26px/1.05 var(--ff-display);
  letter-spacing: 0.03em;
  color: var(--btc);
}
.menu-sheet__title + ul { margin-bottom: 26px; }
.menu-objects, .menu-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-objects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.menu-objects button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
  border: 2px solid #000;
  border-radius: 12px;
  background: #24232a;
  font: 600 15px/1.2 var(--ff-body);
  box-shadow: 3px 3px 0 #000;
}
.menu-objects button:hover { background: #33313a; }
.menu-objects .ico { color: var(--btc); }
.menu-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  font: 600 17px/1.2 var(--ff-body);
  text-decoration: none;
  color: var(--muted);
}
.menu-links a:hover { background: #1d1c23; color: #fff; }

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  left: 12px;
  right: 12px;
  z-index: 9500;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}
@media (max-width: 759px) {
  .toasts { justify-items: center; }
}
/* the unplug's toast, wherever the room is stacked (phones, portrait tablets): the after room's headline holds
   the top of the screen */
@media not all and (min-aspect-ratio: 5/4) and (min-width: 760px) and (min-height: 600px) {
  .toasts--low { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }
}
.toast {
  max-width: 420px;
  padding: 12px 16px;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff7e6;
  color: #111;
  font: 600 15px/1.35 var(--ff-body);
  box-shadow: 4px 4px 0 #000;
}
.toast--green { background: #c9ffd9; }
.toast--red { background: #ffd2d2; }

/* ---------- common bits ---------- */
.fineprint {
  margin: 14px 0 0;
  font: 500 13px/1.5 var(--ff-body);
  color: #a49c8d;
}
.fineprint--light { color: #c3c9e8; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--paper);
  color: #111;
  font: 700 14px/1 var(--ff-body);
  text-decoration: none;
  box-shadow: 2px 2px 0 #000;
}
.chip:hover { background: #fff; }
.chip .ico { width: 16px; height: 16px; }

/* contract pill */
.ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 10px;
  border: 3px solid #000;
  border-radius: 14px;
  background: var(--paper);
  color: #111;
  box-shadow: 4px 4px 0 #000;
}
.ca__label {
  flex: none;
  padding: 6px 8px 4px;
  border-radius: 7px;
  background: #000;
  color: var(--btc);
  font: 400 18px/1 var(--ff-display);
  letter-spacing: 0.06em;
}
.ca__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  flex: 1 1 140px;
  min-width: 0;
}
.ca__soon { font: 800 15px/1.25 var(--ff-body); }
.ca__value {
  font: 700 13px/1.3 var(--ff-mono);
  color: #6c6558;
  overflow-wrap: anywhere;
}
.ca__tag {
  padding: 1px 7px 2px;
  border: 1.5px dashed #8a8273;
  border-radius: 6px;
  color: #6c6558;
  font: 700 11px/1.3 var(--ff-body);
}
.ca.has-ca .ca__soon, .ca.has-ca .ca__tag { display: none; }
.ca.has-ca .ca__value { color: #111; font-size: 14px; }
/* the short CA (ExD3…pump) is narrower than the body's 140 px basis: on a shrink-wrapped pill that basis pushed Copy
   onto a second line once the real CA replaced the wider "CA drops at launch" */
.ca.has-ca[data-ca="short"] .ca__body { flex-basis: auto; }
.ca__copy {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid #000;
  border-radius: 11px;
  background: var(--btc);
  color: #000;
  font: 400 19px/1 var(--ff-display);
  letter-spacing: 0.04em;
  box-shadow: 2px 2px 0 #000;
  transition: transform 0.15s var(--ease-pop), background-color 0.2s;
}
.ca__copy:hover { transform: translate(-1px, -1px); }
.ca__copy.is-done { background: var(--green); }
.ca__copy .ico { width: 18px; height: 18px; stroke-width: 2.6; }

/* ---------- the room continues ----------
   Below the room the bulb's warm cone and its dust follow the viewport
   (page.js draws the dust; both rest until the room has been scrolled past). */
.roomlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.6s;
}
.roomlight.is-off { opacity: 0; }
.roomlight__cone {
  position: absolute;
  left: 50%;
  top: -8vh;
  width: 160vmax;
  height: 125vh;
  margin-left: -80vmax;
  background: radial-gradient(ellipse 30% 64% at 50% 0%, rgba(255, 204, 120, 0.15), rgba(253, 130, 62, 0.06) 46%, transparent 74%);
  transform-origin: 50% 0;
  animation: coneSway 7.5s ease-in-out infinite alternate;
}
@keyframes coneSway {
  from { transform: rotate(-2.2deg); }
  to { transform: rotate(2.2deg); }
}
.roomlight__dust { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  padding: 72px 16px calc(40px + env(safe-area-inset-bottom));
  background:
    radial-gradient(800px 300px at 15% 0%, rgba(252, 92, 4, 0.09), transparent 70%),
    #08080c;
  border-top: 4px solid #000;
}
.footer__in { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 900px) {
  .footer__in { grid-template-columns: 300px minmax(0, 1fr); align-items: start; column-gap: 56px; }
  .footer__cols, .footer__copy { grid-column: 1 / -1; }
}
.frame { margin: 0; display: grid; justify-items: center; gap: 14px; text-align: center; }
.frame__wood {
  padding: 14px;
  border: 3px solid #000;
  background: linear-gradient(135deg, #7a4d27 0%, #4a2a13 60%, #6b4423 100%);
  box-shadow: 6px 6px 0 #000, inset 0 0 0 4px #9a6a3a, inset 0 0 0 7px #000;
  transform: rotate(-2deg);
}
.frame__bill {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  width: 170px;
  height: 210px;
  padding: 18px 16px;
  background: #f6f1e4;
  border: 2px solid #000;
}
.frame__line { display: block; height: 7px; border-radius: 4px; background: #cfc6b2; }
.frame__line--short { width: 60%; }
.frame__bill b {
  margin-top: 18px;
  font: 400 34px/1 var(--ff-display);
  color: var(--red);
}
.frame__paid {
  position: absolute;
  right: 6px;
  bottom: 22px;
  padding: 6px 10px 3px;
  max-width: 150px;
  border: 4px solid #0b7a34;
  border-radius: 8px;
  overflow-wrap: anywhere;
  text-align: center;
  color: #0b7a34;
  font: 400 34px/1 var(--ff-display);
  letter-spacing: 0.06em;
  transform: rotate(-14deg);
  background: rgba(255, 255, 255, 0.4);
}
.frame figcaption { display: grid; gap: 6px; color: var(--muted); font-size: 14px; text-wrap: balance; }
/* the epilogue's plaque, in the PDF's English in every language (its translation under
   it), then its act */
.frame__title {
  font: 400 30px/1 var(--ff-brand);
  letter-spacing: 0.03em;
  color: var(--btc);
}
.frame__tr { color: var(--paper); font: 600 15px/1.4 var(--ff-body); }
.frame .act-link { justify-self: center; margin-top: 4px; color: var(--amber); }
.footer__h { margin: 0 0 12px; font: 400 32px/1 var(--ff-display); letter-spacing: 0.03em; color: #fff; }
/* the one paragraph that must be read: a reading measure, body size */
.footer__disclaimer {
  max-width: 68ch;
  margin: 0;
  color: #bdb6a8;
  font: 400 16px/1.7 var(--ff-body);
}
.footer__cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer__h3 { margin: 0 0 10px; font: 400 22px/1 var(--ff-display); letter-spacing: 0.04em; color: var(--amber); }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 2px 10px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.footer__links a:hover { color: #fff; text-decoration: underline; }
.tool--wide { padding: 0 16px; }
.footer .tool__label { display: inline; }
.footer__copy {
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 2px dashed #2a2930;
  color: #8b8476;
  font: 400 20px/1.2 var(--ff-display);
  letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
