/* supragnosis landing - plain CSS, no build step */

:root {
  --ink-0: #08090d;
  --ink-1: #0c0e14;
  --panel: #10131b;
  --panel-2: #131722;
  --line: #222836;
  --line-soft: #1a1f2b;
  --text: #e9e4d6;
  --muted: #8e96a5;
  --faint: #5c6472;
  --gold: #d9a544;
  --gold-bright: #f0c469;
  --gold-dim: rgba(217, 165, 68, 0.35);
  --teal: #56b3a2;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* atmosphere: candlelight glow + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(217, 165, 68, 0.10), transparent 65%),
    radial-gradient(700px 500px at 85% 8%, rgba(86, 179, 162, 0.05), transparent 60%);
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  z-index: 0;
}

main, header.site-head, footer.site-foot { position: relative; z-index: 1; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.08em 0.35em;
  color: var(--text);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink-0);
  padding: 8px 14px;
  font-family: var(--mono);
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------------- header ---------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 56px);
}

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.wordmark::before { content: "* "; color: var(--gold); }
.wordmark:hover { text-decoration: none; color: var(--gold-bright); }

.site-head nav {
  display: flex;
  gap: clamp(14px, 2.5vw, 28px);
  font-family: var(--mono);
  font-size: 13px;
}
.site-head nav a { color: var(--muted); }
.site-head nav a:hover { color: var(--gold-bright); text-decoration: none; }
.site-head nav a.nav-gh {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 10px;
  margin: -4px 0;
}
.site-head nav a.nav-gh:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

@media (max-width: 620px) {
  .site-head nav a:not(.nav-gh) { display: none; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 56px) clamp(56px, 7vw, 96px);
  overflow: hidden;
}

.constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 70%, transparent);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 70%, transparent);
}

.constellation .e {
  stroke: var(--gold);
  stroke-opacity: 0.28;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.4s ease-out forwards;
  animation-delay: var(--d, 0s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.constellation .n { opacity: 0; animation: appear 0.9s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes appear { to { opacity: 1; } }

.constellation .n circle { fill: var(--gold); fill-opacity: 0.85; }
.constellation .n text {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--muted);
  fill-opacity: 0.8;
}
.constellation .n.pulse circle { animation: appear 0.9s ease-out forwards, pulse 5s ease-in-out 2s infinite; }
@keyframes pulse {
  0%, 100% { fill-opacity: 0.85; }
  50% { fill-opacity: 0.35; }
}

.hero-inner { max-width: 880px; margin: 0 auto; position: relative; }

/* staggered load-in */
.hero-inner > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.3s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.45s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.6s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.72s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.etymology {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.etymology span { color: var(--faint); text-transform: none; letter-spacing: 0.02em; }

.hero h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 420;
  font-size: clamp(3rem, 8.5vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 26px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 340;
  color: var(--gold-bright);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.btn {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #171204;
}
.btn-gold:hover {
  background: var(--gold-bright);
  box-shadow: 0 6px 24px rgba(217, 165, 68, 0.25);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }

.install {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 19, 27, 0.85);
  overflow: hidden;
  margin-bottom: 26px;
}
.install-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.install code {
  font-size: 12.5px;
  background: none;
  border: none;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  color: var(--text);
}
.copy {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: none;
  border: none;
  border-left: 1px solid var(--line-soft);
  padding: 12px 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.copy:hover { color: var(--gold-bright); }
.copy.ok { color: var(--teal); }

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.badges li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 12px;
}
.badges li:first-child { color: var(--gold-bright); border-color: var(--gold-dim); }

/* ---------------- sections ---------------- */

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line-soft);
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.9, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-inner > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .constellation .e { stroke-dashoffset: 0; animation: none; }
  .constellation .n { opacity: 1; animation: none; }
  html { scroll-behavior: auto; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

.section h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 440;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 34px;
  max-width: 640px;
}

.section-note {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 560px;
  margin: 26px 0 0;
}
.section-note.wide { max-width: 720px; margin: -10px 0 34px; }

/* ---------------- grids and cards ---------------- */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 26px 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dim);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.22rem;
  margin: 0 0 10px;
  color: var(--gold-bright);
}
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------------- flow ---------------- */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.flow-step {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 150px;
  min-width: 150px;
  max-width: 260px;
}
.flow-step strong {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.flow-step span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.flow-arrow {
  font-family: var(--mono);
  color: var(--gold);
  align-self: center;
  font-size: 15px;
  flex: 0 0 auto;
}

/* ---------------- terminal ---------------- */

.terminal {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}
.terminal-bar {
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 16px;
  background: var(--panel-2);
}
.terminal-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
}
.terminal code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.terminal .c { color: var(--faint); }

/* ---------------- mcp ---------------- */

.mcp-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .mcp-wrap { grid-template-columns: 1fr; } }

.tools { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tools > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.tools > div:last-child { border-bottom: none; }
.tools dt {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-bright);
}
.tools dd { margin: 0; color: var(--muted); font-size: 14.5px; }
.tools-more dt { color: var(--faint); }
@media (max-width: 480px) {
  .tools > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------- federation topologies ---------------- */

.topologies { margin-top: 8px; }
.topo {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 18px 18px 12px;
  text-align: center;
}
.topo svg { width: 100%; max-width: 240px; height: auto; }
.topo figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 0 4px;
}
.t-edge {
  stroke: var(--gold);
  stroke-opacity: 0.3;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  animation: march 1.6s linear infinite;
}
@keyframes march { to { stroke-dashoffset: -8; } }
.t-node { fill: var(--muted); fill-opacity: 0.7; }
.t-hub { fill: var(--gold); }

/* ---------------- crates ---------------- */

.crates { gap: 12px; }
.crate {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.18s ease;
}
.crate:hover { border-color: var(--gold-dim); }
.crate strong {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.crate strong::before { content: "supragnosis-"; color: var(--faint); font-weight: 400; }
.crate span { font-size: 13.5px; color: var(--muted); }

/* ---------------- status checklist ---------------- */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.checklist li {
  display: flex;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.checklist li:last-child { border-bottom: none; }
.checklist .mark {
  font-family: var(--mono);
  font-size: 14px;
  white-space: pre;
  flex-shrink: 0;
}
.checklist .done .mark, .checklist li.done .mark { color: var(--teal); }
.checklist li.open .mark { color: var(--faint); }
.checklist strong { color: var(--text); font-weight: 500; }
.checklist div { color: var(--muted); font-size: 15.5px; }

/* ---------------- footer ---------------- */

.site-foot {
  border-top: 1px solid var(--line-soft);
  text-align: center;
  padding: 56px clamp(20px, 5vw, 56px) 64px;
}
.foot-ety {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 22px;
}
.foot-ety span { color: var(--faint); }
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 22px;
}
.site-foot nav a { color: var(--muted); }
.site-foot nav a:hover { color: var(--gold-bright); text-decoration: none; }
.foot-fine { color: var(--faint); font-size: 13.5px; margin: 0; }
.foot-fine code { font-size: 12px; }
