@import url("../arsenal/thread.css");

/* How it works: plan.md "How it works" (The thread). Tokens only (design\system.css); components from components.css.
   The thread runs down the page's middle lane: every part's words keep to the left of it, its numbers sit on it, and
   the parts stay unpositioned so the line shows over their grounds (arsenal\compositions\thread\README.md). */
.thread.hiw { --thread-ink: var(--c-brand); --thread-bg: var(--c-paper); }
.thread.hiw > section.band { position: static; }
.thread.hiw > section.band > .wrap { position: relative; }

/* a step's number on the thread: a ring that fills with the brand as the line plugs in, one ring spreading out */
.hiw-num { position: relative; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: var(--frame) solid var(--c-brand);
  background: color-mix(in srgb, var(--c-brand) calc(var(--lit, 1) * 100%), var(--c-paper)); color: color-mix(in srgb, var(--c-on-brand) calc(var(--lit, 1) * 100%), var(--c-brand-text));
  font: 800 1.3rem/1 var(--font-display); box-shadow: var(--shadow-s); }
.hiw-num::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--c-brand); pointer-events: none;
  opacity: calc((1 - var(--lit-after, 1)) * var(--lit, 0)); transform: scale(calc(1 + var(--lit-after, 1) * 0.9)); }

/* the heads keep to the left of the lane */
.before__head, .after__head, .inside__words { max-width: min(45%, 34rem); }

/* ---------- hero: the schedule filling up as two calm cuts in turn, the words centered over a soft shade, the main
   button where the thread starts, wyw's notifications in glass at the lower right, clear of the hands ---------- */
