:root {
  --bg: #0d0b09;
  --bg-2: #15120e;
  --panel: #1a1611;
  --line: rgba(232, 196, 140, 0.12);
  --line-strong: rgba(232, 196, 140, 0.28);
  --text: #f1e9dc;
  --muted: #a99d8a;
  --brass: #d9a55b;
  --brass-2: #f3cc8a;
  --copper: #c26d3f;
  --teal: #6fd3c1;
  --radius: 14px;
  --max: 1180px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* blueprint grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  pointer-events: none;
  opacity: .5;
  z-index: -1;
}
a { color: inherit; }
.mono { font-family: var(--mono); }
.small { font-size: 13px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brass); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 3px; border-radius: 6px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 18px 24px;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(13,11,9,.85), rgba(13,11,9,.55));
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px var(--serif); letter-spacing: .01em; }
.brand-mark { width: 28px; height: 28px; color: var(--brass); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark { transform: rotate(60deg); }
.nav nav { display: flex; gap: 26px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* HERO */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 56px 24px 96px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center;
  min-height: calc(100vh - 70px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--teal);
  border: 1px solid rgba(111,211,193,.25); padding: 6px 12px; border-radius: 999px; margin: 0 0 28px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(111,211,193,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(111,211,193,0); } 100% { box-shadow: 0 0 0 0 rgba(111,211,193,0); } }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(42px, 6.2vw, 84px); line-height: 1.02; }
h1 em { font-style: italic; font-weight: 300; background: linear-gradient(100deg, var(--brass-2), var(--copper)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 26px 0 34px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(120deg, var(--brass-2), var(--brass)); color: #1b130a; box-shadow: 0 8px 30px -10px rgba(217,165,91,.7); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--brass); }

.ticker { display: flex; flex-wrap: wrap; gap: 0; margin: 48px 0 0; border-top: 1px solid var(--line); }
.ticker div { padding: 18px 28px 0 0; margin-right: 28px; }
.ticker div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.ticker dt { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ticker dd { margin: 4px 0 0; font: 500 22px var(--serif); color: var(--brass-2); }

.hero-art { position: relative; aspect-ratio: 1; width: 100%; }
#gears { width: 100%; height: 100%; overflow: visible; position: relative; z-index: 1; }
.hero-glow { position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(217,165,91,.25), transparent 65%); filter: blur(30px); z-index: 0; }
.gear { transform-box: view-box; transform-origin: 0 0; }
.gear-body { fill: url(#brassGrad); stroke: rgba(0,0,0,.35); stroke-width: 1; }
.gear-alt .gear-body { fill: url(#copperGrad); }
.gear-ghost .gear-body { fill: none; stroke: var(--line-strong); stroke-dasharray: 4 6; }
.gear-hole { fill: var(--bg); }
.gear-spoke { fill: var(--bg); }

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: 110px 24px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--brass); margin: 0 0 14px; }
h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; }
.sub { color: var(--muted); font-size: 18px; margin: 18px 0 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font: 500 13px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s;
  --mx: 50%; --my: 0%;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(217,165,91,.12), transparent 40%);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card.is-hidden { display: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(217,165,91,.1); border: 1px solid var(--line-strong); color: var(--brass-2); }
.card-icon svg { width: 24px; height: 24px; }
.badge { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.badge-public { color: var(--teal); background: rgba(111,211,193,.08); border: 1px solid rgba(111,211,193,.25); }
.badge-private { color: var(--brass-2); background: rgba(217,165,91,.08); border: 1px solid rgba(217,165,91,.25); }
.badge-private::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.card h3 { font-size: 26px; }
.card .tagline { color: var(--text); font-weight: 500; margin: 0; }
.card .desc { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.tags li { font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.card-foot a { color: var(--brass-2); text-decoration: none; font-weight: 500; }
.card-foot a:hover { text-decoration: underline; }
.card-foot .muted { color: var(--muted); font-family: var(--mono); font-size: 12px; }

/* PROCESS */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.step { position: relative; padding: 0 18px 0 0; }
.step-n { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); font: 500 18px var(--serif); color: var(--brass-2); margin-bottom: 20px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.who { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; padding: 3px 8px; border-radius: 6px; }
.who-human { color: var(--copper); border: 1px solid rgba(194,109,63,.35); }
.who-ai { color: var(--teal); border: 1px solid rgba(111,211,193,.3); }

.console { margin: 64px 0 0; background: #0a0907; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); }
.console figcaption { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3128; }
.dots i:first-child { background: var(--copper); }
.console pre { margin: 0; padding: 22px; min-height: 280px; font: 13.5px/1.75 var(--mono); color: #d8cfc0; white-space: pre-wrap; word-break: break-word; }
.console .c-dim { color: #6e6457; }
.console .c-ok { color: var(--teal); }
.console .c-brass { color: var(--brass-2); }
.console .caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: text-bottom; background: var(--brass); animation: blink 1s steps(1) infinite; }

/* MANIFESTO */
.tenets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tenets article { background: var(--bg); padding: 36px; }
.tenets h3 { font-size: 24px; margin-bottom: 10px; }
.tenets p { color: var(--muted); margin: 0; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); }
.footer p { margin: 0; }
.made { font-size: 14px; }
.made .mono { color: #6e6457; font-size: 12px; margin-left: 6px; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .hero-art { max-width: 460px; margin: 0 auto; order: -1; width: 80%; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 28px; bottom: 28px; left: 27px; right: auto; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px); }
  .step { padding-left: 80px; }
  .step-n { position: absolute; left: 0; top: 0; }
  .tenets { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 14px 16px; }
  .nav nav { gap: 16px; }
  .nav nav a:nth-child(n+2) { display: none; }
  .hero, .section { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .grid { grid-template-columns: 1fr; }
  .ticker div { margin-right: 16px; padding-right: 16px; }
  .ticker div + div { padding-left: 16px; }
  .ticker dd { font-size: 18px; }
  .tenets article { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
