/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Cormorant+Garamond:wght@300;400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;600;700&display=swap');

/* Reset & Smooth Scroll */
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  scroll-padding-top: 100px;
}

/* Glass Navigation Bar */
.glass-nav {
  background: rgba(255, 255, 255, 0.1); /* Lowered opacity for a frostier look */
  backdrop-filter: blur(30px); /* Increased blur for more frosting */
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15); /* Subtler border */
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05); /* Softer shadow + inner highlight */
  filter: drop-shadow(0 25px 25px rgba(0,0,0,0.35));
}

/* Navigation Logo */
.nav-logo {
  font-family: 'Playfair Display', serif;
  color: #2a2a2a;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: #9D7FFF;
}

/* Navigation Links */
.nav-link {
  color: #4a4a4a;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-link:hover {
  color: #FF007F;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #FF007F;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

/* Language Selector Styles */
.language-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-btn {
  padding: 8px 16px;
  border: 1px solid rgba(74, 74, 74, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #4a4a4a;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(74, 74, 74, 0.5);
  transform: translateY(-1px);
  color: #2a2a2a;
}

.lang-btn.active {
  background: rgba(157, 127, 255, 0.15);
  border-color: rgba(157, 127, 255, 0.4);
  color: #9D7FFF;
  font-weight: 600;
}

/* Dark theme language selector */
.bg-black .lang-btn {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.bg-black .lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.bg-black .lang-btn.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Custom Cursor Styles */
body, a, button {
    cursor: none;
}

.custom-cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: #FF007F;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.custom-cursor-aura {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 0, 127, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.3s ease,
                height 0.3s ease,
                border-color 0.3s ease;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.1) 0%, rgba(255, 0, 127, 0) 60%);
}

body:has(a:hover, button:hover) .custom-cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: #FF007F;
}

body:has(a:hover, button:hover) .custom-cursor-aura {
    width: 60px;
    height: 60px;
    border-color: #FF007F;
}

/* Hero Section Wrapper - Stays visible */
.hero-wrapper {
  height: 100vh;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: auto;
  opacity: 1;
  margin: 0;
  padding: 0;
}

.hero-sticky {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.hero-content-wrapper {
  position: relative;
  z-index: 4;
  width: 100%;
  opacity: 1;
  visibility: visible;
}

/* Grid background pattern */
.hero-bg {
  background-color: #e8eaf0;
  background-image: 
    linear-gradient(#2a2a3a 2px, transparent 2px),
    linear-gradient(90deg, #2a2a3a 2px, transparent 2px);
  background-size: 90px 90px;
}

/* Black Circle - Hidden (not used in simple version) */
.black-circle-container {
  display: none;
}

/* Features section dotted background */
.features-bg {
  background-color: #e8e8e8;
  background-image: 
    radial-gradient(circle, #6b6b6b 1px, transparent 1px);
  background-size: 20px 20px;
}

#features {
  position: relative;
  z-index: 10;
  background: #e8e8e8;
}

#about {
  position: relative;
  z-index: 10;
}

/* Simple Scroll Section with Circle Button */
.scroll-section-wrapper {
  min-height: 100vh; /* Reverted to 100vh */
  height: 100vh; /* Ensure it's exactly viewport height */
  position: relative;
  z-index: 1;
  display: flex; /* Re-added flex to center content */
  align-items: center; /* Re-added flex to center content */
  justify-content: center; /* Re-added flex to center content */
  overflow: hidden;
  padding-top: 0;
  background: #000000;
  --sphere-color-1: rgba(200, 200, 200, 0.9);
  --sphere-color-2: rgba(150, 150, 150, 0.7);
  --sphere-color-3: rgba(100, 100, 100, 0.5);
  --sphere-shadow: rgba(0, 0, 0, 0.3);
  transition: --sphere-color-1 0.5s, --sphere-color-2 0.5s, --sphere-color-3 0.5s;
}

.scroll-trigger-area {
  min-height: 100vh; /* Reverted */
  height: 100vh;
  width: 100%;
  position: relative; /* Reverted from sticky */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  z-index: 10;
}

/* Scrolling Text Animations - New Roulette System */
.scroll-text-container {
  position: absolute;
  top: 45%;
  left: 25%;
  transform: translateY(-50%);
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}

/* Large Arrow - Fixed left side */
.scroll-text-container::before {
  display: none; /* Hide the arrow */
  content: '→';
  position: absolute; /* Change to absolute to stick with the parent */
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  font-weight: 900;
  color: #ffffff; /* Change arrow color to white */
  z-index: 25;
  pointer-events: none;
  line-height: 1;
}

/* Text wrapper for vertical stack */
.scroll-text {
  font-family: 'Quivert', sans-serif;
  font-size: 5rem; /* Adjust size if needed */
  font-weight: normal;
  line-height: 1.2;
  color: #ffffff;
  opacity: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.04em;
  line-height: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
  pointer-events: none;
  filter: blur(8px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: capitalize;
  transform: translateX(-50%);
  text-align: center;
}

/* Active text - large, black, sharp */
.scroll-text[data-position="0"] {
  color: #ffffff; /* Change active text color to white */
  filter: blur(0);
  font-size: 5.5rem;
  opacity: 1;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* Texts above active */
.scroll-text[data-position="-1"] {
  color: rgba(255, 255, 255, 0.25); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(6px);
  opacity: 1;
  transform: translate(-50%, calc(-50% - 120px));
}

.scroll-text[data-position="-2"] {
  color: rgba(255, 255, 255, 0.15); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(8px);
  opacity: 1;
  transform: translate(-50%, calc(-50% - 240px));
}

.scroll-text[data-position="-3"] {
  color: rgba(255, 255, 255, 0.1); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(10px);
  opacity: 0.8;
  transform: translate(-50%, calc(-50% - 360px));
}

/* Texts below active */
.scroll-text[data-position="1"] {
  color: rgba(255, 255, 255, 0.25); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(6px);
  opacity: 1;
  transform: translate(-50%, calc(-50% + 120px));
}

.scroll-text[data-position="2"] {
  color: rgba(255, 255, 255, 0.15); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(8px);
  opacity: 1;
  transform: translate(-50%, calc(-50% + 240px));
}

.scroll-text[data-position="3"] {
  color: rgba(255, 255, 255, 0.1); /* Change text color to white with opacity */
  font-size: 3.5rem;
  filter: blur(10px);
  opacity: 0.8;
  transform: translate(-50%, calc(-50% + 360px));
}

/* Hide texts outside range */
.scroll-text:not([data-position]) {
  opacity: 0;
  pointer-events: none;
}

/* Right Side Image Container - Sticky - HIDDEN */
.scroll-right-container {
  display: none;
}

/* Animated Cube Container with Glass Frame - HIDDEN */
.animated-cube-container {
  display: none;
}

.animated-cube-svg {
  display: none;
}

/* Cosmos Elements in Scroll Section */
/* Gradient Background - Changed to Black */
.scroll-section-wrapper .cosmos-gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: transparent;
  z-index: 1;
  display: none;
}

/* Spheres Container */
.scroll-section-wrapper .cosmos-spheres-container {
  display: none; /* Hide the spheres */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Cosmos Spheres - Floating 3D Balls - Same as Hero Balls */
.cosmos-sphere {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    var(--sphere-color-1), 
    var(--sphere-color-2), 
    var(--sphere-color-3));
  box-shadow: 
    0 30px 80px var(--sphere-shadow),
    inset -15px -15px 30px rgba(0, 0, 0, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.1);
  animation: floatSphere 8s ease-in-out infinite;
  will-change: transform;
  transition: background 0.5s ease-in-out;
}

/* Individual Sphere Styles */
.sphere-1 {
  width: 180px;
  height: 180px;
  top: 10%;
  left: 8%;
  animation-duration: 10s;
  animation-delay: 0s;
}

.sphere-2 {
  width: 240px;
  height: 240px;
  bottom: 15%;
  left: 5%;
  animation-duration: 12s;
  animation-delay: -2s;
}

.sphere-3 {
  width: 150px;
  height: 150px;
  top: 45%;
  left: 25%;
  animation-duration: 9s;
  animation-delay: -4s;
}

.sphere-4 {
  width: 120px;
  height: 120px;
  top: 25%;
  right: 15%;
  animation-duration: 11s;
  animation-delay: -1s;
}

.sphere-5 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  right: 10%;
  animation-duration: 13s;
  animation-delay: -3s;
}

.sphere-6 {
  width: 90px;
  height: 90px;
  top: 60%;
  right: 25%;
  animation-duration: 8s;
  animation-delay: -5s;
}

.sphere-7 {
  width: 160px;
  height: 160px;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  animation-duration: 10.5s;
  animation-delay: -2.5s;
}

.sphere-8 {
  width: 110px;
  height: 110px;
  bottom: 35%;
  right: 8%;
  animation-duration: 9.5s;
  animation-delay: -6s;
}

.sphere-9 {
  width: 130px;
  height: 130px;
  top: 70%;
  left: 12%;
  animation-duration: 11.5s;
  animation-delay: -1.5s;
}

.sphere-10 {
  width: 95px;
  height: 95px;
  top: 80%;
  right: 30%;
  animation-duration: 8.5s;
  animation-delay: -7s;
}

.sphere-11 {
  width: 170px;
  height: 170px;
  top: 55%;
  right: 5%;
  animation-duration: 12.5s;
  animation-delay: -4s;
}

.sphere-12 {
  width: 140px;
  height: 140px;
  bottom: 10%;
  left: 35%;
  animation-duration: 10s;
  animation-delay: -2.5s;
}

.sphere-13 {
  width: 105px;
  height: 105px;
  top: 35%;
  left: 18%;
  animation-duration: 9s;
  animation-delay: -3.5s;
}

.sphere-14 {
  width: 85px;
  height: 85px;
  bottom: 25%;
  right: 18%;
  animation-duration: 8s;
  animation-delay: -5.5s;
}

.sphere-15 {
  width: 125px;
  height: 125px;
  top: 50%;
  left: 45%;
  animation-duration: 11s;
  animation-delay: -4.5s;
}

.sphere-16 {
  width: 100px;
  height: 100px;
  bottom: 45%;
  left: 8%;
  animation-duration: 9.2s;
  animation-delay: -6.5s;
}

.sphere-17 {
  width: 115px;
  height: 115px;
  top: 65%;
  right: 12%;
  animation-duration: 10.8s;
  animation-delay: -2.8s;
}

.sphere-18 {
  width: 135px;
  height: 135px;
  bottom: 8%;
  right: 35%;
  animation-duration: 12s;
  animation-delay: -1s;
}

/* Glow Effects Container */
.scroll-section-wrapper .cosmos-glow-effects {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Blue Glow Orbs Behind Text */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: glowPulse 6s ease-in-out infinite;
}

.glow-1 {
  width: 400px;
  height: 400px;
  top: 20%;
  left: 15%;
  background: radial-gradient(circle, 
    rgba(70, 130, 255, 0.8) 0%, 
    rgba(30, 80, 200, 0.4) 50%,
    transparent 100%);
  animation-duration: 8s;
}

.glow-2 {
  width: 500px;
  height: 500px;
  bottom: 15%;
  right: 20%;
  background: radial-gradient(circle, 
    rgba(100, 150, 255, 0.7) 0%, 
    rgba(50, 100, 220, 0.3) 50%,
    transparent 100%);
  animation-duration: 10s;
  animation-delay: -3s;
}

.glow-3 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, 
    rgba(150, 180, 255, 0.6) 0%, 
    rgba(80, 130, 200, 0.3) 50%,
    transparent 100%);
  animation-duration: 9s;
  animation-delay: -5s;
}

