/* Nember homepage: styles for the scroll-linked animations in motion.js.
   Every rule sits under .gs, which motion.js sets only when GSAP runs and the
   visitor has not asked for reduced motion; otherwise the old styles apply. */

/* 1. From watts to warmth: the link fills behind the spark, each step lights up */
.gs .flow-link { background: linear-gradient(90deg, var(--glow) calc(var(--p, 0) * 100%), var(--slate) 0); overflow: visible; }
.gs .flow-link i { animation: none; left: calc(var(--p, 0) * 100% - 11px); opacity: calc(var(--p, 0) * 40 - var(--p, 0) * var(--p, 0) * 40); }
.gs .flow-step { border-color: color-mix(in srgb, var(--amber) calc(var(--lit, 0) * 45%), var(--slate)); }
.gs .flow-step svg { opacity: calc(.3 + var(--lit, 0) * .7); filter: drop-shadow(0 0 calc(var(--lit, 0) * 10px) rgba(255, 106, 43, .45)); }
.gs .flow-step .steam { opacity: var(--lit, 0); }
@media (max-width: 900px) {
  .gs .flow-link { background: linear-gradient(180deg, var(--glow) calc(var(--p, 0) * 100%), var(--slate) 0); }
  .gs .flow-link i { animation: none; left: -2px; top: calc(var(--p, 0) * 100% - 9px); }
}

/* 2. Supply chart: the curve is revealed by a clip that moves with the scroll */
.gs .chart .line { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
.gs .chart .area { opacity: 1; transition: none; }
.gs .chart .callout, .gs .chart .label { transition: opacity .5s ease; }
.draw-head { pointer-events: none; transition: opacity .3s; }
.draw-head circle { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 106, 43, .9)); }
.draw-read { font-family: var(--font-mono); font-size: 11px; fill: var(--snow); }
.chart-wrap.hovering .draw-head { opacity: 0 !important; }

/* 3. Roadmap: the line grows with the scroll and lights each stage it reaches */
.gs .roadmap::after { transition: none; height: var(--grow, 0px); }
.gs .roadmap .stage { transition: color .3s, background-color .3s, border-color .3s; }
.gs .roadmap li.done:not(.reached) .stage { color: var(--snow-dim); border-color: var(--slate); }
.gs .roadmap li.active:not(.reached) .stage { color: var(--snow-dim); background: transparent; border-color: var(--slate); animation: none; }
