* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* Intro Section */
.scrolly-intro {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../intro.jpg') center center / cover no-repeat;
  color: white;
  text-align: center;
}

.intro-content h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.intro-content .subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.intro-content .team-size {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 3rem;
}

.intro-content .hint {
  font-size: 1rem;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Step Container - creates scroll distance but content is fixed */
.step {
  position: relative;
  height: 100vh;
  width: 100%;
}

/* Visualization - Fixed Full Screen Background */
.step-viz {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #ffffff;
  pointer-events: none;
}

/* Colored backgrounds for each step */
[data-step="1"] .step-viz {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

[data-step="2"] .step-viz {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

[data-step="3"] .step-viz {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

[data-step="4"] .step-viz {
  background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}

[data-step="5"] .step-viz {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

[data-step="6"] .step-viz {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}

[data-step="7"] .step-viz {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
}

[data-step="8"] .step-viz {
  background: linear-gradient(135deg, #ede7f6 0%, #d1c4e9 100%);
}

/* Text Overlay - Fixed */
.step-text {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 30%;
  z-index: 2;
  background: rgba(255, 255, 255, 0.75);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* Step 1 (The Big Picture) - move text down */
[data-step="1"] .step-text {
  top: calc(50% + 6rem);
}

/* Step 4 (Digital Activity) - more transparent background */
[data-step="4"] .step-text {
  background: rgba(255, 255, 255, 0.6);
}

/* Step 8 (Year at a Glance) - adjust position to not cover chart stats */
[data-step="8"] .step-text {
  top: 60%;
  width: 25%;
}

/* Left/Right Positioning */
[data-text-position="left"] .step-text {
  left: 5%;
}

[data-text-position="right"] .step-text {
  right: 5%;
}

/* Text Content Styling */
.step-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #667eea;
}

.step-text p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #444;
}

.step-text ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.step-text li {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: #444;
}

.step-text strong {
  color: #667eea;
  font-weight: 600;
}

/* Outro Section */
.scrolly-outro {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../outro.jpg') center center / cover no-repeat;
  color: white;
  text-align: center;
}

.outro-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.outro-content p {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.outro-content .signature {
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 3rem;
}

/* D3 SVG Styling */
svg {
  display: block;
  width: 100%;
  height: 100%;
}


/* Responsive */
@media (max-width: 1024px) {
  .step-text {
    width: 40%;
  }
}

@media (max-width: 768px) {
  .intro-content h1 {
    font-size: 2.5rem;
  }

  .step-text {
    width: 85%;
    left: 7.5% !important;
    right: 7.5% !important;
  }

  .step-text h2 {
    font-size: 1.5rem;
  }

  .step-text p,
  .step-text li {
    font-size: 1rem;
  }
}
