/* How it works (plan.md "How it works"): the page inside the arsenal's `thread`, restyled into the site's ribbon
   (scenes\hiw-thread.md). Every part keeps a lane at its left for the line: the numbers stand in it, the words start
   after it, and the pictures the line passes behind reach into it. The parts take no position and no stacking
   context, so their grounds paint under the line. */
@import url("../arsenal/thread.css");

/* ---------- the line: the logo's cyan, 5 px, its trail a pale second stroke beside it, its head the swoosh ---------- */
.hiw {
  --thread-ink: var(--c-brand);
  --thread-track-ink: color-mix(in srgb, var(--c-brand) 30%, transparent);
  --thread-bg: color-mix(in srgb, var(--c-brand-light) 45%, var(--c-paper));
  --thread-w: 5px;
  --thread-radius: 48px;
  --thread-inset: 24px;
  --thread-tail: 120px;
  --lane: 48px;
  --lane-gap: var(--space-4);
}
.hiw[data-track="line"] .thread__track { stroke-width: 2.5; transform: translate(7px, 5px); }
.hiw .thread__tail path { stroke: var(--c-ribbon-bright); }

/* the words of each part start after the lane */
.lane__head, .step__text, .hf .faq__in > h2 { padding-left: calc(var(--lane) + var(--lane-gap)); }
.lane__head { max-width: 46rem; }
.lane__head .lede { margin-bottom: 0; }

/* ---------- hero: centered words, the button the line leaves from, a wide framed stage of three calm clips with
   the notifications of a working day in glass at its right ---------- */
.hh { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-y); }
.hh__in { text-align: center; }
.hh__in h1 { max-width: 15em; margin-inline: auto; }
.hh__in .lede { margin-inline: auto; }
.hh__act { justify-content: center; }
.hh__act .act-note { flex: 0 1 auto; }
.hh__stage { position: relative; height: clamp(400px, 36vw, 480px); margin-top: var(--space-5); overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
/* the kit's rotate (kit\kit.md, the header), as it stands */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
.hh__wyw.scene { position: absolute; z-index: 4; top: 24px; right: 24px; bottom: 44px; width: min(420px, 42%); }
.hh__stop { z-index: 5; top: 16px; left: 16px; right: auto; }

/* ---------- the steps: the number in the lane, the words, the picture ---------- */
.steps { display: grid; gap: var(--space-5); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: var(--lane) minmax(0, 1fr) minmax(0, 420px); gap: var(--space-4); align-items: center; }
.step__text { padding-left: 0; }
.step__text h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }
.step__text p { margin: 0; color: var(--c-ink-soft); max-width: 32em; }
.step__text .step__tag { margin-top: var(--space-2); color: var(--c-brand-text); font: 600 var(--fs-small)/1.3 var(--font-ui); }
.step__num, .handover__node { position: relative; z-index: 1; display: grid; place-items: center; width: var(--lane); height: var(--lane); border-radius: 50%; }
.step__num { background: var(--c-paper); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c-brand) 35%, var(--c-paper)), var(--shadow-s); color: var(--c-ink); font: 600 1.25rem/1 var(--font-display); }
.step__num::before, .handover__node::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c-brand); opacity: var(--lit, 0); }
.step__num::after, .handover__node::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--c-brand); opacity: calc(var(--lit, 0) * (1 - var(--lit-after, 0))); transform: scale(calc(1 + 0.9 * var(--lit-after, 0))); pointer-events: none; }
.step__num > span, .handover__node > svg { position: relative; }

/* yours: on the designed ground (the pale ground deepening into the tint; the line itself is its ribbon) */
.hy { background: linear-gradient(180deg, var(--c-paper-alt), var(--c-brand-light) 70%, var(--c-paper-alt)); }
.step__card { position: relative; width: 100%; max-width: 420px; justify-self: end; }
.step__scene.scene { position: relative; display: block; width: 100%; }
.step__scene--goal.scene { height: 290px; }
.step__stop { top: -48px; right: 0; }
.handover { display: grid; grid-template-columns: var(--lane) minmax(0, 1fr); gap: var(--space-4); align-items: center; margin-top: var(--space-5); }
.handover__node { background: var(--c-ink); color: var(--c-brand-on-ink); font-size: 1.4rem; }
.handover__node > svg { stroke-width: 2.2; }
.handover p { margin: 0; color: var(--c-ink-soft); font-size: var(--fs-h3); }
.handover b { color: var(--c-ink); font-family: var(--font-display); font-weight: 600; }

