@charset "UTF-8";

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

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: "Averia Gruesa Libre";
  cursor: none;
  scroll-behavior: smooth;
}

.wave-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  white-space: nowrap;
  display: inline-block;
  z-index: 1000; /* Ensure it's above the background */
}

.wave-text .word {
  display: inline-block;
  margin-right: clamp(0.3rem, 1.5vw, 1rem);
}

.wave-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  z-index: 100; /* Ensure it's above the background */
  font-family: "Averia Gruesa Libre";
  text-align: center;
  box-sizing: border-box;
  padding: 1em;
  overflow-x: hidden;
}

.wave-text .letter {
  display: inline-block;
  font-size: clamp(1.5rem, 7vw, 4rem);
  animation: wave 2.6s ease-in-out infinite;
  cursor: s-resize;
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Prevent scroll initially on body */
html.no-scroll,
body.no-scroll {
  overflow: hidden;
}

.intropage {
  opacity: 0;
  min-height: 100vh; /* Fill full screen height */
  display: flex;
  flex-direction: column;
  align-items: center; /* Optional: vertical center */
  justify-content: center; /* Optional: horizontal center */
  background-image: linear-gradient(to bottom, white, #a9dfe4, white);
  padding: 2rem;
  font-size: 2rem;
  text-align: center;
  box-sizing: border-box;
  scroll-margin-top: 5vh; /* Optional: for smoother scroll offset */
  overflow: hidden;
  will-change: transform, opacity; /* Optimize for animations */
  backface-visibility: hidden; /* Prevent flickering during animations */
}

.arrow-wrapper {
  width: 100%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  animation: bounce 1.5s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-left: 5px solid white;
  border-bottom: 5px solid white;
  transform: rotate(315deg);
  cursor: none;
}

/* Simple bounce animation */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Class added when triggered */
.intropage.fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 1.5s ease-out forwards;
}

.firsttransitionpage {
  min-height: 30vh; /* Fill full screen height */
  display: flex; /* Optional: center content */
  align-items: center; /* Optional: vertical center */
  justify-content: center; /* Optional: horizontal center */
  background-image: linear-gradient(to bottom, white, #a9dfe4);
  padding: 2rem;
  text-align: center;
  box-sizing: border-box;
  scroll-margin-top: 5vh; /* Optional: for smoother scroll offset */
  color: black;
}

.transitionpage {
  min-height: 20vh; /* Fill full screen height */
  display: flex; /* Optional: center content */
  align-items: center; /* Optional: vertical center */
  justify-content: center; /* Optional: horizontal center */
  background-image: linear-gradient(to bottom, #ad8648, #a9dfe4);
  padding: 2rem;
  text-align: center;
  box-sizing: border-box;
  scroll-margin-top: 5vh; /* Optional: for smoother scroll offset */
  color: white;
}

.lastpage {
  min-height: 100vh; /* Fill full screen height */
  display: flex; /* Optional: center content */
  align-items: center; /* Optional: vertical center */
  justify-content: center; /* Optional: horizontal center */
  background-image: linear-gradient(to bottom, rgb(15, 5, 60), #a9dfe4, white);
  padding: 2rem;
  font-size: 2rem;
  text-align: center;
  box-sizing: border-box;
  scroll-margin-top: 5vh; /* Optional: for smoother scroll offset */
  overflow: hidden;
}

.Scene {
  position: relative;
  width: 100%;
  height: 100vh;
}
.Background1,
.Background2,
.Background3,
.Background4 {
  display: block;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  background-color: #ad8648;
  z-index: 10;
}

svg {
  width: 100%;
  height: 100vh;
  display: block;
}

.SVG1 {
  width: 100%;
  height: auto;
  /* min-height: 100vh; */
  z-index: 1;
  display: block;
}
.SVG1:last-child {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.SVG2 {
  width: 100%;
  height: auto;
  /* min-height: 100vh; */
  z-index: 1;
  display: block;
}
.SVG2:last-child {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.SVG3 {
  width: 100%;
  height: auto;
  /* min-height: 100vh; */
  z-index: 1;
  display: block;
}
.SVG3:last-child {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.SVG4 {
  width: 100%;
  height: auto;
  /* min-height: 100vh; */
  z-index: 1;
  display: block;
}
.SVG4:last-child {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.Whale {
  position: relative;
  top: 0;
  left: 0;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 10;
  display: flex;
  align-items: center;
  cursor: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* Whale-specific float away: exits left and down */
@keyframes whaleFloatAway {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-75%, 60px) rotate(-5deg) scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-150%, 120px) rotate(-10deg) scale(1.2);
    opacity: 0;
  }
}

.whale-float-away {
  animation: whaleFloatAway 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Whale-specific float back in: enters from right and slightly up */
@keyframes whaleFloatBackIn {
  0% {
    transform: translate(150%, 120px) rotate(10deg) scale(1.2);
    opacity: 0;
  }
  50% {
    transform: translate(60%, 60px) rotate(5deg) scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

.whale-float-back-in {
  animation: whaleFloatBackIn 2.2s ease-out forwards;
  will-change: transform, opacity;
}

.Narwal {
  position: relative;
  top: 0;
  left: 0;
  min-height: 80vh;
  width: 100%;
  overflow: hidden;
  z-index: 10;
  align-items: center;
  cursor: none;
}
@keyframes spinLeft {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg); /* counterclockwise */
  }
}

.spin-left {
  animation: spinLeft 3s ease-in-out;
}

.buddy {
  position: relative;
  top: 0;
  left: 0;
  min-height: 80vh;
  width: 100%;
  overflow: hidden;
  z-index: 10;
  align-items: center;
  cursor: none;
}

@keyframes whaleDive {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  40% {
    transform: translateY(-40px) rotate(-3deg);
    opacity: 1;
  }
  70% {
    transform: translateY(20px) rotate(3deg);
    opacity: 0.85;
  }
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

.dive-animation {
  animation: whaleDive 2.5s ease-in-out;
}

.Shape1 {
  fill: #a9dfe4;
}
.Shape2 {
  fill: #0a3e1e;
}
.Shape3 {
  fill: #d14a1a;
}
.Shape4 {
  fill: #359203;
}
.Shape5 {
  fill: #ad8648;
}
.Shape6 {
  fill: #6bc1dc;
}
.Shape7 {
  fill: #712d15;
}
.Shape8 {
  fill: #1e7a9c;
}
.Shape9 {
  fill: #187421;
}
.Shape10 {
  fill: #a2340c;
}

.entry-text {
  transform: translateY(20px);
  opacity: 0;
  font-size: 3em;
  transition: top 0.6s ease-in-out, opacity 0.6s ease-in-out,
    transform 0.6s ease-in-out;
}

#bird-text {
  position: absolute;
  top: 40%;
  left: 3%;
  max-width: 70%;
  color: #000000;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 4vw, 7rem);
  text-align: left;
  z-index: 0;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.show-bird-text #bird-text {
  top: 1%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

#fish-text {
  position: absolute;
  top: 40%;
  right: 3%;
  max-width: 80%;
  color: #000000;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 3.6vw, 6rem);
  text-align: right;
  z-index: 0;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.show-fish-text #fish-text {
  top: 1%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

#fire-text {
  position: absolute;
  color: #000000;
  top: 60%;
  left: 3%;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 4vw, 5rem);
  text-align: left;
  z-index: 0;
  max-width: 100vw;
}

.show-fire-text #fire-text {
  top: 23%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

#zw-text {
  position: absolute;
  color: #000000;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 3vw, 3rem);
  text-align: right;
  z-index: 0;
  top: 50%;
  right: 3%;
  max-width: 50vw; /* restrict width */
}

.show-zw-text #zw-text {
  top: 1%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  #zw-text {
    font-size: 0.8rem;
    max-width: 55vw; /* Adjust width for smaller screens */
  }
}

#whale-text {
  position: absolute;
  color: #ffffff;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 4vw, 5rem);
  text-align: center;
  letter-spacing: normal;
  max-width: 70ch;
  width: 90%;
  padding: 0 1rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  opacity: 0;
}

.show-whale-text #whale-text {
  opacity: 1;
}

#whale-text .letter {
  opacity: 0;
  transform: translateY(60%);
  animation: bubbleUp 0.8s ease-out forwards;
}

