/* ============================================================
   Loomgraph - elite landing
   theme system: light (warm paper) + dark (deep ink), manual toggle
   ============================================================ */
:root {
  /* dark theme - GitHub-dark base, aligned with elektraos family */
  --ink-0: #0d1117;
  --ink-1: #11161d;
  --ink-2: #161b22;
  --ink-3: #1d242d;
  --hair: rgba(230, 237, 243, 0.08);
  --hair-strong: rgba(230, 237, 243, 0.18);
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-quiet: #6e7681;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.18);
  --accent-2: #2bff88;
  --cyan: #00d4ff;
  --magenta: #ff3df5;
  --err: #ef4444;
  --ok: #4ade80;
  --warn: #fbbf24;
  --nav-bg: rgba(13, 17, 23, 0.78);
  --panel-bg: rgba(22, 27, 34, 0.7);
  --tooltip-bg: rgba(13, 17, 23, 0.96);
  --modal-bg: rgba(0, 0, 0, 0.68);
  --drawer-bg: rgba(13, 17, 23, 0.97);
  --grad-start: #e6edf3;
  --grid-line: rgba(139, 92, 246, 0.05);
  --orb-opacity: 0.5;
  --globe-copy-grad: linear-gradient(90deg, rgba(13,17,23,0.94), rgba(13,17,23,0.7));
  --maxw: 1240px;
  --section-y: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

:root[data-theme="light"] {
  --ink-0: #f6f7f9;
  --ink-1: #eff1f4;
  --ink-2: #e6e9ee;
  --ink-3: #d8dde4;
  --hair: rgba(13, 17, 23, 0.10);
  --hair-strong: rgba(13, 17, 23, 0.22);
  --text: #0d1117;
  --text-dim: #4a5461;
  --text-quiet: #8b949e;
  --accent: #6d28d9;
  --accent-soft: rgba(109, 40, 217, 0.12);
  --accent-2: #059669;
  --cyan: #0891b2;
  --magenta: #be185d;
  --err: #b91c1c;
  --ok: #047857;
  --warn: #b45309;
  --nav-bg: rgba(246, 247, 249, 0.78);
  --panel-bg: rgba(239, 241, 244, 0.72);
  --tooltip-bg: rgba(246, 247, 249, 0.98);
  --modal-bg: rgba(13, 17, 23, 0.38);
  --drawer-bg: rgba(246, 247, 249, 0.97);
  --grad-start: #0d1117;
  --grid-line: rgba(13, 17, 23, 0.06);
  --orb-opacity: 0.28;
  --globe-copy-grad: linear-gradient(90deg, rgba(246,247,249,0.94), rgba(246,247,249,0.7));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
code, .mono { font-family: var(--font-mono); letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--ink-0); }

/* ambient grid backdrop - elektraos pattern */
#bg-grid {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 20%, transparent 75%);
}

/* ambient glow orbs - warm the darkness */
.orbs {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: var(--orb-opacity);
  animation: orbfloat 22s ease-in-out infinite;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -140px; left: -120px;
}
.orb-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  top: 45%; right: -180px;
  animation-delay: -7s;
}
.orb-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  top: 80%; left: 20%;
  animation-delay: -14s;
}
@keyframes orbfloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.08); }
  66% { transform: translate(-40px, 30px) scale(0.95); }
}

/* gradient section divider - elektraos signature */
.section-divider {
  position: relative; z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  margin: clamp(40px, 6vw, 80px) auto;
  max-width: 640px;
  opacity: 0.45;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 48px;
  padding: 18px clamp(20px, 3vw, 40px);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--hair);
}
.nav .brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--text);
}
.logo-mark {
  width: 26px; height: 26px;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.35));
}
.brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--accent) 55%, var(--accent-2) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.nav-links {
  display: flex; gap: 36px; justify-content: center;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px; border-radius: 2px; cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid var(--hair);
  background: transparent; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--hair-strong); background: var(--hair); }
