* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  height: 400vh;
  background: #0b0b0b;
  color: white;
  overflow-x: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
}

.text-wrapper {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.text {
  font-size: clamp(4rem, 15vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  opacity: 0.08;
  white-space: nowrap;
  display: flex;
  gap: 2rem;
}

.left,
.right {
  display: inline-block;
}

.spacer {
  height: 200vh;
  /* Place the spacer after the 3D and before the below-3d-section to ensure scroll animations start before the below-3d-section appears */
}

.text-section {
  position: fixed;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  font-size: clamp(5rem, max(15vw, 8vh), 20rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.8;
  opacity: 0.15;
  color: #0b0b0b;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8);
  text-stroke: 2px rgba(255, 255, 255, 0.8);
  width: 100%;
  padding:20px 20px;
}

.text-section.top {
  top: 15%;
}

.text-section.middle {
  top: 50%;
  transform: translateY(-50%);
}

.text-section.bottom {
  top: 65%;
}

.text-section.cinematic {
  top: 80vh;
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  font-size: clamp(3.5rem, 10vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.8;
  opacity: 0.15;
  color: #0b0b0b;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8);
  text-stroke: 2px rgba(255, 255, 255, 0.8);
  width: 100%;
  padding: 40px 40px;
  text-align: center;


}


 .textcinematic{
  top: 80vh;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  font-size: 36pt;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.8;
  opacity: 0.15;
  color: #0b0b0b;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8);
  padding: 40px 40px;
  text-align: center;

}


.cinematic-title {
  font-size: clamp(2.5rem,5vw, 5rem);
  font-weight: 900;
  letter-spacing:0.04em;
  line-height: 1;
  opacity: 0.15;
  color: #0b0b0b;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8);
  text-stroke: 2px rgba(255, 255, 255, 0.8);
  width: 100%;
  padding: 0 20px;
  text-align: center;
  margin-bottom: 2.5vh;
  margin-top:80px;
}

  .cinematic-title2 {
  font-size: 15pt;
  font-weight: 900;
  letter-spacing:0.01em;
  line-height: 0.8;
  opacity: 0.15;
  color: #6b6b6b;

  width: 100%;
  padding: 0 20px;
  text-align: center;
  margin-bottom: 1.5vh;
  margin-top:30px;
}

#final-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.6s ease-out;
  pointer-events: none;
}

#final-section.visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 9999;
}

#final-section-text {
  font-size: clamp(2rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  color: white;
}

#below-3d-section {
  width: 100%;
  min-height: 30vh;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  margin-top: 120vh;
  z-index: 10;
  position: relative;
}

#below-3d-desc {
  color: #464646;
  font-size: clamp(1.1rem, 2.5vw, 2.2rem);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
  opacity: 0.85;
  margin-bottom: 150px;
}

#side-3d-section {
  width: 100vw;
  height: 80vh;
  background: #181818;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-100vw);
}
#side-3d-section.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s cubic-bezier(0.7,0,0.3,1), transform 1.1s cubic-bezier(0.7,0,0.3,1);
}
#side-3d-canvas-container {
  width: 50vw;
  height: 60vh;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
#side-3d-text {
  width: 40vw;
  color: #fff;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 500;
  padding-left: 4vw;
  text-align: left;
  line-height: 1.4;
  opacity: 0.92;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Debug overlay */
#debug {
  position: fixed;
  right: 16px;
  top: 16px;
  background: rgba(0,0,0,0.6);
  color: #e8e8e8;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  max-width: 320px;
  max-height: 50vh;
  overflow: auto;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  display: none;
}

#debug .title { font-weight: 700; margin-bottom: 6px; }
#debug .line { margin-bottom: 6px; font-family: monospace; white-space: pre-wrap; }
/* Hide Babylon default loading screen (safety) */
.babylon-loading-screen, .babylonLoadingScreen { display: none !important; }

/* Shader section */
#shader-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#shader-section-text {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 500;
  z-index: 1;
  pointer-events: none;
}

/* SVG Shader overlay */
.shape-overlays {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 1;
}

#cinematic-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  margin-top: 0;
}

#cinematic-section .cinematic-title {
  position: relative;
  z-index: 2;
  margin: 0;
}

.Horizontal {
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.Horizontal__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5vh;
}

.heading-xl {
font-size: clamp(1.5rem, 6vw, 8rem);
font-weight: 900;
letter-spacing: -0.04em;
line-height: 0.4;
color: #0b0b0b;
-webkit-text-stroke: 2px rgb(87 87 87 / 80%);
text-stroke: 2px rgba(255, 255, 255, 0.8);
}