/* services.css: the Services page's parts, placed and sized with the tokens of system.css. */
@import url("../arsenal/statement.css");

/* ---------- the kit's header CSS (kit.md), as it is ---------- */
[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"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[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 { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
[data-kit-scene="rotate"] [data-kit-slide] img.kit-first { inset: -1px !important; width: calc(100% + 2px) !important; height: calc(100% + 2px) !important; max-width: none; }

/* ---------- hero: split, the general shot on the right, cut on the blade's diagonal ---------- */
.ihead--services { display: grid; align-items: center; min-height: max(700px, min(100svh, 940px)); }
.ihead--services .ihead__stage { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 58%; clip-path: polygon(17% 0, 100% 0, 100% 100%, 0 100%); }
.ihead--services .ihead__slide { --pos: 34% 50%; }
.ihead--services .ihead__clip { object-position: var(--pos); filter: brightness(0.92) contrast(1.06) saturate(0.95); }
.ihead--services .ihead__slide img.kit-first { filter: brightness(0.92) contrast(1.06) saturate(0.95); }
.ihead--services .ihead__stage::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background:
  linear-gradient(90deg, color-mix(in srgb, var(--n-0) 62%, transparent) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 36%),
  linear-gradient(0deg, color-mix(in srgb, var(--n-0) 60%, transparent) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 30%),
  linear-gradient(180deg, color-mix(in srgb, var(--n-0) 55%, transparent) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 18%); }
.ihead--services .ihead__cut { position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; width: 58%; background: var(--c-brand); clip-path: polygon(17% 0, calc(17% + 3px) 0, 3px 100%, 0 100%); pointer-events: none; }
.ihead--services .ihead__wrap { position: relative; z-index: 3; padding-block: 132px 96px; }
.ihead--services .ihead__in { max-width: min(560px, 40vw); }
/* its pop-up hangs 52 px under the card (search-demo's copy here, so it covers no result): the room under it */
.ihead--services .ihead__scene { position: absolute; z-index: 4; left: calc(42% + 20px); bottom: 58px; width: min(500px, 36vw); }
.stop--hero { position: absolute; z-index: 6; right: var(--gutter); top: 96px; }
@media (max-width: 1100px) {
  .ihead--services .ihead__in { max-width: min(480px, 46vw); }
  .ihead--services .ihead__scene { left: auto; right: var(--gutter); }
}
@media (max-width: 900px) {
  .ihead--services { display: block; min-height: 0; padding-bottom: 60px; }
  .ihead--services .ihead__stage { position: relative; width: 100%; height: 42svh; min-height: 280px; margin-top: 68px; clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); }
  .ihead--services .ihead__slide { --pos: 40% 50%; }
  .ihead--services .ihead__cut { display: none; }
  .ihead--services .ihead__wrap { padding-block: 20px 0; }
  .ihead--services .ihead__in { max-width: none; }
  .ihead--services .ihead__scene { position: relative; left: auto; right: auto; bottom: auto; width: auto; margin-top: 12px; }
  .stop--hero { top: 84px; }
}

/* ---------- found: the head on the ink, the band, the services under it ---------- */
.chapter--band { padding-top: var(--section-y); }
.chapter--band .chapter__head { position: relative; z-index: 2; margin-bottom: clamp(28px, 4vw, 52px); }
.chapter__band { position: relative; height: clamp(560px, 52vw, 760px); overflow: hidden; }
.chapter--found .chapter__photo { object-position: 58% 46%; }
.chapter--found .chapter__shade { background:
  linear-gradient(90deg, color-mix(in srgb, var(--n-0) 70%, transparent) 0%, color-mix(in srgb, var(--n-0) 22%, transparent) 32%, color-mix(in srgb, var(--n-0) 0%, transparent) 46%),
  linear-gradient(0deg, var(--n-0) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 28%),
  linear-gradient(180deg, var(--n-0) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 10%); }
.chapter--found .chapter__scene { position: absolute; z-index: 2; left: var(--gutter); top: 7%; width: clamp(360px, 31vw, 440px); height: 560px; }
.chapter--found .stop--corner { top: 32px; }
.chapter__foot { position: relative; z-index: 3; margin-top: -116px; padding-bottom: var(--section-y); }
.svc-list--row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
@media (max-width: 1100px) { .svc-list--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  /* a tall crop of the photo, so the map stands on it below the faces (they end at 57% of its height) */
  .chapter__band { height: auto; overflow: visible; }
  .chapter--found .chapter__photo { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 5 / 9; object-position: 67% 50%; }
  .chapter--found .chapter__shade { background: linear-gradient(0deg, var(--n-0) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 12%), linear-gradient(180deg, var(--n-0) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 8%); }
  .chapter--found .chapter__scene { position: relative; left: auto; top: auto; width: auto; height: 500px; margin: calc(12px - 77.4vw) var(--gutter) 0; }
  .chapter--found .stop--corner { top: calc(102.6vw - 40px); }
  .chapter__foot { margin-top: 24px; }
  .svc-list--row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- statement: the one big piece as it stands, re-skinned: the designed ground, a slanted window ---------- */
#statement { --st-bg:
  radial-gradient(55% 75% at 100% 100%, color-mix(in srgb, var(--c-brand) 14%, transparent), transparent 72%),
  repeating-linear-gradient(-60deg, color-mix(in srgb, var(--c-paper) 4%, transparent) 0 1px, transparent 1px 28px),
  var(--n-0); }
