/* ---------- BODY & HTML ---------- */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-size: 100%;
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
  background-color: #ffffff;
  scroll-snap-type: y mandatory;
  overflow-x: hidden; /* Prevent horizontal scroll */
  overflow-y: scroll;
}

@font-face {
  font-family: "Wintersoul";
  src:
    local("Wintersoul"),
    url("fonts/Wintersoul.otf") format("opentype"),
}

@font-face {
  font-family: "VCR";
  src:
    local("VCR"),
    url("fonts/VCR.ttf") format("opentype"),
}

@font-face {
  font-family: "Art Post";
  src:
    local("Art Post"),
    url("fonts/Art\ Post.ttf") format("opentype"),
}

@font-face {
  font-family: "Art Post Black";
  src:
    local("Art Post Black"),
    url("fonts/Art\ Post\ black.ttf") format("opentype"),
}


/* Hide scrollbars */
body::-webkit-scrollbar { width: 0; background: transparent; }
body { scrollbar-width: none; -ms-overflow-style: none; }

/* ---------- SECTIONS ---------- */
section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  scroll-snap-align: start;
  position: relative;
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0;
    transform: translateY(300px);
  }
  to {
    opacity: 1;
    scale: 1;
    transform: translateY(0px);
  }

  

}

@keyframes appearFade {
  0% {
    opacity: 0;
    scale: 0.5;
  }
   50% {
    opacity: 0;
    scale: 0.5;
  }
  100% {
    opacity: 1;
    scale: 1;
  }

}

.sectiontext {
  position: absolute;
  color: #F8EED3;
  text-shadow: 0px 0px 1px #f1b36d;
  text-align: center;
  font-family: 'VCR';
  font-size: clamp(0.6rem, 1.1vw, 1.1rem);
  margin-top: 6%;
  margin-bottom: 10%;
  margin-left: 4%;
  margin-right: 4%;
  line-height: 114%;
  max-height: 80%;
  
}

/* The actual animation that will play once */
/* .sectiontext.animate {
  animation: appear 1s ease-out forwards;
} */

/* ---------- LANDING SECTION ---------- */
#landing {
  background: linear-gradient(#3C5CA7, #2551B6);
  color: #31AE9D;
  overflow: hidden;
}

/* Container for both images and text */
.center-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.forbidden-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 400px;
  height: 300px;
  transform: translate(-50%, -50%);
  /* border: 2px dashed red; */
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 800px) {
    .forbidden-zone {
    position: absolute;
  left: 50%;
  top: 5%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}
}

/* ---------- BACKGROUND IMAGES ---------- */
.background-images {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
}

.bg-img {
  position: absolute;
  max-width: 800px; /* adjust image size */
  opacity: 1 ; /* subtle so text stands out */
  animation: floatImg 340s ease-in-out infinite alternate;
  mix-blend-mode: normal;
}

@keyframes floatImg {
  0% { transform: translateY(0) scale(0) rotate(20deg); }
  1% { transform: translateY(-6px) scale(1.4) rotate(-20deg); }
  2% { transform: translateY(0) scale(1) rotate(20deg); }
  3%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { transform: translateY(0) scale(1) rotate( -20deg); }
  10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100% { transform: translateY(0) scale(1.1) rotate( 40deg); }

}

/* ---------- LANDING TEXT ---------- */
.landing-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 3; /* on top of images */
  animation: floatText 300s ease-in-out infinite;
  transform: rotate(90deg);
  transform-origin: center; /* Keeps rotation balanced */
  
}

.landing-text h2 {
  font-family: Wintersoul;
  font-size: 120px;
  margin: 0;
  color: #ffffff;
  text-shadow: 20px 13px 8px rgba(0, 0, 0, 0.384);
}

