/* text-fx — entrance choreography for every section header and the small text blocks.
   All "hidden until animated" states hang off classes that text-fx.js adds (.fx-text-fx = prepared,
   .fx-text-fx-in = entered the viewport), and that script only runs when html.js is set.
   Without it nothing here matches and the plain markup shows. Transform and opacity only. */

.fx-text-fx{
  --fx-text-fx-out:cubic-bezier(.2,.8,.2,1);
  --fx-text-fx-spring:cubic-bezier(.3,1.35,.5,1);   /* a small overshoot that still fits inside the letter mask */
  --fx-text-fx-pull:cubic-bezier(.65,0,.2,1);
  --fx-text-fx-after:300ms;                         /* when the title letters are on their way; set per header in JS */
}

/* ---------- section header ---------- */
/* The static border keeps its 1px of height but goes clear; ::after is the drawn hairline on top of it. */
.js .sec-head.fx-text-fx{position:relative;border-bottom-color:transparent;--fx-text-fx-rule:var(--line)}
.js .sec-head.on-dark.fx-text-fx{--fx-text-fx-rule:rgba(255,255,255,.16)}
.js .sec-head.fx-text-fx::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--fx-text-fx-rule);transform:scaleX(0);transform-origin:0 50%;transition:transform .95s var(--fx-text-fx-pull)}
.js .sec-head.fx-text-fx-in::after{transform:none}

/* the needle: a vermilion tip that pulls the hairline across like a thread, then lets go */
.js .sec-head.fx-text-fx::before{content:"";position:absolute;left:0;right:0;bottom:-2px;height:3px;border-radius:2px;background:linear-gradient(90deg,transparent calc(100% - 64px),var(--verm));opacity:0;transform:translate3d(-100%,0,0);pointer-events:none}
.js .sec-head.fx-text-fx-in::before{animation:fx-text-fx-pull .95s var(--fx-text-fx-pull) both,fx-text-fx-glint .95s linear both}
@keyframes fx-text-fx-pull{from{transform:translate3d(-100%,0,0)}to{transform:none}}
@keyframes fx-text-fx-glint{0%{opacity:0}12%,74%{opacity:1}100%{opacity:0}}

/* title: each word is a mask (clipped on Y only, padded so descenders survive), each letter rises inside it.
   overflow:clip does not move the baseline, so the header keeps its alignment and height. */
.fx-text-fx-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}   /* the real title, for assistive tech */
.fx-text-fx-w{display:inline-block;white-space:nowrap;overflow-x:visible;overflow-y:clip;padding-block:.16em;margin-block:-.16em}
.fx-text-fx-ch{display:inline-block}
.js .fx-text-fx-ch{transform:translate3d(0,130%,0) rotate(8deg);transform-origin:0 100%;transition:transform .8s var(--fx-text-fx-spring)}
.js .fx-text-fx-in .fx-text-fx-ch{transform:none}

/* slash swings down into place like a dropped pin */
.js .sec-head.fx-text-fx .slash{opacity:0;transform:rotate(-80deg);transform-origin:50% 85%;transition:transform .75s var(--spring),opacity .2s linear;transition-delay:calc(var(--fx-text-fx-after) + 40ms)}
.js .sec-head.fx-text-fx-in .slash{opacity:1;transform:none}

/* (0X) index slides in from its own side while the number counts up */
.js .sec-head.fx-text-fx .idx{opacity:0;transform:translate3d(18px,0,0);transition:transform .7s var(--fx-text-fx-out),opacity .3s linear;transition-delay:calc(var(--fx-text-fx-after) + 200ms)}
.js .sec-head.fx-text-fx-in .idx{opacity:1;transform:none}

/* decode / count-up: the real text stays in the DOM (clear until settled), JS scribbles on an
   aria-hidden stand-in laid over it, so nothing reflows and assistive tech only ever gets the real words */
.fx-text-fx-txt{display:block;position:relative}
.js .fx-text-fx-real{opacity:0}
.js .fx-text-fx-done>.fx-text-fx-real{opacity:1}
.fx-text-fx-code{position:absolute;top:0;left:0;width:108%;max-width:calc(100% + 14px)}   /* a little slack: noise must not wrap sooner than the real line; capped under the 16px gutter so it can never widen the page */
.idx .fx-text-fx-code{left:auto;right:0;text-align:right}

/* ---------- line masks (lookbook intro, press note) ---------- */
.fx-text-fx-line{display:block;overflow-x:visible;overflow-y:clip;padding-bottom:.14em;margin-bottom:-.14em}
.fx-text-fx-line>span{display:block}
.js .fx-text-fx-line>span{transform:translate3d(0,118%,0);transition:transform 1.05s var(--fx-text-fx-out);transition-delay:calc(140ms + var(--i,0)*150ms)}
.js .fx-text-fx-in .fx-text-fx-line>span{transform:none}

/* No overflow:clip (Safari < 16): line masks fall back to overflow:hidden (blocks, no baseline to lose);
   title letters cannot be masked without moving the baseline, so they fade in as they rise instead. */
@supports not (overflow-y:clip){
  .fx-text-fx-line{overflow:hidden}
  .js .fx-text-fx-ch{opacity:0;transition:transform .8s var(--fx-text-fx-spring),opacity .3s linear}
  .js .fx-text-fx-in .fx-text-fx-ch{opacity:1}
}

/* ---------- lookbook intro ---------- */
.js .look-intro.fx-text-fx:not(.fx-text-fx-in) .sparkle{opacity:0}
.js .look-intro.fx-text-fx-in .sparkle{animation:fx-text-fx-pop .8s var(--spring) both,twinkle 3.6s ease-in-out .8s infinite}
.js .look-intro.fx-text-fx-in:not(.fx-text-fx-live) .sparkle{animation-play-state:paused}   /* the twinkle sleeps while the track has carried the intro off-screen */
@keyframes fx-text-fx-pop{from{transform:scale(0) rotate(-120deg)}to{transform:none}}

.js .look-intro.fx-text-fx>.label{opacity:0;transform:translate3d(-16px,0,0);transition:transform .8s var(--fx-text-fx-out),opacity .4s linear;transition-delay:.62s}
.js .look-intro.fx-text-fx-in>.label{opacity:1;transform:none}

/* "Keep scrolling →": the arrow leans back, darts forward, settles. Paused while the intro is off-screen. */
.js .look-intro.fx-text-fx .label b{display:inline-block;animation:fx-text-fx-nudge 1.9s cubic-bezier(.45,0,.3,1) 1.2s infinite paused}
.js .look-intro.fx-text-fx-in.fx-text-fx-live .label b{animation-play-state:running}   /* not before the entrance, so the first nudge lands just after the label arrives */
@keyframes fx-text-fx-nudge{0%,62%,100%{transform:none}14%{transform:translate3d(-.28em,0,0)}36%{transform:translate3d(.62em,0,0)}48%{transform:translate3d(.44em,0,0)}}

/* ---------- manifesto foot (wrapper only) ---------- */
.js .manifesto-foot.fx-text-fx{opacity:0;transform:translate3d(0,24px,0);transition:transform 1.1s var(--fx-text-fx-out) .25s,opacity .6s linear .25s}
.js .manifesto-foot.fx-text-fx-in{opacity:1;transform:none}
