@import url("../arsenal/thread.css");
/* site\assets\css\pages\how-it-works.css: the How it works page (plan.md, "How it works"). The thread (the arsenal's
   composition) restyled as the site's measuring line: a ticked track, the line in the brand's green, the logo's lens at
   its head, each step's number a tile it plugs into and lights. Each part keeps its line in a lane clear of its words:
   the header's button and the analysis' spine at the middle, the plan and what it holds at 66%, the action's steps on a
   spine at the left, the team and the FAQ in the gap between their columns, the close's button. Tokens of
   design\system.css only. */

/* ---------- the line ---------- */
.hiw-thread { position: relative; --thread-ink: var(--c-brand-dark); --thread-track-ink: color-mix(in srgb, var(--c-ink-soft) 38%, transparent); --thread-bg: var(--c-paper); --thread-w: 2.5px; --thread-radius: 44px; --thread-tail: 0px; }
.hiw-thread .thread__track { stroke-width: 11px; stroke-linecap: butt; stroke-dasharray: 1.25 10.75; }
.hiw-thread .thread__bead { stroke-width: 2.5; }

/* a step's number: a tile on the line; it fills with the brand as the line plugs in, and one ring spreads from it */
.hiw-num { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: var(--radius-m); background: var(--c-paper); border: 1px solid var(--c-line); box-shadow: var(--shadow-s); font: 600 0.9375rem/1 var(--font-mono); color: color-mix(in srgb, var(--c-on-brand) calc(var(--lit, 0) * 100%), var(--c-ink-soft)); }
.hiw-num::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; background: var(--c-brand); opacity: var(--lit, 0); }
.hiw-num::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--c-brand); opacity: calc((1 - var(--lit-after, 1)) * var(--lit, 0)); transform: scale(calc(1 + var(--lit-after, 1) * 0.55)); pointer-events: none; }
.hiw-num > span { position: relative; }
/* a small tick on the line where it passes a part with no number (the team, the FAQ) */
.hiw-tick { position: relative; align-self: start; justify-self: center; width: 14px; height: 14px; margin-top: 0.7rem; border-radius: 50%; background: var(--c-paper); border: 2px solid color-mix(in srgb, var(--c-brand-dark) calc(35% + var(--lit, 0) * 65%), var(--c-line)); }
.hiw-tick::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--c-brand); opacity: var(--lit, 0); }

/* a stage's chip beside its headline */
.hiw-chip { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; vertical-align: 0.45em; }

/* a step's title and line */
.hiw-step__title { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }
.hiw-step__line { margin-top: 0.4rem; font-size: 1.0625rem; line-height: 1.5; color: var(--c-ink-soft); max-width: 30rem; }

/* a photo in a rounded frame, its scene in glass over it */
.hiw-frame { position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--c-graphite); box-shadow: var(--shadow-l); }
.hiw-frame__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.hiw-frame .scene { position: absolute; z-index: 1; }
.hiw-frame__stop { position: absolute; top: 1rem; right: 1rem; z-index: 3; }

/* ---------- hero: the words over a wide framed stage, a week filling up, the chat in glass at its right ---------- */
.hiw-hero { padding-top: clamp(2.5rem, 1.5rem + 3.5vw, 5rem); }
.hiw-hero__words { text-align: center; }
.hiw-hero__title { font-size: var(--fs-display); max-width: 15ch; margin-inline: auto; }
.hiw-nb { white-space: nowrap; }
.hiw-hero__line { margin: 1.25rem auto 0; max-width: 36rem; font-size: 1.2rem; line-height: 1.55; color: var(--c-ink-soft); }
.hiw-hero__go { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 1.4rem; margin-top: 2.25rem; }
.hiw-hero__go .btn { grid-column: 2; }
.hiw-hero__go .ticks { grid-column: 3; justify-self: start; margin: 0; text-align: left; }
.hiw-hero__stagewrap { margin-top: clamp(2.25rem, 1.2rem + 2.6vw, 3.5rem); }
.hiw-hero__stage { position: relative; }
.hiw-hero__frame { position: relative; height: clamp(500px, 40vw, 600px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-graphite); box-shadow: var(--shadow-l); }
[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%))); } /* the kit gives the glide in whole device pixels */
[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); } /* each clip reaches 1 px past its frame; until it has shown its first frames, its first paint is cut 1 px inside it, so the first picture stays the largest paint */
[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); } /* the picture that left goes once the new one covers it whole */
[data-kit-scene="rotate"] [data-kit-slide] img.kit-first { inset: -1px !important; width: calc(100% + 2px) !important; height: calc(100% + 2px) !important; max-width: none; }
.hiw-hero__clip { object-position: var(--pos, 50% 50%); }
/* both clips were shot from across the desk: turned right way up, the time and the dates read upright and the hand
   comes from the viewer's side (each slide's --pos picks the crop of the clip as shot; the turn then shows it upright) */