@keyframes floatText {
  0% { transform: translateY(0) scale(0) rotate( 9deg); }
  1% { transform: translateY(-7px) scale(1.1) rotate(-4deg); }
  2% { transform: translateY(0) scale(1) rotate( 1deg); }
  3%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { transform: translateY(0) scale(1) rotate( 2deg); }
  10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100% { transform: translateY(0) scale(1.1) rotate( -2deg); }
}


/* ---------- SCROLL DOWN ---------- */
.scroll-down {
  position: absolute;
  bottom: 2%;
  text-decoration: none;
  color: #000000;
  text-shadow: -2px -5px 1px  #e7d9bd;
  text-align: center;
  font-family: 'Art Post';
  font-size: clamp(2rem, 2.5vw, 3rem); 
  /* text-shadow:  0px -10px 5px #4a2929; */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  /* transform: translateY(30px); */
}

.nuno {
  position: absolute;
  top: 2%;
  text-decoration: none;
  color: #000000;
  text-shadow: -2px -5px 1px  #e7d9bd;
  text-align: center;
  font-family: 'Art Post Black';
  font-size: clamp(2rem, 2.5vw, 3rem); 
  /* text-shadow:  0px -10px 5px #4a2929; */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.8;
  /* animation: bounce 3s infinite ease-in-out; */
  /* transform: translateY(30px); */
}

.chapters {
  position: absolute;
  bottom: 2%;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0px 5px 1px  #000000;
  text-align: center;
  font-family: 'Art Post';
  font-size: clamp(2rem, 2.5vw, 3rem); 
  /* text-shadow:  0px -10px 5px #4a2929; */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  animation: bounce 2s infinite ease-in-out;
  /* transform: translateY(30px); */
}

.scroll-down.animate {
  animation: appear 2s ease-out forwards;
}

