/* QSD — order-flow add-ons
   Palette taken from a liquidity heatmap: deep ink, a cold-to-hot ramp, and buy/sell sides. */
/* Self-hosted fonts (no third-party requests) */
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(assets/fonts/archivo-latin.woff2) format("woff2-variations"), url(assets/fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(assets/fonts/archivo-latin-ext.woff2) format("woff2-variations"), url(assets/fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url(assets/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500; src: url(assets/fonts/plex-mono-500.woff2) format("woff2"); }

:root {
  --ink: #060A1C;
  --ink-2: #0C1330;
  --ink-3: #141D45;
  --line: #222C5C;
  --text: #E7EBF7;
  --muted: #98A1C2;
  --heat-1: #3B2FD9;   /* thin liquidity */
  --heat-2: #19B8E6;   /* building */
  --heat-3: #FFB547;   /* heavy */
  --heat-4: #FFF3D6;   /* wall */
  --buy: #2ED3BE;
  --sell: #FF5277;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --wrap: 1180px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--heat-3); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--heat-3); color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.05; word-spacing: 0.05em; }
h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-variation-settings: "wdth" 70;
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
  word-spacing: 0.08em;
  max-width: 13ch;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-variation-settings: "wdth" 72; }
h3 { font-size: 1.5rem; font-variation-settings: "wdth" 80; }
h4 { font-size: 1.2rem; font-variation-settings: "wdth" 88; font-weight: 750; }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.35em;
  border-radius: 999px;
  background: var(--heat-3);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--heat-3);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--heat-4); border-color: var(--heat-4); }
