/*
 * 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: 3.2rem; 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: 4.5rem; }
}

/* Second button under the portfolio on the home page (dark band): the
   package styles light outline buttons only inside .fkw-cta--ink. */
.fkw-section--ink .fkw-button--ghost { color: var(--fkw-color-on-ink); border-color: rgb(255 255 255 / .3); }
.fkw-section--ink .fkw-button--ghost:hover { border-color: var(--fkw-color-on-ink); }

/* The short film under the hero (web/hero_film.html, web/hero-film.js). */
.hero-film { position: relative; margin-top: calc(-1 * clamp(1.5rem, 5vw, 4rem)); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-film__frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--fkw-color-border);
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2.5rem 5rem -2.75rem rgb(12 33 64 / .4), 0 2px 6px rgb(12 33 64 / .04);
}
.hero-film__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #fff; }
.hero-film__toggle {
  position: absolute; right: .75rem; bottom: .75rem;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .8rem; border: 0; border-radius: 999px;
  background: rgb(12 33 64 / .85); color: #fff;
  font: 600 .8rem/1.2 var(--fkw-font-body); cursor: pointer;
}
.hero-film__toggle:focus-visible { outline: 3px solid var(--fkw-color-primary); outline-offset: 2px; }
.hero-film__icon { fill: currentColor; }
.hero-film__play, .hero-film__toggle[aria-pressed="true"] .hero-film__pause { display: none; }
.hero-film__toggle[aria-pressed="true"] .hero-film__play { display: inline; }
.hero-film__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 40rem) {
  .hero-film__toggle { right: .5rem; bottom: .5rem; padding: .45rem; }
  .hero-film__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
