/* DatasetAPI Public Site, Landing, Docs & Motion Styles (site.css) */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: var(--grad-glow);
}

/* Shared Navigation */
header.nav {
  position: sticky; top: 0; z-index: 80;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border);
}
header.nav .wrap {
  display: flex; align-items: center; gap: 18px; min-height: 68px;
}
.nav-search {
  position: relative; flex: 1; max-width: 340px;
  display: flex; align-items: center;
}
.nav-search > svg {
  position: absolute; left: 12px; width: 16px; height: 16px; color: var(--faint); pointer-events: none;
}
.nav-search input {
  width: 100%; padding: 8px 12px 8px 36px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  font-family: var(--font-sans); font-size: 13.5px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.nav-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 120;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.suggest a {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  font-size: 13px; border-bottom: 1px solid var(--border);
}
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.on { background: var(--cyan-dim); }
.suggest a b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest a small { font-family: var(--font-mono); color: var(--muted); font-size: 11.5px; }
.sg-type {
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; background: var(--violet-dim); color: #c4b5fd;
}
.sg-all { font-weight: 600; color: var(--cyan); justify-content: center; }

header.nav .links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
header.nav .links a {
  padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color .16s, background .16s;
}
header.nav .links a:hover, header.nav .links a.on { color: var(--text); background: rgba(148, 163, 184, 0.10); }
header.nav .right { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--muted); display: inline-grid; place-items: center;
  cursor: pointer; transition: color .16s, border-color .16s;
}
.theme-btn:hover { color: var(--cyan); border-color: var(--border-strong); }
.theme-btn svg { width: 17px; height: 17px; }

.burger {
  display: none; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--bg-elev);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.m-menu {
  position: fixed; inset: 68px 0 0 0; z-index: 90;
  background: var(--bg); padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
}
.m-menu[hidden] { display: none !important; }
.m-links { display: flex; flex-direction: column; gap: 8px; }
.m-links a {
  padding: 12px 14px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.m-links a small { color: var(--muted); font-size: 12.5px; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }

/* Hero Section + Canvas */
.hero {
  position: relative; overflow: hidden;
  padding: 74px 0 64px;
  border-bottom: 1px solid var(--border);
}
#pipeline-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.85; z-index: 0;
}
html[data-theme="light"] #pipeline-canvas { opacity: 0.35; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 44px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--cyan-dim); color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
  margin-bottom: 18px;
}
.eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hero h1 {
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-soft);
  max-width: 600px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted);
}
.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }
.hero-badges b { color: var(--emerald); font-family: var(--font-mono); }

