/* ============================================================
   Alchemist UI — cosmic glass
   Dark-mode-first glassmorphism over an infinite space backdrop.
   ============================================================ */

:root {
  --void: #04060e;
  --deep: #070b18;
  --ink: #e8edfb;
  --ink-soft: rgba(232, 237, 251, 0.68);
  --ink-faint: rgba(232, 237, 251, 0.42);

  --blue: #5b93ff;
  --blue-bright: #8ab6ff;
  --cyan: #7ce8ff;
  --violet: #9b7bff;

  --glass: rgba(146, 176, 255, 0.045);
  --glass-strong: rgba(150, 180, 255, 0.075);
  --edge: rgba(168, 196, 255, 0.14);
  --edge-bright: rgba(190, 214, 255, 0.28);

  --blur: 22px;
  --shell: min(1180px, 90vw);
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--void);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--void);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection {
  background: rgba(91, 147, 255, 0.32);
  color: #fff;
}

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid rgba(124, 232, 255, 0.75);
  outline-offset: 3px;
}

/* ---------- Cosmos backdrop ---------- */

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #101a3a 0%, rgba(8, 12, 26, 0) 60%),
    radial-gradient(90% 70% at 80% 110%, #0d1430 0%, rgba(6, 9, 20, 0) 55%),
    linear-gradient(180deg, #05070f 0%, #070b18 45%, #04060e 100%);
}

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.nebula-a {
  width: 46vw;
  height: 46vw;
  top: -8vw;
  left: -6vw;
  background: radial-gradient(circle, rgba(63, 108, 255, 0.5), rgba(63, 108, 255, 0) 68%);
}

.nebula-b {
  width: 40vw;
  height: 40vw;
  top: 42%;
  right: -10vw;
  background: radial-gradient(circle, rgba(155, 123, 255, 0.4), rgba(155, 123, 255, 0) 68%);
}

.nebula-c {
  width: 52vw;
  height: 34vw;
  bottom: -10vw;
  left: 18vw;
  background: radial-gradient(circle, rgba(124, 232, 255, 0.22), rgba(124, 232, 255, 0) 70%);
}

.horizon {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -32vh;
  height: 60vh;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(91, 147, 255, 0.16), rgba(4, 6, 14, 0) 70%);
  filter: blur(2px);
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Scroll rail ---------- */

.scroll-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 60;
  background: rgba(168, 196, 255, 0.08);
}

.scroll-rail-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 12px rgba(124, 232, 255, 0.7);
  transform-origin: left center;
}

/* ---------- Nav ---------- */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(6, 10, 22, 0.42);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(168, 196, 255, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #dcebff, var(--blue) 62%);
  box-shadow: 0 0 14px rgba(91, 147, 255, 0.9);
  animation: breathe 4.5s var(--ease) infinite;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
}

.site-nav a {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  transition: color 0.4s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transition: width 0.5s var(--ease);
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.45s var(--ease), box-shadow 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.nav-cta:hover {
  border-color: var(--edge-bright);
  box-shadow: 0 0 26px rgba(91, 147, 255, 0.28);
  transform: translateY(-1px);
}

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 1;
}

.act {
  position: relative;
  padding: clamp(110px, 16vh, 190px) clamp(20px, 5vw, 56px);
}

.act-inner {
  width: var(--shell);
  margin: 0 auto;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  color: #fff;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--blue-bright), var(--cyan) 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(91, 147, 255, 0.35));
}

h2 {
  font-size: clamp(1.9rem, 3.9vw, 3.15rem);
  color: #f2f6ff;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow-index {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: var(--glass);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--blue-bright);
}

.lede,
.act-lede {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 26px 0 0;
}

.act-note {
  margin: 26px 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(232, 237, 251, 0.5);
}