.hiw-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: clamp(660px, calc(100svh - var(--header-h)), 860px); color: var(--c-on-ink); background: var(--c-band-deep); }
.hiw-hero__stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; overflow: clip; }
.hiw-hero__stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--c-brand-dark) 84%, transparent) 0%, color-mix(in srgb, var(--c-brand-dark) 74%, transparent) 46%, color-mix(in srgb, var(--c-brand-dark) 30%, transparent) 72%, transparent 100%); }
.hiw-hero[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; overflow: clip; }
.hiw-hero[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%))); }
.hiw-hero[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
.hiw-hero[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
.hiw-hero[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hiw-hero[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
.hiw-hero[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); }
.hiw-hero[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
.hiw-hero[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
.hiw-hero__stop { position: absolute; z-index: 4; top: 20px; right: 20px; }
/* the footage's lower right corner holds a stray hand-lettered note: scaled from the upper left, it falls outside */
@media (min-width: 900px) { .hiw-hero[data-kit-scene="rotate"] [data-kit-slide] video { transform: scale(1.2); transform-origin: 25% 25%; } }
.hiw-hero__in { position: relative; z-index: 2; flex: 1; display: grid; justify-items: center; align-content: start; padding-block: clamp(2.5rem, 7vh, 5rem) clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.hiw-hero__words { max-width: 48rem; }
.hiw-hero__title { color: var(--c-on-ink); font-size: clamp(2.2rem, 1.25rem + 2.9vw, 4rem); line-height: 1.04; letter-spacing: -0.02em; }
.hiw-hero__line { max-width: 36rem; margin: 1.1rem auto 0; color: var(--c-on-ink-soft); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; }
.hiw-hero__cta { align-items: center; margin-top: 1.6rem; }
.hiw-hero__cta .reassure { justify-content: center; }
.scene.hiw-hero__scene { position: absolute; z-index: 2; right: max(var(--gutter), calc((100vw - var(--max-w)) / 2)); bottom: clamp(1.5rem, 4vw, 3rem); width: 360px; height: 290px; text-align: start; }
@media (max-width: 899px) {
  .hiw-hero { min-height: 0; }
  .hiw-hero__stage { position: relative; inset: auto; order: 2; height: 440px; }
  .hiw-hero__stage::after { background: linear-gradient(180deg, color-mix(in srgb, var(--c-brand-dark) 35%, transparent) 0%, transparent 40%); }
  .hiw-hero__in { order: 1; padding-block: 2rem 2.25rem; }
  .scene.hiw-hero__scene { position: absolute; top: auto; bottom: 18px; left: 50%; right: auto; width: min(calc(100% - 2 * var(--gutter)), 360px); translate: -50% 0; }
  .hiw-hero__in { position: static; }
  .hiw-hero__stop { top: auto; bottom: calc(440px - 14px - 40px); right: 14px; } /* on the clip's corner, clear of the headline */
}

/* ---------- before: the owner's three steps on the lavender, each a white card in the logo's frame under its number ---------- */
.before__steps { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; list-style: none; }
.before__step { display: grid; justify-items: center; gap: 1.1rem; }
.before__card { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--c-paper); box-shadow: var(--shadow-m); }
.before__words h3 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); color: var(--c-brand-text); }
.before__words p { margin-top: 0.6rem; max-width: 30rem; color: var(--c-ink-soft); font-size: 1.0625rem; line-height: 1.55; }
.before__words .before__tag { margin-top: 0.9rem; font: 700 0.875rem/1.3 var(--font-ui); color: var(--c-brand-text); }
.before__stop { position: absolute; top: 14px; right: 14px; z-index: 2; }
.scene.before__scene { position: relative; width: 100%; height: 320px; }
.scene.before__scene--leadbars { height: 390px; }
@media (max-width: 899px) {
  .before__head, .after__head, .inside__words { max-width: none; }
  .before__card { grid-template-columns: minmax(0, 1fr); }
  .scene.before__scene { height: 340px; }
  .scene.before__scene--scan { height: 400px; }
  .scene.before__scene--leadbars { height: 420px; }
}

/* ---------- after: three framed photos down the lane, sides alternating, each step's scene in glass on its clear side ---------- */
.after__steps { display: grid; gap: clamp(2.5rem, 5vw, 4rem); margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; list-style: none; }
.after__step { display: grid; grid-template-columns: minmax(0, 1.25fr) 96px minmax(0, 1fr); align-items: center; }
.after__step .hiw-num { justify-self: center; }
.after__step--flip .after__media { order: 3; }
.after__step--flip .hiw-num { order: 2; }
.after__step--flip .after__words { order: 1; text-align: right; }
.after__step--flip .after__words p { margin-left: auto; }
.after__media { position: relative; overflow: hidden; overflow: clip; aspect-ratio: 4 / 3; background: var(--c-paper-alt); }
.after__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 100% 50%; }
.after__stop { position: absolute; top: 14px; left: 14px; z-index: 2; }
.scene.after__scene { position: absolute; z-index: 1; top: 50%; width: min(54%, 340px); translate: 0 -50%; }
.scene.after__scene--launch { right: 4%; height: 336px; } /* its rows sit at its foot, the note drops over its top: room for both (329-340 wide) */
.scene.after__scene--leads { left: 4%; width: min(60%, 340px); height: 280px; } /* her face at 68-80% stays clear */
.scene.after__scene--tune { left: 4%; height: 340px; }
.after__words h3 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); color: var(--c-brand-text); }
.after__words p { margin-top: 0.6rem; max-width: 26rem; color: var(--c-ink-soft); font-size: 1.0625rem; line-height: 1.55; }
@media (max-width: 899px) {
  /* the number beside its words, so the narrow line runs down its own column (thread README, Narrow); the photo under
     them across the whole width, the line behind it, the step's scene standing on its lower part, the face clear above */
  .after__step, .after__step--flip { grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; row-gap: 1rem; align-items: start; }
  .after__step .hiw-num, .after__step--flip .hiw-num { grid-column: 1; grid-row: 1; justify-self: center; width: 46px; height: 46px; font-size: 1.15rem; }
  .after__step .after__words, .after__step--flip .after__words { grid-column: 2; grid-row: 1; align-self: center; text-align: left; }
  .after__step .after__media, .after__step--flip .after__media { grid-column: 1 / -1; grid-row: 2; }
  .after__step--flip .after__words p { margin-left: 0; }
}
@media (max-width: 1279px) {
  /* under 1280 px a step's photo beside its words is too narrow for its scene (the leads under its 260 px, its names
     wrapping): the photo stands taller, as on the phone, and the scene stands on its lower part across its width, the
     face clear above */
  .after__media { aspect-ratio: auto; height: 520px; }
  .after__step:nth-child(2) .after__media { height: 500px; }
  .after__step:nth-child(3) .after__media { height: 540px; }
  .after__step:nth-child(1) .after__photo { object-position: 49% 50%; }
  .after__step:nth-child(2) .after__photo { object-position: 80% 50%; }
  .after__step:nth-child(3) .after__photo { object-position: 64% 50%; }
  .scene.after__scene { top: auto; bottom: 12px; left: 12px; right: auto; width: min(calc(100% - 24px), 400px); translate: none; }
  .scene.after__scene--launch { height: 340px; }
  .after__stop { top: 12px; left: 12px; }
}