/* Hero Visual Card */
.hero-visual {
  position: relative;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(155deg, rgba(0, 229, 255, 0.16), rgba(139, 92, 246, 0.14) 55%, rgba(17, 24, 48, 0.9));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.hero-visual img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.floating-hud {
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.hud-pill {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(7, 9, 19, 0.84); color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.hud-pill small { display: block; font-size: 11px; color: #94a3b8; font-family: var(--font-mono); }
.hud-pill b { font-family: var(--font-mono); font-size: 15px; color: #00e5ff; }

/* Live Stats Ribbon */
.telemetry-bar {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.telemetry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.t-metric {
  display: flex; flex-direction: column; gap: 2px;
  padding-left: 16px; border-left: 2px solid var(--cyan);
}
.t-metric:nth-child(2) { border-left-color: var(--violet); }
.t-metric:nth-child(3) { border-left-color: var(--emerald); }
.t-metric:nth-child(4) { border-left-color: var(--amber); }
.t-metric b { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; }
.t-metric span { font-size: 13px; color: var(--muted); }

/* Sections */
.sec { padding: 78px 0; border-bottom: 1px solid var(--border); }
.sec.alt { background: var(--bg-elev); }
.sec-head { max-width: 720px; margin-bottom: 42px; }
.sec-head h2 { font-size: clamp(27px, 3.3vw, 40px); margin-bottom: 12px; }
.sec-head p { font-size: 17px; color: var(--muted); }

/* Interactive API Playground */
.playground {
  background: #080c1a;
  color: #e2e8f0;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.pg-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; background: #0d1328; border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.pg-dots { display: flex; align-items: center; gap: 7px; }
.pg-dots i { width: 11px; height: 11px; border-radius: 50%; background: #f43f5e; display: inline-block; }
.pg-dots i:nth-child(2) { background: #f59e0b; }
.pg-dots i:nth-child(3) { background: #10b981; }
.pg-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-tabs button {
  padding: 6px 13px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: #94a3b8; font-family: var(--font-mono); font-size: 12.5px; cursor: pointer;
}
.pg-tabs button.on { background: rgba(0, 229, 255, 0.14); color: #00e5ff; border-color: rgba(0, 229, 255, 0.35); }
.pg-body { display: grid; grid-template-columns: 1.1fr 0.9fr; }
.pg-code-pane { padding: 20px; border-right: 1px solid rgba(148, 163, 184, 0.14); display: flex; flex-direction: column; gap: 14px; }
.pg-code-pane pre {
  margin: 0; font-size: 13px; line-height: 1.62; color: #e2e8f0; overflow-x: auto; flex: 1;
}
.pg-out-pane { padding: 20px; background: #050813; display: flex; flex-direction: column; gap: 12px; }
.pg-log {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
  display: flex; flex-direction: column; gap: 6px; min-height: 220px;
}
.pg-step {
  padding: 6px 10px; border-radius: 7px; background: rgba(148, 163, 184, 0.06);
  border-left: 2px solid #00e5ff; animation: fadeSlide .26s ease both;
}
.pg-step.ok { border-left-color: #10b981; color: #a7f3d0; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 3D Tilt Bento Grid */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.bento-card {
  grid-column: span 4;
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .22s, box-shadow .22s, transform .18s ease-out;
  transform-style: preserve-3d;
}
.bento-card.wide { grid-column: span 6; }
.bento-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.bento-card img {
  width: 100%; height: 190px; object-fit: cover; border-radius: 11px;
  border: 1px solid var(--border);
}
.bento-card h3 { font-size: 21px; margin: 0; }
.bento-card p { color: var(--muted); font-size: 14.5px; }
.bento-kicker {
  font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--cyan); font-weight: 600;
}

/* Interactive Architecture Blueprint */
.arch-box {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: stretch;
}
.arch-steps { display: flex; flex-direction: column; gap: 10px; }
.arch-btn {
  text-align: left; padding: 16px 18px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: border-color .18s, background .18s, transform .16s;
}
.arch-btn small { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); margin-bottom: 4px; }
.arch-btn b { display: block; font-family: var(--font-display); font-size: 17px; margin-bottom: 4px; }
.arch-btn span { font-size: 13.5px; color: var(--muted); display: block; }
.arch-btn.on {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan-dim), var(--violet-dim));
  transform: translateX(4px);
}
.arch-stage-panel {
  background: #080c1a; color: #f1f5f9; border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.arch-svg { width: 100%; height: auto; max-height: 150px; }
.arch-node { transition: stroke .25s, fill .25s; }
.arch-node.active { stroke: #00e5ff !important; filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5)); }
.arch-beam { stroke-dasharray: 8 8; animation: dashFlow 1.1s linear infinite; }
.paused .arch-beam { animation-play-state: paused; }
@keyframes dashFlow { to { stroke-dashoffset: -32; } }

/* Morphing Raw-to-Clean Diff */
.morph-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.morph-arrow {
  width: 48px; height: 48px; border-radius: 50%; background: var(--grad-brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; box-shadow: 0 0 24px rgba(0, 229, 255, 0.4);
}

/* Pricing & Docs */
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.plan-card.featured {
  border-color: var(--cyan);
  box-shadow: 0 18px 50px rgba(0, 229, 255, 0.14);
  position: relative;
}
.plan-price { font-family: var(--font-display); font-size: 38px; font-weight: 700; }
.plan-price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: var(--text-soft); flex: 1; }
.plan-list li::before { content: "✓ "; color: var(--emerald); font-weight: 700; }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px;
}
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 16.5px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--cyan); font-size: 20px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--muted); font-size: 14.5px; }

/* Prose & Docs Pages */
.doc-hero { padding: 54px 0 38px; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.doc-hero h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding: 44px 0 76px; }
.doc-toc { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.doc-toc a { padding: 6px 10px; border-radius: 7px; color: var(--muted); }
.doc-toc a:hover { color: var(--cyan); background: var(--cyan-dim); }
.prose h2 { font-size: 24px; margin-top: 34px; margin-bottom: 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin-top: 24px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 20px; }

/* Scroll Reveal Choreography */
html.fx-on .rv {
  opacity: 0; transform: translateY(20px);
  transition: opacity .52s cubic-bezier(.22,1,.36,1) var(--rv-d, 0ms),
              transform .52s cubic-bezier(.22,1,.36,1) var(--rv-d, 0ms);
}
html.fx-on .rv.in { opacity: 1; transform: none; }

/* Footer */
footer.foot {
  background: var(--bg-elev); border-top: 1px solid var(--border); padding: 56px 0 32px;
}
.foot-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-bottom: 38px;
  border-bottom: 1px solid var(--border);
}
.foot-cols h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text); margin-bottom: 12px; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); }
.foot-cols a:hover { color: var(--cyan); }
.foot-bar {
  padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot-bar ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 960px) {
  header.nav .links, header.nav .right, header.nav > .wrap > .nav-search { display: none; }
  .burger { display: inline-flex; margin-left: auto; }
  .hero-grid, .pg-body, .arch-box, .morph-grid, .doc-layout { grid-template-columns: 1fr; }
  .telemetry-grid, .foot-cols { grid-template-columns: repeat(2, 1fr); }
  .bento-card, .bento-card.wide { grid-column: span 12; }
  .morph-arrow { margin-inline: auto; transform: rotate(90deg); }
  .doc-toc { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .telemetry-grid, .foot-cols, .floating-hud { grid-template-columns: 1fr; }
}
