/* GeekScope services page (LeadGeeks services). Loads after css/system.css.
   The one authored moment: the engagement loop draws on, arc by arc, as the four
   steps pass (desktop: the dial pins beside the steps; phone: it draws as it crosses). */

/* ---------- hero ---------- */
.sv-hero { max-width: var(--max); margin: 0 auto; padding: 28px var(--g) 0; }
.sv-hero-in { display: grid; gap: 4px; }
.sv-hero .lede { max-width: 32em; }
@media (min-width: 768px) {
  .sv-hero { padding-top: 56px; }
}
@media (min-width: 1100px) {
  .sv-hero { padding-top: clamp(56px, 10vh, 112px); }
  .sv-hero-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .sv-hero h1 { grid-column: 1 / span 7; }
  .sv-hero h1 .ln { display: block; }
  .sv-hero-side { grid-column: 8 / span 5; padding-top: 12px; }
  .sv-hero .lede { margin-top: 0; max-width: 28em; }
  .sv-hero .actions { margin-top: 32px; }
}

/* ---------- what we do: two lead services, two supporting ---------- */
.sv-do { max-width: var(--max); margin: 0 auto; padding: var(--sec) var(--g) 0; }
.sv-lead { margin-top: 40px; display: grid; gap: 64px; }
.sv-svc { position: relative; padding-top: 26px; box-shadow: 0 -2px 0 var(--ink); }
.sv-svc::before { content: ""; position: absolute; left: 0; top: -9px; width: 2px; height: 16px; background: var(--ink); }
.sv-lead h3 { font-size: clamp(25px, 2.3vw, 32px); line-height: 1.15; }
.sv-svc > p { margin-top: 14px; color: var(--ink-2); max-width: 31em; }
.sv-more { margin-top: 72px; display: grid; gap: 40px; }
.sv-svc--s { padding-top: 20px; box-shadow: 0 -1px 0 var(--ink); }
.sv-svc--s::before { display: none; }
.sv-svc--s h3 { font-size: 21px; }
.sv-svc--s > p { margin-top: 10px; font-size: 17px; max-width: 28em; }
@media (min-width: 1100px) {
  .sv-lead { margin-top: 64px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; }
  .sv-more { margin-top: 96px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; }
}

/* the hand-off: what our reps take on, what your senior people keep */
.sv-hand { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); }
.sv-hand-us, .sv-hand-you { padding: 16px 18px 18px; background: var(--slide); box-shadow: inset 0 0 0 1px var(--ink); }
.sv-hand-you { box-shadow: inset 0 0 0 2px var(--ink); }
.sv-hand .label { margin-bottom: 12px; }
.sv-hand-w { font: 500 17px/1.25 var(--mono); font-variation-settings: "wdth" 87; letter-spacing: -0.01em; }
.sv-hand-w + .sv-hand-w { margin-top: 8px; }
.sv-hand-arr { position: relative; height: 36px; }
.sv-hand-arr::before { content: ""; position: absolute; left: 28px; top: 0; bottom: 0; width: 1px; background: var(--ink); }
.sv-hand-arr::after { content: ""; position: absolute; left: 24.5px; bottom: 1px; width: 8px; height: 8px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); }
@media (min-width: 600px) {
  .sv-hand { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); }
  .sv-hand-arr { height: auto; }
  .sv-hand-arr::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px; }
  .sv-hand-arr::after { left: auto; right: 1px; bottom: auto; top: calc(50% - 4px); transform: rotate(-45deg); }
}

/* the rate readout and one sample lead with its evidence */
.sv-rate { margin-top: 32px; display: grid; gap: 22px; }
.sv-rate-r { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.sv-rate-n { font-size: clamp(60px, 6vw, 84px); line-height: 0.86; font-weight: 500; letter-spacing: -0.05em; }
.sv-rate-u { font: 450 16px/1 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); }
.sv-slip { background: var(--slide); box-shadow: inset 0 0 0 1px var(--ink); padding: 14px 18px 18px; }
.sv-slip-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; font-weight: 650; font-size: 16px; padding-bottom: 14px; box-shadow: 0 1px 0 var(--rule); margin-bottom: 16px; }
.sv-slip-ev { position: relative; padding-left: 44px; }
.sv-slip-ev .mk { left: 0; top: 0; width: 26px; height: 26px; }
.sv-slip-ev .mk .mk-gap { fill: var(--slide); }
.sv-slip-ev .ev-t { font-size: 18px; margin-top: 6px; }
.sv-slip-ev .ev-s { font-size: 15px; }

