/* The Services hub (src\pages\services.mjs, plan.md "Services"): where each part sits and how large. The components'
   own look is design\components.css's; only the tokens of system.css. */

/* ---------- hero: the owner's phone on the table, the words at its left, the searches at its right ---------- */
.svh { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: clamp(660px, calc(100svh - 84px), 900px); background: color-mix(in srgb, var(--c-paper-alt) 78%, var(--c-line)); }
.svh__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.svh__photo { position: absolute; inset: 0; }
.svh__photo > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.svh__veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-paper) 90%, transparent), color-mix(in srgb, var(--c-paper) 72%, transparent) 27%, transparent 44%); }
.svh__in { display: grid; grid-template-columns: minmax(0, 1fr) calc(16.7vw + 3rem) minmax(0, 1fr); align-items: center; width: 100%; padding-block: var(--space-5); }
.svh__copy { max-width: 32rem; }
.svh__title { margin: 0 0 1.25rem; font-size: clamp(2.5rem, 1.35rem + 3.3vw, 4.15rem); line-height: 1.05; }
.svh__line { max-width: 27em; margin: 0 0 1.75rem; color: var(--c-ink-soft); font-size: clamp(1.0625rem, 1rem + .3vw, 1.2rem); line-height: 1.55; }
.svh__cta { display: grid; justify-items: start; }
.svh__cta .cta-note { justify-content: flex-start; }
.svh__side { position: relative; display: grid; justify-items: end; }
.scene.svh__demo { width: min(100%, 470px); }
/* on the narrowest phones the results drop their Call pills, so "Your plumbing company" and its line keep whole */
@media (max-width: 389px) {
  .scene.svh__demo .sd-face { grid-template-columns: minmax(0, 1fr); }
  .scene.svh__demo .sd-call { display: none; }
}
.svh__stop { top: -2.75rem; right: 1rem; }

/* Its lock screen (designed at 300 x 660): the day and the time, the bookings under it, one after another. The
   library gives this phone's glass no radius, so the screen is rounded here, a little inside the glass's own curve. */
.lock { position: absolute; inset: 0; overflow: hidden; border-radius: 26px; background: var(--c-ink); color: var(--c-paper); font-family: var(--font-ui); }
.lock__top { position: absolute; left: 0; right: 0; top: 66px; display: grid; justify-items: center; gap: 2px; margin: 0; }
.lock__top span { font-size: 18px; font-weight: 600; line-height: 1.2; opacity: .86; }
.lock__top b { font-size: 86px; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
.lock__list { position: absolute; left: 11px; right: 11px; top: 194px; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lock__note { display: grid; gap: 2px; padding: 10px 13px 12px; border-radius: 18px; background: color-mix(in srgb, var(--c-paper) 15%, var(--c-ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-paper) 10%, transparent); }
.lock__app { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; opacity: .8; }
.lock__icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--c-paper); }
.lock__mark { width: 14px; height: 14px; fill: var(--c-brand); }
.lock__note b { font-size: 16px; font-weight: 800; line-height: 1.3; }
.lock__note small { font-size: 14px; line-height: 1.35; opacity: .84; }
.lock__bar { position: absolute; left: 50%; bottom: 12px; width: 110px; height: 4px; margin-left: -55px; border-radius: 2px; background: var(--c-paper); opacity: .78; }
.lock__list [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 14px)); }
@media (scripting: enabled) {
  .lock__list [data-kit-at]:not(:first-child) { opacity: var(--kit-in, 0); transform: translateY(calc((1 - var(--kit-in, 0)) * 14px)); }
}

/* ---------- maps: the couple's evening, the search at its left, the group's panel at its right ---------- */
.svmaps__head { max-width: 46rem; margin: 0 auto clamp(1.75rem, 3.5vw, 2.75rem); text-align: center; }
.svmaps__head .lede { margin-inline: auto; margin-bottom: 0; }
.svmaps__stage { position: relative; }
.svmaps__frame { height: clamp(560px, 48vw, 700px); }
.svmaps__frame > img { --pos: 50% 26%; }
.svmaps__seq { left: clamp(1rem, 2.2vw, 1.75rem); top: 30%; }
.svmaps__card { top: clamp(1rem, 2.2vw, 1.75rem); right: clamp(1rem, 2.2vw, 1.75rem); width: min(19.5rem, 25%); }
.svmaps__stop { top: 1rem; left: 1rem; }

