:root {
  --aero-pool: #7BE7FF;
  --bubble-mint: #9DFFD2;
  --deep-tank: #063B5A;
  --pearl-foam: #F4FFFB;
  --guppy-coral: #FF7A8A;
  --lilac: #B7A6FF;
  --glass: rgba(244, 255, 251, .34);
  --line: rgba(244, 255, 251, .58);
  --display: Fraunces, Georgia, 'Times New Roman', serif;
  --body: 'Nunito Sans', 'Trebuchet MS', system-ui, sans-serif;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --interaction-note: Interaction based;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--deep-tank);
  font-family: var(--body);
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.9), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(183,166,255,.55), transparent 28%),
    linear-gradient(150deg, var(--pearl-foam) 0%, var(--aero-pool) 52%, #50bde1 72%, var(--deep-tank) 100%);
}

.habitat {
  position: relative;
  min-height: 500vh;
  padding: 3.5vh 4vw;
}

.caustics {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  opacity: .38;
  background:
    repeating-radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.7) 0 1px, transparent 2px 34px),
    repeating-linear-gradient(112deg, transparent 0 36px, rgba(244,255,251,.22) 38px 41px, transparent 44px 82px);
  filter: blur(1px);
  animation: causticFlow 16s ease-in-out infinite alternate;
}

.tank-shell {
  position: sticky;
  top: 3.5vh;
  height: 93vh;
  overflow: hidden;
  border: 2px solid rgba(244,255,251,.72);
  border-radius: 48px 70px 54px 82px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.48), rgba(123,231,255,.2) 28%, rgba(6,59,90,.14) 100%),
    radial-gradient(circle at 60% 18%, rgba(157,255,210,.28), transparent 23%),
    radial-gradient(circle at 28% 72%, rgba(183,166,255,.28), transparent 30%);
  box-shadow:
    inset 0 0 48px rgba(255,255,255,.62),
    inset 0 -80px 90px rgba(6,59,90,.18),
    0 35px 95px rgba(6,59,90,.28);
  backdrop-filter: blur(18px) saturate(1.25);
}

.tank-glare {
  position: absolute;
  inset: 1.2rem auto auto 3.5rem;
  width: 38%;
  height: 84%;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255,255,255,.46), rgba(255,255,255,.08), transparent);
  transform: rotate(7deg);
  pointer-events: none;
}

.specimen-nav {
  position: absolute;
  z-index: 20;
  right: 2.2rem;
  top: 1.8rem;
  display: flex;
  gap: .55rem;
  padding: .42rem;
  border: 1px solid rgba(244,255,251,.65);
  border-radius: 999px;
  background: rgba(244,255,251,.25);
  box-shadow: inset 0 1px 14px rgba(255,255,255,.62), 0 8px 26px rgba(6,59,90,.16);
  backdrop-filter: blur(12px);
}

.nav-capsule, .tap-capsule, .specimen-cta, .aero-toggle {
  border: 1px solid rgba(244,255,251,.82);
  border-radius: 999px;
  color: var(--deep-tank);
  font: 700 .78rem var(--mono);
  letter-spacing: .04em;
  background: linear-gradient(180deg, rgba(255,255,255,.64), rgba(123,231,255,.24));
  box-shadow: inset 0 2px 8px rgba(255,255,255,.86), 0 8px 18px rgba(6,59,90,.13);
  cursor: pointer;
}

.nav-capsule { padding: .62rem .82rem; }
.nav-capsule.active, .aero-toggle.active {
  background: linear-gradient(180deg, var(--bubble-mint), rgba(157,255,210,.36));
  box-shadow: 0 0 24px rgba(157,255,210,.72), inset 0 2px 9px rgba(255,255,255,.9);
}

.tube-rail {
  position: absolute;
  z-index: 5;
  left: 3vw;
  top: 12vh;
  width: 78px;
  height: 72vh;
  border: 2px solid rgba(244,255,251,.58);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.35), rgba(123,231,255,.13));
  box-shadow: inset 0 0 28px rgba(255,255,255,.45);
}

.tube-bubble {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.9);
  background: radial-gradient(circle at 32% 26%, white 0 13%, rgba(123,231,255,.42) 15% 70%, rgba(183,166,255,.18));
  animation: tubeRise 7s linear infinite;
}
.b1 { animation-delay: 0s; }
.b2 { animation-delay: -1.9s; width: 16px; height: 16px; }
.b3 { animation-delay: -3.7s; width: 31px; height: 31px; }
.b4 { animation-delay: -5.2s; width: 12px; height: 12px; }