.btn-ghost { background: transparent; color: var(--text); border-color: #3A4682; }
.btn-ghost:hover { background: var(--ink-3); border-color: var(--heat-2); color: var(--text); }
.btn-small { padding: .5em 1em; font-size: .9rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 10, 28, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(34, 44, 92, .6);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-size: 1.35rem; font-variation-settings: "wdth" 75; letter-spacing: .02em; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 820px) { .nav nav { display: none; } .nav .btn-small { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(86vh, 780px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; }
#heatmap { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6,10,28,.94) 0%, rgba(6,10,28,.82) 34%, rgba(6,10,28,.25) 66%, rgba(6,10,28,.05) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(6,10,28,0) 22%);
}
.hero-in { padding-top: 72px; padding-bottom: 72px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.hero-sub { max-width: 34em; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #C3CAE3; margin: 26px 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-caption { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0 auto; font-size: .78rem; color: #5D6794; text-align: right; }
@media (max-width: 700px) {
  .hero { min-height: 0; }
  .hero-shade { background: linear-gradient(0deg, rgba(6,10,28,.96) 30%, rgba(6,10,28,.55) 100%); }
  .hero-caption { text-align: left; }
}

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.live { background: var(--buy); box-shadow: 0 0 0 4px rgba(46,211,190,.18); }
.dot.dev { background: var(--heat-3); box-shadow: 0 0 0 4px rgba(255,181,71,.18); }

/* ---------- Ledger ---------- */
.ledger { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); }
.ledger dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.ledger dl > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.ledger dl > div:first-child { border-left: 0; padding-left: 0; }
.ledger dt { color: var(--muted); font-size: .88rem; }
.ledger dd { margin: 4px 0 0; font-size: 2rem; font-weight: 800; font-variation-settings: "wdth" 75; line-height: 1.1; }
.ledger dd small { font-size: .5em; color: var(--muted); font-weight: 600; margin-left: 2px; }
.platform-dd { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.pill { font-size: .85rem; font-weight: 700; padding: .25em .75em; border-radius: 999px; font-variation-settings: "wdth" 100; }
.pill-live { background: rgba(46,211,190,.14); color: var(--buy); }
.pill-dev { background: rgba(255,181,71,.14); color: var(--heat-3); }
@media (max-width: 760px) {
  .ledger dl { grid-template-columns: 1fr 1fr; }
  .ledger dl > div { padding: 18px 0 18px 18px; }
  .ledger dl > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .ledger dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.addons, .platforms, .approach, .contact { padding: 110px 0; }
@media (max-width: 700px) { .addons, .platforms, .approach, .contact { padding: 72px 0; } }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 56px; }
.section-head p { color: var(--muted); max-width: 34em; margin: 0; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; } }

/* ---------- Add-ons ---------- */
.group { margin-top: 72px; }
.group:first-of-type { margin-top: 0; }
.group-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.group-head p { color: var(--muted); margin: 0; }

.shot {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--ink-2);
  border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; position: relative;
}
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.shot:hover img { transform: scale(1.025); }
.shot:hover { border-color: #3A4682; }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } .shot:hover img { transform: none; } }

.item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
.price { font-family: var(--mono); font-size: .9rem; color: var(--heat-3); white-space: nowrap; }
.price-free { color: var(--buy); }
.item p, .feature p { color: #BAC2DE; font-size: .98rem; }
.item p:last-child { margin-bottom: 0; }
.scope { color: var(--muted) !important; font-size: .88rem !important; border-left: 2px solid var(--line); padding-left: 10px; }
.note { color: var(--muted) !important; font-size: .92rem !important; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 28px; margin-bottom: 40px;
  background: linear-gradient(135deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.feature .item-top { margin-top: 0; }
.feature h4 { font-size: 1.8rem; font-variation-settings: "wdth" 75; font-weight: 850; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; }
.tags li { font-size: .82rem; padding: .3em .8em; border: 1px solid #34407A; border-radius: 999px; color: #C3CAE3; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 6px; padding: 18px; } .feature .item-top { margin-top: 18px; } }

.grid { display: grid; gap: 40px 32px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-book { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.item-tall { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.item-tall .item-top { margin-top: 0; }
.shot-tall img { aspect-ratio: auto; object-fit: contain; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-book { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .item-tall { grid-template-columns: 110px minmax(0,1fr); } }

/* ---------- Platforms ---------- */
.platforms { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.plat { padding: 36px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--ink); }
.plat h3 { font-size: clamp(2rem, 4vw, 2.8rem); font-variation-settings: "wdth" 70; margin: 14px 0 14px; }
.plat p { color: #BAC2DE; max-width: 32em; }
.plat-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem; }
.plat-live .plat-status { color: var(--buy); }
.plat-dev .plat-status { color: var(--heat-3); }
.plat-dev { border-style: dashed; border-color: #4A3F2A; }
.plat-meta { color: var(--muted) !important; font-size: .92rem; margin: 0; }
@media (max-width: 760px) { .plat-grid { grid-template-columns: 1fr; } .plat { padding: 24px; } }

/* ---------- Approach ---------- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.rules > div { padding: 28px 28px 30px 0; border-bottom: 1px solid var(--line); }
.rules > div:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.rules dt { font-weight: 750; font-size: 1.12rem; font-variation-settings: "wdth" 88; margin-bottom: 8px; }
.rules dd { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 900px) {
  .rules { grid-template-columns: 1fr 1fr; }
  .rules > div, .rules > div:not(:nth-child(3n+1)) { padding: 24px 22px 24px 0; border-left: 0; }
  .rules > div:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .rules { grid-template-columns: 1fr; }
  .rules > div, .rules > div:nth-child(even) { padding: 22px 0; border-left: 0; }
}

/* ---------- Contact ---------- */
.contact { background:
  radial-gradient(ellipse 60% 80% at 85% 50%, rgba(25,184,230,.16), transparent 70%),
  radial-gradient(ellipse 40% 60% at 70% 80%, rgba(255,181,71,.10), transparent 70%);
  border-top: 1px solid var(--line);
}
.contact h2 { max-width: 16ch; margin-bottom: 18px; }
.contact p { color: var(--muted); max-width: 34em; margin-bottom: 30px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 0 56px; color: #6E78A3; font-size: .86rem; }
.foot-in { display: grid; gap: 4px; }
.foot-in p { max-width: 70em; margin: 0 0 8px; }
.foot-brand { color: var(--text); font-weight: 850; font-size: 1.1rem; font-variation-settings: "wdth" 75; }
.foot-brand span { color: var(--muted); font-weight: 500; font-size: .9rem; margin-left: 8px; font-variation-settings: "wdth" 100; }

/* ---------- Lightbox ---------- */
dialog#lightbox {
  border: 1px solid var(--line); background: var(--ink-2); color: var(--text);
  padding: 14px; border-radius: var(--radius-lg); max-width: min(1280px, 94vw); width: auto;
}
dialog#lightbox::backdrop { background: rgba(3, 5, 15, .86); }
dialog#lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
dialog#lightbox[open] { animation: lb-in .2s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog#lightbox[open] { animation: none; } }
.lb-title { margin: 12px 4px 0; font-weight: 700; }
.lb-close {
  position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--text); border: 1px solid var(--line); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
