/* Prosperus · v3.10 motion system. Glass & Light: light moves, content settles.
   One easing family, a short duration scale, nothing bounces. Everything stops under reduced motion. */
:root{--m-ease:cubic-bezier(.2,.8,.2,1); --m-1:120ms; --m-2:250ms; --m-3:450ms; --m-4:800ms}

@media (prefers-reduced-motion:no-preference){
  /* Reveals: fade and rise 12px, one curve. */
  .rv{transform:translateY(12px); transition:opacity var(--m-4) var(--m-ease), transform var(--m-4) var(--m-ease)}

  /* Glass P: a specular glint crosses the disc and the rod every 9 seconds. */
  .gp .disc,.gp .rod{overflow:hidden}
  .gp .disc::after,.gp .rod::before{content:""; position:absolute; inset:-20%; pointer-events:none; border-radius:inherit;
    background:linear-gradient(115deg, transparent 38%, rgba(255,255,255,.75) 48%, rgba(246,200,224,.35) 52%, transparent 60%);
    transform:translateX(-120%); animation:gp-glint 9s var(--m-ease) infinite}
  .gp .rod::before{animation-delay:.18s}
  @keyframes gp-glint{0%,72%{transform:translateX(-120%)} 88%,100%{transform:translateX(120%)}}

  /* Caustics: light on stone shimmers slowly, never flickers. */
  .caustic{animation:caustic-breathe 7s ease-in-out infinite alternate}
  .caustic.sharp{animation-duration:5s; animation-delay:-2s}
  @keyframes caustic-breathe{0%{opacity:.6; transform:scaleX(.94)} 100%{opacity:1; transform:scaleX(1.05)}}
  .caustic{background-size:200% 200%}

  /* Each section gets its own light path instead of the same drift everywhere. */
  .sec:nth-of-type(3n) .field i{animation-name:drift-b}
  .sec:nth-of-type(3n+1) .field i{animation-name:drift-c}
  @keyframes drift-b{0%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(-7%,4%,0) scale(1.06)} 100%{transform:translate3d(5%,-6%,0) scale(.96)}}
  @keyframes drift-c{0%{transform:translate3d(0,0,0) rotate(0) scale(1)} 50%{transform:translate3d(4%,7%,0) rotate(8deg) scale(1.1)} 100%{transform:translate3d(-6%,-3%,0) rotate(-6deg) scale(.97)}}

  /* Hero light follows the scroll where the browser supports scroll-driven animation. */
  @supports (animation-timeline:scroll()){
    .hero4 .field{animation:hero-light linear both; animation-timeline:scroll(root); animation-range:0 90vh}
    .hero4 .stage4{animation:hero-stage linear both; animation-timeline:scroll(root); animation-range:0 90vh}
    @keyframes hero-light{to{transform:translateY(-8%) scale(1.06); opacity:.55}}
    @keyframes hero-stage{to{transform:translateY(-36px)}}
  }

  /* Buttons and glass panes answer quickly and lift by light, not by size. */
  .btn{transition:transform var(--m-2) var(--m-ease), box-shadow var(--m-3) var(--m-ease), background-color var(--m-2) var(--m-ease)}
  .btn:hover{transform:translateY(-1px)}
}
@media (prefers-reduced-motion:reduce){
  .gp .disc::after,.gp .rod::before{display:none}
  .caustic,.hero4 .field,.hero4 .stage4{animation:none!important}
}

/* v3.10 · Hero light loop is the primary hero visual. The CSS glass stage and colour field step aside. */
.hero4{position:relative; isolation:isolate; overflow:hidden}
.hero4:has(.hero-film){min-height:min(92vh,900px); display:flex; align-items:center}
.hero4:has(.hero-film) > .wrap{width:100%}
.hero4:has(.hero-film) .stage4,.hero4:has(.hero-film) > .field,.hero4:has(.hero-film) > .sweep{display:none}
.hero-film{position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; background:#E3DED5 url("../video/hero-light-loop-poster.jpg") 70% 50%/cover no-repeat}
.hero-film video{width:100%; height:100%; object-fit:cover; object-position:70% 50%}
.hero-film::after{content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(232,227,218,.94) 0%, rgba(232,227,218,.78) 30%, rgba(232,227,218,.15) 55%, rgba(232,227,218,0) 70%)}
:root[data-theme="dark"] .hero-film video{filter:brightness(.62) saturate(.85)}
:root[data-theme="dark"] .hero-film::after{background:linear-gradient(90deg, rgba(15,23,32,.92) 0%, rgba(15,23,32,.72) 32%, rgba(15,23,32,.12) 58%, rgba(15,23,32,0) 72%)}
.hero-film-label{position:absolute; right:clamp(16px,3vw,40px); bottom:clamp(12px,2vw,24px); z-index:2; font-size:10.5px; opacity:.7}
@media (prefers-reduced-motion:reduce){.hero-film video{display:none}}
@media (max-width:760px){
  .hero-film video{object-position:78% 50%}
  .hero-film::after{background:linear-gradient(180deg, rgba(232,227,218,.92) 0%, rgba(232,227,218,.82) 52%, rgba(232,227,218,.1) 78%, rgba(232,227,218,0) 100%)}
  :root[data-theme="dark"] .hero-film::after{background:linear-gradient(180deg, rgba(15,23,32,.9) 0%, rgba(15,23,32,.78) 52%, rgba(15,23,32,.1) 80%, rgba(15,23,32,0) 100%)}
}
/* Hero film: no seam into the next section, and a label that reads on any frame. */
.hero-film::before{content:""; position:absolute; left:0; right:0; bottom:0; height:22%; z-index:1; background:linear-gradient(0deg, var(--clear) 0%, transparent 100%)}
.hero-film-label{color:#fff; text-shadow:0 1px 6px rgba(15,23,32,.55); bottom:clamp(40px,7vh,72px)}
@media (max-width:760px){
  .hero4:has(.hero-film){align-items:flex-start; min-height:0; padding-bottom:78vw}
  .hero-film video{object-position:72% 100%}
  .hero-film::after{background:linear-gradient(180deg, rgba(232,227,218,.95) 0%, rgba(232,227,218,.88) 48%, rgba(232,227,218,0) 70%)}
  :root[data-theme="dark"] .hero-film::after{background:linear-gradient(180deg, rgba(15,23,32,.94) 0%, rgba(15,23,32,.84) 48%, rgba(15,23,32,0) 70%)}
}
