body { background: #f4f1ea; color: #121216; font-family: 'Space Grotesk', system-ui, sans-serif; }

.intro { min-height: 60vh; display: grid; align-content: end; padding: 0 clamp(16px, 5vw, 64px) 8vh; }
.kicker { margin: 0 0 12px; font: 500 13px ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: #8b8a94; }
h1 { margin: 0; font: 700 clamp(48px, 9vw, 120px)/0.9 'Space Grotesk', system-ui, sans-serif; letter-spacing: -0.05em; }

.scrolly {
  position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 64px);
  padding: 0 clamp(16px, 5vw, 64px);
}
.steps { grid-column: 1; grid-row: 1; }
.chart {
  grid-column: 2; grid-row: 1;
  position: sticky; top: 10vh; height: 80vh; margin: 0;
  display: grid; align-content: center;
}
.chart svg { width: 100%; height: auto; max-height: 70vh; overflow: visible; }
.chart figcaption { margin-top: 8px; font: 500 12px ui-monospace, monospace; color: #8b8a94; text-transform: uppercase; letter-spacing: 0.08em; }

.step { min-height: 90vh; display: flex; align-items: center; }
.step p {
  margin: 0; padding: 24px 28px; border-radius: 12px; background: #fff;
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35;
  box-shadow: 0 20px 60px -35px rgb(0 0 0 / 0.35);
  opacity: 0.35; transition: opacity 0.4s;
}
.step.is-active p { opacity: 1; }
.step strong { color: #ff4d2e; }

/* Chart styling: D3 creates the elements, CSS styles them. */
.bar { fill: #121216; }
.bar.is-dim { fill: #cfc9bd; }
.bar.is-hot { fill: #ff4d2e; }
.label { font: 500 15px 'Space Grotesk', system-ui, sans-serif; fill: #121216; }
.value { font: 500 13px ui-monospace, monospace; fill: #6b6a73; }
.axis line, .axis path { stroke: #d6d1c6; }
.axis text { font: 400 11px ui-monospace, monospace; fill: #8b8a94; }
.avg line { stroke: #3a86ff; stroke-width: 2; stroke-dasharray: 6 5; }
.avg text { font: 600 13px ui-monospace, monospace; fill: #3a86ff; }

.outro { min-height: 60vh; display: grid; place-items: center; font: 700 clamp(28px, 4vw, 44px) 'Space Grotesk', system-ui, sans-serif; letter-spacing: -0.03em; }

/* Mobile: chart pins to the top half, text cards scroll underneath it. */
@media (max-width: 760px) {
  .scrolly { grid-template-columns: 1fr; }
  .chart { grid-column: 1; top: 0; height: 52vh; z-index: 0; background: #f4f1ea; padding-top: 12px; }
  .steps { grid-column: 1; grid-row: 2; position: relative; z-index: 1; }
  .step { min-height: 70vh; align-items: flex-end; padding-bottom: 8vh; }
  .step p { opacity: 1; }
}
