/* The Services page (plan.md, "Services"). Only the tokens of design\system.css. */
@import url("../arsenal/statement.css");
@import url("../arsenal/stack-cards.css");

/* ---- photos that drift slowly: services.js pauses them off screen, the part's stop icon holds them ---- */
@keyframes svc-drift {
  from { transform: scale(var(--z0, 1.03)) translate3d(0, 0, 0); }
  to { transform: scale(var(--z1, 1.08)) translate3d(var(--dx, -1%), var(--dy, -.5%), 0); }
}
.drift { transform-origin: var(--origin, 50% 50%); transform: scale(var(--z0, 1.03)); animation: svc-drift 24s var(--ease-in-out) infinite alternate; will-change: transform; }
.drift[data-off], section:has(.stop[aria-pressed="true"]) .drift { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .drift { animation: none; } }

/* ---- hero: the general shot (a front desk's booking calendar), the search over its wall, the words on a cream
   block at the lower left whose top edge rises; the rising tick along its foot leads into the green promise ---- */
.svc-hero { --rise-h: clamp(56px, 9vw, 136px); --edge: clamp(44px, 4.6vw, 76px); position: relative; display: grid; align-items: end; justify-items: start; min-height: clamp(620px, calc(100svh - 84px), 820px); overflow: hidden; background: var(--c-paper-alt); }
.svc-hero__stage { position: absolute; inset: 0; }
.svc-hero__media { position: absolute; inset: 0; overflow: hidden; background: var(--c-paper-alt); }
.svc-hero__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 0; --z0: 1.26; --z1: 1.31; --origin: 18% 0; --dx: -.6%; --dy: 0%; }
.svc-hero .rise--top { display: none; }
.svc-hero__stop { position: absolute; z-index: 6; top: var(--space-2); left: max(var(--gutter), calc((100vw - var(--max-w)) / 2)); }
.scene.svc-hero__scene { position: absolute; z-index: 3; top: var(--space-1); right: max(calc(var(--gutter) - 16px), calc((100vw - var(--max-w)) / 2 - 16px)); width: 502px; --sd-card: var(--c-on-brand); --sd-field: var(--c-on-brand); }
/* the booking note hangs below the map card, clear of the third result's line; the scene's box (core.css clips every
   scene) lets it hang past its foot with its shadow, so the box keeps its size (step 13) */
.svc-hero .svc-hero__scene .sd-pop { bottom: -50px; }
.svc-hero .scene.svc-hero__scene { overflow: visible; }
.svc-hero__words { position: relative; z-index: 5; isolation: isolate; box-sizing: border-box; display: grid; gap: var(--space-2); justify-items: start; width: min(53%, 780px); padding: calc(var(--edge) + var(--space-4)) var(--space-5) calc(var(--rise-h) * .5 + var(--space-4)) max(var(--gutter), calc((100vw - var(--max-w)) / 2)); container-type: inline-size; }
/* the block: cream, its top edge rising, a coral line along that edge (the logo's stripe) */
.svc-hero__words::before, .svc-hero__words::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); pointer-events: none; }
.svc-hero__words::before { z-index: -2; top: -7px; background: var(--c-accent); }
.svc-hero__words::after { z-index: -1; top: 0; background: var(--c-paper); }
.svc-hero__title { font-size: var(--fs-h1); font-size: min(var(--fs-h1), 6.8vh, 10.6cqi); }
.svc-hero__line { max-width: 31em; color: var(--c-ink-soft); }
.svc-hero__cta .btn-note { margin-top: .6rem; }
.svc-hero .rise--hero { --rise-low: var(--c-brand); z-index: 6; }

/* ---- promise: one sentence on the green ground, its word turning on a cream sticker, its new customer in a tall
   window beside it (statement's own window, set beside the words) ---- */
