:root {
  --bg: #07110d;
  --bg-2: #0b1813;
  --panel: #0e1d17;
  --panel-2: #12251d;
  --line: rgba(212, 175, 95, 0.18);
  --line-strong: rgba(212, 175, 95, 0.42);
  --gold: #d4af5f;
  --gold-soft: #e8cf92;
  --verdigris: #6cc2a6;
  --text: #ebe6d8;
  --muted: #a3ab9f;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(108, 194, 166, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(212, 175, 95, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--gold-soft); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: #fff; }
strong, b { color: #fff; font-weight: 600; }
em { color: var(--gold-soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 28px;
  background: rgba(7, 17, 13, 0.78);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 21px/1 var(--serif); letter-spacing: .02em; }
.brand-mark { width: 26px; height: 26px; color: var(--gold); flex: none; }
.brand-mark.big { width: 44px; height: 44px; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.nav nav a:hover { color: var(--gold-soft); }

/* HERO */
.hero {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px;
  padding: 96px 28px 80px;
  min-height: calc(100vh - 60px);
}
.eyebrow, .kicker {
  font: 500 12.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--verdigris); margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; color: #f6f1e3; }
h1 { font-size: clamp(64px, 9vw, 128px); letter-spacing: -.01em; }
h1 em { font-style: italic; font-weight: 500; color: var(--gold); }
.lede { font-size: 21px; line-height: 1.55; color: var(--text); max-width: 36ch; margin: 28px 0 0; }
.lede.small { font-size: 17px; color: var(--muted); margin-top: 14px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 999px;
  background: var(--gold); color: #10140f; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--gold); transition: transform .15s ease, background .15s ease;
}
.btn:hover { color: #10140f; background: var(--gold-soft); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold-soft); border-color: var(--line-strong); }
.btn.ghost:hover { color: #fff; border-color: var(--gold); background: rgba(212,175,95,.06); }

.sigil svg { width: 100%; max-width: 520px; display: block; margin: 0 auto; overflow: visible; }
.sigil .line { fill: none; stroke: var(--gold); stroke-width: 1.2; opacity: .75; }
.sigil .line.faint { opacity: .28; }
.sigil .node { fill: var(--bg); stroke: var(--verdigris); stroke-width: 2; }
.sigil .node-num { fill: var(--verdigris); font: 600 13px var(--serif); text-anchor: middle; }
.sigil .ring-text { fill: var(--gold); opacity: .55; font: 500 12.5px var(--mono); letter-spacing: .32em; }
.sigil .mercury { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 14px rgba(212,175,95,.45)); }
.sigil .spin { transform-origin: 200px 200px; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sigil .spin { animation: none; } }

/* BANDS / SECTIONS */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(14, 29, 23, .55); padding: 72px 0; }
.big-quote { font: 500 clamp(26px, 3.2vw, 36px)/1.3 var(--serif); color: #f6f1e3; margin: 0 0 22px; }
.band p { color: var(--muted); }
.band .big-quote { color: #f6f1e3; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-top: 88px; padding-bottom: 40px; }
.pillar {
  position: relative; padding: 34px 30px 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(14,29,23,.4));
}
.pillar .numeral { font: 600 15px var(--mono); color: var(--gold); letter-spacing: .1em; display: block; margin-bottom: 14px; }
.pillar h2 { font-size: 36px; margin-bottom: 12px; }
.pillar p { color: var(--muted); margin: 0 0 18px; }
.pillar a { font-size: 14.5px; text-decoration: none; }

.section { padding: 110px 0; }
.section.alt { background: linear-gradient(180deg, rgba(11,24,19,.9), rgba(11,24,19,.55)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: clamp(42px, 5.4vw, 64px); margin-bottom: 18px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 18.5px; margin: 0; }

/* GRID / CARDS */
.grid { display: grid; gap: 20px; }
.offices { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  display: flex; flex-direction: column;
}
.card.feature { grid-row: span 2; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border-color: var(--line-strong); }
.card h3 { font-size: 30px; margin: 4px 0 12px; }
.card p { color: var(--muted); margin: 0 0 14px; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(212,175,95,.08); border: 1px solid var(--line); margin-bottom: 14px; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stack { margin-top: auto !important; padding-top: 14px; border-top: 1px dashed var(--line); font: 400 12.5px/1.6 var(--mono); color: var(--verdigris) !important; letter-spacing: .02em; }
.ticks { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border: 1.5px solid var(--gold); transform: rotate(45deg); }

/* MEMORY */
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.layer { padding: 30px; background: var(--panel); }
.layer + .layer { border-left: 1px solid var(--line); }
.layer:nth-child(2) { background: var(--panel-2); }
.layer-tag { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--verdigris); }
.layer h3 { font-size: 30px; margin: 10px 0 10px; display: flex; align-items: baseline; gap: 12px; }
.layer .count { font: 500 14px var(--mono); color: var(--gold); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; }
.layer p { color: var(--muted); margin: 0; font-size: 16px; }

.memory-rule { margin-top: 26px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: center; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,17,13,.6); }
.memory-rule h3 { font-size: 28px; margin-bottom: 12px; }
.memory-rule p { color: var(--muted); margin: 0 0 10px; }
.note { margin: 0; padding: 22px 24px; border-radius: 12px; background: #050c09; border: 1px solid var(--line); font: 400 13.5px/1.75 var(--mono); color: var(--text); white-space: pre-wrap; overflow-x: auto; }
.note .c { color: var(--muted); }
.note .t { color: var(--verdigris); }
.note s { color: var(--muted); }

.rhythm { list-style: none; padding: 0; margin: 46px 0 0; display: grid; gap: 0; border-left: 1px solid var(--line-strong); }
.rhythm li { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 16px 0 16px 26px; position: relative; }
.rhythm li::before { content: ""; position: absolute; left: -6px; top: 24px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.rhythm .when { font: 500 13.5px var(--mono); color: var(--gold); padding-top: 3px; }
.rhythm .what { color: var(--muted); }

/* WORKSHOP */
.works { grid-template-columns: repeat(3, 1fr); }
.work { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); transition: border-color .2s ease, transform .2s ease; }
.work:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.work-kind { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--verdigris); }
.work h3 { font-size: 27px; margin: 10px 0 10px; }
.work p { color: var(--muted); margin: 0; font-size: 16px; }

.delegation { margin-top: 56px; padding: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(160deg, var(--panel-2), var(--panel)); }
.flow { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.flow-step { flex: 1 1 160px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(7,17,13,.55); display: flex; flex-direction: column; gap: 4px; }
.flow-step b { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.flow-step span { font: 400 12.5px var(--mono); color: var(--muted); }
.flow-arrow { align-self: center; color: var(--gold); font-size: 22px; }
.fine { color: var(--muted); font-size: 14.5px; margin: 18px 0 0; }
.fine.center { text-align: center; }

/* ENGINE */
.engine { display: grid; gap: 14px; }
.tier { padding: 26px 28px; border-radius: var(--radius); border: 1px solid var(--line); }
.tier.above { background: rgba(108,194,166,.05); }
.tier.middle { background: var(--panel-2); border-color: var(--line-strong); text-align: center; }
.tier.below { background: rgba(212,175,95,.04); }
.tier-label { font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.tier.middle .tier-label { margin-bottom: 10px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(7,17,13,.6); font-size: 14.5px; color: var(--text); }
.agent-core { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.agent-core b { font: 600 34px/1.1 var(--serif); }
.agent-core span { font: 400 13px var(--mono); color: var(--muted); }
.cluster { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.node-box { padding: 20px 22px; border-radius: 12px; border: 1px solid var(--line-strong); background: #050c09; display: flex; flex-direction: column; gap: 3px; }
.node-box b { font: 600 24px var(--serif); margin-bottom: 4px; }
.node-box span { font: 400 13px var(--mono); color: var(--muted); }
.link { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 150px; }
.link span { display: block; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--verdigris), transparent); position: relative; overflow: hidden; }
.link span::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: pulse 2.4s linear infinite; }
.link span:nth-child(2)::after { animation-delay: 1.2s; }
.link small { font: 500 12px var(--mono); color: var(--verdigris); margin-top: 4px; }
@keyframes pulse { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .link span::after { animation: none; } }

.specs { margin: 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { padding: 22px 6px; text-align: center; }
.specs div + div { border-left: 1px solid var(--line); }
.specs dt { font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 6px 0 0; font: 600 40px/1 var(--serif); color: var(--gold); }

/* PRECEPTS */
.tablet-section { background: radial-gradient(700px 420px at 50% 40%, rgba(108,194,166,.10), transparent 70%); }
.tablet {
  counter-reset: p; list-style: none; margin: 0; padding: 44px 48px;
  border-radius: 22px 22px 14px 14px;
  border: 1px solid rgba(108,194,166,.35);
  background: linear-gradient(170deg, rgba(20,58,44,.65), rgba(9,26,20,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 30px 80px rgba(0,0,0,.45), 0 0 0 6px rgba(108,194,166,.05);
}
.tablet li { counter-increment: p; position: relative; padding: 16px 0 16px 64px; color: var(--muted); font-size: 17.5px; border-bottom: 1px solid rgba(108,194,166,.14); }
.tablet li:last-child { border-bottom: 0; }
.tablet li::before {
  content: counter(p, upper-roman); position: absolute; left: 0; top: 13px; width: 44px;
  font: 600 22px var(--serif); color: var(--gold); text-align: right;
}
.tablet li b { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #f6f1e3; }

/* CORRESPONDENCE */
.essay-title { font-size: clamp(38px, 4.6vw, 56px); font-style: italic; font-weight: 500; }
.essay-sub { color: var(--muted); margin: 14px 0 34px; }
.essay { margin: 0; padding: 36px 40px; border-left: 2px solid var(--gold); background: rgba(7,17,13,.55); border-radius: 0 var(--radius) var(--radius) 0; }
.essay p { font: 500 24px/1.5 var(--serif); color: #f1ead8; margin: 0 0 18px; }
.essay p:last-child { margin: 0; }
.essay .epigraph { font-style: italic; color: var(--gold); font-size: 30px; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 56px 0 64px; }
.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.motto { font: italic 500 28px var(--serif); color: var(--gold); margin: 12px 0 0; }
.footer .fine { text-align: right; margin: 0; }

/* REVEAL */
.js-reveal .pillar, .js-reveal .card, .js-reveal .layer, .js-reveal .work, .js-reveal .rhythm li,
.js-reveal .tablet li, .js-reveal .tier, .js-reveal .memory-rule, .js-reveal .essay {
  opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease;
}
.js-reveal .in { opacity: 1 !important; transform: none !important; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; min-height: 0; text-align: left; }
  .sigil { order: -1; max-width: 360px; margin: 0 auto; width: 100%; }
  .three, .works { grid-template-columns: 1fr 1fr; }
  .layers { grid-template-columns: 1fr; }
  .layer + .layer { border-left: 0; border-top: 1px solid var(--line); }
  .memory-rule { grid-template-columns: 1fr; }
  .nav nav { display: none; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 36px 20px 56px; }
  .lede { font-size: 19px; }
  .three, .works, .offices { grid-template-columns: 1fr; }
  .card.feature { grid-row: auto; }
  .section { padding: 76px 0; }
  .rhythm li { grid-template-columns: 1fr; gap: 4px; }
  .cluster { grid-template-columns: 1fr; }
  .link { min-width: 0; padding: 6px 0; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div:nth-child(3) { border-left: 0; }
  .specs div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tablet { padding: 26px 22px; }
  .tablet li { padding-left: 46px; }
  .tablet li::before { width: 32px; }
  .essay { padding: 26px 22px; }
  .essay p { font-size: 21px; }
  .footer .fine { text-align: left; }
  .flow-arrow { display: none; }
}
