/* Nuclida landing page. No external fonts or scripts: the page loads only its own files. */

:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --card: rgba(18, 25, 43, 0.72);
  --line: rgba(148, 173, 222, 0.14);
  --text: #e8eefc;
  --muted: #93a1c2;
  --cyan: #5ee7ff;
  --blue: #4d8dff;
  --amber: #ffc44d;
  --coral: #ff6b7d;
  --violet: #a78bfa;
  --radius: 18px;
  --max: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(77, 141, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(94, 231, 255, 0.08), transparent 60%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2 { line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.7rem, 7vw, 5.6rem); font-weight: 750; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; }
p { margin: 0 0 1em; color: var(--muted); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; }

.grad {
  background: linear-gradient(100deg, var(--cyan), var(--blue) 45%, var(--violet) 70%, var(--amber));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.2em;
}

/* ---- navigation ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(5, 7, 13, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(5, 7, 13, 0.8); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; fill: none; stroke: var(--cyan); stroke-width: 1.6; }
.brand-mark circle { fill: var(--amber); stroke: none; }
.brand:hover .brand-mark { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav nav a:hover { color: var(--text); }
@media (max-width: 760px) { .nav nav { display: none; } .nav .btn-small { margin-left: auto; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn-primary {
  color: #041018;
  background: linear-gradient(100deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 40px -10px rgba(94, 231, 255, 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 50px -8px rgba(94, 231, 255, 0.85); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: rgba(94, 231, 255, 0.5); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px clamp(20px, 6vw, 80px) 80px;
  overflow: hidden;
}
.hero-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(5, 7, 13, 0.92) 28%, rgba(5, 7, 13, 0.35) 55%, rgba(5, 7, 13, 0) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero-text { position: relative; max-width: 640px; pointer-events: none; }
.hero-text a { pointer-events: auto; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34em; color: #b6c2de; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }
.hero-caption {
  position: absolute; right: clamp(16px, 4vw, 40px); bottom: 22px; margin: 0;
  font-family: var(--mono); font-size: 0.72rem; color: rgba(147, 161, 194, 0.7);
}
.tooltip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(10, 15, 28, 0.92); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.8rem; color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}
.tooltip b { color: var(--cyan); font-weight: 600; }
@media (max-width: 760px) {
  .hero-glow { background: linear-gradient(180deg, rgba(5, 7, 13, 0.55) 0%, rgba(5, 7, 13, 0.6) 55%, rgba(5, 7, 13, 0.05) 85%, var(--bg) 100%); }
  .hero-caption { display: none; }
}

/* ---- numbers ---- */
.stats {
  max-width: var(--max); margin: 0 auto; padding: 40px clamp(20px, 4vw, 40px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
}
.stat { background: var(--bg-2); padding: 30px 26px; display: flex; flex-direction: column; gap: 6px; }
.num { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.num-text { background: linear-gradient(100deg, var(--amber), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); margin: 0 20px; } }

/* ---- features ---- */
.feature {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) clamp(20px, 4vw, 40px);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 80px); align-items: center;
}
.feature-alt .feature-text { order: 2; }
.feature-text p { font-size: 1.08rem; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature-alt .feature-text { order: 0; } }

.ticks { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: #c3cde5; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan) 30%, rgba(94, 231, 255, 0.15) 32%);
}
.link { color: var(--cyan); text-decoration: none; font-weight: 600; font-family: var(--mono); }
.link:hover { text-decoration: underline; }
.badge {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.68rem; letter-spacing: 0.1em; color: var(--amber);
  border: 1px solid rgba(255, 196, 77, 0.4); background: rgba(255, 196, 77, 0.08);
}

