/* Marketing Intents We Serve: photo cards.
   At rest the photo shows with just the title and a 01 / 08 counter. On hover
   (or keyboard focus, or a tap on touch screens via .is-open) a blue tint and a
   cursor-following glow wash over the photo, the card lifts, and the title
   slides up to make room for the description.
   Loaded after services-*.css and overrides its .svc-intent rules. */

.svc-intent {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --mx: 50%;
  --my: 40%;
  /* `translate` rather than `transform`: the reveal-on-scroll animation writes
     inline transforms on these cards, and this must not fight it */
  translate: 0 0;
  box-shadow: 0 1px 2px rgba(5, 5, 11, .06), 0 8px 24px -14px rgba(5, 5, 11, .35);
  transition: translate .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

/* Photo: always visible now (it used to fade in on hover) */
.svc-intent__media {
  opacity: 1;
  transform: scale(1.02);
  filter: none;
  animation: none;
  transition: transform .9s var(--ease-out), filter .45s var(--ease-out);
}

/* Legibility gradient: dark at the bottom for the title, a touch at the top
   for the icon and counter. Always on. */
.svc-intent::after {
  opacity: 1;
  background: linear-gradient(180deg,
    rgba(5, 5, 11, .32) 0%,
    rgba(5, 5, 11, 0) 26%,
    rgba(5, 5, 11, 0) 50%,
    rgba(5, 5, 11, .72) 100%);
}

/* Hover tint + glow that follows the cursor (--mx/--my set by intent-cards.js) */
.svc-intent::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle clamp(110px, 9vw, 170px) at var(--mx) var(--my),
      rgba(98, 124, 255, .55), rgba(76, 111, 255, .18) 55%, rgba(76, 111, 255, 0) 72%),
    linear-gradient(180deg, rgba(36, 48, 140, .42) 0%, rgba(18, 22, 82, .62) 55%, rgba(10, 12, 48, .9) 100%);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}

/* Counter pill, top right */
.svc-intent__count {
  position: absolute;
  top: clamp(.85rem, 1vw, 1.25rem);
  right: clamp(.85rem, 1vw, 1.25rem);
  padding: .32em .8em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(5, 5, 11, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: clamp(.68rem, .64rem + .12vw, .78rem);
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.svc-intent__name {
  text-shadow: 0 1px 12px rgba(5, 5, 11, .35);
}

/* Description: collapsed at rest, so only the title sits at the bottom */
.svc-intent__text {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  translate: 0 .6rem;
  color: rgba(255, 255, 255, .88);
  transition:
    max-height .5s var(--ease-out),
    margin-top .5s var(--ease-out),
    opacity .3s ease,
    translate .5s var(--ease-out);
}

/* ---- Active state: hover (real pointers), keyboard focus, tapped ---- */
@media (hover: hover) {
  .svc-intent:hover {
    translate: 0 -6px;
    box-shadow: 0 0 0 1px rgba(124, 146, 255, .25), 0 22px 48px -16px rgba(76, 111, 255, .55);
  }
  .svc-intent:hover .svc-intent__media {
    transform: scale(1.08);
    filter: blur(2px) saturate(.85);
  }
  .svc-intent:hover::before { opacity: 1; }
  .svc-intent:hover .svc-intent__text {
    max-height: 9em;
    margin-top: clamp(.5rem, .7vw, .75rem);
    opacity: 1;
    translate: 0 0;
    color: rgba(255, 255, 255, .88);
    transition-delay: 0s, 0s, .08s, .04s;
  }
}

.svc-intent:focus-visible,
.svc-intent.is-open {
  translate: 0 -6px;
  box-shadow: 0 0 0 1px rgba(124, 146, 255, .25), 0 22px 48px -16px rgba(76, 111, 255, .55);
}
.svc-intent:focus-visible .svc-intent__media,
.svc-intent.is-open .svc-intent__media {
  transform: scale(1.08);
  filter: blur(2px) saturate(.85);
}
.svc-intent:focus-visible::before,
.svc-intent.is-open::before { opacity: 1; }
.svc-intent:focus-visible .svc-intent__text,
.svc-intent.is-open .svc-intent__text {
  max-height: 9em;
  margin-top: clamp(.5rem, .7vw, .75rem);
  opacity: 1;
  translate: 0 0;
  color: rgba(255, 255, 255, .88);
}

@media (prefers-reduced-motion: reduce) {
  .svc-intent,
  .svc-intent::before,
  .svc-intent__media,
  .svc-intent__text { transition: none; }
  .svc-intent,
  .svc-intent:hover,
  .svc-intent:focus-visible,
  .svc-intent.is-open { translate: none; }
  .svc-intent__media,
  .svc-intent:hover .svc-intent__media,
  .svc-intent:focus-visible .svc-intent__media,
  .svc-intent.is-open .svc-intent__media { transform: none; }
  .svc-intent__text { translate: none; }
}
