/* Ambient Blob float animations */
@keyframes float-blob-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, 10vh) scale(1.1); }
  100% { transform: translate(-2vw, -5vh) scale(0.95); }
}

@keyframes float-blob-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vw, -8vh) scale(0.9); }
  100% { transform: translate(4vw, 5vh) scale(1.15); }
}

@keyframes float-blob-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -5vh) scale(1.05); }
  100% { transform: translate(-4vw, 8vh) scale(0.9); }
}

/* Cinematic Intro Loader */
.intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050505;
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: transform 0.96s cubic-bezier(0.85, 0, 0.15, 1);
}

.intro-word-container {
  height: 80px;
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.intro-word {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-color);
  opacity: 0;
  transform: translateY(100%);
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Infinite Marquee */
.marquee-container {
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  width: 100%;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
  gap: 4rem;
}

@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
}

.marquee-item:hover {
  color: var(--text-color);
  -webkit-text-stroke: 1px var(--text-color);
}

/* Scroll Storytelling reveals */
.reveal-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* 3D Book Layout */
.book-wrapper {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book {
  width: 260px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(10deg);
  transition: transform 0.5s ease;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.6);
}

.book:hover {
  transform: rotateY(-5deg) rotateX(5deg) scale(1.05);
}

.book-cover {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
  border-radius: 3px 12px 12px 3px;
  border-left: 5px solid #292929;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  box-sizing: border-box;
  z-index: 2;
  transform: translateZ(10px);
  backface-visibility: hidden;
}

.book-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.book-spine {
  width: 20px;
  height: 100%;
  position: absolute;
  top: 0;
  left: -10px;
  background: #0d0d0d;
  transform: rotateY(-90deg) translateZ(10px);
  transform-origin: right;
  border-right: 2px solid rgba(255,255,255,0.1);
}

.book-pages {
  width: 100%;
  height: calc(100% - 10px);
  position: absolute;
  top: 5px;
  left: 5px;
  background: #fbfbfb;
  border-radius: 0 10px 10px 0;
  transform: translateZ(0);
  box-shadow: 5px 0 15px rgba(0,0,0,0.3);
  z-index: 1;
}

/* Floating Technology Universe Container */
.universe-canvas {
  width: 100%;
  height: 600px;
  background: radial-gradient(circle at center, rgba(15,15,15,0.8) 0%, rgba(5,5,5,1) 100%);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}

/* Micro Interactions & Hover Tilt on cards */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.tilt-card-inner {
  transform: translateZ(30px);
}

/* Scroll indicator animation */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(10px); opacity: 1; }
}

.scroll-indicator-icon {
  animation: scroll-bounce 2s infinite ease-in-out;
}