.statement.svc-promise { --st-bg: var(--c-brand); --st-win: var(--c-brand-dark); --win-w: min(26%, 330px); display: grid; align-content: center; min-height: 600px; padding: clamp(64px, 7vw, 112px) max(var(--gutter), calc((100vw - var(--max-w)) / 2)) calc(clamp(56px, 9vw, 136px) + clamp(48px, 5vw, 80px)); }
.svc-promise .statement__text { box-sizing: border-box; width: calc(100% - var(--win-w) - var(--space-5)); max-width: none; margin: 0; font-size: min(calc(var(--fs-display) * 1.1), 5cqi); line-height: 1.04; }
.svc-promise .statement__rotate, .svc-promise .statement__rot, .svc-promise .statement__a, .svc-promise .statement__b { text-decoration: none; }
.svc-promise .statement__a, .svc-promise .statement__b { padding: 0 .12em .04em; border-radius: .14em; background: var(--c-paper); color: var(--c-brand-text); box-shadow: inset 0 -.07em 0 var(--c-accent); }
.svc-promise .statement__win { position: absolute; z-index: 2; top: clamp(48px, 5vw, 80px); bottom: calc(clamp(56px, 9vw, 136px) + 8px); right: max(var(--gutter), calc((100vw - var(--max-w)) / 2)); width: var(--win-w); height: auto; margin: 0; vertical-align: baseline; border-radius: var(--radius-l); }
.svc-promise .statement__win::after { content: ""; position: absolute; z-index: 3; inset: -1px -1px auto -1px; height: 13%; background: var(--c-brand); clip-path: polygon(0 0, 100% 0, 0 100%); pointer-events: none; }
.svc-promise .statement__win > img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); }
.statement.svc-promise > .stop { inset: var(--space-2) var(--space-2) auto auto; }
.svc-promise .rise--promise { z-index: 4; }

/* ---- groups: four of Mesa Ridge Auto's moments stacking as the visitor scrolls; each card a photo with a rising top
   edge, the group's name on a green tab, its services on a white sticker over the photo's clear side ---- */
