/* ============================================================
   Quorium V2 site
   Palette:  paper      #F7F6F2
             ink        #191712
             graphite   #4C493F
             bronze     #9A7B2D
             stone      #ECE9E0
             hairline   #D8D4C8
   Type:     Newsreader (display) / Public Sans (body) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --paper: #F7F6F2;
  --ink: #191712;
  --graphite: #4C493F;
  --bronze: #9A7B2D;
  --bronze-deep: #7C621F;
  --stone: #ECE9E0;
  --hairline: #D8D4C8;
  --white: #FFFFFF;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;

  --max-w: 1140px;
  --pad-x: clamp(20px, 5vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- Ledger-style section labels ---------- */
.ledger-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-top: 1px solid var(--ink);
  padding-top: 10px;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
}
.ledger-label .ref { color: var(--bronze-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand span { color: var(--bronze-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  color: var(--ink);
}

.site-nav { display: flex; gap: 30px; align-items: center; }
.site-nav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--graphite);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--bronze);
}
.site-nav a.nav-cta {
  color: var(--paper);
  background: var(--ink);
  padding: 9px 18px;
  border-radius: 4px;
  border-bottom: none;
}
.site-nav a.nav-cta:hover { background: var(--graphite); color: var(--paper); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 12px var(--pad-x) 24px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--stone); }
  .site-nav a.nav-cta { margin-top: 14px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-deep);
  margin-bottom: 22px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}
h1 em { font-style: italic; color: var(--bronze-deep); }

.lede {
  font-size: clamp(17px, 1.6vw, 19.5px);
  color: var(--graphite);
  max-width: 36em;
  margin-bottom: 36px;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 4px;
  border: 1px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--graphite); border-color: var(--graphite); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--stone); }

/* ---------- Identity figure (signature element) ---------- */
.identity-figure { width: 100%; }
.identity-figure svg { width: 100%; height: auto; display: block; }
.identity-caption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--graphite);
  letter-spacing: 0.06em;
  margin-top: 14px;
  text-align: center;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.identity-figure .anim { animation: rise 0.9s ease both; }
.identity-figure .anim.d2 { animation-delay: 0.25s; }
.identity-figure .anim.d3 { animation-delay: 0.5s; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--stone); }
.section.inverse { background: var(--ink); color: var(--paper); }
.section.inverse .ledger-label { color: #B8B3A4; border-top-color: #6A675C; }
.section.inverse .ledger-label .ref { color: var(--bronze); }

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  max-width: 22em;
}
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.25;
  margin-bottom: 12px;
}
.section p { max-width: 44em; color: var(--graphite); }
.section.inverse p { color: #CFCBBE; }
.section p + p { margin-top: 16px; }

/* ---------- Principle cards ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: 48px;
}
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }
.principles.duo { grid-template-columns: repeat(2, 1fr); } /* two-card variant */
@media (max-width: 860px) { .principles.duo { grid-template-columns: 1fr; } }
.principle {
  background: var(--paper);
  padding: 36px 30px;
}
.principle .ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bronze-deep);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}
.principle p { font-size: 15.5px; }

/* ---------- Definition / clarification block ---------- */
.definition {
  border-left: 3px solid var(--bronze);
  padding: 6px 0 6px 30px;
  margin-top: 42px;
}
.definition p {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 30em;
}
.section.inverse .definition p { color: var(--paper); }

/* Disclosure note: a set-apart factual/risk disclaimer (e.g. liquidity coverage).
   Reads as a small card so it is clearly a disclosure, not body copy. */
.disclosure-note {
  margin-top: 32px;
  padding: 22px 26px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--bronze);
}
.disclosure-note .kind {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-deep);
  margin-bottom: 10px;
}
.disclosure-note p { font-size: 15px; color: var(--graphite); max-width: 46em; }

/* ---------- Two-column body ---------- */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 72px);
}
/* Paragraphs that are direct columns sit side by side, so the inter-paragraph
   top margin (.section p + p) must not push the second one down. */
.cols > p + p { margin-top: 0; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* ---------- Comparison table ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: 44px;
  font-size: 15px;
}
.compare th, .compare td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.compare th {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  border-bottom: 1px solid var(--ink);
}
.compare td:first-child {
  font-weight: 600;
  width: 24%;
}
.compare td.q { background: rgba(154, 123, 45, 0.06); }
@media (max-width: 720px) {
  .compare { font-size: 13.5px; }
  .compare th, .compare td { padding: 12px 10px; }
}

/* ---------- Process steps ---------- */
.steps { margin-top: 48px; }
.step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--hairline);
}
.step:last-child { border-bottom: 1px solid var(--hairline); }
@media (max-width: 720px) { .step { grid-template-columns: 1fr; gap: 8px; } }
.step .ref {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--bronze-deep);
  letter-spacing: 0.1em;
  padding-top: 6px;
}
.step p { font-size: 15.5px; }

