:root {
  /* Interface / Microcopy:** “Space Grotesk” readouts / Microcopy* Microcopy: Microcopy:: */
  --abyss: #061827;
  --carbon: #0B2A3D;
  --kelp: #0E6B78;
  --cyan: #4DE3FF;
  --mint: #8DFFB3;
  --coral: #FF5A7A;
  --foam: #EAFBFF;
  --void: #020910;
  --display: "Bangers", "Impact", fantasy;
  --bubble: "Baloo 2", "Arial Rounded MT Bold", cursive;
  --ui: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--foam);
  background: var(--void);
  font-family: var(--ui);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background:
    radial-gradient(circle at 20% 30%, rgba(77, 227, 255, .24), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(141, 255, 179, .16), transparent 28%),
    radial-gradient(circle at 46% 82%, rgba(255, 90, 122, .13), transparent 30%),
    linear-gradient(180deg, #061827 0%, #0B2A3D 42%, #020910 100%);
}

.bokeh-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  border-radius: 999px;
  opacity: .72;
  animation: drift 12s ease-in-out infinite alternate;
}

.haze { filter: blur(22px); mix-blend-mode: screen; }
.haze-a { width: 34vw; height: 34vw; left: -8vw; top: 8vh; background: rgba(77, 227, 255, .22); }
.haze-b { width: 28vw; height: 28vw; right: 4vw; top: 20vh; background: rgba(141, 255, 179, .15); animation-delay: -4s; }
.haze-c { width: 42vw; height: 42vw; left: 34vw; bottom: -15vw; background: rgba(14, 107, 120, .24); animation-delay: -8s; }
.speck { border: 2px solid rgba(234, 251, 255, .32); box-shadow: inset 0 0 20px rgba(77, 227, 255, .18); }
.speck-a { width: 86px; height: 86px; left: 70vw; top: 62vh; }
.speck-b { width: 38px; height: 38px; left: 14vw; top: 72vh; animation-delay: -3s; }
.speck-c { width: 120px; height: 120px; left: 42vw; top: 12vh; animation-delay: -6s; }

.dock-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(77, 227, 255, .28);
  border-radius: 999px;
  background: rgba(6, 24, 39, .54);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 0 3px rgba(255, 90, 122, .08), 0 16px 40px rgba(2, 9, 16, .45);
}

.dock-nav span,
.dock-nav a {
  color: var(--foam);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 999px;
}

.dock-nav span { color: var(--mint); }
.dock-nav a:hover { background: var(--coral); color: var(--void); }

.market-tank { position: relative; }

.scene {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 130px) clamp(18px, 5vw, 72px) 90px;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(234, 251, 255, .14) 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 80%, transparent);
  opacity: .16;
}

.ghost-grid {
  position: absolute;
  inset: 7vh 4vw 11vh;
  border-radius: 36px;
  opacity: .45;
  background:
    linear-gradient(rgba(77, 227, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 227, 255, .09) 1px, transparent 1px);
  background-size: 8.333% 15%;
  transform: rotate(-1.4deg);
}

.hero-mark {
  position: absolute;
  left: 13vw;
  top: 22vh;
  max-width: 75vw;
  z-index: 4;
}

.micro-stamp,
.signal-tile b,
.panel span {
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  color: var(--mint);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .018em;
  margin: 0;
  color: var(--foam);
  text-shadow:
    4px 4px 0 var(--coral),
    -4px -3px 0 var(--kelp),
    0 0 28px rgba(77, 227, 255, .46);
}

h1 {
  font-size: clamp(4rem, 16vw, 14rem);
  line-height: .78;
  transform: rotate(-3deg);
}

h1 span { display: block; color: var(--cyan); margin-left: clamp(18px, 8vw, 120px); }

h2 {
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: .82;
  position: relative;
  z-index: 3;
}

.updrips {
  display: flex;
  gap: 20px;
  margin-left: 11vw;
  transform: rotate(-3deg) scaleY(-1);
}

.updrips i {
  display: block;
  width: 15px;
  height: 80px;
  border-radius: 999px;
  background: linear-gradient(var(--coral), transparent);
  animation: drip 3s ease-in-out infinite;
}

.updrips i:nth-child(2) { height: 46px; background: linear-gradient(var(--cyan), transparent); animation-delay: -.7s; }
.updrips i:nth-child(3) { height: 105px; background: linear-gradient(var(--mint), transparent); animation-delay: -1.4s; }
.updrips i:nth-child(4) { height: 62px; animation-delay: -2.1s; }

.signal-rail {
  position: absolute;
  left: clamp(16px, 4vw, 52px);
  top: 18vh;
  z-index: 5;
  display: grid;
  gap: 18px;
  width: min(190px, 34vw);
}

