/* Margin Call landing page: the same trading-floor colours and fonts as the game, one dark look on purpose. */
:root {
  --bg: #0a1c26; --panel: #10293a; --panel-2: #153447; --line: #22495c; --deep: #071219;
  --fg: #e9f4f1; --soft: #bfd8d5; --muted: #8eb0b4;
  --accent: #ffb547; --accent-ink: #2a1700; --up: #52d38f; --down: #ff5d52; --even: #7cc4ff; --sl: #ff8f6b;
  --f-display: "Rubik Mono One", "Rubik", system-ui, sans-serif;
  --f-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--fg); margin: 0; }
body { font: 16px/1.55 var(--f-body); overflow-x: hidden; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--even); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font: 400 15px var(--f-display); letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 4px 0 #b9741c; transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #b9741c; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b9741c; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 12px; box-shadow: 0 3px 0 #b9741c; }
.btn.ghost { background: none; color: var(--fg); border: 1px solid var(--line); box-shadow: none; font: 500 16px var(--f-body); }
.btn.ghost:hover { border-color: var(--muted); transform: none; }

/* header and the live ticker */
.nav-end { display: flex; align-items: center; gap: 10px; }
.x-link { display: inline-flex; padding: 9px; border-radius: 10px; color: var(--soft); }
.x-link:hover { color: var(--fg); background: var(--panel); }
.nav-link { color: var(--soft); text-decoration: none; font-size: 15px; padding: 8px 6px; }
.nav-link:hover { color: var(--fg); }
.nav { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font: 400 22px/1 var(--f-display); letter-spacing: .02em; text-decoration: none; }
.logo span { color: var(--accent); }
.tape { background: var(--deep); border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.tape-track { display: inline-flex; animation: tape 48s linear infinite; }
.tape-track > div { display: inline-flex; }
.tape-item { display: inline-flex; gap: 10px; align-items: baseline; padding: 10px 26px; font: 500 14px var(--f-mono); font-variant-numeric: tabular-nums; border-right: 1px solid var(--line); }
.tape-item b { color: var(--accent); font-weight: 700; }
.tape-item .up { color: var(--up); }
.tape-item .down { color: var(--down); }
.tape-item .even { color: var(--muted); }
@keyframes tape { to { transform: translateX(-50%); } }
.tape:hover .tape-track { animation-play-state: paused; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; padding-top: 36px; padding-bottom: 52px; }
.eyebrow, .kicker { font: 600 13px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h1 { font: 400 clamp(34px, 5vw, 56px)/1.08 var(--f-display); letter-spacing: -.01em; margin: 16px 0 22px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--soft); max-width: 36em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { margin-top: 14px; color: var(--muted); font-size: 14px; }
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#heroBuilding { width: 288px; aspect-ratio: 128 / 244; display: block; image-rendering: pixelated; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px #ffb54740; }
.hero-art figcaption { max-width: 300px; text-align: center; font-size: 13px; color: var(--muted); }

/* sections */
.block { padding-top: 52px; padding-bottom: 52px; border-top: 1px solid #ffffff0d; }
h2 { font: 400 clamp(24px, 3.2vw, 36px)/1.15 var(--f-display); margin: 12px 0 16px; }
.sub { color: var(--soft); font-size: 17px; max-width: 40em; }
.sub + .sub { margin-top: 14px; }
.shot { display: block; width: 100%; height: auto; margin-top: 32px; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 70px -30px #000; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.split .shot { margin-top: 0; }
.split.reverse > :first-child { order: 2; }
.shot.tall { max-width: 300px; justify-self: center; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.fact h3 { font: 600 17px var(--f-body); margin-bottom: 8px; }
.fact p { color: var(--soft); font-size: 15px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 600 13px var(--f-mono); background: var(--deep); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.chips i { font-style: normal; color: var(--muted); font-weight: 400; }

/* the margin call diagram */
.diagram { background: var(--deep); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 14px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram line { stroke-width: 2; stroke-dasharray: 6 5; }
.l-entry { stroke: var(--soft); }
.l-stop { stroke: var(--sl); }
.l-liq { stroke: var(--down); }
.path { fill: none; stroke: var(--even); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.path.ghost { stroke: var(--down); stroke-dasharray: 3 6; opacity: .8; }
.dot-stop { fill: var(--sl); }
.dot-liq { fill: var(--down); }
.diagram text { font: 700 12px var(--f-mono); letter-spacing: .03em; }
.t-entry { fill: var(--soft); }
.t-stop { fill: var(--sl); }
.t-liq { fill: var(--down); }
.diagram figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }

/* floors of the bank */
.floors { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.floors li { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.floors li > b { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #3a2a10; color: var(--accent); font: 400 15px var(--f-display); }
.floors strong { display: block; font-weight: 600; }
.floors span { color: var(--soft); font-size: 15px; }
.floors li.you { border-color: var(--accent); }

/* the example review, styled like the game's card */
.review { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.review header { display: flex; justify-content: space-between; align-items: center; }
.review h3 { font: 400 15px var(--f-display); }
.tag { font: 600 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.grades { display: flex; gap: 12px; }
.grade { flex: 1; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grade b { font: 400 40px/1 var(--f-display); }
.grade small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.gA { color: var(--up); }
.gD { color: var(--down); }
.metrics { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 14px; }
.metrics dt { color: var(--muted); }
.metrics dd { font: 600 14px var(--f-mono); text-align: right; }
.up { color: var(--up); }
.voices { display: flex; flex-direction: column; gap: 8px; }
.voices p { background: var(--deep); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--soft); }
.voices b { display: block; font: 700 11px var(--f-mono); letter-spacing: .1em; color: var(--accent); margin-bottom: 2px; }

/* the bots */
.bots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.bot { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.bot h3 { font: 600 18px var(--f-body); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.bot h3 i { font: 500 12px var(--f-mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.bot p { color: var(--soft); font-size: 15px; }
.bot.later { background: none; border-style: dashed; }
.bot.friends { grid-column: 1 / -1; border-color: var(--accent); background: linear-gradient(90deg, #3a2a10 0%, var(--panel) 55%); }
.bot.friends p { max-width: 52em; }
.bot.later h3 i, .bot.friends h3 i { color: var(--muted); }

/* the desk on a laptop with the phone in front of it */
.devices { position: relative; margin-top: 28px; padding-bottom: 5%; }
.browser { width: 86%; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--deep); box-shadow: 0 30px 70px -30px #000; }
.browser .bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #0d2230; border-bottom: 1px solid var(--line); }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5d52aa; }
.browser .bar i:nth-child(2) { background: #ffb547aa; }
.browser .bar i:nth-child(3) { background: #52d38faa; }
.browser img, .phone img { display: block; width: 100%; height: auto; }
.phone { position: absolute; right: 0; bottom: 0; width: 21%; margin: 0; border-radius: 26px; overflow: hidden; border: 7px solid #1c2c36; background: #1c2c36; box-shadow: -20px 30px 60px -20px #000c; }

/* questions */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 18px var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--soft); padding-bottom: 16px; max-width: 44em; }

/* the last call and the footer */
.final { text-align: center; padding-top: 56px; padding-bottom: 64px; border-top: 1px solid #ffffff0d; }
.final p { color: var(--soft); margin-bottom: 26px; font-size: 17px; }
.foot { padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.foot b { color: var(--soft); }

@media (max-width: 960px) {
  .bots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .wrap, .nav { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; padding-bottom: 48px; }
  .lead { font-size: 17px; }
  #heroBuilding { width: min(280px, 78vw); }
  .block { padding-top: 48px; padding-bottom: 48px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse > :first-child { order: 0; }
  .shot.tall { max-width: min(300px, 100%); }
  .devices { padding-bottom: 14%; }
  .browser { width: 90%; }
  .browser .bar { height: 18px; gap: 5px; padding: 0 8px; }
  .browser .bar i { width: 6px; height: 6px; }
  .phone { width: 31%; border-width: 4px; border-radius: 16px; }
  .qa { grid-template-columns: 1fr; }
  .logo { font-size: 18px; }
}
@media (max-width: 520px) {
  .bots { grid-template-columns: 1fr; }
  .x-link, .nav-link { display: none; } /* no room next to the button on a phone: X and the board stay in the page */
  .ctas { flex-direction: column; }
  .diagram text { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track { animation: none; }
  .tape { overflow-x: auto; }
}
.mood-line { margin-top: 8px; color: var(--soft); font-size: 14px; }
.mood-line b { font: 700 14px var(--f-mono); }
.mood-line .up, a.tape-item .up { color: var(--up); } .mood-line .down, a.tape-item .down { color: var(--down); } .mood-line .even { color: var(--fg); }
.mood-line a { color: var(--accent); }
a.tape-item { color: inherit; text-decoration: none; }
