/* Koo motion. One entrance per page, one scroll story, and feedback on every action.
   Everything sits behind prefers-reduced-motion: no-preference. */
:root{--ease-out:cubic-bezier(.22,1,.36,1);--ease-io:cubic-bezier(.65,0,.35,1)}

/* Cross-page transitions (Chrome/Edge 126+, Safari 18.2+; other browsers just navigate) */
@view-transition{navigation:auto}
@media (prefers-reduced-motion: no-preference){
  ::view-transition-old(root){animation:kooOut .22s ease-in both}
  ::view-transition-new(root){animation:kooIn .42s var(--ease-out) both}
  ::view-transition-group(hero-img){animation-duration:.55s;animation-timing-function:var(--ease-out)}
}
@keyframes kooOut{to{opacity:0}}
@keyframes kooIn{from{opacity:0;transform:translateY(14px)}}

/* Click feedback stays on for everyone (it is not decorative) */
.pill,.chip,.size,.btn,.cta,.opt,.frow .check,.sw{transition:background-color .16s,color .16s,border-color .16s,outline-color .16s}
:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.acc .c{display:grid;grid-template-rows:0fr;padding:0}
.acc .c > div{overflow:hidden}
.acc.open .c{grid-template-rows:1fr;padding:0 0 18px}
.acc .h{cursor:pointer}

@media (prefers-reduced-motion: no-preference){
  .acc .c{transition:grid-template-rows .32s var(--ease-out),padding .32s var(--ease-out)}

  /* 1. Page entrance: headline words rise out of a mask, figure rises, strips weave in */
  .js .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.06em;margin-bottom:-.06em}
  .js .w > span{display:inline-block;transform:translateY(105%);transition:transform .9s var(--ease-out);transition-delay:calc(var(--i) * 45ms + 120ms)}
  .js .ready .w > span{transform:none}
  .js [data-rise]{opacity:0;transform:translateY(48px);transition:opacity 1.1s var(--ease-out),transform 1.3s var(--ease-out);transition-delay:.05s}
  .js .ready [data-rise]{opacity:1;transform:none}
  .js .strip .t{clip-path:inset(0 100% 0 0);transition:clip-path .8s var(--ease-io);transition-delay:calc(var(--i) * 80ms + 450ms)}
  .js .ready .strip .t{clip-path:inset(0 0 0 0)}
  .js [data-fade]{opacity:0;transition:opacity .8s ease .7s}
  .js .ready [data-fade]{opacity:1}
  .js .prog .bar b{width:0;transition:width 1.4s var(--ease-out) .9s}
  .js .ready .prog .bar b{width:54px}

  /* 2. The archive fan: cloths spread out from a stack when the section arrives */
  .js .fan .c{transition:left 1s var(--ease-out),top 1s var(--ease-out),transform 1s var(--ease-out),opacity .6s;transition-delay:calc(var(--d) * 70ms)}
  .js .fan:not(.open) .c{left:570px!important;top:40px!important;transform:rotate(0) scale(.9)!important}

  /* 3. Product cards: hovering shows the cloth up close */
  .card .img .alt{position:absolute;inset:0;opacity:0;transition:opacity .35s ease}
  .card:hover .img .alt{opacity:1}

  /* 4. Add-to-bag confirmation */
  .bump{animation:bump .5s var(--ease-out)}
  @keyframes bump{30%{transform:scale(1.12)}}
}

/* Any desktop width: motion.js scales the 1440px layout; keep short controls on one line and frame ultra-wide screens */
.pill,.chip,button,.btn{white-space:nowrap}
body{background:var(--paper)}
html.wide body{background:#100D0B}
