/* Noduma homepage (SPEC-048). No external fonts or assets. */
:root {
  --bg: #07090d;
  --fg: #eef2f7;
  --muted: #94a0b4;
  --line: rgba(148, 160, 180, .16);
  --card: rgba(17, 22, 31, .62);
  --teal: #2dd4bf;
  --indigo: #818cf8;
  --pink: #f472b6;
  --grad: linear-gradient(100deg, var(--teal) 0%, var(--indigo) 55%, var(--pink) 100%);
  --radius: 18px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .88em; background: rgba(148, 160, 180, .12); padding: .1em .4em; border-radius: 6px; }
pre code { background: none; padding: 0; }
.muted { color: var(--muted); }

/* Background: the live network canvas and two soft glows. */
#network { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .9; }
.glow { position: fixed; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(120px); opacity: .13; pointer-events: none; }
.glow-a { background: var(--teal); top: -30vmax; left: -18vmax; animation: drift 22s ease-in-out infinite alternate; }
.glow-b { background: var(--indigo); bottom: -34vmax; right: -20vmax; animation: drift 26s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }

/* Navigation */
.nav {
  position: sticky; top: 14px; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  width: min(1120px, calc(100% - 32px)); margin: 14px auto 0; padding: 10px 12px 10px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(7, 9, 13, .55); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav nav a:hover { color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 16px;
  border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-small { padding: 8px 16px; font-size: 14px; background: var(--fg); color: var(--bg); border-color: transparent; }
.btn-primary {
  position: relative; color: #04120f; border: 0;
  background: linear-gradient(100deg, var(--teal), #7dd3fc 60%, var(--indigo));
  background-size: 200% 100%; animation: sheen 6s linear infinite;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, .4), 0 10px 40px -10px rgba(45, 212, 191, .7);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(45, 212, 191, .6), 0 14px 50px -8px rgba(45, 212, 191, .9); }
@keyframes sheen { to { background-position: -200% 0; } }
.btn-ghost { background: rgba(148, 160, 180, .08); }
.btn-ghost:hover { background: rgba(148, 160, 180, .16); }

/* Hero */
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero { text-align: center; padding: 110px 0 60px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px;
  padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(17, 22, 31, .6);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(45, 212, 191, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0); } 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); } }
h1 {
  margin: 0 auto; max-width: 15ch;
  font-size: clamp(42px, 8vw, 88px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.hero > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: .08s; } .hero > :nth-child(3) { animation-delay: .16s; } .hero > :nth-child(4) { animation-delay: .24s; } .hero > :nth-child(5) { animation-delay: .32s; }
.lead { margin: 26px auto 0; max-width: 34ch; font-size: clamp(18px, 2.4vw, 23px); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* Terminal */
.terminal, .code { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 13, 19, .82); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset; }
.terminal { max-width: 640px; margin: 70px auto 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3b4252; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; }
pre { margin: 0; padding: 20px 22px; font: 14px/1.75 var(--mono); overflow-x: auto; }
.p { color: var(--teal); }
.ok { color: #28c840; }
.k { color: var(--teal); } .s { color: #fbbf24; }
.type { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; width: 0; animation: typing 1.6s steps(34) .6s forwards; }
@keyframes typing { to { width: 34ch; } }
.out { display: block; opacity: 0; transform: translateY(4px); animation: appear .4s forwards; }
.o1 { animation-delay: 2.5s; } .o2 { animation-delay: 3.1s; } .o3 { animation-delay: 3.8s; } .o4 { animation-delay: 4.6s; }
@keyframes appear { to { opacity: 1; transform: none; } }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 4px; vertical-align: text-bottom; background: var(--teal); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 110px 0 0; }
.eyebrow { margin: 0 0 10px; font: 600 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
h2 { margin: 0 0 44px; max-width: 20ch; font-size: clamp(32px, 5vw, 54px); line-height: 1.06; letter-spacing: -.035em; font-weight: 750; }
h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.grid { display: grid; gap: 16px; }
.three { grid-template-columns: repeat(3, 1fr); }

/* Cards with a spotlight that follows the pointer (network.js sets --x, --y). */
.card {
  position: relative; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transition: border-color .3s, transform .3s;
}
.card:hover { border-color: rgba(45, 212, 191, .35); transform: translateY(-2px); }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), rgba(45, 212, 191, .13), transparent 45%);
}
.spot:hover::before { opacity: 1; }
.icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 12px; background: linear-gradient(135deg, rgba(45, 212, 191, .18), rgba(129, 140, 248, .18)); border: 1px solid var(--line); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Bento */
.bento { display: grid; gap: 16px; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: minmax(170px, auto); }
.bento .big { grid-row: span 2; display: flex; flex-direction: column; }
.bento .wide { grid-column: span 2; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-top: auto; padding-top: 28px; }
.bars span { flex: 1; height: calc(var(--h) * 100%); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--teal), rgba(45, 212, 191, .15)); transform-origin: bottom; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.js .reveal:not(.visible) .bars span { transform: scaleY(0); }
.bars span:nth-child(1) { --h: .92; } .bars span:nth-child(2) { --h: .88; } .bars span:nth-child(3) { --h: .95; }
.bars span:nth-child(4) { --h: .4; } .bars span:nth-child(5) { --h: .9; } .bars span:nth-child(6) { --h: .97; } .bars span:nth-child(7) { --h: .86; }
.bars span.bad { background: linear-gradient(180deg, var(--pink), rgba(244, 114, 182, .15)); }
.visible .bars span:nth-child(2) { transition-delay: .08s; } .visible .bars span:nth-child(3) { transition-delay: .16s; }
.visible .bars span:nth-child(4) { transition-delay: .24s; } .visible .bars span:nth-child(5) { transition-delay: .32s; }
.visible .bars span:nth-child(6) { transition-delay: .4s; } .visible .bars span:nth-child(7) { transition-delay: .48s; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); counter-reset: none; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; border-radius: 50%; font: 700 15px var(--mono); color: var(--bg); background: var(--grad); }

/* Developers */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.grid > *, .bento > *, .steps > *, .split > * { min-width: 0; }
.split h2 { margin-bottom: 18px; }
.split p { margin: 0 0 28px; }
.code { padding: 0; }
.code pre { font-size: 13.5px; }

/* Final call */
.final { text-align: center; padding-bottom: 40px; }
.final h2 { margin: 0 auto; max-width: none; }

footer {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  width: min(1120px, calc(100% - 32px)); margin: 90px auto 0; padding: 28px 0 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
footer nav { display: flex; gap: 22px; }
footer a:hover { color: var(--fg); }

/* Reveal on scroll (network.js adds .visible); without JavaScript all shows. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .three, .steps, .split { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento .big { grid-row: auto; }
  .bento .wide { grid-column: auto; }
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
  .hero { padding-top: 72px; }
  .section { padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .type { width: 34ch; }
}