/* ---------- Data list (token facts) ---------- */
.datalist { margin-top: 44px; border-top: 1px solid var(--ink); }
.datarow {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
@media (max-width: 720px) { .datarow { grid-template-columns: 1fr; gap: 2px; } }
.datarow dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  padding-top: 3px;
}
.datarow dd { color: var(--ink); }
.datarow dd code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--stone);
  padding: 2px 8px;
  border-radius: 3px;
  word-break: break-all;
}
.section.inverse .datalist { border-top-color: var(--paper); }
.section.inverse .datarow { border-bottom-color: #3A372E; }
.section.inverse .datarow dt { color: #8B8678; }
.section.inverse .datarow dd { color: var(--paper); }
.section.inverse .datarow dd code { background: #2A271F; color: #E8E4D8; }
.section.inverse .datarow dd a { color: #E8E4D8; }

/* ---------- Document cards ---------- */
.docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 44px;
}
.doc-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 30px 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.doc-card:hover { border-color: var(--bronze); transform: translateY(-2px); }

/* Holdings checker (migrate.html) */
.holdings {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  max-width: 560px;
}
.holdings input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
}
.holdings input:focus { outline: 2px solid var(--bronze); outline-offset: 1px; }
.holdings-result { margin-top: 26px; max-width: 560px; }
.holdings-result .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.holdings-result .tok { font-weight: 600; }
.holdings-result .bal { font-family: var(--font-mono); font-size: 18px; }
.holdings-result .msg { color: var(--graphite); font-size: 14.5px; }
.holdings-result.error .msg { color: #9b2d2d; }
.doc-card .kind {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-deep);
}
.doc-card h3 { margin-bottom: 2px; font-size: 20px; }
.doc-card p { font-size: 14.5px; color: var(--graphite); }
.doc-card .meta {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--graphite);
}

/* ---------- Listings strip ---------- */
.listings {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  align-items: baseline;
  margin-top: 36px;
}
.listings a {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--graphite);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
}
.listings a:hover { color: var(--ink); border-bottom-color: var(--bronze); }

/* ---------- Notice / draft banner ---------- */
.draft-banner {
  background: var(--stone);
  border: 1px dashed var(--bronze);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bronze-deep);
  margin: 32px 0;
}

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band h2 { max-width: 16em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #B8B3A4;
  padding: 64px 0 40px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: var(--paper); font-size: 20px; }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: #8B8678;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #CFCBBE; text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.footer-disclaimer {
  border-top: 1px solid #3A372E;
  padding-top: 28px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #8B8678;
  max-width: 70em;
}
.footer-disclaimer p + p { margin-top: 10px; }
.footer-bottom {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #6A675C;
}

/* ---------- Insights list ---------- */
.insight-list { margin-top: 44px; }
.insight {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--hairline);
  text-decoration: none;
}
.insight:last-child { border-bottom: 1px solid var(--hairline); }
@media (max-width: 720px) { .insight { grid-template-columns: 1fr; gap: 6px; } }
.insight .kind {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-deep);
  padding-top: 5px;
}
.insight h3 { font-size: 21px; }
.insight:hover h3 { color: var(--bronze-deep); }
.insight p { font-size: 15px; color: var(--graphite); }

/* ---------- Contact ---------- */
.contact-channels { margin-top: 44px; }

/* ---------- Chapter dock (in-page chapter nav) ----------
   Injected by js/section-nav.js only when a page has >= 3 ledger sections.
   Desktop only; a slim horizontal bar that sticks just under the header, with
   the page's chapter titles. A macOS-dock magnification (js) swells the items
   nearest the cursor and spreads their neighbours apart; growth stays within
   the bar's own height, so it never lands on the page text. Progressive
   enhancement: no JS, no dock. */
section[id] { scroll-margin-top: 84px; }

.chapter-dock { display: none; }

@media (min-width: 1200px) {
  html.dock-on .chapter-dock {
    display: block;
    position: sticky;
    top: 64px; /* header height */
    z-index: 40;
    background: rgba(247, 246, 242, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
  }
  .chapter-dock ol {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(16px, 2.5vw, 40px);
    height: 46px;
    padding: 0 var(--pad-x);
  }
  .chapter-dock li { flex: none; }
  .chapter-dock a {
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.01em;
    color: var(--graphite);
    opacity: 0.6;
    transform-origin: center center;
    will-change: transform;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.12s ease;
  }
  .chapter-dock a:hover,
  .chapter-dock a:focus-visible { opacity: 1; color: var(--ink); }
  .chapter-dock .is-active { opacity: 1; color: var(--bronze-deep); }

  html.dock-on section[id] { scroll-margin-top: 118px; } /* header + dock */
}

@media (prefers-reduced-motion: reduce) {
  .chapter-dock a { transition: opacity 0.2s ease, color 0.2s ease; transform: none !important; }
}