.signal-tile,
.panel {
  position: relative;
  background:
    radial-gradient(circle at 80% 20%, rgba(77, 227, 255, .20), transparent 28%),
    linear-gradient(145deg, rgba(11, 42, 61, .88), rgba(6, 24, 39, .76));
  border: 3px solid var(--cyan);
  border-radius: 28px 44px 22px 52px;
  box-shadow: 7px 7px 0 rgba(255, 90, 122, .8), inset 0 0 30px rgba(2, 9, 16, .55);
}

.signal-tile {
  padding: 15px;
  min-height: 84px;
}

.signal-tile::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 8px -9px -8px 7px;
  border: 2px dashed rgba(141, 255, 179, .44);
  border-radius: inherit;
  z-index: -1;
}

.signal-tile span { display: block; font-family: var(--bubble); font-size: 20px; line-height: 1; margin-top: 8px; }
.rotate-left { transform: rotate(-5deg); }
.rotate-right { transform: rotate(4deg); }

.bubble-cluster {
  position: absolute;
  right: 5vw;
  top: 22vh;
  width: min(330px, 38vw);
  height: 430px;
  z-index: 6;
}

button { font: inherit; cursor: pointer; }

.instrument,
.ledger-bubble {
  position: absolute;
  border-radius: 50%;
  border: 5px solid var(--foam);
  color: var(--foam);
  background:
    radial-gradient(circle at 32% 24%, rgba(234, 251, 255, .88) 0 8%, transparent 9%),
    radial-gradient(circle at 45% 60%, rgba(77, 227, 255, .28), rgba(14, 107, 120, .82));
  box-shadow: 0 0 0 5px var(--coral), inset 0 0 40px rgba(2, 9, 16, .44), 0 22px 60px rgba(2, 9, 16, .5);
  font-family: var(--bubble);
  transition: transform .35s ease, box-shadow .35s ease;
}

.instrument { width: 190px; height: 190px; right: 75px; top: 0; }
.instrument.small { width: 132px; height: 132px; right: 0; top: 178px; }
.instrument.mint { width: 158px; height: 158px; right: 155px; top: 235px; background: radial-gradient(circle at 32% 24%, rgba(234, 251, 255, .9) 0 8%, transparent 9%), radial-gradient(circle at 52% 62%, rgba(141, 255, 179, .34), rgba(14, 107, 120, .84)); }
.instrument span,
.ledger-bubble em { display: block; color: var(--void); background: var(--mint); width: max-content; margin: 0 auto 4px; padding: 2px 9px; border-radius: 999px; font-family: var(--ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-style: normal; }
.instrument b { font-size: 30px; line-height: .9; display: block; }
.instrument.small b { font-size: 24px; }
.instrument:hover,
.ledger-bubble:hover { transform: scale(1.08) rotate(-3deg); box-shadow: 0 0 0 5px var(--mint), inset 0 0 45px rgba(2, 9, 16, .42), 0 0 45px rgba(77, 227, 255, .38); }

.tide-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 8;
  border-block: 2px solid rgba(77, 227, 255, .45);
  background: rgba(2, 9, 16, .58);
  overflow: hidden;
  transform: rotate(.8deg);
}

.ticker {
  width: max-content;
  padding: 14px 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 4rem);
  color: var(--cyan);
  text-shadow: 2px 2px 0 var(--coral);
  white-space: nowrap;
  animation: ticker 19s linear infinite;
}

.current-board { background: linear-gradient(180deg, rgba(6, 24, 39, .2), rgba(2, 9, 16, .42)); }
.current-board h2 { transform: rotate(2deg); }
.route-map,
.mini-route,
.surface-route {
  position: absolute;
  inset: 12vh 4vw auto;
  width: 92vw;
  height: 70vh;
  z-index: 1;
  overflow: visible;
}

.draw-route {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  filter: drop-shadow(0 0 10px rgba(77, 227, 255, .9));
}

.route-loop { stroke: var(--mint); stroke-width: 7; opacity: .76; }
.scene.in-view .draw-route { animation: drawPath 2.6s cubic-bezier(.2, .9, .1, 1) forwards; }
.scene.in-view .route-loop { animation-delay: .45s; }

.offer-panel {
  position: absolute;
  z-index: 4;
  width: min(285px, 40vw);
  padding: 22px;
}

.panel b { display: block; margin: 10px 0; font-family: var(--bubble); font-size: 31px; line-height: .95; color: var(--foam); }
.panel p { margin: 0; color: rgba(234, 251, 255, .74); line-height: 1.45; }
.p-one { left: 9vw; top: 47vh; transform: rotate(-6deg); }
.p-two { left: 32vw; top: 20vh; transform: rotate(4deg); }
.p-three { right: 22vw; top: 53vh; transform: rotate(-3deg); }
.p-four { right: 6vw; top: 24vh; transform: rotate(6deg); }