.hiw-hero__slide video, .hiw-hero__slide img.kit-first { transform: rotate(180deg); }
.hiw-hero__grade { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(270deg, rgba(var(--c-shade), 0.5) 0%, rgba(var(--c-shade), 0.24) 26%, rgba(var(--c-shade), 0) 48%); }
.scene.hiw-hero__chat { position: absolute; z-index: 4; right: clamp(1.25rem, 4vw, 4rem); top: clamp(1rem, 2.2vw, 1.75rem); width: 300px; }
.hiw-hero__stop { position: absolute; z-index: 5; top: 1rem; left: 1rem; }

/* ---------- analysis: the owner's two steps on the graphite designed ground, the spine between them ---------- */
.hiw-ana { padding-top: var(--section-y); }
/* not positioned and no stacking context, so the line draws over its ground (thread README, "What it needs") */
.hiw-ana__card { margin-inline: var(--inset); padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); border-radius: var(--radius-l); color: var(--c-on-ink);
  background: radial-gradient(120% 95% at 50% 45%, transparent 40%, var(--c-graphite) 88%), linear-gradient(var(--c-ink-line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--c-ink-line) 1px, transparent 1px) 0 0 / 56px 56px, var(--c-graphite); }
.hiw-ana__head { max-width: 44%; }
.hiw-ana .sec-title { color: var(--c-on-ink); }
.hiw-ana .sec-line { color: var(--c-on-ink-soft); }
.hiw-ana .hiw-chip { border-color: var(--c-glass-line); color: var(--c-on-ink-soft); }
.hiw-ana__steps { display: grid; grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr); align-items: start; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.hiw-ana__step--01 { grid-column: 1; padding-top: 0.75rem; }
.hiw-ana__spine { grid-column: 2; display: grid; justify-items: center; row-gap: 26px; }
.hiw-ana__step--02 { grid-column: 3; padding-top: calc(0.75rem + 78px); }
.hiw-ana .hiw-num { background: var(--c-graphite-deep); border-color: var(--c-ink-line); color: color-mix(in srgb, var(--c-on-brand) calc(var(--lit, 0) * 100%), var(--c-on-ink-soft)); }
.hiw-ana .hiw-step__title { color: var(--c-on-ink); }
.hiw-ana .hiw-step__line { color: var(--c-on-ink-soft); }
.hiw-ana__pic { position: relative; margin-top: 1.5rem; }
.scene.hiw-ana__goal { width: min(100%, 420px); }
.scene.hiw-ana__scan { width: min(100%, 480px); }
.hiw-ana__stop { position: absolute; top: 0; right: 0; }

/* ---------- the plan: the photo at the left with the months in glass, its number on the lane at 66% ---------- */
.hiw-plan { padding-top: var(--section-y); }
.hiw-lane { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 8fr) minmax(0, 30fr); align-items: center; }
.hiw-lane__pic { grid-column: 1; }
.hiw-lane > .hiw-num { grid-column: 2; justify-self: center; }
.hiw-lane__words { grid-column: 3; }
.hiw-frame--plan { height: 540px; }
.hiw-frame--plan .hiw-frame__photo { object-position: 70% 50%; }
.scene.hiw-plan__bars { left: 0.5rem; top: 0; bottom: 0; width: min(440px, 58%); }

