@import url("../arsenal/statement.css");
@import url("../arsenal/stack-cards.css");

/* services.css: the Services page's own placing and sizing (plan.md, Services), with the tokens of system.css only. */

/* ---------- hero: the words on paper, a tall frame on the right: a real photo whose phone lights up ---------- */
.sv-hero { padding: clamp(36px, 4.6vw, 64px) 0 clamp(52px, 6vw, 84px); }
.sv-hero__in { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 12fr); gap: clamp(56px, 6vw, 96px); align-items: center; }
.sv-hero__title { font-size: var(--fs-h1); line-height: 1.06; text-wrap: balance; }
.sv-hero__line { margin-top: 22px; max-width: 30em; font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); color: var(--c-ink-soft); }
.sv-hero__go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; }
.sv-hero__go p { font-size: var(--fs-small); color: var(--c-ink-soft); }
.sv-hero__frame { position: relative; margin: 0; }
.sv-hero__box { position: relative; aspect-ratio: 31 / 35; }
.sv-hero__pic { position: absolute; inset: 0; margin: 0; border-radius: var(--radius-m); background: var(--c-paper-alt); box-shadow: 0 0 0 1px var(--c-line); }
/* the photo drawn larger than its frame: the phone stands high on the right, the card below it on the left */
.sv-hero__pic > img { position: absolute; left: -26%; top: -15%; width: 203%; height: 120%; max-width: none; }
.sv-hero__stop { position: absolute; top: 14px; left: 14px; z-index: 3; }
.sv-hero__box .sv-hero__scene { position: absolute; left: -44px; bottom: -34px; z-index: 2; width: min(470px, 78%); padding-bottom: 74px; }
.sv-hero__box .sv-hero__scene .sd-pop { bottom: -53px; } /* under the third result, its lines whole; it hangs past the photo, as the card does, in the scene's box */
.sv-hero__cap { display: block; margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--c-ink); font: italic 500 1.0625rem/1.3 var(--font-display); color: var(--c-ink-soft); }
/* the lit phone: its screen is drawn at 300 x 645 and laid over the photo's glass */
.sv-hero .screen { border-radius: 30px; box-shadow: 0 0 0 3px var(--c-ink-deep); }
.sv-lock { position: relative; display: flex; flex-direction: column; gap: 12px; width: 100%; height: 100%; padding: 58px 16px 18px; background: var(--c-ink); color: var(--c-on-ink); font-family: var(--font-ui); }
.sv-lock__notch { position: absolute; left: 50%; top: 0; width: 150px; height: 24px; transform: translateX(-50%); border-radius: 0 0 16px 16px; background: var(--c-ink-deep); }
.sv-lock__time { display: grid; justify-items: center; gap: 2px; padding-bottom: 12px; }
.sv-lock__time b { font: 500 74px/1 var(--font-display); letter-spacing: var(--track-display); }
.sv-lock__time span { font-size: 21px; font-weight: 600; opacity: .85; }
.sv-lock__note { display: grid; gap: 2px; padding: 13px 15px; border-radius: 16px; background: var(--c-card); color: var(--c-ink); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 16px)); }
.sv-lock__note b { font-size: 24px; line-height: 1.15; }
.sv-lock__note span { font-size: 22px; line-height: 1.2; color: var(--c-ink-soft); }
@media (max-width: 1100px) { .sv-hero__box .sv-hero__scene { left: -20px; } }
@media (max-width: 860px) {
  .sv-hero__in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sv-hero__box { aspect-ratio: auto; height: 660px; }
  .sv-hero__pic { bottom: 46px; } /* the frame ends where the photo ends */
  .sv-hero__pic > img { left: -46%; top: -46px; width: 215%; height: 660px; object-fit: cover; }
  .sv-hero__box .sv-hero__scene { left: 0; right: 0; bottom: -34px; width: 100%; }
}

/* ---------- promise: the sentence as a banner headline on the brand's blue, between two double rules ---------- */
.sv-promise { padding-block: clamp(84px, 10vw, 148px); }
.sv-promise::before, .sv-promise::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; border-top: 1px solid rgba(255, 255, 255, .72); border-bottom: 2px solid rgba(255, 255, 255, .72); }
.sv-promise::before { top: 22px; }
.sv-promise::after { bottom: 22px; }
.sv-promise .statement__text { font-weight: 560; letter-spacing: -.024em; line-height: 1.06; text-align: center; }
.sv-promise[data-tone="brand"] .statement__a, .sv-promise[data-tone="brand"] .statement__b, .sv-promise[data-tone="brand"] .statement__rotate { text-decoration-color: var(--c-sky); font-style: italic; }
/* the window in the mark: larger than its line, each picture drawn larger than the window, its subject in the middle */
.sv-promise[data-window="mark"] .statement__win { width: 1.34em; height: 1.34em; vertical-align: -.33em; margin: -.26em -.08em -.16em -.14em; }
.sv-promise .statement__win > img { inset: auto; max-width: none; object-fit: fill; }
.sv-promise .statement__win > img:nth-child(1) { left: -110.6%; top: -48%; width: 267%; height: 178%; }
.sv-promise .statement__win > img:nth-child(2) { left: -49%; top: 6%; width: 225%; height: 150%; }
.sv-promise .statement__win > img:nth-child(3) { left: -114.6%; top: -3.8%; width: 229%; height: 129%; }
.sv-promise .statement__win > img:nth-child(4) { left: -45%; top: 0; width: 160%; height: 120%; }
.sv-promise > .stop { inset: auto var(--gutter) 40px auto; }

