/* Kistrax. IBM Plex Sans for reading, JetBrains Mono for labels, figures and addresses, Montserrat Alternates for the
   wordmark and headings (all SIL OFL 1.1). An ink ramp and one accent: the node blue from the art. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400-latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC,
    U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122,
    U+2212, U+FB01-FB02;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-500-latin1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC,
    U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122,
    U+2212, U+FB01-FB02;
}

@font-face {
  font-family: "Montserrat Alternates";
  src: url("/assets/fonts/montserrat-alternates-600-kx.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-kx.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07080c;
  --card: #0f121a;
  --raised: #171b25;
  --text: #eef0f5;
  --text-2: #a3a9b8;
  --muted: #8a92a6;
  --hair: rgba(238, 240, 245, 0.08);
  --hair-2: rgba(238, 240, 245, 0.16);
  --accent: #1f44ff;
  --pale: #acc9ee;
  --cream: #f1e9d6;
  --display: "Montserrat Alternates", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 32px;
  --max: 1360px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/26px var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 1; }

a { color: inherit; }
a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(31, 68, 255, 0.55); color: #fff; }

/* ---------------------------------------------------------------- navigation */

.nav {
  position: sticky;
  top: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 var(--pad);
  background: rgba(7, 8, 12, 0.9);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease);
  z-index: 10;
}
.nav.scrolled { border-bottom-color: var(--hair); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--cream);
}
.brand img { image-rendering: pixelated; display: block; }

.links { display: flex; gap: 24px; margin-left: auto; }
.links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms var(--ease);
}
.links a:hover { color: var(--text); }

.menu {
  display: none;
  height: 36px;
  padding: 0 12px;
  margin-left: auto;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.menu:hover { color: var(--text); border-color: var(--hair-2); }
.menu:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--text);
  color: #0b0d14;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-primary:hover { background: #ffffff; }
.btn-secondary, .btn-nav {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-secondary:hover, .btn-nav:hover { border-color: var(--hair-2); }
.btn-nav { height: 36px; padding: 0 16px; font-size: 13px; }

/* ---------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 64px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad) 64px;
  min-height: calc(100svh - 64px);
}

h1 {
  margin: 0;
  font-family: var(--display);
  color: var(--cream);
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 11em;
  text-wrap: balance;
}

.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--muted);
  font: 400 13px/20px var(--mono);
}
.status .dot { margin-top: 6px; }
.dot, .node {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------------------------------------------------------------- art */

.art {
  position: relative;
  margin: 0;
}
.art .cellmap {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.art .overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.overlay text {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.overlay image { image-rendering: pixelated; image-rendering: crisp-edges; }
.overlay .label-strong { fill: var(--text); font-size: 12px; font-weight: 500; }

.art-hero {
  width: min(100%, 640px);
  justify-self: center;
  padding: 9% 7% 9%;
}

/* before/after: the dot drawing on the left of the divider, the marble photo on the right */
.compare { position: relative; --split: 62%; touch-action: pan-y; }
.compare .cellmap { position: relative; }
.compare-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 0 0 var(--split));
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
  pointer-events: none;
}
.compare-handle {
  position: absolute;
  top: -6%;
  bottom: -6%;
  left: var(--split);
  width: 0;
  border-left: 1px solid rgba(230, 235, 245, 0.85);
  pointer-events: none;
}
.compare-handle span {
  position: absolute;
  top: 50%;
  left: -15px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid rgba(230, 235, 245, 0.85);
  font-size: 12px;
  color: var(--text);
}
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare-range:focus-visible + .compare-handle span,
.compare:has(.compare-range:focus-visible) .compare-handle span { outline: 2px solid var(--accent); outline-offset: 2px; }
.art-ring { width: min(100%, 460px); justify-self: center; padding: 2% 6% 0 34%; }
.art-flow, .art-fees { width: 100%; aspect-ratio: 16 / 10; }
.art-eyes { width: min(100%, 560px); justify-self: center; padding: 6% 0; }

/* ---------------------------------------------------------------- sections */

.section-title {
  margin: 0;
  font-family: var(--display);
  color: var(--cream);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.how, .vault, .where, .stocks, .status-block, .faq {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--pad);
}
.how { padding-bottom: 32px; }

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  padding: 64px 0;
  border-top: 1px solid var(--hair);
}
.how .section-title { margin-bottom: 32px; }
.step.reverse .step-copy { order: 2; }
.step-copy { max-width: 32rem; }
.step-index {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font: 400 13px/20px var(--mono);
}
.step h3 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
}
.step p { margin: 0 0 12px; color: var(--text-2); }

/* ---------------------------------------------------------------- where it runs */

.where .section-title { margin-bottom: 32px; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px;
  margin: 0;
}
.facts div { padding: 20px 0; border-top: 1px solid var(--hair); }
.facts dt { font-weight: 500; margin-bottom: 8px; }
.facts dd { margin: 0; color: var(--text-2); max-width: 36rem; }

