/* Who we help: places and sizes the parts (plan.md, "Who we help"). The components are in design\components.css. */

/* the stickers land by the kit's sequence, faded by --kit-in alone */
.who-stick { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; }
.who-stick .sticker__icon { width: 30px; height: 30px; }
.who-stick .sticker__icon svg { width: 16px; height: 16px; }
.who-stick[data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }

/* ---------- hero: the words left; three tall D windows on the navy field, right ---------- */
.who-hero { --ground-d-x: -4%; --ground-d-y: -30%; --ground-o-x: 22%; --ground-o-y: -30%; padding-block: clamp(2.5rem, 4vw, 3.5rem) var(--section-y); }
.who-hero__in { display: grid; grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr); column-gap: var(--space-5); align-items: center; }
.who-hero h1 { font-size: var(--fs-h1); color: var(--c-paper); }
.who-hero__lede { max-width: 30rem; margin: var(--space-3) 0 var(--space-4); font-size: var(--fs-body); color: color-mix(in srgb, var(--c-paper) 90%, transparent); }
.who-hero .cta-note { justify-content: flex-start; color: color-mix(in srgb, var(--c-paper) 90%, transparent); }
.who-hero__windows { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; align-items: start; height: 620px; }
.who-win { position: relative; height: 540px; margin: 0; }
.who-win--lawn { margin-top: 80px; }
.who-win--fence { margin-top: 28px; }
.who-win__pic { --d-x: 78%; position: absolute; inset: 0; }
.who-win__pic > img, .who-win__pic > picture > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.who-win--pool img { object-position: 25% 50%; }
.who-win--lawn img { object-position: 47% 0; }
.who-win--fence img { object-position: 53% 50%; }
.who-win .who-stick { position: absolute; z-index: 2; left: 8px; right: -6px; bottom: 26px; }
.who-hero__stop { top: 8px; right: auto; left: 8px; }

/* ---------- all: the signature part: the whole band is the scene ---------- */
.who-all { --ground-d-x: -6%; --ground-d-y: -18%; --ground-o-x: -6%; --ground-o-y: -24%; padding-block: 0; }
.who-all__scene { height: 600px; }
.who-all__scene > [data-scene] { display: block; width: 100%; height: 100%; }
.who-all__stop { top: 24px; right: 24px; }

/* ---------- who: two staggered columns of D's, then the wide "and many more" ---------- */
.who-cards { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-5); align-items: start; }
.who-card { display: block; color: var(--c-ink); text-decoration: none; }
.who-card--low { margin-top: 72px; }
.who-card__pic { --stage-h: 400px; margin-bottom: var(--space-3); }
.who-card h3 { margin: 0; font-size: var(--fs-h3); }
.who-card p { margin: var(--space-1) 0 0; font-size: var(--fs-body); color: var(--c-ink-soft); }
.who-card img { transition: transform var(--dur-med) var(--ease-out); }
.who-card:hover img { transform: scale(1.02); }
.who-card:hover h3 { color: var(--c-brand-text); }
.who-card:focus-visible { outline: 3px solid var(--c-navy); outline-offset: 6px; border-radius: var(--radius-l); }
.who-card .who-stick { position: absolute; z-index: 2; max-width: 280px; }
.who-cards__stop { top: 14px; right: auto; left: 14px; z-index: 3; }
/* each card's sticker on its clear side, each photo cropped around its work */
.who-card--pool img { object-position: 60% 50%; }
.who-card--pool .who-stick { left: 16px; bottom: 20px; }
.who-card--land img { object-position: 40% 50%; }
.who-card--land .who-stick { right: 16px; bottom: 24px; }
.who-card--pavers img { object-position: 50% 40%; }
.who-card--pavers .who-stick { left: 16px; bottom: 20px; }
.who-card--pergola img { object-position: 50% 30%; }
.who-card--pergola .who-stick { right: 16px; top: 40%; }
.who-card--fence img { object-position: 50% 30%; }
.who-card--fence .who-stick { left: 16px; bottom: 16px; }
.who-card--sprinkler img { object-position: 50% 20%; }
.who-card--sprinkler .who-stick { left: 72px; bottom: 16px; }

