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

/* ---------- hero: the headline centered over one wide D ---------- */
.svc-hero { padding-block: clamp(2rem, 3.4vw, 3.25rem) var(--section-y); text-align: center; }
.svc-hero h1 { font-size: var(--fs-h1); }
.svc-hero__lede { max-width: 46rem; margin: var(--space-3) auto 0; font-size: var(--fs-body); color: var(--c-ink-soft); text-wrap: balance; }
.svc-hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1.5rem; margin-top: var(--space-4); }
.svc-hero__cta .cta-note { margin: 0; }
.svc-hero__stage { --stage-h: clamp(460px, 38vw, 540px); --d-x: calc(var(--stage-h) / 2); height: var(--stage-h); margin-top: var(--space-5); overflow: visible; text-align: left; }
.svc-hero__stage > video, .svc-hero__stage > img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.svc-hero__stop { top: 16px; left: 16px; right: auto; }
.svc-hero__scene { position: absolute; z-index: 2; top: 50%; right: clamp(32px, 4%, 64px); width: 470px; max-width: calc(100% - 24px); transform: translateY(-50%); }
.svc-hero__scene > [data-scene] { display: block; width: 100%; overflow: visible; }
.svc-hero__scene [data-scene="search-demo"] .sd-pop { bottom: -46px; } /* the request lands under the card's rows, never on their words */

/* ---------- full-bleed chapters: found, trust, seen ---------- */
.svc-ch__stop { top: 24px; right: 24px; }
.svc-ch .svc-card { max-width: none; }
.svc-scene > [data-scene] { display: block; width: 100%; height: 100%; }

/* found: words and services left, the homeowner in the middle, the map right */
.svc-found .chapter__media { object-position: 50% 62%; }
.svc-found .chapter__in { display: grid; grid-template-columns: minmax(0, 520px) minmax(100px, 1fr) minmax(0, 430px); grid-template-rows: auto auto; column-gap: var(--space-4); align-items: start; }
.svc-found .svc-card { max-width: 460px; }
.svc-found .sec-head { grid-column: 1; grid-row: 1; margin-bottom: var(--space-4); }
.svc-found .svc-card { grid-column: 1; grid-row: 2; }
.svc-found__scene { grid-column: 3; grid-row: 1 / span 2; align-self: center; height: 560px; }

/* trust: the homeowner left, her face clear; words and the shape right; the group's services along the foot */
.svc-trust .chapter__media { object-position: 30% 50%; }
.svc-trust .chapter__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-rows: auto auto auto; column-gap: var(--space-5); padding-block: var(--section-y) var(--space-5); }
.svc-trust .sec-head { grid-column: 2; grid-row: 1; margin-bottom: var(--space-3); }
.svc-trust__scene { grid-column: 2; grid-row: 2; height: 300px; }
.svc-trust__list { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.svc-trust__list .sticker { padding: 0.8rem 1rem 0.9rem; }

/* seen: words and the lanes left, the owner on his tailgate right, the group's services over his knees */
.svc-seen .chapter__media { object-position: 72% 40%; }
.svc-seen .chapter__in { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--space-4); }
.svc-seen .sec-head { grid-column: 1; grid-row: 1; margin-bottom: var(--space-4); }
.svc-seen__scene { grid-column: 1; grid-row: 2; height: 480px; }
.svc-seen .svc-card { grid-column: 2; grid-row: 2; align-self: end; justify-self: end; width: 100%; max-width: 330px; }

