/* Services: places and sizes its parts, with system.css's tokens. */
.page-services section[id] { scroll-margin-top: 80px; }

/* ===== hero: a split, the words on the grid, the handshake framed and the notifications landing over it ===== */
.svc-hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(4.5rem, 8vw, 7rem); }
.svc-hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.svc-hero__title { margin: 0; font-size: var(--fs-h1); font-weight: var(--fw-display); line-height: 1.04; letter-spacing: -0.03em; color: var(--c-text); }
.svc-hero__line { max-width: 30rem; margin: 1.1rem 0 0; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--c-text-soft); }
/* the notifications hang 26 px out on the left and 30 px under the photo (wyw's stage) */
.svc-hero__media { position: relative; margin: 0 0 30px 26px; }
.svc-hero__frame { aspect-ratio: 4 / 4.2; }
.svc-hero__frame > img { object-position: 74% 20%; }
.svc-hero__scene.scene { position: absolute; inset: 0; z-index: 2; }
.svc-hero__stop { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 6; }
@media (max-width: 899px) {
  .svc-hero__in { grid-template-columns: 1fr; }
  .svc-hero__media { margin: 0 0 30px; }
  .svc-hero__frame { aspect-ratio: 4 / 3.4; }
}

/* ===== change: the same week, before and after ===== */
.change__board { position: relative; }
.change__stop { position: absolute; right: 0; bottom: calc(100% + 1rem); }
.change__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.change__side { position: relative; margin: 0; }
.change__frame { aspect-ratio: 16 / 11; }
.change__side--before .change__frame > img { object-position: 30% 40%; filter: saturate(0.7) brightness(0.82); }
.change__side--after .change__frame > img { object-position: 100% 35%; }
.change__tag { position: absolute; top: 1rem; left: 1rem; z-index: 2; padding: 0.4rem 0.7rem; border-radius: var(--radius-s); font: 700 var(--fs-small)/1.2 var(--font-ui); background: rgba(13, 14, 21, 0.72); color: var(--c-text-soft); box-shadow: inset 0 0 0 1px var(--c-rule); }
.change__tag--us { color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-brand); }
/* the week's card: over the photo's clear side, its rows landing in pairs with the other card's */
.wk { position: absolute; bottom: 1rem; z-index: 3; display: grid; gap: 0.6rem; box-sizing: border-box; width: min(16.5rem, 46%); padding: 0.85rem 1rem 0.9rem; border-radius: var(--radius-m); background: var(--c-glass); box-shadow: inset 0 0 0 1px var(--c-rule-strong), inset 0 1px 0 rgba(255, 255, 255, 0.12); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); color: var(--c-text); }
.wk--before { right: 1rem; }
/* the loop's soft blink (services.js): the whole card dims and blurs as one while its rows reset in place */
.wk { transition: filter 0.3s ease; }
.wk[data-blink-out] { filter: opacity(0.45) blur(3px); }
.wk[data-blink-out] .wk__row { transform: none; }
.wk--after { left: 1rem; box-shadow: inset 0 0 0 1px var(--c-brand), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.wk__stamp { color: var(--c-text-meta); }
.wk--after .wk__stamp { color: var(--c-accent); }
.wk__rows { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.wk__row { display: flex; align-items: center; gap: 0.55rem; font: 600 0.9375rem/1.3 var(--font-ui); color: var(--c-text); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.wk--before .wk__row { color: var(--c-text-soft); }
.wk__row--total { font-weight: 800; color: var(--c-green); }
.wk__ico { flex: none; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 5px; }
.wk__ico--no, .wk__ico--dot { color: var(--c-text-meta); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--c-rule-strong); }
.wk__ico--ok { color: var(--c-green); background: rgba(40, 199, 111, 0.14); box-shadow: inset 0 0 0 1px rgba(40, 199, 111, 0.45); }
.wk__line { opacity: var(--kit-in, 1); }
.wk__line .live-card__line { margin-top: 0; }
@media (max-width: 760px) {
  .change__pair { grid-template-columns: 1fr; gap: 1.5rem; }
  .change__frame { aspect-ratio: 4 / 3; }
  /* the stop icon just above the first card, at the photo's right */
  .change__stop { bottom: auto; top: calc((100vw - 2 * var(--gutter)) * 0.75 - 9.75rem); right: 0.75rem; }
  /* on the phone the card stands over its photo's lower part, more than half of it on the photo, as at 1440 px */
  .wk { position: relative; bottom: auto; left: auto; right: auto; width: auto; margin: -6.5rem 0.75rem 0; }
}

/* ===== the chapters: one group of services each ===== */
.svc-num { color: var(--c-accent); }
.svc-strip b, .svc-list b { font: 700 1.0625rem/1.3 var(--font-ui); color: var(--c-text); }
.svc-strip li > span:last-child, .svc-list li > span:last-child { font-size: var(--fs-small); line-height: 1.45; color: var(--c-text-soft); }

/* full-bleed, offset: the head, then the picture across the page, the scene on its clear side, the services at its foot */
.chapter--bleed { padding-bottom: 0; }
.chapter__band { position: relative; isolation: isolate; overflow: hidden; }
.chapter__media { position: absolute; inset: 0; z-index: -2; }
.chapter__media > .chapter__bg { position: absolute; inset: -1px; display: block; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.chapter__band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(13, 14, 21, 0.5) 0%, rgba(13, 14, 21, 0) 16%, rgba(13, 14, 21, 0) 55%, rgba(13, 14, 21, 0.9) 100%); }
.chapter__in { position: relative; display: grid; grid-template-rows: 1fr auto; gap: 1.5rem; min-height: clamp(660px, 54vw, 800px); padding-block: 2.75rem 2rem; }
.chapter--bleed .chapter__stop { position: absolute; top: 1rem; right: var(--gutter); }
.chapter--bleed .chapter__scene.scene { justify-self: end; align-self: start; }
/* from about 530 wide the geogrid keeps its column beside the grid */
.chapter__scene--geogrid.scene { width: min(660px, 53%); height: 500px; }
.chapter__scene--review-ask.scene { width: clamp(360px, 30vw, 430px); height: 600px; }
.chapter--found .chapter__bg { object-position: 30% 40%; }
.chapter--picked .chapter__bg { object-position: 40% 40%; }
.svc-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-radius: var(--radius-l); background: var(--c-glass); box-shadow: inset 0 0 0 1px var(--c-rule-strong), inset 0 1px 0 rgba(255, 255, 255, 0.1); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
.svc-strip li { display: grid; align-content: start; gap: 0.3rem; padding: 1.1rem 1.25rem 1.2rem; }
.svc-strip li + li { box-shadow: inset 1px 0 0 var(--c-rule); }

/* framed, split: the head and the services side by side, the picture framed under them, the scene on its clear side */
.chapter__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.chapter__top .head { margin-bottom: 0; }
.svc-list { display: grid; margin: 0; padding: 0; list-style: none; }
.svc-list li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.15rem 0.5rem; padding: 0.8rem 0; border-top: 1px solid var(--c-rule); }
.svc-list li:last-child { border-bottom: 1px solid var(--c-rule); }
.svc-list .svc-num { grid-row: span 2; padding-top: 0.2rem; }
.chapter__frame { height: clamp(520px, 44vw, 580px); }
.chapter__frame::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(13, 14, 21, 0.55) 0%, rgba(13, 14, 21, 0.3) 45%, rgba(13, 14, 21, 0) 70%); }
.chapter--framed .chapter__stop { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 6; }
.chapter--framed .chapter__scene.scene { position: absolute; top: 1.75rem; bottom: 1.75rem; left: 1.75rem; }
.chapter__scene--channels-merge.scene { width: min(680px, 59%); }
/* 59% of the frame keeps its smallest words (the call's timer) at 13 px */
.chapter__scene--voice-captions.scene { width: min(670px, 59%); }
.chapter--click .chapter__bg { object-position: 50% 22%; }
.chapter--never-miss .chapter__bg { object-position: 50% 34%; }

