/* ==========================================================================
   Page · D09 Customer story (Case 017 · Holmgaard)
   ========================================================================== */

/* ---- Reading progress --------------------------------------------------- */

.read-progress {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 130;
  height: 4px;
  background: var(--line);
}

.read-progress__bar {
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---- Hero --------------------------------------------------------------- */

.story-hero {
  padding-top: clamp(40px, 6vw, 96px);
  padding-bottom: 48px;
}

.story-hero__station {
  flex-wrap: wrap;
  gap: 12px 16px;
}

.story-hero__title {
  margin: 0 0 32px;
  font: 800 clamp(52px, 8.4vw, 144px)/.86 var(--f-display);
  text-transform: uppercase;
  max-width: 15ch;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.fact-strip > div {
  padding: 14px 16px 14px 0;
}

.fact-strip dt {
  font: 500 11px var(--f-mono);
  color: var(--muted);
}

.fact-strip dd {
  margin: 0;
  font-weight: 600;
}

.story-photo {
  aspect-ratio: 21 / 9;
}

.story-photo .photo__caption {
  left: 20px;
  bottom: 16px;
  line-height: 1.5;
}

/* ---- Long-form text ----------------------------------------------------- */

.story-body {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.prose {
  max-width: 72ch;
  font-size: 19px;
  line-height: 1.65;
}

.story-body .prose {
  flex: 999 1 560px;
  min-width: 0;
}

.prose p {
  margin: 0 0 24px;
}

.prose--gap {
  margin-bottom: 48px;
}

.prose__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.prose__heading {
  margin: 0 0 16px;
  font: 700 var(--fs-h3)/1 var(--f-display);
  text-transform: uppercase;
}

.prose__heading--first-gap {
  margin-top: 48px;
}

.dropcap {
  float: left;
  margin: 6px 12px 0 0;
  font: 800 104px/.78 var(--f-display);
  color: var(--accent-text);
}

/* ---- At a glance -------------------------------------------------------- */

.story-aside {
  flex: 1 1 280px;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.glance {
  padding: 18px;
  border: 1.5px solid var(--ink);
}

.glance__label {
  margin-bottom: 12px;
  font: 500 11px var(--f-mono);
  color: var(--muted);
}

.glance__figures {
  display: grid;
  gap: 14px;
}

.glance__value {
  font: 800 44px/1 var(--f-display);
}

.glance__caption {
  font: 400 12px var(--f-mono);
  color: var(--ink-2);
}

.glance__source {
  margin-top: 12px;
  font: 400 11px var(--f-mono);
  color: var(--muted);
}

/* ---- Figures: shared labels -------------------------------------------- */

.fig-label {
  margin-bottom: 12px;
  font: 500 12px var(--f-mono);
  color: var(--muted);
}

.fig-label--sm {
  margin-bottom: 8px;
}

.fig-note {
  margin: 12px 0 0;
  font: 400 12px var(--f-mono);
  color: var(--muted);
}

/* ---- FIG. 1 · Line diagram --------------------------------------------- */

.line-diagram {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.line-diagram__scroll {
  overflow-x: auto;
}

.line-diagram__line {
  display: flex;
  align-items: center;
  min-width: 860px;
  margin: 0;
  padding: 40px 0 20px;
  list-style: none;
}

.line-station {
  flex: 1;
  display: flex;
  align-items: center;
}

/* conveyor between two stations */
.line-station::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 2px;
  background: var(--ink);
}

.line-station:last-child::after {
  display: none;
}

.line-station__box {
  flex: none;
  width: 130px;
  position: relative;
  padding: 14px;
  border: 1.5px solid var(--ink);
  background: var(--canvas);
  color: var(--ink);
  clip-path: var(--chamfer-s);
}

.line-station--bottleneck .line-station__box {
  border: 2px solid var(--sig-red);
  background: var(--sig-red);
  color: #fff;
}

.line-station__code {
  font: 500 11px var(--f-mono);
  opacity: .8;
}

.line-station__name {
  font: 700 20px/1.05 var(--f-display);
  text-transform: uppercase;
}

.line-station__stops {
  margin-top: 6px;
  font: 500 13px var(--f-mono);
}

/* ---- Pull quote --------------------------------------------------------- */

.pull-quote {
  margin: 0 0 var(--station);
  padding: 0;
  border: 0;
}

.pull-quote__text {
  margin: 0 0 20px;
  font: 800 clamp(40px, 5.6vw, 88px)/.95 var(--f-display);
  text-transform: uppercase;
  max-width: 20ch;
}

.pull-quote__author {
  display: flex;
  gap: 14px;
  align-items: center;
}

.pull-quote__portrait {
  width: 56px;
  height: 56px;
  background: var(--photo);
  background-image: repeating-linear-gradient(135deg, var(--photo-stripe) 0 1px, transparent 1px 7px);
}

.pull-quote__role {
  font: 400 13px var(--f-mono);
  color: var(--ink-2);
}

/* ---- FIG. 2 · Before / after ------------------------------------------- */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  margin-bottom: 48px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.metric {
  padding: 20px;
  background: var(--canvas);
}

.metric__key {
  margin-bottom: 14px;
  font: 500 11px var(--f-mono);
  color: var(--ink-2);
}

.metric__values {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.metric__before {
  font: 600 28px/1 var(--f-display);
  color: var(--muted);
  text-decoration: line-through;
}

.metric__after {
  font: 800 52px/1 var(--f-display);
}

.metric__bars {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.metric__bar {
  position: relative;
  height: 8px;
  background: var(--panel);
}

.metric__bar > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  background: var(--ink-2);
}

.metric__bar--after > span {
  background: var(--sig-green);
}

/* ---- FIG. 3 · Machine-state timeline ----------------------------------- */

.state-timelines {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.state-timeline {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.state-timeline__year {
  font: 500 13px var(--f-mono);
}

/* .machine-state-track: segment width = flex-grow (minutes) */
.state-timeline__track {
  height: 30px;
}

.state-legend {
  margin-bottom: 48px;
}

/* ---- CTA ---------------------------------------------------------------- */

/* .cta-band--canvas on a night section */
.story-cta__note {
  margin-top: 18px;
}

.next-links {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.next-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: var(--canvas);
  color: var(--ink);
  text-decoration: none;
}

.next-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.next-link__kicker {
  font: 500 11px var(--f-mono);
  color: var(--muted);
}

.next-link__title {
  font: 700 22px var(--f-display);
  text-transform: uppercase;
}

.next-link__arrow {
  font: 500 13px var(--f-mono);
}