/* ---------- groups: each card a page of this site's paper: the double rule, its words, a folio at its foot ---------- */
.sv-groups { padding-bottom: clamp(48px, 5vw, 72px); }
.sv-stack {
  --stack-top: calc(var(--masthead-h) + 76px);
  --stack-peek: 14px;
  --stack-h: clamp(590px, calc(100vh - var(--stack-top) - 62px), 700px);
  --stack-gap: 9vh;
  --sk-surface: var(--c-card);
  --sk-face: var(--c-card);
}
.sv-stack .stack-cards__card { scroll-margin-top: calc(var(--stack-top) + var(--i, 0) * var(--stack-peek)); }
.sv-stack .stack-cards__index { background: var(--c-card); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: var(--radius-m); }
.sv-stack .stack-cards__index-mark { border-radius: var(--radius-s); }
.sv-stack .stack-cards__inner { padding: 44px clamp(24px, 3cqi, 36px) clamp(20px, 2.4cqi, 28px); border-radius: var(--radius-m); gap: clamp(24px, 3.2cqi, 44px); }
.sv-stack .stack-cards__inner::before { content: ""; position: absolute; left: clamp(24px, 3cqi, 36px); right: clamp(24px, 3cqi, 36px); top: 22px; height: 6px; border-top: 1px solid var(--c-ink); border-bottom: 2px solid var(--c-ink); }
.sv-stack .stack-cards__title { margin: 0; padding-top: 2px; max-width: none; font: var(--fw-display) clamp(1.9rem, 2.9cqi, 2.45rem)/1.08 var(--font-display); letter-spacing: var(--track-display); }
.sv-stack .stack-cards__body { margin-top: 10px; font-size: 1.0313rem; line-height: 1.45; }
.sv-stack .stack-cards__points { margin-top: 16px; padding-top: 14px; gap: 9px; }
.sv-stack .stack-cards__points li { grid-template-columns: 14px minmax(0, 1fr); gap: 10px; font-size: .9844rem; line-height: 1.4; }
.sv-stack .stack-cards__points svg { margin-top: 5px; fill: var(--c-brand); fill-rule: evenodd; }
.sv-folio { margin-top: auto; padding-top: 12px; font: italic 500 1.125rem/1.2 var(--font-display); color: var(--c-ink-soft); }

/* each page's picture, with its scene as a solid paper card */
.sv-media { border-radius: var(--radius-s); }
.sv-media__pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sv-media__pic--found { object-position: 79% 50%; }
.sv-media__pic--ads { object-position: 15% 50%; }
.sv-media__pic--trust { object-position: 46% 30%; }
.sv-media__pic--leads { object-position: 83% 50%; }
.sv-media__stop { position: absolute; top: 12px; left: 12px; z-index: 3; }
.sv-media .sv-scene { position: absolute; inset: 0; z-index: 2; }
.sv-media .sv-scene--right { left: auto; width: min(392px, 62%); }
.sv-media .sv-scene--left { right: auto; width: min(420px, 66%); }

/* on the phone: the picture on top, the scene rising over its foot */
@container (width < 760px) {
  .sv-stack .stack-cards__inner { padding: 30px 14px 16px; }
  .sv-stack .stack-cards__inner::before { left: 14px; right: 14px; top: 14px; }
  .sv-stack .stack-cards__title { font-size: clamp(1.75rem, 7.4cqi, 2rem); padding-top: 12px; }
  .sv-media { height: auto; overflow: visible; background: none; padding-top: 196px; }
  /* the picture runs behind more than half of its card, its faces clear above the card */
  .sv-media > .sv-media__pic { height: 452px; bottom: auto; border-radius: var(--radius-s); }
  .sv-media > .sv-media__pic--ads { height: 426px; object-position: 70% 50%; }
  .sv-media > .sv-media__pic--found { object-position: 54% 50%; }
  .sv-media .sv-scene, .sv-media .sv-scene--right, .sv-media .sv-scene--left { position: relative; inset: auto; width: 100%; }
  .sv-media--found .sv-scene { height: 490px; }
  .sv-media--ads .sv-scene { height: 440px; }
  .sv-media--trust { padding-top: 0; height: 400px; }
  .sv-media--trust > .sv-media__pic { height: 100%; }
  .sv-media--trust .sv-scene { position: absolute; inset: 0; width: auto; }
  .sv-media--leads { padding-top: 0; height: 430px; }
  .sv-media--leads > .sv-media__pic { height: 100%; }
  .sv-media--leads .sv-scene { position: absolute; inset: 0; width: auto; }
}