.btn-primary {
  background: var(--text); color: var(--ink-0);
  border-color: var(--text); font-weight: 600;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--ink-0); transform: translateY(-1px); }
.btn-lg { padding: 14px 22px; font-size: 12.5px; letter-spacing: 0.1em; }
.btn-accent {
  background: transparent; color: var(--accent);
  border-color: var(--accent-soft);
}
.btn-accent:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ============================================================
   HERO - typographic only, pure black, no globe
   ============================================================ */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 160px 24px 120px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 40px;
}
.hero-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 8.6vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  max-width: 1100px;
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-dim);
}
.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.55;
  text-wrap: balance;
}
.hero-ctas { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.scroll-cue {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--text-quiet); text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--text-quiet), transparent);
  animation: scrollline 2.4s ease-in-out infinite;
}
@keyframes scrollline {
  0% { transform: scaleY(0.2); transform-origin: top; opacity: 0.3; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.3; }
}

/* ============================================================
   GLOBE SCENE - scroll-triggered, full-bleed
   ============================================================ */
.globe-section {
  position: relative; z-index: 2;
  min-height: 180vh;                  /* extra height so scroll drives rotation */
}
.globe-sticky {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 0;
  background: var(--ink-0);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.globe-copy {
  padding: 120px 48px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 24px;
  border-right: 1px solid var(--hair);
  background: var(--globe-copy-grad);
  z-index: 3;
  position: relative;
}
.globe-copy .section-eyebrow { margin-bottom: 24px; }
.globe-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 3.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.globe-copy h2 em { color: var(--text-dim); font-weight: 500; }
.globe-copy p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 0; }

.globe-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--hair);
  margin-top: 32px;
  border: 1px solid var(--hair);
}
.globe-stats .stat-cell {
  background: var(--ink-0);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-val {
  font-family: var(--font-display); font-weight: 500;
  font-size: 32px; letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
  font-variation-settings: "opsz" 48;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-quiet);
}
.globe-canvas-wrap {
  position: relative;
  overflow: hidden;
}
#globe-el {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.legend {
  position: absolute; top: 24px; right: 24px; z-index: 4;
  display: inline-flex; gap: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--hair);
  padding: 9px 14px; border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.legend-item {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9.5px;
  color: var(--text-dim); letter-spacing: 0.14em; text-transform: uppercase;
}
.legend-item .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-site { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.dot-hub { background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }
.dot-guest { background: #6ef066; box-shadow: 0 0 6px #6ef066; }
.dot-edge { width: 14px !important; height: 1.5px !important; border-radius: 0 !important; background: linear-gradient(90deg, var(--cyan), var(--magenta)); box-shadow: none; }

.tooltip {
  position: absolute; z-index: 20; pointer-events: none;
  background: var(--tooltip-bg);
  border: 1px solid var(--hair-strong);
  padding: 13px 16px; border-radius: 10px;
  font-size: 12px; min-width: 230px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0; transition: opacity 0.15s var(--ease);
  color: var(--text);
}
.tooltip.visible { opacity: 1; }
.tt-domain { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--text); margin-bottom: 8px; letter-spacing: -0.01em; }
.tt-row { display: flex; justify-content: space-between; color: var(--text-dim); margin: 3px 0; gap: 16px; font-family: var(--font-mono); font-size: 11px; }
.tt-row b { color: var(--text); font-weight: 500; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { position: relative; z-index: 2; }
.section {
  padding: var(--section-y) clamp(24px, 3vw, 40px);
  max-width: var(--maxw); margin: 0 auto;
}
.section-head {
  display: grid; grid-template-columns: 200px 1fr; gap: 56px;
  margin-bottom: 72px;
  align-items: start;
}
.section-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-quiet);
  padding-top: 10px;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  text-wrap: balance;
  max-width: 980px;
}
.section-heading em { font-weight: 500; color: var(--text-dim); }
.section-sub {
  color: var(--text-dim); max-width: 640px;
  line-height: 1.55; font-size: 16px;
  margin: 0;
}

