@import url("../arsenal/thread.css");
/* site\assets\css\pages\how-it-works.css: How it works (src\pages\how-it-works.mjs). It places and sizes its parts with
   the tokens of system.css; the components are design\components.css's, the thread the arsenal's (imported above).
   The thread's line runs down a lane at the left (--lane) through the six numbers and a node in each later part: every
   word stands right of the lane, every part is static (so the line draws over its ground), and what the line passes
   behind (the header's tile, the photos, Dana's photo and card) is opaque. */

.hw { --lane: 72px; --thread-ink: var(--c-accent); --thread-w: 3px; --thread-tail: 80px; --hw-bg: var(--c-paper); }
.hw > .band:not(.closer) { position: static; }
.hws { --hw-bg: var(--c-paper-alt); }
.hwi { --hw-bg: var(--c-brand); }

/* the numbers: a ring in the page's ground around them; lit, they fill with the brand and give one gold ring */
.hw-num { box-sizing: border-box; display: grid; place-items: center; width: 52px; height: 52px; justify-self: center; border-radius: 50%;
  --l: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0)));
  background: color-mix(in srgb, var(--c-brand) calc(var(--l) * 100%), var(--c-paper));
  color: color-mix(in srgb, var(--c-on-brand) calc(var(--l) * 100%), var(--c-brand));
  font: 800 1.25rem/1 var(--font-display); letter-spacing: -0.02em;
  box-shadow: 0 0 0 6px var(--hw-bg), inset 0 0 0 1.5px color-mix(in srgb, var(--c-brand) calc((1 - var(--l)) * 30%), transparent), 0 10px 22px -10px color-mix(in srgb, var(--c-brand) calc(var(--l) * 70%), transparent); }
.hw-num::after, .hw-node::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 calc(var(--lit-after, 0) * 16px) color-mix(in srgb, var(--c-accent) calc((1 - var(--lit-after, 0)) * 70%), transparent); }
.hw-node { display: grid; place-items: center; width: 26px; height: 26px; justify-self: center; align-self: start; margin-top: 10px; border-radius: 50%;
  --l: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0)));
  background: color-mix(in srgb, var(--c-accent) calc(var(--l) * 100%), var(--hw-bg)); color: var(--c-brand);
  box-shadow: 0 0 0 5px var(--hw-bg), inset 0 0 0 1.5px color-mix(in srgb, var(--c-accent) 70%, transparent); }
.hw-node svg { width: 14px; height: 14px; fill: currentColor; opacity: calc(0.35 + 0.65 * var(--l)); }

/* ---------- hero: the words centered, the line starting under the button; the planner clip framed, your part over it ---------- */
.hwh { padding-block: clamp(40px, 5vw, 72px) clamp(72px, 8vw, 112px); }
.hwh__in { display: grid; justify-items: center; text-align: center; }
.hwh__title { max-width: 16ch; font-size: var(--fs-h1); }
.hwh__line { max-width: 560px; margin: 20px 0 30px; color: var(--c-ink-soft); font-size: var(--fs-lead); line-height: 1.5; }
.hwh__go { display: grid; justify-items: center; gap: 12px; }
.hwh__go .note { margin: 0; }
.hwh__go .btn { box-shadow: 0 0 0 calc(var(--lit-after, 0) * 14px) color-mix(in srgb, var(--c-accent) calc((1 - var(--lit-after, 0)) * 60%), transparent), inset 0 1px 0 color-mix(in srgb, var(--c-paper) 45%, transparent), 0 10px 22px -12px color-mix(in srgb, var(--c-accent-deep) 90%, transparent); }
.hwh__stage { position: relative; margin-top: clamp(36px, 4vw, 52px); }
/* the clip's frame: the planner and the hand on its left two thirds, your part over its right edge, clear of the hand */
.hwh__tile { position: relative; width: 66%; height: clamp(420px, 38vw, 540px); overflow: hidden; border-radius: var(--radius-l); background: var(--c-brand-dark); box-shadow: var(--shadow-m); }
.hwh__tile::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-accent) 14%, transparent), color-mix(in srgb, var(--c-accent) 6%, transparent) 60%, color-mix(in srgb, var(--c-brand-dark) 34%, transparent)); mix-blend-mode: soft-light; }
.hwh__stop { top: 16px; left: calc(var(--gutter) + 16px); }
.scene.hwh__part { position: absolute; z-index: 2; top: 0; bottom: 0; right: var(--gutter); width: min(680px, 56%); }
/* the kit's header that changes its picture (kit.md), its two slides the same calm clip of the planner */
[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); }
.hwh__slide video, .hwh__slide .kit-first { object-position: 40% 50%; }