/* ---------- Buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.5s var(--ease), background 0.5s var(--ease);
}

.btn-glow {
  color: #030713;
  background: linear-gradient(135deg, #cfe2ff, var(--blue-bright) 45%, var(--cyan));
  box-shadow: 0 12px 44px rgba(91, 147, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 58px rgba(124, 232, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-glass {
  color: var(--ink);
  background: var(--glass);
  border-color: var(--edge);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.btn-glass:hover {
  transform: translateY(-2px);
  border-color: var(--edge-bright);
  background: var(--glass-strong);
  box-shadow: 0 0 34px rgba(91, 147, 255, 0.22);
}

/* ---------- Act I — the orb ---------- */

.hero {
  min-height: calc(100svh - var(--bar-h, 66px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(28px, 5vh, 56px);
  padding-bottom: clamp(96px, 14vh, 132px);
}

.orb-stage {
  position: relative;
  width: min(clamp(168px, 21vw, 268px), 30svh);
  height: min(clamp(168px, 21vw, 268px), 30svh);
  display: grid;
  place-items: center;
  margin-bottom: clamp(14px, 2.4vw, 30px);
  pointer-events: none;
  will-change: transform;
}

.orb-stage > * {
  position: absolute;
  border-radius: 50%;
}

.orb-halo {
  inset: -40%;
  background: radial-gradient(
    circle,
    rgba(91, 147, 255, 0.46) 0%,
    rgba(124, 232, 255, 0.16) 32%,
    rgba(4, 6, 14, 0) 66%
  );
  filter: blur(22px);
  animation: halo 7s ease-in-out infinite;
}

.orb-ring {
  opacity: 0;
  pointer-events: none;
}

.ring-1 {
  inset: -8%;
  animation: spin 34s linear infinite, ring-breathe 8s ease-in-out infinite;
  border-top-color: rgba(124, 232, 255, 0.22);
  border-radius: 48% 52% 49% 51% / 51% 48% 52% 49%;
}

.ring-2 {
  inset: -22%;
  border-style: dashed;
  border-color: rgba(168, 196, 255, 0.05);
  animation: spin 62s linear infinite reverse, ring-breathe 11s ease-in-out infinite reverse;
  border-radius: 52% 48% 51% 49% / 49% 52% 48% 51%;
}

/* soft underglow only — the living body is drawn on the canvas */
.orb-core {
  inset: 22%;
  overflow: visible;
  background: radial-gradient(
    circle closest-side,
    rgba(140, 190, 255, 0.28) 0%,
    rgba(80, 130, 230, 0.12) 48%,
    transparent 78%
  );
  border-radius: 60% 40% 58% 42% / 46% 56% 44% 54%;
  animation: breathe 5.2s var(--ease) infinite, blob-morph 9s ease-in-out infinite;
  will-change: border-radius, transform;
}

/* drifting plasma cells inside the body — the motion that makes it feel alive */
.orb-plasma {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.plasma-a {
  width: 58%;
  height: 52%;
  top: 8%;
  left: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(124, 232, 255, 0.45) 40%, transparent 72%);
  border-radius: 62% 38% 55% 45% / 42% 58% 42% 58%;
  animation: plasma-drift-a 5.8s ease-in-out infinite;
}

.plasma-b {
  width: 50%;
  height: 54%;
  top: 34%;
  right: 4%;
  background: radial-gradient(circle, rgba(190, 170, 255, 0.7) 0%, rgba(91, 147, 255, 0.35) 46%, transparent 74%);
  border-radius: 40% 60% 48% 52% / 58% 40% 60% 42%;
  animation: plasma-drift-b 7.2s ease-in-out infinite;
}

.plasma-c {
  width: 44%;
  height: 40%;
  bottom: 10%;
  left: 28%;
  background: radial-gradient(circle, rgba(124, 232, 255, 0.65) 0%, rgba(90, 140, 255, 0.28) 48%, transparent 72%);
  border-radius: 48% 52% 38% 62% / 55% 45% 58% 42%;
  animation: plasma-drift-c 4.8s ease-in-out infinite;
}

/* slow counter-drifting vapour inside the body */
.orb-wisp {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.wisp-a {
  background: conic-gradient(
    from 0deg,
    rgba(124, 232, 255, 0) 0deg,
    rgba(124, 232, 255, 0.55) 58deg,
    rgba(124, 232, 255, 0) 132deg,
    rgba(155, 123, 255, 0.45) 224deg,
    rgba(124, 232, 255, 0) 306deg
  );
  animation: spin 21s linear infinite, breathe 9s var(--ease) infinite;
}

.wisp-b {
  background: conic-gradient(
    from 140deg,
    rgba(180, 212, 255, 0) 0deg,
    rgba(180, 212, 255, 0.42) 74deg,
    rgba(180, 212, 255, 0) 158deg,
    rgba(124, 232, 255, 0.34) 246deg,
    rgba(180, 212, 255, 0) 332deg
  );
  animation: spin 33s linear infinite reverse;
}

.orb-sheen {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(124, 232, 255, 0) 0deg,
    rgba(124, 232, 255, 0.34) 70deg,
    rgba(155, 123, 255, 0.26) 160deg,
    rgba(124, 232, 255, 0) 260deg
  );
  filter: blur(16px);
  animation: spin 18s linear infinite;
}

/* living orb body drawn on canvas */
.orb-smoke {
  top: -78%;
  left: -78%;
  right: auto;
  bottom: auto;
  width: 256%;
  height: 256%;
  border-radius: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.orb-shadowlight {
  inset: -60%;
  background: radial-gradient(circle, rgba(91, 147, 255, 0.14), rgba(4, 6, 14, 0) 62%);
  filter: blur(40px);
  animation: halo 11s ease-in-out infinite reverse;
}

.hero-copy {
  position: relative;
  width: min(880px, 94vw);
}

.hero-copy .eyebrow {
  margin-bottom: 16px;
}

.hero-copy .lede {
  margin-top: 22px;
}

.hero-copy .cta-row {
  margin-top: 32px;
}

.hero-copy .lede {
  margin-inline: auto;
}

.hero-copy .cta-row {
  justify-content: center;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(28px, 6vh, 54px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-faint);
  transition: color 0.5s var(--ease);
}

.scroll-cue:hover {
  color: var(--ink);
}

.scroll-cue-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, rgba(168, 196, 255, 0), rgba(168, 196, 255, 0.55));
  overflow: hidden;
  position: relative;
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--cyan));
  animation: trickle 2.6s var(--ease) infinite;
}