@media (max-width: 900px) {
  .chapter__top { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
  .svc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-strip li:nth-child(3) { box-shadow: inset 0 1px 0 var(--c-rule); }
  .svc-strip li:nth-child(4) { box-shadow: inset 1px 0 0 var(--c-rule), inset 0 1px 0 var(--c-rule); }
}
/* A narrower frame: the scene stands across the photo's lower part, the people framed in the room above it, more than
   half of the scene still on the photo (as at 1440 px); --ph-top is that room, --scene-h the scene's height. */
@media (max-width: 1100px) {
  .chapter__frame { container-type: inline-size; height: auto; padding: min(var(--ph-top), 420px) 0.6rem 0.6rem; }
  .chapter__frame > .chapter__bg { top: -1px; bottom: auto; height: calc(min(var(--ph-top-cq), 420px) + var(--scene-h) * 0.54); }
  .chapter__frame::before { z-index: 0; inset: 0 0 auto; height: calc(min(var(--ph-top-cq), 420px) + var(--scene-h) * 0.54 + 2px); background: linear-gradient(180deg, rgba(13, 14, 21, 0) 0%, rgba(13, 14, 21, 0) 45%, rgba(13, 14, 21, 0.55) 80%, var(--c-panel) 100%); }
  .chapter--framed .chapter__scene.scene { position: relative; inset: auto; width: auto; height: var(--scene-h); }
  .chapter--framed .chapter__stop { top: calc(min(var(--ph-top-cq), 420px) - 3.25rem); }
  .chapter--click { --ph-top: 84%; --ph-top-cq: 84cqw; --scene-h: 520px; }
  .chapter--never-miss { --ph-top: 84%; --ph-top-cq: 84cqw; --scene-h: 520px; }
  .chapter__scene--channels-merge.scene, .chapter__scene--voice-captions.scene { width: auto; }
}
@media (max-width: 760px) {
  /* on the phone: the picture across the band, the scene over its lower part, then the services on the ground */
  .chapter__band { background: var(--c-ink); }
  .chapter__band::before { display: none; }
  .chapter__media { inset: 0 0 auto; height: calc(var(--ph-top) + var(--scene-h) * 0.54); }
  .chapter__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 14, 21, 0) 0%, rgba(13, 14, 21, 0) 45%, rgba(13, 14, 21, 0.55) 80%, var(--c-ink) 100%); }
  .chapter__in { display: block; min-height: 0; padding-block: var(--ph-top) var(--section-y); }
  .chapter--bleed .chapter__stop { top: calc(var(--ph-top) - 3.25rem); right: var(--gutter); }
  /* justify-self: end would shrink a scene to nothing in block layout too (a scene sizes itself from its box) */
  .chapter--bleed .chapter__scene.scene { position: relative; justify-self: stretch; width: auto; height: var(--scene-h); }
  .chapter--found { --ph-top: 110vw; --scene-h: 540px; }
  .chapter--picked { --ph-top: 58vw; --scene-h: 600px; }
  .chapter--found .chapter__bg { object-position: 12% 50%; }
  .chapter--picked .chapter__bg { object-position: 41% 50%; }
  .svc-strip { grid-template-columns: 1fr; margin-top: 1.5rem; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .svc-strip li, .svc-strip li + li, .svc-strip li:nth-child(n) { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.15rem 0.5rem; padding: 0.8rem 0; box-shadow: none; border-top: 1px solid var(--c-rule); }
  .svc-strip li:last-child { border-bottom: 1px solid var(--c-rule); }
  .svc-strip .svc-num { grid-row: span 2; padding-top: 0.2rem; }
  .chapter--click { --scene-h: 640px; }
  .chapter--never-miss { --scene-h: 660px; }
  .chapter--click .chapter__bg { object-position: 80% 50%; }
  .chapter--never-miss .chapter__bg { object-position: 74% 50%; }
}

