/* ===== Galaxy motion layer ===== */
:root{
  --gx-ease-out:cubic-bezier(.16,1,.3,1);      /* reveals: fast start, long soft landing */
  --gx-ease-sweep:cubic-bezier(.65,0,.15,1);   /* bar sweeps: theatrical in-out */
  --gx-ease-ui:cubic-bezier(.2,0,0,1);         /* hover/press */
}

/* Hover bar on buttons: static styling (also used under reduced motion, without transition) */
.gx-btn{position:relative;overflow:hidden}
.gx-btn::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:currentColor;pointer-events:none;
  clip-path:polygon(0 0,0 0,-3px 100%,0 100%)}
.gx-btn:focus-visible::after{clip-path:polygon(0 0,100% 0,calc(100% - 3px) 100%,0 100%)}
@media (hover:hover){.gx-btn:hover::after{clip-path:polygon(0 0,100% 0,calc(100% - 3px) 100%,0 100%)}}

@media (prefers-reduced-motion:no-preference){

  /* 1-3  Hero: lights go on */
  @keyframes gx-x-on{from{opacity:0;transform:scale(1.04)}}
  @keyframes gx-dim{from{opacity:.12;transform:translateY(.06em)}}
  @keyframes gx-rise{from{opacity:0;transform:translateY(16px)}}
  @keyframes gx-sweep{from{clip-path:polygon(0 0,0 0,calc(0% - var(--cut)) 100%,0 100%)}
                      to{clip-path:polygon(0 0,100% 0,calc(100% - var(--cut)) 100%,0 100%)}}

  .gx-hero-x{transform-origin:100% 50%;animation:gx-x-on 1800ms var(--gx-ease-out) both}
  .gx-eyebrow{animation:gx-rise 700ms var(--gx-ease-out) 150ms both}
  .gx-h1{animation:gx-dim 900ms var(--gx-ease-out) 200ms both}
  .gx-hero-bar{--cut:.21em;animation:gx-sweep 1000ms var(--gx-ease-sweep) 550ms both}
  .gx-lead{animation:gx-rise 700ms var(--gx-ease-out) 950ms both}
  .gx-ctas{animation:gx-rise 700ms var(--gx-ease-out) 1050ms both}

  /* 7  Gallery filter change (class flips gx-swap-a / gx-swap-b, restarting the animation) */
  @keyframes gx-shot-a{from{opacity:0;transform:translateY(12px) scale(.98)}}
  @keyframes gx-shot-b{from{opacity:0;transform:translateY(12px) scale(.98)}}
  .gx-swap-a .gx-shot{animation:gx-shot-a 460ms var(--gx-ease-out) both}
  .gx-swap-b .gx-shot{animation:gx-shot-b 460ms var(--gx-ease-out) both}
  .gx-gallery .gx-shot:nth-child(2){animation-delay:50ms}
  .gx-gallery .gx-shot:nth-child(3){animation-delay:100ms}
  .gx-gallery .gx-shot:nth-child(4){animation-delay:150ms}
  .gx-gallery .gx-shot:nth-child(n+5){animation-delay:200ms}

  /* 8  Buttons */
  .gx-btn::after{transition:clip-path 320ms var(--gx-ease-sweep)}
  .gx-btn,.gx-filters button{transition:transform 160ms var(--gx-ease-ui)}
  .gx-btn:active,.gx-filters button:active{transform:scale(.97)}

  /* 10  Mobile menu */
  @keyframes gx-menu{from{opacity:0;transform:translateY(-8px)}}
  @media (max-width:640px){
    .gx-nav.open{animation:gx-menu 260ms var(--gx-ease-out) both}
    .gx-nav.open a{animation:gx-menu 260ms var(--gx-ease-out) both}
    .gx-nav.open a:nth-child(2){animation-delay:30ms}
    .gx-nav.open a:nth-child(3){animation-delay:60ms}
    .gx-nav.open a:nth-child(4){animation-delay:90ms}
  }

  /* Scroll-driven: only where supported; elsewhere everything is simply static */
  @supports (animation-timeline:view()){
    @keyframes gx-reveal{from{opacity:0;transform:translateY(28px)}}
    @keyframes gx-slide{from{opacity:0;transform:translateX(48px)}}
    @keyframes gx-sticky-in{from{transform:translateY(100%)}}

    /* 4  Section-start bars echo the hero sweep */
    .gx-cut{--cut:6px;animation:gx-sweep linear both;animation-timeline:view();animation-range:cover 80px cover 300px}

    /* 5  Content reveals (fixed 240px scroll distance, independent of element height) */
    .gx-reveal,.gx-tile,.gx-about,.gx-gallery,.gx-contact{
      animation:gx-reveal var(--gx-ease-out) both;animation-timeline:view();animation-range:cover 0px cover 240px}
    .gx-tile:nth-child(even){animation-range:cover 60px cover 300px}

    /* 6  Swoosh photo glides in along the arc */
    .gx-over{overflow-x:clip} /* de inschuivende foto maakt de pagina anders breder op mobiel */
    .gx-swoosh{animation:gx-slide var(--gx-ease-out) both;animation-timeline:view();animation-range:cover 40px cover 360px}

    /* 9  Sticky bar rises once the hero CTAs have scrolled away */
    @media (max-width:640px){
      .gx-sticky{animation:gx-sticky-in var(--gx-ease-out) both;animation-timeline:scroll(root);animation-range:420px 560px}
    }
  }
}