.bubble-ledger h2 { text-align: right; color: var(--cyan); }
.ledger-orbit {
  position: relative;
  z-index: 5;
  height: 65vh;
  min-height: 520px;
}

.ledger-bubble { padding: 30px; display: grid; place-content: center; text-align: center; }
.ledger-bubble b { font-size: clamp(1.7rem, 3.2vw, 3.5rem); line-height: .85; }
.ledger-bubble span { font-family: var(--ui); color: rgba(234, 251, 255, .76); margin-top: 8px; }
.ledger-bubble.cyan { width: 310px; height: 310px; left: 8vw; top: 9vh; }
.ledger-bubble.coral { width: 245px; height: 245px; left: 36vw; top: 30vh; border-color: var(--coral); }
.ledger-bubble.mint { width: 280px; height: 280px; right: 10vw; top: 4vh; border-color: var(--mint); }
.ledger-bubble.deep { width: 215px; height: 215px; right: 27vw; bottom: 2vh; border-color: var(--kelp); }
.mini-route { inset: auto 8vw 14vh; width: 82vw; height: 30vh; }
.mini-route .draw-route { stroke: var(--coral); stroke-width: 8; }

.night-surface {
  display: grid;
  place-items: center;
  text-align: center;
}

.night-surface h2 {
  font-size: clamp(5rem, 18vw, 16rem);
  color: var(--foam);
  animation: buoyPulse 2.6s ease-in-out infinite;
}

.surface-line {
  margin: -1vw 0 0;
  font-family: var(--bubble);
  font-size: clamp(1.5rem, 4vw, 4rem);
  color: var(--cyan);
}

.surface-route { inset: 17vh auto auto; width: min(1000px, 90vw); height: 52vh; opacity: .82; }
.surface-route .draw-route { stroke: var(--mint); }
.ascent-panels .panel {
  position: absolute;
  z-index: 2;
  padding: 18px 26px;
  font-family: var(--bubble);
  color: rgba(234, 251, 255, .66);
  animation: ascend 8s ease-in-out infinite alternate;
}
.ghost-a { left: 10vw; top: 24vh; transform: rotate(-8deg); }
.ghost-b { right: 11vw; top: 18vh; transform: rotate(7deg); animation-delay: -2s !important; }
.ghost-c { left: 24vw; bottom: 17vh; transform: rotate(4deg); animation-delay: -4s !important; }

.released-bubble {
  position: fixed;
  width: 14px;
  height: 14px;
  border: 2px solid var(--foam);
  border-radius: 50%;
  pointer-events: none;
  z-index: 40;
  background: rgba(77, 227, 255, .26);
  animation: release 1.4s ease-out forwards;
}

@keyframes drift {
  from { transform: translate3d(-1vw, 2vh, 0) scale(.94); }
  to { transform: translate3d(2vw, -4vh, 0) scale(1.08); }
}

@keyframes drip {
  50% { transform: translateY(18px) scaleY(.72); opacity: .62; }
}

@keyframes ticker { to { transform: translateX(-50%); } }

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

@keyframes buoyPulse {
  50% { transform: translateY(-12px) scale(1.03); text-shadow: 5px 5px 0 var(--coral), -4px -4px 0 var(--kelp), 0 0 42px rgba(141, 255, 179, .52); }
}

@keyframes ascend {
  to { transform: translateY(-38px) rotate(var(--tilt, 5deg)); opacity: .32; }
}

@keyframes release {
  to { transform: translate(var(--x), -110px) scale(.2); opacity: 0; }
}

@media (max-width: 820px) {
  .dock-nav { width: calc(100% - 24px); justify-content: center; flex-wrap: wrap; }
  .dock-nav a, .dock-nav span { font-size: 10px; padding: 6px 8px; }
  .hero-mark { left: 8vw; top: 28vh; }
  .signal-rail { top: 13vh; width: 86vw; grid-template-columns: repeat(2, 1fr); }
  .signal-tile { min-height: 72px; }
  .bubble-cluster { opacity: .72; right: -8vw; top: 52vh; transform: scale(.72); transform-origin: top right; }
  .offer-panel { width: 74vw; }
  .p-one { left: 8vw; top: 27vh; }
  .p-two { left: 18vw; top: 43vh; }
  .p-three { left: 7vw; right: auto; top: 61vh; }
  .p-four { right: 5vw; top: 76vh; }
  .current-board { min-height: 125vh; }
  .ledger-orbit { min-height: 720px; }
  .ledger-bubble.cyan { left: 4vw; top: 6vh; width: 240px; height: 240px; }
  .ledger-bubble.coral { left: auto; right: 4vw; top: 28vh; width: 205px; height: 205px; }
  .ledger-bubble.mint { right: auto; left: 10vw; top: 50vh; width: 230px; height: 230px; }
  .ledger-bubble.deep { right: 8vw; bottom: 0; width: 185px; height: 185px; }
}
