@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --deep-water: #0a2a2f;
  --mid-water: #0d3d3f;
  --aurora-green: #00e5a0;
  --aurora-violet: #7b61ff;
  --aurora-rose: #ff6b9d;
  --glass: #c8f0e8;
  --body-text: #e0f4ef;
  --steel: #7b9fba;
  --surface-white: #ffffff;
}

/* Design trace: IntersectionObserver` to detect when the viewport enters the 40vh empty-water zones between panels. When triggered. Space Grotesk (geometric sans Space Grotesk" (Google Fonts. */

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--deep-water);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--body-text);
  font-family: "Space Grotesk", sans-serif;
  background: var(--deep-water);
  overflow-x: hidden;
}

.aurora-field {
  position: fixed;
  inset: 0;
  z-index: -5;
  background:
    radial-gradient(circle at 20% 8%, rgba(0, 229, 160, 0.42), transparent 32%),
    radial-gradient(circle at 78% 22%, rgba(123, 97, 255, 0.34), transparent 36%),
    radial-gradient(circle at 48% 78%, rgba(255, 107, 157, 0.18), transparent 35%),
    linear-gradient(180deg, #0d3d3f 0%, #0a2a2f 58%, #071c21 100%);
  background-size: 140% 140%, 160% 160%, 130% 130%, 100% 100%;
  animation: auroraDrift 60s ease-in-out infinite alternate;
}

.aurora-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(224, 244, 239, 0.12), transparent 42%),
    linear-gradient(180deg, transparent 0%, rgba(10, 42, 47, 0.26) 48%, rgba(10, 42, 47, 0.72) 100%);
  animation: coolDescent 45s ease-in-out infinite alternate;
}

.svg-defs,
.hidden-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fish-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.fish {
  position: absolute;
  width: 48px;
  height: auto;
  opacity: 0.07;
  will-change: transform;
  animation-timing-function: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  animation-iteration-count: infinite;
}

.fish-hero {
  width: 120px;
  top: 23vh;
  left: -140px;
  opacity: 0.38;
  filter: drop-shadow(0 0 30px rgba(0, 229, 160, 0.28));
  animation-name: heroFishDrift;
  animation-duration: 32s;
}

.fish-one { top: 18vh; left: -70px; animation-name: smallFishRight; animation-duration: 24s; }
.fish-two { top: 48vh; right: -80px; transform: scaleX(-1); animation-name: smallFishLeft; animation-duration: 39s; opacity: 0.05; }
.fish-three { top: 72vh; left: -90px; animation-name: smallFishRightLow; animation-duration: 45s; opacity: 0.045; width: 34px; }
.fish-four { top: 34vh; right: -100px; transform: scaleX(-1); animation-name: smallFishLeftHigh; animation-duration: 28s; opacity: 0.08; width: 62px; }

.aquarium {
  position: relative;
  min-height: 620vh;
  z-index: 1;
  transition: filter 0.12s steps(2);
}

.scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  scroll-margin-top: 20vh;
}

.surface {
  text-align: center;
  padding: 8vh 7vw;
}

.hero-orb {
  position: absolute;
  width: min(68vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.16), rgba(123, 97, 255, 0.08) 42%, transparent 70%);
  filter: blur(8px);
  animation: orbPulse 18s ease-in-out infinite;
}

