/* GME CHAIN · "Player One" design system. The site is a game: menus, a HUD, a shop, quests. See DESIGN.md.
   GME colours: pure black, GME red for the brand and every action, white second, amber for risk, green only for success. */

:root {
  --bg: #000000;
  --bg-2: #070707;
  --panel: #0F0F10;
  --panel-2: #18181A;
  --edge: #2A2A2D;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .2);
  --fg: #FFFFFF;
  --fg-2: #B8B8BC;
  --muted: #8C8C92;
  /* GME red is the brand and the main accent; white is the second colour */
  --up: #FF2D2D;
  --up-deep: #8F0D12;
  --up-ink: #FFFFFF;
  --up-dim: rgba(255, 45, 45, .12);
  --vio: #FFFFFF;
  --vio-2: #FF6A6A;
  --vio-deep: #5A0508;
  --down: #FFB020;
  --down-dim: rgba(255, 176, 32, .12);
  --warn: #FFB020;
  --ok: #3BE07E;

  --display: "GME Display", Impact, "Arial Narrow", sans-serif;
  --font: "GME Body", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hud: "GME HUD", ui-monospace, monospace;
  --mono: "M PLUS 1 Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --w: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --sec: clamp(80px, 11vw, 140px);
  --r-sm: 10px; --r: 18px; --r-lg: 26px;
  --ease: cubic-bezier(.2, .9, .25, 1.2);
  --nav-h: 70px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 32px); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "liga" 0, "clig" 0; overflow-x: hidden; }
main { overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, .mono { font-family: var(--mono); font-size: .875em; }
[hidden] { display: none !important; }
::selection { background: var(--up); color: #fff; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; }
.wrap { width: min(var(--w), 100% - 2 * var(--gut)); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--up); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
[data-live], [data-app-price], [data-market] { font-variant-numeric: tabular-nums; }

/* ---------- type ---------- */
h1, .display { font: 400 clamp(2.6rem, 7vw, 5.6rem)/.98 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
h2, .h2 { font: 400 clamp(2rem, 4.6vw, 3.6rem)/1 var(--display); text-transform: uppercase; }
h3, .h3 { font: 700 clamp(1.3rem, 2vw, 1.6rem)/1.2 var(--font); }
h4 { font: 700 1.125rem/1.3 var(--font); }
h1 em, h2 em, .display em { font-style: normal; color: var(--up); }
.lead, .lede { font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--fg-2); max-width: 58ch; }
.label, .kicker { font: 400 .8125rem/1.3 var(--hud); letter-spacing: .08em; text-transform: uppercase; color: var(--vio-2); }
.kicker { display: inline-flex; align-items: center; gap: 10px; }
.muted, .muted-p { color: var(--fg-2); }
.fine, small { font-size: .875rem; color: var(--muted); line-height: 1.55; }
.up { color: var(--up); }
.down { color: var(--down); }
.link { color: #FF5A5A; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link:hover { color: #fff; }

/* ---------- buttons: game buttons you can press ---------- */
.btn { --bg: var(--panel-2); --fg: var(--fg); --sh: #0A0812; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 14px; background: var(--bg); color: var(--fg); font: 700 1rem/1 var(--font); letter-spacing: .02em; text-decoration: none; white-space: nowrap; box-shadow: 0 5px 0 var(--sh), inset 0 1px 0 rgba(255, 255, 255, .14); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sh), inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-go, .btn-accent { --bg: var(--up); --fg: var(--up-ink); --sh: var(--up-deep); }
.btn-vio { --bg: #FFFFFF; --fg: #000; --sh: #7A7A80; }
.btn-ghost, .btn-line { --bg: var(--panel-2); --sh: #08060E; }
.btn-sm, .btn-small { min-height: 40px; padding: 8px 16px; font-size: .9375rem; border-radius: 12px; box-shadow: 0 4px 0 var(--sh), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-lg { min-height: 58px; padding: 16px 28px; font-size: 1.125rem; border-radius: 16px; box-shadow: 0 6px 0 var(--sh), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-block { width: 100%; }
.btn .ar { transition: transform .2s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.key { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em; border-radius: 50%; background: rgba(0, 0, 0, .25); font: 700 .8em/1 var(--font); }
.link-btn { background: none; border: 0; padding: 4px 2px; color: #FF5A5A; font: 600 .9375rem var(--font); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- small parts ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 12px var(--up); flex: none; }
.dot.live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tag, .pill { display: inline; font: 400 .8125rem/1.3 var(--hud); text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); white-space: nowrap; }
.tag.live, .pill.ok, .tag.ok { color: var(--ok); }
.tag.planned, .tag.plain { color: var(--muted); }
.tag.warn { color: var(--warn); }
.copy-chip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 2px solid var(--edge); border-radius: 12px; background: var(--panel); font: 600 .875rem var(--font); color: var(--fg-2); }
.copy-chip code { color: var(--fg); }
.copy-chip svg { width: 15px; height: 15px; }
.copy-chip:hover { border-color: var(--up); color: var(--fg); }
.copy-chip.copied { border-color: var(--ok); }
.copy-chip.copied::after { content: "copied"; font-weight: 700; color: var(--ok); }

/* ---------- windows: game UI panels ---------- */
.card, .panel { position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 2px solid var(--edge); border-radius: var(--r); padding: clamp(18px, 2.4vw, 28px); min-width: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 50px -28px rgba(0, 0, 0, .9); }
.card + .card { margin-top: 18px; }
.notice { border: 2px solid rgba(255, 176, 32, .45); background: rgba(255, 176, 32, .08); color: var(--fg); border-radius: var(--r-sm); padding: 14px 16px; font-size: .9375rem; }
.notice b { font-weight: 700; }
.loading { color: transparent !important; background: linear-gradient(90deg, var(--panel-2) 25%, #2A2A2E 50%, var(--panel-2) 75%); background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.2s linear infinite; min-width: 4ch; display: inline-block; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tick { animation: tick .7s var(--ease); }
@keyframes tick { 30% { transform: scale(1.12); color: var(--up); } }

/* ---------- navigation: a game menu ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 2px solid var(--edge); transition: transform .3s; }
.nav.hide { transform: translateY(-100%); }
.nav-in { display: flex; align-items: center; gap: 24px; width: min(1320px, 100% - 2 * var(--gut)); margin-inline: auto; height: var(--nav-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--up); filter: drop-shadow(0 0 10px rgba(255, 45, 45, .45)); transition: transform .5s var(--ease); }
.logo:hover .logo-mark { transform: rotate(90deg); }
/* the wordmark keeps its own type (approved as is) */
.logo-word { font: 900 1.5rem/1 "Big Shoulders Display", "Arial Narrow", sans-serif; letter-spacing: .01em; white-space: nowrap; }
.logo-word em { font: 400 italic 1.05em/1 "Instrument Serif", Georgia, serif; color: var(--up); margin-left: .08em; letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; }
.nav-links a { position: relative; padding: 9px 14px 9px 24px; border-radius: 10px; font: 400 .9375rem var(--hud); text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); text-decoration: none; transition: color .15s, background .15s; }
.nav-links a::before { content: "▶"; position: absolute; left: 8px; top: 50%; font-size: .6em; color: var(--up); opacity: 0; transform: translate(-4px, -50%); transition: opacity .15s, transform .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); background: var(--panel); }
.nav-links a:hover::before, .nav-links a[aria-current="page"]::before { opacity: 1; transform: translate(0, -50%); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.price-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 2px solid var(--edge); border-radius: 999px; background: var(--panel); font: 700 .875rem var(--font); text-decoration: none; color: var(--fg-2); }
.price-chip .coin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFB3B3, var(--up) 45%, var(--up-deep)); color: #fff; font: 400 .625rem/1 var(--display); }
.price-chip b { color: var(--fg); }
.menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--panel-2); box-shadow: 0 4px 0 #08060E; }
.menu-btn span { width: 20px; height: 3px; background: var(--fg); border-radius: 2px; }
.sheet { position: fixed; inset: 0; z-index: 120; background: var(--bg); padding: 16px var(--gut) 32px; display: flex; flex-direction: column; gap: 8px; transform: translateY(-102%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
.sheet.open { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet > a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border: 2px solid var(--edge); border-radius: var(--r); background: var(--panel); text-decoration: none; }
.sheet > a b { font: 400 1.4rem/1 var(--display); text-transform: uppercase; }
.sheet > a b::before { content: "▶ "; color: var(--up); font-size: .7em; vertical-align: middle; }
.sheet > a small { font-weight: 600; color: var(--muted); }
@media (max-width: 1040px) {
  .nav-links, .price-chip { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-right { margin-left: auto; }
}
@media (max-width: 520px) { .nav-cta { display: none; } .nav-right [data-connect] { padding-inline: 12px; } }

/* ---------- sections ---------- */
.sec { position: relative; padding-block: var(--sec); }
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 820px; }
.sec-head.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); max-width: none; align-items: end; gap: 32px; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
@media (max-width: 860px) { .sec-head.split { grid-template-columns: 1fr; } }
.world { display: inline-flex; align-items: center; gap: 10px; font: 400 .875rem/1 var(--hud); letter-spacing: .12em; text-transform: uppercase; color: var(--vio-2); }
.world b { padding: 5px 9px; border-radius: 8px; background: var(--up); color: #fff; letter-spacing: .04em; }

/* ---------- footer: the credits ---------- */
.foot { position: relative; padding: 80px 0 32px; background: var(--bg-2); border-top: 2px solid var(--edge); overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot-brand { display: grid; gap: 18px; align-content: start; max-width: 36ch; color: var(--fg-2); }
.foot-brand .logo { color: var(--fg); }
.gmec-links { margin-top: -8px; font-size: .875rem; color: var(--muted); }
.foot .copy-chip { justify-self: start; }
.foot-h { font: 400 .8125rem/1 var(--hud); letter-spacing: .12em; text-transform: uppercase; color: var(--vio-2); margin-bottom: 16px; }
.foot ul { display: grid; gap: 10px; }
.foot ul a { text-decoration: none; color: var(--fg-2); font-weight: 500; }
.foot ul a:hover { color: var(--up); }
.foot-word { display: block; width: 100%; margin: 64px 0 24px; touch-action: pan-y; }
.foot-base { display: flex; justify-content: space-between; gap: 32px; padding-top: 24px; border-top: 2px solid var(--edge); font-size: .8125rem; color: var(--muted); }
.foot-base p:first-child { max-width: 92ch; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } .foot-base { flex-direction: column; } }

/* ---------- reveal on scroll ---------- */
.js .rv { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- confetti (window.gmeConfetti) ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
