/* ─── Reset & Variables ─────────────────────────────────────────── */
:root {
  --bg: #0a1116;
  --bg2: #111922;
  --surface: rgba(18, 26, 33, 0.92);
  --surface2: rgba(24, 34, 44, 0.9);
  --border: rgba(151, 190, 181, 0.1);
  --border-hover: rgba(88, 215, 255, 0.24);
  --text: #e9f0ec;
  --muted: #94a59f;
  --dim: #5a716b;
  --teal: #58d7ff;
  --teal2: #39b8d8;
  --green: #7bf0be;
  --orange: #ffbc72;
  --purple: #b59cff;
  --red: #ff8392;
  --nav-h: 64px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-accent: var(--teal);
}

body {
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 30%,
      rgba(88, 215, 255, 0.06),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 70%,
      rgba(181, 156, 255, 0.05),
      transparent
    ),
    radial-gradient(
      ellipse 50% 40% at 20% 80%,
      rgba(123, 240, 190, 0.04),
      transparent
    ),
    linear-gradient(180deg, #081016 0%, #0b141c 50%, #081015 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(88, 215, 255, 0.25);
}

/* ─── Scrollbar ──────────────────────────────────────────────────── */
/* ─── Navigation ─────────────────────────────────────────────────── */
.nav-brand .dot {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.nav-links a.active {
  color: var(--teal);
}

/* ─── Nav CTA button ─────────────────────────────────────────────── */
.nav-cta {
  background: var(--teal);
  color: #000 !important;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: opacity 0.2s !important;
}

.nav-cta:hover {
  opacity: 0.85;
  color: #000 !important;
}

/* ─── Hamburger button ───────────────────────────────────────────── */
/* ─── Mobile nav drawer ─────────────────────────────────────────── */
/* ─── Hero ───────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 30%,
      rgba(88, 215, 255, 0.035) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 70%,
      rgba(181, 156, 255, 0.025) 0%,
      transparent 60%
    );
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--accent-cyan, rgba(151,190,181,.3)) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-purple, rgba(151,190,181,.3)) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.18;
  animation: gridPan 26s linear infinite, gridPulse 7s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
  pointer-events: none;
  overflow: hidden;
  will-change: background-position, filter;
}
.grid-bg::before,
.grid-bg::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background-image:
    linear-gradient(var(--accent-pink, #ff2d95) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-mint, #22ffa7) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.1;
  animation: gridPan 42s linear infinite reverse, gridPulse 9s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: perspective(800px) rotateX(55deg) translateZ(-60px);
  transform-origin: 50% 100%;
}
.grid-bg::after {
  background-size: 160px 160px;
  animation-duration: 60s, 11s;
  opacity: 0.06;
  transform: perspective(800px) rotateX(55deg) translateZ(-20px) translateY(10%);
}
@keyframes gridPan {
  from { background-position: 0 0, 0 0; }
  to { background-position: 40px 40px, 40px 40px; }
}
@keyframes gridPulse {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(25deg) brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .grid-bg, .grid-bg::before, .grid-bg::after { animation: none !important; }
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 215, 255, 0.08);
  border: 1px solid rgba(88, 215, 255, 0.2);
  color: var(--teal);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: livePulse 2.4s ease infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title .grad {
  background: linear-gradient(
    135deg,
    var(--teal) 0%,
    var(--purple) 60%,
    var(--orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.htag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--mono);
  background: rgba(88, 215, 255, 0.08);
  border: 1px solid rgba(88, 215, 255, 0.15);
  color: var(--teal);
  letter-spacing: 0.03em;
  transition: background 0.2s, border-color 0.2s;
}

.htag:hover {
  background: rgba(88, 215, 255, 0.14);
  border-color: rgba(88, 215, 255, 0.3);
}

.htag.htag-green {
  background: rgba(123, 240, 190, 0.07);
  border-color: rgba(123, 240, 190, 0.18);
  color: var(--green);
}

.htag.htag-green:hover {
  background: rgba(123, 240, 190, 0.14);
  border-color: rgba(123, 240, 190, 0.32);
}

.htag.htag-purple {
  background: rgba(181, 156, 255, 0.07);
  border-color: rgba(181, 156, 255, 0.18);
  color: var(--purple);
}

.htag.htag-purple:hover {
  background: rgba(181, 156, 255, 0.14);
  border-color: rgba(181, 156, 255, 0.32);
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: #041016;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(88, 215, 255, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--teal);
  transform: translateY(-3px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 11px 16px;
  font-size: 0.84rem;
}

.btn-ghost:hover {
  color: var(--teal);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 0;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.hero-stat {
  flex: 1;
  padding: 18px 16px;
  text-align: center;
}

.hero-stat:not(:last-child) {
  border-right: 1px solid var(--border);
}

.hero-stat .val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.hero-stat .lbl {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dim);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg);
}

/* ─── Sections shared ────────────────────────────────────────────── */
section {
  padding: 100px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.divider {
  max-width: 1180px;
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border);
}

/* ─── Pipeline section ───────────────────────────────────────────── */
.pipeline-wrap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

.pipe-card {
  padding: 28px 20px;
  text-align: center;
  position: relative;
  transition: background 0.2s;
  cursor: default;
}

.pipe-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  font-size: 1rem;
  z-index: 1;
}