/* ---------- web: the navy chapter, its words and services, then her evening, the chat over the window ---------- */
.svweb { padding-bottom: 0; }
.svweb__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.svweb__words .lede { margin-bottom: 0; }
.svweb__svc .chap__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.75rem; margin-top: 1.1rem; }
.svweb__frame { position: relative; isolation: isolate; height: clamp(560px, 57vw, 860px); overflow: hidden; background: var(--c-ink); }
.svweb__frame > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 30%; }
/* over the window's right pane, above the laptop's lid */
.svweb__chat { top: 2.5%; left: 60%; width: min(20.5rem, 28%); gap: .6rem; padding: .8rem .8rem .85rem; }
.svweb__chat .gchat__msg { padding: .45rem .75rem; font-size: .875rem; }
.svweb__stop { top: 1.25rem; right: var(--gutter); }

/* ---------- ai: the words and services at the left, the plumber at work at the right ---------- */
.svai { position: relative; isolation: isolate; }
.svai__edge { fill: color-mix(in srgb, var(--c-paper-alt) 78%, var(--c-line)); }
.svai__in { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.svai__words .lede { margin-bottom: 0; }
/* `max-width: 100%`: its least height (through its ratio) no longer widens it past its column (at 1024 px it ran 47 px
   past the screen); where the column is wider, it keeps its size */
.svai__frame { aspect-ratio: 4 / 3.4; min-height: 520px; max-width: 100%; }
.svai__frame > img { --pos: 46% 50%; }
.svai__seq { right: clamp(.75rem, 2vw, 1.5rem); bottom: clamp(.75rem, 2vw, 1.5rem); width: min(19.5rem, calc(100% - 1.5rem)); }
.svai__stop { top: 1rem; right: 1rem; }

/* ---------- ads: the words above, the morning table full-bleed with the ad's story at its left, the services under ---------- */
.svads__head { max-width: 46rem; margin: 0 auto clamp(1.75rem, 3.5vw, 2.75rem); text-align: center; }
.svads__head .lede { margin-inline: auto; margin-bottom: 0; }
.svads__frame { position: relative; isolation: isolate; height: clamp(500px, 50vw, 780px); overflow: hidden; background: var(--c-ink); }
.svads__frame > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 0% 50%; }
.svads__seq { left: max(var(--gutter), calc((100% - var(--max-w)) / 2)); top: 50%; translate: 0 -50%; width: min(20.5rem, 30%); }
.svads__sponsor { display: flex; align-items: center; gap: .35rem; color: var(--c-ink-soft); font-size: .8125rem; }
.svads__badge { display: inline-flex; align-items: center; gap: .25rem; color: var(--c-brand-dark); font-weight: 800; }
.svads__btns { display: flex; gap: .4rem; margin-top: .3rem; }
.svads__btns span { padding: .35rem .8rem; border-radius: 999px; background: var(--c-brand-light); color: var(--c-brand-dark); font-family: var(--font-ui); font-size: .8125rem; font-weight: 800; }
.svads__btns span:first-child { background: var(--c-brand-dark); color: var(--c-paper); }
.svads__stop { top: 1.25rem; right: var(--gutter); }
.svads__svc { position: relative; z-index: 4; display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; gap: 1rem 2.25rem; align-items: center; margin-top: -3.5rem; padding: 1.4rem 1.75rem; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: var(--shadow-l); }
.svads__svc .chap__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.75rem; margin: 0; }
.svads__svc .chap__door { margin: 0; white-space: nowrap; }

