/* The HTML image is always the base layer; WebGL only supplies slow folds. */
#hero {
  isolation: isolate;
  background: #fff;
}
#hero .hero-flow {
  --hero-flow-position-x: 50%;
  --hero-flow-position-y: 50%;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
  contain: paint;
  filter: saturate(.72);
  opacity: .86;
}
#hero .hero-flow > img,
#hero .hero-flow > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-flow-position-x) var(--hero-flow-position-y);
  pointer-events: none;
}
#hero .hero-flow > canvas { opacity: 0; }
#hero .hero-flow[data-renderer='webgl'] > canvas { opacity: 1; }
#hero .hero-flow::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #fff 8%, rgba(255,255,255,.97) 32%, rgba(255,255,255,.88) 43%, rgba(255,255,255,.5) 52%, rgba(255,255,255,0) 66%),
    linear-gradient(0deg, #fff 0%, rgba(255,255,255,.85) 4%, rgba(255,255,255,0) 20%);
  pointer-events: none;
}
#hero .hero-motion-toggle {
  position: absolute;
  right: max(24px, 4vw);
  bottom: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #c5d9e8;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #365c76;
  font: 500 11px/1.3 var(--sans, sans-serif);
  cursor: pointer;
}
#hero .hero-motion-toggle[hidden] { display: none; }
#hero .hero-motion-toggle::before {
  content: '';
  width: 7px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
#hero .hero-motion-toggle[aria-pressed='true']::before {
  width: 0;
  height: 0;
  border: 0;
  border-left: 7px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
#hero .hero-motion-toggle:hover {
  border-color: #6c9ab7;
  background: #fff;
  color: #00547d;
}
#hero .hero-motion-toggle:focus-visible {
  outline: 2px solid #006596;
  outline-offset: 4px;
}
@media (max-width: 700px) {
  #hero {
    min-height: 0;
    padding-top: 100px;
    padding-bottom: 185px;
  }
  #hero .hero-flow {
    --hero-flow-position-x: 78%;
    top: auto;
    bottom: 0;
    height: 300px;
  }
  #hero .hero-flow::after {
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.96) 19%, rgba(255,255,255,.3) 39%, rgba(255,255,255,0) 53%, rgba(255,255,255,0) 86%, #fff 100%);
  }
  #hero .hero-motion-toggle { right: 22px; bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #hero .hero-flow > canvas,
  #hero .hero-flow[data-renderer='webgl'] > canvas { opacity: 0; }
  #hero .hero-motion-toggle { display: none; }
}
