/* ============================================================
   EVO — style.css
   Light lab theme. White base, blue tints, warm specimen.
   ============================================================ */

:root {
  --bg: #f7fafd;
  --panel: #ffffff;
  --tint: #eef4fb;
  --tint-2: #e2edf9;
  --line: #dde8f4;
  --line-strong: #bcd4ec;

  --blue: #2f7bd9;
  --blue-deep: #1d5eb8;
  --text: #0f2138;
  --muted: #54708c;
  --faint: #607080; /* darkened from #90a7bf to clear WCAG AA on all backgrounds */
  --green: #12a877;
  --amber: #d9931f;
  /* AA-contrast text variants of the above (green/amber fail 4.5:1 as text on
     the near-white backgrounds). Use for data text; keep --green/--amber for
     dots, lights and strokes. */
  --green-text: #0b7d58;
  --amber-text: #9c6300;

  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Space Grotesk", system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* visually hidden but exposed to assistive tech (evolution announcements) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint blueprint grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(47, 123, 217, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 123, 217, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }

a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow { max-width: 760px; }

.accent { color: var(--blue); }

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 168, 119, 0.15);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #3b8ae6 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 123, 217, 0.28);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(47, 123, 217, 0.4); }

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--tint); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

/* lifts off the content once you start scrolling */
.nav.is-scrolled { box-shadow: 0 4px 16px rgba(29, 94, 184, 0.11); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand:hover { text-decoration: none; }

.brand-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.brand-label b { color: var(--text); font-weight: 600; }
.brand-sub { color: var(--faint); }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* X / Twitter icon button */
.nav-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  transition: background 0.15s ease;
}
.nav-x:hover { background: var(--tint); text-decoration: none; }
.nav-x svg { width: 15px; height: 15px; }

/* ---- mobile nav ---- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--tint); }

.nav-toggle span {
  position: relative;
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: background 0.15s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease;
}
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after { top: 5.5px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5.5px) rotate(-45deg); }

.nav-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.nav-panel.is-open { display: block; }

.nav-panel a {
  display: block;
  padding: 13px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.nav-panel a:last-child { border-bottom: 0; }
.nav-panel a:hover { color: var(--text); text-decoration: none; }

/* ============ Hero ============ */
.hero { padding: 52px 0 32px; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--tint);
  border: 1px solid var(--line-strong);
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.pill .led { background: var(--blue); box-shadow: 0 0 0 3px rgba(47, 123, 217, 0.15); }

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  font-weight: 700;
  max-width: 760px;
  margin: 0 auto 18px;
}

.lead {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 620px;
  margin: 0 auto 26px;
}
.lead strong { color: var(--blue-deep); font-weight: 600; }

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

.ca-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.ca-chip {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-copy {
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ca-copy:hover { background: var(--tint); }

/* ============ Observation chamber ============ */
/* A horizontal glass cylinder: elliptical ends + banded shading across
   the vertical axis so it reads as round rather than as a flat panel. */
.chamber-section { padding: 12px 0 8px; }

.chamber { padding: 0 20px; }

/* The tube itself clips everything to the cylinder silhouette, so the
   metal caps take on the curved ends instead of floating outside them. */
.tube {
  position: relative;
  z-index: 1;
  height: 500px;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 170px / 50%;
  overflow: hidden;
  border: 1px solid rgba(150, 190, 235, 0.8);
  box-shadow: 0 30px 50px -6px rgba(29, 80, 150, 0.28);
}

/* metal stand — grounds the tube like lab equipment instead of a floating
   band. Feet tuck behind the tube's curved base (tube has z-index 1). */
.tube-stand {
  position: relative;
  z-index: 0;
  max-width: 1280px;
  height: 30px;
  margin: -14px auto 0;
}

.foot {
  position: absolute;
  top: 0;
  width: 94px;
  height: 28px;
  background: linear-gradient(180deg, #eef4fa 0%, #c9d9ea 42%, #a3b9d3 100%);
  border: 1px solid #a3b9d3;
  border-top: none;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  box-shadow: 0 10px 16px -8px rgba(29, 80, 150, 0.4);
}
.foot.l { left: 15%; }
.foot.r { right: 15%; }

.tube-glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* specular highlight band near the top of the cylinder */
    linear-gradient(180deg,
      transparent 4%,
      rgba(255, 255, 255, 0.78) 11%,
      rgba(255, 255, 255, 0.12) 25%,
      transparent 33%),
    /* body shading: darker at top/bottom edges = curvature */
    linear-gradient(180deg,
      rgba(118, 166, 220, 0.95) 0%,
      rgba(178, 214, 245, 0.7) 9%,
      rgba(216, 237, 252, 0.52) 30%,
      rgba(228, 244, 254, 0.46) 46%,
      rgba(196, 224, 249, 0.55) 68%,
      rgba(146, 190, 234, 0.8) 90%,
      rgba(104, 152, 210, 1) 100%);
  box-shadow:
    inset 0 26px 38px -20px rgba(255, 255, 255, 0.95),
    inset 0 -34px 50px -22px rgba(30, 80, 150, 0.5);
}

/* fluid floor plane — a deeper-blue band at the bottom of the glass the
   specimen visibly hovers above (z below the specimen). */
.tube-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(70, 120, 185, 0) 0%,
    rgba(58, 108, 175, 0.14) 42%,
    rgba(40, 88, 158, 0.4) 100%);
}

