@import url("../arsenal/motif-window.css");

/* The Services page (plan.md "Services"): chapters on footage, the radar's range bands as its unique element. */

/* hero: the phone on the counter, its glass lit by the site; the words on the sage plate, the new clients beside it */
.svh { --svh-h: clamp(640px, calc(100svh - 88px), 820px); position: relative; isolation: isolate; overflow: clip; display: grid; min-height: var(--svh-h); background: var(--c-ink); }
.svh__media { position: absolute; inset: 0; z-index: -1; }
.svh__photo { position: absolute; inset: 0; margin: 0; }
.svh__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.svh__in { box-sizing: content-box; width: calc(100% - 2 * var(--gutter)); display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 280px); column-gap: clamp(1.25rem, 2.2vw, 2rem); align-items: end; padding-block: clamp(2.5rem, 5vw, 4rem); }
.svh__plate { width: 100%; }
.svh__plate h1 { font-size: clamp(2.5rem, 1.6rem + 2.6vw, 4.25rem); line-height: .98; text-wrap: balance; }
.svh__demo { position: relative; align-self: start; margin-top: clamp(1rem, 4vw, 3.5rem); }
.svh__clients { width: 100%; }
.svh__tag { top: -14px; left: 14px; }
.svh__stop { top: -46px; right: 0; }
@media (max-width: 1360px) {
  .svh__in { grid-template-columns: minmax(0, 460px); row-gap: 1.75rem; align-items: start; align-content: center; }
  .svh__demo { width: min(100%, 320px); margin-top: 0; }
  .svh__stop { top: 0; right: -50px; }
}
@media (max-width: 760px) {
  .svh { display: block; min-height: 0; background: var(--c-ground); }
  .svh__media { position: relative; inset: auto; z-index: 0; height: 440px; }
  .svh__photo > img { --pos: 74% 50%; }
  /* the new clients land on the photo under the phone (more than half of them on it), then the words; their room is
     kept whole from the first client, so the headline never moves */
  .svh__in { position: relative; z-index: 1; margin-top: -150px; padding-block: 0 2.5rem; row-gap: 1.25rem; }
  .svh__demo { order: -1; width: 100%; }
  .svh__clients { min-height: 212px; }
  .svh__stop { top: -48px; left: 140px; right: auto; }
}

/* the phone's lit screen, drawn at 360 x 788 and laid on the photo's glass */
.lock { position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding: 70px 22px 0; background: radial-gradient(120% 62% at 50% 0%, color-mix(in srgb, var(--c-sage) 34%, var(--c-ink-deep)) 0%, var(--c-ink-deep) 72%); color: var(--c-on-ink); font-family: var(--font-ui); text-align: center; }
.lock__time { margin: 0; font: 700 112px/1 var(--font-display); letter-spacing: .01em; }
.lock__day { margin: 8px 0 0; font: 600 24px/1.2 var(--font-ui); opacity: .82; }
.lock__note { box-sizing: border-box; display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 16px; width: 100%; margin-top: 70px; padding: 18px; border-radius: 28px; background: color-mix(in srgb, var(--c-paper) 94%, transparent); color: var(--c-ink); text-align: left; box-shadow: 0 22px 44px -22px color-mix(in srgb, var(--c-ink-deep) 80%, transparent); }
.lock__app { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--c-sage); }
.lock__app::after { content: ""; position: absolute; inset: -7px; border: 4px solid var(--c-brand); border-radius: 24px; opacity: 0; }
.lock__mark { width: 38px; height: 38px; fill: var(--c-brand-text); }
.lock__txt b { display: block; font: 800 30px/1.1 var(--font-ui); }
.lock__sub { display: block; margin-top: 6px; font: 600 21px/1.25 var(--font-ui); color: var(--c-ink-soft); }
.lock__now { font-style: normal; }
/* on the phone the glass is drawn at about 0.3 of this drawing: its words grow so they read at 11 px or more */
@media (max-width: 760px) {
  .lock__day { font-size: 38px; }
  .lock__note { grid-template-columns: minmax(0, 1fr); padding: 22px 26px; }
  .lock__app, .lock__now { display: none; }
  .lock__txt b { font-size: 40px; }
  .lock__sub { font-size: 37px; }
}
@media (prefers-reduced-motion: no-preference) {
  .lock__note { animation: lock-in .62s var(--ease-out) .9s both; }
  .lock__app::after { animation: lock-ping .9s var(--ease-out) 1.45s both; }
}
@keyframes lock-in { from { opacity: 0; transform: translateY(-22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes lock-ping { 0% { opacity: .95; transform: scale(.82); } 100% { opacity: 0; transform: scale(1.45); } }

/* the chapters on footage (found, ads): the words in glass on one side, the demo in glass on the other, the face clear between */
.chap { position: relative; isolation: isolate; overflow: clip; background: var(--c-ink); }
.chap__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--c-ink); }
.chap__media > video, .chap__media > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.chap__in { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr) minmax(0, 440px); align-items: center; min-height: clamp(700px, 56vw, 840px); padding-block: clamp(3rem, 6vw, 5rem); }
.chap__text, .chap__demo { grid-row: 1; }
.chap--found .chap__text, .chap--ads .chap__demo { grid-column: 1; }
.chap--found .chap__demo, .chap--ads .chap__text { grid-column: 3; }
.chap__text { padding: clamp(1.5rem, 2.4vw, 2.1rem); }
.chap__text h2 { margin-bottom: .7rem; font-size: clamp(2rem, 1.35rem + 1.5vw, 2.85rem); line-height: 1; }
.chap__line { margin: 0 0 1.4rem; font-size: 1.0625rem; line-height: 1.5; color: var(--c-ink-soft); }
.chap__kicker { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font: 800 .8125rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand-text); }
.chap__kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 24%, transparent); }
.chap__demo { position: relative; }
.chap__scene { width: 100%; }
.chap__scene--map { min-height: 540px; }
.chap__scene--ads { min-height: 470px; }
.chap__tag { top: -14px; left: 16px; }
.chap__stop { top: 18px; right: 18px; }
.chap__dstop { top: -46px; right: 0; }
/* narrower: the footage as a block, its demo standing on its lower part beside the face (more than half of the demo on
   it, as on the computer: Tomer's rule for a card on its photo), the words under it */
