/* Orbheist. Ink ground, bone type, one laser accent. One typeface, varied by width and weight. */
:root {
  --bg: #08090C; --surface: #0E1014; --raise: #14171D; --line: #20232A;
  --ink: #EFEBE2; --muted: #9B978D; --faint: #5F5C55;
  --accent: #FF5B2E; --accent-ink: #0B0604; --glow: rgba(255, 91, 46, 0.18);
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
p, h1, h2, h3, ol { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
em { font-style: normal; color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 24px; top: 12px; z-index: 40; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.eyebrow { font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.eyebrow.live { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); }
.eyebrow.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s var(--ease) infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 91, 46, 0); } }

.lead { font-size: clamp(17px, 1.55vw, 20px); line-height: 1.55; color: var(--muted); max-width: 54ch; }
h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.0; letter-spacing: -0.025em; font-stretch: 78%; }
h3 { font-size: 19px; line-height: 1.25; font-stretch: 90%; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; font-stretch: 85%; letter-spacing: -0.01em; }
.mark svg { width: 22px; height: 22px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { position: relative; text-decoration: none; font-size: 14px; color: var(--muted); padding: 8px 12px; transition: color 0.3s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--accent); border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; font-stretch: 88%; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 34px var(--glow), 0 0 0 4px rgba(255, 91, 46, 0.12); }
.btn span { transition: transform 0.3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.lg { padding: 17px 28px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: none; }

/* hero */
.hero { position: relative; min-height: min(880px, calc(100svh - 64px)); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; opacity: 0.35; mask-image: radial-gradient(ellipse 70% 70% at 62% 48%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 62% 48%, #000 20%, transparent 75%); }
/* The door sits inside the same centred column as the text, flush with its right edge. */
#orb { position: absolute; top: 50%; right: calc(max(24px, (100vw - 1160px) / 2) - 28px); width: min(47vw, 620px, 82svh); aspect-ratio: 1; transform: translateY(-50%); cursor: grab; touch-action: pan-y; }
#orb:active { cursor: grabbing; }
.hero-in { position: relative; width: 100%; display: grid; gap: 26px; justify-items: start; padding-block: 56px; pointer-events: none; }
.hero-in > * { pointer-events: auto; }
h1 { font-size: clamp(76px, 11.4vw, 168px); line-height: 0.82; letter-spacing: -0.035em; font-stretch: 62%; font-weight: 800; text-transform: uppercase; }
.hero .lead { max-width: 44ch; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.cachip { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); font: 400 13px/1.4 var(--mono); }
.cachip b { color: var(--accent); font-weight: 600; }
.cachip code { color: var(--muted); word-break: break-all; }
.cachip button { border: 1px solid var(--line); background: none; padding: 3px 10px; font: inherit; }
.hint { font: 400 12px/1.4 var(--mono); color: var(--faint); letter-spacing: 0.04em; }
.stamp { position: absolute; z-index: 2; left: 0; top: 0; padding: 6px 14px; border: 2px solid var(--accent); color: var(--accent); font: 800 26px/1 var(--font); font-stretch: 62%; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(-8deg) scale(1.5); }
.stamp.on { animation: stamp 1.1s var(--ease) both; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.9); } 14% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) rotate(-8deg) scale(1); } }

/* status rail */
.rail { border-bottom: 1px solid var(--line); background: var(--surface); }
.rail .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.rail .wrap > div { display: grid; gap: 6px; padding: 26px 24px 28px 0; }
.rail .wrap > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.rail strong { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.05; font-stretch: 75%; font-weight: 700; letter-spacing: -0.01em; }
.rail small { color: var(--muted); font-size: 13.5px; }