.meniscus {
  position: absolute;
  left: 8%;
  right: 6%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(244,255,251,.82), rgba(183,166,255,.62), transparent);
  box-shadow: 0 0 18px rgba(244,255,251,.52);
}
.m1 { top: 35%; }
.m2 { top: 67%; }

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(4%) scale(.985);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.16,1,.3,1), filter .9s ease;
  filter: blur(8px);
  pointer-events: none;
}
.scene.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.chamber-label, .suction-tag, .etched-copy {
  font-family: var(--mono);
  letter-spacing: .11em;
  font-size: .72rem;
  color: rgba(6,59,90,.72);
  border: 1px solid rgba(244,255,251,.72);
  background: rgba(244,255,251,.28);
  box-shadow: inset 0 1px 12px rgba(255,255,255,.62);
  backdrop-filter: blur(10px);
}

.chamber-label {
  position: absolute;
  left: 10vw;
  top: 2.4rem;
  padding: .58rem .9rem;
  border-radius: 999px;
}

.title-bubble {
  position: absolute;
  left: 20%;
  top: 16%;
  width: min(62vw, 760px);
  aspect-ratio: 1.72;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 56% 44% 52% 48% / 48% 54% 46% 52%;
  border: 2px solid rgba(244,255,251,.84);
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.9) 0 8%, transparent 10%),
    radial-gradient(circle at 70% 76%, rgba(183,166,255,.32), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.42), rgba(123,231,255,.2));
  box-shadow: inset 0 0 46px rgba(255,255,255,.74), 0 25px 80px rgba(6,59,90,.2), 0 0 60px rgba(157,255,210,.26);
  animation: floatBubble 6s ease-in-out infinite;
}

.bubble-shine {
  position: absolute;
  inset: 8% auto auto 13%;
  width: 27%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255,255,255,.68);
  filter: blur(7px);
  transform: rotate(-16deg);
}

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  color: var(--deep-tank);
}
h1 {
  font-size: clamp(4.8rem, 12vw, 11rem);
  letter-spacing: -.08em;
  line-height: .82;
  text-shadow: 0 2px 0 rgba(255,255,255,.8), 0 0 22px rgba(123,231,255,.85), 4px 10px 0 rgba(183,166,255,.18);
  filter: drop-shadow(0 16px 20px rgba(6,59,90,.12));
}
h2 { font-size: clamp(3.2rem, 8vw, 7.5rem); letter-spacing: -.055em; }

.subtitle {
  position: absolute;
  bottom: 18%;
  margin: 0;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font: 800 clamp(1rem, 1.7vw, 1.4rem) var(--body);
  background: rgba(244,255,251,.38);
}

.organism {
  position: absolute;
  left: 63%;
  top: 57%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, white 0 14%, var(--bubble-mint) 22% 60%, rgba(157,255,210,.15));
  box-shadow: 0 0 34px var(--bubble-mint), 0 0 70px rgba(123,231,255,.65);
  animation: organismSwim 5.8s ease-in-out infinite;
}
.organism i, .organism b {
  position: absolute;
  top: -15px;
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: var(--deep-tank);
  transform-origin: bottom;
}
.organism i { left: 9px; transform: rotate(-28deg); }
.organism b { right: 9px; transform: rotate(28deg); }

.glass-note {
  position: absolute;
  left: 15%;
  bottom: 13%;
  max-width: 420px;
  margin: 0;
  padding: 1rem 1.2rem;
  border-radius: 28px;
  background: rgba(244,255,251,.28);
  border: 1px solid rgba(244,255,251,.7);
  font-size: 1.08rem;
  line-height: 1.62;
  box-shadow: inset 0 1px 18px rgba(255,255,255,.68);
  backdrop-filter: blur(14px);
}

.tap-capsule { position: absolute; right: 15%; bottom: 18%; padding: 1rem 1.35rem; color: var(--deep-tank); }
.floating-island {
  position: absolute;
  max-width: 530px;
  padding: 2rem;
  border: 1px solid rgba(244,255,251,.75);
  border-radius: 42px 58px 46px 50px;
  background: linear-gradient(145deg, rgba(255,255,255,.5), rgba(123,231,255,.17));
  box-shadow: inset 0 1px 26px rgba(255,255,255,.72), 0 24px 70px rgba(6,59,90,.18);
  backdrop-filter: blur(18px);
}
.floating-island p { margin: 1rem 0 0; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.65; }
.listen-card { left: 53%; top: 27%; }
.train-card { left: 17%; top: 28%; }
.dream-card { right: 12%; top: 33%; }
.release-card { left: 18%; top: 25%; }