/* ---------- what the plan holds: the plan building on the light designed ground ---------- */
.hiw-in { margin-top: var(--section-y); padding-block: var(--section-y);
  background: linear-gradient(color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 56px 56px, var(--c-paper-alt); }
.hiw-in__in { display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hiw-in__lens { display: block; width: clamp(140px, 16vw, 220px); height: auto; margin-top: 2.5rem; fill: color-mix(in srgb, var(--c-ink) 7%, transparent); }
.hiw-in__stage { position: relative; }
.scene.hiw-in__scene { display: block; width: 100%; height: 560px; }
.hiw-in__stop { position: absolute; top: -3.25rem; right: 0; }
/* the hand-over: the owner's part ends, ours begins, on the line */
.hiw-hand { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 8fr) minmax(0, 30fr); align-items: center; margin-top: clamp(3rem, 2.4rem + 2vw, 4.5rem); }
.hiw-hand__side { font-size: var(--fs-small); line-height: 1.45; color: var(--c-ink-soft); }
.hiw-hand__side b { display: block; margin-bottom: 0.15rem; font: 600 var(--fs-mono)/1.3 var(--font-mono); letter-spacing: 0.02em; color: var(--c-brand-text); }
.hiw-hand__side--you { grid-column: 1; justify-self: end; text-align: right; padding-right: 0.5rem; }
.hiw-hand__node { grid-column: 2; justify-self: center; position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--c-brand) calc(var(--lit, 0) * 100%), var(--c-paper)); border: 1px solid var(--c-line); box-shadow: var(--shadow-s); }
.hiw-hand__node svg { width: 20px; height: 20px; fill: color-mix(in srgb, var(--c-on-brand) calc(var(--lit, 0) * 100%), var(--c-ink-soft)); }
.hiw-hand__node::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--c-brand); opacity: calc((1 - var(--lit-after, 1)) * var(--lit, 0)); transform: scale(calc(1 + var(--lit-after, 1) * 0.6)); }
.hiw-hand__side--us { grid-column: 3; padding-left: 0.5rem; }

/* ---------- action: the agency's three steps on a spine at the left, each over a wide photo ---------- */
.hiw-act { padding-top: var(--section-y); }
.hiw-act__head { padding-left: 72px; max-width: 46rem; }
.hiw-act__step { margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.hiw-act__label { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 1.4rem; }
.hiw-act__words { padding-top: 0.55rem; }
.hiw-act .hiw-frame { height: 470px; }
.hiw-frame--launch .hiw-frame__photo { object-position: 50% 62%; }
.scene.hiw-act__launch { left: clamp(1rem, 3vw, 2.5rem); bottom: 1.25rem; width: 320px; height: 300px; }
.hiw-frame--leads .hiw-frame__photo { object-position: 50% 28%; }
.scene.hiw-act__leads { left: clamp(4.5rem, 8vw, 6.5rem); bottom: 1.25rem; width: 290px; height: 300px; }
.hiw-frame--tune .hiw-frame__photo { object-position: 50% 18%; }
.scene.hiw-act__tune { right: clamp(1rem, 3vw, 2.5rem); top: 1.25rem; width: 340px; }

/* ---------- who runs it: the words at the left, the pool crew at the right, the reply in glass over the water ---------- */
.hiw-team { padding-top: var(--section-y); }
.hiw-team__in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr); column-gap: clamp(1.25rem, 2.5vw, 2.5rem); align-items: center; }
.hiw-frame--team { height: 460px; }
.hiw-frame--team .hiw-frame__photo { object-position: 50% 50%; }
.scene.hiw-team__reply { left: 1rem; bottom: 1rem; width: min(330px, calc(100% - 2rem)); }

/* ---------- FAQ: its line in the gap between the head and the list ---------- */
.hiw-faq .faq__in { grid-template-columns: minmax(0, 0.8fr) auto minmax(0, 1.2fr); column-gap: clamp(1rem, 2.5vw, 2.5rem); }

/* ---------- close: the closing band; the calls in glass over the lawn at the photo's lower left; the line ends in its button ---------- */
.hiw-close .scene.close-band__scene { right: auto; left: 1.25rem; }
.hiw-close .picker__go { box-shadow: 0 0 0 calc((1 - var(--lit-after, 1)) * var(--lit, 0) * 10px) color-mix(in srgb, var(--c-brand) 35%, transparent); }

