:root {
  --bg: #ffffff;
  --card: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.90);
  --max: 760px;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --line: rgba(255,255,255,0.12);
  --source: #666;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 800px at 50% -200px, rgba(62, 146, 255, 0.22), transparent 55%),
              var(--bg);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a { color: inherit; }

.hero {
  position: relative;
  height: 180vh; /* Double height to allow text to scroll off */
  overflow: visible;
}

.heroVideo {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  border-radius: 0; 
  background: #000;

}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.heroText {
  position: absolute;
  top: 50vh;
  left: 65%;
  transform: translate(-50%, -50%);
  width: min(var(--max), 90%);
  z-index: 2; 
  text-align: right;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6); /* Add drop shadow */
  transition: opacity 0.3s ease;
  pointer-events: none; 
}


.kicker {
  letter-spacing: 0.07em;
  color: var(--muted);
  font-size: 25px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 75px);
  line-height: 1.05;
}

.byline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.story {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding: 22px 18px 60px;
  margin-top: 0;
}

body.scrolled .heroVideo {
  position: absolute;
  top: 100vh; /* Position after the fixed video area */
  width: 100%;
  height: 100vh;
}

.article {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(18px, 3.2vw, 34px);
}

.lead::first-letter {
  float: top;
  font-size: 3em;
  line-height: 0.8;
  margin: 0.05em 0.05em 0 0;
  font-weight: bold;
}

p {
  font-size: 18px;
  color: #000000;
  padding: 16px 0; 
}


h2 {
  margin: 34px 0 10px;
  font-size: 22px;
}

h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #000;
}


.responsiveEmbed {
  position: relative;
  padding-top: 0%;
}


#vegaChart {
  margin-left: 2.5rem;
  align-items: center;
}

.embedTitle {
  position: relative;
  text-align: left;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}


.sourceNote {
  display: block;
  font-size: 0.65rem;
  color: var(--source);
  margin-left: 3.5rem;
  margin-top: 0rem;
  text-align: left;
}

.caption {
  font-size: 14px;
  color: #000;
  margin-top: 8px;
  text-align: left;
  font-style: italic;
}

#treesGoal {
  text-align: center;
  margin: 2rem 0;
}

#treesGoal img {
  max-width: 100%;
  margin-left: -1.5rem;
  height: auto;
  display: block;
  margin-top: -1rem;
}

#treesGoal .sourceNote {
  text-align: center;
  margin-left: 16rem;
  margin-top: 0.5rem;
}

/* Photo Gallery Carousel */
.photoGallery {
  width: min(1000px, calc(100vw - 36px));
  margin: 3rem 0;

  /* breakout + true centering */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}


.carousel-container {
  position: relative;
  margin: 0 auto;
  background: #f5f5f5;
  overflow: hidden;
}


.carousel {
  position: relative;
  width: 100%;
  height: 650px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Navigation buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 0%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-btn.prev {
  left: 0px;
}

.carousel-btn.next {
  right: 0px;
}

/* Dots indicator */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  background: white;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: #333;
}

.dot:hover {
  background: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .carousel {
    height: 400px;
  }
  
  .carousel-slide img {
    height: 300px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-btn.prev {
    left: 10px;
  }
  
  .carousel-btn.next {
    right: 10px;
  }
}

.photoGallery .caption{
    text-align: right;
    font-style: normal;
    font-size: 14px;
    margin-top: 8px;
}

#slider .caption {
    margin-left: 0.8rem;
}

#slider .sourceNote {
    text-align: center;
    margin-left: 23rem;
    margin-top: 0.5rem;
}

.story-end {
  text-align: center;
  margin: 3rem 0;
  opacity: 1;
}


@media (prefers-reduced-motion: reduce) {
  .video { animation: none; }
}