/* ---------- inside: plan-builder in glass over an owner reading his plan, clear of his face ---------- */
.inside__media { position: relative; overflow: hidden; overflow: clip; height: 680px; margin-top: clamp(1.5rem, 3vw, 2.5rem); background: var(--c-paper-alt); }
.inside__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 35%; }
.inside__stop { position: absolute; top: 16px; right: 16px; z-index: 2; }
/* plan-builder lays out wide from 600 px (520-640 high), narrow under it (360 x 700): its box keeps clear of his face */
.scene.inside__scene { position: absolute; z-index: 1; left: 30px; top: 30px; bottom: 30px; width: min(620px, 52%); }
@media (min-width: 900px) and (max-width: 1279px) { .inside__media { height: 780px; } }
@media (max-width: 899px) {
  /* the photo on top with his face; the plan stands on its lower part (more than half of it on the photo) and runs on
     below it */
  .inside__media { height: 930px; overflow: visible; border: 0; background: none; }
  .inside__photo { inset: 0 0 auto; width: 100%; height: 600px; object-position: 60% 50%; border: var(--frame) solid var(--c-brand); border-radius: var(--radius-l); }
  .inside__stop { top: auto; bottom: 14px; right: auto; left: calc(12px + min(100% - 24px, 360px) - 58px); } /* on the plan's own lower corner, in one view with it */
  .scene.inside__scene { top: 230px; bottom: auto; left: 12px; right: auto; width: min(calc(100% - 24px), 360px); height: 700px; }
}

/* ---------- team: Shayne's card on the left; on the right an owner at work, her dashboard's "Talk with a human"
   tapped and Shayne's team answering (a kit sequence) ---------- */
/* the lane: the same three columns as the after steps, so the line runs down the empty middle one, clear of both */
.team__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) 96px minmax(0, 1fr); align-items: center; }
.team__media { grid-column: 3; }
.team__founder { margin-top: 1.6rem; }
.team__media { position: relative; overflow: hidden; overflow: clip; aspect-ratio: 4 / 3; background: var(--c-paper-alt); }
.team__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 35%; }
.team__stop { position: absolute; top: 14px; right: 14px; z-index: 2; }
.human { position: absolute; z-index: 1; right: 14px; bottom: 14px; display: grid; justify-items: end; gap: 8px; width: min(270px, 58%); margin: 0; }
.human > * { margin: 0; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.human__bar { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.55rem 0.75rem; border-radius: 14px; background: color-mix(in srgb, var(--c-paper) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font: 700 0.875rem/1.2 var(--font-ui); color: var(--c-ink); box-shadow: var(--shadow-s); }
.human__bar img { width: 22px; height: 22px; padding: 2px; border-radius: 6px; background: var(--c-paper); }
.human__tap { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.95rem; border-radius: var(--radius-btn); background: var(--c-brand); color: var(--c-on-brand); font: 700 0.9375rem/1 var(--font-ui); box-shadow: 0 0 0 3px var(--c-accent); }
.human__reply { display: grid; gap: 0.15rem; width: 100%; padding: 0.7rem 0.9rem; border-radius: 16px 16px 6px 16px; background: var(--c-paper); box-shadow: var(--shadow-m); color: var(--c-ink); font-size: 0.9375rem; line-height: 1.35; }
.human__reply b { font: 700 0.8125rem/1.2 var(--font-ui); color: var(--c-brand-text); }
@media (max-width: 899px) { .team__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .team__media { grid-column: auto; aspect-ratio: 4 / 5; } } /* taller, so the dashboard's taps stay under her face */

/* ---------- faq: the question list beside its heading, the lane in the gap between them ---------- */
.hiw-faq__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) 96px minmax(0, 1fr); align-items: start; }
.hiw-faq__side { padding-right: 1.5rem; }
.hiw-faq__side .lede { margin-top: var(--space-3); }
.hiw-faq__list { grid-column: 3; display: grid; gap: 0.75rem; }
@media (max-width: 899px) { .hiw-faq__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .hiw-faq__side { padding-right: 0; } .hiw-faq__list { grid-column: auto; } }

/* ---------- close ---------- */
.hiw-close .film__clip { object-position: 60% 40%; }
