@import url("../arsenal/thread.css");
/* How it works (Part 2): plan.md "How it works (Part 2)", architecture 3 The thread. One lane at the left of every
   part's column carries the line: the step numbers and the hand-over node stand in it, every word stands right of it.
   The parts take no z-index; the full-bleed footage and photos (positioned) hide the line where it runs behind them. */

.hw-thread { --lane: 76px; --thread-ink: var(--c-brand); --thread-bg: var(--c-paper); }
.hw-lane { position: relative; padding-left: var(--lane); }
.hw-head { max-width: 760px; }
@media (max-width: 899px) { .hw-thread { --lane: 54px; } }

/* the numbers in the lane: outlined until the line plugs in, then filled, with one ring as it arrives */
.hw-num { position: absolute; left: calc(-1 * var(--lane)); top: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c-brand) 38%, var(--c-line)); background: var(--c-paper); color: var(--c-brand); font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; transition: background .35s, border-color .35s, color .35s; }
.hw-num[data-lit] { border-color: var(--c-brand); background: var(--c-brand); color: var(--c-on-brand); }
.hw-num::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c-brand); pointer-events: none; opacity: calc(min(1, var(--lit, 0) * 4) * (1 - var(--lit-after, 1)) * .8); transform: scale(calc(1 + var(--lit-after, 1) * .9)); }
.hw-step { position: relative; display: grid; gap: 4px; min-height: 48px; align-content: center; }
.hw-step__title { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); letter-spacing: -0.015em; }
.hw-step__line { color: var(--c-ink-soft); }
@media (max-width: 899px) {
  .hw-num { width: 40px; height: 40px; font-size: 1rem; }
  .hw-step { min-height: 40px; }
}

/* a photo the line passes: from 62% color to full as the line reaches it, settling from a slight zoom */
.hw-frame { position: relative; margin: 0; overflow: hidden; border-radius: 28px; background: var(--c-ink); box-shadow: var(--shadow-l); isolation: isolate; }
.hw-frame__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; filter: saturate(calc(.62 + .38 * var(--lit, 1))); transform: scale(calc(1.04 - .04 * var(--lit, 1))); }
@media (max-width: 899px) { .hw-frame { border-radius: 20px; } }

/* the kit's rotation of the header's two clips */
[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"]: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 { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }

/* ---------- hero: the planner filling, full-bleed; the words in a white card at its lower left; the notifications at its right ---------- */
.hw-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(660px, calc(100svh - 76px), 820px); background: var(--c-ink); }
.hw-hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hw-hero__video { object-position: 40% 50%; }
.hw-hero__in { position: relative; width: 100%; padding-top: 56px; padding-bottom: 56px; }
.hw-hero__card { position: relative; display: grid; justify-items: start; gap: 16px; max-width: 590px; padding: clamp(28px, 3vw, 44px); border-radius: 28px; background: var(--c-paper); box-shadow: var(--shadow-l); }
.hw-hero__title { font-size: clamp(2.3rem, 1.3rem + 2.5vw, 3.5rem); line-height: 1.03; letter-spacing: -0.035em; }
.hw-hero__line { font-size: 1.1875rem; color: var(--c-ink-soft); }
.hw-hero__acts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin-top: 6px; }
/* 480 px or more, so all four notifications show (under 480 the scene keeps two) */
.hw-hero__wyw { position: absolute; top: 56px; right: 0; width: 500px; }
.scene.hw-hero__scene { width: 100%; height: 480px; }
@media (max-width: 1180px) { .hw-hero__wyw { width: 480px; } }
.hw-hero__stop { top: 20px; right: 20px; }
@media (max-width: 899px) {
  .hw-hero { display: block; min-height: 0; }
  .hw-hero__video { object-position: 34% 50%; }
  .hw-hero__in { padding-top: 64px; padding-bottom: 16px; }
  .hw-hero__wyw { position: relative; top: auto; right: auto; width: 100%; margin-bottom: 30px; }
  .scene.hw-hero__scene { height: 230px; }
  .hw-hero__card { padding: 24px; border-radius: 22px; }
  .hw-hero__acts, .hw-hero__acts .cta, .hw-hero__acts .btn { width: 100%; }
  .hw-hero__stop { top: 14px; right: 14px; width: 36px; height: 36px; }
}

