/* ==========================================================================
   Services: the five services, stacked. Each sheet pins; the next slides up over it while it sinks and dims.
   The visual on the left, all the text on the right.
   ========================================================================== */
.svcs { position: relative; }
.svcs__stack { timeline-scope: --s1, --s2, --s3, --s4, --s5; position: relative; }
.svc__mark { display: block; height: 100vh; margin-bottom: -100vh; visibility: hidden; }
.svc { position: sticky; top: 0; height: 100vh; min-height: 640px; overflow: hidden; background: var(--bg); border-top: 1px solid var(--line); }
.svc::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) no-repeat left var(--rail) top 0 / 1px 100%,
    linear-gradient(var(--line), var(--line)) no-repeat right var(--rail) top 0 / 1px 100%; }
.svc__in { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(32px, 4vw, 64px); align-items: center; height: 100%; padding-top: calc(var(--nav-h) + clamp(8px, 1.6vh, 20px)); padding-bottom: clamp(20px, 3vh, 36px); }
.svc__img { width: 100%; height: min(100%, 44vw); margin: 0; overflow: hidden; background: var(--tile); }
.svc__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svc__say { display: grid; justify-items: start; gap: clamp(10px, 1.7vh, 18px); color: var(--text-2); font-size: 17px; line-height: 1.5; }
.svc__name { margin-top: -4px; }
/* one display face, for the service's name; everything under it is Satoshi, stepped down by size and weight */
.svc__say > p { max-width: 34em; font-weight: 400; }
.svc__say .tags { margin-top: 6px; }
.svc__dim { position: absolute; inset: 0; z-index: 2; background: #00001a; opacity: 0; pointer-events: none; }
#brand-identity .svc__img img { object-position: 74% 50%; }
#websites .svc__img img { object-position: 88% 50%; }

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (timeline-scope: none)) {
    /* as a sheet comes in, its picture travels a little further than it does */
    @keyframes svc-pic { from { transform: translateY(26%) scale(1.14); } to { transform: none; } }
    .svc__img img { animation: svc-pic auto linear both; animation-timeline: var(--in); animation-range: entry 8% entry 100%; will-change: transform; }
    /* as the next one covers it, it sinks and dims */
    @keyframes svc-sink { to { transform: translateY(-13vh); } }
    @keyframes svc-fade { to { opacity: 0.46; } }
    .svc__in { animation: svc-sink auto linear both; animation-timeline: var(--out); animation-range: entry 0% entry 100%; will-change: transform; }
    .svc__dim { animation: svc-fade auto linear both; animation-timeline: var(--out); animation-range: entry 0% entry 100%; }
    /* nothing covers the last sheet */
    .svc:last-child .svc__in, .svc:last-child .svc__dim { animation: none; }
  }
}
/* on small screens, or with less motion, the sheets simply follow one another */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .svc__mark, .svc__dim { display: none; }
  .svc { position: relative; height: auto; min-height: 0; }
  .svc__in { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 48px; }
  .svc__img { height: auto; aspect-ratio: 16 / 10; }
}

/* Work with us your way: under the pointer the card grows a little, and its icon, title and line a little more */
.tcard { transition: scale 0.5s var(--ease-out); }
.tcard .tile-ic, .tcard .card-title, .tcard p { transform-origin: 0 50%; transition: scale 0.5s var(--ease-out), background-color 0.3s, color 0.3s, border-color 0.3s; }
.tcard:hover { scale: 1.025; }
.tcard:hover .tile-ic { scale: 1.18; }
.tcard:hover .card-title { scale: 1.05; }
.tcard:hover p { scale: 1.03; }
@media (prefers-reduced-motion: reduce) { .tcard, .tcard .tile-ic, .tcard .card-title, .tcard p { transition: none; } }