/* Sphere Floating Animation */
@keyframes floatSphere {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-15px, 20px) scale(0.95);
  }
  75% {
    transform: translate(25px, 15px) scale(1.02);
  }
}

/* Glow Pulse Animation */
@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cosmos-sphere {
    transform: scale(0.6);
  }
  
  .glow-orb {
    transform: scale(0.7);
  }
}

/* Section 3 - Using layer-hero-first class (already defined below) */

/* Responsive Styles for Scroll Section */
@media (max-width: 768px) {
  .scroll-section-wrapper {
    min-height: 100vh;
  }
  
  .scroll-trigger-area {
    min-height: 100vh;
    padding-top: 0;
  }
  
  .scroll-text-container {
    padding: 0 1rem;
  }
  
  .scroll-text-container::before {
    position: fixed;
    left: 5%;
    font-size: 5rem;
  }
  
  .scroll-text {
    font-size: 2.2rem;
    left: 58%;
  }
  
  .scroll-text[data-position="0"] {
    font-size: 3.5rem;
    left: 58%;
  }
  
  .scroll-text[data-position="-1"] {
    transform: translate(-50%, calc(-50% - 100px));
    left: 58%;
  }
  
  .scroll-text[data-position="1"] {
    transform: translate(-50%, calc(-50% + 100px));
    left: 58%;
  }
  
  .scroll-text[data-position="-2"] {
    transform: translate(-50%, calc(-50% - 200px));
    left: 58%;
  }
  
  .scroll-text[data-position="2"] {
    transform: translate(-50%, calc(-50% + 200px));
    left: 58%;
  }
  
  .scroll-text[data-position="-3"] {
    transform: translate(-50%, calc(-50% - 300px));
    left: 58%;
  }
  
  .scroll-text[data-position="3"] {
    transform: translate(-50%, calc(-50% + 300px));
    left: 58%;
  }

  .scroll-right-container {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    padding: 2rem;
    margin-top: 2rem;
  }

  .animated-cube-container {
    max-width: 100%;
    padding: 2rem;
    margin-top: 2rem;
  }
  
  .animated-cube-svg {
    max-width: 100%;
  }
  
  .home-circle-button {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }
  
  .home-circle-button svg {
    width: 24px;
    height: 24px;
  }
}

/* Vector Images in White Section */
.vector-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.vector-img {
  position: absolute;
  width: 80px;
  height: auto;
  object-fit: contain;
  opacity: 0.4;
  filter: grayscale(0.5);
}

.vector-1 {
  top: 8%;
  left: 5%;
  width: 70px;
}

.vector-2 {
  top: 8%;
  right: 8%;
  width: 75px;
}

.vector-3 {
  top: 30%;
  left: 10%;
  width: 65px;
}

.vector-4 {
  top: 28%;
  right: 12%;
  width: 80px;
}