.svc-groups { padding-bottom: calc(var(--section-y) * .7); }
.svc-groups__head { margin-bottom: var(--space-4); }
.svc-groups__stack { position: relative; }
.svc-groups__stop { position: absolute; z-index: 7; top: calc(-44px - var(--space-2)); right: 0; }
.svc-stack { --stack-top: 108px; --stack-h: clamp(540px, 74vh, 680px); --stack-gap: 10vh; --edge: clamp(28px, 3.6vw, 52px); }
.svc-stack .stack-cards__inner { display: block; padding: 0; border-radius: var(--radius-l); background: var(--c-brand-dark); box-shadow: none; clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); }
.svc-stack .stack-cards__media { position: absolute; inset: 0; border-radius: 0; background: var(--c-brand-dark); }
.svc-stack .stack-cards__media > img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-position: var(--pos, 50% 50%); }
.svc-stack .stack-cards__text { display: contents; }
.svc-tab { position: absolute; z-index: 2; top: calc(var(--edge) + var(--space-2)); left: clamp(16px, 2.6cqi, 36px); display: flex; align-items: center; gap: .7rem; max-width: calc(100% - 2 * clamp(16px, 2.6cqi, 36px)); padding: .55rem 1.15rem .55rem .55rem; border-radius: var(--radius-m); background: var(--c-brand); color: var(--c-on-brand); box-shadow: var(--shadow-m); }
.svc-tab__mark { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--c-on-brand); }
.svc-tab__mark svg { width: 62%; height: 62%; fill: var(--c-brand); }
.svc-tab__num { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-h2); line-height: 1; }
.svc-stack .svc-tab__name { margin: 0; padding: 0 0 0 .7rem; max-width: none; border-left: 2px solid var(--c-on-brand); font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-h3); line-height: 1.1; letter-spacing: -.01em; color: var(--c-on-brand); }
.svc-pts { position: absolute; z-index: 2; bottom: clamp(16px, 2.6cqi, 36px); left: clamp(16px, 2.6cqi, 36px); box-sizing: border-box; width: min(480px, 44%); padding: var(--space-3); border-radius: var(--radius-l); background: var(--c-on-brand); color: var(--c-ink); box-shadow: var(--shadow-l); }
.svc-card--r .svc-pts { left: auto; right: clamp(16px, 2.6cqi, 36px); }
.svc-pts__list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.svc-pts__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start; font-size: calc(var(--fs-body) * .94); line-height: 1.4; color: var(--c-ink-soft); }
.svc-pts__list b { color: var(--c-ink); font-weight: 700; }
.tick.svc-pts__tick { width: 1.75rem; height: 1.75rem; margin-top: -.1rem; opacity: var(--kit-in, 1); }
/* a tick lands once when its point's time comes and stays; as the loop starts again it is simply gone, never taken back (step 13) */
.svc-pts [data-kit-on] .svc-pts__tick { opacity: 1; animation: svc-tick-land .5s var(--ease-out) both; }
@keyframes svc-tick-land { from { opacity: 0; transform: scale(.4) rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .svc-pts [data-kit-on] .svc-pts__tick { animation: none; } }
@media (max-width: 760px) { .svc-stack { --stack-top: 88px; } }
@container (width < 760px) {
  .svc-stack { --edge: 26px; }
  .svc-stack .stack-cards__inner { display: flex; flex-direction: column; padding: 0; gap: 0; border-radius: var(--radius-l); background: var(--c-on-brand); }
  .svc-stack .stack-cards__media { position: relative; inset: auto; flex: none; height: clamp(400px, 64cqi, 480px); border-radius: 0; }
  .svc-stack .stack-cards__media > img { object-position: var(--pos-m, var(--pos, 50% 50%)); }
  .svc-tab { top: calc(var(--edge) + .5rem); left: .75rem; gap: .5rem; padding: .4rem .8rem .4rem .4rem; }
  .svc-tab__mark { width: 2rem; height: 2rem; }
  .svc-stack .svc-tab__name, .svc-tab__num { font-size: 1.15rem; }
  .svc-stack .svc-tab__name { padding-left: .5rem; }
  /* the services' sticker keeps most of itself on its photo: it overlaps the photo's lower part */
  .svc-pts, .svc-card--r .svc-pts { position: relative; inset: auto; width: auto; margin: -180px .75rem .75rem; padding: var(--space-3) var(--space-2); border-radius: var(--radius-m); box-shadow: var(--shadow-l); }
  .svc-pts__list { gap: .75rem; }
  .svc-pts__list li { font-size: var(--fs-small); }
}

/* ---- path: the tick-path scene on the green ground, the rising edge above and below ---- */
.svc-path { --rise-h: clamp(56px, 9vw, 136px); position: relative; padding: calc(var(--rise-h) + var(--space-3)) 0 calc(var(--rise-h) + var(--space-5)); background: var(--c-brand); color: var(--c-on-brand); overflow: hidden; }
.svc-path__head { max-width: 50rem; margin-bottom: var(--space-4); }
.svc-path__title { color: var(--c-on-brand); }
.svc-path__line { margin-top: var(--space-2); max-width: 36em; font-size: calc(var(--fs-body) * 1.06); }
.svc-path__stage { position: relative; }
.scene.svc-path__scene { display: block; width: 100%; --tp-card: var(--c-on-brand); }
.svc-path__stop { position: absolute; z-index: 3; top: calc(-44px - var(--space-1)); right: 0; }

/* ---- mix: the plan's budget in shares on a white card, over the owner going over it at his desk ---- */
.svc-mix__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-5); align-items: center; }
.svc-mix__frame { --edge: clamp(28px, 3.6vw, 52px); position: relative; min-height: 620px; border-radius: var(--radius-l); overflow: hidden; background: var(--c-paper-alt); clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); }
.svc-mix__photo { position: absolute; inset: 0; overflow: hidden; }
.svc-mix__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 85% 40%; }
.scene.svc-mix__scene { position: absolute; z-index: 2; top: calc(var(--edge) + var(--space-2)); bottom: var(--space-3); left: var(--space-3); width: min(560px, 68%); display: grid; align-items: center; --cs-card: var(--c-on-brand); }
.svc-mix__stop { position: absolute; z-index: 3; top: calc(var(--edge) * .5 + var(--space-1)); right: var(--space-2); }