.scroll-cue-arrow {
  width: 9px;
  height: 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: bob 2.6s var(--ease) infinite;
}

.scroll-cue-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* ---------- Acts II & III — specimens ---------- */

.still .act-inner {
  display: grid;
  gap: clamp(48px, 7vw, 88px);
}

.specimen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 26px);
}

.specimen {
  position: relative;
  margin: 0;
  padding: 24px 22px 28px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--edge);
  background: linear-gradient(155deg, rgba(150, 180, 255, 0.08), rgba(120, 150, 220, 0.02));
  backdrop-filter: blur(var(--blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(130%);
  box-shadow: 0 24px 60px rgba(2, 5, 14, 0.55), inset 0 1px 0 rgba(226, 240, 255, 0.12);
}

.specimen-tag {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(198, 218, 255, 0.16);
}

.bar-block {
  height: 46px;
  border-radius: 12px;
  background: rgba(198, 218, 255, 0.09);
}

.w-45 { width: 45%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-95 { width: 95%; }

/* still specimens read as literally identical, and dimmed */
.still .specimen {
  opacity: 0.62;
  filter: saturate(0.35);
}

/* living specimens breathe and rearrange */
.alive .specimen {
  border-color: rgba(190, 214, 255, 0.22);
  box-shadow: 0 28px 70px rgba(2, 5, 14, 0.6), inset 0 1px 0 rgba(226, 240, 255, 0.18),
    0 0 44px rgba(91, 147, 255, 0.1);
}

.alive .specimen:nth-child(2) { transform: translateY(-18px); }
.alive .specimen:nth-child(3) { transform: translateY(8px); }

.alive .bar {
  background: linear-gradient(90deg, rgba(124, 232, 255, 0.42), rgba(155, 123, 255, 0.16));
  animation: morph 7s var(--ease) infinite;
}

.alive .bar.shift-a { width: 82%; animation-delay: 0s; }
.alive .bar.shift-b { width: 54%; animation-delay: 0.8s; }
.alive .bar.shift-c { width: 92%; animation-delay: 1.6s; }
.alive .bar.shift-d { width: 38%; animation-delay: 2.4s; }

.alive .bar-block.glow {
  width: 100%;
  background: linear-gradient(135deg, rgba(91, 147, 255, 0.34), rgba(124, 232, 255, 0.12));
  box-shadow: inset 0 0 30px rgba(124, 232, 255, 0.22);
  animation: breathe 6s var(--ease) infinite;
}

.specimen-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  top: -120px;
  background: linear-gradient(180deg, rgba(124, 232, 255, 0), rgba(124, 232, 255, 0.12), rgba(124, 232, 255, 0));
  animation: scan 6.5s var(--ease) infinite;
}

.alive .specimen:nth-child(2) .specimen-scan { animation-delay: 2.1s; }
.alive .specimen:nth-child(3) .specimen-scan { animation-delay: 4.2s; }

.living-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 86px);
}