/* ---------------------------------------------------------------- status */

.status-block .section-title { margin-bottom: 24px; }
.status-list { list-style: none; margin: 0; padding: 0; max-width: 48rem; }
.status-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  color: var(--text-2);
}
.status-list li:last-child { border-bottom: 1px solid var(--hair); }
.tag {
  flex: none;
  width: 120px;
  font: 400 12px/20px var(--mono);
  color: var(--muted);
}
.tag-live { color: var(--text); }
.tag-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

/* ---------------------------------------------------------------- vault */

.vault-head { max-width: 40rem; margin-bottom: 32px; }
.vault-head p { color: var(--text-2); margin: 16px 0 0; }
.vault-head .meta { color: var(--muted); font: 400 13px/20px var(--mono); }
.vault-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 24px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(15, 18, 26, 0.72);
}
.vault-stats div { padding: 20px; border-left: 1px solid var(--hair); min-width: 0; }
.vault-stats div:first-child { border-left: 0; }
.vault-stats dt { color: var(--muted); font: 400 12px/16px var(--mono); margin-bottom: 12px; }
.vault-stats dd { margin: 0; }
.vault-stats .value {
  display: block;
  color: var(--cream);
  font-family: var(--mono);
  font-size: 24px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vault-stats .sub { display: block; margin-top: 8px; color: var(--muted); font: 400 12px/16px var(--mono); }

/* ---------------------------------------------------------------- stocks */

.stocks-head { max-width: 40rem; margin-bottom: 32px; }
.stocks-head p { color: var(--text-2); margin: 16px 0 0; }
.stocks-head .meta { color: var(--muted); font: 400 13px/20px var(--mono); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(15, 18, 26, 0.72);
}
.stocks-table { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--mono); font-variant-numeric: tabular-nums; }
.stocks-table th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
}
.stocks-table td {
  padding: 0 20px;
  height: 44px;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
.stocks-table tr:last-child td { border-bottom: 0; }
.stocks-table .num { text-align: right; }
.stocks-table .addr { color: var(--muted); font-size: 12px; margin-left: 8px; }
.stocks-table .issuer { color: var(--text-2); }
.stocks-table .zero { color: var(--muted); }
.stocks .note { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; max-width: 48rem; }

/* ---------------------------------------------------------------- faq */

.faq .section-title { margin-bottom: 24px; }
.faq details {
  max-width: 48rem;
  border-top: 1px solid var(--hair);
}
.faq details:last-of-type { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  transition: transform 180ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--text-2); max-width: 42rem; }

/* ---------------------------------------------------------------- footer */

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--pad) 64px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 13px;
}
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer a { color: var(--text-2); text-decoration: none; }
.footer a:hover { color: var(--text); }
.brand-small { color: var(--cream); font-family: var(--display); font-weight: 600; font-size: 15px; }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 900px) {
  .vault-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-stats div:nth-child(3) { border-left: 0; }
  .vault-stats div:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  :root { --pad: 20px; }
  .nav { gap: 12px; }
  .menu { display: inline-flex; align-items: center; }
  .links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--pad) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--hair);
  }
  .nav.open .links { display: flex; }
  .links a { display: flex; align-items: center; height: 44px; font-size: 15px; border-top: 1px solid var(--hair); }
  .links a:first-child { border-top: 0; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    padding-top: 40px;
  }
  .art-hero { order: 2; padding: 4% 8% 0; max-width: 460px; }
  .step, .step.reverse { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .step.reverse .step-copy { order: 0; }
  .how, .vault, .where, .stocks, .status-block, .faq { padding: 64px var(--pad); }
  .facts { grid-template-columns: 1fr; }
  .status-list li { flex-direction: column; gap: 4px; }
  .stocks-table td, .stocks-table th { padding-left: 14px; padding-right: 14px; }
  .stocks-table .addr { display: none; }
  .art-hero .overlay text, .art-eyes .overlay text { display: none; }
}

@media (max-width: 560px) {
  .stocks .stocks-table th:nth-child(3), .stocks .stocks-table td:nth-child(3) { display: none; }
  .vault .stocks-table th:nth-child(1), .vault .stocks-table td:nth-child(1),
  .vault .stocks-table th:nth-child(4), .vault .stocks-table td:nth-child(4) { display: none; }
  .vault .stocks-table .addr { display: none; }
  .vault .stocks-table th, .vault .stocks-table td { padding-left: 14px; padding-right: 14px; }
  .stocks-table { font-size: 13px; }
  .vault-stats div { padding: 16px; }
  .vault-stats .value { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* 404 page (Cloudflare Pages serves /404.html for unknown paths) */
.notfound {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding: 32px var(--pad);
  text-align: center;
}
.notfound h1 { font-size: clamp(30px, 4vw, 48px); }
.notfound p { margin: 0; }