/* ---------- the steps: the number in the lane, the words beside it, the picture on the other side ---------- */
.hw-head { max-width: 680px; margin: 0 0 clamp(40px, 5vw, 64px) var(--lane); }
.hw-step { display: grid; grid-template-columns: var(--lane) minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: clamp(28px, 4vw, 64px); align-items: center; }
.hw-step--flip { grid-template-columns: var(--lane) minmax(0, 1.2fr) minmax(0, 0.8fr); }
.hw-step + .hw-step { margin-top: clamp(56px, 6vw, 96px); }
.hw-num { grid-column: 1; grid-row: 1; align-self: start; margin-top: 4px; }
.hw-text { grid-column: 2; grid-row: 1; align-self: start; max-width: 440px; }
.hw-pic { grid-column: 3; grid-row: 1; position: relative; justify-self: center; width: min(100%, var(--pic-w, 560px)); }
.hw-step--flip .hw-text { grid-column: 3; }
.hw-step--flip .hw-pic { grid-column: 2; }
.hw-h3 { color: var(--c-brand); font: 800 clamp(1.5rem, 2.2vw, 1.875rem)/1.12 var(--font-display); letter-spacing: -0.025em; }
.hw-who { margin-top: 10px; color: var(--c-accent-text); font: 700 0.9375rem/1.3 var(--font-ui); }
.hw-line { margin-top: 10px; color: var(--c-ink-soft); font-size: 1.0625rem; line-height: 1.5; }
.hw-pic__stop { top: -48px; right: 0; }
.hw-pic:has(.hw-scene--goal) { --pic-w: 420px; }
.hw-pic:has(.hw-scene--scan) { --pic-w: 520px; }
.hw-pic:has(.hw-scene--bars) { --pic-w: 580px; }
/* the goal's and the scan's panels are as high as their content at each moment (their notes): their box keeps the room
   their whole picture takes, so the steps under them never move */
.scene.hw-scene { width: 100%; }
.hw-pic:has(.hw-scene--goal) { min-height: 290px; }
.hw-pic:has(.hw-scene--scan) { min-height: 270px; }
.scene.hw-scene--bars { height: 400px; }

/* ours: a framed photo per step, its step's card over it clear of the faces */
.hw-step--photo .hw-pic { --pic-w: 720px; }
.hw-photo { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); box-shadow: var(--shadow-m); }
.hw-photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hw-photo__stop { top: 16px; left: 16px; }
.scene.hw-over { position: absolute; z-index: 2; }
.hw-step--launch .hw-photo__img { object-position: 30% 50%; }
/* the tune photo drawn 1.25 times from its left edge: the lawyer's face (from 42% of the photo) moves past 52%, clear of
   its card (which ends before 47%) at every width */
.hw-step--tune .hw-photo__img { transform: scale(1.25); transform-origin: 0 50%; }
.scene.hw-over--launch { top: 16px; right: 16px; width: min(300px, 50%); height: auto; }
/* the launch card's note sits above its lines, never over them: the card is as high as both at every width */
.scene.hw-over--launch .ln-note { position: relative; inset: auto; order: -1; margin-bottom: 8px; }
.scene.hw-over--launch .ln-list { margin-top: 0; }
.scene.hw-over--leads { right: 16px; bottom: 16px; width: min(400px, 56%); height: 270px; }
.scene.hw-over--tune { left: 16px; bottom: 16px; width: min(320px, 44%); height: 350px; }

/* ---------- inside: the plan building itself on the navy ground ---------- */
.hwi__in { display: grid; grid-template-columns: var(--lane) minmax(0, 0.75fr) minmax(0, 1.25fr); column-gap: clamp(28px, 4vw, 64px); align-items: center; }
.hwi__words { grid-column: 2; }
.hwi__words h2 { font-size: var(--fs-h2); }
.hwi__words .head__line { margin-top: var(--space-3, 16px); }
.hwi__go { display: grid; justify-items: start; gap: 12px; margin-top: 30px; }
.hwi__stage { grid-column: 3; position: relative; }
.hwi__stop { top: -48px; right: 0; }
.scene.hwi__plan { width: 100%; height: 560px; border-radius: var(--radius-l); }
.hwi__in > .hw-node, .hwt__in > .hw-node, .hwf .faq__in > .hw-node { grid-column: 1; grid-row: 1; }