.living-inner .specimen-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.living-inner .specimen {
  padding: 18px 14px 22px;
  min-height: 260px;
}

.living-points {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.living-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--ink-soft);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(168, 196, 255, 0.09);
  background: rgba(146, 176, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.living-points li:hover {
  border-color: var(--edge-bright);
  background: var(--glass-strong);
  transform: translateX(4px);
}

.point-glyph {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(124, 232, 255, 0.9);
}

.constellation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.node {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(226, 240, 255, 0.9);
  box-shadow: 0 0 14px rgba(124, 232, 255, 0.8);
  animation: twinkle 5s ease-in-out infinite;
}

.n1 { top: 14%; left: 8%; }
.n2 { top: 28%; right: 12%; animation-delay: 1.1s; }
.n3 { bottom: 22%; left: 16%; animation-delay: 2.2s; }
.n4 { bottom: 12%; right: 22%; animation-delay: 3.3s; }
.n5 { top: 52%; left: 46%; animation-delay: 4s; }

/* ---------- Act IV — the invitation ---------- */

.enter {
  display: grid;
  place-items: center;
  min-height: 100svh;
}

.enter-orb {
  position: absolute;
  width: min(clamp(420px, 60vw, 820px), 92vw);
  height: min(clamp(420px, 60vw, 820px), 92vw);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 147, 255, 0.22) 0%,
    rgba(155, 123, 255, 0.1) 38%,
    rgba(4, 6, 14, 0) 68%
  );
  filter: blur(30px);
  animation: halo 9s ease-in-out infinite;
  will-change: transform;
}

.enter-panel {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(34px, 5vw, 62px);
  border-radius: 28px;
  border: 1px solid var(--edge);
  background: linear-gradient(155deg, rgba(150, 180, 255, 0.095), rgba(110, 140, 210, 0.025));
  backdrop-filter: blur(30px) saturate(140%);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  box-shadow: 0 40px 110px rgba(2, 5, 14, 0.7), inset 0 1px 0 rgba(226, 240, 255, 0.18);
  text-align: center;
}

.enter-panel .eyebrow {
  justify-content: center;
}

.enter-lede {
  margin: 24px auto 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.enter-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  text-align: left;
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(168, 196, 255, 0.14);
  background: rgba(6, 10, 24, 0.5);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 300;
  resize: vertical;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease),
    background 0.4s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(232, 237, 251, 0.26);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(124, 232, 255, 0.5);
  background: rgba(10, 16, 34, 0.66);
  box-shadow: 0 0 0 4px rgba(91, 147, 255, 0.12), 0 0 28px rgba(124, 232, 255, 0.18);
}

.enter-form .btn {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 6px;
  min-width: 240px;
}

.enter-form-status {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--cyan);
}