.scroll-down span:last-child {
  margin-top: 5px;
  font-size: 2rem;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------- OTHER SECTIONS ---------- */ 
#who {
  background-color: rgb(0, 0, 0);    /*#00ccff*/
  color: #ffff00;
  font-family: 'Courier New', monospace;
  font-size: 80px;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#Environments {
  background: linear-gradient(#2e833c,#50bcdd);    /*#00ccff*/
  color: #ffffff;
  font-family: 'Courier New';
  font-size: 1rem;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#Props {
  background: linear-gradient(#50bcdd, #3f46a6);    /*#00ccff*/
  color: #ffff00;
  font-family: 'Courier New';
  font-size: 80px;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#CharacterDesign {
  background: linear-gradient(#3f46a6, #aa52c5);    /*#00ccff*/
  color: #ffff00;
  font-family: 'Courier New';
  font-size: 20px;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#VFX {
  background: linear-gradient( #aa52c5, #9b3a3a);    /*#00ccff*/
  color: #ffffff;
  font-family: 'Courier New';
  font-size: 20px;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#Animation {
  background: linear-gradient(#9b3a3a, rgb(168, 116, 66));    /*#00ccff*/
  color: #ffff00;
  font-family: 'Courier New';
  font-size: 20px;
  text-shadow: 3px 3px 5px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}



/* ---------- RESPONSIVE ---------- */
@media (max-width: 800px) {
  .landing-text h2 { font-size: 60px; }
  #why, #who { font-size: 50px; }
  .sectiontext {line-height: 140%; margin-bottom: 30%; margin-top: 10%;}
}

.section {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 80%;
      max-width: 800px;
      background: rgba(255, 255, 255, 0.85);
      color: #333;
      border-radius: 20px;
      padding: 2rem;
      display: none;
      box-shadow: 0 5px 20px rgba(0,0,0,0.3);
      animation: fadeIn 0.6s ease;
    }

    .section.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translate(-50%, -48%); }
      to { opacity: 1; transform: translate(-50%, -50%); }
    }

    h1 {
      margin-top: 0;
    }

    /* Floating fish (images) */
   .fish {
  position: absolute;
  mix-blend-mode: normal;
  opacity: 1;
  height: auto;
  cursor: pointer;
  user-select: none;
  width: clamp(160px, 35vw, 250px); /* Min: 120px, Preferred: 35% of viewport width, Max: 250px */
  transition: transform 0.2s, width 0.2s ease-out; /* Smooth scaling */

  animation: appearFade 6s ease-out;
  /* animation-delay: 10s; */
}



    .fish:hover {
      transform: scale(1.1) rotate(5deg);
    }

    /* @media (max-width: 600px) {
      .fish {
        width: 60px;
      } */

      .whoImg {
        width: 60px;
      }

    

    .whoImg {
      position: absolute;
      left: 50px;
      top: 60px;
      rotate: ;
      width: 300px;
      height: auto;
      display: block;
      cursor: pointer;
      user-select: none;
      transition: transform 0.2s;
    }


 .Blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
  padding: clamp(1rem, 5vw, 1rem);
  margin: clamp(1rem, 12vh, 1rem) auto;
  max-width: 1400px;
  width: 100%; /* Ensure container doesn't exceed viewport */
  /* grid-auto-rows: 200px; */
  isolation: isolate;
}


/* Mobile version - FIXES OVERFLOW */



.block-item {
  position: relative;
  padding: 0;
  border-block: 3px solid;
  background: rgba(255, 255, 255, 0);
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  opacity: 0.5;
  z-index: 1;
  transition: transform 0.6s ease, box-shadow 1.2s ease, opacity 0.8s ease, sepia 1s ease;
   /* box-sizing: border-box; Include padding in width */
  width: 100%;
  filter: sepia(100%);
  height: 200px;
}

.block-item:hover {
  transform: translateY(0px) scale(1.2);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.842);
  opacity: 1;
   z-index: 2;
   filter: sepia(0%);
}

.block-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.block-item:hover img {
  transition: transform 0.3s ease;
}

.block-item.animate {
  animation: appearFade 1s ease-out;
}

@media (max-width: 1000px) {
  .Blocks {
    grid-template-columns: 1fr; /* Single column */
    gap: 1rem;
    padding: 2rem 1rem; /* Side padding prevents edge-touching */
    margin: 60px auto; /* Top/bottom margin from screen */
    max-width: 90vw; NEVER exceed viewport width
  }
  
  /* CRITICAL: Constrain the actual block items */
  .block-item {
    width: 100% !important; /* Force full width of grid cell */
    max-width: 330px !important; /* Limit size on mobile */
    margin: 0 auto !important; /* Center in grid cell */
    opacity: 1 !important;
    filter: sepia(0);
    height: 130px;
    border-radius: 10px;
  }
  
  /* Make images responsive */
  .block-item img {
    width: 100% !important; /* Fill container */
    height: 200px !important; /* Maintain aspect ratio */
    max-height: 140px; /* Limit height */
    object-fit: cover;
  }
}

.block-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: rgba(255, 255, 255, 0);
  font-weight: 500;
}

:root {
  --slide-transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth easing */
}


@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.959);
  z-index: 1000;
}

.modal.fade-in {
  display: block;
  animation: modalFadeIn 0.4s ease forwards;
}

@keyframes modalFadeOut {
   from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.modal.fade-out {
  animation: modalFadeOut 0.3s ease forwards;
}

.modal-content {
  position: relative;
  width: 95%;
  max-width: 1700px; /* Bigger max width */
  margin: 2% auto;
  height: 90vh;
  border-radius: 20px;
  overflow: hidden;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform; /* GPU acceleration */
}

.slider-wrapper {
  display: flex;
  height: 85%; /* BIGGER images */
  transition: transform var(--slide-transition);
  touch-action: pan-x; /* Enable touch scrolling */
}

.slider-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  user-select: none;
  pointer-events: none; /* Prevent drag */
}

/* SMALLER info text */
.slider-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 15%; /* Reduced from 30% */
  padding: 1rem 2rem; /* Compact padding */
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
  color: #F8EED3;
  overflow-y: auto;
}