@media (max-width: 1100px) {
  .chap { background: var(--c-sage); }
  .chap__media { position: relative; inset: auto; z-index: 0; aspect-ratio: var(--chap-ar); }
  .chap__in { position: relative; z-index: 1; grid-template-columns: minmax(0, 1fr); row-gap: 2rem; min-height: 0; margin-top: calc(-1 * var(--chap-lift)); padding-block: 0 var(--section-y); }
  .chap--found .chap__demo, .chap--ads .chap__demo { grid-column: 1; grid-row: 1; width: min(100%, 460px); justify-self: var(--chap-side); }
  .chap--found .chap__text, .chap--ads .chap__text { grid-column: 1; grid-row: 2; max-width: 640px; background: var(--c-paper); }
  .chap--found { --chap-ar: 16 / 10; --chap-lift: 300px; --chap-side: end; }
  .chap--ads { --chap-ar: 4 / 3; --chap-lift: 270px; --chap-side: start; }
}
@media (max-width: 900px) {
  .chap--found { --chap-ar: 4 / 3; }
  .chap--ads { --chap-ar: 1 / 1; }
}
@media (max-width: 760px) {
  .chap--found { --chap-ar: 3 / 4; --chap-lift: 280px; }
  .chap--found .chap__media > video { --pos: 33% 40%; }
  .chap--ads { --chap-ar: 3 / 5; --chap-lift: 260px; }
  .chap--found .chap__demo, .chap--ads .chap__demo { width: 100%; }
  .chap__scene--map { min-height: 500px; }
  .chap__scene--ads { min-height: 460px; }
  .chap__stop { top: 12px; right: 12px; }
}

/* break: the radar quadrant's window (arsenal motif-window), its stop icon below the site's header */
.svb__stop { top: 104px; right: 18px; }
@media (max-width: 760px) { .svb__stop { top: 84px; right: 12px; } }

/* trust: the framed photo, the one shape over its open side, the words beside */
.svt { background: var(--c-paper); }
.svt__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.svt__pic { position: relative; padding: 0 clamp(4rem, 9vw, 8.5rem) 3rem 0; }
.svt__frame { aspect-ratio: 3 / 2; }
.svt__demo { position: absolute; right: 0; bottom: 0; width: min(384px, 56%); }
.svt__scene { width: 100%; min-height: 330px; }
.svt__tag { top: auto; bottom: -14px; left: 14px; }
.svt__stop { top: 14px; left: 14px; }
.svt__text h2, .svl__text h2 { margin-bottom: .75rem; }
.svt__text .lede, .svl__text .lede { margin: 0 0 1.5rem; }
@media (max-width: 900px) {
  .svt__in { grid-template-columns: minmax(0, 1fr); }
  .svt__pic { padding: 0; }
  .svt__demo { position: relative; right: auto; bottom: auto; width: min(100%, 420px); margin: -3.5rem auto 0; }
  /* the island hangs from the photo's lower edge and grows down into the room kept for its tallest state (232px) */
  .svt__tag { top: -14px; bottom: auto; }
  .svt__scene { min-height: 280px; }
  .svt .svt__scene .is-pill { top: 20px; bottom: auto; }
}

/* leads: the words, then the framed photo with the call card over its open side */
.svl__in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.svl__pic { position: relative; padding-left: clamp(5rem, 11vw, 10rem); }
.svl__frame { aspect-ratio: 4 / 3; }
.svl__demo { position: absolute; left: 0; top: 50%; translate: 0 -50%; width: min(520px, 78%); }
.svl__scene { width: 100%; min-height: 560px; }
.svl__tag { top: -14px; left: 14px; }
.svl__stop { top: 14px; right: 14px; }
@media (max-width: 900px) {
  .svl__in { grid-template-columns: minmax(0, 1fr); }
  .svl__pic { padding: 0; }
  .svl__demo { position: relative; left: auto; top: auto; translate: none; width: 100%; margin-top: -3rem; }
  .svl__scene { min-height: 600px; }
}
/* on a phone the call card alone (the scene drops its week below 480px): it hangs from the photo and grows down */
.svl__demo { container-type: inline-size; }
@container (max-width: 480px) {
  .svl__scene { min-height: 440px; }
  .svl .svl__scene .cb-call { top: 18px; bottom: auto; }
}

/* mix: the radar's range bands on the designed ground */
.svm__head { max-width: 780px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.svm__head h2 { margin-bottom: .75rem; text-wrap: balance; }
.svm__head .lede { margin: 0 auto; }
.svm__pic { position: relative; }
.svm__scene { width: 100%; }
.svm__stop { top: 0; right: 0; }

/* the close: the plate low at the left, the new family clear above it */
.endband--low .endband__in { align-items: end; }
