/* The original scene remains visible without JavaScript. */
#services[data-illustration] .scene img { transition: opacity 650ms ease; }
#services .scene :is(.service-image-ai, .service-image-tools, .service-image-web) { opacity: 0; }
#services[data-illustration="ai"] .scene .service-image-ai { opacity: 1; }
#services[data-illustration="tools"] .scene .service-image-tools { opacity: 1; }
#services[data-illustration="web"] .scene .service-image-web { opacity: 1; }
#services:is([data-illustration="ai"], [data-illustration="tools"], [data-illustration="web"]) .scene .service-image-mobile { opacity: 0; }
#services .service-unit[tabindex]:focus-visible { outline: 1px solid #ed8043; outline-offset: 8px; }
#services .service-unit h3 { transition: color 650ms ease; }
#services[data-illustration="ai"] .service-unit:nth-of-type(1) h3,
#services[data-illustration="mobile"] .service-unit:nth-of-type(2) h3,
#services[data-illustration="tools"] .service-unit:nth-of-type(3) h3,
#services[data-illustration="web"] .service-unit:nth-of-type(4) h3 { color: #ffad7e; }
#services .service-strip { display: none; direction: ltr; }
#services .service-unit:nth-of-type(n) { border-top: 0; }
#log .entry { border-top: 0; border-bottom: 0; }
/* A solid panel must not reveal the light section background while entering. */
#work .section-lead { opacity: 1; transform: none; animation: none; }
@media (min-width: 701px) {
  #work h2 .work-title { display: block; inline-size: fit-content; max-inline-size: 100%; }
  #work h2 .work-title > span { display: block; }
}
@media (max-width: 700px) {
  #services.band { gap: 20px; }
  #services > div { display: grid; row-gap: 32px; }
  #services .services-intro { display: none; }
  #services[data-illustration] .scene { display: none; }
  #services[data-illustration] .service-unit:nth-of-type(n) h3 { color: #eee; transition: none; }
  #services .service-strip {
    display: block;
    position: relative;
    height: clamp(112px, 34vw, 156px);
    margin: 0 -5vw -20px;
    overflow: hidden;
    isolation: isolate;
    clip-path: inset(0);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 2px, #000 calc(100% - 2px), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 2px, #000 calc(100% - 2px), transparent);
    background: #0d0e0e;
    pointer-events: none;
  }
  #services .service-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, #0d0e0e 0%, #0d0e0e 8%, transparent 35%, transparent 48%, #0d0e0e 100%),
      linear-gradient(to right, #0d0e0e22, transparent 22%, #0d0e0e66 75%, #0d0e0e);
  }
  #services .service-strip img {
    display: block;
    width: 175%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    filter: brightness(.65) saturate(.72);
    transform-origin: 25% center;
    transform: scale(1);
  }
  #services .service-unit:nth-of-type(1) .service-strip img { object-position: left 50%; }
  #services .service-unit:nth-of-type(2) .service-strip img { object-position: left 60%; }
  #services .service-unit:nth-of-type(4) .service-strip img { object-position: left 82%; }
  #services .service-unit :is(h3, p) { position: relative; z-index: 2; }
  #services .service-unit p { margin-top: 12px; }
  #services[data-illustration] .service-unit { margin: 0; padding-top: 16px; border-top-color: #ffffff14; }
  #services[data-illustration] .service-unit:first-of-type { padding-top: 0; }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  #services .service-strip img { will-change: transform; }
  @supports (view-timeline-name: --service-strip) and (animation-timeline: --service-strip) {
    /* Let each strip track the page scroller through the clipped section. */
    #services.band { overflow: clip; }
    #services .service-strip { view-timeline-name: --service-strip; }
    #services .service-strip img {
      animation: service-scroll-zoom auto cubic-bezier(.37, 0, .63, 1) both;
      animation-timeline: --service-strip;
    }
  }
}
@keyframes service-scroll-zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  #services .service-strip img { transform: none; }
  #services[data-illustration] .scene img,
  #services .service-unit h3 { transition: none; }
}

/* Keep the composition together on ultrawide screens, with full-width backgrounds. */
@media (min-width: 2200px) {
  body { --wide-gutter: max(5vw, calc((100% - 1800px) / 2)); }
  .band,
  #work.band,
  #contact.band { padding-inline: var(--wide-gutter); column-gap: 96px; }
  .poster > header,
  .poster .bottom { padding-inline: var(--wide-gutter); }
  .band > .scene,
  #services .scene { inset-inline: var(--wide-gutter); }
  #contact > .scene { inset-inline: auto; margin-inline: 0; }
  :is(#services, #about, #contact) .scene {
    mask-image: linear-gradient(to right, transparent, #000 120px, #000 calc(100% - 120px), transparent);
  }
  #work .section-lead { margin-inline: 0; }
  #work .section-photo {
    mask-image: linear-gradient(to var(--inline-end), transparent, #000 120px);
  }
  #work h2 { padding-inline: 0 24px; }
  #work { background: linear-gradient(to var(--inline-end), #19273b 0 calc(50% - 257px), #e9dfcf calc(50% - 257px)); }
  #log .section-photo {
    inset-inline-start: -60px; width: calc(100% + 120px);
    mask-image: linear-gradient(to var(--inline-end), transparent, #000 120px, #000 73%, transparent),
      linear-gradient(to bottom, transparent, #000 22%, #000 82%, transparent);
  }
  .people { gap: 64px; }
}
