/* How we work (home page, under the customer stories): two ways in, We deliver or We embed.
   The switch picks a route; the card under it describes that route and its four steps run down a scroll timeline.
   The heading, switch and card stay put while a Forest Green line fills down the steps; each step fades in,
   and its dot and number turn Forest Green when the line reaches it (how-we-work.js). */

.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
/* Kept short so the white card and a little space below it fit on a laptop screen, even on first arriving here */
.how-side { position: sticky; top: calc(var(--nav-h, 68px) + 1.5rem); }
.how-side h2 { max-width: none; text-wrap: balance; }
.how-side .section-intro { margin-top: 1rem; max-width: 46ch; }

/* The switch: a dark thumb slides under the chosen route */
.how-switch { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 32rem; margin-top: 1.5rem; padding: 5px; border-radius: 999px; background: rgba(14, 37, 27, .07); }
.how-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 2); border-radius: 999px; background: var(--ink); transition: left 420ms var(--ease-out, ease-out), width 420ms var(--ease-out, ease-out); }
.how-switch[data-on="fde"] .how-thumb { left: calc(5px + (100% - 10px) / 2); }
.how-switch button { position: relative; padding: .8rem 1rem; border: 0; border-radius: 999px; background: none; color: var(--text-muted); font-family: inherit; font-size: 1rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; white-space: nowrap; cursor: pointer; transition: color 300ms var(--ease-out, ease-out); }
.how-switch button:hover { color: var(--ink); }
.how-switch button[aria-selected="true"] { color: var(--paper); }
.how-switch button:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

.how-card { max-width: 32rem; margin-top: .75rem; padding: 1.35rem 1.75rem 1.5rem; border: 1px solid rgba(14, 37, 27, .1); border-radius: 18px; background: var(--white); }
.how-route { display: grid; gap: .75rem; justify-items: start; }
.how-route[hidden] { display: none; }
.how-who { font-weight: 500; color: var(--forest); }
.how-body { max-width: 44ch; font-size: 1.1rem; line-height: 1.5; }
.how-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: .4rem; color: var(--forest); font-weight: 500; text-decoration: none; }
.how-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 250ms var(--ease-out, ease-out); }
.how-link:hover svg { transform: translateX(4px); }

/* Switching routes fades the card and the steps out, swaps them, and fades them back in */
.how-fade { transition: opacity 180ms ease; }
.how-fade.is-out { opacity: 0; }

.how-steps { position: relative; padding-left: clamp(2.5rem, 5vw, 4rem); }
.how-steps[hidden] { display: none; }
.how-steps:focus-visible { outline: 2px solid var(--forest); outline-offset: 12px; border-radius: 4px; }
.how-list { list-style: none; margin: 0; padding: 0; }
.how-rail { position: absolute; top: calc(.35rem + 8px); bottom: 0; left: 7px; width: 2px; background: rgba(14, 37, 27, .14); }
.how-fill { position: absolute; inset: 0 0 auto; height: calc(var(--p, 0) * 100%); background: var(--forest); }

.how-step {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(1rem, 2.5vw, 2rem); align-items: start;
  padding-bottom: clamp(5rem, 14vh, 9rem); opacity: .18; transform: translateY(24px);
  transition: opacity 600ms var(--ease-out, ease-out), transform 600ms var(--ease-out, ease-out);
}
.how-step:last-child { padding-bottom: 0; }
.how-step.is-in { opacity: 1; transform: none; }
.how-dot { position: absolute; top: .35rem; left: calc(-1 * clamp(2.5rem, 5vw, 4rem)); width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(14, 37, 27, .25); background: var(--paper); transition: background-color 300ms, border-color 300ms, box-shadow 300ms; }
.how-step.is-on .how-dot { background: var(--forest); border-color: var(--forest); box-shadow: 0 0 0 6px rgba(18, 73, 46, .12); }

.how-num { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: .8; font-weight: 500; letter-spacing: -0.01em; color: transparent; -webkit-text-stroke: 1.5px rgba(14, 37, 27, .22); transition: color 500ms, -webkit-text-stroke-color 500ms; }
.how-step.is-on .how-num { color: var(--forest); -webkit-text-stroke-color: var(--forest); }

.how-text { display: grid; gap: .9rem; min-width: 0; }
.how-tag { font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); }
.how-text h3 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 500; }
.how-text p:last-child { max-width: 46ch; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .how-thumb, .how-switch button, .how-fade, .how-step, .how-dot, .how-num { transition: none; }
}
@media (min-width: 961px) { .v2 #main > section.how { padding-top: 4rem; } }
@media (max-width: 960px) {
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .how-side { position: static; }
}
@media (max-width: 600px) {
  .how-step { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
  .how-num { font-size: 2.5rem; }
}
@media (max-width: 420px) {
  .how-switch button { padding: .7rem .6rem; font-size: .92rem; white-space: normal; }
  .how-card { padding: 1.35rem 1.25rem 1.5rem; }
}
