/* Shared public-site button hover: buttons fade into the gold end of the
   manifesto masthead (public/manifesto.css .mf-hero-band, 150deg).
   Gradients cannot be transitioned, so a ::before overlay carries the gold
   gradient and only its opacity animates. Linked last on public pages only;
   the private /review and /updates UI and the application flow's .app-button
   steps deliberately do not load or match this file.
   Text on hover is #1e2622: 10.06:1 on #e8ce8c (lightest stop) and 6.71:1 on
   #c9a65c (deepest stop), so WCAG AA holds at every point of the gradient. */
:root{
  --oak-hover-gold:linear-gradient(150deg,#e8ce8c 0%,#d8b871 50%,#c9a65c 100%);
  --oak-hover-ink:#1e2622;
  --oak-hover-time:.35s;
}

html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe){
  position:relative;
  isolation:isolate;
  transition:background-color var(--oak-hover-time) ease,color var(--oak-hover-time) ease,border-color var(--oak-hover-time) ease,box-shadow .25s ease,transform .25s ease;
}
html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe)::before{
  content:"";
  position:absolute;
  inset:-1px; /* cover the 1px border too; painted above the button's own border */
  z-index:-1;
  border-radius:inherit;
  background:var(--oak-hover-gold);
  opacity:0;
  pointer-events:none;
  transition:opacity var(--oak-hover-time) ease;
}
html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe):not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible){
  color:var(--oak-hover-ink);
  border-color:transparent;
}
html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe):not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible)::before{
  opacity:1;
}
/* Buttons that also scroll-reveal (builder.css [data-enter]) keep their
   entrance timing and delay for opacity/transform, plus the colour fade. */
@media (prefers-reduced-motion:no-preference){
  html.builder-motion:root:not(.reduce-motion) :is(.button,.action-pill)[data-enter]{
    transition-property:opacity,transform,background-color,color,border-color,box-shadow;
    transition-duration:.65s,.85s,var(--oak-hover-time),var(--oak-hover-time),var(--oak-hover-time),.25s;
    transition-timing-function:ease,cubic-bezier(.16,1,.3,1),ease,ease,ease,ease;
    transition-delay:var(--enter-delay,0ms),var(--enter-delay,0ms),0s,0s,0s,0s;
  }
}
@media (prefers-reduced-motion:no-preference) and (max-width:640px){
  html.builder-motion:root:not(.reduce-motion) :is(.button,.action-pill)[data-enter]{
    transition-duration:.5s,.65s,var(--oak-hover-time),var(--oak-hover-time),var(--oak-hover-time),.25s;
  }
}
/* Focus rings are left to each page's existing :focus-visible rules (they sit
   outside the button against the page background, so they stay visible),
   except the manifesto's top download button: its gold ring on cream would
   blur into the now-gold button, so it gets the site's dark green instead. */
html:root .manifesto-page .mf-hero-actions .mf-download:focus-visible{outline-color:#203c2e}

@media (prefers-reduced-motion:reduce){
  html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe),
  html:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe)::before{transition:none}
}
html.reduce-motion:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe),
html.reduce-motion:root :is(.button,.action-pill,.mf-download,.mf-apply,.manifesto-excerpt-link,.nl-pop-subscribe)::before{transition:none}