.current-loop {
  position: absolute;
  left: 13%;
  top: 23%;
  width: 52%;
  height: 48%;
  border-radius: 50%;
  border: 2px dashed rgba(244,255,251,.64);
  box-shadow: inset 0 0 38px rgba(123,231,255,.22);
  animation: currentPulse 7s ease-in-out infinite;
}
.plankton {
  position: absolute;
  padding: .62rem .86rem;
  border-radius: 999px;
  font: 800 .8rem var(--mono);
  background: rgba(157,255,210,.38);
  border: 1px solid rgba(244,255,251,.76);
  box-shadow: 0 0 20px rgba(157,255,210,.52), inset 0 1px 9px rgba(255,255,255,.8);
  animation: drift 8s ease-in-out infinite alternate;
}
.p1 { left: 7%; top: 22%; }
.p2 { right: 12%; top: 10%; animation-delay: -2s; }
.p3 { left: 34%; bottom: 8%; animation-delay: -4s; }
.p4 { right: 20%; bottom: 27%; animation-delay: -6s; }
.suction-tag { position: absolute; left: 14%; bottom: 18%; padding: .8rem 1rem; border-radius: 16px; }

.toggle-bank { position: absolute; right: 13%; top: 24%; display: grid; gap: .9rem; }
.aero-toggle { padding: 1rem 1.4rem; min-width: 118px; text-transform: uppercase; }
.pebble-bed {
  position: absolute;
  left: 9%; right: 9%; bottom: 7%; height: 19%;
  border-radius: 50% 50% 35px 35px;
  background: linear-gradient(180deg, transparent, rgba(6,59,90,.2));
}
.pebble-bed span {
  position: absolute;
  bottom: 14%;
  width: 78px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(183,166,255,.55), rgba(123,231,255,.35));
  border: 1px solid rgba(244,255,251,.55);
  box-shadow: inset 0 1px 10px rgba(255,255,255,.48);
}
.pebble-bed span:nth-child(1) { left: 9%; transform: rotate(-8deg); }
.pebble-bed span:nth-child(2) { left: 23%; width: 110px; }
.pebble-bed span:nth-child(3) { left: 41%; width: 64px; background: linear-gradient(145deg, rgba(255,122,138,.48), rgba(244,255,251,.35)); }
.pebble-bed span:nth-child(4) { right: 31%; width: 96px; }
.pebble-bed span:nth-child(5) { right: 17%; width: 70px; }
.pebble-bed span:nth-child(6) { right: 6%; width: 116px; }

.thought-eggs {
  position: absolute;
  left: 13%; top: 20%; width: 45%; height: 58%;
}
.thought-eggs span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 84px;
  height: 108px;
  border-radius: 50% 50% 45% 45%;
  color: var(--deep-tank);
  font: 900 1rem var(--mono);
  background: radial-gradient(circle at 30% 20%, white 0 11%, rgba(183,166,255,.56) 13% 64%, rgba(123,231,255,.18));
  border: 1px solid rgba(244,255,251,.72);
  box-shadow: 0 0 38px rgba(183,166,255,.45), inset 0 1px 18px rgba(255,255,255,.65);
  animation: eggFloat 6s ease-in-out infinite;
}
.thought-eggs span:nth-child(1) { left: 4%; top: 8%; }
.thought-eggs span:nth-child(2) { left: 38%; top: 0; animation-delay: -1s; }
.thought-eggs span:nth-child(3) { right: 14%; top: 25%; animation-delay: -2s; }
.thought-eggs span:nth-child(4) { left: 22%; bottom: 10%; animation-delay: -3s; }
.thought-eggs span:nth-child(5) { right: 24%; bottom: 2%; animation-delay: -4s; }
.etched-copy { position: absolute; left: 14%; bottom: 13%; padding: .9rem 1rem; border-radius: 12px; }

