/* The photograph and its lights share the same intrinsic 3:2 canvas. */
.starter-art .fleet-shot {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  mask-image: linear-gradient(90deg, transparent, #000 14%);
}
.fleet-camera { position: relative; }
.fleet-camera .fleet-portrait {
  display: block;
  width: 100%;
  height: auto;
  mask-image: none;
}
.fleet-lighting {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  [data-motion-scene="fleet"][data-motion-ready] .fleet-shot {
    --fleet-p: var(--scene-progress, 1);
    --near-on: clamp(0, calc((var(--fleet-p) - .09) * 3.7), 1);
    --far-on: clamp(0, calc((var(--fleet-p) - .46) * 3.1), 1);
    --near-light: clamp(0, calc((var(--fleet-p) - .22) * 3.3), 1);
    --far-light: clamp(0, calc((var(--fleet-p) - .59) * 3), 1);
    --pullback: clamp(0, calc((var(--fleet-p) - .06) * 1.2), 1);
  }
  [data-motion-scene="fleet"][data-motion-ready] .fleet-camera {
    transform-origin: 28% 86%;
    transform: scale(calc(1.18 - .18 * var(--pullback)));
  }
  [data-motion-scene="fleet"][data-motion-ready] .fleet-lighting { display: block; }

  /* Recover the native rack exposure separately, front to back. */
  .fm-near-dark { opacity: calc(.87 * (1 - var(--near-on))); }
  .fm-far-dark { opacity: calc(.91 * (1 - var(--far-on))); }
  .fm-near-light { opacity: var(--near-light); }
  .fm-far-light { opacity: var(--far-light); }
  .fm-near-glint { opacity: calc(var(--near-on) * (1 - var(--near-light))); }
  .fm-far-glint { opacity: calc(var(--far-on) * (1 - var(--far-light))); }

  /* Each highlight follows the bends of the photographed patch cable. */
  .fm-near-wire {
    --wire-progress: clamp(0, calc((var(--fleet-p) - .19) * 4.5), 1);
    opacity: calc(.64 * var(--near-light));
  }
  .fm-far-wire {
    --wire-progress: clamp(0, calc((var(--fleet-p) - .57) * 3.7), 1);
    opacity: calc(.68 * var(--far-light));
  }
  .fm-cables use {
    stroke-dasharray: 1 1;
    stroke-dashoffset: calc(1 - var(--wire-progress));
  }
  .fm-bloom { filter: blur(2px); }
  .fm-reflections { opacity: .72; }
}

@media (max-width: 760px) {
  .starter-art .fleet-shot { mask-image: linear-gradient(180deg, transparent, #000 12%); }
}

/* Keep the desk in view for the two rack power-ups on larger screens. */
@media screen and (min-width: 761px) and (min-height: 580px) and (prefers-reduced-motion: no-preference) {
  .start-wrap[data-motion-ready] .start-cta {
    position: sticky;
    top: clamp(76px, 26svh, 260px);
  }
  .start-wrap[data-motion-ready]::after {
    content: '';
    display: block;
    height: clamp(160px, 33svh, 340px);
  }
}