/* ---------- how an engagement runs: the loop ---------- */
.engage { margin-top: var(--sec); background: var(--slide); box-shadow: 0 -1px 0 var(--ink); }
.eng-in { max-width: var(--max); margin: 0 auto; padding: 64px var(--g) 72px; display: grid; gap: 40px; }
.cyc-fig { margin: 0; display: grid; justify-items: center; gap: 18px; }
.cyc { position: relative; width: min(100%, 540px); aspect-ratio: 1 / 1; }
.cyc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cyc-o { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.cyc-i { fill: none; stroke: var(--ink); stroke-width: 0.8; }
.cyc-fine { stroke: var(--ink); stroke-width: 0.6; opacity: 0.55; }
.cyc-mid { stroke: var(--ink); stroke-width: 1.1; }
.cyc-card { stroke: var(--ink); stroke-width: 1.8; }
.cyc-x { stroke: var(--ink); stroke-width: 1; opacity: 0.7; }
.cyc-tk { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: butt; transform-box: fill-box; transform-origin: 50% 50%; }
.cyc-l {
  position: absolute; margin: 0; white-space: nowrap;
  font: 500 15px/1 var(--mono); font-variation-settings: "wdth" 87; letter-spacing: -0.01em; color: var(--ink);
}
.cyc-l1 { left: 50%; top: 22.6%; transform: translateX(-50%); }
.cyc-l2 { right: 22.4%; top: 50%; transform: translateY(-50%); }
.cyc-l3 { left: 50%; top: 77.4%; transform: translate(-50%, -100%); }
.cyc-l4 { left: 22.4%; top: 50%; transform: translateY(-50%); }
.cyc-note {
  position: absolute; margin: 0; left: 19.6%; top: 19.6%; white-space: nowrap;
  font: 600 15px/1 var(--mono); font-variation-settings: "wdth" 87; letter-spacing: -0.01em; color: var(--burnt);
  transform: translate(-50%, -50%) rotate(-45deg);
}
@media (max-width: 767px) { .cyc-note { left: 30%; top: 30%; } }
@media (min-width: 768px) { .cyc-l { font-size: 16px; } }
.cyc-fig figcaption { text-align: center; }

.cyc-steps li { position: relative; padding: 22px 0 28px; box-shadow: 0 -1px 0 var(--rule); }
.cyc-steps li::before { content: ""; position: absolute; left: 0; top: -8px; width: 2px; height: 16px; background: var(--ink); }
.cyc-steps h3 { font-size: 22px; }
.cyc-steps p { margin-top: 10px; color: var(--ink-2); max-width: 30em; }
.cyc-steps li:last-child { box-shadow: 0 -1px 0 var(--rule), 0 1px 0 var(--rule); }
@media (min-width: 1100px) {
  .eng-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; align-items: start; padding: 104px var(--g) 112px; }
  .eng-in h2 { grid-column: 1 / span 7; }
  .cyc-fig { grid-column: 1 / span 6; align-self: start; justify-items: start; }
  .cyc { width: min(100%, 560px); }
  .cyc-fig figcaption { text-align: left; }
  .cyc-steps { grid-column: 8 / span 5; }
  .cyc-steps li { padding: 26px 0 34px; }
  .cyc-steps h3 { font-size: 25px; }
}

/* ---------- results ---------- */
.results { max-width: var(--max); margin: 0 auto; padding: var(--sec) var(--g) 0; }
.res-grid { margin-top: 40px; display: grid; gap: 56px; }
.res-q { margin: 0; }
.res-q blockquote { margin: 0; }
.res-q blockquote p {
  font: 600 clamp(25px, 6.6vw, 30px)/1.24 var(--sans); letter-spacing: -0.02em;
  text-indent: -0.42em; text-wrap: pretty; max-width: 22em;
}
.res-mark { position: relative; white-space: nowrap; }
.res-ul { position: absolute; left: -2px; right: -2px; bottom: -0.2em; width: calc(100% + 4px); height: 0.36em; overflow: visible; }
.res-q figcaption { margin-top: 26px; color: var(--ink-2); }
.res-who { color: var(--ink); font-weight: 650; }
.res-fig { padding-top: 18px; box-shadow: 0 -2px 0 var(--ink); position: relative; }
.res-fig::before { content: ""; position: absolute; left: 0; top: -9px; width: 2px; height: 16px; background: var(--ink); }
.res-n { font-size: clamp(68px, 19vw, 92px); line-height: 0.9; font-weight: 500; letter-spacing: -0.05em; }
.res-t { margin-top: 16px; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; max-width: 18em; }
.res-fig .label { margin-top: 12px; }
@media (min-width: 768px) {
  .res-q blockquote p { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.2; }
}
@media (min-width: 1100px) {
  .res-grid { margin-top: 56px; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .res-q { grid-column: 1 / span 8; }
  .res-fig { grid-column: 9 / span 4; margin-left: 24px; }
}

/* the client names: a still grid of typeset names (no logo files, so none are faked) */
.clients { position: relative; margin: 96px 0 0; }
.cl-cap { font: 450 15px/1.3 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); padding-bottom: 16px; }
.cl-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--rule); box-shadow: 0 -1px 0 var(--ink), 0 1px 0 var(--ink);
}
.cl-grid li {
  display: flex; align-items: center; min-height: 84px; padding: 16px;
  background: var(--plate); font: 650 20px/1.2 var(--sans); letter-spacing: -0.015em;
}
.cl-grid li:nth-child(1), .cl-grid li:nth-child(2n+2) { padding-left: 0; }
.cl-grid .cl-wide { grid-column: span 2; }
@media (min-width: 768px) {
  .cl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cl-grid li { min-height: 120px; padding: 20px 24px; font-size: 24px; }
  .cl-grid li:nth-child(2n+2) { padding-left: 24px; }
  .cl-grid li:nth-child(1), .cl-grid li:nth-child(4) { padding-left: 0; }
}
@media (min-width: 1100px) {
  .cl-grid li { min-height: 136px; padding: 24px 32px; font-size: 27px; }
  .cl-grid li:nth-child(2n+2) { padding-left: 32px; }
  .cl-grid li:nth-child(1), .cl-grid li:nth-child(4) { padding-left: 0; }
}

