/* Compendium Credits — compendiumcrypto.com
   Tokens are copied EXACTLY from the live ~/compendium/public/landing.html
   :root, not eyeballed. The previous near-miss palette (#0b0d10 / #14171c /
   #d4af37) looked fine in isolation and obviously wrong next to the real site.
   ⚠ No gold radial-gradient anywhere. A halo behind the mark is forbidden;
   the only gradients here are black vignettes and gold on TEXT/BORDERS. */
:root {
  --gold: #c9a227; --gold-2: #e8c547; --gold-3: #ffe9a0;
  --gold-dim: rgba(201, 162, 39, 0.12);
  --bg: #000; --bg-2: #060606; --card: #0a0a0a; --card-2: #0e1118;
  --border: rgba(255, 255, 255, 0.07); --border-2: rgba(255, 255, 255, 0.13);
  --text: #e2e8f0; --text-2: #94a3b8; --text-3: rgba(255, 255, 255, 0.35);
  --green: #3ecf8e;
  --radius: 14px;
  --maxw: 1140px;
  --gold-cta: linear-gradient(135deg, #f5d87a, #c9a227, #ffe083, #a87820, #e8c547);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;              /* the page body must never scroll sideways */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: var(--gold-3); }

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
p { margin: 0 0 1.1em; color: var(--text-2); }
.lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text); max-width: 62ch; }
strong { color: var(--text); font-weight: 600; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em; background: var(--card-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 0.1em 0.42em;
  color: var(--gold-3);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
.eyebrow {
  font-family: Inter, sans-serif; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 14px;
}

/* ---------------------------------------------------------------- header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; color: var(--text); }
/* compendium-logo.png is gold-on-BLACK, so on any card it shows a black square.
   `screen` drops the black and keeps the gold. Parent needs isolation. */
.brand .mark { width: 30px; height: 30px; mix-blend-mode: screen; isolation: isolate; }
.brand b { font-family: "Cormorant Garamond", serif; font-size: 1.3rem; font-weight: 500; }
nav.site { margin-left: auto; display: flex; align-items: center; gap: 22px; }
nav.site a { color: var(--text-2); font-size: 0.93rem; font-weight: 500; }
nav.site a:hover { color: var(--gold-2); }
.navtoggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; padding: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px; border-radius: 999px;
  font-family: Inter, sans-serif; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--border-2); color: var(--text); background: transparent;
  cursor: pointer; transition: border-color .18s, color .18s, transform .18s;
}
.btn:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-gold {
  background: var(--gold-cta); color: #12100a; border: 0; font-weight: 700;
}
.btn-gold:hover { color: #12100a; transform: translateY(-1px); }

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(64px, 11vw, 132px) 0 clamp(48px, 8vw, 96px); position: relative; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { max-width: 17ch; }
/* Generated art sits on the same near-black ground as the page, so a hard edge
   would read as a pasted rectangle. The mask fades it into the background
   instead — no gold glow involved, purely a transparency ramp. */
/* ⚠ No border here. A 1px border sits OUTSIDE the mask, so the frame stays
   crisp while the image inside fades away — which reads as a pasted rectangle,
   the exact artifact the mask exists to remove. Mask alone, no border. */
.hero-art img, .section-art {
  -webkit-mask-image: radial-gradient(115% 108% at 50% 48%, #000 48%, transparent 100%);
  mask-image: radial-gradient(115% 108% at 50% 48%, #000 48%, transparent 100%);
}
.section-art { width: 100%; margin: 30px 0 4px; }
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero .lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-note {
  font-size: 0.88rem; color: var(--text-3); max-width: 58ch;
  border-left: 2px solid var(--gold-dim); padding-left: 14px;
}

/* Ledger strip — three buckets, the actual mental model of the product */
.buckets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.bucket {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 22px;
}
.bucket .tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 8px;
}
.bucket h3 { font-family: Inter, sans-serif; font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.bucket p { font-size: 0.9rem; margin: 0; }

/* ----------------------------------------------------------------- cards */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--border-2); }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: "Cormorant Garamond", serif; font-size: 2.6rem; color: var(--gold-2);
  line-height: 1; display: block; margin-bottom: 10px;
}
.card-quiet { background: var(--card-2); }