/* ============================================================
   METHOD - 4 verbs
   ============================================================ */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
}
.method-cell {
  padding: 56px 40px 64px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 18px;
  transition: background 0.4s var(--ease);
  min-height: 280px;
}
.method-cell:hover { background: rgba(139, 92, 246, 0.025); }
.method-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.method-cell h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  letter-spacing: -0.025em; line-height: 1.02;
  margin: 0 0 6px;
  font-variation-settings: "opsz" 60;
}
.method-cell p {
  margin: 0; color: var(--text-dim);
  font-size: 15px; line-height: 1.6;
}

/* method visual blocks */
.method-visual {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  min-height: 120px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
}

/* 01 - Crawl: terminal stream */
.viz-crawl {
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.55;
}
.viz-crawl .line {
  display: flex; gap: 8px; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: crawlline 4s ease-out infinite;
  opacity: 0;
}
.viz-crawl .line:nth-child(1) { animation-delay: 0s; }
.viz-crawl .line:nth-child(2) { animation-delay: 0.4s; }
.viz-crawl .line:nth-child(3) { animation-delay: 0.8s; }
.viz-crawl .line:nth-child(4) { animation-delay: 1.2s; }
.viz-crawl .tick { color: var(--accent-2); }
.viz-crawl .path { color: var(--text); }
.viz-crawl .time { color: var(--text-quiet); margin-left: auto; }
@keyframes crawlline {
  0% { opacity: 0; transform: translateY(6px); }
  10% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0.35; transform: translateY(-2px); }
}

/* 02 - Propose: arc between two site chips */
.viz-propose {
  position: relative;
  height: 120px;
}
.viz-chip {
  position: absolute;
  padding: 6px 10px; border: 1px solid var(--hair-strong); border-radius: 6px;
  background: var(--ink-2);
  font-size: 10px; color: var(--text);
  letter-spacing: 0.02em;
}
.viz-chip.left { top: 20px; left: 0; }
.viz-chip.right { bottom: 20px; right: 0; }
.viz-arc {
  position: absolute; inset: 0;
  pointer-events: none;
}
.viz-arc path {
  stroke: url(#arcgrad); fill: none; stroke-width: 1.2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: arcdraw 3.5s ease-in-out infinite;
}
@keyframes arcdraw {
  0%, 10% { stroke-dashoffset: 200; opacity: 0.4; }
  55% { stroke-dashoffset: 0; opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 200; opacity: 0.4; }
}
.viz-score {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); background: var(--ink-0);
  padding: 3px 8px; border: 1px solid var(--accent-soft);
  border-radius: 999px;
  animation: scorepulse 3.5s ease-in-out infinite;
}
@keyframes scorepulse {
  0%, 50% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  65%, 90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; }
}

/* 03 - Approve: mini queue card */
.viz-approve {
  display: flex; flex-direction: column; gap: 6px;
}
.viz-queue-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--hair); border-radius: 6px;
  font-size: 10px;
}
.viz-queue-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn);
}
.viz-queue-item.done .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.viz-queue-item .label { color: var(--text); flex: 1; }
.viz-queue-item .tag {
  color: var(--text-quiet); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.viz-approve .viz-queue-item:nth-child(2) { animation: queuegreen 3s ease-in-out infinite; }
@keyframes queuegreen {
  0%, 40% { border-color: var(--hair); }
  55%, 100% { border-color: rgba(74, 222, 128, 0.35); }
}
.viz-approve .viz-queue-item:nth-child(2) .dot { animation: dotgreen 3s ease-in-out infinite; }
@keyframes dotgreen {
  0%, 40% { background: var(--warn); }
  55%, 100% { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
}

/* 04 - Publish: target arrows */
.viz-publish {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  align-items: center;
}
.viz-publish .src {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle, var(--accent-soft), transparent 80%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--accent); letter-spacing: 0.1em;
}
.viz-publish .targets {
  display: flex; flex-direction: column; gap: 4px;
}
.viz-publish .target {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px;
  color: var(--text);
  position: relative;
  padding-left: 22px;
}
.viz-publish .target::before {
  content: ""; position: absolute;
  left: 0; top: 50%;
  width: 16px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: publishline 2.5s ease-in-out infinite;
}
.viz-publish .target:nth-child(1)::before { animation-delay: 0s; }
.viz-publish .target:nth-child(2)::before { animation-delay: 0.4s; }
.viz-publish .target:nth-child(3)::before { animation-delay: 0.8s; }
@keyframes publishline {
  0%, 100% { opacity: 0.3; transform: scaleX(0.6); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); }
}
.viz-publish .status {
  margin-left: auto; font-size: 9px; color: var(--ok);
  text-transform: uppercase; letter-spacing: 0.14em;
}