/* ours: a framed photo per step, its scene in glass over the photo's clear part */
.step--photo { grid-template-columns: var(--lane) minmax(0, 0.7fr) minmax(0, 1.3fr); }
.step--flip { grid-template-columns: var(--lane) minmax(0, 1.3fr) minmax(0, 0.7fr); }
.step--flip .step__media { order: 1; }
.step--flip .step__text { order: 2; }
.step__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.step__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(calc(0.62 + 0.38 * var(--lit, 1))); }
.step__glass.scene { position: absolute; z-index: 2; }
.step__glass--launch { right: 14px; top: 0; bottom: 0; margin-block: auto; width: clamp(260px, 40%, 300px); height: 300px; }
.step__glass--leads { left: 0; right: 0; bottom: 14px; margin-inline: auto; width: clamp(260px, 44%, 320px); height: 284px; }
.step__glass--tune { left: 14px; top: 0; bottom: 0; margin-block: auto; width: clamp(260px, 44%, 320px); height: 300px; }
.step--photo:nth-child(3) .step__media > img { object-position: 50% 40%; }
.step__media .step__stop { top: 14px; right: auto; left: 14px; }

/* inside: the plan's three cards in glass over a framed photo of an owner reading her plan */
.hi__media { position: relative; height: clamp(540px, 44vw, 600px); margin-top: var(--space-4); overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.hi__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; filter: saturate(calc(0.62 + 0.38 * var(--lit, 1))); }
.hi__plan.scene { position: absolute; z-index: 2; top: 0; bottom: 0; right: 24px; margin-block: auto; width: min(620px, 55%); height: 500px; }
.hi__stop { top: 16px; left: 16px; right: auto; }

/* team: the owner at her counter, and the dashboard where she taps "Talk with a human" */
.ht__row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(760px, 2fr); gap: var(--space-4); align-items: stretch; margin-top: var(--space-4); }
.ht__photo { position: relative; margin: 0; min-height: 580px; overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.ht__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 47% 40%; filter: saturate(calc(0.62 + 0.38 * var(--lit, 1))); }
.ht__stage { position: relative; }
.ht__tap.scene { position: relative; display: block; width: 100%; height: 580px; }
.ht__stop { top: 8px; right: 8px; }

/* close: the handshake on the lawn, the panel low at the right, where the line ends in the main button */
.hc { place-items: end center; }
.hiw .btn[data-thread-anchor] { box-shadow: 0 1px 1px color-mix(in srgb, var(--c-ink) 10%, transparent), 0 10px 24px -12px color-mix(in srgb, var(--act) 85%, transparent), 0 0 0 calc(var(--lit, 0) * 5px) color-mix(in srgb, var(--c-brand) 30%, transparent); }

@media (max-width: 1099px) {
  .ht__row { grid-template-columns: minmax(0, 1fr); }
  .ht__photo { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 860px) {
  .hf .faq__list { padding-left: calc(var(--lane) + var(--lane-gap)); }
}
@media (max-width: 960px) {
  .step, .step--photo, .step--flip { grid-template-columns: var(--lane) minmax(0, 1fr); align-items: start; row-gap: var(--space-3); }
  .step__num { align-self: start; }
  .step__card, .step__media, .step--flip .step__media { grid-column: 2; order: 3; justify-self: stretch; max-width: none; }
  .step--flip .step__text { order: 0; }
}
@media (max-width: 760px) {
  .hiw { --lane: 36px; --lane-gap: var(--space-2); }
  .step__num { font-size: 1.05rem; }
  .hh__stage { height: auto; aspect-ratio: 4 / 5; }
  .hh__wyw.scene { top: auto; left: 12px; right: 12px; bottom: 44px; width: auto; height: 200px; }
  .step__card, .step__media, .step--flip .step__media { grid-column: 1 / -1; }
  /* the phone: the photo square, its faces in its upper half, the scene over its lower half and past its foot */
  .step__media { aspect-ratio: auto; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  .step__media > img { position: relative; inset: auto; display: block; aspect-ratio: 1; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
  .step__glass.scene, .step__glass--launch, .step__glass--leads, .step__glass--tune { position: relative; inset: auto; margin: -170px auto 0; width: calc(100% - 24px); height: 300px; }
  .hi__media { height: auto; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  .hi__media > img { position: relative; inset: auto; display: block; aspect-ratio: 5 / 6; border-radius: var(--radius-l); }
  .hi__plan.scene { position: relative; inset: auto; margin: -244px auto 0; width: 100%; height: 470px; }
  .handover p { font-size: var(--fs-body); }
}
