/* ─── 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.07) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 70%,
      rgba(181, 156, 255, 0.05) 0%,
      transparent 60%
    );
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(151, 190, 181, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 190, 181, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.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-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: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.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);
}

.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: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

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

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

.hero-stat .val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal);
}

.hero-stat .lbl {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.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.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--muted);
}

.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;
  }
}

/* ─── 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-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s,
    transform 0.2s;
  position: relative;
}

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

.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);
  align-self: flex-end;
  transition: transform 0.2s;
}

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

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