/* back-wall measurement ruler — quiet lab flavour that fills the empty
   mid-space and gives the specimen a sense of scale (behind it). */
.tube-ticks {
  position: absolute;
  top: 22%;
  bottom: 24%;
  left: calc(50% - 150px);
  width: 26px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.13;
  background:
    linear-gradient(90deg, var(--blue-deep) 0 1.5px, transparent 1.5px),
    repeating-linear-gradient(180deg, var(--blue-deep) 0 1.5px, transparent 1.5px 22px),
    repeating-linear-gradient(180deg, var(--blue-deep) 0 1.5px, transparent 1.5px 11px);
  background-size: 100% 100%, 13px 100%, 7px 100%;
  background-repeat: no-repeat, repeat-x, repeat-x;
}

/* Front glass — renders IN FRONT of the specimen (z above it) so the
   creature reads as sealed inside the cylinder, not pasted on top. */
.tube-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    /* diagonal sheen streak sweeping across the front face */
    linear-gradient(102deg,
      transparent 30%,
      rgba(255, 255, 255, 0.14) 43%,
      rgba(255, 255, 255, 0.05) 49%,
      transparent 56%),
    /* top specular band, passing in front of the specimen this time */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.12) 9%,
      transparent 20%);
  box-shadow:
    inset 0 34px 46px -26px rgba(255, 255, 255, 0.85),
    inset 0 -30px 46px -24px rgba(30, 80, 150, 0.4),
    inset 44px 0 60px -40px rgba(30, 80, 150, 0.35),
    inset -44px 0 60px -40px rgba(30, 80, 150, 0.35);
}

/* Metal end caps. Outer edge is clipped by the tube's elliptical
   silhouette; the inner edge is its own ellipse arc = the glass seam. */
.cap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 132px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    /* brushed-metal grain */
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 2px, transparent 2px 5px),
    /* same top/bottom curvature as the glass so the cap reads as round */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0) 24%,
      rgba(30, 70, 130, 0.22) 84%,
      rgba(30, 70, 130, 0.42) 100%),
    linear-gradient(90deg, #93abc8 0%, #eaf2fa 46%, #c3d5e8 74%, #8ea6c4 100%);
}

.c-left {
  left: 0;
  border-radius: 0 62px 62px 0 / 0 50% 50% 0;
  box-shadow:
    inset -3px 0 0 rgba(255, 255, 255, 0.75),
    inset -5px 0 0 rgba(120, 160, 205, 0.5),
    10px 0 22px -8px rgba(30, 70, 130, 0.4);
}

.c-right {
  right: 0;
  border-radius: 62px 0 0 62px / 50% 0 0 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 2px, transparent 2px 5px),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0) 24%,
      rgba(30, 70, 130, 0.22) 84%,
      rgba(30, 70, 130, 0.42) 100%),
    linear-gradient(270deg, #93abc8 0%, #eaf2fa 46%, #c3d5e8 74%, #8ea6c4 100%);
  box-shadow:
    inset 3px 0 0 rgba(255, 255, 255, 0.75),
    inset 5px 0 0 rgba(120, 160, 205, 0.5),
    -10px 0 22px -8px rgba(30, 70, 130, 0.4);
}

