:root {
  color-scheme: dark;
  --ink: #071024;
  --blue: #2448b4;
  --electric: #376dff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--ink); }

body {
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 88% 58% at 50% 112%, rgba(56, 126, 255, .98) 0%, rgba(42, 92, 202, .72) 32%, transparent 71%),
    linear-gradient(180deg, #071024 0%, #0c193c 41%, #244a9c 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.ambient {
  position: absolute;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  pointer-events: none;
  animation: breathe 8s ease-in-out infinite alternate;
}

.ambient--one { left: -17vw; bottom: -23vw; background: #4b9bff; }
.ambient--two { right: -22vw; top: 18%; background: #183da6; animation-delay: -3s; }

.fluid-stage {
  position: absolute;
  z-index: 1;
  top: 45%;
  left: 50%;
  width: min(88vw, 1280px);
  aspect-ratio: 1562 / 1007;
  transform: translate(-50%, -50%);
  touch-action: none;
  cursor: crosshair;
}

.hero-art-fallback,
#fluidCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#fluidCanvas {
  inset: -10%;
  width: 120%;
  height: 120%;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.fluid-ready .hero-art-fallback { visibility: hidden; }
.fluid-ready #fluidCanvas { opacity: 1; }

.interaction-hint {
  position: absolute;
  right: 3%;
  top: 16%;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: opacity .35s ease;
}

.interaction-hint span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eaff00;
  box-shadow: 0 0 14px #eaff00;
  animation: pulse 1.6s ease-out infinite;
}

.fluid-stage:hover .interaction-hint { opacity: 0; }

.dock {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(46px, 8vh, 72px);
  display: flex;
  gap: clamp(7px, 1.1vw, 16px);
  padding: clamp(7px, .9vw, 12px) clamp(12px, 1.4vw, 20px);
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(10,20,55,.3));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 15px 50px rgba(0,0,0,.32);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.dock a {
  width: clamp(48px, 5.2vw, 72px);
  aspect-ratio: 1;
  border-radius: 22%;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .25s ease;
  transform-origin: 50% 100%;
}

.dock a:hover, .dock a:focus-visible { transform: translateY(-13px) scale(1.16); filter: drop-shadow(0 12px 12px rgba(0,0,0,.3)); outline: none; }
.dock img { width: 100%; height: 100%; display: block; border-radius: inherit; }

@keyframes breathe { to { transform: translate3d(4vw, -2vw, 0) scale(1.12); opacity: .4; } }
@keyframes pulse { 70%, 100% { box-shadow: 0 0 0 14px rgba(234,255,0,0); } }

@media (max-width: 540px) {
  .fluid-stage { width: 108vw; top: 43%; }
  .interaction-hint { display: none; }
  .dock { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient, .interaction-hint span { animation: none; }
  .hero-art-fallback { visibility: visible !important; }
  #fluidCanvas { display: none; }
  .dock a { transition: none; }
}