.who-more { --d-x: 170px; display: block; height: 340px; margin-top: var(--space-5); color: var(--c-paper); text-decoration: none; }
.who-more > img, .who-more > picture > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.who-more__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--c-shade) 0%, var(--c-shade) 26%, transparent 62%); }
.who-more__words { position: absolute; z-index: 2; left: var(--space-5); top: 50%; display: grid; gap: var(--space-2); justify-items: start; max-width: 460px; transform: translateY(-50%); }
.who-more__words b { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-display); letter-spacing: var(--ls-display); line-height: 1.1; }
.who-more__words > span:not(.link-arrow) { font-size: var(--fs-body); }
.who-more .link-arrow { color: var(--c-sky-soft); }
.who-more:focus-visible { outline: 3px solid var(--c-navy); outline-offset: 4px; }

/* ---------- buyers: the three cards fill the part, on the navy ground ---------- */
.who-buyers { --ground-d-x: 58%; --ground-d-y: -30%; --ground-o-x: -8%; --ground-o-y: -36%; }
.who-buyers__scene { position: relative; }
.who-buyers__scene > [data-scene] { width: 100%; }
.who-buyers__scene [data-scene="three-buyers"] .tb-foot { color: var(--c-paper); }
.who-buyers__scene [data-scene="three-buyers"] .tb-foot em { color: var(--c-sky-soft); }
.who-buyers__stop { top: -56px; right: 0; }

/* ---------- plan: the words above; the handshake on the D's left, the stamped sheet on its right ---------- */
.who-plan__media { --stage-h: 560px; }
.who-plan__window { position: absolute; inset: 0; }
/* the clip is drawn larger, held by its right edge, so the hands meet on the left of the frame and the sheet stands clear of them */
.who-plan__window > .who-plan__clip { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-position: 50% 74%; transform: scale(1.5); transform-origin: 100% 65%; }
.who-plan__stop { top: 16px; right: auto; left: 16px; }
.who-plan__scene { top: 50%; right: 24px; width: 500px; height: 480px; transform: translateY(-50%); }
.who-plan__scene > [data-scene] { display: block; width: 100%; height: 100%; }

/* ---------- anyway: the words centered; the roofers in a wide D, the phone on the clear sky, bleeding out of its foot ---------- */
.who-anyway { padding-bottom: calc(var(--section-y) + 36px); }
.who-anyway__media { --stage-h: 540px; }
.who-anyway__photo { object-position: 50% 16%; }
.who-anyway__stop { top: 16px; right: auto; left: 16px; }
.who-anyway__phone { position: absolute; z-index: 2; right: clamp(56px, 11%, 170px); bottom: -36px; display: block; width: 296px; height: 480px; }
.who-anyway__screen { display: flex; flex-direction: column; width: 276px; height: 460px; overflow: hidden; border-radius: 30px; background: var(--c-brand-light); }
.who-anyway__bar { display: flex; flex: none; align-items: center; gap: 8px; margin: 0 0 14px; padding: 18px 16px 12px; background: var(--c-paper); font-family: var(--font-display); font-size: 1rem; }
.who-anyway__bar i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-navy); color: var(--c-sky-soft); }
.who-anyway__bar svg { width: 18px; height: 18px; fill: currentColor; }
/* the greeting is the chat's first bubble, drawn as the scene draws its own */
.who-anyway__hello { display: flex; flex: none; align-items: flex-end; gap: 8px; max-width: 90%; margin: 0 12px 10px; font: 400 14px/1.35 var(--font-ui); }
.who-anyway__hello i { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--c-paper); box-shadow: var(--shadow-s); }
.who-anyway__hello span { padding: 10px 13px; border-radius: 16px 16px 16px 6px; background: var(--c-paper); box-shadow: var(--shadow-s); color: var(--c-ink); }
.who-anyway__screen > [data-scene="goal"] { --gl-stage: transparent; --gl-edge: transparent; flex: none; width: 100%; padding: 0 12px 12px; border-radius: 0; }

/* ---------- close: the words and the picker on the shade, the number and the plan landing on the clear right ---------- */
.who-close { min-height: 720px; }
.who-close > .who-close__clip { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-position: 50% 60%; }
.who-close .close__content > h2 { max-width: none; font-size: clamp(2.375rem, 1rem + 3vw, 3.75rem); }
.who-close h2 > span { display: block; }
.who-close .close__picker { width: 480px; }
.who-close__sticks { position: absolute; z-index: 1; right: clamp(24px, 6vw, 96px); bottom: 40px; display: grid; gap: 0.75rem; width: 300px; }

