/* ════════════════════════════════════════════════════════════════════════════
   Bioinflow — Website Stylesheet
   Design: Dark theme, teal/emerald accent, glassmorphism, smooth animations
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  --bg-0: #080d12;
  --bg-1: #0d1520;
  --bg-2: #111e2e;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-h: rgba(255, 255, 255, 0.065);

  --accent-1: #00e5b0;
  /* teal */
  --accent-2: #7c3aed;
  /* violet */
  --accent-g: linear-gradient(135deg, #00e5b0 0%, #0ea5e9 50%, #7c3aed 100%);

  --text-0: #f0f6ff;
  --text-1: #94a3b8;
  --text-2: #64748b;

  --border: rgba(255, 255, 255, 0.07);
  --border-h: rgba(0, 229, 176, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 80px rgba(0, 229, 176, 0.12);

  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-h: 68px;
  --max-w: 1140px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset / Base ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.container {
  width: min(100%, var(--max-w));
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ── Gradient text ─────────────────────────────────────────────────────────── */
.gradient-text {
  background: var(--accent-g);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background 0.18s, border-color 0.18s;
  white-space: nowrap;
  text-decoration: none;
}

.btn--lg {
  padding: 13px 28px;
  font-size: 1rem;
}

.btn--primary {
  background: var(--accent-1);
  color: #000;
  border-color: var(--accent-1);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 229, 176, 0.35);
}

.btn--outline {
  background: transparent;
  border-color: var(--border-h);
  color: var(--accent-1);
}

.btn--outline:hover {
  background: rgba(0, 229, 176, 0.08);
  transform: translateY(-2px);
}

.btn--ghost {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-0);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: var(--bg-card-h);
  transform: translateY(-2px);
}

/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(8, 13, 18, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.3px;
}

.logo-mark {
  font-size: 1.4rem;
  background: var(--accent-g);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav__links a {
  font-size: 0.9rem;
  color: var(--text-1);
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text-0);
}

.nav .btn--outline {
  margin-left: 8px;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-0);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.18;
}

.hero__glow--left {
  background: var(--accent-1);
  top: 10%;
  left: -200px;
}

.hero__glow--right {
  background: var(--accent-2);
  bottom: 0;
  right: -200px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: 80px 60px;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-h);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-1);
  background: rgba(0, 229, 176, 0.06);
  animation: fadeDown 0.6s var(--ease-out) both;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: pulse 2s infinite;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  max-width: 820px;
  animation: fadeUp 0.7s 0.1s var(--ease-out) both;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-1);
  max-width: 580px;
  animation: fadeUp 0.7s 0.2s var(--ease-out) both;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s 0.3s var(--ease-out) both;
}

/* ── Terminal ──────────────────────────────────────────────────────────────── */
.hero__terminal {
  width: min(100%, 680px);
  background: #0a1520;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: fadeUp 0.8s 0.4s var(--ease-out) both;
  text-align: left;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0d1b2a;
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red {
  background: #ff5f57;
}

.terminal__dot--yellow {
  background: #febc2e;
}

.terminal__dot--green {
  background: #28c840;
}

.terminal__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
  margin-left: 8px;
}

.terminal__body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  min-height: 100px;
}

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

.t-agent {
  color: var(--accent-1);
  font-weight: 600;
}

.t-dim {
  color: var(--text-2);
}

.t-cmd {
  color: var(--text-0);
}

.t-output {
  color: var(--text-1);
  font-size: 0.78rem;
  padding-left: 52px;
}

.t-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-1);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ── Hero scroll indicator ─────────────────────────────────────────────────── */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-2);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeIn 1s 1s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── Stats ─────────────────────────────────────────────────────────────────── */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  padding-block: 48px;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat__num {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--accent-g);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat__unit {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-1);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-1);
  text-align: center;
}

/* ── Section header ────────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-1);
  background: rgba(0, 229, 176, 0.08);
  border: 1px solid rgba(0, 229, 176, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-xl);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
}

.section-sub {
  color: var(--text-1);
  font-size: 1.05rem;
  max-width: 480px;
}

/* ── Features ──────────────────────────────────────────────────────────────── */
.features {
  padding-block: 100px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 176, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--wide {
  grid-column: span 2;
}

.feature-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-1);
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
}

.feature-card__tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 229, 176, 0.12);
  color: var(--accent-1);
  border: 1px solid rgba(0, 229, 176, 0.25);
  align-self: flex-start;
}

/* ── How it works ──────────────────────────────────────────────────────────── */
.how {
  padding-block: 100px;
  background: var(--bg-1);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: step;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  left: 34px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), rgba(0, 229, 176, 0.05));
}

.step {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding-block: 32px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

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

.step__number {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--accent-1);
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-1);
  box-shadow: 0 0 20px rgba(0, 229, 176, 0.15);
  z-index: 1;
}

.step__body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__body p {
  color: var(--text-1);
  max-width: 520px;
}

/* ── Download ──────────────────────────────────────────────────────────────── */
.download {
  padding-block: 120px;
}

.download__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 80px clamp(24px, 6vw, 80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.download__glow {
  position: absolute;
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0, 229, 176, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.download__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.8px;
}

.download__sub {
  color: var(--text-1);
  font-size: 1.05rem;
  max-width: 460px;
}

.download__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.download__note {
  font-size: 0.8rem;
  color: var(--text-2);
  margin-top: -8px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 36px;
}

.footer__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer__links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-1);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--accent-1);
}

.footer__copy {
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-2);
}

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes scrollPulse {
  0% {
    transform: scaleY(1);
    opacity: 0.6;
  }

  50% {
    transform: scaleY(0.5);
    opacity: 0.2;
  }

  100% {
    transform: scaleY(1);
    opacity: 0.6;
  }
}

/* ── Reveal animation (JS-driven) ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {

  .nav__links,
  .nav .btn--outline {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(8, 13, 18, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav__links.open .btn--outline {
    display: flex;
  }

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

  .feature-card--wide {
    grid-column: span 1;
  }

  .steps::before {
    display: none;
  }

  .footer__links {
    margin-left: 0;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}