/* ---------- closing ---------- */
.sv-close { margin-top: var(--sec); background: var(--slide); box-shadow: 0 -1px 0 var(--ink); }
.sv-close-in { position: relative; max-width: var(--max); margin: 0 auto; padding: 64px var(--g) 72px; display: grid; gap: 24px; }
.sv-close-in .reg-tl, .sv-close-in .reg-tr { top: 28px; }
.sv-close-in .reg-bl, .sv-close-in .reg-br { bottom: 28px; }
.sv-close-side p { color: var(--ink-2); max-width: 30em; }
.sv-close-side .actions { margin-top: 24px; gap: 12px 24px; }
@media (min-width: 1100px) {
  .sv-close-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; padding: 112px var(--g) 120px; }
  .sv-close-in h2 { grid-column: 1 / span 6; }
  .sv-close-in h2 .ln { display: block; }
  .sv-close-side { grid-column: 7 / span 6; padding-bottom: 6px; padding-left: 24px; }
}

/* ==========================================================================
   Motion. Final states are the default; nothing moves under reduced motion,
   without scroll-timeline support, or with ?still.
   ========================================================================== */
@keyframes sv-in { from { opacity: 0; } to { opacity: 1; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* phone and tablet: the loop draws arc by arc as the dial crosses the viewport */
    html:not(.still) .cyc { view-timeline: --cyc block; }
    html:not(.still) .cyc .gp { stroke-dasharray: 1 2; animation: tl-draw linear both; animation-timeline: --cyc; animation-range: cover calc(22% + var(--i) * 8%) cover calc(30% + var(--i) * 8%); }
    html:not(.still) .cyc-tk { animation: tl-stamp linear both; animation-timeline: --cyc; animation-range: cover calc(18% + var(--k) * 8%) cover calc(23% + var(--k) * 8%); }
    html:not(.still) .cyc-note { animation: sv-in linear both; animation-timeline: --cyc; animation-range: cover 50% cover 56%; }
  }
}
@supports (animation-timeline: view()) and (timeline-scope: --a) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 1100px) {
    /* desktop: the dial pins beside the steps; each arc draws as the next step reaches
       the middle of the screen, and the last arc closes the loop back to Align */
    .engage { timeline-scope: --st1, --st2, --st3, --st4; }
    html:not(.still) .cyc-steps { padding-bottom: 26vh; }
    html:not(.still) .cyc-steps li { min-height: 40vh; }
    html:not(.still) .cyc-steps li:last-child { box-shadow: 0 -1px 0 var(--rule); }
    html:not(.still) .cyc-steps li:nth-child(1) { view-timeline: --st1 block; }
    html:not(.still) .cyc-steps li:nth-child(2) { view-timeline: --st2 block; }
    html:not(.still) .cyc-steps li:nth-child(3) { view-timeline: --st3 block; }
    html:not(.still) .cyc-steps li:nth-child(4) { view-timeline: --st4 block; }
    html:not(.still) .cyc-fig { position: sticky; top: calc(50vh - 300px); }
    html:not(.still) .cyc-tk.tk1 { animation-timeline: --st1; animation-range: entry 40% cover 40%; }
    html:not(.still) .cyc-tk.tk2 { animation-timeline: --st2; animation-range: cover 38% cover 46%; }
    html:not(.still) .cyc-tk.tk3 { animation-timeline: --st3; animation-range: cover 38% cover 46%; }
    html:not(.still) .cyc-tk.tk4 { animation-timeline: --st4; animation-range: cover 30% cover 38%; }
    html:not(.still) .arc1 .gp { animation-timeline: --st2; animation-range: entry 30% cover 42%; }
    html:not(.still) .arc2 .gp { animation-timeline: --st3; animation-range: entry 30% cover 42%; }
    html:not(.still) .arc3 .gp { animation-timeline: --st4; animation-range: entry 30% cover 34%; }
    html:not(.still) .arc4 .gp { animation-timeline: --st4; animation-range: cover 38% cover 56%; }
    html:not(.still) .cyc-note { animation-timeline: --st4; animation-range: cover 50% cover 58%; }
  }
}

/* body copy: no single word left on a last line */
main p, main li, main figcaption { text-wrap: pretty; }

/* CSP-safe positions from the approved mockup. */
.services-position-1 { --i:0; }
.services-position-2 { --i:1; }
.services-position-3 { --i:2; }
.services-position-4 { --i:3; }
.services-position-5 { --k:0; }
.services-position-6 { --k:1; }
.services-position-7 { --k:2; }
.services-position-8 { --k:3; }