/* Flow diagram: earn -> wallet -> spend */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; }
.flow .step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; text-align: center;
}
.flow .step .icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.flow .step h3 { font-family: Inter, sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.flow .step p { font-size: 0.88rem; margin: 0; }
.flow .arrow { color: var(--gold); font-size: 1.4rem; text-align: center; }

/* Split table — how one commission divides */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 520px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border); }
th { font-family: Inter, sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
td { color: var(--text-2); }
td b, td strong { color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tr.total td { background: rgba(201, 162, 39, 0.06); color: var(--text); font-weight: 600; }

/* Honest-limits panel */
.rules { border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--card-2); padding: 30px 28px; }
.rules ul { margin: 0; padding: 0; list-style: none; }
.rules li { position: relative; padding-left: 30px; margin-bottom: 15px; color: var(--text-2); font-size: 0.96rem; }
.rules li:last-child { margin-bottom: 0; }
.rules li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }
.rules li.no::before { content: "✕"; color: var(--gold); }
.rules li b { color: var(--text); }

/* FAQ */
details.faq {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 0; margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--text);
  list-style: none; display: flex; align-items: center; gap: 12px; min-height: 44px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 1.3rem; font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq .a { padding: 0 22px 20px; color: var(--text-2); font-size: 0.95rem; }
details.faq .a p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ blog */
.postlist { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s;
}
.post-card:hover { border-color: var(--gold-dim); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.post-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--text); }
.post-card:hover h3 a { color: var(--gold-2); }
.post-card p { font-size: 0.9rem; margin-bottom: 14px; }
.post-card .meta { margin-top: auto; font-size: 0.78rem; color: var(--text-3); letter-spacing: 0.04em; }

article.post { max-width: 760px; margin: 0 auto; }
article.post .hero-img { border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 34px; }
article.post h2 { margin-top: 1.8em; }
article.post h3 { margin-top: 1.5em; font-family: Inter, sans-serif; font-size: 1.1rem; font-weight: 600; }
article.post ul, article.post ol { color: var(--text-2); padding-left: 1.2em; margin-bottom: 1.2em; }
article.post li { margin-bottom: 0.5em; }
article.post blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold);
  color: var(--text); font-family: "Cormorant Garamond", serif; font-size: 1.3rem; font-style: italic;
}
.post-meta { color: var(--text-3); font-size: 0.85rem; letter-spacing: 0.05em; margin-bottom: 18px; }

/* ---------------------------------------------------------------- footer */
footer.site { border-top: 1px solid var(--border); background: var(--bg-2); padding: 52px 0 40px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
footer.site h4 { font-family: Inter, sans-serif; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 8px; }
footer.site a { color: var(--text-2); font-size: 0.92rem; }
footer.site a:hover { color: var(--gold-2); }
.legal { border-top: 1px solid var(--border); padding-top: 22px; font-size: 0.8rem; color: var(--text-3); }
.legal p { font-size: 0.8rem; color: var(--text-3); max-width: none; }

/* --------------------------------------------------------------- utility */
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.stack > * + * { margin-top: 18px; }
.pill {
  display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 16px;
}

/* --------------------------------------------------------------- mobile */
@media (max-width: 900px) {
  .grid-3, .postlist { grid-template-columns: repeat(2, 1fr); }
  .buckets { grid-template-columns: 1fr; }
  /* Art moves above the copy rather than disappearing — it is the only color
     on the page and dropping it leaves a wall of text on mobile. */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .postlist { grid-template-columns: 1fr; }
  nav.site { display: none; }
  nav.site.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 66px; left: 0; right: 0; padding: 16px 22px 22px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
  }
  nav.site.open a { padding: 10px 0; font-size: 1rem; }
  .navtoggle { display: block; margin-left: auto; }
  footer.site .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