/* ============================================================
   FLOW - horizontal infographic pipeline
   ============================================================ */
.flow-section {
  padding: calc(var(--section-y) * 0.7) clamp(24px, 3vw, 40px);
  max-width: var(--maxw); margin: 0 auto;
}
.flow-rail {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hair);
  border: 1px solid var(--hair); border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.flow-step {
  background: var(--ink-0);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.flow-step::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  opacity: 0; transform: scaleX(0);
  transform-origin: left;
  transition: all 0.6s var(--ease);
}
.flow-step.active::before { opacity: 1; transform: scaleX(1); }
.flow-kicker {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.flow-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: "opsz" 36;
}
.flow-num {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-quiet); letter-spacing: 0.22em;
  margin-top: auto; padding-top: 18px;
}
.flow-pulse {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.18), transparent);
  transform: translateX(-100%);
  animation: flowpulse 6s ease-in-out infinite;
}
@keyframes flowpulse {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   METRIC STRIP - ambient activity
   ============================================================ */
.metric-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hair);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  margin: calc(var(--section-y) * 0.4) 0;
}
.metric-strip .cell {
  background: var(--ink-0);
  padding: 36px clamp(20px, 2.4vw, 36px);
  display: flex; flex-direction: column; gap: 6px;
}
.metric-strip .val {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.035em;
  color: var(--text); line-height: 1;
  font-variation-settings: "opsz" 72;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.metric-strip .lbl {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-quiet); letter-spacing: 0.2em; text-transform: uppercase;
}
.metric-strip .sub {
  font-size: 12px; color: var(--text-dim);
  margin-top: 8px;
}

/* ============================================================
   HUBS
   ============================================================ */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.hub-card {
  padding: 32px;
  background: var(--ink-0);
  color: var(--text);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 240px;
  transition: all 0.35s var(--ease);
  position: relative;
}
.hub-card:hover {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05), transparent);
}
.hub-top { display: flex; justify-content: space-between; align-items: center; }
.hub-code {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-dim); letter-spacing: 0.22em;
  padding: 4px 10px; border: 1px solid var(--hair);
  border-radius: 999px;
}
.hub-iso {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.18em;
}
.hub-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; letter-spacing: -0.025em; line-height: 1;
  font-variation-settings: "opsz" 48;
}
.hub-meta {
  display: flex; gap: 14px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-quiet); letter-spacing: 0.02em;
}
.hub-meta span:not(:last-child)::after {
  content: "·"; margin-left: 14px; color: var(--text-quiet);
}
.hub-notes { font-size: 13px; color: var(--text-dim); line-height: 1.55; flex: 1; }
.hub-link {
  margin-top: auto; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--accent); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateX(-4px);
  transition: all 0.35s var(--ease);
}
.hub-card:hover .hub-link { opacity: 1; transform: translateX(0); }
.hint { color: var(--text-quiet); font-size: 12px; letter-spacing: 0.02em; padding: 20px; }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.sites-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.site-item {
  padding: 22px 26px; background: var(--ink-0);
  cursor: pointer; transition: background 0.2s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.site-item:hover { background: var(--hair); }
.site-item.active { background: rgba(139, 92, 246, 0.04); }
.site-domain {
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; letter-spacing: -0.015em;
  color: var(--text);
}
.site-meta { display: flex; gap: 10px; font-size: 11px; color: var(--text-quiet); letter-spacing: 0.02em; flex-wrap: wrap; font-family: var(--font-mono); }
.site-status {
  text-transform: uppercase; padding: 2px 8px;
  border-radius: 999px; font-size: 9px; letter-spacing: 0.16em;
}
.site-status.onboarding { color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.25); }
.site-status.healthy { color: var(--ok); border: 1px solid rgba(74, 222, 128, 0.25); }
.site-status.stale { color: var(--text-quiet); border: 1px solid var(--hair); }

