:root {
  /* Colors */
  --bg-top: #E2E8F0;
  --bg-bottom: #FFFFFF;
  --accent-purple: #8B5CF6;
  --accent-purple-glow: rgba(139, 92, 246, 0.4);
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #F8FAFC;
  
  /* Dimensions */
  --nav-height: 80px;
  --timeline-height: 120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-bottom);
  overflow-x: hidden;
}

/* 
   SCROLL ARCHITECTURE 
   We create a very tall body to allow scrolling.
   The 'scene' is fixed behind it.
   The 'animations' are driven by the scroll position.
*/
.scroll-track {
  height: 500vh; /* 5 Steps */
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Fixed Scene Container */
.fixed-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-top) 0%, var(--bg-bottom) 60%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Purple Glow Frame */
.fixed-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 100px var(--accent-purple-glow);
  pointer-events: none;
  z-index: 20;
}

/* Navigation */
.nav {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  z-index: 50;
}

.nav-dot {
  width: 12px;
  height: 12px;
  background: #000;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  opacity: 0.7;
}

/* Hero Title */
.hero-title-container {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2; /* Behind ship */
  width: 100%;
}

.hero-title {
  font-size: 12vw;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-dark);
  margin: 0;
  pointer-events: none;
}

.hero-title span.thin {
  font-weight: 300;
  display: block;
}

.hero-title span.bold {
  font-weight: 900;
  display: block;
  /* Make it hollow or semi-transparent to blend */
  color: transparent;
  -webkit-text-stroke: 2px var(--text-dark);
  position: relative;
}

/* The Monolith/Ship */
.ship-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35vh;
  height: 50vh;
  z-index: 5;
  
  /* Scroll Driven Animation for Ship */
  animation: shipMotion linear both;
  animation-timeline: scroll(root);
}

.ship-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  /* Make it look like a monolith */
  filter: contrast(1.1) brightness(0.9);
}

@keyframes shipMotion {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  20% {
    transform: translate(-55%, -55%) scale(1.05) rotate(-2deg);
  }
  40% {
    transform: translate(-45%, -50%) scale(1.1) rotate(2deg);
  }
  60% {
    transform: translate(-50%, -45%) scale(1.05) rotate(-1deg);
  }
  80% {
    transform: translate(-55%, -50%) scale(1.02) rotate(1deg);
  }
  100% {
    transform: translate(-50%, -60%) scale(0.9) rotate(0deg);
  }
}

/* CTA Pill */
.cta-pill {
  position: absolute;
  top: 50%;
  left: 10%;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cta-pill:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.6);
}

/* Vertical Metrics */
.metrics {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 60px;
  z-index: 10;
}

.metric-item {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
  opacity: 0.5;
}

/* Bottom Timeline */
.timeline-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 40px;
}

/* Curved Line SVG */
.timeline-curve {
  position: absolute;
  bottom: 60px;
  width: 100%;
  height: 100px;
  z-index: 1;
}

.timeline-nodes {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  width: 80%;
  max-width: 800px;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.3s ease;
}

.node-dot {
  width: 12px;
  height: 12px;
  background: #E2E8F0;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.node-label {
  text-align: center;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.step-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.step-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Timeline Animation - Lighting up nodes based on scroll */
/* We simulate this by using scroll-driven animations on the nodes themselves */

@keyframes highlightNode {
  0%, 100% { background: #E2E8F0; border-color: #CBD5E1; transform: scale(1); }
  50% { background: var(--accent-purple); border-color: var(--accent-purple); transform: scale(1.5); box-shadow: 0 0 15px var(--accent-purple-glow); }
}

@keyframes highlightText {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-5px); }
}

/* 
   The logic here is tricky without JS. 
   We will animate each node based on the scroll percentage.
   Step 1: 0-20%, Step 2: 20-40%, etc.
*/

.node:nth-child(1) .node-dot { animation: highlightNode linear both; animation-timeline: scroll(root); animation-range: 0% 20%; }
.node:nth-child(2) .node-dot { animation: highlightNode linear both; animation-timeline: scroll(root); animation-range: 20% 40%; }
.node:nth-child(3) .node-dot { animation: highlightNode linear both; animation-timeline: scroll(root); animation-range: 40% 60%; }
.node:nth-child(4) .node-dot { animation: highlightNode linear both; animation-timeline: scroll(root); animation-range: 60% 80%; }
.node:nth-child(5) .node-dot { animation: highlightNode linear both; animation-timeline: scroll(root); animation-range: 80% 100%; }

.node:nth-child(1) .node-label { animation: highlightText linear both; animation-timeline: scroll(root); animation-range: 0% 20%; }
.node:nth-child(2) .node-label { animation: highlightText linear both; animation-timeline: scroll(root); animation-range: 20% 40%; }
.node:nth-child(3) .node-label { animation: highlightText linear both; animation-timeline: scroll(root); animation-range: 40% 60%; }
.node:nth-child(4) .node-label { animation: highlightText linear both; animation-timeline: scroll(root); animation-range: 60% 80%; }
.node:nth-child(5) .node-label { animation: highlightText linear both; animation-timeline: scroll(root); animation-range: 80% 100%; }


/* Content Cards (The text that changes) */
.content-layer {
  position: absolute;
  top: 50%;
  left: 65%; /* To the right of the ship */
  transform: translate(0, -50%);
  width: 300px;
  height: 200px;
  z-index: 30;
  pointer-events: none; /* Let scroll pass through */
}

.content-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  /* Default hidden state */
}

/* Card Titles and Body */
.card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.2;
}

.card-body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* 
   Content Visibility Animation
   Each card fades in/out during its scroll range
*/
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

.content-card:nth-child(1) { animation: fadeInOut linear both; animation-timeline: scroll(root); animation-range: 0% 18%; }
.content-card:nth-child(2) { animation: fadeInOut linear both; animation-timeline: scroll(root); animation-range: 20% 38%; }
.content-card:nth-child(3) { animation: fadeInOut linear both; animation-timeline: scroll(root); animation-range: 40% 58%; }
.content-card:nth-child(4) { animation: fadeInOut linear both; animation-timeline: scroll(root); animation-range: 60% 78%; }
.content-card:nth-child(5) { animation: fadeInOut linear both; animation-timeline: scroll(root); animation-range: 80% 98%; }


/* Person Silhouette */
.silhouette {
  position: absolute;
  bottom: 140px; /* Above timeline */
  right: 15%;
  height: 60px;
  width: 20px;
  background: #0F172A;
  border-radius: 10px 10px 0 0;
  opacity: 0.1;
  z-index: 5;
}
.silhouette::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: inherit;
  border-radius: 50%;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  background: #FBBF24;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  color: #000;
  font-size: 20px;
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.4);
  z-index: 100;
  cursor: pointer;
  transition: transform 0.2s;
}
.fab:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-title {
    font-size: 15vw;
    top: 10%;
  }
  
  .ship-container {
    width: 60vw;
    height: 40vh;
    top: 40%;
  }
  
  .content-layer {
    left: 50%;
    transform: translate(-50%, 0);
    top: 65%;
    width: 80%;
    text-align: center;
  }
  
  .nav-links {
    display: none;
  }
  
  .metrics {
    display: none;
  }
  
  .timeline-nodes {
    width: 95%;
  }
  
  .step-name {
    display: none; /* Too crowded on mobile */
  }
  
  .silhouette {
    display: none;
  }
}
