/* =========================================================
JELLYFISH CAROUSEL
========================================================= */

/* ================= ROOT ================= */

:root {
  --night: #050715;
  --deep: #090c20;
  --purple: #171536;

  --white: #f7f8ff;
  --muted: #9da1bd;

  --accent: #d58cff;
  --aqua: #68d8ff;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;

  --max-width: 1250px;
}

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--night);
  color: var(--white);

  font-family: var(--sans);

  overflow-x: hidden;
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================= HEADER ================= */

.header {
  position: absolute;
  z-index: 100;

  top: 0;
  left: 0;

  width: 100%;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 32px 5vw;

  color: white;
}

.logo,
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo > span:last-child > span,
.footer-logo > span:last-child {
  color: var(--accent);
}

.logo-symbol {
  width: 29px;
  height: 29px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;

  color: var(--accent);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 35px;

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav a {
  opacity: 0.55;

  transition: opacity 0.3s ease;
}

.nav a:hover {
  opacity: 1;
}

.header-count {
  justify-self: end;

  display: flex;
  gap: 8px;

  font-size: 10px;
  letter-spacing: 2px;

  color: rgba(255, 255, 255, 0.45);
}

.header-count span:first-child {
  color: var(--accent);
}

/* ================= GALLERY ================= */

.gallery {
  position: relative;

  min-height: 100vh;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 72% 48%,
      rgba(73, 53, 126, 0.28),
      transparent 35%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(30, 101, 127, 0.13),
      transparent 35%
    ),
    #050715;
}

/* ================= AMBIENT LIGHT ================= */

.ambient {
  position: absolute;

  border-radius: 50%;

  pointer-events: none;

  filter: blur(70px);

  opacity: 0.25;
}

.ambient-one {
  width: 350px;
  height: 350px;

  right: 5%;
  top: 12%;

  background: #8b58e6;

  animation: ambientFloat 9s ease-in-out infinite alternate;
}

.ambient-two {
  width: 250px;
  height: 250px;

  left: 8%;
  bottom: 5%;

  background: #196e8c;

  animation: ambientFloat 11s ease-in-out infinite alternate-reverse;
}

.ambient-three {
  width: 170px;
  height: 170px;

  right: 35%;
  bottom: 10%;

  background: #df68bd;

  opacity: 0.12;

  animation: ambientFloat 7s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(30px, -25px) scale(1.15);
  }
}

/* ================= PARTICLES ================= */

.water-particles {
  position: absolute;
  inset: 0;

  pointer-events: none;
}

.water-particles span {
  position: absolute;

  width: 3px;
  height: 3px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.5);

  animation: particleFloat 9s linear infinite;
}

.water-particles span:nth-child(1) {
  left: 12%;
  top: 70%;
  animation-delay: 1s;
}

.water-particles span:nth-child(2) {
  left: 22%;
  top: 50%;
  animation-delay: 3s;
}

.water-particles span:nth-child(3) {
  left: 31%;
  top: 80%;
  animation-delay: 6s;
}

.water-particles span:nth-child(4) {
  left: 42%;
  top: 25%;
  animation-delay: 2s;
}

.water-particles span:nth-child(5) {
  left: 55%;
  top: 75%;
  animation-delay: 4s;
}

.water-particles span:nth-child(6) {
  left: 65%;
  top: 35%;
  animation-delay: 7s;
}

.water-particles span:nth-child(7) {
  left: 76%;
  top: 70%;
  animation-delay: 1.5s;
}

.water-particles span:nth-child(8) {
  left: 85%;
  top: 25%;
  animation-delay: 5s;
}

.water-particles span:nth-child(9) {
  left: 92%;
  top: 55%;
  animation-delay: 3.5s;
}

.water-particles span:nth-child(10) {
  left: 48%;
  top: 90%;
  animation-delay: 8s;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  20% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
    transform: translateY(-180px);
  }
}

/* ================= SLIDES ================= */

.slides {
  position: relative;

  width: 100%;
  min-height: 100vh;
}

