@import url("../arsenal/stack-cards.css");
/* Services (plan.md, Services). Tokens only (design\system.css). The stack-cards composition is restyled here, after
   its import: the site's white cards, the photo bleeding to the card's left with its scene in glass on its quiet side,
   a narrow panel for the words, and an index of rounded squares that fill as the cards arrive. */

/* ---------- #hero: the phone on the oak table (mirrored), the words on a paper wash, the inbox in glass ---------- */
.svc-hero { position: relative; }
.svc-hero__content { display: grid; gap: clamp(14px, 1.6vw, 22px); padding: clamp(28px, 7vw, 56px) var(--gutter) clamp(24px, 5vw, 40px); max-width: 46rem; }
.svc-hero__title { font-size: clamp(2.375rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: var(--track-display); font-weight: var(--w-display); text-wrap: balance; }
.svc-hero__lead { max-width: 34rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--c-ink-soft); }
.svc-hero__cta { display: grid; justify-items: start; gap: 12px; margin-top: 4px; }
.svc-hero__frame { height: 700px; 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: 55% 50%; transform: scaleX(-1); }
.svc-hero__wash { display: none; }
.scene.svc-hero__scene { position: absolute; z-index: 2; left: 50%; top: 50%; width: min(400px, calc(100% - 24px)); height: 640px; translate: -50% -50%; }
@media (min-width: 1100px) {
  .svc-hero { display: grid; }
  .svc-hero > * { grid-area: 1 / 1; }
  .svc-hero__frame { height: clamp(660px, calc(100svh - 72px - var(--frame)), 900px); }
  /* drawn 125% large from its left edge and mirrored: the phone sits right of center, the left third stays oak */
  .svc-hero__img { inset: auto; left: 0; top: -12.5%; width: 125%; height: 125%; object-position: 50% 50%; }
  .svc-hero__wash { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-paper) 80%, transparent) 0%, color-mix(in srgb, var(--c-paper) 56%, transparent) 26%, transparent 46%); }
  .svc-hero__content { position: relative; z-index: 3; align-self: start; margin: clamp(72px, 13svh, 128px) 0 0 calc(var(--frame) + clamp(40px, 4.6vw, 76px)); padding: 0; max-width: min(36rem, 40vw); }
  .svc-hero__title { font-size: min(4.25rem, calc((100vw - 480px) / 13)); }
  .svc-hero__lead { max-width: min(30rem, 34vw); }
  .scene.svc-hero__scene { left: auto; right: clamp(28px, 3.4vw, 56px); width: 400px; translate: 0 -50%; }
}

/* ---------- #groups: the stack ---------- */
.svc-stack {
  --stack-top: 144px;
  --stack-peek: 14px;
  --stack-gap: 10vh;
  --stack-h: clamp(620px, calc(100svh - 214px), 720px);   /* the last card's top is 200 px down: it must fit under it (stack-cards.js) */
  --sk-surface: var(--c-white);
  --sk-face: var(--c-white);
  --sk-brand: var(--c-brand-text);
}
.svc-stack .stack-cards__index { --stack-index-h: 46px; gap: 12px; padding: 0 16px 0 8px; background: color-mix(in srgb, var(--c-white) 90%, transparent); }
.svc-stack .stack-cards__index-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-sunrise); }
.svc-stack .stack-cards__index-mark svg { width: 14px; height: 14px; fill: var(--c-white); }
.svc-stack .stack-cards__index-bars { gap: 7px; padding-left: 2px; }
/* each card a rounded square that fills (rose to amber) as its card arrives; the one in view ringed */
.svc-stack .stack-cards__index-bars i { width: 14px; height: 14px; border-radius: 4.5px; overflow: visible; background: color-mix(in srgb, var(--c-ink) 9%, transparent); }
.svc-stack .stack-cards__index-bars i::after { border-radius: inherit; background: var(--grad-sunrise); transform-origin: 50% 50%; transform: scale(var(--fill, 0)); }
.svc-stack .stack-cards__index-bars i::before { content: ""; position: absolute; inset: -4px; border-radius: 7px; border: 1.5px solid var(--c-brand); opacity: var(--on, 0); }