/* ---------- start: steps 1 and 2 in glass over the landscaper's photo ---------- */
.hw-start { padding-top: var(--section-y); background: var(--c-paper); }
.hw-start .hw-head { margin-bottom: 44px; }
.hw-start__face { display: none; }
.hw-start__band { position: relative; isolation: isolate; overflow: hidden; background: var(--c-ink); }
.hw-start__band > .hw-start__photo { position: absolute; inset: -1px; z-index: -1; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 40%; }
.hw-start__band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 26%, transparent) 0%, transparent 48%); }
.hw-start__in { display: grid; gap: 40px; padding-top: 72px; padding-bottom: 72px; }
.hw-start__step { display: grid; gap: 14px; width: min(440px, 100%); }
.hw-start__step .hw-step { padding: 12px 18px; border-radius: 16px; background: color-mix(in srgb, var(--c-paper) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-m); }
.hw-start__step .hw-num { top: 50%; margin-top: -24px; }
.hw-start__card { position: relative; }
.scene.hw-start__scene { width: 100%; }
.hw-start__step:first-of-type .hw-start__card { min-height: 300px; }
.hw-start__stop { top: 20px; right: 20px; }
@media (max-width: 899px) {
  .hw-start .hw-head { margin-bottom: 28px; }
  /* on a phone the owner shows in her own band; the steps stand on the same photo's truck and plants, clear of her */
  .hw-start__face { display: block; position: relative; height: 260px; overflow: hidden; }
  .hw-start__face .hw-start__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 72% 30%; }
  .hw-start__band > .hw-start__photo { object-position: 8% 50%; }
  .hw-start__band::after { background: color-mix(in srgb, var(--c-ink) 22%, transparent); }
  .hw-start__in { gap: 28px; padding-top: 28px; padding-bottom: 32px; }
  .hw-start__step .hw-num { margin-top: -20px; }
  .hw-start__step:first-of-type .hw-start__card { min-height: 280px; }
  .hw-start__stop { top: 12px; right: 12px; width: 36px; height: 36px; }
}

/* ---------- plan: step 3, the dentist's photo and her plan's three cards over its right edge ---------- */
.hw-plan { padding: var(--section-y) 0; background: var(--c-paper-alt); }
.hw-plan .hw-head { margin-bottom: 36px; }
.hw-plan__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; margin-top: 28px; }
.hw-plan__frame { grid-column: 1 / 8; grid-row: 1; height: 580px; }
.hw-plan__photo { object-position: 45% 50%; }
.hw-plan__cards { grid-column: 6 / 13; grid-row: 1; position: relative; z-index: 2; }
.scene.hw-plan__scene { width: 100%; }
.hw-plan__stop { top: -48px; right: 0; }
@media (max-width: 899px) {
  .hw-plan__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hw-plan__frame { grid-column: 1; height: clamp(260px, 64vw, 420px); }
  .hw-plan__cards { grid-column: 1; grid-row: 2; }
  .hw-plan__stop { top: -44px; width: 36px; height: 36px; }
}

/* ---------- the hand-over: where the owner's part ends and ours begins ---------- */
.hw-hand { padding: 56px 0; background: var(--c-paper); }
.hw-hand__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px; min-height: 48px; }
.hw-hand__node { position: absolute; left: 4px; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 2px solid var(--c-brand); background: var(--c-paper); color: var(--c-brand); transition: background .35s, color .35s; }
.hw-hand__node svg { fill: currentColor; }
.hw-hand__node[data-lit] { background: var(--c-brand); color: var(--c-on-brand); }
.hw-hand__node::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c-brand); pointer-events: none; opacity: calc(min(1, var(--lit, 0) * 4) * (1 - var(--lit-after, 1)) * .8); transform: scale(calc(1 + var(--lit-after, 1) * .9)); }
.hw-hand__in p { font-family: var(--font-display); font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); font-weight: 700; color: var(--c-ink); }
.hw-hand__in b { color: var(--c-brand-dark); }
.hw-hand__us { padding-left: 36px; border-left: 2px solid var(--c-line); }
@media (max-width: 899px) {
  .hw-hand__node { left: 0; }
  .hw-hand__in { display: grid; gap: 6px; }
  .hw-hand__us { padding-left: 0; border-left: 0; }
}