/* ---- close: the customer with her keys, the shop's after-job follow-up pressed on beside her ---- */
.svc-close .close__media { left: 40%; }
.svc-close__img { --pos: 100% 40%; --z0: 1.02; --z1: 1.07; --origin: 72% 40%; --dx: -.8%; --dy: 0%; }
.svc-after { position: absolute; z-index: 2; top: clamp(72px, 7vw, 104px); right: max(var(--space-3), calc((100vw - var(--max-w)) / 2)); width: min(300px, 28vw); }
.svc-after__card { padding: var(--space-2) var(--space-3) var(--space-3); border-radius: var(--radius-l); background: var(--c-on-brand); color: var(--c-ink); box-shadow: var(--shadow-l); transform: rotate(-1deg); }
.svc-after__name { margin: 0 0 .6rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: var(--fw-h3); }
.svc-after__list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.svc-after__list li { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-small); font-weight: 600; line-height: 1.3; opacity: var(--kit-in, 1); }
.svc-after__list li[data-kit-on] { opacity: 1; animation: svc-after-land .5s var(--ease-out) both; }
@keyframes svc-after-land { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .svc-after__list li[data-kit-on] { animation: none; } }
.tick.svc-after__tick { width: 1.6rem; height: 1.6rem; }

/* ---- the phone and narrow screens ---- */
@media (max-width: 1100px) {
  .svc-hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; background: var(--c-paper); }
  .svc-hero__words { order: 1; width: auto; padding: var(--space-4) var(--gutter) var(--space-4); }
  .svc-hero__words::before { display: none; }
  .svc-hero__words::after { clip-path: none; }
  .svc-hero__title { font-size: clamp(2rem, 7.4vw, 3.4rem); }
  .svc-hero__stage { order: 2; position: relative; inset: auto; padding: 0 0 calc(var(--rise-h) + var(--space-2)); }
  .svc-hero__media { position: relative; inset: auto; height: clamp(300px, 46vw, 440px); }
  .svc-hero__img { inset: auto; top: 0; left: 50%; width: max(700px, 150%); height: auto; translate: -64.5% -23%; --z0: 1; --z1: 1.05; --origin: 64% 50%; }
  .svc-hero .rise--top { display: block; height: clamp(40px, 8vw, 72px); z-index: 2; }
  .scene.svc-hero__scene { position: relative; top: auto; right: auto; width: auto; max-width: 540px; margin: calc(-1 * clamp(96px, 16vw, 140px)) auto 0; padding-inline: calc(var(--gutter) - 16px); }
  .svc-hero__stop { top: calc(clamp(40px, 8vw, 72px) + .5rem); left: auto; right: var(--gutter); }
  .svc-mix__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
}
/* phones: the photo taller, the search scene overlapping its lower half, so most of the card stands on the photo */
@media (max-width: 760px) {
  .svc-hero__media { height: 590px; }
  .svc-hero__img { width: max(900px, 150%); }
  .scene.svc-hero__scene { margin-top: -330px; }
}
@media (max-width: 860px) {
  .svc-close .close__media { left: auto; height: min(110vw, 560px); max-height: none; }
  .svc-close__img { --pos-m: 72% 40%; }
  .svc-after { top: var(--space-2); right: auto; left: var(--gutter); width: min(250px, 62vw); }
  .svc-after__card { padding: .8rem 1rem 1rem; }
}
@media (max-width: 760px) {
  .statement.svc-promise { min-height: 0; padding-bottom: calc(clamp(56px, 9vw, 136px) + var(--space-4)); }
  .svc-promise .statement__text { width: auto; font-size: min(calc(var(--fs-display) * 1.1), 11cqi); }
  .svc-promise .statement__a, .svc-promise .statement__b { width: fit-content; }
  .svc-promise .statement__win { position: relative; display: block; top: auto; bottom: auto; right: auto; width: 100%; height: clamp(260px, 80vw, 380px); margin-top: var(--space-4); }
  /* the photo shows the owner above, his desk under the plan's card, so most of the card stands on the photo */
  .svc-mix__frame { min-height: 0; display: block; padding-top: 270px; overflow: visible; clip-path: none; border-radius: 0; background: transparent; }
  .svc-mix__photo { inset: 0 0 auto 0; height: 560px; border-radius: var(--radius-l); clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); }
  .svc-mix__img { inset: auto; bottom: 0; left: 50%; width: auto; height: 125%; translate: -76% 0; object-fit: fill; }
  .scene.svc-mix__scene { position: relative; inset: auto; width: auto; }
  .svc-mix__stop { top: calc(var(--edge) * .5 + var(--space-1)); }
}
