/* Mimir design tokens (mimir-markets docs/DESIGN.md): dark ink, cream type, coral accent, round glass cards. */
@font-face { font-family: "Geist Pixel"; src: url("fonts/GeistPixel-Square.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Terminal Grotesque"; src: url("fonts/terminal-grotesque.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #110f0e; --ink-deep: #0a0808; --panel: #1c1817; --panel-2: #272120; --maroon: #4a2322;
  --cream: #f3ead6; --muted: #a89d93; --dim: #928780;
  --red: #ff2b2b; --coral: #ff5148; --coral-hi: #ff746c; --deep: #8f0e17; --win: #9fd6a8;
  --line: rgb(243 234 214 / 0.12); --line-strong: rgb(243 234 214 / 0.3);
  --glass-card: rgb(28 20 21 / 0.93);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --gut: clamp(16px, 4vw, 40px);
  --pixel: "Geist Pixel", ui-monospace, monospace;
  --grotesk: "Terminal Grotesque", var(--pixel);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1.25, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; color: var(--cream); font: 15px/1.7 var(--pixel); background: var(--ink); -webkit-font-smoothing: antialiased; }
.wall {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(rgba(0, 0, 0, 0.55) 1px, transparent 1.4px) 0 0 / 4px 4px,
    linear-gradient(180deg, rgba(17, 15, 14, 0.8), rgba(17, 15, 14, 0.9) 60%, rgba(17, 15, 14, 0.97)),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(123, 20, 27, 0.35), transparent 70%),
    var(--ink);
}
a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-hi); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgb(255 81 72 / 0.35); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.mono, code, pre { font-family: var(--mono); }
code { font-size: 0.86em; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--cream); overflow-wrap: anywhere; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gut); background: rgb(17 15 14 / 0.88); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cream); font: 26px/1 var(--grotesk); letter-spacing: -0.02em; }
.brand:hover { color: var(--cream); }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand b { font-weight: 400; background: linear-gradient(180deg, var(--deep), #e93b37); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { color: var(--muted); }
.links { display: flex; gap: 4px; margin-left: auto; }
.links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.links a:hover { color: var(--cream); background: rgb(243 234 214 / 0.06); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 999px; white-space: nowrap;
  font: 16px/1 var(--grotesk); color: var(--cream); background: rgb(243 234 214 / 0.06); border: 1px solid var(--line);
  transition: transform 200ms var(--ease), background 150ms ease, border-color 150ms ease;
}
.pill:hover { color: var(--cream); border-color: var(--line-strong); }
.pill:active { transform: scale(0.97); }
.pill.primary { background: var(--coral); color: #160909; border-color: transparent; box-shadow: 0 10px 30px -10px rgb(255 81 72 / 0.6); }
.pill.primary:hover { background: var(--coral-hi); color: #160909; }
.pill.lg { padding: 14px 24px; font-size: 19px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.actions.center { justify-content: center; }

/* Type */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
h1, h2, h3 { font-family: var(--grotesk); font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; margin: 0; }
h1 { margin: 20px 0; font-size: clamp(48px, 7.4vw, 96px); }
h2 { margin: 16px 0 18px; font-size: clamp(38px, 5.4vw, 64px); }
h3 { font-size: 26px; }
h1 em, h2 em { font-style: normal; background: linear-gradient(100deg, #a90f19, var(--coral) 45%, #fff4f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 64px; }
.verdict {
  margin: 0; padding: 24px; border-radius: 28px; background: var(--glass-card); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(1.5deg); position: relative;
}
.verdict-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; color: #ffb3ad; background: rgb(255 43 43 / 0.14); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
.q { margin: 18px 0 16px; font: 26px/1.15 var(--grotesk); }
.split { display: flex; height: 34px; border-radius: 999px; overflow: hidden; font-size: 13px; background: var(--panel-2); }
.split span { display: flex; align-items: center; padding: 0 14px; }
.split span:first-child { background: linear-gradient(90deg, var(--deep), var(--coral)); color: #fff4f0; }
.split span:last-child { flex: 1; justify-content: flex-end; color: var(--muted); }
.ruling { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--ink-deep); border: 1px solid var(--line); }
.ruling-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ruling-title b { font-weight: 400; color: var(--win); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 10px var(--win); }
.conf { margin-left: auto; color: var(--dim); font-size: 12px; }
.ruling p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 0; }
.meta div { padding: 10px 12px; border-radius: 14px; background: var(--panel); }
.meta dt { color: var(--dim); font-size: 11px; }
.meta dd { margin: 2px 0 0; font-size: 13px; }
.meta .ok { color: var(--win); }
.verdict figcaption { position: absolute; bottom: -26px; right: 8px; color: var(--dim); font-size: 11px; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 28px; background: var(--glass-card); box-shadow: var(--shadow); overflow: hidden; }
.stats div { padding: 26px 24px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font: 44px/1 var(--grotesk); font-weight: 400; color: var(--cream); }
.stats span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Bands */
.band { padding-top: 120px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; position: relative; }
.steps li { counter-increment: s; padding: 24px; border-radius: 22px; background: var(--panel); position: relative; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 50%;
  font: 24px/1 var(--grotesk); color: #160909; background: linear-gradient(180deg, var(--coral-hi), var(--coral));
  box-shadow: 0 8px 24px -8px rgb(255 81 72 / 0.7);
}
.steps li:not(:last-child)::after { content: "→"; position: absolute; top: 34px; right: -12px; z-index: 1; color: var(--coral); font-size: 18px; }
.steps b { display: block; font: 28px/1 var(--grotesk); font-weight: 400; margin-bottom: 10px; }
.steps span { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Layers */
.layers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
.layers article { padding: 28px; border-radius: 26px; background: var(--glass-card); box-shadow: var(--shadow); transition: transform 280ms var(--ease); }
.layers article:hover { transform: translateY(-3px); }
.layers .n { display: block; margin-bottom: 18px; color: var(--coral); font: 14px/1 var(--mono); }
.layers h3 { margin-bottom: 10px; font-size: 30px; }
.layers p { margin: 0; color: var(--muted); font-size: 15px; }
.fair { margin-top: 14px; padding: 28px; border-radius: 26px; background: linear-gradient(120deg, rgb(74 35 34 / 0.75), rgb(28 20 21 / 0.93)); border: 1px solid rgb(255 81 72 / 0.22); }
.fair h3 { margin-bottom: 10px; font-size: 30px; }
.fair p { margin: 0; max-width: 760px; color: var(--cream); opacity: 0.85; }

/* Products */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.product { display: flex; flex-direction: column; padding: 28px; border-radius: 26px; background: var(--glass-card); box-shadow: var(--shadow); color: var(--cream); transition: transform 280ms var(--ease), box-shadow 200ms ease; }
.product:hover { color: var(--cream); transform: translateY(-4px); box-shadow: var(--shadow), 0 0 0 1px rgb(255 81 72 / 0.35); }
.tag { align-self: flex-start; margin-bottom: 18px; padding: 3px 10px; border-radius: 999px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #ffb3ad; background: rgb(255 43 43 / 0.14); }
.product h3 { font-size: 34px; margin-bottom: 12px; }
.product p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.go { margin-top: auto; color: var(--coral); font-size: 14px; }

/* Build */
.build { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
pre {
  margin: 0; padding: 26px 28px; border-radius: 24px; background: var(--ink-deep); border: 1px solid var(--line);
  overflow-x: auto; font-size: 13px; line-height: 1.75; color: var(--cream); box-shadow: var(--shadow);
}
pre .c { color: var(--dim); }

/* Contracts */
.addr { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 32px; }
.addr a { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 20px; background: var(--panel); color: var(--cream); border: 1px solid transparent; transition: border-color 150ms ease; }
.addr a:hover { border-color: rgb(255 81 72 / 0.4); color: var(--cream); }
.addr span { color: var(--muted); font-size: 13px; }
.addr code { padding: 0; background: none; font-size: 12.5px; color: var(--cream); }

/* Docs */
.docs { display: grid; gap: 10px; margin-top: 32px; }
details { border-radius: 22px; background: var(--panel); overflow: hidden; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font: 24px/1.1 var(--grotesk); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); color: var(--coral); font: 20px/1 var(--mono); transition: transform 200ms var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details > :not(summary) { margin: 0 24px 20px; max-width: 820px; color: var(--muted); font-size: 14px; }
details ol, details ul { padding-left: 20px; }
details li { margin-bottom: 8px; }
details li::marker { color: var(--coral); }
details b { color: var(--cream); font-weight: 400; }
.table { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); max-width: none; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--panel-2); }
td:first-child { color: var(--cream); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* CTA */
.cta { margin-top: 120px; padding: 72px 32px; border-radius: 32px; text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgb(143 14 23 / 0.55), transparent 70%), var(--glass-card); box-shadow: var(--shadow); }
.cta h2 { margin: 0; }

footer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding-top: 40px; padding-bottom: 56px; margin-top: 64px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .hero, .build { grid-template-columns: 1fr; }
  .verdict { transform: none; max-width: 520px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .products { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .links { display: none; }
  .top .pill { margin-left: auto; }
  .hero { padding-top: 48px; }
  .band { padding-top: 88px; }
  .steps, .layers, .addr { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr 1fr; }
  .meta div:last-child { grid-column: span 2; }
  .cta { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live::before { animation: none; }
  * { transition: none !important; }
}