/* ============================================================
   CLOSING / JOIN
   ============================================================ */
.join-section { padding: var(--section-y) clamp(24px, 3vw, 40px); max-width: 1000px; margin: 0 auto; text-align: center; }
.join-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.98; letter-spacing: -0.035em;
  margin: 0 0 22px;
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}
.join-title em { color: var(--text-dim); font-weight: 500; }
.join-sub {
  color: var(--text-dim); max-width: 540px;
  margin: 0 auto 40px; font-size: 16px; line-height: 1.55;
}
#join-form {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  max-width: 640px; margin: 0 auto;
}
#join-form input {
  flex: 1; min-width: 220px;
  background: var(--ink-2); border: 1px solid var(--hair);
  color: var(--text); padding: 14px 18px; font-size: 14px;
  border-radius: 2px; outline: none; font-family: var(--font-body);
  transition: border-color 0.25s var(--ease);
}
#join-form input:focus { border-color: var(--accent); }
#join-form input::placeholder { color: var(--text-quiet); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 80px clamp(24px, 3vw, 40px) 48px;
  max-width: var(--maxw); margin: var(--section-y) auto 0;
  display: grid; grid-template-columns: 1fr 2fr 1fr;
  gap: 48px; align-items: start;
  border-top: 1px solid var(--hair);
  color: var(--text-quiet); font-size: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .mono { color: var(--text-dim); font-size: 12px; }
.logo-sm { width: 20px; height: 20px; }
.footer-links { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 12px; transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-meta { text-align: right; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-quiet); letter-spacing: 0.12em; }

/* ============================================================
   DRAWER + MODALS (operator console, unchanged restraint)
   ============================================================ */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--drawer-bg); border-left: 1px solid var(--hair);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 95;
  transition: transform 0.4s var(--ease);
  display: flex; flex-direction: column;
  color: var(--text);
}
.drawer.hidden { transform: translateX(100%); }
.drawer-inner { padding: 26px; height: 100%; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
.drawer-auth { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.drawer-section { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.panel-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; color: var(--text-quiet); text-transform: uppercase; }
.panel-count { font-family: var(--font-mono); color: var(--accent); font-size: 12px; padding: 3px 10px; border: 1px solid var(--accent-soft); border-radius: 999px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; }

.approvals-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }
.approval-item { padding: 14px; border: 1px solid var(--hair); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.approval-top { display: flex; justify-content: space-between; align-items: center; }
.approval-agent { font-family: var(--font-mono); font-size: 10px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; }
.approval-change { font-family: var(--font-mono); font-size: 10px; color: var(--text-quiet); }
.approval-rationale { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.approval-actions { display: flex; gap: 8px; margin-top: 4px; }
.approval-actions .btn { flex: 1; padding: 6px 12px; font-size: 11px; }
.btn-approve { color: var(--ok); border-color: rgba(74, 222, 128, 0.25); background: transparent; }
.btn-approve:hover { background: rgba(74, 222, 128, 0.08); border-color: var(--ok); }
.btn-reject { color: var(--err); border-color: rgba(239, 68, 68, 0.25); background: transparent; }
.btn-reject:hover { background: rgba(239, 68, 68, 0.08); border-color: var(--err); }
.activity-log { padding: 8px 0; overflow-y: auto; max-height: 24vh; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); line-height: 1.6; }
.log-line { display: flex; gap: 10px; }
.log-time { color: var(--text-quiet); }
.log-ok { color: var(--ok); }
.log-err { color: var(--err); }
.log-info { color: var(--accent); }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--modal-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal.hidden { display: none; }
.modal-card {
  background: var(--ink-1); border: 1px solid var(--hair-strong);
  padding: 32px; min-width: 400px; border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.35);
  color: var(--text);
}
.modal-card h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; color: var(--text); }
.modal-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 20px; line-height: 1.5; }
.modal-card input {
  width: 100%; background: var(--ink-0); border: 1px solid var(--hair);
  color: var(--text); padding: 12px 14px; font-family: var(--font-mono);
  font-size: 12.5px; border-radius: 8px; outline: none;
  margin-bottom: 10px;
}
.modal-card input:focus { border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--hair-strong); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   SCROLL PROGRESS BAR (top of viewport)
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 120;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.08s linear;
  box-shadow: 0 0 10px var(--accent-soft);
  pointer-events: none;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--hair);
  transition: all 0.25s var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--hair-strong); background: var(--hair); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