.slide {
  position: absolute;
  inset: 0;

  display: grid;
  grid-template-columns: 48% 52%;
  align-items: center;

  width: 100%;

  padding: 100px 7vw 120px;

  opacity: 0;
  visibility: hidden;

  transform: translateX(50px);

  transition:
    opacity 0.7s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.7s ease;
}

.slide.active {
  opacity: 1;
  visibility: visible;

  transform: translateX(0);
}

/* ================= SLIDE TEXT ================= */

.slide-info {
  position: relative;
  z-index: 10;

  max-width: 560px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 25px;

  color: var(--accent);

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 30px;
  height: 1px;

  background: currentColor;
}

.slide h1 {
  max-width: 570px;

  font-family: var(--serif);
  font-size: clamp(4rem, 7vw, 7.2rem);
  font-weight: 500;

  line-height: 0.88;

  letter-spacing: -5px;
}

.slide h1 em {
  display: block;

  color: var(--accent);

  font-weight: 500;
  font-style: italic;
}

.scientific {
  margin-top: 18px;

  color: rgba(255, 255, 255, 0.45);

  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.description {
  max-width: 440px;

  margin-top: 28px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.8;
}

.facts {
  display: flex;

  margin-top: 38px;
}

.facts > div {
  min-width: 120px;

  padding-right: 25px;
  margin-right: 25px;

  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.facts > div:last-child {
  border-right: 0;
}

.facts span {
  display: block;

  margin-bottom: 6px;

  color: rgba(255, 255, 255, 0.35);

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.facts strong {
  font-size: 10px;
  font-weight: 500;
}

/* ================= JELLY STAGE ================= */

.jelly-stage {
  position: relative;

  height: 100%;

  display: grid;
  place-items: center;
}

/* ================= JELLYFISH ================= */

.jellyfish {
  position: relative;

  width: 300px;
  height: 450px;

  transform: translateY(-10px);

  animation: jellyFloat 5s ease-in-out infinite;
}

@keyframes jellyFloat {
  0%,
  100% {
    transform: translateY(-12px);
  }

  50% {
    transform: translateY(12px);
  }
}

/* ================= BELL ================= */

.bell {
  position: absolute;

  top: 75px;
  left: 50%;

  width: 220px;
  height: 155px;

  transform: translateX(-50%);

  border-radius: 110px 110px 35px 35px;

  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(255, 255, 255, 0.5),
      transparent 20%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.38),
      rgba(213, 140, 255, 0.25) 45%,
      rgba(95, 39, 167, 0.35)
    );

  border: 1px solid rgba(255, 255, 255, 0.28);

  box-shadow:
    inset 0 -20px 30px rgba(97, 39, 151, 0.25),
    0 0 70px rgba(213, 140, 255, 0.25);

  backdrop-filter: blur(4px);

  z-index: 4;
}

.bell::before {
  content: "";

  position: absolute;

  left: 50%;
  top: 14px;

  width: 130px;
  height: 80px;

  transform: translateX(-50%);

  border-radius: 50%;

  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.bell::after {
  content: "";

  position: absolute;

  bottom: -8px;
  left: 0;

  width: 100%;
  height: 20px;

  border-radius: 50%;

  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}

.bell-detail {
  position: absolute;

  top: 45px;
  left: 50%;

  width: 85px;
  height: 45px;

  transform: translateX(-50%);

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

/* ================= ORAL ARMS ================= */

.oral-arms {
  position: absolute;

  z-index: 3;

  top: 190px;
  left: 50%;

  width: 130px;
  height: 80px;

  transform: translateX(-50%);
}

.oral-arms i {
  position: absolute;

  top: 0;
  left: 50%;

  width: 15px;
  height: 85px;

  border-radius: 50%;

  background: linear-gradient(
    180deg,
    rgba(240, 190, 255, 0.8),
    rgba(150, 75, 210, 0.15)
  );

  transform-origin: top center;

  filter: blur(0.2px);
}

.oral-arms i:nth-child(1) {
  transform: translateX(-50%) rotate(-35deg);
}

.oral-arms i:nth-child(2) {
  transform: translateX(-50%) rotate(-12deg);
}

.oral-arms i:nth-child(3) {
  transform: translateX(-50%) rotate(12deg);
}

.oral-arms i:nth-child(4) {
  transform: translateX(-50%) rotate(35deg);
}

/* ================= TENTACLES ================= */

.tentacles {
  position: absolute;

  z-index: 2;

  top: 245px;
  left: 50%;

  width: 200px;
  height: 170px;

  transform: translateX(-50%);
}

.tentacles i {
  position: absolute;

  top: 0;

  width: 3px;
  height: 155px;

  border-radius: 50%;

  background: linear-gradient(
    180deg,
    rgba(213, 140, 255, 0.75),
    rgba(213, 140, 255, 0)
  );

  transform-origin: top;

  animation: tentacleMove 2.5s ease-in-out infinite alternate;
}

.tentacles i:nth-child(1) {
  left: 20px;
  height: 120px;
  transform: rotate(8deg);
}

.tentacles i:nth-child(2) {
  left: 50px;
  height: 160px;
  animation-delay: -0.4s;
  transform: rotate(3deg);
}

.tentacles i:nth-child(3) {
  left: 80px;
  height: 140px;
  animation-delay: -0.8s;
}

.tentacles i:nth-child(4) {
  left: 110px;
  height: 165px;
  animation-delay: -1.2s;
}

.tentacles i:nth-child(5) {
  left: 140px;
  height: 130px;
  animation-delay: -1.7s;
}

.tentacles i:nth-child(6) {
  left: 170px;
  height: 110px;
  animation-delay: -2s;
}

@keyframes tentacleMove {
  from {
    transform: rotate(-5deg);
  }

  to {
    transform: rotate(7deg);
  }
}

/* ================= BLUE JELLY ================= */

.blue-jelly .bell {
  background:
    radial-gradient(
      circle at 50% 25%,
      rgba(255, 255, 255, 0.45),
      transparent 20%
    ),
    linear-gradient(135deg, rgba(120, 225, 255, 0.55), rgba(35, 100, 190, 0.2));

  box-shadow:
    inset 0 -20px 30px rgba(31, 110, 200, 0.3),
    0 0 80px rgba(104, 216, 255, 0.3);
}

.blue-jelly .tentacles i {
  background: linear-gradient(
    180deg,
    rgba(104, 216, 255, 0.8),
    rgba(104, 216, 255, 0)
  );
}

.blue-jelly .oral-arms i {
  background: linear-gradient(
    180deg,
    rgba(170, 240, 255, 0.9),
    rgba(55, 150, 210, 0.1)
  );
}

/* ================= LION JELLY ================= */

.lion-jelly {
  transform: scale(1.15);
}

.lion-jelly .bell {
  width: 245px;
  height: 170px;

  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(255, 255, 255, 0.35),
      transparent 20%
    ),
    linear-gradient(135deg, rgba(255, 177, 224, 0.55), rgba(206, 64, 139, 0.3));

  box-shadow:
    inset 0 -25px 35px rgba(195, 46, 120, 0.25),
    0 0 90px rgba(255, 112, 190, 0.3);
}

.lion-jelly .tentacles {
  width: 280px;
}

.lion-jelly .tentacles i {
  width: 4px;
  background: linear-gradient(
    180deg,
    rgba(255, 138, 203, 0.9),
    rgba(255, 138, 203, 0)
  );
}

.lion-jelly .tentacles i:nth-child(1) {
  left: 15px;
  height: 160px;
}

.lion-jelly .tentacles i:nth-child(2) {
  left: 45px;
  height: 200px;
}

.lion-jelly .tentacles i:nth-child(3) {
  left: 80px;
  height: 175px;
}

.lion-jelly .tentacles i:nth-child(4) {
  left: 115px;
  height: 215px;
}

.lion-jelly .tentacles i:nth-child(5) {
  left: 150px;
  height: 180px;
}

.lion-jelly .tentacles i:nth-child(6) {
  left: 185px;
  height: 205px;
}

.lion-jelly .tentacles i:nth-child(7) {
  left: 220px;
  height: 165px;
}

.lion-jelly .tentacles i:nth-child(8) {
  left: 250px;
  height: 140px;
}

/* ================= CRYSTAL JELLY ================= */

.crystal-jelly .bell {
  background:
    radial-gradient(
      circle at 50% 25%,
      rgba(255, 255, 255, 0.65),
      transparent 25%
    ),
    linear-gradient(135deg, rgba(196, 255, 245, 0.45), rgba(55, 203, 172, 0.12));

  box-shadow:
    inset 0 -20px 35px rgba(45, 200, 167, 0.18),
    0 0 100px rgba(143, 240, 216, 0.35);
}

.crystal-jelly .tentacles i {
  background: linear-gradient(
    180deg,
    rgba(143, 240, 216, 0.85),
    rgba(143, 240, 216, 0)
  );
}

.crystal-jelly .oral-arms i {
  background: linear-gradient(
    180deg,
    rgba(190, 255, 246, 0.8),
    rgba(83, 212, 180, 0.05)
  );
}

/* ================= CONTROLS ================= */

.carousel-controls {
  position: absolute;
  z-index: 30;

  left: 7vw;
  bottom: 48px;

  display: flex;
  align-items: center;
  gap: 25px;
}

.carousel-button {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.03);

  color: white;

  cursor: pointer;

  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 0.1);

  border-color: rgba(255, 255, 255, 0.4);

  transform: translateY(-2px);
}

