/* Anansi demo — on the site's restraint tokens. Cream sections, one ink theatre. */
:root {
  --cream: #faf6ec;
  --cream-2: #f5efe0;
  --raise: #fffdf7;
  --ink: #241d15;
  --ink-2: #2e261c;
  --ink-soft: #6b5d49;
  --ink-faint: #93856d;
  --hairline: #e6dcc4;
  --hairline-strong: #d8cbab;
  --gold: #bd8b28;
  --gold-bright: #d8a53c;
  --gold-ink: #8a6420;
  --teal: #3e8079;
  --teal-ink: #2f6a63;
  --rust: #b14a2c;
  --rust-ink: #8f3a20;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.anansi-demo {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code { font-family: var(--font-mono); font-size: .92em; }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
.lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; padding: 1px 8px; border-radius: 999px; background: #e8f3ed; color: #24774b; white-space: nowrap; margin-left: 6px; }
.lbl.open { background: transparent; border: 1px dashed var(--hairline-strong); color: var(--ink-soft); }
.lbl.nonobj { background: var(--cream-2); color: var(--ink-soft); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: var(--ink); color: var(--cream); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { height: 30px; width: auto; }
.brand-word { height: 18px; width: auto; }
.top-nav { display: flex; gap: 22px; font-size: 13.5px; }
.top-nav a { color: #d8cbab; text-decoration: none; }
.top-nav a:hover { color: var(--cream); }

/* hero */
.hero { position: relative; background: radial-gradient(50% 44% at 24% 46%, rgba(216,165,60,.07), transparent 62%), #100d0a; color: var(--cream); display: grid; grid-template-columns: 1fr 300px minmax(0, 700px) 1fr; column-gap: 40px; align-items: center; padding: 64px 48px 72px; }
/* the live gate's field (urizen.ai, 2026-08-15): three blurred cream-gold ribbons, a 48px teal hairline
   grid with a slow light sweep, the proof-dust cloud canvas (screen blend), and a bottom veil */
.anansi-demo .gate-field { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.anansi-demo .gf-ribbon { position: absolute; width: 160%; height: 48%; left: -30%; border-radius: 50%; filter: blur(70px); pointer-events: none; will-change: transform; }
.anansi-demo .gf-ribbon-a { top: 2%; opacity: .12; background: radial-gradient(ellipse 70% 55% at 40% 50%, rgba(250,246,236,.85), rgba(216,165,60,.28) 58%, transparent 74%); animation: gateRibbonA 32s ease-in-out infinite alternate; }
.anansi-demo .gf-ribbon-b { top: 28%; opacity: .1; background: radial-gradient(ellipse 75% 50% at 60% 40%, rgba(250,246,236,.55), rgba(216,165,60,.2) 52%, transparent 72%); animation: gateRibbonB 26s ease-in-out infinite alternate; }
.anansi-demo .gf-ribbon-c { top: 52%; opacity: .09; background: radial-gradient(ellipse 80% 48% at 35% 60%, rgba(216,165,60,.38), rgba(250,246,236,.28) 46%, transparent 70%); animation: gateRibbonC 36s ease-in-out infinite alternate; }
.anansi-demo .gf-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(111,192,183,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(111,192,183,.055) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 48%, transparent 86%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 48%, transparent 86%); }
.anansi-demo .gf-grid::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 38%; background: linear-gradient(180deg, transparent, rgba(250,246,236,.08), transparent); animation: gateGridSweep 22s linear infinite; }
.anansi-demo .gate-cloud { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; }
.anansi-demo .gf-veil { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 40%; background: linear-gradient(180deg, transparent 0%, #100d0a 78%, #0a0806 100%); pointer-events: none; }
@keyframes gateRibbonA { 0% { transform: translate(-6%,5%) rotate(-14deg); } to { transform: translate(9%,-7%) rotate(-9deg); } }
@keyframes gateRibbonB { 0% { transform: translate(8%,-4%) rotate(10deg); } to { transform: translate(-7%,6%) rotate(6deg); } }
@keyframes gateRibbonC { 0% { transform: translate(-4%,3%) rotate(-8deg); } to { transform: translate(7%,-5%) rotate(-4deg); } }
@keyframes gateGridSweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .55; } 88% { opacity: .2; } to { transform: translateY(280%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .anansi-demo .gf-ribbon, .anansi-demo .gf-grid::after { animation: none; } .anansi-demo .gf-grid { opacity: .7; } }
.hero-stage, .hero-copy { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-aurora::before, .hero-aurora::after { animation: none; } }
.hero-stage { grid-column: 2; position: relative; width: 300px; height: 320px; display: flex; align-items: center; justify-content: center; }
.hero-mark { position: relative; z-index: 2; display: flex; justify-content: center; opacity: .95;
  filter: drop-shadow(0 0 30px rgba(216, 165, 60, 0.28)) drop-shadow(0 0 4px rgba(216, 165, 60, 0.22)); }
/* the front hemisphere of the cloud passes in front of the mark: normal blend, lighter composite inside */
.gate-cloud-front { position: absolute; inset: -16%; z-index: 3; width: auto; height: auto; mix-blend-mode: normal; pointer-events: none; }
.hero-copy { grid-column: 3; }
.hero-mark img, .hero-mark svg { width: 230px; height: auto; }
/* the 3D mark (anansi-hero-3d.js) replaces the SVG once rendered; same box, transparent canvas */
.hero-mark canvas.hero-mark-3d { position: absolute; left: 50%; top: 50%; width: 230px; height: 230px; margin: -115px 0 0 -115px; display: block; }
.hero-mark[data-mark3d="on"] canvas.hero-mark-3d { position: static; margin: 0; }
/* the mark's own glow (the gate gives its tree the same drop-shadow) */
.mark-glow { position: absolute; left: 12%; right: 12%; top: 16%; bottom: 14%; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 50% 55%, rgba(216, 165, 60, 0.20), rgba(216, 165, 60, 0.06) 45%, rgba(216, 165, 60, 0) 70%);
  animation: glowBreath 9s ease-in-out infinite; }
@keyframes glowBreath { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.07); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mark-glow { animation: none; } .hero-mark { filter: none; } }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(44px, 6vw, 72px); letter-spacing: 0; line-height: 1; margin: 6px 0 14px; }
.hero .eyebrow { color: #a89a80; }
.hero .lede { font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.45; max-width: 30ch; margin: 0 0 22px; color: #efe7d3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.hero-note { font-size: 13px; color: #a89a80; max-width: 60ch; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 14px; padding: 10px 18px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1; }
.btn-gold { background: var(--gold-bright); color: var(--ink); border-color: var(--gold-bright); }
.btn-gold:hover { background: #e2b34e; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.btn-ghost:hover { opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* section heads */
section { padding: 72px 48px; }
.section-head { max-width: 1084px; margin: 0 auto 32px; }
.section-head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.section-head .sub { max-width: 68ch; color: var(--ink-soft); margin: 0; font-size: 16px; }

/* theatre (ink ground) */
.theatre { background: var(--ink); color: var(--cream); }
.theatre .section-head .sub { color: #c9bfa8; }
.theatre .eyebrow { color: #a89a80; }
.theatre-stage { max-width: 1084px; margin: 0 auto; display: grid; grid-template-columns: 380px 1fr; gap: 36px; align-items: start; }
.theatre-figure { margin: 0; text-align: center; }
.theatre-figure svg { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; }
.theatre-figure figcaption { font-family: var(--font-mono); font-size: 12px; color: #a89a80; margin-top: 10px; }
.station-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.station-tab { font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid #4a3f31; color: #c9bfa8; background: transparent; cursor: pointer; }
.station-tab[aria-selected="true"] { border-color: var(--gold-bright); color: var(--gold-bright); }
.station-tab.done { border-color: #6b5d49; color: #efe7d3; }
.station-card { background: var(--ink-2); border: 1px solid #4a3f31; border-radius: var(--radius); padding: 22px 24px; min-height: 260px; }
.station-card .st-eyebrow { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 6px; }
.station-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 0 0 8px; line-height: 1.2; }
.station-card .st-line { color: #d8cbab; font-size: 15px; margin: 0 0 16px; max-width: 52ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; }
.facts dt { font-family: var(--font-mono); font-size: 12px; color: #a89a80; padding-top: 2px; }
.facts dd { margin: 0; font-family: var(--font-mono); font-size: 13px; color: #efe7d3; word-break: break-all; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 12px; padding: 2px 9px; border-radius: 4px; }
.chip-ok { background: #1b2e25; color: #6fcf97; }
.chip-active { background: #2a2f45; color: #8fa3e8; }
.chip-open { border: 1px dashed #4a3f31; color: #a89a80; }
.chip-unc { background: #33290f; color: #e0b14e; }
.chip-gold { background: #3a2f12; color: var(--gold-bright); }
.theatre-controls { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.theatre-controls .btn-ghost { color: var(--cream); }
.theatre-status { font-family: var(--font-mono); font-size: 12px; color: #a89a80; margin-left: auto; }
.roots-strip { max-width: 1084px; margin: 34px auto 0; border-top: 1px solid #4a3f31; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.roots-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #a89a80; }
.roots-values { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-mono); font-size: 12.5px; color: #d8cbab; }
.roots-values b { color: #efe7d3; font-weight: 500; }

/* rosette svg pieces */
#rosette .petal { transition: opacity .5s ease; }
#rosette .petal.dim { opacity: .16; }
#rosette .petal.lit { opacity: 1; }
#rosette .hub-d { transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.3,1.2); transform-origin: 100px 120px; transform-box: view-box; }
#rosette .hub-d.dim { opacity: 0; transform: scale(0); }
#rosette .hub-d.lit { opacity: 1; transform: scale(1); }
#rosette .station-num { font-family: var(--font-mono); font-size: 7px; fill: #a89a80; }
@media (prefers-reduced-motion: reduce) { #rosette .petal, #rosette .hub-d { transition: none; } }

/* control plane */
.cap-grid { max-width: 1084px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cap { background: var(--raise); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 20px; }
.cap h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0 0 4px; }
.cap .cap-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
.cap .facts { grid-template-columns: max-content 1fr; }
.cap .facts dt { color: var(--ink-faint); }
.cap .facts dd { color: var(--ink); }
.refs { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.refs li { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.refs .dg { color: var(--ink); }
.pill { font-family: var(--font-mono); font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.pill.held { background: #e8f3ed; color: #24774b; }
.pill.absent { border: 1px dashed var(--hairline-strong); color: var(--ink-faint); }
.trace { max-width: 1084px; margin: 34px auto 0; background: var(--raise); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; }
.trace-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.trace-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0; }
.trace-head p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
#trace-graph { width: 100%; height: auto; display: block; }
#trace-graph .edge { stroke: var(--hairline-strong); stroke-width: 1; fill: none; }
#trace-graph .edge.hi { stroke: var(--gold); stroke-width: 1.6; }
#trace-graph .node { cursor: default; }
#trace-graph .node circle { stroke: var(--ink); stroke-width: 1.2; }
#trace-graph .node.held circle { fill: var(--ink); }
#trace-graph .node.absent circle { fill: var(--raise); stroke-dasharray: 2 2; }
#trace-graph .node text { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ink-soft); }
#trace-graph .node.hi circle { stroke: var(--gold); stroke-width: 2; }
.trace-foot { font-size: 12.5px; color: var(--ink-faint); margin: 8px 0 0; }

/* review */
.review-grid { max-width: 1084px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.review-card { background: var(--raise); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; }
.review-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0 0 10px; }
.decision { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.decision .big { font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 1; letter-spacing: -.01em; }
.decision .big.pass { color: var(--teal-ink); }
.decision .big.fail { color: var(--rust-ink); }
.decision .big.unresolved { color: var(--gold-ink); }
.decision .why { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; font-family: var(--font-mono); font-size: 12.5px; }
.tbl tr:last-child td { border-bottom: none; }
.mini { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.mini li::before { content: "\2014"; color: var(--hairline-strong); margin-right: 8px; }
.review-card .kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-family: var(--font-mono); font-size: 12.5px; }
.review-card .kv dt { color: var(--ink-faint); }
.review-card .kv dd { margin: 0; word-break: break-all; }

/* capacity ledger */
.ledger { max-width: 1084px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ledger-card { background: var(--raise); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.ledger-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 0; }
.ledger-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; flex: 1; }
.ledger-card .lbl { margin-left: 0; margin-right: 6px; align-self: flex-start; }
.ledger-foot { max-width: 1084px; margin: 16px auto 0; font-size: 12.5px; color: var(--ink-faint); }

/* boundary */
.boundary { background: var(--cream-2); }
.boundary-cols { max-width: 1084px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.boundary h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0 0 10px; }
.boundary ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink); }
.boundary li { margin: 6px 0; }

/* footer */
.site-footer { display: flex; align-items: center; gap: 12px; padding: 22px 48px; background: var(--ink); color: #a89a80; font-size: 12.5px; }
.site-footer code { color: #d8cbab; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 44px 24px 52px; text-align: left; }
  .hero-stage, .hero-copy { grid-column: 1; }
  .hero-stage { width: 260px; height: 270px; margin: 0 auto; }
  .hero-mark img, .hero-mark svg { width: 180px; }
  .hero-mark canvas.hero-mark-3d { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
  .hero-mark[data-mark3d="on"] canvas.hero-mark-3d { margin: 0; }
  section { padding: 52px 24px; }
  .theatre-stage { grid-template-columns: 1fr; }
  .review-grid, .boundary-cols { grid-template-columns: 1fr; }
  .top-nav { display: none; }
  .site-footer { padding: 18px 24px; }
}