.pipe-card:hover {
  background: var(--surface2);
}

.pipe-card:not(:last-child) {
  border-right: 1px solid var(--border);
}

.pipe-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.pipe-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.pipe-sub {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.5;
}

.pipe-badge {
  display: inline-block;
  margin-top: 8px;
  background: rgba(57, 208, 240, 0.12);
  color: var(--teal);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-family: var(--mono);
}

/* ─── Results section ────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition:
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.metric-card .mval {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--teal) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-card .mlabel {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.metric-card .mdetail {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.chart-card h3 {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.card-body {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.card-ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid rgba(88, 215, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-left-color 0.2s, background 0.2s;
}

.mini-item:hover {
  border-left-color: var(--teal);
  background: rgba(88, 215, 255, 0.04);
}

.mini-item-title {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 5px;
  font-family: var(--mono);
}

.mini-item-desc {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.55;
}

.chart-wrap {
  position: relative;
  height: 220px;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 40px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-brand span {
  color: var(--teal);
}

.footer-note {
  color: var(--dim);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--teal);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  section {
    padding: 70px 20px;
  }

  .pipeline-wrap {
    grid-template-columns: 1fr 1fr;
  }

  .pipe-card:not(:last-child)::after {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .live-seq-grid,
  .live-seq-columns {
    grid-template-columns: 1fr;
  }

  .algo-panel.active {
    grid-template-columns: 1fr;
  }

  .module-row {
    grid-template-columns: 1fr;
  }

  .module-tags {
    justify-content: flex-start;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .hero-tags {
    gap: 6px;
  }

  .hero-stats {
    max-width: 100%;
  }

  .hero-stat .val {
    font-size: 1.05rem;
  }

  .hero-stat .lbl {
    font-size: 0.65rem;
  }
}

/* ─── Fade-in on scroll ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Explore Grid ── */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s,
    border-top-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  min-height: 0;
}

.explore-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.explore-icon {
  font-size: 1.6rem;
}

.explore-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.explore-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.explore-arrow {
  font-size: 1.1rem;
  color: var(--teal);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.explore-card:hover .explore-arrow {
  transform: translateX(4px);
}

.explore-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.explore-tag {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Category color variants */
.ec-bio { border-top: 2px solid rgba(88, 215, 255, 0.3); }
.ec-bio .explore-tag { background: rgba(88, 215, 255, 0.1); color: var(--teal); }
.ec-bio:hover { border-color: var(--teal); border-top-color: var(--teal); }

.ec-gene { border-top: 2px solid rgba(123, 240, 190, 0.3); }
.ec-gene .explore-tag { background: rgba(123, 240, 190, 0.1); color: var(--green); }
.ec-gene:hover { border-color: var(--green); border-top-color: var(--green); }

.ec-study { border-top: 2px solid rgba(255, 188, 114, 0.3); }
.ec-study .explore-tag { background: rgba(255, 188, 114, 0.1); color: var(--orange); }
.ec-study:hover { border-color: var(--orange); border-top-color: var(--orange); }

.ec-research { border-top: 2px solid rgba(181, 156, 255, 0.3); }
.ec-research .explore-tag { background: rgba(181, 156, 255, 0.1); color: var(--purple); }
.ec-research:hover { border-color: var(--purple); border-top-color: var(--purple); }

@media (max-width: 768px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
}