:root[data-theme="light"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="light"] .theme-toggle .ico-moon { display: none; }

/* ============================================================
   VALUE STRIP (below hero, 3 illustrated benefits)
   ============================================================ */
.value-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 6px; overflow: hidden;
  max-width: min(var(--maxw), calc(100vw - 48px));
  margin: calc(var(--section-y) * 0.15) auto calc(var(--section-y) * 0.35);
}
.value-cell {
  background: var(--ink-0);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  transition: background 0.35s var(--ease);
}
.value-cell:hover { background: var(--ink-1); }
.value-ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
}
.value-ico svg { width: 22px; height: 22px; }
.value-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: "opsz" 36;
}
.value-copy {
  color: var(--text-dim); font-size: 14px; line-height: 1.55;
  margin: 0;
}
.value-tag {
  margin-top: auto;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}

/* ============================================================
   FLOW RAIL - upgraded: step icons + connector chevrons + numbers
   ============================================================ */
.flow-rail { grid-template-columns: repeat(4, 1fr); }
.flow-step {
  padding: 28px 24px 24px;
  gap: 12px;
  color: var(--text);
}
.flow-step .flow-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  margin-bottom: 2px;
}
.flow-step .flow-ico svg { width: 18px; height: 18px; }
.flow-step .flow-copy {
  font-size: 12.5px; color: var(--text-dim);
  line-height: 1.5; margin: 0;
}
/* connector chevron between steps */
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; z-index: 4;
  right: -8px; top: 50%;
  width: 14px; height: 14px;
  background: var(--ink-0);
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.9;
}

/* ============================================================
   SECTION GLYPH (small illustrated mark beside headings)
   ============================================================ */
.section-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--accent);
  vertical-align: -4px;
  margin-right: 10px;
}
.section-glyph svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav { grid-template-columns: auto 1fr; padding: 14px 18px; gap: 16px; }
  .nav-links { display: none; }
  .hero { padding: 140px 20px 100px; }
  .globe-section { min-height: auto; }
  .globe-sticky {
    position: relative; height: auto;
    grid-template-columns: 1fr; grid-template-rows: auto 480px;
  }
  .globe-copy { border-right: none; border-bottom: 1px solid var(--hair); padding: 80px 24px 32px; }
  .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 44px; }
  .section { padding-left: 20px; padding-right: 20px; }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand, .footer-links, .footer-meta { justify-content: center; text-align: center; }
  .value-strip { grid-template-columns: 1fr; }
  .flow-rail { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2)::after { display: none; }
}
@media (max-width: 540px) {
  .hero-title { font-size: clamp(44px, 12vw, 68px); }
  .hub-card, .site-item { padding: 22px; }
  .method-cell { padding: 40px 28px 44px; }
  .flow-rail { grid-template-columns: 1fr; }
  .flow-step:not(:last-child)::after { display: none; }
}