/* a covered card keeps its size (the piece scales it down, which shrank its scene's words under 13 px); its shade
   still says it lies under the next */
.svc-stack .stack-cards__inner { gap: 0; padding: 0; border-radius: var(--radius-xl); background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line), var(--shadow-l); transform: none !important; }
.svc-card__count { margin: 0 0 auto; font-size: 0.8125rem; color: var(--c-ink-soft); }
.svc-card__count b { color: var(--c-brand-text); font-weight: var(--w-strong); }
.svc-stack .stack-cards__title { margin: 0; padding-top: 18px; max-width: 20ch; font: var(--w-head) clamp(1.5rem, 1.2rem + 0.6vw, 1.75rem)/1.14 var(--font-display); letter-spacing: var(--track-head); }
.svc-stack .stack-cards__body { margin: 12px 0 0; font-size: 1rem; line-height: 1.5; }
.svc-stack .stack-cards__points { margin-top: 20px; padding-top: 18px; gap: 11px; }
.svc-stack .stack-cards__points li { grid-template-columns: 14px minmax(0, 1fr); gap: 11px; font-size: 0.9375rem; line-height: 1.45; }
.svc-stack .stack-cards__points svg { width: 13px; height: 13px; margin-top: 4px; fill: var(--svc-tint, var(--c-brand)); }
/* --pos keeps each photo's people clear of its scene on the computer; narrower, the photo keeps its own shape (--ratio)
   and at least --mh of height, its scene standing more than half on its foot, under the face (--mpos frames it) */
.svc-card--found { --svc-tint: var(--c-brand); --pos: 37.5% 50%; --mpos: 66% 50%; --ratio: 1.5; --mh: 480px; --scene-h: 560px; }
.svc-card--clicked { --svc-tint: color-mix(in srgb, var(--c-brand) 42%, var(--c-accent)); --pos: 0% 50%; --mpos: 52% 50%; --ratio: 1.79; --mh: 520px; --scene-h: 480px; --scene-w: 464px; }
.svc-card--picked { --svc-tint: color-mix(in srgb, var(--c-brand) 55%, var(--c-brand-light)); --pos: 47% 50%; --mpos: 60% 50%; --ratio: 1.79; --mh: 700px; --scene-h: 640px; }
.svc-card--answered { --svc-tint: var(--c-accent); --pos: 79% 50%; --mpos: 80% 50%; --ratio: 1.78; --mh: 470px; --scene-h: 660px; }
.svc-card--counted { --svc-tint: var(--c-ink); --pos: 61% 50%; --mpos: 30% 50%; --ratio: 1.79; --mh: 800px; --scene-h: 640px; --scene-w: 490px; }
.svc-stack .stack-cards__media { background: var(--c-paper-alt); }
.svc-stack .stack-cards__media > img { object-position: var(--pos, 50% 50%); }
.scene.svc-scene { position: absolute; z-index: 2; top: 50%; left: 22px; width: var(--scene-w, 380px); height: var(--scene-h, 600px); translate: 0 -50%; }
.svc-card__media[data-side="r"] .scene.svc-scene { left: auto; right: 22px; }
/* each card's own stop, on its photo (it holds that card's scene: data-stop-for) */
.svc-card__stop { position: absolute; z-index: 3; top: 16px; right: 16px; }
/* the home page's links land on their card: #found, #trust, #leads (its outcome tiles), clear of the sticky header */
.svc-card__anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-margin-top: 96px; }

/* the computer: the photo bleeds to the card's left, top and bottom; the words in a panel at its right */
@container (width >= 1180px) {
  .svc-stack .stack-cards__inner { grid-template-columns: minmax(0, 68fr) minmax(0, 32fr); }
  .svc-stack .stack-cards__media { order: -1; border-radius: 0; }
  .svc-card__media[data-side="r"] .svc-card__stop { right: auto; left: 16px; }
  .svc-stack .stack-cards__text { padding: 30px 36px 34px; }
}
/* narrower: one column (the photo in its own shape, its scene standing more than half on its foot, under the face,
   then the words); the stack lies flat */
