/* Home page "Supply Chain" scroll story: a sticky canvas stage with the step list beside it. */
/* light "lab notebook" scene on graph paper, a deliberate contrast to the dark hero */
.story {
  position: relative; height: 520vh; color: var(--text);
  background-color: #f4f7f6;
  background-image:
    radial-gradient(1000px 700px at 68% 50%, rgba(31,138,138,.08), transparent 65%),
    linear-gradient(rgba(11,42,58,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,42,58,.055) 1px, transparent 1px),
    linear-gradient(rgba(11,42,58,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,42,58,.025) 1px, transparent 1px);
  background-size: auto, 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-attachment: scroll, fixed, fixed, fixed, fixed;
  /* the stage already leaves room for the header, so land the #story link at its very top */
  scroll-margin-top: calc(-1 * var(--header-h));
}
.story-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-ui {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--header-h); pointer-events: none;
}
.story-ui > * { width: min(420px, 38%); }
.story-head h2 { color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 32px; }
.story-head h2 em { color: var(--gold-deep); font-style: italic; }
.story-head .eyebrow { color: var(--teal); }

.story-track { position: relative; padding-left: 26px; }
.story-progress { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: rgba(11,42,58,.12); border-radius: 2px; }
.story-progress i { position: absolute; inset: 0; background: linear-gradient(var(--gold), var(--teal)); transform-origin: top; transform: scaleY(0); border-radius: 2px; }
.story-steps { display: grid; gap: 4px; list-style: none; }
.story-steps li {
  display: flex; gap: 14px; padding: 10px 0; cursor: pointer; pointer-events: auto;
  opacity: .38; transition: opacity .4s;
}
.story-steps li:hover { opacity: .7; }
.story-steps li.is-active { opacity: 1; }
.story-steps .num { font-family: var(--font-display); color: var(--gold-deep); font-size: .95rem; padding-top: 3px; min-width: 22px; }
.story-steps h3 { color: var(--ink); font-size: 1.1rem; margin-bottom: 0; }
.story-steps p {
  margin: 0; max-height: 0; overflow: hidden; color: var(--muted); font-size: .95rem;
  transition: max-height .5s ease, margin .5s ease;
}
.story-steps li.is-active p { max-height: 12em; margin-top: 6px; }
.story-hint { margin-top: 28px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.story-hint span { display: inline-block; animation: hintBob 1.6s ease-in-out infinite; }
@keyframes hintBob { 50% { transform: translateY(4px); } }

@media (max-width: 900px) {
  .story { height: 480vh; }
  .story-ui { justify-content: space-between; padding: calc(var(--header-h) + 12px) 0 24px; }
  .story-ui > * { width: 100%; }
  .story-head h2 { font-size: 1.35rem; margin-bottom: 0; }
  .story-head .eyebrow { margin-bottom: 6px; }
  .story-track { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 16px; padding: 14px 16px 14px 34px; }
  .story-progress { left: 16px; top: 18px; bottom: 18px; }
  .story-steps li:not(.is-active) { display: none; }
  .story-track { min-height: 10.5rem; }
  .story-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story-hint span { animation: none; } }