.release-bubbles {
  position: absolute;
  right: 12%; top: 20%; width: 34%; height: 58%;
}
.release-bubbles span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  text-align: center;
  padding: 1rem;
  font: 900 .85rem var(--mono);
  background: radial-gradient(circle at 31% 22%, white 0 10%, rgba(157,255,210,.34) 13% 70%, rgba(123,231,255,.16));
  border: 1px solid rgba(244,255,251,.8);
  box-shadow: inset 0 0 22px rgba(255,255,255,.76), 0 0 44px rgba(157,255,210,.35);
  animation: releaseRise 8s ease-in-out infinite;
}
.release-bubbles span:nth-child(1) { left: 3%; bottom: 4%; }
.release-bubbles span:nth-child(2) { right: 4%; top: 22%; animation-delay: -2.7s; }
.release-bubbles span:nth-child(3) { left: 23%; top: 0; animation-delay: -5.1s; }
.specimen-cta { position: absolute; left: 22%; bottom: 18%; padding: 1rem 1.35rem; background: linear-gradient(180deg, rgba(255,122,138,.86), rgba(255,122,138,.35)); }

.lens {
  position: absolute;
  z-index: 12;
  left: 58%;
  top: 40%;
  width: clamp(150px, 18vw, 250px);
  height: clamp(150px, 18vw, 250px);
  border-radius: 50%;
  border: 3px solid rgba(244,255,251,.82);
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.72), rgba(123,231,255,.17) 50%, rgba(183,166,255,.12));
  box-shadow: inset 0 0 28px rgba(255,255,255,.78), 0 18px 60px rgba(6,59,90,.2), 0 0 30px rgba(183,166,255,.32);
  backdrop-filter: blur(3px) saturate(1.4);
  mix-blend-mode: screen;
  transition: transform .9s cubic-bezier(.16,1,.3,1), left .9s cubic-bezier(.16,1,.3,1), top .9s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.lens::after {
  content: '';
  position: absolute;
  right: -56px;
  bottom: -26px;
  width: 88px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(244,255,251,.7), rgba(6,59,90,.28));
  transform: rotate(40deg);
}
.lens-label { position: absolute; left: 32%; bottom: 18%; font: 700 .68rem var(--mono); opacity: .62; }

.ripple-field { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(244,255,251,.86);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple .95s ease-out forwards;
  box-shadow: 0 0 18px rgba(123,231,255,.55);
}

body.tapped .reveal-line { animation: shimmerText 1.2s ease both; }

@keyframes causticFlow { to { transform: translate3d(4%, -3%, 0) rotate(2deg); } }
@keyframes tubeRise { from { top: 92%; transform: translateX(-50%) scale(.8); opacity: 0; } 15%,80% { opacity: 1; } to { top: 4%; transform: translateX(-50%) scale(1.2); opacity: 0; } }
@keyframes floatBubble { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-18px) rotate(1deg); } }
@keyframes organismSwim { 0%,100% { transform: translate(0,0); } 42% { transform: translate(22px,-16px); } 70% { transform: translate(-10px,8px); } }
@keyframes currentPulse { 50% { transform: rotate(5deg) scale(1.03); border-color: rgba(157,255,210,.72); } }
@keyframes drift { to { transform: translate(26px, -18px) rotate(4deg); } }
@keyframes eggFloat { 50% { transform: translateY(-18px) scale(1.04); filter: hue-rotate(18deg); } }
@keyframes releaseRise { 50% { transform: translateY(-28px) translateX(12px); } }
@keyframes ripple { to { width: 42vw; height: 42vw; opacity: 0; } }
@keyframes shimmerText { 0% { opacity: .25; filter: blur(8px); } 100% { opacity: 1; filter: blur(0); text-shadow: 0 0 18px var(--bubble-mint); } }

@media (max-width: 760px) {
  .habitat { padding: 1.5vh 2vw; }
  .tank-shell { top: 1.5vh; height: 97vh; border-radius: 32px; }
  .specimen-nav { right: 1rem; left: 1rem; overflow: auto; }
  .tube-rail { display: none; }
  .chamber-label { left: 1.1rem; top: 5.6rem; }
  .title-bubble { left: 7%; top: 20%; width: 86%; }
  .glass-note, .tap-capsule, .floating-island, .listen-card, .train-card, .dream-card, .release-card { left: 7%; right: 7%; top: auto; bottom: 11%; max-width: none; }
  .current-loop, .thought-eggs, .release-bubbles { left: 8%; width: 84%; top: 18%; }
  .toggle-bank { right: 7%; top: 18%; }
  .lens { width: 135px; height: 135px; }
}
