/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e2e8f0;
  background: #0b1120;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.nav-brand img { border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.nav-links a { opacity: 0.7; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: none; color: #e2e8f0; font-size: 1.4rem; cursor: pointer; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; transition: all 0.2s;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #fff; border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.35); }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  color: #e2e8f0;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); box-shadow: none; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 100px 24px 60px;
}
.hero-glow {
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(34,211,238,0.12) 0%, rgba(59,130,246,0.06) 40%, transparent 70%);
  pointer-events: none;
}
.hero-split {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.hero-mark { border-radius: 14px; margin-bottom: 20px; filter: drop-shadow(0 0 30px rgba(34,211,238,0.3)); }
.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 18px;
}
.hero-gradient {
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: 1.1rem; opacity: 0.6; margin-bottom: 28px; line-height: 1.7; max-width: 440px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-platforms {
  margin-top: 20px; font-size: 0.82rem; opacity: 0.35; letter-spacing: 0.02em;
}

/* Hero Visual (right side) */
.hero-visual {
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 1;
  margin: 0 auto;
}
.hero-visual::before {
  content: ''; position: absolute; inset: -20%;
  background: radial-gradient(circle, rgba(34,211,238,0.12) 0%, rgba(59,130,246,0.06) 40%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Treemap blocks */
.hero-treemap {
  position: absolute; inset: 5%; z-index: 2;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(15,23,42,0.8);
  box-shadow: 0 24px 80px -15px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05),
              0 0 80px -20px rgba(34,211,238,0.15);
}
.tm {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  background: var(--c); opacity: 0; border-radius: 5px;
  animation: tmIn 0.5s ease both; animation-delay: var(--d);
}
@keyframes tmIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 0.9; transform: scale(1); } }

/* Rings overlay */
.hero-ring-wrap {
  position: absolute; inset: -10%; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.55;
}
.hero-rings { width: 120%; height: 120%; }