.cap-lights {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cap-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(47, 123, 217, 0.8);
}
.cap-light.g { background: var(--green); box-shadow: 0 0 8px rgba(18, 168, 119, 0.8); }

.scan {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  left: 30%;
  background: linear-gradient(180deg, transparent, rgba(47, 123, 217, 0.34), transparent);
  box-shadow: 0 0 16px rgba(47, 123, 217, 0.22);
  animation: scan 11s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scan {
  0%, 100% { left: 6%; }
  50% { left: 93%; }
}

.bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(47, 123, 217, 0.24);
  background: rgba(255, 255, 255, 0.45);
  animation: rise 13s linear infinite;
  pointer-events: none;
}

@keyframes rise {
  from { transform: translateY(0); opacity: 0.6; }
  to { transform: translateY(-310px); opacity: 0; }
}

/* Suspension drift: deliberately near-imperceptible (±3px over 9s).
   The specimen should read as held in fluid, not bouncing. */
.specimen {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  z-index: 2;
  animation: float 9s ease-in-out infinite;
}

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

/* soft contact shadow — now the ONLY ground shadow (the baked-in warm one
   was removed from the sprites), so it sits on the fluid floor band. */
.specimen-shadow {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: 220px;
  height: 20px;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(24, 74, 144, 0.36) 0%,
    rgba(24, 74, 144, 0.18) 45%,
    rgba(24, 74, 144, 0) 72%);
  animation: shadowBreathe 9s ease-in-out infinite;
}

/* shadow tightens fractionally as the specimen drifts up */
@keyframes shadowBreathe {
  0%, 100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.82; transform: translateX(-50%) scaleX(0.95); }
}

/* faint back-wall glow separating the specimen from the glass */
.specimen-halo {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  width: 450px;
  height: 410px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.2) 42%,
    rgba(255, 255, 255, 0) 70%);
}

.specimen img,
.specimen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* cool the warm sprite slightly so it belongs in the blue fluid, and
     throw a blue-tinted shadow onto the floor band. */
  filter: saturate(0.92) drop-shadow(0 20px 26px rgba(23, 70, 140, 0.32));
}

/* ---- readout instrument chips ---- */
.readout {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-family: var(--mono);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 249, 253, 0.86) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 9px 13px 10px;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow:
    0 6px 18px -8px rgba(29, 80, 150, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* status dot — a small live indicator per readout */
.ro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 123, 217, 0.14), 0 0 6px rgba(47, 123, 217, 0.55);
}
.ro-dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(18, 168, 119, 0.16), 0 0 6px rgba(18, 168, 119, 0.55); }
.ro-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(217, 147, 31, 0.16), 0 0 6px rgba(217, 147, 31, 0.55); }
.ro-dot.live, .ro-dot.ok { animation: pulse 2.4s ease-in-out infinite; }

.ro-lines { display: flex; flex-direction: column; gap: 4px; }
.ro-head {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
}
.ro-row { display: flex; align-items: baseline; gap: 7px; line-height: 1.05; }
.ro-k {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.ro-v {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
}
.ro-v.ok { color: var(--green-text); font-weight: 600; }
.ro-v.warn { color: var(--amber-text); font-weight: 600; }

/* kept clear of the cylinder's curved ends and the metal caps */
.ro-tl { top: 32px; left: 160px; }
.ro-tr { top: 32px; right: 160px; }
.ro-bl { bottom: 32px; left: 160px; }
.ro-br { bottom: 32px; right: 160px; }

.ekg { width: 74px; height: 26px; flex-shrink: 0; }
.readout .ekg { width: 48px; height: 15px; }
.ekg polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 360;
  animation: ekg var(--ekg-speed, 2.4s) linear infinite;
}

@keyframes ekg { to { stroke-dashoffset: 0; } }

.chamber-label {
  text-align: center;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--faint);
  text-transform: uppercase;
}

/* sound toggle — a small unit control under the chamber label */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 12px auto 0;
  padding: 7px 15px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px -6px rgba(29, 80, 150, 0.22);
  transition: background 0.15s ease, color 0.15s ease;
}
.sound-toggle:hover { background: var(--tint); }
.sound-toggle svg { width: 15px; height: 13px; flex-shrink: 0; }
.sound-toggle.is-off { color: var(--faint); }
.sound-toggle.is-off .st-waves { display: none; }

