/* How to start, on the home (js/how-start.js; Hector, 2026-10-27).
   Four steps, the call first, each a figure and a plain paragraph. On a wide
   screen the section pins and the steps slide sideways with the scroll; on a
   phone, or with reduced motion, they stand one under the other. The figures
   are iso-glow drawings in iso-erp.css's tokens: white glow in the dark theme,
   flat near-black in the light one. No dividers, no cards. */

.howstart { max-width: none; width: 100%; }
.howstart__pin { width: 100%; display: flex; flex-direction: column; align-items: center; }
.howstart .landing__headline { text-align: center; margin-inline: auto; }

.howstart__view { width: min(980px, 100%); margin: 28px auto 0; overflow: hidden; }
.howstart__track { list-style: none; margin: 0; padding: 0; display: flex; will-change: transform; }
.howstart__step { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center; padding: 8px 4px; text-align: left; }
.howstart__fig { margin: 0; max-width: 520px; width: 100%; }
.howstart__fig .iso__stage { cursor: default; }
.howstart__body { display: grid; gap: 10px; align-content: center; }
.howstart__n { font-size: 13px; letter-spacing: .14em; color: var(--nix-text-soft); }
.howstart__t { font-size: clamp(24px, 2.6vw, 32px); font-weight: 300; line-height: 1.2; color: var(--nix-text); }
.howstart__d { font-size: 16px; line-height: 1.6; color: var(--nix-text-soft); max-width: 34ch; }

/* a hairline that fills with the scroll: where you are in the four, no numbers */
.howstart__progress { width: min(240px, 60%); height: 1px; margin: 28px auto 0;
  background: color-mix(in srgb, var(--nix-text) 14%, transparent); overflow: hidden; }
.howstart__progress i { display: block; height: 100%; background: var(--nix-text);
  transform: scaleX(.25); transform-origin: left; transition: transform 300ms cubic-bezier(.2,.7,.2,1); }
.howstart .landing__cta { justify-content: center; margin-top: 24px; }

/* the step that is not up yet waits quietly */
.howstart__step { transition: opacity 400ms ease; }
.howstart.is-pinned .howstart__step:not(.is-on) { opacity: .28; }

/* PINNED: the section is four screens tall and its content sticks to the top
   of the page's scroller while the track slides (the script writes the
   transform from the scroll). */
.howstart.is-pinned { display: block; min-height: 0; height: calc(var(--hs-steps, 4) * var(--hs-vh, 100svh)); margin-bottom: clamp(60px, 10svh, 120px); }
.howstart.is-pinned .howstart__pin { position: sticky; top: 0; height: var(--hs-vh, 100svh); justify-content: center; }

/* FLAT: one under the other, each step as it reaches the screen */
.howstart:not(.is-pinned) .howstart__view { overflow: visible; }
.howstart:not(.is-pinned) .howstart__track { flex-direction: column; gap: clamp(48px, 8vw, 80px); transform: none !important; }
.howstart:not(.is-pinned) .howstart__progress { display: none; }
@media (max-width: 899px) {
  .howstart__step { grid-template-columns: minmax(0, 1fr); text-align: left; gap: 16px; }
  .howstart__fig { max-width: 420px; margin-inline: auto; }
}

/* KOEIA, right above the plans: the name set as the relay used to set it,
   coming up out of the blur letter by letter when it reaches the screen. */
.koeia-name { display: flex; justify-content: center; padding: clamp(40px, 10svh, 120px) 16px clamp(24px, 5svh, 56px); }
.koeia-name__word {
  margin: 0; font-size: clamp(64px, 11vw, 160px); font-weight: 200; line-height: 1;
  letter-spacing: .14em; text-indent: .14em; white-space: nowrap; color: var(--nix-text);
}
.koeia-name__word > span { display: inline-block; text-indent: 0; }
.koeia-name__word > span:first-child { margin-right: -0.0453em; }
.koeia-name__word.is-waiting > span { opacity: 0; }
.koeia-name__word.is-arrived > span { animation: koeia-appear 520ms cubic-bezier(.22,1,.36,1) calc(var(--i, 0) * 100ms) both; }
@media (prefers-reduced-motion: reduce) {
  .koeia-name__word.is-arrived > span { animation: koeia-fade 520ms cubic-bezier(.22,1,.36,1) both; }
  .howstart__step { transition: none; }
}
@keyframes koeia-appear { from { opacity: 0; filter: blur(6px); transform: scale(.94); } to { opacity: 1; filter: none; transform: none; } }
@keyframes koeia-fade { from { opacity: 0; } to { opacity: 1; } }

/* the plans come right under the name */
.koeia-name + #plans { margin-top: 0; }

/* the figures' own moving parts */
.howstart__fig .sig { fill: none; stroke: var(--ig-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms cubic-bezier(.4,0,.2,1); }
.howstart__fig .sig.go { stroke-dashoffset: 0; }
.howstart__fig .bar { fill: var(--ig-accent); transform-box: fill-box; transform-origin: left; transform: scaleX(0); transition: transform 1600ms cubic-bezier(.2,.7,.2,1); }
.howstart__fig .bar.go { transform: scaleX(1); }
.howstart__fig .light { transition: fill 400ms ease; }
@media (prefers-reduced-motion: reduce) { .howstart__fig .sig, .howstart__fig .bar { transition: none; } }
