/*
 * What only this site has: the example in the hero (web/hero_flow.html).
 * Colours and fonts come from the package tokens set in site.yml.
 */

.flow {
  background: var(--fkw-color-background);
  border: 1px solid var(--fkw-color-border);
  border-radius: 1.25rem;
  box-shadow: 0 2.5rem 5rem -2.75rem rgb(12 33 64 / .4), 0 2px 6px rgb(12 33 64 / .04);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  display: grid;
  gap: 1rem;
  max-width: 35rem;
  margin-inline: auto;
}
.flow__k { display: block; font-family: var(--fkw-font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fkw-color-muted); }
.flow__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: .9rem; border-bottom: 1px solid var(--fkw-color-border); }
.flow__head b { font-family: var(--fkw-font-heading); font-weight: 600; font-size: 1.15rem; }
.flow__ok, .flow__wait { display: inline-flex; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.flow__ok { color: #1a7a50; background: #e7f5ee; }
.flow__wait { color: var(--fkw-color-primary); background: color-mix(in srgb, var(--fkw-color-primary) 10%, #fff); margin-top: .45rem; }

.flow__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; position: relative; }
.flow__steps::before, .flow__steps::after { content: ""; position: absolute; left: 1.06rem; top: 1.25rem; bottom: 1.25rem; width: 2px; background: var(--fkw-color-border); }
/* The orange line stops at the step that waits for a person. */
.flow__steps::after { background: var(--fkw-color-primary); bottom: 4.5rem; transform-origin: top; }
.fkw-motion .flow__steps::after { animation: flow-grow 1.6s cubic-bezier(.4, 0, .2, 1) .3s both; }
@keyframes flow-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.flow__step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: .9rem; align-items: start; padding-block: .5rem; position: relative; z-index: 1; }
.flow__n { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--fkw-color-background); border: 2px solid var(--fkw-color-border); font-family: var(--fkw-font-mono); font-size: .8rem; }
.flow__step.is-done .flow__n { background: var(--fkw-color-ink); border-color: var(--fkw-color-ink); color: #fff; }
.flow__step.is-waiting .flow__n { background: var(--fkw-color-primary); border-color: var(--fkw-color-primary); color: #fff; }
.flow__step b { display: block; font-weight: 600; padding-top: .35rem; }
.flow__sub { display: block; font-size: .85rem; color: var(--fkw-color-muted); }
.flow__time { font-family: var(--fkw-font-mono); font-size: .75rem; color: var(--fkw-color-muted); padding-top: .5rem; font-variant-numeric: tabular-nums; }

.flow__ledger { margin-top: .5rem; background: var(--fkw-color-ink); color: #f4f7fb; border-radius: .6rem; padding: .6rem .75rem; font-family: var(--fkw-font-mono); font-size: .75rem; display: grid; gap: .25rem; font-variant-numeric: tabular-nums; }
.flow__ledger div { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .6rem; }
.flow__ledger span:first-child { color: var(--fkw-color-accent); }
.flow__sum { border-top: 1px dashed rgb(169 189 214 / .4); padding-top: .25rem; }

.flow__foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding-top: .9rem; border-top: 1px solid var(--fkw-color-border); font-size: .8rem; color: var(--fkw-color-muted); }
.flow__foot span { display: inline-flex; gap: .6rem; align-items: center; }
.flow__dot { width: .5rem; height: .5rem; border-radius: 50%; background: #1f8a5b; box-shadow: 0 0 0 4px rgb(31 138 91 / .15); flex: none; }

@media (max-width: 30rem) {
  .flow__step { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .flow__time, .flow__wait { grid-column: 2; padding-top: 0; justify-self: start; }
  .flow__steps::after { bottom: 6rem; }
}