/* Readout chips relocated below the tube on phones (desktop keeps the
   in-glass corners; this row is display:none until <=720px). */
.tube-readout-row {
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tube-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 15px;
  box-shadow: 0 4px 12px -6px rgba(29, 80, 150, 0.22);
}
.tube-chip .ro-dot { margin-top: 0; }
.tube-chip .ekg { width: 44px; height: 16px; }

/* --- mutation event --- */
.evo-burst {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translate(-50%, 0) scale(0.4);
  width: 460px;
  height: 460px;
  z-index: 5;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(180, 220, 255, 0.6) 45%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.tube-glass.is-evolving .evo-burst {
  animation: evoBurst 1.1s ease-out forwards;
}

@keyframes evoBurst {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  30% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, 0) scale(1.7); }
}

.tube-glass.is-evolving .specimen img,
.tube-glass.is-evolving .specimen video {
  animation: evoWhiteout 1.1s ease-out;
}

@keyframes evoWhiteout {
  0% { filter: brightness(1); }
  30% { filter: brightness(5) saturate(0.15); }
  60% { filter: brightness(2); }
  100% { filter: brightness(1); }
}

/* ============ Telemetry console ============ */
.console-section { padding: 40px 0 10px; }

.console {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 26px 30px;
  position: relative;
  box-shadow: 0 12px 30px rgba(29, 94, 184, 0.06);
}

.console::before {
  content: "LIVE TELEMETRY";
  position: absolute;
  top: -8px;
  left: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--blue);
  background: var(--bg);
  padding: 0 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.stat { display: flex; flex-direction: column; gap: 6px; }

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.stat-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.cursor { animation: blink 1.1s steps(1) infinite; color: var(--blue); }

@keyframes blink { 50% { opacity: 0; } }

.bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--tint-2);
  border: 1px solid var(--line);
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d95ea, var(--blue-deep));
  box-shadow: 0 0 12px rgba(47, 123, 217, 0.45);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-note {
  margin-top: 11px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bar-note b { color: var(--blue-deep); }

/* ============ Sections ============ */
.section { padding: 76px 0; }

.section-alt {
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 42px;
}

.section-head .tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--blue);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-head p { color: var(--muted); font-size: 15.5px; }

/* ============ Specimen pods ============ */
.pods-container { position: relative; }

.pods {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px;
  scrollbar-width: thin;
}

.pod { text-align: center; scroll-snap-align: center; min-width: 0; }

.pod-tube {
  position: relative;
  height: 150px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--tint) 100%);
  box-shadow: 0 8px 20px rgba(29, 94, 184, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pod:hover .pod-tube { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(29, 94, 184, 0.12); }

.pod-tube::before,
.pod-tube::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  height: 6px;
  background: linear-gradient(180deg, #d3e1f0, #b6cbe2);
  border: 1px solid var(--line-strong);
}
.pod-tube::before { top: 0; border-radius: 0 0 4px 4px; }
.pod-tube::after { bottom: 0; border-radius: 4px 4px 0 0; }

.pod-tube img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.pod.is-current .pod-tube {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 123, 217, 0.14), 0 12px 26px rgba(29, 94, 184, 0.14);
}
.pod.is-current img { filter: drop-shadow(0 8px 16px rgba(217, 147, 31, 0.35)); }

.pod.is-locked img { filter: brightness(0) opacity(0.55); }

.pod-q {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 24px;
  color: var(--blue);
  opacity: 0.55;
}

.pod-id {
  margin-top: 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.pod-name { font-size: 13.5px; font-weight: 600; margin-top: 3px; }
.pod.is-locked .pod-name { color: var(--muted); }

.pod-status {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  margin-top: 3px;
}
.s-current { color: var(--blue-deep); }
.s-past { color: var(--green-text); }
.s-locked { color: var(--faint); }

/* ============ Evolution replays ============ */
.replays-wrap {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.replays-head { text-align: center; margin-bottom: 30px; }
.replays-head .tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--blue);
  margin-bottom: 10px;
}
.replays-head h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.replays-head p { color: var(--muted); font-size: 14.5px; }