.enter-form-status[data-kind="error"] {
  color: #ff9db1;
}

.enter-note {
  margin: 22px 0 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* ---------- Footer ---------- */

.site-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 40px clamp(20px, 5vw, 56px) 56px;
  border-top: 1px solid rgba(168, 196, 255, 0.08);
  background: rgba(4, 6, 14, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-foot p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

.site-foot .copy {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---------- Reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* keep the living specimens' staggered offsets after reveal */
.alive.is-in .specimen:nth-child(2) { transform: translateY(-18px); }
.alive.is-in .specimen:nth-child(3) { transform: translateY(8px); }

/* ---------- Motion ---------- */

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.94; }
  50% { transform: scale(1.045); opacity: 1; }
}

@keyframes blob-morph {
  0%, 100% {
    border-radius: 54% 46% 52% 48% / 48% 52% 48% 52%;
  }
  25% {
    border-radius: 48% 52% 46% 54% / 52% 48% 54% 46%;
  }
  50% {
    border-radius: 52% 48% 55% 45% / 46% 54% 48% 52%;
  }
  75% {
    border-radius: 46% 54% 50% 50% / 54% 46% 52% 48%;
  }
}

@keyframes plasma-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 62% 38% 55% 45% / 42% 58% 42% 58%; }
  33% { transform: translate(22%, 16%) scale(1.18); border-radius: 42% 58% 48% 52% / 60% 40% 58% 42%; }
  66% { transform: translate(-14%, 28%) scale(0.88); border-radius: 55% 45% 38% 62% / 40% 60% 45% 55%; }
}

@keyframes plasma-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 40% 60% 48% 52% / 58% 40% 60% 42%; }
  40% { transform: translate(-28%, -18%) scale(1.2); border-radius: 60% 40% 55% 45% / 40% 60% 42% 58%; }
  70% { transform: translate(12%, 24%) scale(0.85); border-radius: 48% 52% 40% 60% / 55% 45% 55% 45%; }
}

@keyframes plasma-drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(18%, -26%) scale(1.28); opacity: 1; }
}

@keyframes ring-breathe {
  0%, 100% { border-radius: 48% 52% 49% 51% / 51% 48% 52% 49%; }
  50% { border-radius: 52% 48% 51% 49% / 48% 52% 49% 51%; }
}

@keyframes halo {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-out {
  0% { transform: scale(0.86); opacity: 0.55; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.6; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

@keyframes trickle {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes morph {
  0%, 100% { transform: scaleX(1); opacity: 0.85; }
  50% { transform: scaleX(0.72); opacity: 1; }
}

@keyframes scan {
  0% { top: -120px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.bar { transform-origin: left center; }

/* ---------- Responsive ---------- */

@media (max-height: 800px) and (min-width: 700px) {
  .hero h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  }

  .hero .lede {
    font-size: 1rem;
    margin-top: 18px;
  }

  .hero .cta-row {
    margin-top: 26px;
  }

  .hero {
    padding-bottom: 92px;
  }
}

@media (max-width: 940px) {
  .living-inner {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 620px) {
  /* the three visitors stay side by side — the comparison is the point */
  .specimen-grid,
  .living-inner .specimen-grid {
    gap: 8px;
  }

  .specimen,
  .living-inner .specimen {
    padding: 14px 10px 16px;
    min-height: 168px;
    gap: 9px;
    border-radius: 14px;
  }

  .specimen-tag {
    font-size: 0.48rem;
    letter-spacing: 0.14em;
  }

  .bar {
    height: 7px;
  }

  .bar-block {
    height: 34px;
  }

  .alive .specimen:nth-child(2),
  .alive.is-in .specimen:nth-child(2) {
    transform: translateY(-10px);
  }

  .alive .specimen:nth-child(3),
  .alive.is-in .specimen:nth-child(3) {
    transform: translateY(5px);
  }

  .enter-form {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .orb-core {
    border-radius: 54% 46% 52% 48% / 50% 52% 48% 50%;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