.vector-5 {
  top: 52%;
  left: 6%;
  width: 70px;
}

.vector-6 {
  top: 50%;
  right: 8%;
  width: 75px;
}

.vector-7 {
  bottom: 20%;
  left: 15%;
  width: 68px;
}

.vector-8 {
  bottom: 18%;
  right: 18%;
  width: 72px;
}

.vector-9 {
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 85px;
}

.vector-10 {
  display: none;
}

.vector-11 {
  display: none;
}

/* Home Circle Button */
.home-circle-button {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9D7FFF, #C8B9FF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 40px rgba(157, 127, 255, 0.4);
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  cursor: pointer;
}

.home-circle-button.visible {
  opacity: 1;
  transform: scale(1);
}

.home-circle-button:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 50px rgba(157, 127, 255, 0.6);
}

.home-circle-button svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Layer Sections */
.layer-section {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
}

.layer-content-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Layer Spheres Opening - First Section After Portal */
.layer-spheres-opening {
  background: #e8e8e8;
  background-image: radial-gradient(circle, #6b6b6b 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding-top: 8rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.parallax-spheres-container-inline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.parallax-sphere-inline {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    rgba(200, 200, 200, 0.9), 
    rgba(150, 150, 150, 0.7), 
    rgba(100, 100, 100, 0.5));
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset -15px -15px 30px rgba(0, 0, 0, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.1);
  will-change: transform;
}

.sphere-inline-1 {
  width: 160px;
  height: 160px;
  top: 10%;
  left: 8%;
  opacity: 0.7;
  animation: sphereFloat1 8s ease-in-out infinite;
}

.sphere-inline-2 {
  width: 120px;
  height: 120px;
  top: 55%;
  right: 10%;
  opacity: 0.6;
  animation: sphereFloat2 7s ease-in-out infinite;
}

.sphere-inline-3 {
  width: 200px;
  height: 200px;
  top: 30%;
  right: 35%;
  opacity: 0.5;
  animation: sphereFloat3 9s ease-in-out infinite;
}

.sphere-inline-4 {
  width: 90px;
  height: 90px;
  bottom: 20%;
  left: 18%;
  opacity: 0.6;
  animation: sphereFloat4 6.5s ease-in-out infinite;
}

.sphere-inline-5 {
  width: 140px;
  height: 140px;
  top: 70%;
  right: 22%;
  opacity: 0.7;
  animation: sphereFloat5 7.5s ease-in-out infinite;
}

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

@keyframes sphereFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-25px, 25px); }
}

@keyframes sphereFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, 15px); }
}

@keyframes sphereFloat4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -15px); }
}

@keyframes sphereFloat5 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, 22px); }
}

.layer-spheres-opening .layer-content-wrapper {
  position: relative;
  z-index: 10;
  padding-top: 0;
  margin-top: 0;
}

.layer-spheres-opening .layer-4-opening {
  margin-bottom: 0;
  margin-top: 0;
  padding-top: 0;
}

.layer-spheres-opening .layer-4-opening-title {
  margin-top: 0;
  padding-top: 0;
}

/* Layer 1: Hero - Refined Dark Theme */
.layer-hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* First Hero Section with Clean White Background */
.layer-hero-first {
  background: #ffffff;
  margin-top: 0;
  padding: 6rem 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  min-height: auto;
}

.refined-hero-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  padding: 0;
  position: relative;
  z-index: 10;
}

.refined-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  margin-bottom: 2rem;
  margin-top: 0;
  padding-top: 0;
  font-weight: 700;
}

.refined-line {
  display: block;
  color: #000000;
  font-weight: 700;
  line-height: 1.2;
  opacity: 1;
  transform: translateY(0);
}