/* ---------- ours: steps 4 to 6, each over its business's photo, sides alternating ---------- */
.hw-ours { padding: var(--section-y) 0; background: var(--c-paper); }
.hw-ours__row { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 56px); align-items: center; margin-top: 64px; }
.hw-ours__row .hw-step { position: static; }
.hw-ours__row--flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.hw-ours__row--flip .hw-step { order: 2; }
.hw-ours__frame { height: 500px; }
.hw-ours__stage { position: absolute; z-index: 2; left: 24px; bottom: 24px; width: min(400px, calc(100% - 48px)); }
.scene.hw-ours__scene { width: 100%; height: 320px; }
.scene.hw-ours__scene.hw-ours__scene--tune { height: 340px; }
/* the new-customers board rests flat here: tilted in depth, as the scene leaves it, its 13 px rows show at 12 */
.scene.hw-ours__scene .ld-board { transform: none !important; }
.hw-ours__stop { top: -48px; left: 0; }
@media (max-width: 899px) {
  .hw-ours__row, .hw-ours__row--flip { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 48px; }
  .hw-ours__row--flip .hw-step { order: 0; }
  /* on a phone the photos take the lane's width too (the line runs behind them), so the cards keep their words whole */
  /* each photo's people stand on its right: the crop keeps them in the frame's upper part, the card under their faces */
  .hw-ours__frame { height: 760px; margin-left: calc(-1 * var(--lane)); }
  .hw-ours__photo--launch { object-position: 75% 50%; }
  .hw-ours__photo--leads { object-position: 65% 50%; }
  .hw-ours__photo--tune { object-position: 84% 50%; }
  .hw-ours__row:last-child .hw-ours__frame { height: 880px; }
  .hw-ours__stage { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .scene.hw-ours__scene.hw-ours__scene--tune { height: 400px; }
  .hw-ours__stop { top: -46px; width: 36px; height: 36px; }
}

/* ---------- team: the owner asks for a change, the team makes it ---------- */
.hw-team { padding: var(--section-y) 0; background: var(--c-paper-alt); }
.hw-team .hw-head { margin-bottom: 36px; }
.hw-team__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
.hw-team__frame { grid-column: 1 / 10; grid-row: 1; height: 540px; }
.hw-team__photo { object-position: 46% 40%; }
.hw-team__chat { grid-column: 8 / 13; grid-row: 1; position: relative; z-index: 2; display: grid; align-content: start; gap: 12px; min-height: 380px; padding: 18px; border-radius: 24px; background: color-mix(in srgb, var(--c-paper) 92%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow-l); }
.hw-team__head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--c-line); }
.hw-team__head img { width: 30px; height: 30px; padding: 3px; border-radius: 9px; background: var(--c-paper-alt); }
.hw-team__head p { display: grid; line-height: 1.2; }
.hw-team__head b { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 800; }
.hw-team__head span { font-size: 0.8125rem; color: var(--c-ink-soft); }
.hw-team__log { display: grid; gap: 10px; }
.hw-team__log [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.hw-team__tap { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; background: var(--c-brand); color: var(--c-on-brand); font-family: var(--font-ui); font-size: 0.875rem; font-weight: 700; }
.hw-team__tap span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--c-on-brand) 22%, transparent); }
.hw-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 0.9375rem; line-height: 1.4; }
.hw-msg--us { justify-self: start; background: var(--c-paper-alt); color: var(--c-ink); border-bottom-left-radius: 6px; }
.hw-msg--me { justify-self: end; background: var(--c-brand); color: var(--c-on-brand); border-bottom-right-radius: 6px; }
.hw-team__done { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--c-brand-light); color: var(--c-brand-dark); font-family: var(--font-ui); font-size: 0.8125rem; font-weight: 700; }
.hw-team__done svg { width: 16px; height: 16px; }
.hw-team__stop { top: -48px; right: 0; }
@media (max-width: 899px) {
  .hw-team__grid { grid-template-columns: minmax(0, 1fr); gap: 60px; }
  .hw-team__frame { grid-column: 1; height: clamp(260px, 64vw, 420px); }
  .hw-team__chat { grid-column: 1; grid-row: 2; min-height: 360px; }
  .hw-team__stop { top: -46px; width: 36px; height: 36px; }
}

/* ---------- faq: on type, right of the lane ---------- */
.hw-faq .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
@media (max-width: 899px) { .hw-faq .faq__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- close: the deck builder's last boards, the next deck booked, the line ending in the button ---------- */
.hw-close { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(640px, 50vw, 740px); background: var(--c-ink); color: var(--c-on-ink); }
.hw-close__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hw-close__video { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 60% 40%; }
.hw-close__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--c-ink) 94%, transparent) 0%, color-mix(in srgb, var(--c-ink) 72%, transparent) 30%, transparent 62%); }
.bookcard.hw-close__card { position: absolute; z-index: 2; top: 12%; left: max(var(--gutter), calc(50% - var(--max-w) / 2)); }
.hw-close__in { display: grid; justify-items: center; gap: 16px; padding-top: 72px; padding-bottom: clamp(56px, 6vw, 88px); text-align: center; }
.hw-close__in h2 { max-width: 20ch; font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; }
.hw-close__in > p { max-width: 46ch; font-size: 1.1875rem; color: color-mix(in srgb, var(--c-on-ink) 86%, transparent); }
.hw-close__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px 16px; margin-top: 10px; }
.hw-close__stop { top: 20px; right: 20px; }
@media (max-width: 899px) {
  .hw-close { display: block; min-height: 0; }
  .hw-close__media { position: relative; inset: auto; height: clamp(280px, 70vw, 460px); z-index: 0; }
  .hw-close__media::after { background: linear-gradient(180deg, transparent 60%, var(--c-ink) 100%); }
  .bookcard.hw-close__card { top: calc(clamp(280px, 70vw, 460px) - 116px); left: 12px; }
  .hw-close__in { padding-top: 12px; }
  .hw-close__acts { width: 100%; }
  .hw-close__acts .cta, .hw-close__acts .btn { width: 100%; }
  .hw-close__stop { top: 12px; right: 12px; width: 36px; height: 36px; }
}