@keyframes bubbleUp {
  0% {
    transform: translateY(60px) translateX(0);
    opacity: 0;
  }
  50% {
    transform: translateY(20px) translateX(5px);
  }
  100% {
    transform: translateY(0) translateX(0);
    opacity: 1;
  }
}

/* Fade down and disappear */
@keyframes bubbleDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(60%);
  }
}

/* When fading out */
#whale-text.fade-out .letter {
  animation: bubbleDown 0.5s ease forwards;
  /* Add delay per letter dynamically in JS */
}

#narwal-text {
  position: absolute;
  color: #ffffff;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1rem, 6vw, 7rem);
  text-align: left;
  z-index: 0;
  top: 50%;
  left: 0%;
  margin-left: 1rem; /* Add some left margin for spacing */
}

.show-narwal-text #narwal-text {
  top: 30%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

#buddy-text {
  position: absolute;
  color: #ffffff;
  font-family: "Averia Gruesa Libre";
  font-size: clamp(1.5rem, 3.5vw, 4.5rem);
  text-align: right;
  z-index: 0;
  top: 50%;
  right: 1rem;
  max-width: 90vw;
  opacity: 0;
  transform: translateY(30px);
  transition: top 0.6s ease, transform 0.6s ease, opacity 0.6s ease;
}