/* ---------- buyers: the main street, the three buyers stacked in glass at its right ---------- */
.svbuy__head { max-width: 46rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.svbuy__head .lede { margin-bottom: 0; }
.svbuy__frame { min-height: 800px; }
.svbuy__frame > img { --pos: 30% 60%; }
.scene.svbuy__scene { position: absolute; z-index: 3; top: clamp(1rem, 2.2vw, 1.75rem); right: clamp(1rem, 2.2vw, 1.75rem); width: min(27rem, 42%); }
.svbuy__stop { top: 1rem; left: 1rem; }

/* ---------- mix: the unique element on the designed ground, the words at its left ---------- */
.svmix__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.svmix__words .lede { max-width: 28em; }
.svmix__cta { display: grid; justify-items: start; }
.svmix__cta .cta-note { justify-content: flex-start; }
.svmix__stage { position: relative; }
.scene.svmix__scene { width: 100%; max-width: 600px; height: 500px; margin-left: auto; }
.svmix__stop { top: 0; right: 0; }

/* ---------- close: the plumber's morning; the day's bookings in a row above his head ---------- */
.svclose { --close-pos: 62% 0%; --close-pos-m: 100% 20%; }
.svclose__seq { top: 1.25rem; right: 4.5rem; width: auto; grid-auto-flow: column; grid-auto-columns: 16.5rem; }

/* ---------- narrower ---------- */
@media (max-width: 1199px) {
  /* the words on the cream, then the table: the phone at its left third, the searches over the wood at its right */
  .svh { display: flex; flex-direction: column; align-items: stretch; min-height: 0; background: color-mix(in srgb, var(--c-paper-alt) 42%, var(--c-paper)); }
  .svh__veil, .svh__gap { display: none; }
  .svh__in { display: contents; }
  .svh__copy { order: 1; box-sizing: border-box; width: 100%; max-width: calc(40rem + 2 * var(--gutter)); padding: var(--space-5) var(--gutter) var(--space-4); }
  .svh__media { order: 2; position: relative; inset: auto; z-index: 0; height: 600px; }
  .svh__photo { inset: auto; left: calc(30% - 690px); top: 50%; width: 1380px; height: 932px; translate: 0 -50%; }
  .svh__side { order: 3; position: absolute; z-index: 1; right: var(--gutter); bottom: 0; width: min(470px, 56%); height: 600px; align-content: center; }
  .svh__stop { top: 1rem; right: 0; }
  .svmaps__card { position: relative; top: auto; right: auto; width: auto; margin-top: 1rem; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .5rem 2rem; align-items: start; }
  .svmaps__card .group-name { grid-column: 1; grid-row: 1; }
  .svmaps__card .chap__list { grid-column: 2; grid-row: 1 / span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.5rem; margin-top: 0; }
  .svmaps__card .chap__door { grid-column: 1; grid-row: 2; margin-top: .25rem; }
  .svads__seq { width: min(17.5rem, 34%); }
  .svads__svc { grid-template-columns: minmax(0, 1fr) auto; }
  .svads__svc .chap__list { grid-column: 1 / -1; grid-row: 2; }
  .scene.svmix__scene { height: 480px; }
  /* the bookings in a row over the van's side, above the panel */
  .svclose { padding-top: 6.25rem; }
  .svclose__seq { left: 1.25rem; right: auto; grid-auto-columns: 13.25rem; }
}
@media (max-width: 1023px) {
  .svweb__head { grid-template-columns: minmax(0, 1fr); }
  /* her evening full-bleed, the chat under it, overlapping its foot */
  .svweb { padding-bottom: var(--space-5); }
  .svweb__frame { height: auto; overflow: visible; background: none; }
  .svweb__frame > img { position: relative; inset: auto; width: 100%; height: clamp(420px, 62vw, 560px); object-position: 30% 40%; }
  .svweb__chat { position: relative; top: auto; right: auto; left: auto; width: min(24rem, calc(100% - 1.5rem)); margin: -12.5rem auto 0; }
  .svmaps__seq { width: min(19rem, 44%); }
  .svai__in { grid-template-columns: minmax(0, 1fr); }
  .svai__frame { aspect-ratio: 16 / 11; min-height: 0; }
  .svbuy__frame { min-height: 860px; }
  .scene.svbuy__scene { width: min(25rem, 54%); }
}
@media (max-width: 859px) {
  .svmix__in { grid-template-columns: minmax(0, 1fr); }
  .scene.svmix__scene { max-width: 700px; height: 520px; margin-inline: auto; }
  .svmix__stop { right: auto; left: 0; }
}
@media (max-width: 759px) {
  .svh__copy { padding-block: var(--space-4) var(--space-3); }
  .svh__title { margin-bottom: .8rem; font-size: clamp(2.05rem, 1.35rem + 3.6vw, 2.35rem); }
  .svh__line { margin-bottom: 1.1rem; font-size: 1rem; line-height: 1.5; }
  .svh__cta { justify-items: stretch; }
  /* the phone large enough to read, the wood under it; the searches standing half on the wood */
  .svh__media { height: 720px; }
  .svh__photo { left: 50%; top: -203px; width: 1370px; height: 925px; translate: -50% 0; }
  .svh__side { position: relative; right: auto; bottom: auto; width: auto; height: auto; margin-top: -13rem; padding: 0 var(--gutter) var(--space-4); justify-items: center; }
  .svh__stop { top: -3.5rem; right: var(--gutter); }
  .scene.svh__demo { width: 100%; }
  /* each picture in its own rounded box, its cards standing at least half on its foot (sitecheck: on its photo at
     every width), clear of the faces */
  .svmaps__frame, .svai__frame { height: auto; min-height: 0; aspect-ratio: auto; overflow: visible; background: none; box-shadow: none; }
  .svmaps__frame > img, .svai__frame > img { position: relative; inset: auto; width: 100%; height: 460px; border-radius: var(--radius-l); box-shadow: var(--shadow-l); }
  .svmaps__frame > img { --pos: 58% 30%; }
  .svai__frame > img { --pos: 44% 40%; height: 340px; }
  .svmaps__seq, .svai__seq { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; margin: -10.75rem .75rem 0; }
  .svai__seq { margin-top: -7.5rem; }
  .svmaps__card { display: block; padding: 1.1rem 1.15rem; }
  .svmaps__card .chap__list { grid-template-columns: minmax(0, 1fr); margin-top: .85rem; }
  .svmaps__card .chap__door { margin-top: 1rem; }
  .svweb__svc .chap__list { grid-template-columns: minmax(0, 1fr); }
  .svweb__frame > img { height: 460px; object-position: 26% 50%; }
  .svweb__chat { width: auto; margin: -13.5rem .75rem 0; }
  .svads__frame { height: auto; overflow: visible; background: none; }
  .svads__frame > img { position: relative; inset: auto; width: 100%; height: 440px; object-position: 56% 50%; }
  /* on the phone the ad and its booking only, so the two stand half on the table, under the phone in her hands */
  .svads__seq { position: relative; left: auto; top: auto; translate: none; width: auto; margin: -8rem var(--gutter) 0; }
  .svads__seq > :nth-child(2), .svads__seq > :nth-child(3) { display: none; }
  .svads__svc { grid-template-columns: minmax(0, 1fr); margin-top: 1.25rem; padding: 1.15rem; }
  .svads__svc .chap__list { grid-template-columns: minmax(0, 1fr); grid-row: auto; }
  .svbuy__frame { min-height: 0; overflow: visible; background: none; box-shadow: none; }
  .svbuy__frame > img { position: relative; inset: auto; width: 100%; height: 708px; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
  /* the column half on the street; its stop icon in the room left above its first card (the photo and the overlap
     48 px more since the compare rows went to two lines, so the column stays more than half on it at 360 px) */
  .scene.svbuy__scene { position: relative; top: auto; right: auto; width: auto; margin-top: -31.5rem; padding: 3.5rem .5rem 0; }
  .svbuy__stop { top: calc(708px - 31.5rem + .5rem); left: auto; right: 1rem; }
  .scene.svmix__scene { height: 560px; }
  .svclose { padding-top: 17.5rem; }
  .svclose .close__media { inset: 0 0 auto 0; height: 22rem; }
  .svclose .close__media img { object-position: 100% 30%; }
  .svclose::after { background: none; }
  .svclose__seq { top: .75rem; left: .75rem; right: auto; grid-auto-flow: row; grid-auto-columns: auto; width: min(14.75rem, calc(100% - 4.5rem)); }
  .svclose__seq > :nth-child(n + 2) { display: none; }
}