/* ===== mix: the control board on the designed ground ===== */
.mix-part__board { position: relative; }
.mix-part__stop { position: absolute; right: 0; bottom: calc(100% + 1rem); }
.mix-part__scene.scene { width: 100%; height: 520px; }
@media (max-width: 760px) {
  .mix-part__scene.scene { height: 820px; }
}

/* ===== close: the words, then the roofer and his month's new clients ===== */
.svc-close { padding-bottom: 0; }
.svc-close__words { text-align: center; }
.svc-close__title { margin: 0; font-size: var(--fs-display); font-weight: var(--fw-display); line-height: 1; letter-spacing: -0.035em; color: var(--c-text); }
.svc-close__line { max-width: 34rem; margin: 1rem auto 0; font-size: 1.125rem; color: var(--c-text-soft); }
.svc-close__band { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(2.5rem, 5vw, 4rem); }
.svc-close__band > .svc-close__bg { position: absolute; inset: -1px; z-index: -2; display: block; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 30% 45%; }
.svc-close__band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, var(--c-ink) 0%, rgba(13, 14, 21, 0) 18%, rgba(13, 14, 21, 0) 78%, rgba(13, 14, 21, 0.6) 100%); }
.svc-close__in { position: relative; display: flex; justify-content: flex-end; align-items: center; min-height: clamp(580px, 46vw, 660px); padding-block: 3rem; }
.svc-close__scene.scene { width: min(640px, 48%); height: 480px; }
.svc-close__stop { position: absolute; top: 1rem; right: var(--gutter); }
@media (max-width: 760px) {
  /* the roofer framed above, his month's card over the photo's lower part (more than half of it on the photo) */
  .svc-close__band { --ph-top: 112vw; --scene-h: 640px; background: var(--c-ink); }
  .svc-close__band > .svc-close__bg { inset: -1px -1px auto; height: calc(var(--ph-top) + var(--scene-h) * 0.54); object-position: 30% 50%; }
  .svc-close__band::before { inset: 0 0 auto; height: calc(var(--ph-top) + var(--scene-h) * 0.54); background: linear-gradient(180deg, var(--c-ink) 0%, rgba(13, 14, 21, 0) 10%, rgba(13, 14, 21, 0) 50%, rgba(13, 14, 21, 0.55) 80%, var(--c-ink) 100%); }
  .svc-close__in { display: block; min-height: 0; padding-block: var(--ph-top) var(--section-y); }
  .svc-close__scene.scene { position: relative; width: auto; height: var(--scene-h); }
  .svc-close__stop { top: calc(var(--ph-top) - 3.25rem); right: var(--gutter); }
}
