/* Explicit control classes cover every page without scaling SVG hit targets.
   Direct desktop feedback remains independent of automatic background motion. */
:root{--feedback-duration:650ms;--feedback-scale:1.16;--feedback-link-scale:1.08;--feedback-ink:#041329;--brain-rest-opacity:.64}

.brain-dimmer{opacity:0;pointer-events:none;transition:opacity 220ms ease}
.brain-stage.has-selection .brain-dimmer{opacity:var(--brain-rest-opacity)}

/* Same bright fill for buttons and text links, with readable dark lettering. */
body.hover-feedback [data-feedback="button"]:not(.brain-label):not(:disabled):is(:hover,:focus-visible,.is-active),
body.hover-feedback [data-feedback="link"]:is(:hover,:focus-visible){
  color:var(--feedback-ink);
  background:#fff;
  border-color:#fff;
  text-shadow:none;
  box-shadow:0 0 0 2px #ffffffa8,0 0 24px #dcfbffff,0 0 58px #4ddcffbd,0 12px 28px #00132773;
}
body.hover-feedback [data-feedback="link"]:is(:hover,:focus-visible){
  border-radius:5px;
  box-shadow:0 0 0 5px #fff,0 0 24px #dcfbffff,0 0 58px #4ddcffbd;
}
body.hover-feedback .brain-label:is(:hover,:focus-visible,.is-active){
  color:var(--feedback-ink);
  background:#fff;
  background:color-mix(in srgb,var(--service-color) 15%,white);
  border-color:#fff;
  box-shadow:0 0 0 2px #ffffff99,0 0 24px #ffffffba,0 0 48px var(--service-color),0 10px 28px #0008;
}
body.hover-feedback .brain-label:is(:hover,:focus-visible,.is-active)>span,
body.hover-feedback .service-choice:is(:hover,:focus-visible,.is-active) :is(h3,p,.choice-index,.choice-arrow){color:var(--feedback-ink)}

@media(min-width:761px){
  body.hover-feedback :is(.journey,.contact,.detail-contact) .actions{gap:clamp(48px,4.4vw,72px)}
  /* Inline text must have a box to enlarge; preserve existing flex summaries,
     back links and the skip link's hidden-position transform. */
  body.hover-feedback a[data-feedback="link"]:not(.back-services):not(.skip-link){display:inline-block}
  body.hover-feedback [data-feedback="link"]{transform-origin:left center}
  body.hover-feedback :is(.nav,.detail-nav,.footer) [data-feedback="link"]{transform-origin:center}
  body.hover-feedback .contact-details a[data-feedback="link"]{justify-self:start;max-width:100%}

  body.hover-feedback [data-feedback="button"]:not(.brain-label),
  body.hover-feedback [data-feedback="link"],
  body.hover-feedback .brain-label{
    scale:1;
    /* Specificity deliberately beats the older background-pause rules. */
    transition:scale var(--feedback-duration) ease-in-out,transform var(--feedback-duration) ease-in-out,background-color var(--feedback-duration) ease-in-out,color var(--feedback-duration) ease-in-out,border-color var(--feedback-duration) ease-in-out,box-shadow var(--feedback-duration) ease-in-out!important;
  }
  body.hover-feedback [data-feedback="button"]:not(.brain-label){transform:none!important;transform-origin:center}
  body.hover-feedback .brain-label{transform:translate(-50%,-50%)!important;transform-origin:center}
  body.hover-feedback [data-feedback="button"]:not(.brain-label):not(:disabled):is(:hover,:focus-visible,.is-active){scale:var(--feedback-scale);z-index:5}
  body.hover-feedback [data-feedback="link"]:is(:hover,:focus-visible){scale:var(--feedback-link-scale);z-index:5}
  body.hover-feedback .brain-label:is(:hover,:focus-visible,.is-active){transform:translate(-50%,-50%) scale(var(--brain-label-hover-scale))!important;z-index:5}

  /* Cards also act as full buttons; leave room around their enlarged edges. */
  body.hover-feedback .service-choices{gap:clamp(24px,3vw,48px);border:0}
  body.hover-feedback .service-choice{border:1px solid #30415c;border-radius:6px}
  body.hover-feedback .detail-nav{column-gap:36px;row-gap:18px}
  body.hover-feedback .brand{position:relative}
}
@media(min-width:761px) and (max-width:1100px){
  body.hover-feedback .service-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Mobile retains static controls, including the fixed call/email bar. */
@media(max-width:760px){
  body.hover-feedback [data-feedback]{scale:1!important;transition:none!important}
  .brain-dimmer{display:none}
}
@media print{body.hover-feedback [data-feedback]{scale:1!important;box-shadow:none!important}}
/* Keep keyboard navigation above the fixed header when it becomes visible. */
body.hover-feedback .skip-link:is(:hover,:focus-visible){z-index:100}

/* Header brand/navigation keep their theme colour and use enlargement only. */
body.hover-feedback .header a[data-feedback="link"]:is(:hover,:focus-visible){
  color:inherit;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  text-shadow:inherit;
}
body.hover-feedback .header .nav a:not(.active):hover:after{right:100%}
@media(min-width:761px){
  body.hover-feedback .header .nav a[data-feedback="link"]:is(:hover,:focus-visible){scale:1.32}
}
