/* canvas.css - Fixed Full-Screen Canvas & Scroll Track */

/* The canvas is FIXED — it always covers the viewport.
   The scroll sections in <main> provide total page height.
   Overlay text cards are also fixed, driven by JS visibility. */

/* Fixed Canvas */
.canvas-sticky-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background-color: var(--color-navy-dark);
  pointer-events: none;
}

#cinematic-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Scroll Track — provides page height without visual presence */
.scroll-container {
  position: relative;
  width: 100%;
  /* Transparent — canvas shows through the fixed background */
}

/* Vignette & Gradient Overlays for Cinematic Atmosphere */
.canvas-overlay-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 11, 37, 0.75) 100%),
              linear-gradient(to bottom, rgba(0, 11, 37, 0.6) 0%, transparent 20%, transparent 80%, rgba(0, 11, 37, 0.8) 100%);
  z-index: 1;
}


/* Section Heights for Scroll Scrubber — each scene 100vh */
.story-section {
  position: relative;
  height: 100vh;
  width: 100%;
  /* pointer-events none so scrolling works through the sections */
  pointer-events: none;
  /* Must be above z-index:0 canvas */
  z-index: 2;
}

/* TUCCAR scene allows pointer-events for buttons and provides a 50vh cinematic hold */
.story-section.tuccar-scene {
  pointer-events: auto;
  height: 150vh;
}

/* Home sections: sit above fixed canvas with solid background */
.home-sections {
  position: relative;
  z-index: 3;
  background: var(--color-navy-dark);
}

/* Loading Overlay for Preloader Tier 1 */
.preloader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-navy-dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out-smooth), visibility 0.8s ease;
}

.preloader-overlay.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--color-off-white);
  margin-bottom: 2rem;
  text-align: center;
}

.preloader-bar-container {
  width: 240px;
  height: 4px;
  background: rgba(250, 248, 242, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

.preloader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-warm-wood), var(--color-gold));
  border-radius: 2px;
  transition: width 0.2s ease;
}

.preloader-status {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 248, 242, 0.6);
}