.refined-line-1 {
  font-size: 8rem;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  font-weight: 700;
  animation: aggressiveSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.refined-line-2 {
  font-size: 3rem;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: #333333;
  animation: aggressiveSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

@keyframes aggressiveSlideIn {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.refined-description {
  max-width: 680px;
  margin: 0 auto;
}

.refined-paragraph {
  font-size: 1.25rem;
  color: #666666;
  line-height: 1.9;
  margin-bottom: 1rem;
  opacity: 1;
  transform: translateX(0);
  font-weight: 400;
}

.refined-paragraph strong {
  color: #000000;
  font-weight: 700;
}

.refined-para-1 {
  animation: aggressiveFadeInLeft 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s forwards;
}

.refined-para-2 {
  animation: aggressiveFadeInRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
}

.refined-para-3 {
  animation: aggressiveFadeInLeft 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s forwards;
}

.refined-para-4 {
  animation: aggressiveFadeInRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
  font-weight: 600;
  font-size: 1.25rem;
  color: #000000;
}

@keyframes aggressiveFadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  60% {
    opacity: 1;
    transform: translateX(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aggressiveFadeInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  60% {
    opacity: 1;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Old styles backup */
.layer-title {
  font-size: 4rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  font-family: 'Bodoni Moda', serif;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.layer-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
  line-height: 1.8;
}

.layer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #9D7FFF;
  font-family: 'Bodoni Moda', serif;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Layer 2: Services */
.layer-services {
  background: #fafafa;
  padding: 1rem 2rem 2rem;
  margin-top: 0;
}

.layer-section-title {
  font-size: 4.5rem;
  font-weight: 700;
  color: #000000;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  margin-top: 0;
  padding-top: 0;
  line-height: 1.1;
}

.layer-section-subtitle {
  font-size: 1.5rem;
  color: #666666;
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 0;
  padding-top: 0;
  font-weight: 400;
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  background: #ffffff;
  border-color: #e0e0e0;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 16px;
  color: #000000;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: #eeeeee;
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 1.125rem;
  color: #666666;
  line-height: 1.7;
  font-weight: 400;
}

/* Layer 3: Portfolio */
.layer-portfolio {
  background: #ffffff;
  padding: 6rem 2rem 4rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.portfolio-item:hover {
  transform: scale(1.03);
}

.portfolio-image-placeholder {
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.portfolio-overlay p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-weight: 400;
}

/* Layer 4: Products */
.layer-products {
  background: #fafafa;
  padding: 6rem 2rem 4rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 24px;
  padding: 3rem 2.5rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #9D7FFF, #C8B9FF);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  background: #ffffff;
  border-color: #e0e0e0;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.product-featured {
  background: #ffffff;
  border: 2px solid #000000;
  transform: scale(1.02);
}

.product-featured:hover {
  transform: scale(1.02) translateY(-4px);
}

.product-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-badge-featured {
  background: #000000;
  color: #ffffff;
}

.product-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.product-description {
  font-size: 1.125rem;
  color: #666666;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-weight: 400;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  padding: 1rem 0;
  color: #666666;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  padding-left: 2rem;
  transition: all 0.3s ease;
  font-weight: 400;
}

.product-features li:last-child {
  border-bottom: none;
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #000000;
  font-weight: 700;
  font-size: 1.25rem;
}

.product-features li:hover {
  color: #000000;
  padding-left: 2.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .scroll-section-wrapper {
    min-height: 150vh;
  }
  
  .scroll-trigger-area {
    min-height: 150vh;
  }
  
  .scroll-text-container {
    height: 100vh;
    padding: 0 2rem;
  }
  
  .scroll-text-container::before {
    left: 2rem;
    font-size: 2.5rem;
  }
  
  .scroll-section-wrapper {
    min-height: 100vh;
  }
  
  .scroll-trigger-area {
    min-height: 100vh;
  }
  
  .scroll-text-container {
    padding: 0 2rem;
  }
  
  .scroll-text-container::before {
    position: fixed;
    left: 8%;
    font-size: 7rem;
  }
  
  .scroll-text {
    font-size: 3rem;
    font-weight: 900;
    white-space: nowrap;
    left: 56%;
  }
  
  .scroll-text[data-position="0"] {
    font-size: 5rem;
    left: 56%;
  }
  
  .scroll-text[data-position="-1"] {
    left: 56%;
  }
  
  .scroll-text[data-position="1"] {
    left: 56%;
  }
  
  .scroll-text[data-position="-2"] {
    left: 56%;
  }
  
  .scroll-text[data-position="2"] {
    left: 56%;
  }
  
  .scroll-text[data-position="-3"] {
    left: 56%;
  }
  
  .scroll-text[data-position="3"] {
    left: 56%;
  }
  
  .vector-img {
    width: 50px !important;
  }
  
  .vector-9 {
    width: 55px !important;
  }
  
  .home-circle-button {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }
  
  .home-circle-button svg {
    width: 24px;
    height: 24px;
  }
  
  .portal-text h2 {
    font-size: 2rem;
    padding: 0 2rem;
  }
  
  .floating-ball {
    transform: scale(0.7);
  }
  
  .layer-section {
    padding: 3rem 1.5rem;
    min-height: auto;
  }
  
  .portal-scrollable-content {
    padding-top: 0;
    margin-top: 0;
  }
  
  .layer-hero-first {
    padding: 4rem 1.5rem 0;
    min-height: auto;
  }
  
  .layer-section {
    padding: 2rem 1.5rem 2rem;
    align-items: flex-start;
  }
  
  .layer-services {
    padding: 0.5rem 1.5rem 3rem;
  }
  
  .layer-portfolio,
  .layer-products {
    padding: 0 1.5rem 3rem;
  }
  
  .parallax-sphere-inline {
    transform: scale(0.6);
  }
  
  .layer-spheres-opening {
    padding: 3rem 1.5rem;
  }
  
  .layer-title {
    font-size: 2.5rem;
  }
  
  .layer-subtitle {
    font-size: 1.125rem;
  }
  
  .layer-section-title {
    font-size: 2rem;
  }
  
  .layer-section-subtitle {
    font-size: 1rem;
  }
  
  .layer-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .portfolio-image-placeholder {
    height: 250px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .product-card {
    padding: 2.5rem 2rem;
  }
  
  .product-featured {
    transform: scale(1);
  }
  
  .product-featured:hover {
    transform: translateY(-10px);
  }
  
  .product-card h3 {
    font-size: 1.75rem;
  }
  
  /* Layer 3 Responsive */
  .layer-3-title {
    font-size: 2.5rem;
  }
  
  .layer-3-subtitle {
    font-size: 1rem;
  }
  
  .layer-3-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card-number {
    font-size: 2.5rem;
  }
  
  /* Layer 4 Responsive */
  .layer-4-opening-line-1 {
    font-size: 3rem;
  }
  
  .layer-4-opening-line-2 {
    font-size: 1.5rem;
  }
  
  .layer-4-opening-para {
    font-size: 1rem;
  }
  
  .layer-4-title {
    font-size: 2.5rem;
  }
  
  .layer-4-subtitle {
    font-size: 1.125rem;
  }
  
  .layer-4-features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .parallax-sphere {
    transform: scale(0.7) !important;
  }
  
  .layer-4-main-content {
    padding: 3rem 1.5rem 6rem;
  }
  
  .layer-4-opening {
    margin-bottom: 4rem;
  }
  
  /* Refined Hero Responsive */
  .refined-line-1 {
    font-size: 4rem;
    letter-spacing: -0.03em;
  }
  
  .refined-line-2 {
    font-size: 2rem;
    letter-spacing: -0.015em;
  }
  
  .refined-paragraph {
    font-size: 1.125rem;
    line-height: 1.8;
  }
  
  .refined-title {
    margin-bottom: 2rem;
  }
  
  .refined-para-4 {
    font-size: 1.125rem;
  }
  
  .layer-section-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
  }
  
  .layer-section-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    margin-top: 0;
  }
  
  .service-card h3,
  .product-card h3 {
    font-size: 1.5rem;
  }
  
  .service-card p,
  .product-card p,
  .product-description {
    font-size: 1rem;
  }
}

/* ========================================
   PORTAL GATE ANIMATIONS (Layer 2 -> Layer 3)
   ======================================== */

.portal-gate-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
}

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

.portal-circle-gate {
  width: 200px;
  height: 200px;
  border-radius: 0px;
  background: radial-gradient(circle, #9D7FFF 0%, #6B5FFF 50%, #000000 100%);
  box-shadow: 
    0 0 80px rgba(157, 127, 255, 0.6),
    inset 0 0 60px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: scale(0);
  transition: all 0.8s ease;
}

.portal-circle-gate.active {
  opacity: 1;
  transform: scale(1);
  animation: pulseGate 3s ease-in-out infinite;
}

@keyframes pulseGate {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 80px rgba(157, 127, 255, 0.6), inset 0 0 60px rgba(0, 0, 0, 0.8);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 120px rgba(157, 127, 255, 0.8), inset 0 0 80px rgba(0, 0, 0, 0.6);
  }
}

.portal-gate-text {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}

.portal-circle-gate.active + .portal-gate-text {
  opacity: 1;
}

.portal-gate-text h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Bodoni Moda', serif;
}

/* ========================================
   LAYER 3: HONEYCOMB PATTERN
   ======================================== */

.layer-3-wrapper {
  min-height: 150vh;
  position: relative;
  z-index: 1;
}

.layer-3-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.honeycomb-background {
  position: absolute;
  inset: 0;
  background-color: #0a0a0a;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(157, 127, 255, 0.03) 35px, rgba(157, 127, 255, 0.03) 36px),
    repeating-linear-gradient(60deg, transparent, transparent 35px, rgba(157, 127, 255, 0.03) 35px, rgba(157, 127, 255, 0.03) 36px),
    repeating-linear-gradient(120deg, transparent, transparent 35px, rgba(157, 127, 255, 0.03) 35px, rgba(157, 127, 255, 0.03) 36px);
  background-size: 70px 120px;
  z-index: 1;
}

.layer-3-content {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.layer-3-inner {
  max-width: 1200px;
  width: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.layer-3-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.layer-3-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  font-family: 'Bodoni Moda', serif;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #9D7FFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.layer-3-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 4rem;
}

.layer-3-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.layer-3-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 127, 255, 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.layer-3-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(157, 127, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.layer-3-card:hover::before {
  opacity: 1;
}

.layer-3-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(157, 127, 255, 0.4);
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(157, 127, 255, 0.2);
}

.card-number {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(157, 127, 255, 0.3);
  font-family: 'Bodoni Moda', serif;
  margin-bottom: 1rem;
  line-height: 1;
}

.layer-3-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  font-family: 'Bodoni Moda', serif;
}

.layer-3-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* Second Portal Gate */
.portal-gate-2-section {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}

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

.portal-circle-gate-2 {
  width: 150px;
  height: 150px;
  border-radius: 0px;
  background: #000000;
  box-shadow: 
    0 0 100px rgba(0, 0, 0, 0.9),
    inset 0 0 50px rgba(157, 127, 255, 0.3);
  opacity: 0;
  transform: scale(0);
  transition: all 1s ease;
}

.portal-circle-gate-2.expanding {
  opacity: 1;
  transform: scale(50);
}

/* ========================================
   LAYER 4: FLOATING SPHERES & PARALLAX
   ======================================== */

.layer-4-wrapper {
  min-height: 150vh;
  position: relative;
  background: #e8e8e8;
}

.layer-4-content {
  position: relative;
  min-height: 150vh;
}

.layer-4-dots-bg {
  position: fixed;
  inset: 0;
  background-color: #e8e8e8;
  background-image: radial-gradient(circle, #6b6b6b 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 1;
}

.parallax-spheres-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.parallax-sphere {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    rgba(200, 200, 200, 0.8), 
    rgba(150, 150, 150, 0.6), 
    rgba(100, 100, 100, 0.4));
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset -15px -15px 30px rgba(0, 0, 0, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.1);
  will-change: transform;
  transition: transform 0.1s linear;
}

.sphere-1 {
  width: 180px;
  height: 180px;
  top: 15%;
  left: 10%;
  opacity: 0.7;
}

.sphere-2 {
  width: 140px;
  height: 140px;
  top: 60%;
  right: 12%;
  opacity: 0.6;
}

.sphere-3 {
  width: 220px;
  height: 220px;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
}

.sphere-4 {
  width: 100px;
  height: 100px;
  bottom: 25%;
  left: 20%;
  opacity: 0.6;
}

.sphere-5 {
  width: 160px;
  height: 160px;
  top: 75%;
  right: 25%;
  opacity: 0.7;
}

.layer-4-main-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

/* Layer 4 Opening Statement */
.layer-4-opening {
  max-width: 900px;
  margin: 0 auto 6rem;
  text-align: center;
}

.layer-4-opening-title {
  margin-top: 0;
}

.layer-4-opening-title {
  font-family: 'Bodoni Moda', serif;
  margin-bottom: 3rem;
}

.layer-4-opening-line-1,
.layer-4-opening-line-2 {
  display: block;
  color: #000000;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(40px);
  margin-top: 0;
}

.layer-4-opening-line-1 {
  font-size: 5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  animation: layer4AggressiveSlide 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.layer-4-opening-line-2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  font-weight: 500;
  animation: layer4AggressiveSlide 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

@keyframes layer4AggressiveSlide {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.layer-4-opening-description {
  max-width: 750px;
  margin: 0 auto;
}

.layer-4-opening-para {
  font-size: 1.125rem;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-30px);
}

.layer-4-opening-para:nth-child(1) {
  animation: layer4AggressiveFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
}

.layer-4-opening-para:nth-child(2) {
  animation: layer4AggressiveFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
  font-weight: 600;
  color: #000000;
}

@keyframes layer4AggressiveFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  60% {
    opacity: 1;
    transform: translateX(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Old Layer 4 Title Styles (backup) */
.layer-4-title {
  font-size: 4rem;
  font-weight: 700;
  color: #2a2a2a;
  text-align: center;
  font-family: 'Bodoni Moda', serif;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.layer-4-subtitle {
  font-size: 1.5rem;
  color: #6b6b6b;
  text-align: center;
  margin-bottom: 6rem;
}

.layer-4-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.layer-4-feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  transition: all 0.4s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.layer-4-feature-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-15px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9D7FFF, #C8B9FF);
  border-radius: 20px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.layer-4-feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(157, 127, 255, 0.4);
}

.layer-4-feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 1rem;
  font-family: 'Bodoni Moda', serif;
}

.layer-4-feature-card p {
  font-size: 1rem;
  color: #6b6b6b;
  line-height: 1.6;
}

.layer-4-cta {
  text-align: center;
  margin-top: 4rem;
}

.layer-4-btn {
  display: inline-block;
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, #ff49bc, #ff6af0);
  color: #8a1cff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 15px 40px rgba(157, 127, 255, 0.4);
  transition: all 0.3s ease;
}

.layer-4-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(157, 127, 255, 0.5);
}

/* Hero content animation */
.hero-content {
  opacity: 0;
  animation: heroFadeIn 1s ease-out 0.3s forwards;
}

.hero-logo {
  opacity: 0;
  position: relative;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: elegantFadeIn 1.5s ease-out 2s forwards,
             logoGentleFloat 8s ease-in-out 4s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

.hero-logo-main {
  background: linear-gradient(
    135deg,
    #f5f5f5 0%,
    #ffffff 50%,
    #f5f5f5 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 0.4em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9ca3af;
  opacity: 0;
  animation: subtitleFadeIn 1s ease-out 3.5s forwards;
}

/* Hero Main Title - Large H1 */
.hero-main-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 4rem; /* Adjusted for new font */
  line-height: 1.2;
  text-align: left;
  margin-bottom: 2rem;
  
  /* Holographic Gradient Effect */
  background: linear-gradient(90deg, #FD349C, #FF007F, #FF77FF, #FD349C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  animation: hologram-shine 4s linear infinite;
  
  opacity: 1; /* This will be overridden by anim-target-1, but good for fallback */
  visibility: visible;
}

.hero-subtitle-text {
  font-family: 'Playfair Display', serif;
  font-weight: 400;  font-size: 1.25rem;
  line-height: 1.6;
  color: #ffffff; /* Darker gray for better contrast */
  text-align: left;
  max-width: none;
  opacity: 1; /* This will be overridden by anim-target-1, but good for fallback */
  visibility: visible;
}

@keyframes hologram-shine {
  to {
    background-position: 200% center;
  }
}

.hero-subtitle-text {
  font-family: 'Lilita One', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400; /* Lilita One is a single-weight font */
  font-size: 1.5rem; /* Slightly increased for the new font */
  line-height: 1.6;
  color: #ccc;
  text-align: center;
  max-width: 500px;
}

@media (min-width: 640px) {
  .hero-subtitle-text {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-subtitle-text {
    font-size: 1.75rem;
  }
}

.hero-logo::before {
  content: "CodeBySel";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    rgba(135, 235, 255, 0.5) 0%,
    rgba(107, 95, 255, 0.5) 50%,
    rgba(200, 185, 255, 0.5) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(8px);
  opacity: 0.6;
  animation: hologramGlow 4s ease-in-out infinite;
  -webkit-text-stroke: 0px transparent;
}

.hero-logo::after {
  content: "CodeBySel";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 0;
  background: linear-gradient(
    90deg,
    rgba(107, 95, 255, 0.4) 0%,
    rgba(157, 127, 255, 0.4) 50%,
    rgba(90, 75, 184, 0.4) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.3;
  filter: blur(1px);
  -webkit-text-stroke: 0px transparent;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes logoAppear {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hologramShift {
  0%, 100% { 
    background-position: 0% 50%;
    filter: drop-shadow(0 0 20px rgba(135, 235, 255, 0.6)) 
            drop-shadow(0 0 40px rgba(107, 95, 255, 0.5))
            drop-shadow(0 4px 30px rgba(200, 185, 255, 0.4));
  }
  25% { 
    background-position: 50% 100%;
    filter: drop-shadow(0 0 25px rgba(157, 127, 255, 0.7)) 
            drop-shadow(0 0 45px rgba(107, 95, 255, 0.6))
            drop-shadow(0 4px 35px rgba(138, 111, 232, 0.5));
  }
  50% { 
    background-position: 100% 50%;
    filter: drop-shadow(0 0 30px rgba(200, 185, 255, 0.7)) 
            drop-shadow(0 0 50px rgba(90, 75, 184, 0.6))
            drop-shadow(0 4px 40px rgba(107, 95, 255, 0.5));
  }
  75% { 
    background-position: 50% 0%;
    filter: drop-shadow(0 0 25px rgba(73, 182, 255, 0.7)) 
            drop-shadow(0 0 45px rgba(135, 235, 255, 0.6))
            drop-shadow(0 4px 35px rgba(157, 127, 255, 0.5));
  }
}

@keyframes hologramGlow {
  0%, 100% { 
    opacity: 0.6;
    filter: blur(8px);
  }
  50% { 
    opacity: 0.8;
    filter: blur(12px);
  }
}

/* Clouds - keep for backward compatibility */
.cloud-wrap { 
  position: absolute; 
  inset: 0; 
  pointer-events: none;
  z-index: 1;
}

.cloud { 
  position: absolute; 
  left: 50%; 
  bottom: -2px; 
  width: 160%; 
  height: auto; 
  transform: translateX(-50%) translateY(100%);
  max-width: none; 
  opacity: 0;
  animation-play-state: paused; /* Start animations in a paused state */
}

.cloud-1 { 
  z-index: 1; 
  animation: cloudSlideIn 1.2s ease-out 1.5s forwards, cloudFloat1 22s ease-in-out 2.7s infinite; 
}

.cloud-2 { 
  z-index: 2; 
  animation: cloudSlideIn 1.2s ease-out 1.8s forwards, cloudFloat2 26s ease-in-out 3s infinite; 
}

.cloud-3 { 
  z-index: 3; 
  animation: cloudSlideIn 1.2s ease-out 2.1s forwards, cloudFloat3 30s ease-in-out 3.3s infinite; 
}

@keyframes cloudSlideIn {
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes cloudFloat1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

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

@keyframes cloudFloat3 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(16px); }
}

/* Lower Clouds for Features Section (from bottom) */
.lower-cloud-wrap { 
  position: absolute; 
  inset: 0; 
  pointer-events: none;
  z-index: 1;
}

.lower-cloud { 
  position: absolute; 
  left: 50%; 
  bottom: -2px; 
  width: 160%; 
  height: auto; 
  transform: translateX(-50%) translateY(100%);
  max-width: none; 
  opacity: 0;
}

@media (max-width: 768px) {
  .lower-cloud {
    width: 200%;
  }
}

.lower-cloud-1 { 
  z-index: 1;
  filter: brightness(1.6) contrast(1.1);
  animation: none;
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
}

.lower-cloud-2 { 
  z-index: 2; 
  filter: brightness(1.3) contrast(1.05);
  animation: none;
  transition: transform 1.2s ease-out 0.3s, opacity 1.2s ease-out 0.3s;
}

.lower-cloud-3 { 
  z-index: 3; 
  filter: brightness(0.85);
  animation: none;
  transition: transform 1.2s ease-out 0.6s, opacity 1.2s ease-out 0.6s;
}

/* Scroll-triggered lower clouds */
.lower-cloud.active { 
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
  animation: lowerCloudGentle 20s ease-in-out infinite;
}

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

/* Hero Spheres - Same as Scroll Section */
.hero-sphere {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    rgba(200, 200, 200, 0.9), 
    rgba(150, 150, 150, 0.7), 
    rgba(100, 100, 100, 0.5));
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset -15px -15px 30px rgba(0, 0, 0, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.1);
  will-change: transform;
  z-index: 1;
  animation: floatSphere 8s ease-in-out infinite;
}

.hero-sphere-1 {
  width: 180px;
  height: 180px;
  top: 15%;
  left: 8%;
  animation-duration: 10s;
  animation-delay: 0s;
}

.hero-sphere-2 {
  width: 240px;
  height: 240px;
  bottom: 15%;
  left: 5%;
  animation-duration: 12s;
  animation-delay: -2s;
}

.hero-sphere-3 {
  width: 150px;
  height: 150px;
  top: 45%;
  left: 25%;
  animation-duration: 9s;
  animation-delay: -4s;
}

.hero-sphere-4 {
  width: 120px;
  height: 120px;
  top: 25%;
  right: 15%;
  animation-duration: 11s;
  animation-delay: -1s;
}

.hero-sphere-5 {
  width: 390px; /* Increased size by 1.5x */
  height: 390px; /* Increased size by 1.5x */
  bottom: 20%;
  right: 10%;
  animation-duration: 13s;
  animation-delay: -3s;
  z-index: 5; /* Bring to front */
}

.hero-sphere-6 {
  width: 90px;
  height: 90px;
  top: 60%;
  right: 25%;
  animation-duration: 8s;
  animation-delay: -5s;
}

.hero-sphere-7 {
  width: 220px; /* Increased size */
  height: 220px; /* Increased size */
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation-duration: 10.5s;
  animation-delay: -2.5s;
  z-index: 5; /* Bring to front */
}

.hero-sphere-8 {
  width: 110px;
  height: 110px;
  bottom: 35%;
  right: 8%;
  animation-duration: 9.5s;
  animation-delay: -6s;
}

@keyframes floatSphere {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-15px, 20px) scale(0.95);
  }
  75% {
    transform: translate(25px, 15px) scale(1.02);
  }
}

/* Old ball styles - keep for backward compatibility if needed */
.ball {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.3));
  will-change: transform, opacity;
  z-index: 1;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  display: none;
}

/* Add floating animation when in hero section */
.ball.floating {
  transition: none;
}

/* Bouncing animation when scrolling */
.ball.bouncing {
  transition: transform 0.15s ease-out, opacity 0.3s ease-out;
}

.ball-1 {
  width: 250px;
  height: 250px;
  top: -300px;
  left: 5%;
  animation: ballDropIn1 2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.ball-1.floating {
  animation: ballDropIn1 2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards, ballFloat1 5s ease-in-out 2.3s infinite;
}

.ball-2 {
  width: 180px;
  height: 180px;
  top: -300px;
  right: 8%;
  animation: ballDropIn2 2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards;
}

.ball-2.floating {
  animation: ballDropIn2 2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards, ballFloat2 6s ease-in-out 2.7s infinite;
}

.ball-3 {
  width: 200px;
  height: 200px;
  top: -300px;
  left: 60%;
  animation: ballDropIn3 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
}

.ball-3.floating {
  animation: ballDropIn3 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards, ballFloat3 5.5s ease-in-out 3.1s infinite;
}

.ball-4 {
  width: 140px;
  height: 140px;
  top: -300px;
  left: 28%;
  animation: ballDropIn4 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
}

.ball-4.floating {
  animation: ballDropIn4 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards, ballFloat4 4.5s ease-in-out 3.5s infinite;
}

/* Ball Drop-in Animations - Lower positions */
@keyframes ballDropIn1 {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(550px);
    opacity: 1;
  }
}

@keyframes ballDropIn2 {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(560px);
    opacity: 1;
  }
}

@keyframes ballDropIn3 {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(540px);
    opacity: 1;
  }
}

@keyframes ballDropIn4 {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(500px);
    opacity: 1;
  }
}

/* Ball Floating Animations - Different Directions */
/* Ball 1 - Sağa Hareket (Right) */
@keyframes ballFloat1 {
  0%, 100% {
    transform: translateY(550px) translateX(0);
  }
  50% {
    transform: translateY(550px) translateX(60px);
  }
}

/* Ball 2 - Yukarı Hareket (Up) */
@keyframes ballFloat2 {
  0%, 100% {
    transform: translateY(560px) translateX(0);
  }
  50% {
    transform: translateY(520px) translateX(0);
  }
}

/* Ball 3 - Aşağı Hareket (Down) */
@keyframes ballFloat3 {
  0%, 100% {
    transform: translateY(540px) translateX(0);
  }
  50% {
    transform: translateY(580px) translateX(0);
  }
}

/* Ball 4 - Sola Hareket (Left) */
@keyframes ballFloat4 {
  0%, 100% {
    transform: translateY(500px) translateX(0);
  }
  50% {
    transform: translateY(500px) translateX(-60px);
  }
}

/* Ball animations are now controlled by scroll */

/* Typewriter Text Animation */
@keyframes typewriterAppear {
  0% {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    width: 100%;
  }
}

/* Logo Gentle Float Animation */
@keyframes logoGentleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Elegant Fade In Animation */
@keyframes elegantFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtitle Fade In Animation */
@keyframes subtitleFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 0.9;
    transform: translateY(0);
  }
}