.kicker,
.label {
  margin: 0 0 1.1rem;
  font-family: "Inconsolata", monospace;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

h1 {
  position: relative;
  margin: 0;
  font-family: "Bungee Shade", cursive;
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(115deg, #00e5a0, #7b61ff, #ff6b9d, #00e5a0);
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleHolo 10s ease-in-out infinite;
  text-shadow: 0 0 44px rgba(0, 229, 160, 0.18);
}

.pane {
  width: min(560px, calc(100vw - 44px));
  min-height: 0;
  max-height: 70vh;
  display: block;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(rgba(13, 61, 63, 0.52), rgba(10, 42, 47, 0.56)) padding-box,
    conic-gradient(from var(--border-angle), #00e5a0, #7b61ff, #ff6b9d, #00e5a0) border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: borderSpin 4s linear infinite, tidalSway 8s ease-in-out infinite;
  transition: transform 0.6s ease, box-shadow 0.4s ease, border-width 0.4s ease;
}

.pane:hover,
.pane.proximity-lift {
  border-width: 2px;
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 229, 160, 0.15), 0 26px 80px rgba(123, 97, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-width 0.4s ease;
}

.pane-left { margin-right: min(40px, 7vw); }
.pane-right { margin-left: min(40px, 7vw); }

.pane h2 {
  margin: 0 0 1rem;
  color: #c8f0e8;
  font-family: "Vollkorn", serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.15;
}

.pane p {
  margin: 0 0 1rem;
  color: #e0f4ef;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.85;
}

.pane p:last-child { margin-bottom: 0; }

.chopsticks {
  width: 64px;
  height: 36px;
  position: relative;
  margin-top: 1.5rem;
  opacity: 0.78;
}

.chopsticks span {
  position: absolute;
  top: 17px;
  left: 0;
  width: 64px;
  height: 2px;
  background: #7b9fba;
  transform: rotate(15deg);
  box-shadow: 0 0 10px rgba(123, 159, 186, 0.38);
}

.chopsticks span + span { transform: rotate(-15deg); }

.small-fish-glyph {
  width: 58px;
  opacity: 0.78;
  filter: drop-shadow(0 0 16px rgba(123, 97, 255, 0.32));
}

.small-fish-glyph.rose { filter: drop-shadow(0 0 16px rgba(255, 107, 157, 0.28)); }

.empty-water,
.glitch-zone {
  min-height: 40vh;
  position: relative;
}

.empty-water::after,
.glitch-zone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 120px;
  background: linear-gradient(transparent, rgba(200, 240, 232, 0.14), transparent);
  transform: translate(-50%, -50%) rotate(8deg);
}

.deep-shift { min-height: 55vh; }

.long { max-height: none; }

.ocean-floor {
  min-height: 80vh;
}

.floor-line {
  width: min(500px, 70vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 159, 186, 0.18), transparent);
  box-shadow: 0 0 60px rgba(0, 229, 160, 0.08);
}

.caustics {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: overlay;
}

body.glitch-pulse .aquarium {
  animation: rgbSplit 0.2s steps(4);
}

body.glitch-pulse h1,
body.glitch-pulse .pane h2,
body.glitch-pulse .pane p {
  text-shadow: 3px 0 #ff6b9d, -3px 0 #00e5a0;
}

@keyframes auroraDrift {
  0% { background-position: 0% 8%, 100% 10%, 42% 100%, 0 0; filter: hue-rotate(0deg); }
  33% { background-position: 62% 18%, 44% 58%, 70% 60%, 0 0; filter: hue-rotate(12deg); }
  66% { background-position: 18% 72%, 80% 40%, 10% 52%, 0 0; filter: hue-rotate(-9deg); }
  100% { background-position: 86% 24%, 16% 82%, 78% 18%, 0 0; filter: hue-rotate(6deg); }
}

@keyframes coolDescent {
  from { opacity: 0.8; transform: translateY(-2%); }
  to { opacity: 1; transform: translateY(2%); }
}

@keyframes titleHolo {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes orbPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.68; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes borderSpin { to { --border-angle: 360deg; } }

@keyframes tidalSway {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes heroFishDrift {
  0% { transform: translateX(0) translateY(0) rotate(-3deg); }
  42% { transform: translateX(calc(100vw + 160px)) translateY(10vh) rotate(2deg); }
  48% { transform: translateX(calc(100vw + 160px)) translateY(10vh) rotate(2deg); }
  100% { transform: translateX(0) translateY(0) rotate(-3deg); }
}

@keyframes smallFishRight {
  0%, 8% { transform: translateX(0) translateY(0); }
  70% { transform: translateX(calc(100vw + 130px)) translateY(12vh); }
  100% { transform: translateX(calc(100vw + 130px)) translateY(12vh); }
}

@keyframes smallFishRightLow {
  0% { transform: translateX(0) translateY(0) rotate(4deg); }
  55% { transform: translateX(calc(100vw + 150px)) translateY(-20vh) rotate(-2deg); }
  62% { transform: translateX(calc(100vw + 150px)) translateY(-20vh) rotate(-2deg); }
  100% { transform: translateX(0) translateY(0) rotate(4deg); }
}

@keyframes smallFishLeft {
  0%, 12% { transform: scaleX(-1) translateX(0) translateY(0); }
  74% { transform: scaleX(-1) translateX(calc(100vw + 140px)) translateY(-9vh); }
  100% { transform: scaleX(-1) translateX(calc(100vw + 140px)) translateY(-9vh); }
}

@keyframes smallFishLeftHigh {
  0% { transform: scaleX(-1) translateX(0) translateY(0); }
  48% { transform: scaleX(-1) translateX(calc(100vw + 160px)) translateY(18vh); }
  56% { transform: scaleX(-1) translateX(calc(100vw + 160px)) translateY(18vh); }
  100% { transform: scaleX(-1) translateX(0) translateY(0); }
}

@keyframes rgbSplit {
  0% { filter: hue-rotate(0deg); clip-path: inset(0 0 0 0); transform: translateX(0); }
  25% { filter: hue-rotate(90deg); clip-path: inset(12% 0 64% 0); transform: translateX(3px); }
  50% { filter: hue-rotate(-45deg); clip-path: inset(42% 0 20% 0); transform: translateX(-4px); }
  75% { filter: hue-rotate(90deg); clip-path: inset(72% 0 8% 0); transform: translateX(2px); }
  100% { filter: hue-rotate(0deg); clip-path: inset(0 0 0 0); transform: translateX(0); }
}

@media (max-width: 680px) {
  .pane-left,
  .pane-right { margin-left: 0; margin-right: 0; }
  .pane { max-height: none; }
  .fish-hero { width: 94px; }
}
