/* MARGIN CALL — 1987 terminal. Hard shadows, no radius, mono digits. */

:root {
  --bg: #131017;
  --panel: #1b1622;
  --line: #2b2334;
  --ink: #f0ece2;
  --dim: #8e8e96;
  --green: #39d36e;
  --red: #c0393f;
  --red-hot: #d93a30;
  --gold: #d9a83f;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(217, 58, 48, 0.05), rgba(0, 0, 0, 0) 340px),
    url("assets/bg-tile.png") repeat,
    var(--bg);
}

img { image-rendering: pixelated; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.wordmark { height: 28px; width: auto; }
.topbar nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.topbar a {
  color: var(--dim); text-decoration: none;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
}
.topbar a:hover, .topbar a:focus-visible { color: var(--green); }

/* ---------- hero ---------- */
main { max-width: 1020px; margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 56px 0 40px; }
.tagline { font-size: clamp(18px, 2.6vw, 24px); margin: 0 0 34px; }
.tagline b { color: var(--red-hot); }

.clockbox {
  display: inline-block;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 6px 6px 0 #000;
  padding: 26px 36px 20px;
  margin-bottom: 34px;
}

/* ---------- split-flap clock ---------- */
.clock {
  font-family: var(--mono);
  font-size: clamp(56px, 12vw, 104px);
  font-weight: 700;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.08em;
}
.flap {
  display: inline-block;
  position: relative;
  width: 0.78em;
  padding: 0.14em 0;
  text-align: center;
  background: linear-gradient(180deg, #2d2637 0%, #241e2e 48%, #1c1725 52%, #211b2a 100%);
  border: 1px solid #0a0810;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 4px 4px 0 #000;
  text-shadow: 0 0 18px rgba(57, 211, 110, 0.35);
  transform-style: preserve-3d;
}
.flap::after {  /* the split hinge */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.flap.animating { animation: flap-cycle 0.26s ease-in-out; }
@keyframes flap-cycle {
  0%   { transform: perspective(420px) rotateX(0); }
  45%  { transform: perspective(420px) rotateX(-86deg); }
  55%  { transform: perspective(420px) rotateX(-86deg); }
  100% { transform: perspective(420px) rotateX(0); }
}
.clock.red .flap { color: var(--red-hot); text-shadow: 0 0 18px rgba(217, 58, 48, 0.4); }
.fcolon { padding: 0 0.04em; }
.clock .colon { animation: blink 1.2s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) {
  .clock .colon { animation: none; }
  .flap.animating { animation: none; }
}
@keyframes blink { 50% { opacity: 0.15; } }
.clock-status { margin: 14px 0 0; color: var(--dim); font-family: var(--mono); font-size: 13px; }

/* ---------- ticker tape ---------- */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0e0b12;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-block;
  padding: 7px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.ticker-inner.on { animation: ticker-scroll 46s linear infinite; }
.ticker-inner span { margin-right: 3.2em; }
.ticker-inner span::after { content: "·"; margin-left: 3.2em; color: var(--line); }
.ticker-inner b.up { color: var(--green); font-weight: 600; }
.ticker-inner b.dn { color: var(--red-hot); font-weight: 600; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-inner { animation: none; } }

/* ---------- the floor panorama ---------- */
.floor-wrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  line-height: 0;
}
.floor {
  display: block;
  width: 100%;
  min-width: 900px;
  margin-left: 50%;
  transform: translateX(-50%);
  animation: crt-glow 5s ease-in-out infinite;
}
@keyframes crt-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.06); } }
@media (prefers-reduced-motion: reduce) { .floor { animation: none; } }

.stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.stat {
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 4px 4px 0 #000;
  padding: 14px 22px; min-width: 200px;
}
.stat-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
}
.stat-value {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums; margin: 4px 0 2px;
}
.stat-sub { font-size: 12px; color: var(--dim); }
.stat-sub a { color: var(--green); }

.cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em;
  text-decoration: none; text-transform: uppercase;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 4px 4px 0 #000;
  padding: 14px 28px;
}
.btn-mint { background: var(--red); border-color: var(--red); color: #fff; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.btn:not([aria-disabled="true"]):hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }

/* ---------- sections ---------- */
.block { padding: 44px 0; border-top: 1px solid var(--line); }
h2 {
  font-family: var(--mono); font-size: clamp(20px, 3vw, 26px);
  color: var(--green); margin: 0 0 20px; letter-spacing: 0.02em;
}
.big { font-size: clamp(18px, 2.4vw, 22px); max-width: 62ch; margin: 0 0 26px; }
.big b { color: var(--gold); }

.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card3 {
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 4px 4px 0 #000; padding: 18px 20px;
}
.card3 .n {
  font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--red-hot);
  font-variant-numeric: tabular-nums;
}
.card3 p { margin: 6px 0 0; font-size: 15px; color: var(--dim); }

.steps { max-width: 68ch; padding-left: 24px; margin: 0; }
.steps li { margin-bottom: 16px; }
.steps b { color: var(--gold); font-family: var(--mono); }

/* ---------- clerks ---------- */
.castes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.caste {
  display: flex; align-items: baseline; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); padding: 12px 16px;
  font-size: 14px; color: var(--dim);
}
.caste .num {
  font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.strip img {
  width: 100%; aspect-ratio: 1; display: block;
  border: 1px solid var(--line); box-shadow: 4px 4px 0 #000;
}
.legends-h { font-family: var(--mono); color: var(--gold); margin: 36px 0 14px; font-size: 18px; }
.legends { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.legend { margin: 0; }
.legend img { width: 100%; aspect-ratio: 1; display: block; border: 1px solid var(--line); }
.legend figcaption {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  padding-top: 6px; text-align: center; letter-spacing: 0.08em;
}
.center { text-align: center; }
.dim { color: var(--dim); }

/* ---------- faq ---------- */
details {
  background: var(--panel); border: 1px solid var(--line);
  margin-bottom: 10px; padding: 0 18px;
}
summary {
  cursor: pointer; padding: 14px 0;
  font-family: var(--mono); font-weight: 600; font-size: 15px;
}
summary:hover { color: var(--green); }
details p { margin: 0 0 16px; color: var(--dim); max-width: 72ch; }
details b { color: var(--ink); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 22px 40px; text-align: center;
}
.addr { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-bottom: 6px; word-break: break-all; }
.addr a { color: var(--green); text-decoration: none; }
footer .dim { font-size: 13px; margin-top: 14px; }
