:root {
  --accent: #0A7C67;
  --bg: #ffffff;
}

body {
  background-color: var(--bg);
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: #000;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* Override to keep header fixed throughout story page */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* Offset main content to account for fixed header height */
main {
  position: relative;
  padding-top: 6rem;
  padding-bottom: clamp(4rem, 10vw, 8rem);
}

/* Curvy storyline SVG */
.storyline {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Hide old vertical timeline */
.timeline,
.dot {
  display: none;
}

/* Chapter icons */
.icon {
  font-size: 2rem;
  color: #ddd;
  transition: color 0.3s ease;
  margin-right: 1rem;
  z-index: 1;
}

.icon.active {
  color: var(--accent);
}

/* Supply-chain chapter layout */
.chapter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: clamp(4rem, 10vw, 8rem) auto;
  max-width: 1100px;
  padding: 0 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.chapter-media {
  /* Limit image width responsively */
  flex: 0 0 clamp(150px, 25vw, 300px);
  padding: 0 1rem;
}

.chapter-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.chapter-content {
  flex: 1;
  padding: 0 1rem;
}

.chapter-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
}

.chapter-body {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.6;
}

/* Visible state when intersecting */
.visible {
  opacity: 1;
  transform: none;
}

/* Extra bottom space for the final chapter */
.chapter:last-child {
  margin-bottom: clamp(8rem, 20vw, 12rem);
}

@media (min-width: 769px) {
  .timeline {
    display: block;
  }
  .chapter:nth-child(odd) {
    flex-direction: row;
    text-align: left;
  }
  .chapter:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
  }
}

@media (max-width: 768px) {
  .chapter {
    flex-direction: column;
    text-align: center;
    padding: 80px 20px;
  }
  .chapter-media,
  .chapter-content {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter {
    transition: none;
  }
} 