/* ---------- under 1100 px ---------- */
@media (max-width: 1099px) {
  .who-hero__in { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); column-gap: var(--space-4); }
  .who-hero__windows { height: 560px; }
  .who-win { height: 480px; }
  .who-card__pic { --stage-h: 340px; }
  .who-plan__scene { width: 420px; right: 32px; }
}

/* ---------- under 900 px: one column ---------- */
@media (max-width: 899px) {
  .who-hero__in { grid-template-columns: 100%; row-gap: var(--space-5); }
  .who-hero__windows { grid-template-columns: 100%; row-gap: 14px; height: auto; }
  .who-win, .who-win--lawn, .who-win--fence { height: 280px; margin-top: 0; }
  .who-win__pic { --d-x: 140px; }
  .who-win--pool img { object-position: 30% 60%; }
  .who-win--lawn img { object-position: 50% 12%; }
  .who-win--fence img { object-position: 50% 50%; }
  .who-win .who-stick { left: 8px; right: auto; width: min(260px, 100% - 16px); bottom: 12px; }
  .who-hero__stop { z-index: 3; }
  .who-cards { grid-template-columns: 100%; }
  .who-card--low { margin-top: 0; }
  .who-card--pergola .who-stick { top: auto; right: 12px; bottom: 12px; }
  .who-buyers__stop { top: -48px; }
  .who-plan__media { --stage-h: 700px; }
  .who-plan__window > .who-plan__clip { object-position: 54% 100%; transform: none; }
  .who-plan__scene { top: 16px; left: 8px; right: 8px; width: auto; height: 470px; transform: none; }
  .who-plan__stop { top: auto; bottom: 16px; }
  .who-anyway__media { --stage-h: 720px; }
  .who-anyway__photo { object-position: 30% 0; }
  .who-anyway__phone { right: 50%; bottom: -40px; transform: translateX(50%); }
  .who-anyway__stop { top: 12px; left: auto; right: 12px; z-index: 3; }
  .who-more { --d-x: 120px; height: 340px; }
  .who-more__words { left: var(--space-3); right: 64px; }
  .who-more__shade { background: linear-gradient(90deg, var(--c-shade) 0%, var(--c-shade) 50%, transparent 100%); }
  .who-close { display: flex; flex-direction: column; min-height: 0; background: var(--c-navy); }
  .who-close .close__content { order: 1; padding-block: var(--section-y) var(--space-5); }
  .who-close .close__shade { display: none; }
  .who-close .close__stop { order: 2; position: relative; top: auto; right: auto; align-self: flex-end; margin: 0 16px -56px 0; z-index: 2; }
  .who-close > .who-close__clip { order: 3; position: relative; inset: auto; width: calc(100% + 2px); height: 340px; margin-inline: -1px; z-index: 0; object-position: 58% 50%; }
  .who-close__sticks { order: 4; position: relative; right: auto; bottom: auto; width: min(100% - 2 * var(--gutter), 340px); margin: -108px auto var(--space-3); }
}

/* ---------- the buyers' one column (the scene's own width under 760 px): one height through its loop, the line at its foot, so nothing around it moves as the cards open and fold ---------- */
@media (max-width: 815px) {
  .who-buyers__scene { height: 790px; overflow-anchor: none; }
  .who-buyers__scene > [data-scene] { height: 100%; }
  .who-buyers__scene [data-scene="three-buyers"] .tb { align-self: stretch; height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
  .who-buyers__scene [data-scene="three-buyers"] .tb-cards { align-content: start; }
}

@media (max-width: 339px) {
  .who-buyers__scene { height: 850px; }
}

@media (max-width: 599px) {
  .who-all__scene { height: 540px; }
  .who-card__pic { --stage-h: 300px; --d-x: 130px; }
  .who-card__pic.dframe { border-radius: var(--radius-l) 36% 36% var(--radius-l) / var(--radius-l) 50% 50% var(--radius-l); }
  .who-card__pic.dframe--left { border-radius: 36% var(--radius-l) var(--radius-l) 36% / 50% var(--radius-l) var(--radius-l) 50%; }
  .who-plan__media.dframe { --d-x: 40%; }
}
