/* ============================================================
   DS Lab: room-specific design system
   A dark chemistry-bench base with a rising toxic-green glow.
   Loaded after ../ds-shared.css, which supplies the generic
   reset, nav/footer/button/form structure, and type scale.
   ============================================================ */

:root {
  --bg: #0a0f0c;
  --bg-elevated: #101711;
  --bg-card: #141c15;
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.14);
  --accent-border: rgba(74, 222, 128, 0.4);
  --cream: #eafbea;
  --text-primary: #eef5ee;
  --text-muted: rgba(238, 245, 238, 0.64);
  --text-faint: rgba(238, 245, 238, 0.62);
  --border: rgba(238, 245, 238, 0.1);
  --border-strong: rgba(238, 245, 238, 0.2);

  --shadow-accent: 0 3px 12px rgba(74, 222, 128, 0.28);
}

/* ============================================================
   Bubble drift: DS Lab's flourish (its answer to VideoArt's
   film light-leaks) — faint bubbles rising past the beaker
   ============================================================ */

.bubble-drift {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bubble-drift span {
  position: absolute;
  bottom: -10%;
  width: var(--size, 14px);
  height: var(--size, 14px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(74, 222, 128, 0.5), rgba(74, 222, 128, 0.05) 70%);
  border: 1px solid rgba(74, 222, 128, 0.25);
  animation: bubble-rise var(--dur, 14s) ease-in infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes bubble-rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-115vh) translateX(20px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble-drift span {
    animation: none;
    opacity: 0;
  }
}

/* ============================================================
   Hero flourish
   ============================================================ */

.rec-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 28px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: rec-pulse 1.6s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ============================================================
   Experiment grid
   ============================================================ */

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

.lab-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
}

.lab-card.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.lab-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.lab-card-media {
  aspect-ratio: 16/10;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft) 0%, var(--bg-card) 70%);
  position: relative;
  overflow: hidden;
}

.lab-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-strong);
  color: var(--cream);
}

.lab-badge.is-live {
  background: color-mix(in srgb, var(--accent) 25%, black);
  border-color: var(--accent);
  color: var(--accent);
}

.lab-card-body {
  padding: 22px;
}

.lab-card-body h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.lab-card-body p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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