/* ---------- path: the signature, the front page on the designed ground ---------- */
.sv-path__scene { position: relative; display: block; width: 100%; }

/* ---------- week: the same Tuesday, full bleed ---------- */
.sv-week { position: relative; padding-top: var(--section-y); }
.sv-cmp { aspect-ratio: auto; height: clamp(520px, 50vw, 760px); border-radius: 0; box-shadow: none; }
/* the before picture mirrored, so the owner stands left of the line; the after picture drawn larger, the family right of it */
.sv-cmp__before { transform: scaleX(-1); object-position: 50% 30%; }
.sv-cmp__after { inset: 0 -8% 0 auto; width: 128%; height: 128%; top: -22%; left: -6%; object-position: 50% 60%; }
.sv-cmp .cmp__before .cmp__cards { left: 3%; top: auto; bottom: 26px; width: min(25%, 300px); transform: none; }
.sv-cmp .cmp__after .cmp__cards { right: 3%; top: 76px; width: min(25%, 300px); transform: none; }
.sv-cmp .cmp__card b { font: 600 1.1875rem/1.15 var(--font-display); }
.sv-cmp .cmp__card > span { font-size: .9375rem; color: var(--c-ink); }
.sv-cmp__stop { position: absolute; left: 18px; top: 60px; z-index: 5; }
@media (max-width: 760px) {
  .sv-cmp { height: auto; aspect-ratio: 3 / 4; }
  .sv-cmp__before { object-position: 66% 30%; }
  .sv-cmp__after { top: -8%; left: -4%; width: 120%; height: 120%; object-position: 54% 60%; }
  .sv-cmp .cmp__tag { top: 12px; padding: 6px 9px; font-size: .8125rem; max-width: 41%; }
  .sv-cmp .cmp__before .cmp__tag { left: 10px; }
  .sv-cmp .cmp__after .cmp__tag { right: 10px; }
  .sv-cmp__stop { left: 10px; top: 50px; }
  .sv-cmp .cmp__before .cmp__cards { left: 8px; bottom: 10px; width: calc(50% - 34px); gap: 6px; }
  .sv-cmp .cmp__after .cmp__cards { right: 8px; top: 62px; width: calc(50% - 34px); gap: 6px; }
  .sv-cmp .cmp__card { padding: 7px 8px; }
  /* the knob and its hint on the line, between the cards of the two sides */
  .sv-cmp .cmp__knob { top: 55%; width: 44px; height: 44px; }
  .sv-cmp .cmp__hint { top: calc(55% - 44px); }
  .sv-cmp .cmp__card b { font-size: 1rem; }
  .sv-cmp .cmp__card > span { font-size: .8125rem; }
}

/* ---------- mix: the photo with the shares over it, the words beside it ---------- */
.sv-mix__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.sv-mix__frame { position: relative; margin: 0; height: clamp(540px, 46vw, 620px); border-radius: var(--radius-m); overflow: hidden; background: var(--c-paper-alt); }
.sv-mix__pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 92% 50%; }
.sv-mix__stop { position: absolute; top: 14px; left: 14px; z-index: 3; }
.sv-mix__scene { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; display: grid; align-items: center; width: min(460px, 58%); padding: 14px; }
@media (max-width: 860px) {
  .sv-mix__in { grid-template-columns: minmax(0, 1fr); }
  .sv-mix__frame { height: auto; overflow: visible; background: none; padding-top: 226px; }
  .sv-mix__pic { height: 420px; bottom: auto; border-radius: var(--radius-m); object-position: 40% 50%; }
  .sv-mix__scene { position: relative; width: 100%; padding: 0 8px; }
}

/* ---------- close: the shade only behind the words ---------- */
/* the words and the button stacked on the left, so the crew stays whole on the right */
.sv-close { min-height: 640px; }
.sv-close .closing__video { object-position: 50% 14%; }
.sv-close .closing__shade { background: linear-gradient(90deg, rgba(13, 15, 38, .84) 0%, rgba(13, 15, 38, .62) 38%, rgba(13, 15, 38, 0) 62%); }
.sv-close .closing__in { grid-template-columns: minmax(0, 560px); }
.sv-close .closing__go { max-width: 440px; }
@media (max-width: 760px) {
  .sv-close { padding-top: 250px; }
  .sv-close .closing__video { object-position: 92% 50%; }
  .sv-close .closing__shade { background: linear-gradient(180deg, rgba(13, 15, 38, 0) 0%, rgba(13, 15, 38, 0) 26%, rgba(13, 15, 38, .84) 44%, rgba(13, 15, 38, .9) 100%); }
  .sv-close .closing__stop { top: 14px; left: 14px; right: auto; }
}