#statement .statement__text { font-size: clamp(40px, calc(4.7cqi + 8px), 80px); }
#statement .statement__win { width: 2.25em; height: 0.8em; border-radius: 0; clip-path: polygon(0.3em 0, 100% 0, calc(100% - 0.3em) 100%, 0 100%); vertical-align: -0.06em; }

/* ---------- ads: the words and the scene on the left, the man on his call on the right ---------- */
.chapter--ads { display: grid; align-items: stretch; min-height: max(820px, min(104svh, 1000px)); }
.chapter--ads .chapter__photo { object-position: 62% 28%; }
.chapter--ads .chapter__shade { background:
  linear-gradient(90deg, color-mix(in srgb, var(--n-0) 90%, transparent) 0%, color-mix(in srgb, var(--n-0) 74%, transparent) 30%, color-mix(in srgb, var(--n-0) 20%, transparent) 52%, color-mix(in srgb, var(--n-0) 0%, transparent) 64%),
  linear-gradient(180deg, var(--n-0) 0%, color-mix(in srgb, var(--n-0) 0%, transparent) 14%, color-mix(in srgb, var(--n-0) 0%, transparent) 78%, color-mix(in srgb, var(--n-0) 70%, transparent) 100%); }
.chapter--ads .chapter__in { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 460px); gap: clamp(28px, 3vw, 44px); align-items: start; padding-block: clamp(96px, 9vw, 132px) 40px; }
.chapter--ads .chapter__text { display: grid; gap: 28px; }
.chapter--ads .chapter__scene { position: relative; align-self: end; }
.chapter--ads .chapter__scene > .stop--corner { top: -52px; right: 0; }
.chapter--ads .ads__scene { height: 470px; }
@media (max-width: 900px) {
  /* on the phone: the words, then the photo, then the scene over the photo's foot */
  .chapter--ads { display: flex; flex-direction: column; min-height: 0; padding-block: var(--section-y); }
  .chapter--ads .chapter__in { display: contents; }
  .chapter--ads .chapter__text { order: 1; padding-inline: var(--gutter); }
  .chapter--ads .chapter__photo { order: 3; position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; margin-top: 40px; object-position: 66% 30%; }
  .chapter--ads .chapter__shade { display: none; }
  /* the scene stands on the photo's lower half, 20 px under his face (which ends at 48% of its height) */
  .chapter--ads .chapter__scene { order: 4; position: relative; z-index: 2; align-self: stretch; margin: calc(20px - 41.6vw) var(--gutter) 0; }
  .chapter--ads .ads__scene { height: 460px; }
}
@media (max-width: 760px) {
  .chapter--ads .chapter__photo { aspect-ratio: 2 / 3; }
  .chapter--ads .chapter__scene { margin-top: calc(20px - 78vw); }
}

/* ---------- trust (picked): the framed photo, the island hanging past its right edge ---------- */
.framed--picked .framed__frame img { object-position: 50% 55%; }
.framed--picked .framed__scene { right: -72px; bottom: 5%; width: 420px; height: 330px; }
.framed__media .stop--corner { right: 46px; top: 16px; }
.framed--picked .framed__text { padding-left: 40px; }
@media (max-width: 900px) {
  .framed--picked .framed__scene { right: 0; left: 0; bottom: 0; width: auto; height: 320px; }
  .framed--picked .framed__text { padding-left: 0; }
}

/* ---------- leads (calls): the words, then the framed plumber with the call booking itself beside him ---------- */
.framed--calls .framed__frame { aspect-ratio: 6 / 5; }
.framed--calls .framed__frame img { object-position: 66% 40%; }
.framed--calls .framed__scene { inset: 0; }
@media (max-width: 900px) { .framed--calls .framed__frame { aspect-ratio: 4 / 5; } }

/* ---------- mix: the signature on the designed ground ---------- */
/* room for the stop icon above the scene (52 px), so it never sits on the intro's last line */
.mix__head { margin-bottom: clamp(60px, 4vw, 64px); }
.mix__stage { position: relative; }
.mix__stage > .stop--corner { top: -52px; right: 0; }
.mix__scene { width: 100%; }

/* ---------- close ---------- */
.iclose--services .iclose__clip { object-position: 50% 24%; }
