/* Services: a staircase of five blocks. A small figure climbs it as the page scrolls, the step he stands on lights up, and the
   panel on the right shows that service. js/climb.js drives the figure; below 900px (or reduced motion) it is a plain stack of cards. */
.services { position: relative; background: linear-gradient(180deg, #2a45ff 0%, #1c30de 100%); border-radius: 40px; color: #fff; }
.services__head .h2 { margin-top: 12px; font-size: clamp(34px, 4.2vw, 62px); color: #fff; background: none; -webkit-text-fill-color: #fff; }
.services .label { color: rgba(255, 255, 255, 0.85); }
.services .label::before { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }

.climb { position: relative; height: calc(100vh + var(--n) * 62vh); }
.climb__sticky { position: sticky; top: 0; height: 100vh; min-height: 640px; display: grid; align-content: center; overflow: hidden; border-radius: inherit;
  background: radial-gradient(55% 55% at 88% 0%, rgba(140, 158, 255, 0.55), transparent 70%), radial-gradient(60% 60% at 0% 100%, rgba(6, 12, 120, 0.6), transparent 70%), linear-gradient(180deg, #2a45ff 0%, #1c30de 100%); }
.climb__sticky::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 85%); }
.climb__inner { position: relative; }
.climb__inner { display: grid; gap: clamp(14px, 3vh, 34px); padding-top: 76px; }
.climb__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3.2vw, 56px); height: min(68vh, 620px); }

/* the staircase */
.stairs { position: relative; height: 100%; }
.stairs::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -1px; height: 2px; background: rgba(255, 255, 255, 0.4); }
.stairs__steps { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 6px; }
.step { --mortar: rgba(255, 255, 255, 0.16); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: calc(16% + var(--i) * 13.5%); padding: 12px; border: 0; border-radius: 14px 14px 4px 4px; text-align: left; cursor: pointer; color: rgba(255, 255, 255, 0.78);
  background: repeating-linear-gradient(to bottom, transparent 0 25px, var(--mortar) 25px 26px), rgba(255, 255, 255, 0.13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 0.45s var(--ease-out), color 0.45s, box-shadow 0.45s var(--ease-out); }
.step__no { font-size: 11px; opacity: 0.8; }
.step__name { font-size: clamp(12px, 1.05vw, 15px); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.step.is-done { --mortar: rgba(255, 255, 255, 0.22); background-color: rgba(255, 255, 255, 0.34); color: #fff; }
.step.is-on { --mortar: rgba(37, 64, 255, 0.14); background-color: #fff; color: var(--blue); box-shadow: inset 0 2px 0 #fff, 0 0 0 5px rgba(255, 255, 255, 0.28), 0 0 60px 6px rgba(160, 178, 255, 0.75), 0 30px 50px -12px rgba(0, 0, 60, 0.55); }
.step:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* the climber: a little round character that hops up the steps. js/climb.js plays one timed hop per step (squash, stretch, land). */
.walker { position: absolute; left: 0; top: 0; z-index: 2; height: clamp(92px, 16vh, 140px); aspect-ratio: 60 / 80; pointer-events: none; will-change: transform; }
.walker__svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; will-change: transform; }
.walker { filter: drop-shadow(0 8px 8px rgba(0, 0, 70, 0.45)); }
.walker line { stroke: #fff; stroke-width: 8; stroke-linecap: round; fill: none; }
.w-body { fill: #fff; }
.w-pack { fill: #0b0c10; }
.w-eye { fill: #0b0c10; }
.w-pupil { fill: #fff; }
.w-leg { transform-box: fill-box; transform-origin: 50% 0; transition: transform 0.18s var(--ease-out); }
.w-arm { transform-box: view-box; transform-origin: 50px 46px; transition: transform 0.25s var(--ease-out); }
.walker.is-air .w-leg { transform: scaleY(0.55); }
.walker.is-air .w-arm { transform: rotate(150deg); }
.walker.is-win .w-arm { transform: rotate(150deg); }

/* service panels: only the one for the lit step is shown */
.climb__panels { position: relative; height: 100%; }
.cpanel { color: var(--ink); position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1.2fr) auto; overflow: hidden; border-radius: 28px; background: #fff; border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22), 0 44px 70px -20px rgba(0, 0, 60, 0.6);
  opacity: 0; visibility: hidden; transform: translateY(18px) scale(0.98); transition: opacity 0.4s, transform 0.6s var(--ease-out), visibility 0s 0.4s; }
.cpanel.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.45s 0.1s, transform 0.7s var(--ease-out) 0.1s, visibility 0s; }
.cpanel__stage { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(120% 90% at 80% 5%, #4a63ff 0%, #2236d6 42%, #0a1160 100%); }
.cpanel__stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 40px 40px; }
.cpanel__text { display: grid; gap: 8px; padding: clamp(16px, 2.2vw, 28px); }
.cpanel__no { color: var(--blue); }
.cpanel h3 { margin: 0; font-size: clamp(26px, 2.8vw, 40px); line-height: 1; font-weight: 500; letter-spacing: -0.04em; }
.cpanel p { max-width: 30em; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.45; color: var(--muted); }

/* device cluster: tilted phones and laptops drawn in CSS, sized in em so one font-size scales the whole group */
.cluster { position: relative; z-index: 1; width: 100%; height: 100%; font-size: clamp(7px, min(0.78vw, 1.25vh), 11px); }
.dev { position: absolute; left: 50%; top: 50%; translate: calc(-50% + var(--x, 0em)) calc(-50% + var(--y, 0em)); rotate: var(--r, 0deg); padding: 0.45em; background: #0b0c10; border-radius: 2.1em;
  box-shadow: 0 0 0 1px #3a3d4a, 0 2px 0 1px rgba(255, 255, 255, 0.18) inset, 0 2.2em 2.4em -0.8em rgba(0, 0, 50, 0.55); transition: translate 0.6s var(--ease-out), rotate 0.6s var(--ease-out); }
.dev--phone { width: 11em; height: 22.5em; }
.dev--phone::before { content: ""; position: absolute; left: 50%; top: 0.85em; z-index: 3; width: 3.2em; height: 0.9em; transform: translateX(-50%); border-radius: 1em; background: #0b0c10; }
.dev--laptop { width: 26em; height: 16.5em; padding: 0.5em; border-radius: 1.1em; }
.dev--laptop::after { content: ""; position: absolute; left: -4%; right: -4%; top: 100%; height: 0.9em; margin-top: 0.15em; border-radius: 0 0 1.2em 1.2em; background: linear-gradient(#e8e9ee, #b4b6bf); box-shadow: 0 1.2em 1.6em -0.6em rgba(0, 0, 50, 0.5); }
.cpanel.is-on:hover .dev { translate: calc(-50% + var(--x, 0em)) calc(-50% + var(--y, 0em) - 0.6em); }
.cpanel.is-on:hover .dev:nth-child(even) { rotate: calc(var(--r, 0deg) * 1.15); }

.dev__screen { height: 100%; display: grid; align-content: start; gap: 0.55em; padding: 2.5em 0.9em 0.9em; border-radius: 1.65em; background: #fff; overflow: hidden; color: #1c2a6e; font-size: 1em; }
.dev--laptop .dev__screen { padding: 0.9em; border-radius: 0.7em; gap: 0.7em; }
.dev i, .dev b, .dev u, .dev em, .dev span { display: block; font-style: normal; text-decoration: none; }
.s-h { font-size: 1.05em; font-weight: 600; letter-spacing: -0.02em; color: #0b0c10; }
.s-l { height: 0.5em; border-radius: 0.3em; background: #e3e7f3; }
.s-l.d { width: 82%; background: #1c2a6e; }
.s-l.m { width: 56%; }
.s-hero { display: grid; gap: 0.45em; justify-items: start; padding: 0.9em; border-radius: 1em; background: var(--blue-soft); }
.s-hero .s-l.d { background: #1c2a6e; }
.s-hero .s-l.m { background: #9aa8e6; }
.s-btn { justify-self: start; padding: 0.55em 1.1em; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.8em; font-weight: 600; }
.s-bar { display: flex; align-items: center; gap: 0.35em; }
.s-bar i { width: 0.5em; height: 0.5em; border-radius: 50%; background: #d7dbe8; }
.s-bar span { flex: 1; height: 0.6em; margin-left: 0.6em; border-radius: 0.3em; background: #eef0f6; }
.s-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5em; }
.s-tiles i { height: 3.4em; border-radius: 0.7em; background: #eef0f6; }
.s-tiles--2 { grid-template-columns: repeat(2, 1fr); }
.s-opt { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; padding: 0.7em 0.75em; border-radius: 0.9em; background: #f1f3f9; font-size: 0.8em; font-weight: 500; color: #0b0c10; }
.s-opt i { width: 1.1em; height: 1.1em; border: 0.15em solid #c7cde3; border-radius: 50%; }
.s-opt em { font: 600 1em/1 var(--font-mono); color: var(--blue); }
.s-opt.on { background: var(--blue-soft); box-shadow: inset 0 0 0 0.13em var(--blue); }
.s-opt.on i { background: var(--blue); border-color: var(--blue); }
.s-opt--ghost { justify-content: center; margin-top: 0.8em; background: #fff; box-shadow: inset 0 0 0 0.1em #d7dbe8; color: var(--blue); }
.s-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3em; }
.s-cal i { aspect-ratio: 1; border-radius: 0.35em; background: #eef0f6; }
.s-cal i.on { background: var(--blue); }
.s-slot { padding: 0.65em 0.75em; border-radius: 0.9em; background: var(--blue-soft); font: 600 0.8em/1 var(--font-mono); color: #1c2a6e; }
.s-field { padding: 0.7em 0.75em; border-radius: 0.8em; background: #f1f3f9; box-shadow: inset 0 0 0 0.1em #e1e5f0; font-size: 0.8em; color: #8a92b2; }
.s-field--tall { padding-bottom: 3em; }
.s-center { text-align: center; justify-items: center; }
.s-ok { position: relative; width: 3.4em; height: 3.4em; margin: 1.4em auto 0.5em; border-radius: 50%; background: var(--blue); }
.s-ok::after { content: ""; position: absolute; left: 1.2em; top: 0.7em; width: 0.7em; height: 1.4em; border: solid #fff; border-width: 0 0.2em 0.2em 0; transform: rotate(45deg); }
.s-sub { font: 500 0.8em/1.5 var(--font-mono); color: #5a6285; }
.s-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5em; }
.s-kpis b { height: 2.2em; border-radius: 0.6em; background: #eef0f6; }
.s-kpis b:first-child { background: var(--blue-soft); }
.s-chart { display: flex; align-items: flex-end; gap: 0.5em; height: 5.6em; padding: 0.6em 0.6em 0; border-radius: 0.8em; background: #f6f7fb; }
.s-chart i { flex: 1; height: var(--h); border-radius: 0.3em 0.3em 0 0; background: #b9c4f5; }
.s-chart i:last-child { background: var(--blue); }
.s-rows { display: grid; gap: 0.45em; }
.s-rows i { height: 0.6em; border-radius: 0.3em; background: #eef0f6; }
.s-rows i + i { width: 70%; }
.s-camp { display: grid; grid-template-columns: 3.6em 1fr; align-items: center; gap: 0.7em; font-size: 0.75em; font-weight: 500; color: #0b0c10; }
.s-camp i { height: 0.9em; border-radius: 0.5em; background: linear-gradient(90deg, var(--blue) var(--w), #eef0f6 var(--w)); }
.s-tag { justify-self: start; padding: 0.25em 0.6em; border-radius: 0.4em; background: #eef0f6; font: 600 0.7em/1 var(--font-mono); color: #5a6285; }
.s-img { height: 8em; border-radius: 1em; background: linear-gradient(145deg, #9aa8e6, var(--blue)); }

/* narrow windows and phones: the staircase sits above the panel and still climbs */
@media (max-width: 900px) {
  .climb__sticky { min-height: 560px; }
  .climb__inner { padding-top: 70px; gap: 10px; }
  .services__head .h2 { margin-top: 6px; font-size: clamp(28px, 6.5vw, 40px); }
  .climb__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 0.46fr) minmax(0, 0.54fr); gap: 14px; height: calc(100svh - 170px); min-height: 400px; max-height: 640px; }
  .stairs__steps { gap: 4px; }
  .step { height: calc(21% + var(--i) * 10%); overflow: hidden; padding: 8px; border-radius: 10px 10px 3px 3px; }
  .step__name { font-size: clamp(9px, 2.2vw, 13px); }
  .walker { height: clamp(60px, 11vh, 100px); }
  .cpanel { grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border-radius: 22px; }
  .cpanel__text { align-content: center; padding: 14px 16px; }
  .cpanel h3 { font-size: clamp(22px, 4.4vw, 30px); }
  .cpanel p { font-size: 13px; }
  .cluster { font-size: clamp(5px, min(1.3vw, 1.15vh), 8px); }
}
@media (max-width: 560px) {
  .climb__grid { grid-template-rows: minmax(0, 0.4fr) minmax(0, 0.6fr); }
  .step__name { display: none; }
  .cpanel { grid-template-columns: none; grid-template-rows: minmax(0, 1fr) auto; }
  .cpanel__text { padding: 12px 16px 16px; }
  .cluster { font-size: clamp(4px, min(1.9vw, 0.8vh), 8px); }
}

/* reduced motion: no staircase, just the cards one after another */
@media (prefers-reduced-motion: reduce) {
  .services { padding-block: 96px 60px; }
  .climb { height: auto; }
  .climb__sticky { position: relative; height: auto; min-height: 0; overflow: visible; display: block; }
  .climb__inner { padding-top: 0; gap: 28px; }
  .climb__grid { display: block; height: auto; max-height: none; }
  .stairs { display: none; }
  .climb__panels { display: grid; gap: 22px; height: auto; }
  .cpanel { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; transition: none; grid-template-rows: auto auto; grid-template-columns: none; }
  .cpanel__stage { height: 340px; }
  .cluster { font-size: clamp(7px, 2.2vw, 10px); }
}
