/* Maison Portico, motion (24 Nov 2026). One quiet language for the whole site: things settle into place; nothing
   bounces, spins or flies. Loaded by every page, home included, after the page's own styles.
   - On load (CSS only, so nothing flashes): the hero photograph settles, its words rise in reading order.
   - On scroll (motion.js marks only what is still below the fold): sections rise, photographs open like a curtain,
     paper settles, timelines draw, figures count, the notification arrives, the ledger turns green.
   - Nothing moves for people who ask for reduced motion, and nothing is hidden unless motion.js has marked it. */
:root{--mo-e:cubic-bezier(.16,.84,.24,1);--mo-soft:cubic-bezier(.2,.7,.2,1);--mo-spring:cubic-bezier(.2,1.25,.3,1)}

@media (prefers-reduced-motion:no-preference){
  @keyframes mo-rise{from{opacity:0;translate:0 26px}to{opacity:1;translate:0 0}}
  @keyframes mo-fade{from{opacity:0}to{opacity:1}}
  @keyframes mo-settle{from{scale:1.07}to{scale:1}}

  /* ---------- on load: the hero */
  .nav .in{animation:mo-fade 1s .05s both}
  .hero>img,.shero .ph img,.auth .photo img{animation:mo-settle 2.8s var(--mo-soft) both}
  .hero .copy .cap,.hero h1>span,.hero .sub,.hero .acts,.hero .go,.hero .inset,.hero .facts-band,.shero .tx>*,.lost>*{animation:mo-rise 1.1s var(--mo-e) both}
  .hero .copy .cap{animation-delay:.1s}
  .hero h1>span:nth-child(1){animation-delay:.18s}
  .hero h1>span:nth-child(2){animation-delay:.3s}
  .hero .sub{animation-delay:.46s}
  .hero .acts,.hero .go{animation-delay:.6s}
  .hero .facts-band{animation-delay:.74s}
  .hero .inset{animation-delay:.9s}
  .shero .tx>*:nth-child(2),.lost>*:nth-child(2){animation-delay:.12s}
  .shero .tx>*:nth-child(3),.lost>*:nth-child(3){animation-delay:.24s}
  .shero .tx>*:nth-child(4),.lost>*:nth-child(4){animation-delay:.36s}
  .shero .tx>*:nth-child(5){animation-delay:.48s}
  /* sign in and start: the step in front rises in, and so does the next one when it is shown */
  .auth .step>*{animation:mo-rise .9s var(--mo-e) both}
  .auth .step>*:nth-child(2){animation-delay:.08s}
  .auth .step>*:nth-child(3){animation-delay:.16s}
  .auth .step>*:nth-child(4){animation-delay:.24s}
  .auth .step>*:nth-child(5){animation-delay:.32s}
  .auth .step>*:nth-child(n+6){animation-delay:.4s}
  .auth .top{animation:mo-fade 1s .05s both}
  .auth .alt{animation:mo-rise .9s .5s var(--mo-e) both}
  .auth .foot{animation:mo-fade 1.2s .65s both}

  /* ---------- the menu: the sheet fades, its lines rise one after another */
  .msheet{animation:mo-fade .28s ease both}
  .msheet nav a{animation:mo-rise .7s var(--mo-e) both}
  .msheet nav a:nth-child(1){animation-delay:.04s}
  .msheet nav a:nth-child(2){animation-delay:.08s}
  .msheet nav a:nth-child(3){animation-delay:.12s}
  .msheet nav a:nth-child(4){animation-delay:.16s}
  .msheet nav a:nth-child(5){animation-delay:.2s}
  .msheet .pill{animation:mo-rise .7s .28s var(--mo-e) both}

  /* ---------- on scroll: marked by motion.js (html.mo-js), only below the fold */
  html.mo-js .mo{opacity:0;translate:0 28px;transition:opacity 1s var(--mo-e) var(--mo-d,0ms),translate 1.1s var(--mo-e) var(--mo-d,0ms)}
  html.mo-js .mo.mo-in{opacity:1;translate:0 0}
  /* photographs open like a curtain, the picture settling inside */
  html.mo-js .mo.mo-photo{translate:none;clip-path:inset(12% 0 0 0);transition:opacity .9s var(--mo-e) var(--mo-d,0ms),clip-path 1.4s var(--mo-e) var(--mo-d,0ms)}
  html.mo-js .mo.mo-photo.mo-in{clip-path:inset(0 0 0 0)}
  html.mo-js .mo.mo-photo img{scale:1.08;transition:scale 1.8s var(--mo-soft) var(--mo-d,0ms),transform .9s cubic-bezier(.2,.6,.2,1)}
  html.mo-js .mo.mo-photo.mo-in img{scale:1}
  /* a photo card's picture settles as the card rises */
  html.mo-js .rcard.mo .im img{scale:1.06;transition:scale 1.8s var(--mo-soft) var(--mo-d,0ms),transform .9s cubic-bezier(.2,.6,.2,1)}
  html.mo-js .rcard.mo.mo-in .im img{scale:1}
  /* paper settles on the desk */
  html.mo-js .mo.mo-paper{translate:0 48px;rotate:-.8deg;transition:opacity 1.1s var(--mo-e) var(--mo-d,0ms),translate 1.4s var(--mo-e) var(--mo-d,0ms),rotate 1.4s var(--mo-e) var(--mo-d,0ms)}
  html.mo-js .mo.mo-paper.mo-in{rotate:0deg}
  /* the notification arrives from the top of the screen */
  html.mo-js .mo.mo-note{translate:0 -18px;scale:.96;transition:opacity .6s ease var(--mo-d,0ms),translate .95s var(--mo-spring) var(--mo-d,0ms),scale .95s var(--mo-spring) var(--mo-d,0ms)}
  html.mo-js .mo.mo-note.mo-in{scale:1}
  /* the end state of every kind that starts somewhere else: said last, so a start position never outlives the motion */
  html.mo-js .mo.mo-note.mo-in,html.mo-js .mo.mo-paper.mo-in{translate:0 0}
  /* the kit: the card from the left, the statement from the right */
  html.mo-js .mo.mo-kit .bc,html.mo-js .mo.mo-kit .dash{opacity:0;transition:opacity 1s var(--mo-e),translate 1.3s var(--mo-e)}
  html.mo-js .mo.mo-kit .bc{translate:-28px 0}
  html.mo-js .mo.mo-kit .dash{translate:28px 0;transition-delay:.15s}
  html.mo-js .mo.mo-kit{translate:none}
  html.mo-js .mo.mo-kit.mo-in .bc,html.mo-js .mo.mo-kit.mo-in .dash{opacity:1;translate:0 0}

  /* timelines draw: the line from left to right, then each dot in turn (on a phone, the rail from top to bottom) */
  @media (min-width:1181px){
    html.mo-js .mo-line{border-top-color:transparent!important;position:relative}
    html.mo-js .mo-line::after{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:var(--hair);transform:scaleX(0);transform-origin:left;transition:transform 1.6s var(--mo-e)}
    html.mo-js .mo-line.mo-drawn::after{transform:none}
  }
  html.mo-js .mo-line li::before,html.mo-js .mo-line .t::before{scale:0;transition:scale .7s var(--mo-spring) var(--mo-dot,0ms)}
  html.mo-js .mo-line.mo-drawn li::before,html.mo-js .mo-line.mo-drawn .t::before{scale:1}
  html.mo-js .wk.mo-line li::after{transform:scaleY(0);transform-origin:top;transition:transform .9s var(--mo-e) var(--mo-dot,0ms)}
  html.mo-js .wk.mo-line.mo-drawn li::after{transform:none}

  /* the estimate's bars grow, month by month */
  html.mo-js .bars.mo-bars i{transform:scaleY(0);transform-origin:bottom;transition:height .3s,transform 1s var(--mo-e) var(--mo-d,0ms)}
  html.mo-js .bars.mo-bars.mo-drawn i{transform:none}

  /* the ledger: the signed home turns green */
  .ledger .st{transition:background .7s ease,color .7s ease}

  /* text links: the underline draws away on hover and comes back from the left */
  .ul{text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/100% 1px no-repeat;padding-bottom:3px;transition:background-size .5s cubic-bezier(.6,0,.2,1)}
  .ul:hover{background-position:100% 100%;background-size:0 1px}
  /* buttons give way a little under the finger */
  .pill{transition:opacity .2s,scale .18s ease}
  .pill:active{scale:.97}
}