.progress {
  width: 160px;
}

.progress-track {
  width: 100%;
  height: 1px;

  background: rgba(255, 255, 255, 0.16);
}

.progress-track span {
  display: block;

  width: 25%;
  height: 1px;

  background: var(--accent);

  transition: width 0.6s ease;
}

.progress-numbers {
  display: flex;
  justify-content: space-between;

  margin-top: 9px;

  font-size: 8px;
  letter-spacing: 2px;

  color: rgba(255, 255, 255, 0.35);
}

.progress-numbers span:first-child {
  color: var(--accent);
}

/* ================= THUMBNAILS ================= */

.thumbnails {
  position: absolute;
  z-index: 30;

  right: 5vw;
  bottom: 45px;

  display: flex;
  gap: 8px;
}

.thumbnail {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 9px 12px;

  border: 1px solid transparent;

  background: transparent;

  color: rgba(255, 255, 255, 0.35);

  cursor: pointer;

  transition: all 0.3s ease;
}

.thumbnail span {
  font-size: 8px;
}

.thumbnail strong {
  font-size: 9px;
  font-weight: 500;
}

.thumbnail:hover {
  color: white;
}

.thumbnail.active {
  border-color: rgba(255, 255, 255, 0.15);

  background: rgba(255, 255, 255, 0.04);

  color: white;
}