.replays {
  display: grid;
  /* cap track growth so a single replay stays a card, not a 900px banner */
  grid-template-columns: repeat(auto-fit, minmax(210px, 260px));
  justify-content: center;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.replay-card { text-align: center; }

.replay-frame {
  position: relative;
  height: 200px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--tint) 60%, #d7e6f7 100%);
  box-shadow: 0 8px 22px -8px rgba(29, 80, 150, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* glass sheen + a faint floor to echo the main tube */
.replay-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 22%),
    linear-gradient(180deg, transparent 72%, rgba(40, 88, 158, 0.16) 100%);
}

.replay-frame img,
.replay-frame video {
  width: 74%;
  height: 74%;
  object-fit: contain;
  filter: saturate(0.94) drop-shadow(0 10px 14px rgba(23, 70, 140, 0.28));
}
/* Video is absolutely centered so it doesn't share the frame's flex row
   with the (still space-occupying) poster — otherwise it renders off-centre. */
.replay-frame video {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.replay-frame.is-playing img { visibility: hidden; }
.replay-frame.is-playing video { display: block; }
.replay-frame.is-playing .replay-play { opacity: 0; pointer-events: none; }

.replay-play {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(29, 80, 150, 0.4);
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.2s ease;
}
.replay-frame:hover .replay-play { transform: scale(1.08); background: #fff; }

/* play triangle */
.replay-play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--blue-deep);
  margin-left: 3px;
}
.replay-frame.is-ended .replay-play::before {
  /* becomes a small replay chevron feel — keep the triangle, it reads as "play again" */
}

.replay-meta {
  margin-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.replay-milestone {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}
.replay-name { font-size: 14px; font-weight: 600; }

/* ============ Cards ============ */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 28px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(29, 94, 184, 0.08); }

.card-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--blue);
  margin-bottom: 14px;
}

.card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ============ Tokenomics ============ */
.tokenomics {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 28px 20px;
}

.tok-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.tok-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--blue-deep);
}

.tok-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ============ Steps ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 26px 24px;
}

.step-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  border: 1px solid var(--line-strong);
  color: var(--blue-deep);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
}

.step h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ============ FAQ ============ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--blue);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  background: var(--panel);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
}

.brand-egg { width: 28px; height: 28px; }

.footer-tag {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 0;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }

.socials a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 0;
}
.socials a:hover { color: var(--text); text-decoration: none; }
.socials .soon { display: block; color: var(--faint); font-size: 13px; padding: 5px 0; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.disclaimer {
  max-width: 620px;
  font-size: 12.5px;
  color: var(--faint);
}

.copyright { font-size: 12.5px; color: var(--faint); white-space: nowrap; }

/* ============ Docs page ============ */
.docs-hero {
  padding: 56px 0 34px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.docs-hero .tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--blue);
  margin-bottom: 12px;
}

.docs-hero h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; margin-bottom: 12px; }
.docs-hero p { color: var(--muted); font-size: 16px; max-width: 640px; }

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  /* keep .container's 24px gutters — a padding shorthand here would
     override them and let the text touch the screen edges */
  padding: 44px 24px 96px;
}

.docs-toc {
  position: sticky;
  top: 92px;
}

.docs-toc .toc-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
  padding-left: 12px;
}

.docs-toc a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  padding: 6px 12px;
  border-left: 2px solid var(--line);
}
.docs-toc a:hover {
  color: var(--text);
  border-left-color: var(--blue);
  text-decoration: none;
}
.docs-toc a.active {
  color: var(--text);
  border-left-color: var(--blue);
  font-weight: 500;
}

/* min-width:0 lets this grid item shrink below its content's min-content
   width — without it the min-width'd table forces the page to overflow
   instead of scrolling inside .table-scroll */
.docs-content { max-width: 720px; min-width: 0; }

/* the global html{scroll-padding-top:84px} already offsets anchor jumps
   for the sticky nav — a scroll-margin here would STACK with it (84+92),
   dropping headings ~110px below the nav. Keep a small top-up only. */
.docs-content section { scroll-margin-top: 8px; }

.docs-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 46px 0 14px;
}
.docs-content section:first-child h2 { margin-top: 0; }