.slider-info h2 {
  font-size: 1.2rem; /* Smaller title */
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.slider-info p {
  font-size: 0.9rem; /* Smaller description */
  line-height: 1.4;
  margin: 0 0 0.3rem 0;
  opacity: 0.9;
}

.slider-info small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.slider-prev img,
.slider-next img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.slider-prev:hover img,
.slider-next:hover img {
  transform: scale(1.15); /* Icon grows on hover */
}

/* Smooth navigation buttons */
.slider-prev,
.slider-next {
  position: absolute;
  top: 42.5%; /* Centered on image area */
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 60px; height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;            /* no border */
  padding: 0;     
}

.slider-prev:hover,
.slider-next:hover {
  transform: scale(1.08);
}

.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }

/* Close button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 4rem;
  background: none;
  border: none;
  color: #F8EED3;
  text-shadow: black 6px -5px 1px, rgba(0, 0, 0, 0.788) 0px 6px 18px;
  cursor: pointer;
  z-index: 1001;
  padding: 0.5rem;
  transition: transform 0.2s;
  font-family: Art Post;
}

.modal-close:hover {
  transform: rotate(90deg);
}

/* Mobile optimizations */
@media (max-width: 900px) {
  .modal-content {
    width: 100%;
    margin: 0;
    height: 100vh;
    border-radius: 0;
  }
  
  .slider-wrapper {
    height: 80%;
  }
  
  .slider-info {
    height: 20%;
    padding: 1rem;
  }
  
  .slider-prev,
  .slider-next {
    width: 60px; height: 60px;
    /* transform: translateY(5rem); */
    top: 60%
  
  }

  .slider-prev img,
.slider-next img {
  
  transition: transform 0.3s ease;
}

.slider-prev { left: 5rem; }
.slider-next { right: 5rem; }
}


.contact-bar {
  max-width: 1200px;
  padding: clamp(3rem, 6vw, 6rem);
  margin: clamp(2rem, 2vh, 9rem);
  background: white;
  border-radius: 20px;
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); */
  /* border: 1px solid rgba(241, 179, 109, 0.2); */
  font-family: 'Art Post Black';
}

/* Input bars layout */
.contact-inputs-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 900px));
  gap: 3rem;
  
}

.contact-message-bar {
  margin-top: 4rem;
  margin-bottom: 6rem;
}

/* Animated input groups */
.input-group {
  position: relative;
  height: 4rem;
}


.input-group textarea {
  height: 140px;
  resize: vertical;
}

.input-group input,
.input-group textarea {
  width: 100%;
  height: 100%;
  padding: 1.2rem;
  border: 1px solid rgba(63, 56, 56, 0.123);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #486ac5;
  font-size: 1.3rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group label {
  position: absolute;
  font-size: 2rem;
  left: 1.2rem;
  top: 80%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.938);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  padding: 0 0.5rem;
}

/* Label float animation */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
  top: 0;
  font-size: 1.4rem;
  color: #6d76f1;
  background: #ffffff;
}

/* Focus glow */
.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #6d76f1;
  box-shadow: 0 0 0 4px rgba(11, 50, 226, 0.2);
}

/* Submit button */
.contact-submit {
  position: relative;
  width: 100%;
  padding: 1.2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7a78ff 0%, #fccb9b 100%);
  color: #ffffff;
  font-size: 2rem;
  font-family: Art Post Black;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.contact-submit:hover::before {
  width: 300px;
  height: 300px;
}

.contact-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(241, 179, 109, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .contact-bar {
    margin: 2rem 1rem;
    padding: 5rem;
  }
  
  .contact-inputs-bar {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

/* Form fade out animation */
#contactForm.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Thank you fade in animation */
#thankYouMessage.fade-in {
  display: block !important;
  animation: fadeIn 0.5s ease-in 0.3s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optional: Add a bounce to the image */
#thankYouImage {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}