/* ---------- ads: words left, the sod crew in the D right, the panel over the clear lawn, breaking the straight side ---------- */
.svc-ads .pair { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
.svc-ads .pair__media { --stage-h: 620px; }
.svc-ads__clip { object-position: 84% 50%; }
.svc-ads__stop { top: 16px; left: 16px; right: auto; }
.svc-ads__scene { top: 50%; left: -56px; width: 460px; height: 470px; transform: translateY(-50%); }
.svc-ads__scene > [data-scene] { display: block; width: 100%; height: 100%; }

/* ---------- leads: the landscaper mirrored into the D's round side, the call on the hedge, words right ---------- */
.svc-leads .pair { grid-template-columns: minmax(0, 1.34fr) minmax(0, 0.66fr); }
.svc-leads .pair__media { --stage-h: 640px; }
.svc-leads .pair__media > .svc-leads__photo { object-position: 60% 30%; transform: scaleX(-1); border-radius: var(--radius-l) var(--d-x) var(--d-x) var(--radius-l) / var(--radius-l) 50% 50% var(--radius-l); } /* mirrored, so it takes the D the other way round */
.svc-leads__stop { top: 16px; left: 50%; right: auto; margin-left: -20px; }
.svc-leads__scene { top: 40px; right: -28px; width: 500px; height: 560px; }
.svc-leads__scene > [data-scene] { display: block; width: 100%; height: 100%; }
.svc-leads .pair__words .svc-card { color: var(--c-ink); }

/* ---------- day: both sides at work; the before side mirrored, so its landscaper faces the line ---------- */
#day .compare__side.before > img { transform: scaleX(-1); }
#day .compare__side.before { justify-content: flex-end; }
#day .compare__side.after { justify-content: flex-end; }

/* ---------- plan: the signature part, on the ground ---------- */
.svc-plan { --ground-d-x: -14%; --ground-d-y: -22%; --ground-o-x: 34%; --ground-o-y: -34%; }
.svc-plan__stop { top: 0; right: 0; z-index: 2; } /* in the free corner the D's round side leaves */
.svc-plan__in { display: grid; grid-template-columns: minmax(0, 0.56fr) minmax(0, 1fr); column-gap: var(--space-5); align-items: center; }
.svc-plan__words { min-width: 0; }
.svc-plan__words > .sec-head { margin-bottom: var(--space-4); }
.svc-plan__note { justify-content: flex-start; }
.svc-plan__scene { position: relative; height: 600px; min-width: 0; }
.svc-plan__scene > [data-scene] { display: block; width: 100%; height: 100%; }

/* ---------- close: the words and picker left, the owner in the middle, the board on the right over his truck ---------- */
.svc-close__photo { left: -24%; width: 124%; max-width: none; object-position: 50% 12%; }
.svc-close { min-height: 760px; }
.svc-close .close__shade { background: linear-gradient(90deg, var(--c-shade) 0%, var(--c-shade) 34%, color-mix(in srgb, var(--c-navy-deep) 34%, transparent) 46%, transparent 54%); }
.svc-close .close__content > h2 { max-width: 560px; }
.svc-close .close__picker { width: 520px; }
.svc-close__scene { position: absolute; z-index: 1; top: 50%; right: clamp(16px, 2.6vw, 48px); width: 400px; height: 640px; transform: translateY(-50%); }
.svc-close__scene > [data-scene] { display: block; width: 100%; height: 100%; }

/* ---------- under 1100 px ---------- */
@media (max-width: 1099px) {
  .svc-found .chapter__in { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
  .svc-found__scene { grid-column: 2; height: 540px; }
  .svc-trust .chapter__in { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); }
  .svc-trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-seen .chapter__in { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); }
  .svc-ads .pair__media { --stage-h: 540px; }
  .svc-ads__scene { left: -40px; width: 440px; }
  .svc-leads .pair { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .svc-leads__scene { width: 430px; right: -16px; }
  .svc-plan__in { grid-template-columns: 100%; row-gap: var(--space-5); }
  .svc-plan__scene { height: 560px; }
  /* the close: the words first, the photo under them, the board over its foot */
  .svc-close { display: flex; flex-direction: column; min-height: 0; background: var(--c-navy); }
  .svc-close .close__content { order: 1; padding-block: var(--section-y) var(--space-5); }
  .svc-close .close__shade { display: none; }
  .svc-close__photo { position: relative; inset: auto; left: 0; width: 100%; height: 600px; z-index: 0; object-position: 80% 0; }
  .svc-close .close__stop { order: 2; position: relative; top: auto; right: auto; align-self: flex-end; margin: 212px 16px -256px 0; z-index: 2; }
  .svc-close__photo { order: 3; }
  .svc-close__scene { order: 4; position: relative; top: auto; right: auto; width: min(100% - 2 * var(--gutter), 400px); height: 640px; margin: -330px auto var(--section-y); transform: none; }
}

/* ---------- under 900 px: the chapters stack: the words, the photo, the scene over its foot, the services ---------- */
@media (max-width: 899px) {
  .svc-ch { display: flex; flex-direction: column; padding-block: var(--section-y); background: var(--c-navy); }
  .svc-ch .chapter__in { display: contents; }
  .svc-ch .chapter__shade { display: none; }
  .svc-ch .sec-head { order: 1; margin: 0 var(--gutter) var(--space-4); }
  .svc-ch__stop { order: 2; position: relative; top: auto; right: auto; align-self: flex-end; margin: 0 16px -56px 0; z-index: 2; }
  .svc-ch .chapter__media { order: 3; position: relative; inset: auto; z-index: 0; width: 100%; height: 340px; }
  .svc-scene { order: 4; position: relative; z-index: 1; margin: -96px var(--gutter) 0; }
  .svc-ch .svc-card, .svc-trust__list { order: 5; margin: var(--space-4) var(--gutter) 0; }
  .svc-found__scene { height: 520px; margin-top: -270px; align-self: stretch; }
  .svc-found .chapter__media { height: 520px; object-position: 50% 0; }
  .svc-trust .chapter__media { height: 420px; object-position: 22% 50%; }
  .svc-trust__scene { height: 300px; margin-top: -170px; }
  .svc-seen .svc-ch__stop { margin: 184px 16px -240px 0; }
  .svc-seen .chapter__media { object-position: 82% 0; height: 520px; }
  .svc-seen__scene { height: 480px; margin-top: -250px; }
  .svc-seen .svc-card { align-self: stretch; max-width: none; width: auto; }
  .svc-ads .pair, .svc-leads .pair { grid-template-columns: 100%; }
  .svc-ads .pair__media { --stage-h: 640px; }
  .svc-ads__clip { object-position: 74% 0; }
  .svc-ads__scene { top: auto; bottom: 8px; left: 50%; width: min(440px, 100% - 16px); height: 450px; transform: translateX(-50%); }
  .svc-leads .pair__media { --stage-h: 560px; }
  .svc-leads__photo { object-position: 74% 20%; }
  .svc-leads__scene { top: auto; bottom: 12px; left: 8px; right: 8px; width: auto; height: 300px; }
  .svc-leads__stop { left: auto; right: 16px; margin-left: 0; }
}

@media (max-width: 599px) {
  .svc-hero__stage { --stage-h: 640px; --d-x: 40%; overflow: hidden; border-radius: var(--radius-l) 40% 40% var(--radius-l) / var(--radius-l) 50% 50% var(--radius-l); }
  /* the wide clip whole across the stage's top, so the lit phone stands above the card; the card hides its foot */
  .svc-hero__stage > video { inset: -1px auto auto -40%; width: 180%; object-fit: contain; object-position: 50% 0; }
  .svc-hero__scene { top: auto; bottom: 36px; left: 50%; right: auto; width: calc(100% - 16px); transform: translateX(-50%); }
  /* the compare: each side's landscaper in its own half, his face above the cards; the knob above them too */
  #day .compare__side.before > img { object-position: 79% 50%; }
  #day .compare__side.after > img { object-position: 78% 50%; }
  #day .compare__knob { top: 21%; }
  #day .compare__hint { top: calc(21% + 34px); }
  .svc-trust__list { grid-template-columns: 100%; }
  .svc-seen .chapter__media { height: 560px; }
  .svc-seen__scene { height: 560px; margin-top: -290px; }
  .svc-plan__scene { height: 640px; }
  .svc-plan__stop { top: -52px; }
}