/* ---------- team: Dana's own photo, her reply landing in the owner's dashboard ---------- */
.hwt__in { display: grid; grid-template-columns: var(--lane) minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(28px, 4vw, 64px); align-items: center; }
.hwt__pic { grid-column: 2; position: relative; justify-self: start; width: min(400px, 100%); padding-bottom: 140px; }
.hwt__photo { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
.hwt__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hwt__stop { top: 16px; right: 16px; }
.hwt__card { position: absolute; z-index: 2; left: 46%; bottom: 0; display: grid; gap: 10px; width: 340px; padding: 14px; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); }
.hwt__head { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); color: var(--c-brand); font: 700 0.9375rem/1.2 var(--font-display); }
.hwt__mk { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--c-brand); color: var(--c-accent); }
.hwt__stat { margin-left: auto; color: var(--c-ink-soft); font: 600 0.8125rem/1.2 var(--font-ui); }
.hwt__ask { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hwt__btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 10px; border-radius: var(--radius-pill); background: var(--c-brand); color: var(--c-on-brand); font: 700 0.875rem/1 var(--font-ui); box-shadow: 0 0 0 4px var(--c-brand-light); }
.hwt__btn svg { color: var(--c-accent); }
.hwt__ask small { color: var(--c-ink-soft); font-size: 0.8125rem; }
.hwt__reply { display: flex; align-items: flex-start; gap: 10px; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
/* Dana typing, in the reply's place until it lands, so the card never stands half empty */
.hwt__typing, .hwt__reply { grid-area: 3 / 1; }
.hwt__typing { display: flex; align-items: flex-start; gap: 10px; opacity: var(--kit-in, 1); }
.hwt__card:has(.hwt__reply[data-kit-on]) .hwt__typing { visibility: hidden; }
.hwt__typing p { display: flex; gap: 5px; margin: 0; padding: 15px 14px; border-radius: 4px 14px 14px 14px; background: var(--c-brand-light); }
.hwt__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-brand); opacity: 0.45; }
.hwt__typing i:nth-child(2) { opacity: 0.65; }
.hwt__typing i:nth-child(3) { opacity: 0.85; }
.hwt__ask { opacity: var(--kit-in, 1); }
.hwt__av { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--c-accent); }
.hwt__reply p { margin: 0; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--c-brand-light); color: var(--c-ink); font-size: 0.9375rem; line-height: 1.4; }
.hwt__reply b { display: block; margin-bottom: 2px; color: var(--c-brand); font: 700 0.8125rem/1.2 var(--font-ui); }
.hwt__words { grid-column: 3; }
.hwt__words h2 { font-size: var(--fs-h2); }
.hwt__words .head__line { margin-top: var(--space-3, 16px); }
.hwt__name { margin-top: 22px; color: var(--c-ink-soft); }
.hwt__name b { color: var(--c-ink); }
.hwt__words .more { display: inline-block; margin-top: 10px; }

/* ---------- faq: the lane kept free ---------- */
.hwf .faq__in { grid-template-columns: var(--lane) minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: clamp(28px, 5vw, 80px); }
.hwf .faq__intro { grid-column: 2; }
.hwf .faq__list { grid-column: 3; }

/* ---------- close: the pro walks up to a new client's door; the line ends in the card's button ---------- */
.hwc__photo { position: absolute; inset: -1px; z-index: 0; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 60% 30%; transform-origin: 70% 60%; animation: hwc-push 30s var(--ease-out) both; }
@keyframes hwc-push { from { transform: scale(1); } to { transform: scale(1.06); } }
.hwc:has(.closer__stop[aria-pressed="true"]) .hwc__photo { animation-play-state: paused; }
.hwc__go { display: block; }
.hwc .closer__in { align-items: start; }
/* the card near the band's top (72 px down, under the stop icon), above the pro's head at every width from 900 px */
.hwc__alerts { position: relative; z-index: 2; justify-self: end; align-self: start; margin-top: calc(72px - var(--section-y)); }
.hwc__alert { display: flex; align-items: center; gap: 11px; padding: 10px 10px 10px 10px; border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-l); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.hwc__what { min-width: 0; padding-right: 6px; }
.hwc__alert b { display: block; color: var(--c-brand); font: 700 0.975rem/1.25 var(--font-display); white-space: nowrap; }
.hwc__alert small { display: block; margin-top: 2px; color: var(--c-ink-soft); font-size: 0.8125rem; white-space: nowrap; }
.hwc__ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-accent); color: var(--c-brand); }
.hwc__src { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px 7px 8px; border-radius: var(--radius-pill); background: var(--c-brand-light); color: var(--c-brand); font: 700 0.8125rem/1 var(--font-ui); white-space: nowrap; opacity: var(--kit-in, 1); transform: scale(calc(0.86 + 0.14 * var(--kit-in, 1))); }
@media (prefers-reduced-motion: reduce) { .hwc__photo { animation: none; } }