/* ---- cards ---- */
.feature-visual { display: grid; gap: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(148, 173, 222, 0.25); }
.card-title { margin-left: 10px; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

.plot { display: block; width: 100%; height: auto; padding: 8px 10px 4px; }
.plot .axes line { stroke: rgba(148, 173, 222, 0.35); stroke-width: 1; }
.plot .axis-label { fill: var(--muted); font-family: var(--mono); font-size: 9px; text-anchor: middle; }
.plot .grid line { stroke: rgba(148, 173, 222, 0.08); stroke-width: 1; }
.plot .curve { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.plot .area { stroke: none; opacity: 0.18; }
.plot .draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset 2.6s cubic-bezier(.4, 0, .2, 1); }
.plot.in .draw { stroke-dashoffset: 0; }
.plot .area { transition: opacity 1.6s 1.2s; opacity: 0; }
.plot.in .area { opacity: 0.18; }
.plot .legend { font-family: var(--mono); font-size: 9px; }

.code-card {
  margin: 0; padding: 20px 22px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: #c8d3ee;
}
.code-card .c { color: #5f6f94; }
.code-card .k { color: var(--cyan); }
.code-card .n { color: var(--amber); }

/* ---- processing pipeline ---- */
.pipeline { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.pipe-step {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 22px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.5s, box-shadow 0.5s, transform 0.5s;
}
.pipe-k { font-weight: 650; font-size: 1.05rem; }
.pipe-v { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.pipe-end { border-color: rgba(94, 231, 255, 0.45); box-shadow: 0 0 50px -12px rgba(94, 231, 255, 0.5); }
.pipe-step.lit { border-color: rgba(94, 231, 255, 0.6); box-shadow: 0 0 40px -14px rgba(94, 231, 255, 0.7); transform: translateX(6px); }
.pipe-link {
  position: relative; height: 34px; margin-left: 40px; width: 2px;
  background: linear-gradient(var(--line), var(--line));
  overflow: hidden;
}
.pipe-link::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 2px; height: 40%;
  background: linear-gradient(transparent, var(--cyan));
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { top: 110%; } }

/* ---- MCP chat ---- */
.chat-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 16px; border-radius: 14px; max-width: 88%; font-size: 0.95rem; opacity: 0; transform: translateY(10px); transition: opacity 0.6s, transform 0.6s; }
.chat-card.in .msg { opacity: 1; transform: none; }
.chat-card.in .msg:nth-child(2) { transition-delay: 0.9s; }
.chat-card.in .msg:nth-child(3) { transition-delay: 1.9s; }
.msg-user { align-self: flex-end; background: rgba(77, 141, 255, 0.18); border: 1px solid rgba(77, 141, 255, 0.35); }
.msg-tool { align-self: flex-start; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); }
.tool { color: var(--amber); margin-right: 8px; }
.msg-ai { align-self: flex-start; background: rgba(94, 231, 255, 0.08); border: 1px solid rgba(94, 231, 255, 0.25); color: #d5e2fb; }

/* ---- benchmarks ---- */
.bench, .access { max-width: var(--max); margin: 0 auto; padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 40px); }
.bench-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.bench-card {
  position: relative; padding: 26px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
}
.bench-card:hover { transform: translateY(-4px); border-color: rgba(94, 231, 255, 0.4); }
.bench-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(94, 231, 255, 0.12), transparent 40%);
}
.bench-n { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; }
.bench-k { font-weight: 650; }
.bench-v { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 960px) { .bench-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bench-grid { grid-template-columns: 1fr; } }

/* ---- access ---- */
.access { text-align: center; }
.steps { list-style: none; padding: 0; margin: 40px 0 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.steps li { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.step-n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  font-family: var(--mono); font-weight: 700; color: #041018; background: linear-gradient(135deg, var(--cyan), var(--blue));
}
.step-k { font-weight: 650; font-size: 1.1rem; }
.step-v { color: var(--muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---- footer ---- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 40px clamp(20px, 4vw, 40px) 50px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}
.footer a { color: var(--cyan); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(.2, .7, .2, 1), transform 0.9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .msg { opacity: 1 !important; transform: none !important; }
  .plot .draw { stroke-dashoffset: 0 !important; }
  .plot .area { opacity: 0.18 !important; }
}