/* sections */
.block { padding-block: clamp(72px, 10vw, 136px) 0; }
.head { display: grid; gap: 16px; margin-bottom: 44px; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* the four moves */
.moves { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.move { position: relative; display: grid; gap: 12px; align-content: start; text-align: left; padding: 28px 24px 32px 0; background: none; border: 0; }
.move + .move { padding-left: 24px; border-left: 1px solid var(--line); }
.move::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.move.on::before { transform: scaleX(1); transition: transform 3.2s linear; }
.move .n { font: 500 12px/1 var(--mono); letter-spacing: 0.14em; color: var(--faint); transition: color 0.4s; }
.move.on .n { color: var(--accent); }
.move h3 { color: var(--muted); transition: color 0.4s; }
.move.on h3 { color: var(--ink); }
.move p { color: var(--faint); font-size: 15px; transition: color 0.4s; }
.move.on p { color: var(--muted); }
.example { margin-top: 26px; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--surface); font: 400 14px/1.5 var(--mono); color: var(--muted); min-height: 50px; }

/* demo console */
.console { display: grid; grid-template-columns: 1.55fr 1fr; border: 1px solid var(--line); background: var(--surface); }
.chat { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-right: 1px solid var(--line); }
.chat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tag { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 6px 9px; }
.log { height: 400px; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.msg { max-width: 82%; display: grid; gap: 4px; animation: rise 0.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.msg small { font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.msg p { padding: 11px 15px; background: var(--raise); border: 1px solid var(--line); }
.msg.you { align-self: flex-end; justify-items: end; }
.msg.orb p { border-color: rgba(255, 91, 46, 0.35); background: rgba(255, 91, 46, 0.07); }
.msg.orb small { color: var(--accent); }
.msg.wait p { color: var(--faint); font-family: var(--mono); font-size: 13px; }
.send { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.send input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; transition: border-color 0.3s; }
.send input:focus { outline: 0; border-color: var(--accent); }
.panel { display: grid; gap: 18px; align-content: start; padding: 22px 24px 26px; }
.orders { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: o; }
.orders li { counter-increment: o; display: grid; grid-template-columns: 26px 1fr; font-size: 15px; }
.orders li::before { content: "0" counter(o); font: 500 11px/1.9 var(--mono); color: var(--accent); }
.gauge { display: grid; gap: 10px; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.gauge-top { display: flex; justify-content: space-between; align-items: baseline; }
.gauge b { font: 600 15px/1 var(--mono); color: var(--accent); }
.bar { height: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.6s var(--ease); }

/* the vault */
.flowwrap { display: grid; gap: 30px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); background: var(--surface); }
.slider { display: grid; gap: 12px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.slider output { font: 700 30px/1 var(--font); font-stretch: 75%; color: var(--accent); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: none; cursor: ew-resize; --fill: 20%; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--glow); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.ticks { display: flex; justify-content: space-between; font: 400 11px/1 var(--mono); color: var(--faint); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.figures > div { display: grid; gap: 8px; padding: 20px 20px 22px 0; }
.figures > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.figures strong { font-size: clamp(28px, 4.2vw, 54px); line-height: 1; font-stretch: 70%; font-weight: 700; letter-spacing: -0.02em; }
.figures .hot strong { color: var(--accent); }
.flow, .curve { width: 100%; height: auto; display: block; }
.flow .dash { fill: none; stroke: var(--bg); stroke-opacity: 0.55; stroke-width: 1.5; stroke-dasharray: 3 13; animation: run 1.1s linear infinite; }
@keyframes run { to { stroke-dashoffset: -16; } }
.flow text, .curve text { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; fill: var(--faint); }
.split { display: grid; gap: 0; }
.split > div { display: grid; grid-template-columns: 12px 1fr auto 56px; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.split i { width: 12px; height: 12px; }
.split span { display: grid; font-weight: 600; font-stretch: 90%; }
.split small { font-weight: 400; color: var(--muted); font-size: 13.5px; font-stretch: 100%; }
.split b { font: 600 17px/1 var(--mono); }
.split em { font: 500 13px/1 var(--mono); color: var(--faint); text-align: right; }
.s-pot i { background: var(--accent); }
.s-think i { background: var(--ink); }
.s-burn i { background: #7A2A14; }
.note { color: var(--muted); font-size: 14px; max-width: 78ch; padding-left: 16px; border-left: 1px solid var(--line); }

/* rules, faq */
table.wide { width: 100%; border-collapse: collapse; }
.wide td { padding: 20px 24px 20px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.wide td:first-child { width: 34%; color: var(--ink); font-weight: 600; font-size: 19px; font-stretch: 85%; }
.wide tr:last-child td { border-bottom: 1px solid var(--line); }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; list-style: none; cursor: pointer; font-size: 19px; font-weight: 600; font-stretch: 88%; transition: color 0.3s; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font: 400 20px/1.2 var(--mono); color: var(--accent); transition: transform 0.4s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa summary:hover { color: var(--accent); }
.qa details p { padding: 0 0 22px; color: var(--muted); max-width: 66ch; }

.closing { display: grid; gap: 34px; justify-items: start; padding-block: clamp(96px, 13vw, 180px); }
.closing h2 { font-size: clamp(48px, 9vw, 132px); line-height: 0.86; font-stretch: 62%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; }

footer { border-top: 1px solid var(--line); padding-block: 28px 44px; color: var(--faint); font-size: 13px; }
footer .wrap { display: grid; gap: 6px; }
.dock { display: none; }

@media (max-width: 920px) {
  .nav { display: none; }
  .top .wrap > .btn { margin-left: auto; }
  .hero { min-height: 0; display: block; }
  #orb { position: relative; top: 0; right: auto; transform: none; width: 100%; max-width: 520px; margin: 0 auto -40px; display: block; }
  .hero-in { padding-block: 0 44px; gap: 22px; }
  .hint { display: none; }
  .rail .wrap { grid-template-columns: 1fr 1fr; }
  .rail .wrap > div { padding: 20px 16px 20px 0; }
  .rail .wrap > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .rail .wrap > div:nth-child(even) { padding-left: 16px; }
  .rail .wrap > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .moves { grid-template-columns: 1fr; }
  .move, .move + .move { padding: 22px 0; border-left: 0; border-top: 1px solid var(--line); }
  .move:first-child { border-top: 0; }
  .console { grid-template-columns: 1fr; }
  .chat { border-right: 0; border-bottom: 1px solid var(--line); }
  .log { height: 340px; }
  .msg { max-width: 92%; }
  .figures { grid-template-columns: 1fr; }
  .figures > div, .figures > div + div { padding: 16px 0; border-left: 0; }
  .figures > div + div { border-top: 1px solid var(--line); }
  .split > div { grid-template-columns: 12px 1fr auto; }
  .split em { display: none; }
  .wide td { display: block; padding: 0 0 18px; border-top: 0; }
  .wide td:first-child { width: auto; padding: 18px 0 4px; border-top: 1px solid var(--line); }
  .wide tr:last-child td { border-bottom: 0; }
  .dock { display: flex; position: fixed; z-index: 25; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); transform: translateY(140%); transition: transform 0.5s var(--ease); }
  .dock.show { transform: none; }
  footer { padding-bottom: 96px; }
}

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

/* live game */
.winner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; padding: 18px 22px; border: 1px solid var(--accent); background: rgba(255, 91, 46, 0.08); }
.winner > div { display: grid; gap: 6px; max-width: 70ch; }
.send-status { margin: 0; padding: 10px 20px 14px; font: 400 13px/1.5 var(--mono); color: var(--muted); border-top: 1px solid var(--line); }
.send-status.bad { color: var(--accent); }
.send .btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.wallet { display: grid; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.wallet dl { margin: 0; display: grid; gap: 6px; }
.wallet dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.wallet dt { color: var(--muted); }
.wallet dd { margin: 0; font-family: var(--mono); font-size: 13px; }
.wallet a { color: var(--accent); }
.full summary { cursor: pointer; font-size: 14px; color: var(--accent); list-style: none; }
.full summary::-webkit-details-marker { display: none; }
.full summary::after { content: " +"; font-family: var(--mono); }
.full[open] summary::after { content: " –"; }
.full pre { margin: 12px 0 0; padding: 14px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); font: 400 12px/1.6 var(--mono); color: var(--muted); }
.msg.won p { border-color: var(--accent); background: rgba(255, 91, 46, 0.2); color: var(--ink); }
footer a { color: var(--muted); }

/* pages */
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.more { color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; }
.told { margin: 0; padding: clamp(18px, 3vw, 32px); white-space: pre-wrap; word-break: break-word; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); font: 400 14px/1.7 var(--mono); color: var(--muted); }
.wide td a { color: var(--accent); word-break: break-all; }
@media (max-width: 920px) {
  .nav { display: flex; flex: 0 1 auto; margin-left: auto; gap: 0; }
  .nav a { padding: 8px 9px; font-size: 13.5px; }
  .top .wrap { gap: 12px; }
  .top .wrap > .btn { display: none; }
}
