/* VITESSE motion layer (v3, 2026-10-15).
   Nothing here hides content unless html.m-arm is set, and the inline arming script in
   each page's head removes m-arm 1.2s after DOMContentLoaded (6s at most) if motion.js never finishes wiring. motion.js
   reveals on scroll (the real mechanism) with IntersectionObserver as an optimisation,
   and reveals everything at 15s no matter what. Reduced motion never arms. */

/* page to page: a soft cross-fade where the browser supports it */
@view-transition{navigation:auto}
::view-transition-old(root){animation:mvtout .28s ease both}
::view-transition-new(root){animation:mvtin .42s cubic-bezier(.2,.7,.2,1) both}
@keyframes mvtout{to{opacity:0;transform:translateY(-6px)}}
@keyframes mvtin{from{opacity:0;transform:translateY(10px)}}

/* 1. split headings: each word rises out of its own mask */
.mw{display:inline-block;overflow:hidden;vertical-align:top;padding:0 .06em .14em 0;margin:0 -.06em -.14em 0}
.mwi{display:inline-block;will-change:transform}
html.m-arm .m-split .mwi{transform:translateY(112%) rotate(4deg);transform-origin:0 100%;transition:transform .95s cubic-bezier(.16,.84,.24,1);transition-delay:calc(var(--i,0) * 55ms + var(--d0,0ms))}
html.m-arm .m-split.m-in .mwi{transform:none}

/* 2. fade-up for supporting copy, chips, list items and cards */
html.m-arm .m-up{opacity:0;transform:translateY(22px);transition:opacity .8s ease,transform .9s cubic-bezier(.16,.84,.24,1);transition-delay:calc(var(--i,0) * 70ms + var(--d0,0ms))}
html.m-arm .m-up.m-in{opacity:1;transform:none}

/* 3. photographs: a curtain that opens, with the picture settling inside it */
html.m-arm .rv{opacity:0;transform:translateY(26px) scale(.985)!important;clip-path:inset(16% -90px 16% -90px);transition:opacity .9s ease,transform 1.1s cubic-bezier(.16,.84,.24,1),clip-path 1.2s cubic-bezier(.16,.84,.24,1)!important}
html.m-arm .rv.rv-in{opacity:1;transform:none!important;clip-path:inset(-90px -90px -90px -90px)}
html.m-arm .rv img,html.m-arm img.rv{scale:calc(var(--ps,1) * 1.1);transition:scale 1.8s cubic-bezier(.16,.84,.24,1)}
html.m-arm .rv.rv-in img,html.m-arm img.rv.rv-in{scale:var(--ps,1)}

/* 4. parallax targets get a little extra picture to move through */
.m-px{--ps:1.1;scale:var(--ps)}
.m-px-frame{overflow:hidden}

/* 5. the hero entrance on load */
html.m-arm .m-hero-img{clip-path:inset(8% 8% 8% 8% round 24px);opacity:0;transition:clip-path 1.5s cubic-bezier(.16,.84,.24,1) .25s,opacity .9s ease .25s}
html.m-arm.m-loaded .m-hero-img{clip-path:inset(0 0 0 0 round 0);opacity:1}
.m-kb{animation:mkb 16s cubic-bezier(.2,.6,.2,1) both}
@keyframes mkb{from{scale:1.08}to{scale:1}}

/* 6. a soft spotlight that follows the pointer across cards */
.msp{position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:2;opacity:0;transition:opacity .35s ease;
  background:radial-gradient(420px circle at var(--gx,50%) var(--gy,50%),var(--spc,rgba(184,155,94,.16)),transparent 45%)}
.m-spot:hover>.msp{opacity:1}
.m-spot.m-dark{--spc:rgba(255,255,255,.08)}

/* 7. magnetic buttons */
.m-mag{transition:translate .35s cubic-bezier(.2,.7,.2,1)}

/* 8. header: hides on the way down, returns on the way up */
.nav{transition:transform .45s cubic-bezier(.2,.7,.2,1),box-shadow .3s,background .3s!important}
.nav.m-hide{transform:translateY(-110%)}

/* 9. a brass scroll line */
#pgbar{background:linear-gradient(90deg,#B89B5E,#E3D7BF 60%,#B89B5E)!important;height:2px!important;box-shadow:0 0 12px rgba(227,215,191,.6)}


/* 11. drifting light motes in the dark bands */
.mmotes{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.mmotes i{position:absolute;bottom:-12px;width:6px;height:6px;border-radius:50%;opacity:0;
  background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.85),rgba(227,215,191,.35));animation:mmote 14s linear infinite}
@keyframes mmote{0%{transform:translate(0,0);opacity:0}12%{opacity:.6}85%{opacity:.35}100%{transform:translate(24px,-520px);opacity:0}}
.memband,.closer,.quizband,.revdark,.board,.mhero,.pagehero,.hero.lux{position:relative}
.memband>.wrap,.closer>.wrap,.quizband>.wrap,.board>.wrap,.mhero>.wrap,.pagehero>.wrap{position:relative;z-index:1}

/* 12. small living details */
.herobag{animation:mbob 5.5s ease-in-out infinite}
@keyframes mbob{0%,100%{translate:0 0}50%{translate:0 -7px}}
.sticky .btn:not(.ghost){animation:mpulse 6s ease-in-out infinite}
@keyframes mpulse{0%,82%,100%{box-shadow:0 10px 26px -10px rgba(184,155,94,.7),0 0 0 0 rgba(184,155,94,.45)}90%{box-shadow:0 10px 26px -10px rgba(184,155,94,.7),0 0 0 12px rgba(184,155,94,0)}}
.lineup img{animation:mpan 28s ease-in-out infinite alternate}
@keyframes mpan{from{object-position:38% 30%}to{object-position:62% 30%}}
.goldoffer{position:relative;overflow:hidden}
.goldoffer::after{content:"";position:absolute;top:0;left:-40%;width:30%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);transform:skewX(-18deg);animation:msheen 7s ease-in-out infinite;pointer-events:none}
@keyframes msheen{0%,70%{left:-40%}100%{left:130%}}
.tchip,.ao,.lchip,.areachips span{transition:transform .25s,border-color .25s,background .25s}
.tchip:hover,.ao:hover,.areachips span:hover{transform:translateY(-2px)}
.pcard img,.cframe img,.mframe img,.gimg img,.tcard img,.sframe img{transition:transform .9s cubic-bezier(.2,.7,.2,1),scale 1.8s cubic-bezier(.16,.84,.24,1)}
.pcard:hover img,.cframe:hover img,.mframe:hover img{transform:scale(1.045)}

/* the sticky bar sits on dark glass so both buttons read */
.sticky{background:rgba(20,26,22,.9)!important;border-top:1px solid rgba(184,155,94,.3)!important;backdrop-filter:blur(12px)}
.sticky .sp{color:#E8EEE6!important}
.sticky .btn.ghost{color:#F2F5F0!important;border-color:rgba(255,255,255,.45)!important;background:transparent!important}

/* the safety net: anything still hidden after a while is simply shown */
html.m-settled .m-up,html.m-settled .m-split .mwi,html.m-settled .rv,html.m-settled .m-hero-img{opacity:1!important;transform:none!important;clip-path:none!important}

@media (prefers-reduced-motion: reduce){
  ::view-transition-old(root),::view-transition-new(root){animation:none}
  .m-kb,.herobag,.sticky .btn,.lineup img,.goldoffer::after,.mmotes i{animation:none!important}
  .mmotes{display:none}
}
