:root {
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-caption: #888;
  --bg: #ffffff;
  --accent-blue: #4A90D9;
  --accent-green: #2E9E6A;
  --accent-orange: #D98C3B;
  --accent-purple: #7B5EA7;
  --accent-red: #C85A42;
  --link-color: #9b72bb;
  --content-width: 720px;
  --wide-width: 1040px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  z-index: 1000;
  pointer-events: none;
}

.scroll-progress-bar {
  width: 0;
  height: 100%;
  transform-origin: left center;
  transition: width 0.12s linear;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 700px;
  overflow: hidden;
  background: #1a1a1a;
  --hero-border-width: clamp(6px, min(2.15vh, 1.25vw), 15px);
}

.hero-collage {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
  position: relative;
  z-index: 1;
}

.hero-panel {
  flex: 1;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-panel.from-top {
  transform: translateY(-60px);
}

.hero-panel.animate {
  opacity: 1;
  transform: translateY(0);
}

.hero-panel:nth-child(1) { transition-delay: 0.2s; }
.hero-panel:nth-child(2) { transition-delay: 0.4s; }
.hero-panel:nth-child(3) { transition-delay: 0.6s; }
.hero-panel:nth-child(4) { transition-delay: 0.8s; }
.hero-panel:nth-child(5) { transition-delay: 1.0s; }

.hero-panel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.hero-panel:nth-child(1) { --hero-panel-accent: var(--accent-green); }
.hero-panel:nth-child(2) { --hero-panel-accent: var(--accent-orange); }
.hero-panel:nth-child(3) { --hero-panel-accent: var(--accent-blue); }
.hero-panel:nth-child(4) { --hero-panel-accent: var(--accent-red); }
.hero-panel:nth-child(5) { --hero-panel-accent: var(--accent-purple); }

.hero-panel-inner {
  background: var(--hero-panel-accent);
}

.hero-panel-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 var(--hero-border-width) var(--hero-panel-accent);
}

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

/* ===== TITLE SECTION (below hero) ===== */
.title-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 60px 24px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.title-section.animate {
  opacity: 1;
  transform: translateY(0);
}

.title-section h1 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 8px;
  white-space: nowrap;
}

.title-section .byline {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-caption);
  letter-spacing: 0.02em;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-caption {
  position: absolute;
  bottom: 10px;
  right: 20px;
  z-index: 3;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* ===== CONTENT ===== */
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.title-section + .content {
  padding-top: 40px;
}

.content-before-media {
  padding-bottom: 14px;
}

.content-after-media {
  padding-top: 38px;
}

.content p {
  margin-bottom: 24px;
  font-weight: 400;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.75;
}

.content p a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-color);
  text-decoration-skip-ink: none;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.content p a:hover {
  text-decoration-color: var(--link-color);
}

/* ===== CHART CONTAINERS ===== */
.chart-container {
  max-width: var(--wide-width);
  margin: 14px auto;
  padding: 0 24px;
}

.chart-container-narrow {
  max-width: var(--content-width);
}

.chart-placeholder {
  width: 100%;
  background: #f7f6f4;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-caption);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.chart-placeholder.wide {
  aspect-ratio: 16 / 6;
}

.chart-placeholder.square {
  aspect-ratio: 4 / 3;
}

.chart-placeholder.strip {
  aspect-ratio: 16 / 5;
}

.chart-container img {
  width: 100%;
  height: auto;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  display: block;
}

/* ===== EDITORIAL IMAGES ===== */
.editorial-image {
  max-width: var(--content-width);
  margin: 14px auto;
  padding: 0 24px;
}

.editorial-image-inner {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.editorial-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #eae7e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-caption);
}

.editorial-image-inner img {
  width: 100%;
  height: auto;
  display: block;
}

.editorial-image .caption {
  font-size: 12px;
  color: var(--text-caption);
  margin-top: 8px;
  font-style: italic;
  padding: 0;
}

/* ===== SECTION SPACING ===== */
.section-break {
  height: 20px;
}

/* ===== FOOTER / SOURCES ===== */
.sources {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  border-top: 1px solid #e8e6e2;
  padding-top: 32px;
}

.sources h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-caption);
  margin-bottom: 12px;
}

.sources p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.sources a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-color);
  text-decoration-skip-ink: none;
  text-underline-offset: 2px;
}

.sources a:hover {
  text-decoration-color: var(--link-color);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    height: 100vh;
  }

    .content {
      padding: 60px 20px;
    }

    .content-before-media {
      padding-bottom: 12px;
    }

    .content-after-media {
      padding-top: 36px;
    }

  .chart-container,
  .editorial-image {
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .hero {
    height: 100vh;
  }

  .hero-panel-inner {
    font-size: 11px;
  }

  .title-section h1 {
    font-size: 28px;
  }

  .title-section .byline {
    font-size: 14px;
  }

    .content {
      padding: 40px 16px;
    }

    .content-before-media {
      padding-bottom: 10px;
    }

    .content-after-media {
      padding-top: 34px;
    }

  .content p {
    font-size: 16px;
  }

  .chart-container,
  .editorial-image {
    padding: 0 16px;
    margin: 12px auto;
  }
}