.docs-content h3 { font-size: 17px; font-weight: 600; margin: 26px 0 10px; }

.docs-content p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.docs-content strong { color: var(--text); font-weight: 600; }

.docs-content ul {
  margin: 0 0 14px 20px;
  color: var(--muted);
  font-size: 15px;
}
.docs-content li { margin-bottom: 6px; }

.docs-content code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
  color: var(--blue-deep);
}

.doc-callout {
  border: 1px solid var(--line-strong);
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  margin: 18px 0;
}
.doc-callout b { color: var(--text); }

/* tables can't wrap — let them scroll rather than blow out narrow screens */
.table-scroll {
  overflow-x: auto;
  margin: 18px 0 8px;
  scrollbar-width: thin;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}

.doc-table th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
}

.doc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.doc-table td:first-child { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

.t-classified { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--amber-text); }
.t-onfile { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--green-text); }
.t-nodata { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--faint); }

/* ============ Polish details ============ */
::selection { background: rgba(47, 123, 217, 0.2); }

.bar-note { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bar-sync { color: var(--faint); }

.section-link {
  display: block;
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  font-weight: 600;
}

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .docs-layout { grid-template-columns: 1fr; gap: 32px; padding-bottom: 72px; }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-toc .toc-title { display: none; }
  .docs-toc a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    background: var(--panel);
  }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tokenomics { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pods { grid-template-columns: repeat(7, 150px); }
  /* below 980 the tube narrows but the specimen stays large, so the
     in-glass corner chips would collide — relocate them to the row. */
  .ro-tl, .ro-tr, .ro-bl, .ro-br { display: none; }
  .tube-readout-row { display: flex; }
  .tube { height: 440px; border-radius: 130px / 50%; }
  .cap { width: 100px; }
  .c-left { border-radius: 0 46px 46px 0 / 0 50% 50% 0; }
  .c-right { border-radius: 46px 0 0 46px / 50% 0 0 50%; }
  .tube-floor { height: 84px; }
  .specimen { width: 300px; height: 300px; bottom: 72px; }
  .evo-burst { width: 400px; height: 400px; bottom: 72px; }
  .specimen-shadow { width: 196px; height: 17px; bottom: 56px; }
  .specimen-halo { width: 400px; height: 360px; bottom: 72px; }
}

/* Narrow tubes can't fit four corner chips without colliding —
   keep a clean diagonal: vitals top-right, species bottom-left.
   The hidden values (status, market cap) are all still in telemetry. */
/* Below 720px the specimen fills the tube — the corner readouts move out
   to the row below the tube (.tube-readout-row) so nothing collides. */
@media (max-width: 720px) {
  .chamber { padding: 0 12px; }
  /* tube a touch shorter here so the specimen reaches ~68% of its height
     while still clearing the caps on the narrow (portrait) tube. */
  .tube { height: 380px; border-radius: 90px / 50%; }
  .cap { width: 62px; }
  .c-left { border-radius: 0 26px 26px 0 / 0 50% 50% 0; }
  .c-right { border-radius: 26px 0 0 26px / 50% 0 0 50%; }
  .tube-floor { height: 74px; }
  .tube-ticks { display: none; }
  .specimen { width: 260px; height: 260px; bottom: 60px; }
  .evo-burst { width: 340px; height: 340px; bottom: 60px; }
  .specimen-shadow { width: 172px; height: 15px; bottom: 46px; }
  .specimen-halo { width: 336px; height: 306px; bottom: 60px; }
}

@media (max-width: 520px) {
  .section { padding: 58px 0; }
  .hero { padding: 40px 0 28px; }
  .console { padding: 22px 20px; }
  .stat-value { font-size: 19px; }
  .brand-sub { display: none; }
  .tube { height: 340px; border-radius: 60px / 50%; }
  .cap { width: 46px; }
  .foot { width: 70px; height: 24px; }
  .tube-floor { height: 62px; }
  .specimen { width: 230px; height: 230px; bottom: 52px; }
  .evo-burst { width: 300px; height: 300px; bottom: 52px; }
  .specimen-shadow { width: 152px; height: 13px; bottom: 40px; }
  .specimen-halo { width: 300px; height: 272px; bottom: 52px; }
  .chamber-label { font-size: 9px; letter-spacing: 0.14em; }
}
