/* Estate selector scroll edge fade (4 Dec 2026, Joseph's motion brief).
   Cards rise 16 px and fade in at the bottom edge, and fade out as they pass
   under the sticky glass header. Driven by CSS scroll timelines on the
   compositor: transform/opacity only, no JS per frame. On by default;
   ?scrollfx=none turns it off (scrollfx.js sets html[data-sfx]).

   Tried and dropped under the brief and the animate review: a momentum
   trail (drove 84 cards' transforms from one parent variable, restyling
   every card each frame, and it was decoration on a list people read) and a
   velocity blur (filter, outside the transform/opacity guardrail).

   Reduced motion keeps a plain opacity fade, no movement. */

@supports (animation-timeline: view()) {
  /* the cards/map pane slider clips with overflow:hidden, which makes it a
     scroll container that never scrolls, so view() would bind to it. clip
     clips the same without being a scroll container (it slides by transform) */
  html[data-sfx~="edge"] #hausSelect .hausViewPort { overflow: clip; }
  html[data-sfx~="edge"] #hausSelect .hausCard {
    animation: sfxEdge linear both;
    /* the top inset is the sticky glass header, so cards finish fading
       as they slide under it rather than at the screen's top edge */
    animation-timeline: view(block 3.5rem 0);
    animation-range: entry 0% exit 100%;
  }
  @keyframes sfxEdge {
    entry 0%   { opacity: 0;  translate: 0 1rem; scale: .98; }
    entry 85%  { opacity: 1;  translate: 0 0;    scale: 1; }
    exit 30%   { opacity: 1;  translate: 0 0; }
    exit 100%  { opacity: 0;  translate: 0 -.6rem; }
  }
  @keyframes sfxEdgeFade {
    entry 0%   { opacity: 0; }
    entry 85%  { opacity: 1; }
    exit 30%   { opacity: 1; }
    exit 100%  { opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    html[data-sfx~="edge"] #hausSelect .hausCard { animation-name: sfxEdgeFade; }
  }
}