@media (max-width: 899px) {
  .hiw-hero__go { grid-template-columns: 1fr; justify-items: center; row-gap: 1rem; }
  .hiw-hero__go .btn, .hiw-hero__go .ticks { grid-column: 1; justify-self: center; }
  .hiw-ana__head { max-width: none; }
  .hiw-ana__steps { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .hiw-ana__spine { display: none; }
  .hiw-ana__step--01, .hiw-ana__step--02 { grid-column: 1; padding-top: 0; }
  .hiw-ana__step--01 .hiw-step__title::before, .hiw-ana__step--02 .hiw-step__title::before { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 0.75rem; border-radius: var(--radius-s); background: var(--c-brand); color: var(--c-on-brand); font: 600 0.875rem/1 var(--font-mono); vertical-align: 0.1em; }
  .hiw-ana__step--01 .hiw-step__title::before { content: '01'; }
  .hiw-ana__step--02 .hiw-step__title::before { content: '02'; }
  /* step 13, finding 2: the goal chat holds the height of its fullest moment (the reply in: 257 px at 390 and 360, with
     3 px to spare), so step 02 under it never moves while the chat plays */
  .scene.hiw-ana__goal { min-height: 260px; }
  .hiw-lane { grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; row-gap: 1.5rem; align-items: start; }
  .hiw-lane__pic { grid-column: 1 / -1; }
  .hiw-lane > .hiw-num { grid-column: 1; }
  .hiw-lane__words { grid-column: 2; }
  .hiw-in__in { grid-template-columns: 1fr; }
  .hiw-in__lens { display: none; }
  .hiw-in__stop { top: -3.25rem; }
  .hiw-hand { grid-template-columns: 1fr; justify-items: center; row-gap: 0.75rem; text-align: center; }
  .hiw-hand__side--you, .hiw-hand__side--us, .hiw-hand__node { grid-column: 1; justify-self: center; text-align: center; padding: 0; }
  .hiw-act__head { padding-left: 0; }
  .hiw-team__in { grid-template-columns: 1fr; row-gap: 2rem; }
  .hiw-tick { display: none; }
  .hiw-faq .faq__in { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .hiw-hero__frame { height: auto; aspect-ratio: 4 / 3.4; }
  /* the chat's phone needs more room than the clip has on a phone, and covered the hand at work: the narrow header
     shows the week filling up alone; the chat's steps follow at once in the analysis (goal, scan) */
  .scene.hiw-hero__chat { display: none; }
  .hiw-hero__stop { top: 0.75rem; left: auto; right: 0.75rem; }
  .hiw-frame--plan { height: 640px; }
  .hiw-frame--plan .hiw-frame__photo { object-position: 74% 50%; }
  .scene.hiw-plan__bars { left: 0; right: 0; top: auto; bottom: 0; width: auto; }
  .hiw-act .hiw-frame { height: 620px; }
  .scene.hiw-act__launch, .scene.hiw-act__leads { left: 50%; right: auto; bottom: 0.9rem; width: min(330px, calc(100% - 1.8rem)); transform: translateX(-50%); }
  .scene.hiw-act__tune { left: 50%; right: auto; top: auto; bottom: 0.9rem; width: min(340px, calc(100% - 1.8rem)); transform: translateX(-50%); }
  /* the landscapers stand in the photo's middle, where the card's top came: the photo grows from its foot, so both
     men stand clear above the card */
  .hiw-frame--launch .hiw-frame__photo { top: auto; height: calc(122% + 2px); object-position: 62% 50%; }
  .hiw-frame--leads .hiw-frame__photo { object-position: 46% 10%; }
  .hiw-frame--tune .hiw-frame__photo { object-position: 40% 0%; }
  .scene.hiw-in__scene { height: 700px; }
  .hiw-frame--team { height: 560px; }
  .hiw-frame--team .hiw-frame__photo { object-position: 72% 50%; }
  /* the close: a taller photo, the calls over the houses at its top, the technician at the van clear below them */
  .hiw-close .close-band__media { aspect-ratio: 4 / 5.6; }
  .hiw-close .close-band__clip { inset: -1px -1px auto; height: 120%; object-position: 64% 0%; }
  .hiw-close .scene.close-band__scene { top: 0.9rem; bottom: auto; left: 50%; right: auto; width: min(360px, calc(100% - 1.8rem)); transform: translateX(-50%); }
}