.thumbnail.active span {
  color: var(--accent);
}

/* ================= SCROLL HINT ================= */

.scroll-hint {
  position: absolute;
  z-index: 20;

  right: 5vw;
  top: 50%;

  display: flex;
  align-items: center;
  gap: 12px;

  transform: rotate(90deg) translateX(50%);

  transform-origin: right center;

  color: rgba(255, 255, 255, 0.25);

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-hint i {
  width: 35px;
  height: 1px;

  background: rgba(255, 255, 255, 0.2);
}

/* ================= ABOUT ================= */

.about {
  position: relative;

  min-height: 650px;

  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: center;

  padding: 100px 8vw;

  overflow: hidden;

  background: #f4f2ee;

  color: #111625;
}

.about-number {
  align-self: start;

  padding-top: 15px;

  font-family: var(--serif);
  font-size: 100px;

  color: rgba(17, 22, 37, 0.08);
}

.about-content {
  max-width: 550px;
}

.eyebrow.dark {
  color: #7558ad;
}

.about h2 {
  margin-top: 30px;

  font-family: var(--serif);
  font-size: clamp(4rem, 6vw, 6rem);
  line-height: 0.9;

  letter-spacing: -4px;
}

.about h2 em {
  display: block;

  color: #7558ad;

  font-weight: 500;
}

.about-content > p:last-child {
  max-width: 470px;

  margin-top: 30px;

  color: #73798a;

  font-size: 14px;
  line-height: 1.9;
}

.about-mark {
  justify-self: end;

  width: 170px;
  height: 170px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(17, 22, 37, 0.13);
  border-radius: 50%;

  text-align: center;
}

.about-mark span {
  margin-bottom: 8px;

  color: #7558ad;

  font-size: 18px;
}

.about-mark p {
  color: #777b89;

  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.2;
}

/* ================= FOOTER ================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 35px 5vw;

  background: #03040d;

  color: rgba(255, 255, 255, 0.45);

  font-size: 9px;
}

.footer-logo {
  color: white;
}

.footer-credit {
  letter-spacing: 1px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1000px) {
  .header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .slide {
    grid-template-columns: 55% 45%;

    padding-left: 6vw;
    padding-right: 5vw;
  }

  .slide h1 {
    font-size: clamp(3.8rem, 8vw, 6rem);
  }

  .jellyfish {
    transform: scale(0.8);
  }

  .lion-jelly {
    transform: scale(0.9);
  }

  .thumbnails {
    right: 5vw;
  }

  .thumbnail strong {
    display: none;
  }

  .about {
    grid-template-columns: 0.4fr 1fr 0.4fr;
  }
}

@media (max-width: 700px) {
  .header {
    padding: 22px 6vw;
  }

  .header-count {
    display: none;
  }

  .gallery {
    min-height: 900px;
  }

  .slides {
    min-height: 900px;
  }

  .slide {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    padding: 115px 6vw 150px;
  }

  .slide-info {
    max-width: 100%;
  }

  .slide h1 {
    font-size: 4.3rem;
    letter-spacing: -3px;
  }

  .description {
    max-width: 360px;

    margin-top: 20px;

    font-size: 12px;
  }

  .scientific {
    margin-top: 12px;
  }

  .facts {
    margin-top: 25px;
  }

  .facts > div {
    min-width: auto;

    padding-right: 12px;
    margin-right: 12px;
  }

  .facts strong {
    font-size: 9px;
  }

  .jelly-stage {
    position: absolute;

    right: -25px;
    bottom: 115px;

    width: 250px;
    height: 350px;

    transform: scale(0.72);
    transform-origin: bottom right;

    opacity: 0.9;
  }

  .carousel-controls {
    left: 6vw;
    bottom: 80px;
  }

  .thumbnails {
    left: 6vw;
    right: auto;
    bottom: 30px;

    gap: 3px;
  }

  .thumbnail {
    padding: 5px 8px;
  }

  .thumbnail span {
    font-size: 7px;
  }

  .scroll-hint {
    display: none;
  }

  .about {
    min-height: 650px;

    grid-template-columns: 1fr;

    padding: 90px 7vw;
  }

  .about-number {
    position: absolute;

    top: 35px;
    right: 30px;

    font-size: 70px;
  }

  .about-mark {
    justify-self: start;

    margin-top: 40px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;
  }
}

@media (max-width: 420px) {
  .slide h1 {
    font-size: 3.8rem;
  }

  .facts {
    gap: 8px;
  }

  .facts > div {
    padding-right: 8px;
    margin-right: 0;
  }

  .facts span {
    font-size: 7px;
  }

  .facts strong {
    font-size: 8px;
  }

  .jelly-stage {
    right: -65px;
    bottom: 100px;
    transform: scale(0.62);
  }

  .carousel-controls {
    bottom: 75px;
  }

  .progress {
    width: 100px;
  }
}

/* ================= REDUCED MOTION ================= */

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

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