/* View badges */
.hero-badges {
  position: absolute; inset: -6%; z-index: 3; pointer-events: none;
}
.hero-badge {
  position: absolute; padding: 6px 14px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(11,17,32,0.9); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px); opacity: 0; white-space: nowrap;
  animation: badgeIn 0.4s ease both;
}
.badge-rings    { top: 2%;  right: 5%;  --bd:#34d399; animation-delay: 2.0s; }
.badge-treemap  { top: 15%; left: -4%;  --bd:#60a5fa; animation-delay: 2.2s; }
.badge-bubbles  { bottom: 30%; right: -6%; --bd:#a78bfa; animation-delay: 2.4s; }
.badge-pie      { bottom: 5%; left: 5%;  --bd:#fbbf24; animation-delay: 2.6s; }
.badge-timeline { top: 40%; right: -8%;  --bd:#f87171; animation-delay: 2.8s; }
.badge-hist     { bottom: 18%; right: 5%; --bd:#22d3ee; animation-delay: 3.0s; }
.badge-table    { bottom: -2%; left: 35%; --bd:#c084fc; animation-delay: 3.2s; }
.hero-badge { border-color: var(--bd); color: var(--bd); }
@keyframes badgeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 0.9; transform: translateY(0); } }

/* ── Sections ─────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: rgba(255,255,255,0.02); }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; opacity: 0.6; max-width: 560px; margin: 0 auto 56px; font-size: 1.05rem; }

/* ── Features Grid ────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 32px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.3); }
.feature-icon { font-size: 2rem; margin-bottom: 16px; display: block; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; opacity: 0.65; line-height: 1.6; }

/* ── Viz Showcase ─────────────────────────────────── */
.viz-showcase { max-width: 720px; margin: 0 auto; }
.viz-stage {
  position: relative; width: 100%; aspect-ratio: 4/3;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(0,0,0,0.4);
}
.viz-scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.6s ease;
  pointer-events: none;
}
.viz-scene.active { opacity: 1; pointer-events: auto; }
.viz-svg { width: 70%; height: 70%; }

/* Viz Controls */
.viz-controls {
  display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap;
}
.viz-pill {
  padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #9aa3b2;
  font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: all 0.25s;
}
.viz-pill:hover { border-color: rgba(59,130,246,0.4); color: #e2e8f0; }
.viz-pill.active {
  background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(59,130,246,0.15));
  border-color: rgba(34,211,238,0.5); color: #22d3ee;
}
.viz-pill.active::after {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: #22d3ee; border-radius: 50%; margin-left: 8px; vertical-align: middle;
  animation: vizPulse 2s ease infinite;
}
@keyframes vizPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.viz-desc {
  text-align: center; color: #9aa3b2; font-size: 0.95rem; margin-top: 16px;
  min-height: 48px; transition: opacity 0.3s;
}

/* Treemap scene */
.viz-tm-wrap { position: absolute; inset: 6%; }
.viz-tm {
  position: absolute; background: var(--c); border-radius: 6px; opacity: 0.85;
  transition: transform 0.3s; cursor: default;
}
.viz-scene.active .viz-tm:hover { transform: scale(1.04); opacity: 1; }

/* Bubbles scene */
.viz-bub-wrap { position: absolute; inset: 6%; }
.viz-bub {
  position: absolute; width: var(--s); aspect-ratio: 1;
  background: var(--c); border-radius: 50%; opacity: 0.75;
  animation: vizFloat 4s ease-in-out infinite alternate;
}
.viz-bub:nth-child(2) { animation-delay: 0.5s; }
.viz-bub:nth-child(3) { animation-delay: 1s; }
.viz-bub:nth-child(4) { animation-delay: 1.5s; }
.viz-bub:nth-child(5) { animation-delay: 2s; }
.viz-bub:nth-child(6) { animation-delay: 2.5s; }
.viz-bub:nth-child(7) { animation-delay: 3s; }
@keyframes vizFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* Table scene */
.viz-table-wrap { position: absolute; inset: 8% 6%; display: flex; flex-direction: column; gap: 2px; }
.viz-tbl-header {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px;
  font-size: 0.7rem; color: #9aa3b2; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.viz-tbl-row {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center;
}
.viz-tbl-bar {
  display: block; height: 6px; width: var(--w); background: var(--c);
  border-radius: 3px; opacity: 0.7;
}

/* Histogram scene */
.viz-hist-wrap {
  position: absolute; inset: 10% 8%; display: flex; align-items: flex-end;
  gap: 5%; padding-bottom: 4%;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.viz-hist-bar {
  flex: 1; height: var(--h); border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, #3b82f6, #22d3ee); opacity: 0.8;
  transition: height 0.5s ease;
}

/* Timeline scene */
.viz-tl-wrap { position: absolute; inset: 10% 6%; }
.viz-tl-axis {
  position: absolute; bottom: 20%; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,0.1);
}
.viz-tl-point {
  position: absolute; width: var(--s); height: var(--s);
  background: var(--c); border-radius: 50%; opacity: 0.8;
  transform: translate(-50%, 50%);
  animation: vizFloat 3.5s ease-in-out infinite alternate;
}
.viz-tl-point:nth-child(3) { animation-delay: 0.4s; }
.viz-tl-point:nth-child(4) { animation-delay: 0.8s; }
.viz-tl-point:nth-child(5) { animation-delay: 1.2s; }
.viz-tl-point:nth-child(6) { animation-delay: 1.6s; }
.viz-tl-point:nth-child(7) { animation-delay: 2.0s; }
.viz-tl-point:nth-child(8) { animation-delay: 2.4s; }
.viz-tl-point:nth-child(9) { animation-delay: 2.8s; }
.viz-tl-label {
  position: absolute; bottom: 8%; font-size: 0.65rem; color: #9aa3b2; opacity: 0.5;
}

/* ── Tools Grid ───────────────────────────────────── */
.tools-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.tool-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px; padding: 24px;
  transition: border-color 0.2s;
}
.tool-item:hover { border-color: rgba(59,130,246,0.25); }
.tool-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.tool-item h3 { font-size: 1rem; margin-bottom: 4px; }
.tool-item p { font-size: 0.88rem; opacity: 0.55; }

/* ── Download ─────────────────────────────────────── */
.download-section { text-align: center; }
.download-logo { width: 80px; margin: 0 auto 24px; border-radius: 16px; }
.download-grid {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 24px;
}
.download-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 28px 40px;
  transition: all 0.2s; cursor: pointer;
}
.download-card:hover { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); transform: translateY(-2px); }
.dl-icon { font-size: 2rem; }
.dl-platform { font-weight: 700; font-size: 1.05rem; }
.dl-detail { font-size: 0.8rem; opacity: 0.5; }
.download-note { font-size: 0.85rem; opacity: 0.4; }
.link { text-decoration: underline; opacity: 0.7; }
.link:hover { opacity: 1; }

/* ── Footer ───────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.footer-brand img { border-radius: 4px; }
.footer-links { display: flex; gap: 20px; font-size: 0.88rem; opacity: 0.5; }
.footer-links a:hover { opacity: 1; }
.footer-copy { font-size: 0.8rem; opacity: 0.3; }

/* ── Sister Sites ─────────────────────────────────── */
.sister-sites {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 24px;
  display: flex; flex-direction: column; gap: 18px;
  align-items: center; text-align: center;
}
.sister-sites[data-show="false"] { display: none; }
.sister-label {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #9aa3b2; opacity: 0.7;
}
.sister-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px; width: 100%; max-width: 1120px;
}
.sister-list a {
  display: block; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: #9aa3b2;
  transition: border-color 0.2s, transform 0.15s, color 0.15s;
}
.sister-list a:hover {
  border-color: rgba(59,130,246,0.5); transform: translateY(-2px); color: #e2e8f0;
}
.sister-thumb { width: 100%; background: #05090b; padding: 6px; display: block; }
.sister-thumb img { display: block; width: 100%; height: auto; }
.sister-name { padding: 14px 16px; font-size: 14px; font-weight: 500; text-align: center; }
.sister-name span { opacity: 0.55; }

/* ── Download Modal ───────────────────────────────── */
.dl-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px); z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 20px; animation: dl-fade 0.18s ease-out;
}
.dl-modal.open { display: flex; }
@keyframes dl-fade { from { opacity: 0; } to { opacity: 1; } }
.dl-card {
  background: #0d1a2a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.dl-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 10px;
}
.dl-head h3 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.dl-close {
  background: none; border: 0; color: #9aa3b2; font-size: 28px;
  line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.dl-close:hover { color: #e2e8f0; background: rgba(255,255,255,0.06); }
.dl-body {
  padding: 4px 24px 22px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.dl-lede { margin: 0; color: #9aa3b2; font-size: 14px; }
.dl-version {
  font-size: 12px; color: #22d3ee;
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.28);
  padding: 6px 10px; border-radius: 999px; align-self: flex-start;
  font-family: ui-monospace, monospace;
}
.dl-status { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 500; }
.dl-status-loading {
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.3); color: #8ee5e5;
}
.dl-status-done {
  background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.45); color: #a9ece2;
}
.dl-rec-label {
  font-size: 11px; font-weight: 700; color: #22d3ee;
  letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px;
}
.dl-plat {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  color: #e2e8f0; font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.dl-plat:hover:not(:disabled) { border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.05); }
.dl-plat:disabled { opacity: 0.55; cursor: not-allowed; }
.dl-plat-highlight { border-color: rgba(59,130,246,0.55); background: linear-gradient(180deg, rgba(59,130,246,0.08), transparent); }
.dl-plat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.dl-plat-body { flex: 1; min-width: 0; }
.dl-plat-title { font-weight: 600; font-size: 15px; }
.dl-plat-accent { font-weight: 400; font-size: 12.5px; color: #22d3ee; margin-left: 4px; }
.dl-plat-sub { font-size: 13px; color: #9aa3b2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-plat-arrow { font-size: 18px; color: #9aa3b2; flex-shrink: 0; transition: transform 0.15s, color 0.15s; }
.dl-plat:hover:not(:disabled) .dl-plat-arrow { color: #e2e8f0; transform: translateX(3px); }
.dl-toggle {
  background: none; border: 0; color: #9aa3b2; font: inherit;
  font-size: 13px; padding: 6px 0; cursor: pointer; text-align: left;
  margin-top: 4px; transition: color 0.15s;
}
.dl-toggle:hover { color: #e2e8f0; }
.dl-others { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.dl-divider {
  font-size: 11px; color: #9aa3b2; text-align: center;
  text-transform: uppercase; letter-spacing: 0.1em; margin: 8px 0 2px;
  position: relative;
}
.dl-divider:before, .dl-divider:after {
  content: ""; position: absolute; top: 50%;
  width: calc(50% - 72px); height: 1px; background: rgba(255,255,255,0.1);
}
.dl-divider:before { left: 0; }
.dl-divider:after { right: 0; }
.dl-foot { margin: 10px 0 0; font-size: 12px; color: #9aa3b2; text-align: center; }
.dl-foot a { color: #22d3ee; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: rgba(11,17,32,0.95);
    padding: 24px; gap: 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { min-height: auto; padding: 100px 24px 60px; }
  .hero-split { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-text { align-items: center; }
  .hero-sub { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-platforms { text-align: center; }
  .hero-visual { max-width: 360px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 1.6rem; }
  .features-grid { grid-template-columns: 1fr; }
  .viz-controls { gap: 6px; }
  .viz-pill { padding: 6px 12px; font-size: 0.78rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .download-grid { flex-direction: column; align-items: center; }
  .sister-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; text-align: center; }
}