/* Description Fade In Animation */
@keyframes descriptionFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Old bubble styles removed - now using single centered ball animation */

@keyframes bubbleFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes sphereWander1 {
  0% { transform: translate(0, 0) scale(1); }
  15% { transform: translate(180px, -120px) scale(1.2); }
  30% { transform: translate(-100px, 80px) scale(0.8); }
  45% { transform: translate(220px, 140px) scale(1.4); }
  60% { transform: translate(-180px, -60px) scale(0.9); }
  75% { transform: translate(140px, 100px) scale(1.3); }
  90% { transform: translate(-80px, -100px) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes sphereWander2 {
  0% { transform: translate(0, 0) scale(1); }
  12% { transform: translate(-140px, 100px) scale(1.3); }
  25% { transform: translate(200px, -80px) scale(0.7); }
  38% { transform: translate(-220px, -120px) scale(1.5); }
  50% { transform: translate(120px, 150px) scale(0.8); }
  62% { transform: translate(-160px, 60px) scale(1.4); }
  75% { transform: translate(180px, -140px) scale(1); }
  88% { transform: translate(-100px, 90px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes sphereWander3 {
  0% { transform: translate(0, 0) scale(1); }
  10% { transform: translate(200px, 110px) scale(0.8); }
  20% { transform: translate(-180px, -130px) scale(1.4); }
  30% { transform: translate(160px, -90px) scale(1.1); }
  40% { transform: translate(-200px, 120px) scale(1.3); }
  50% { transform: translate(140px, 70px) scale(0.7); }
  60% { transform: translate(-120px, -100px) scale(1.5); }
  70% { transform: translate(190px, 130px) scale(0.9); }
  80% { transform: translate(-140px, -70px) scale(1.2); }
  90% { transform: translate(100px, 90px) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes sphereWander4 {
  0% { transform: translate(0, 0) scale(1); }
  13% { transform: translate(-190px, -110px) scale(1.3); }
  26% { transform: translate(210px, 140px) scale(0.8); }
  39% { transform: translate(-150px, 90px) scale(1.5); }
  52% { transform: translate(170px, -120px) scale(0.9); }
  65% { transform: translate(-200px, -80px) scale(1.2); }
  78% { transform: translate(180px, 100px) scale(1.4); }
  91% { transform: translate(-110px, -130px) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes sphere3DFloat {
  0%, 100% { 
    transform: translateZ(0px);
  }
  50% { 
    transform: translateZ(20px);
  }
}

@keyframes innerGlow {
  0%, 100% { 
    opacity: 0.8;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.1);
  }
}


@media (prefers-reduced-motion: reduce) {
  .cloud-1, .cloud-2, .cloud-3 { 
    animation: none;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .bubble-1, .bubble-2, .bubble-3 { 
    animation: none;
    opacity: 1;
  }
  .hero-content, .hero-logo {
    animation: none;
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Glass Spheres in Section 2 */
.glass-spheres-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.glass-sphere {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, 
    rgba(200, 200, 200, 0.9), 
    rgba(150, 150, 150, 0.7), 
    rgba(100, 100, 100, 0.5));
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset -15px -15px 30px rgba(0, 0, 0, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.1);
  will-change: transform;
  animation: floatSphere 10s ease-in-out infinite;
}

/* Using existing sphere position classes from hero section */
.glass-sphere.sphere-1 {
  width: 180px; height: 180px; top: 15%; left: 8%; animation-duration: 10s;
}
.glass-sphere.sphere-2 {
  width: 240px; height: 240px; bottom: 15%; left: 5%; animation-duration: 12s; animation-delay: -2s;
}
.glass-sphere.sphere-3 {
  width: 150px; height: 150px; top: 45%; left: 25%; animation-duration: 9s; animation-delay: -4s;
}
.glass-sphere.sphere-4 {
  width: 120px; height: 120px; top: 25%; right: 15%; animation-duration: 11s; animation-delay: -1s;
}
.glass-sphere.sphere-5 {
  width: 200px; height: 200px; bottom: 20%; right: 10%; animation-duration: 13s; animation-delay: -3s;
}
.glass-sphere.sphere-6 {
  width: 90px; height: 90px; top: 60%; right: 25%; animation-duration: 8s; animation-delay: -5s;
}
.glass-sphere.sphere-7 {
  width: 160px; height: 160px; top: 20%; left: 50%; transform: translateX(-50%); animation-duration: 10.5s; animation-delay: -2.5s;
}
.glass-sphere.sphere-8 {
  width: 110px; height: 110px; bottom: 35%; right: 8%; animation-duration: 9.5s; animation-delay: -6s;
}

/* Override for images used as spheres to remove circle frame */
img.hero-sphere,
img.glass-sphere {
  background: none;
  box-shadow: none;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 25px 25px rgba(0,0,0,0.35));
}

/* Glass Spheres in Section 2 - Changed to match Hero Spheres */
.glass-spheres-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Final Section (Section 3) */
.final-section-wrapper {
  background-color: #000;
  color: #fff;
  padding: 8rem 2rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  position: relative;
  overflow: hidden;
}

.final-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
  align-items: center;
  position: relative;
  z-index: 2;
}

.final-section-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.final-section-community-text {
  font-family: 'Playfair Display', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.final-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.final-section-description {
  font-family: 'Playfair Display', sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: #ccc;
  line-height: 1.6;
  max-width: 50ch;
  margin-bottom: 2.5rem;
}

.final-section-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Playfair Display', sans-serif;
}

.btn-primary {
  background-color: #fff;
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  line-height: 1;
  position: relative;
}

.btn-primary:hover {
  background-color: #FF007F;
  color: #fff;
}

.btn-secondary {
  color: #fff;
}

.btn-secondary:hover {
  color: #FF007F;
}

.final-section-right {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.stat {
  position: relative;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: #ccc;
  margin-top: 0.5rem;
}

.stat-label {
  color: #ccc;
  font-size: 1rem;
  margin-top: 0.5rem;
  font-family: 'Playfair Display', sans-serif;
}

/* Animation setup */
.anim-target,
.anim-target-1,
.anim-target-4 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-target.animate-in,
.anim-target-1.animate-in,
.anim-target-4.animate-in {
  opacity: 1;
  transform: translateY(0);
}


/* Responsive */
@media (max-width: 768px) {
  .final-section-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .final-section-description {
    margin: 0 auto;
  }

  .final-section-buttons {
    justify-content: center;
  }

  .final-section-right {
    margin-top: 3rem;
    flex-direction: column;
  }
}

/* Animations Section (Section 4) */
.animations-section-wrapper {
  background-color: #000;
  color: #fff;
  padding: 8rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.animations-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.animations-header {
  text-align: left;
  margin-bottom: 4rem;
}

.animations-title {
  font-family: 'Quivert', sans-serif;
  font-size: 4rem; /* Adjusted for Ruigslay */
  font-weight: normal;
  color: #fff;
  text-align: center;
}

.animations-subtitle {
  font-family: 'Ruigslay', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem; /* Adjusted for Ruigslay */
  font-weight: normal;
  color: #ccc;
  text-align: center;
  margin-top: 1.5rem;
}

.animations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.animation-card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.animation-card-link:hover {
  transform: scale(1.03);
}

.animation-card {
  border: 1px solid #333;
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.animation-card:hover {
  border-color: #FF007F;
  transform: translateY(-4px);
}

.animation-preview {
  background-color: #111;
  border-radius: 12px;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 9; /* Change to a rectangular ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.animation-preview img,
.animation-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
}

.animation-number {
  color: #888;
  font-size: 0.875rem;
}

/* Animation Modal Lightbox */
.animation-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.animation-modal.active {
  display: flex;
}

.animation-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.animation-modal-content {
  position: relative;
  z-index: 10001;
  width: 50%;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animation-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 10002;
  line-height: 1;
}

.animation-modal-close:hover {
  transform: rotate(90deg);
  color: #FF007F;
}

.animation-modal-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animation-modal-media img,
.animation-modal-media video {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.animation-modal-media video {
  display: block;
}

@media (max-width: 768px) {
  .animation-modal-content {
    width: 90%;
  }
  
  .animation-modal-close {
    top: -50px;
    right: -10px;
    font-size: 2.5rem;
  }
}

/* Footer */
.site-footer {
  background-color: #000;
  color: #fff;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid #222;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid #333;
}

.footer-top h3 {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-email {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.footer-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #fff;
  transition: transform 0.3s ease;
  transform-origin: right;
  transform: scaleX(0);
}

.footer-email:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

.footer-middle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.footer-column h4 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-link {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fff;
}

.footer-made-by {
  text-align: right;
  color: #888;
}

.footer-bottom {
  padding-top: 2rem;
}

.footer-large-logo {
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  text-align: left;
}


/* Animation setup for Section 4 */
.anim-target-4 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-target-4.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
  .animations-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-middle {
    grid-template-columns: 1fr 1fr;
  }

  .footer-made-by {
    grid-column: span 2;
    text-align: left;
    margin-top: 2rem;
  }
  
  .footer-content-wrapper {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-large-logo {
      font-size: 4rem;
      text-align: center;
  }
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top-btn:hover {
  background-color: #fff;
  transform: scale(1.1);
}

.cloud-wrap.start-animation .cloud {
  animation-play-state: running; /* Run animation when class is added */
}

@media (max-width: 1024px) {
  .final-section-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .final-section-left {
    gap: 1rem;
    align-items: center;
  }

  .final-section-title {
    font-size: 3rem;
  }

  .final-section-description {
    margin-bottom: 1.5rem;
  }

  .final-section-right {
    margin-top: 2rem;
    gap: 2rem;
    flex-direction: row;
    justify-content: center;
  }

  .stat {
    text-align: center;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}


.final-section-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  transform: translateY(0);
}

/* ... existing code ... */
.animations-gallery-item .overlay {
  background: rgba(0, 0, 0, 0.7);
}

/* -------------------------------------------------------------------------- */
/*                              PRODUCT PAGE STYLES                           */
/* -------------------------------------------------------------------------- */

.product-page {
  background-color: #000;
  color: #fff;
}

.product-page .site-header {
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-page .nav-link:hover,
.product-page .mobile-menu a:hover {
  color: #FF007F;
}

.product-hero {
  position: relative;
  text-align: center;
  padding: 10rem 2rem 6rem;
  overflow: hidden;
}

.product-hero-title {
  color: #FF007F;
  text-shadow: 0 0 15px rgba(255, 0, 127, 0.7);
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  margin-bottom: 1rem;
}

.product-hero-subtitle {
  font-family: 'Playfair Display', serif;
  color: #d1d5db; /* gray-300 */
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.25rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto 6rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem; /* 24px */
  padding: 2.5rem; /* 40px */
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: rgba(255, 0, 127, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.service-card p {
    font-family: 'Playfair Display', serif;
    color: #d1d5db;
    flex-grow: 1;
}

.service-link {
  display: inline-block;
  margin-top: 1.5rem; /* 24px */
  color: #fff;
  font-weight: 600;
  transition: color 0.3s ease;
  font-family: 'Playfair Display', serif;
}

.service-link:hover {
  color: #FF007F;
  text-shadow: 0 0 8px #FF007F;
}

/* -------------------------------------------------------------------------- */
/*                               CONTACT SECTION                              */
/* -------------------------------------------------------------------------- */
.contact-section-wrapper {
  background-color: #000;
  color: #fff;
  padding: 10rem 2rem;
  border-top: 1px solid #222;
}

.contact-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 3rem;
}

.contact-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #fff;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.contact-cta-link:hover {
  color: #FF007F;
}

.contact-cta-link .arrow-icon {
  width: 3rem;
  height: 3rem;
  transition: transform 0.3s ease;
}

.contact-cta-link:hover .arrow-icon {
  transform: translateX(10px);
}

@media (max-width: 768px) {
  .contact-title {
    font-size: 3rem;
  }
  .contact-cta-link {
    font-size: 1.5rem;
    gap: 1rem;
  }
  .contact-cta-link .arrow-icon {
    width: 2rem;
    height: 2rem;
  }
}


/* -------------------------------------------------------------------------- */
/*                            SHARED HERO VIDEO STYLES                          */
/* -------------------------------------------------------------------------- */
.hero-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    min-height: 100vw;
    min-width: 100vh;
    object-fit: cover;
    z-index: 1;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: 2;
}

.hero-content-wrapper {
    position: relative;
    z-index: 3;
}

/* -------------------------------------------------------------------------- */
/*                            SHARED HERO VIDEO STYLES                          */
/* -------------------------------------------------------------------------- */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 3;
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* New Main Navigation Bar Styles */
.main-nav {
    background-color: rgba(26, 26, 26, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .nav-logo {
    font-family: 'serif';
    font-weight: 600;
}

.main-nav .nav-link {
    transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
    color: #fff;
}