.show-buddy-text #buddy-text {
  top: 10%; /* Or wherever looks best visually */
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatUpDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

#bird-button {
  position: absolute;
  top: 50%;
  left: 70%;
  width: 30%;
  height: 30%;
  animation: floatUpDown 2s ease-in-out infinite;
}
@keyframes floatAwayTopLeftWavy {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  20% {
    transform: translate(-15%, -5%);
  }
  40% {
    transform: translate(-30%, -30%);
  }
  60% {
    transform: translate(-60%, -70%);
  }
  80% {
    transform: translate(-90%, -130%);
  }
  100% {
    transform: translate(-120%, -200%);
    opacity: 0;
  }
}

.float-away {
  animation: floatAwayTopLeftWavy 5s ease-in-out forwards;
}

@keyframes floatBackInRightWavy {
  0% {
    transform: translateX(150%) translateY(0);
    opacity: 0;
  }
  25% {
    transform: translateX(100%) translateY(-10px);
  }
  50% {
    transform: translateX(60%) translateY(10px);
  }
  75% {
    transform: translateX(30%) translateY(-10px);
  }
  100% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
}

.fade-back-in {
  animation: floatBackInRightWavy 2s ease-out forwards;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

#fish-button {
  position: absolute;
  top: 50%;
  left: 60%;
  width: 30%;
  height: 30%;
  animation: pulse 2s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes swimAway {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: translateX(25vw) rotate(-10deg);
  }
  50% {
    transform: translateX(50vw) rotate(10deg);
  }
  100% {
    transform: translateX(100vw) rotate(0deg);
    opacity: 0;
  }
}

@keyframes swimBackIn {
  0% {
    transform: translateX(-150vw) rotate(0deg);
    opacity: 0;
  }
  10% {
    transform: translateX(-135vw) rotate(10deg);
  }
  20% {
    transform: translateX(-120vw) rotate(-10deg);
  }
  30% {
    transform: translateX(-105vw) rotate(10deg);
  }
  40% {
    transform: translateX(-90vw) rotate(-10deg);
  }
  50% {
    transform: translateX(-75vw) rotate(10deg);
  }
  60% {
    transform: translateX(-60vw) rotate(-10deg);
  }
  70% {
    transform: translateX(-45vw) rotate(10deg);
  }
  80% {
    transform: translateX(-30vw) rotate(-10deg);
  }
  90% {
    transform: translateX(-15vw) rotate(10deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
}

.swim-away {
  animation: swimAway 4s ease-in-out forwards;
}

.swim-back-in {
  animation: swimBackIn 4s ease-in-out forwards;
}

#fire-button {
  position: absolute;
  top: 7%;
  left: 23%;
  width: 15%;
  height: 15%;
  animation: floatUpDown 4s ease-in-out infinite;
}

/* Lift and fade out */
@keyframes liftFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px);
  }
}

