/* 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}
}

/* The user's explicit choice takes precedence over the system motion preference. */
.motion-toggle{position:fixed;right:22px;bottom:22px;z-index:45;min-height:44px;padding:11px 17px;border:1px solid #80dbff;border-radius:24px;background:#041122ed;color:#fff;font:inherit;font-size:14px;box-shadow:0 3px 18px #0005;cursor:pointer}
.motion-toggle:hover{background:#12344e}
.motion-toggle:focus-visible{outline:3px solid #80e2ff;outline-offset:4px}
html:has(body.interaction-motion-paused){scroll-behavior:auto}
body.hover-feedback.interaction-motion-paused *,body.hover-feedback.interaction-motion-paused *::before,body.hover-feedback.interaction-motion-paused *::after{transition:none!important;animation:none!important}
:root body.hover-feedback.interaction-motion-paused [data-feedback][data-feedback]{scale:1!important;transition:none!important;animation:none!important}
body.hover-feedback.interaction-motion-paused .brain-label{transform:translate(-50%,-50%)!important}
body.hover-feedback.interaction-motion-paused .brain-label>span,body.hover-feedback.interaction-motion-paused .brain-region.is-active{transform:none!important}
@media(max-width:760px){
  .motion-toggle{right:12px;bottom:calc(70px + env(safe-area-inset-bottom));padding:9px 13px;font-size:13px;min-height:44px}
  .motion-ready .journey{height:340svh}
  .motion-ready .scene-light{display:none!important}
  .motion-ready.earth-available .scene-cosmos .earth-layer{display:block;will-change:transform,opacity}
  .motion-ready .scene-picture{will-change:opacity}
  .motion-ready .scene-landscape>img,.motion-ready .scene-copy{will-change:auto}
  .motion-ready .scene-copy{bottom:150px;top:auto;transform:none!important}
}
@media print{.motion-toggle{display:none!important}}