/* ---------- narrower ---------- */
/* ours: each step's photo under its words below 1280 px, so its card gets the 260 px or more its scene needs */
@media (max-width: 1279px) {
  .hw-step--photo, .hw-step--photo.hw-step--flip { grid-template-columns: var(--lane) minmax(0, 1fr); row-gap: 24px; }
  .hw-step--photo .hw-text { grid-column: 2; grid-row: 1; }
  .hw-step--photo .hw-pic { grid-column: 2; grid-row: 2; justify-self: start; }
}
@media (max-width: 1099px) {
  .hwh__tile { width: 100%; }
  .scene.hwh__part { position: relative; top: auto; bottom: auto; right: auto; width: min(680px, 100%); height: 420px; margin: -96px auto 0; }
  .hwi__in { grid-template-columns: var(--lane) minmax(0, 1fr); row-gap: 36px; }
  .hwi__stage { grid-column: 2; }
  .hwt__in { grid-template-columns: var(--lane) minmax(0, 1fr); row-gap: 40px; }
  .hwt__words { grid-column: 2; }
}
@media (max-width: 899px) {
  .hw-step, .hw-step--flip, .hw-step--photo, .hw-step--photo.hw-step--flip { grid-template-columns: var(--lane) minmax(0, 1fr); row-gap: 24px; }
  .hw-text, .hw-step--flip .hw-text { grid-column: 2; grid-row: 1; }
  .hw-pic, .hw-step--flip .hw-pic { grid-column: 2; grid-row: 2; justify-self: start; }
  .hwf .faq__in { grid-template-columns: var(--lane) minmax(0, 1fr); }
  .hwf .faq__intro, .hwf .faq__list { grid-column: 2; }
  .hwf .faq__list { grid-row: 2; }
  .hwc__alerts { justify-self: start; margin-top: 0; }
  /* ours: each step's photo the whole width under its words, so its card keeps the width its scene needs */
  .hw-step--photo .hw-pic { grid-column: 1 / -1; width: 100%; }
}
/* the phone: the line runs beside each part with a number (the thread's narrow mode, under 700 px); the parts with no
   step use the whole width */
@media (max-width: 699px) {
  .hw { --lane: 40px; }
  .hw-num { width: 36px; height: 36px; font-size: 1rem; margin-top: 0; }
  .hw-step, .hw-step--flip, .hw-step--photo, .hw-step--photo.hw-step--flip { column-gap: 12px; }
  .hw-pic, .hw-step--flip .hw-pic, .hw-step--photo .hw-pic { grid-column: 1 / -1; width: 100%; }
  .hw-head { margin-left: 0; }
  .hw-node { display: none; }
  .hwi__in, .hwt__in, .hwf .faq__in { grid-template-columns: minmax(0, 1fr); }
  .hwi__words, .hwi__stage, .hwt__pic, .hwt__words, .hwf .faq__intro, .hwf .faq__list { grid-column: 1; }
  .hwh__tile { height: 300px; }
  .hwh__stop { left: calc(var(--gutter) + 12px); top: 12px; }
  .scene.hwh__part { height: auto; margin-top: -48px; }
  /* each step photo taller, the faces above the card, the card over its lower part */
  .hw-photo { aspect-ratio: auto; height: 560px; }
  .hw-step--launch .hw-photo__img { object-position: 12% 50%; }
  .hw-step--leads .hw-photo__img { object-position: 40% 50%; }
  .hw-step--tune .hw-photo__img { object-position: 12% 50%; transform: none; }
  .scene.hw-over--launch, .scene.hw-over--leads, .scene.hw-over--tune { top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; height: 290px; }
  .scene.hw-over--tune { height: 330px; }
  .scene.hw-over--launch { height: auto; }
  .scene.hw-scene--bars { height: 420px; }
  .scene.hwi__plan { height: 700px; }
  .hwt__pic { width: min(320px, 100%); padding-bottom: 170px; }
  .hwt__card { left: 0; width: min(340px, calc(100vw - 2 * var(--gutter))); }
}
