body {
  margin: 0;
  font-family: 'Inria Serif', serif;
  overflow-x: hidden;
  position: relative; /* Ensure absolute positioning works correctly within the body */
}

#scroll-animation-section-unique {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}



.animation-container {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animation-container .gray-box {
  box-shadow: 0px 1px 3px rgba(39, 39, 39, 0.05);
  box-shadow: 0px 1px 3px color(display-p3 0.153 0.153 0.153 / 0.05);
}

.gray-box {
  position: absolute;
  width: 516px;
  height: 364px;
  left: 10vw;
  top: 20vh;
  overflow: hidden;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #222;
  font-weight: bold;
  opacity: 1;
  z-index: 10000;
  border-radius: 32px;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.gray-box.box1 { left: calc(50% - 160px); top: 8%; transform: rotate(-8deg); }
.gray-box.box2 { left: calc(80% - 160px); top: 20%; transform: rotate(12deg); }
.gray-box.box3 { left: calc(92% - 160px); top: 50%; transform: rotate(18deg); }
.gray-box.box4 { left: calc(80% - 160px); top: 80%; transform: rotate(8deg); }
.gray-box.box5 { left: calc(50% - 160px); top: 92%; transform: rotate(-10deg); }
.gray-box.box6 { left: calc(20% - 160px); top: 80%; transform: rotate(-14deg); }
.gray-box.box7 { left: calc(17.8414% - 160px); top: 25.9998%; transform: rotate(12.0001deg); }
.gray-box.box8 { left: calc(12.4167% - 210px); top: 50%; transform: rotate(4deg); }
.gray-box.box9 { left: calc(59.7072% - 210px); top: 59%; transform: rotate(-12.0001deg); }
.gray-box.box10 { left: calc(30.4167% - 210px); top: 66%; transform: rotate(2deg); }

.gray-box img {
  border-radius: 32px;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5; /* Above gray-box (z-index 2/3) */
  pointer-events: none; /* Allows clicks to go through to images if needed */
}

.scroll-text.design-text {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
  font-size: 40px;
  font-family: 'Inria Serif', serif;
  font-style: italic;
  font-weight: 700;
  color: #20161B;
  z-index: auto; /* z-index is now controlled by parent */
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s, font-size 0.3s ease;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
  /* background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);  */
  border-radius: 32px;
  padding: 12px 20px;
}

.pair-text {
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
  font-size: 40px;
  font-family: 'Inria Serif', serif;
  font-style: italic;
  font-weight: 700;
  color: #20161B;
  z-index: auto; /* z-index is now controlled by parent */
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s, font-size 0.3s ease;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.left-word {
  display: inline-block;
  line-height: 1;
  font-size: 40px;
  transition: transform 0.2s, font-size 0.3s ease, margin 0.3s ease;

  position: absolute;
  position: relative;
  left: -140px;
  top: 0px;
  transform: none;

  /* background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  padding: 12px 20px;
  border-radius: 32px;
}

.right-word {
  display: inline-block;
  line-height: 1;
  font-size: 40px;
  transition: transform 0.2s, font-size 0.3s ease, margin 0.3s ease;

  position: absolute;
  position: relative;
  left: 140px;
  top: 0px;
  transform: none; 

  /* background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  
  padding: 12px 20px;
  border-radius: 32px;
}


.left-text, .right-text {
  opacity: 0;
}

.spacer {
  display: none;
}


@media (max-width: 480px) {
  #scroll-animation-section-unique {
    min-height: 50vh;
  }
  
  .animation-container {
    margin-top: 150px;
    height: 60vh;
  }
  
  .gray-box {
    width: 220px;
    height: 130px;
  }
  
  .scroll-text.design-text {
    font-size: 24px;
    top: 47.6%;
    transform: translate(-50%, 0);
  }
  
  .pair-text {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    top: 80%;
    left: 50%;
    transform: translate(-50%, 0);
  }
  
  .left-word {
    font-size: 24px;
    margin: 0;
    position: relative;
    left: 140px;
    top: -220px;
    transform: none;
  }

  .right-word {
    font-size: 24px;
    margin: 0;
    position: relative;
    left: -140px;
    top: -220px;
    transform: none;
  }
  
  .gray-box.box1 { left: calc(9.0465% - 80px); top: 6.0016%; }
  .gray-box.box2 { left: calc(41.48.2407% - 80px); top: 19.0144%; }
  .gray-box.box3 { left: calc(72.0465% - 80px); top: 32.0249%; }
  .gray-box.box4 { left: calc(70.0465% - 80px); top: 62.0379%; }
  .gray-box.box5 { left: calc(45.0465% - 80px); top: 67.0431%; }
  .gray-box.box6 { left: calc(30% - 80px); top: 70%; }
  .gray-box.box7 { left: calc(25% - 80px); top: 25%; }
  .gray-box.box8 { left: calc(-8.9535% - 80px); top: 41.0273%; }
  .gray-box.box9 { left: calc(76.0465% - 80px); top: 44.0288%; }
  .gray-box.box10 { left: calc(-6.9535% - 80px); top: 56.0341%; }
}

@media (max-width: 900px) {
  #scroll-animation-section-unique {
    display: none !important;
  }
  .animation-container {
    height: 60vh;
    margin-top: 60px;
  }
  .gray-box {
    width: 90vw;
    max-width: 320px;
    height: 120px;
    border-radius: 20px;
    font-size: 18px;
  }
  .scroll-text.design-text,
  .pair-text {
    font-size: 20px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  #scroll-animation-section-unique {
    min-height: 40vh;
    padding: 0 2vw;
  }
  .animation-container {
    height: 40vh;
    margin-top: 24px;
  }
  .gray-box {
    width: 96vw;
    max-width: 220px;
    height: 80px;
    border-radius: 14px;
    font-size: 14px;
  }
  .scroll-text.design-text,
  .pair-text {
    font-size: 14px;
    padding: 2px 4px;
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .gray-box img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

@media (hover: hover) {
  .gray-box {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, z-index 0.15s ease-out;
  }
  
  .gray-box:hover {
    transition-delay: 0.05s;
    z-index: 10001 !important;
  }
  
  .gray-box.box1:hover { 
    transform: scale(1.03) rotate(-8deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box2:hover { 
    transform: scale(1.03) rotate(12deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box3:hover { 
    transform: scale(1.03) rotate(18deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box4:hover { 
    transform: scale(1.03) rotate(8deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box5:hover { 
    transform: scale(1.03) rotate(-10deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box6:hover { 
    transform: scale(1.03) rotate(-14deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box7:hover { 
    transform: scale(1.03) rotate(12.0001deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box8:hover { 
    transform: scale(1.03) rotate(4deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box9:hover { 
    transform: scale(1.03) rotate(-12.0001deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
  .gray-box.box10:hover { 
    transform: scale(1.03) rotate(2deg); 
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12); 
    transition-delay: 0.05s;
  }
}

@media (hover: none) {
  .gray-box {
    touch-action: manipulation;
  }
} 

.gray-rotate.rotate-1 { transform: rotate(-8deg); }
.gray-rotate.rotate-2 { transform: rotate(12deg); }
.gray-rotate.rotate-3 { transform: rotate(18deg); }
.gray-rotate.rotate-4 { transform: rotate(8deg); }
.gray-rotate.rotate-5 { transform: rotate(-10deg); }
.gray-rotate.rotate-6 { transform: rotate(-14deg); }
.gray-rotate.rotate-7 { transform: rotate(12.0001deg); }
.gray-rotate.rotate-8 { transform: rotate(4deg); }
.gray-rotate.rotate-9 { transform: rotate(-12.0001deg); }
.gray-rotate.rotate-10 { transform: rotate(2deg); } 