/* The pointer moves only the light, shadow and artwork. Hit areas and type stay still. */
.cts-pointer-relative { position: relative; }

.cts-pointer-light {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .cts-pointer-light {
    --pointer-size: 12rem;
    z-index: 1;
    background:
      radial-gradient(ellipse var(--pointer-size) 78% at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(242, 191, 101, 0.18), transparent 75%),
      radial-gradient(ellipse 80% 80% at calc(100% - var(--pointer-x, 50%)) calc(100% - var(--pointer-y, 50%)), rgba(184, 55, 35, 0.12), transparent 74%);
    box-shadow:
      inset 0 0 0 1px rgba(242, 191, 101, 0.23),
      inset 0 1px 0 rgba(255, 244, 223, 0.23),
      var(--pointer-dx, 0px) calc(4px + var(--pointer-dy, 0px)) 21px -9px rgba(0, 0, 0, 0.72);
    transform: perspective(520px) rotateX(var(--pointer-ax, 0deg)) rotateY(var(--pointer-ay, 0deg));
    transition: opacity 60ms ease-out, transform 130ms ease-out, box-shadow 130ms ease-out;
  }

  :is(.cts-tile, .service-cell, .ins-card, .build__item, .stair, .rail__stop, .gate__steps li, .care-row, .city-ladder li, .rail-stop, .process__step, .approach__step, .findings li, .plan-rung, .deliverable, .care-grid > .care, .gap, .contact__steps li, .privacy-steps li, .flow__stage, .cts-cta, .price-panel, .sheet, .related-service, .report-card, .ins-consult-callout, .ins-not-found-card, .contact__next, .contact__direct, .care-note, .privacy-colophon, .growth) > .cts-pointer-light {
    --pointer-size: 15rem;
    background:
      radial-gradient(ellipse 14rem 1px at var(--pointer-x, 50%) 1px, rgba(242, 191, 101, 0.84), transparent),
      radial-gradient(circle var(--pointer-size) at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(242, 191, 101, 0.15), transparent 78%),
      radial-gradient(circle 11rem at calc(100% - var(--pointer-x, 50%)) calc(100% - var(--pointer-y, 50%)), rgba(184, 55, 35, 0.12), transparent 73%);
    box-shadow: none;
  }

  .cts-pointer-surface.cts-tile--link:hover,
  .cts-pointer-surface.cts-btn:hover,
  .cts-pointer-surface.cts-btn:active {
    transform: none;
  }

  /* Ways to start card: glow only, no 3D tilt on the card, its steps or its button. Wide table rows and list rows get the same glow, no tilt. */
  .ladder .cts-pointer-light { transform: none; }
  :is(.city-ladder li, .rail-stop, .process__step, .approach__step, .findings li, .plan-rung, .deliverable, .care-grid > .care, .gap, .contact__steps li, .privacy-steps li, .flow__stage, .cts-cta, .price-panel, .sheet, .related-service, .report-card, .ins-consult-callout, .ins-not-found-card, .contact__next, .contact__direct, .care-note, .privacy-colophon, .growth) > .cts-pointer-light { transform: none; }
  [data-cts-pointer] > .cts-pointer-light { opacity: 1; transition-duration: 150ms, 130ms, 130ms; }
  :focus-visible > .cts-pointer-light { opacity: 0; }

  .cts-pointer-surface > .cts-tile__art {
    translate: var(--pointer-dx, 0px) var(--pointer-dy, 0px);
    rotate: y var(--pointer-ay, 0deg);
    transition: translate 170ms ease-out, rotate 170ms ease-out, color 170ms ease-out;
  }

  .cts-pointer-surface[data-cts-pressed] > .cts-pointer-light {
    opacity: 1;
    transform: scale(0.982);
    box-shadow: inset 0 0 0 1px rgba(242, 191, 101, 0.48), inset 0 2px 8px rgba(0, 0, 0, 0.46);
    transition-duration: 85ms;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.ai-hero, .home-hero, .senior-hero, .page-hero) :is(.desk__stack, .desk__card--inquiry, .desk__card--draft > .desk__head > svg, .house-scene, .tablet-scene, .day__art, .review-proof) {
    translate: calc(var(--pointer-unit-x, 0) * 12px * var(--hero-motion, 1)) calc(var(--pointer-unit-y, 0) * 8px * var(--hero-motion, 1));
    rotate: y calc(var(--pointer-unit-x, 0) * 7deg * var(--hero-motion, 1));
    transition: translate 180ms ease-out, rotate 180ms ease-out;
  }
}

/* AI & Automation hero: one tunable amount of pointer motion (1 = the old amount). */
.ai-hero { --hero-motion: .62; }

/* Service list panels, their text, and their link boundaries stay fixed. */
.service.cts-tile--link:hover {
  transform: none;
  border-color: var(--cts-color-line);
  box-shadow: var(--cts-shadow-sheen), var(--cts-shadow-2);
}
.service.cts-tile--quiet:hover {
  border-color: var(--cts-color-line-strong);
  box-shadow: none;
}
.service.cts-tile--link:hover .cts-link:not(:focus-visible) { color: var(--cts-color-text); }
.service.cts-tile--link:hover .cts-link::after { transform: rotate(45deg); }

@media (prefers-reduced-motion: no-preference) {
  .service__art-window > .cts-tile__art {
    translate: calc(var(--pointer-unit-x, 0) * 10px) calc(var(--pointer-unit-y, 0) * 6px);
    rotate: y calc(var(--pointer-unit-x, 0) * 14deg);
    transition: translate 160ms ease-out, rotate 160ms ease-out, color 160ms ease-out;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .service-cell > .service-cell__mark { overflow: clip; }
  .service-cell > .diagram,
  .service-cell > .service-cell__mark > g {
    translate: calc(var(--pointer-unit-x, 0) * 3px) calc(var(--pointer-unit-y, 0) * 2px);
    rotate: calc(var(--pointer-unit-x, 0) * 2.5deg);
    transform-origin: center;
    transform-box: view-box;
    transition: translate 150ms ease-out, rotate 150ms ease-out;
  }
}