@container (width < 1180px) {
  .svc-stack .stack-cards__card { height: auto; min-height: 0; }
  .svc-stack .stack-cards__inner { display: flex; flex-direction: column; gap: 0; padding: 0 0 28px; border-radius: var(--radius-l); }
  .svc-stack .stack-cards__media { order: -1; position: relative; height: max(var(--mh, 480px), calc(100cqi / var(--ratio, 1.5))); margin-bottom: calc(var(--scene-h, 600px) * 0.46 + 4px); overflow: visible; border-radius: var(--radius-l) var(--radius-l) 0 0; background: none; }
  .svc-stack .stack-cards__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-position: var(--mpos, 50% 50%); border-radius: inherit; }
  .scene.svc-scene, .svc-card__media[data-side="r"] .scene.svc-scene { left: 50%; right: auto; top: calc(100% - var(--scene-h, 600px) * 0.54); translate: -50% 0; width: min(var(--scene-w, 420px), calc(100% - 24px)); }
  .svc-card__stop { right: 12px; top: calc(100% - var(--scene-h, 600px) * 0.54 - 46px); }
  .svc-stack .stack-cards__text { padding: 22px clamp(18px, 4cqi, 36px) 0; }
  .svc-card__count { margin-bottom: 0; }
  .svc-stack .stack-cards__title { max-width: 24ch; }
}
@container (width < 420px) { .svc-stack .stack-cards__body { display: block; } }

/* ---------- #week: the designed ground (the paper, a faint grid of rounded-square slots, the sunrise light in one corner) ---------- */
.svc-week { overflow: hidden; overflow: clip; isolation: isolate; background: radial-gradient(60% 70% at 100% 0%, color-mix(in srgb, var(--c-brand) 13%, transparent), transparent 70%), radial-gradient(40% 50% at 96% 6%, color-mix(in srgb, var(--c-accent) 16%, transparent), transparent 70%), var(--c-paper); }
.svc-week::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: color-mix(in srgb, var(--c-ink) 7%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Crect x='8.5' y='8.5' width='39' height='39' rx='10' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 56px 56px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Crect x='8.5' y='8.5' width='39' height='39' rx='10' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 56px 56px repeat; }
.svc-week__grid { display: grid; }
.svc-week__stage { position: relative; width: 100%; }
.scene.svc-week__scene { display: block; width: 100%; height: 470px; }
.svc-week__stop { position: absolute; top: -50px; right: 0; }
@media (min-width: 880px) { .scene.svc-week__scene { height: auto; aspect-ratio: 880 / 540; } }
@media (min-width: 1100px) {
  .svc-week__grid { grid-template-columns: minmax(0, 1fr); }
  .svc-week__head { max-width: 44rem; }
  .svc-week__stage { max-width: 1040px; margin-left: auto; }
}

/* ---------- #mix: the dentist's photo, the plan's mix in glass over its lower right corner ---------- */
.svc-mix__stage { position: relative; display: grid; }
.svc-mix__photo { aspect-ratio: 3 / 2; }
.svc-mix__photo > img { object-position: 100% 30%; }
.scene.svc-mix__scene { position: relative; z-index: 2; width: min(420px, calc(100% - 24px)); height: 600px; margin: -64px auto 0; }
/* the phone: the stop just above the scene's corner, so the two fit in one view */
.svc-mix .part-stop { top: auto; bottom: 610px; right: 14px; }
@media (min-width: 1100px) {
  .svc-mix__stage { min-height: 780px; }
  .svc-mix__photo { position: absolute; left: 0; top: 0; width: 66%; height: 600px; aspect-ratio: auto; }
  .scene.svc-mix__scene { position: absolute; right: 0; bottom: 0; width: 660px; height: 480px; margin: 0; }
  .svc-mix .part-stop { top: 14px; bottom: auto; right: calc(34% + 14px); }
}

/* ---------- #faq ---------- */
@media (min-width: 960px) {
  .svc-faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-6); align-items: start; }
  .svc-faq__grid .section-head { position: sticky; top: 112px; }
}

/* ---------- #close ---------- */
.svc-close .close-frame__media > video { object-position: 50% 40%; }