@keyframes fadeInOnly {
  0% {
    opacity: 0;
    transform: translateY(0); /* stay in place */
  }
  100% {
    opacity: 1;
    transform: translateY(0); /* stay in place */
  }
}

.fire-fade-out {
  animation: liftFadeOut 0.6s ease forwards;
}

.fire-fade-in {
  animation: fadeInOnly 0.6s ease forwards;
}

@keyframes rotateLeftRight {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

#zw-button {
  position: absolute;
  top: 60%;
  left: 75%;
  width: 20%;
  height: 20%;
  animation: rotateLeftRight 2s ease-in-out infinite;
  transform-origin: center; /* Optional: default is center, but explicit is good */
  display: inline-block; /* Ensures transform works correctly on inline elements */
}

#whale-button {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 60%;
  height: 60%;
  animation: floatUpDown 2s ease-in-out infinite;
}

#narwal-button {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 50%;
  height: 50%;
  animation: floatUpDown 2s ease-in-out infinite;
}

#buddy-button {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 50%;
  height: 50%;
  animation: floatUpDown 2s ease-in-out infinite;
}

.underwater-scene {
  position: relative;
  width: 100%;
  min-height: 200vh; /* Or enough to show all creatures stacked */
  /* overflow: hidden; */
  background-image: linear-gradient(#a9dfe4, rgb(15, 5, 60));
  z-index: 1;
}

@media screen and (min-width: 768px) {
  .underwater-scene {
    min-height: 300vh; /* or however much taller you want on desktop */
  }
}

.seaweed {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
  overflow: visible;
}

.seaweed img {
  width: 100%;
  height: 100%;
  display: block;
  mask-image: linear-gradient(to bottom, black 85%, transparent);
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 85%,
    transparent
  ); /* Safari */
}

/* Optional grouping for shared styling */
.sea-creature {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: auto;
  background: transparent; /* no need for individual gradients */
}

.shape-btn {
  width: 100px;
  height: 100px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: none;
  z-index: 10;
}

.shape-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
}

.shape-btn:hover img {
  transform: scale(1.1);
  filter: brightness(0.8);
}

/* _______________ */

.info-btn {
  position: absolute;
  width: 50px;
  height: 20px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border: none;
  cursor: none;
  transition: transform 0.3s ease;
  z-index: 100;
  padding: 0;
  box-sizing: content-box;
}

/* Water drops container */
.info-btn::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 6px;
  height: 12px;
  background-color: #4ecbe6;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50% 50% 60% 60% / 60% 60% 100% 100%;

  box-shadow: -12px 2px 0 0 #4ecbe6, /* Left drop */ 12px 1px 0 0 #4ecbe6; /* Right drop */
}

/* Tooltip text */
.info-btn::after {
  content: attr(data-text);
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  color: black;
  background: white;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  font-family: "Averia Gruesa Libre", sans-serif;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 200;
}

/* Tooltip shift right if button near left edge */
.info-btn.near-left::after {
  left: 0;
  right: auto;
  transform: translateX(0) translateY(4px);
}

/* Tooltip shift left if button near right edge */
.info-btn.near-right::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}

/* Show tooltip and drops on hover */
.info-btn:hover::after,
.info-btn:hover::before {
  opacity: 1;
}

.info-box {
  position: absolute;
  /* border: 1px solid rgba(255, 255, 255, 0.8); */
  padding: 1rem;
  border-radius: 6px;
  box-shadow: none;
  box-sizing: border-box;
  max-width: 80vw;
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: clamp(1rem, 3.5vw, 5rem);
  color: #ffffff;
  z-index: 1000;
  white-space: normal;
  word-break: normal;
  hyphens: none;
  overflow-wrap: normal;
  /* Prepare for animation */
  opacity: 0;
  transform: translateY(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  /* backdrop-filter: blur(5px); */
}

/* Fade-in keyframes for the first page title*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Initial hidden state of the title*/
.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

/* Buttons fade in later */
.fade-in-delayed {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 1.6s; /* Delayed after title */
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.circle {
  height: 24px;
  width: 24px;
  border-radius: 24px;
  background-color: black;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999999; /* so that it stays on top of all other elements */
}

@media (max-width: 500px) {
  .firecursor {
    display: none !important;
  }
}
