/* closing-reveal — the finale inside the charcoal panel and the footer.
   Every "hidden until animated" state hangs off .fx-closing-reveal, a class this module's own JS
   puts on .closing after it has built its wrappers. No JS or reduced motion = the plain page.
   Stage roots (.sec-head, .closing-main, .footer) get .fx-closing-reveal-in when their turn comes;
   --fx-closing-reveal-wait pushes a stage back when the one before it has only just started. */

.fx-closing-reveal{
  --fx-closing-reveal-ease:cubic-bezier(.22,.61,.36,1);
  --fx-closing-reveal-wait:0ms;
  --fx-closing-reveal-gap:clamp(24px,4vw,70px); /* same value as the .closing-main grid gap */
}

/* ---------- drawn hairlines (replace the three static borders) ---------- */
.fx-closing-reveal-rule{position:absolute;left:0;right:0;height:1px;background:rgba(255,255,255,.16);transform:scaleX(0);transition:transform .7s var(--fx-closing-reveal-ease);pointer-events:none}
.fx-closing-reveal-in>.fx-closing-reveal-rule{transform:none}

/* ---------- stage 1: section header drops out of its top edge, then its rule draws right to left ----------
   The text-fx module prepares every .sec-head on the page (letters, slash, index, its own drawn rule).
   Where it has (.fx-text-fx), this header is left to it, so the two entrances never fight. */
.fx-closing-reveal .sec-head:not(.fx-text-fx){position:relative;overflow:hidden;border-bottom-color:transparent;padding-top:.25em;margin-top:-.25em}
.fx-closing-reveal .sec-head:not(.fx-text-fx)>*{transform:translate3d(0,-72px,0);transition:transform .5s var(--fx-closing-reveal-ease) var(--fx-closing-reveal-wait)}
.fx-closing-reveal .sec-head:not(.fx-text-fx)>.fx-closing-reveal-rule{bottom:0;transform:scaleX(0);transform-origin:100% 50%;transition-duration:.7s;transition-delay:calc(var(--fx-closing-reveal-wait) + 380ms)}
.fx-closing-reveal .sec-head.fx-closing-reveal-in:not(.fx-text-fx)>*{transform:none}
.sec-head.fx-text-fx>.fx-closing-reveal-rule{display:none}

/* ---------- stage 2: divider grows up between headline and side column; the column arrives from the right ---------- */
.fx-closing-reveal .closing-main{position:relative}
.fx-closing-reveal-vr{position:absolute;top:0;bottom:0;width:1px;
  left:calc((100% - var(--fx-closing-reveal-gap))*.6818 + var(--fx-closing-reveal-gap)/2); /* centre of the gap of the 1.5fr/.7fr grid */
  background:rgba(255,255,255,.16);transform:scaleY(0);transform-origin:50% 100%;pointer-events:none;
  transition:transform .8s var(--fx-closing-reveal-ease) var(--fx-closing-reveal-wait)}
.fx-closing-reveal-in>.fx-closing-reveal-vr{transform:none}

/* big asterisk: springs in on a wrapper; the svg itself is turned by the scroll (JS), so the idle keyframe spin is off */
.fx-closing-reveal-pop{display:block;transform:scale(0) rotate(-150deg);transition:transform .95s var(--spring) calc(var(--fx-closing-reveal-wait) + 180ms)}
.fx-closing-reveal-in .fx-closing-reveal-pop{transform:none}
.fx-closing-reveal .spin.big{animation:none;transition:transform .7s var(--out)}

/* paragraph and pill: each slides its own width in from the right behind a hard-edged mask.
   The pill rides a carrier span, so .pill's own transform stays free for the magnet. */
.fx-closing-reveal-mask{display:block;max-width:100%;overflow:hidden}
.fx-closing-reveal-slide{display:block}
.fx-closing-reveal-mask>*{transform:translate3d(103%,0,0);transition:transform .78s cubic-bezier(.3,.1,.2,1) calc(var(--fx-closing-reveal-wait) + 330ms)}
.fx-closing-reveal-mask>.fx-closing-reveal-slide{transition-delay:calc(var(--fx-closing-reveal-wait) + 520ms)}
.fx-closing-reveal-in .fx-closing-reveal-mask>*{transform:none}
.fx-closing-reveal-done .fx-closing-reveal-mask{overflow:visible} /* landed: let the magnet and the focus ring breathe */

/* ---------- stage 3: footer rule, columns rise one after another, legal line last ---------- */
.fx-closing-reveal .footer{position:relative;border-top-color:transparent}
.fx-closing-reveal .footer>.fx-closing-reveal-rule{top:0;transform-origin:0 50%;transition-delay:var(--fx-closing-reveal-wait)}
.fx-closing-reveal .footer-cols>div{display:grid;overflow:hidden} /* grid: the riser fills the mask, so 104% always clears it */
.fx-closing-reveal-col{transform:translate3d(0,104%,0);
  transition:transform .75s var(--fx-closing-reveal-ease) calc(var(--fx-closing-reveal-wait) + 220ms + var(--fx-closing-reveal-i,0)*240ms)}
.fx-closing-reveal-in .fx-closing-reveal-col{transform:none}

.fx-closing-reveal .footer-base{overflow:hidden;border-top-color:transparent}
.fx-closing-reveal .footer-base>.fx-closing-reveal-rule{top:0;transform-origin:100% 50%;transition-delay:calc(var(--fx-closing-reveal-wait) + 900ms)}
.fx-closing-reveal .footer-base>:not(.fx-closing-reveal-rule){transform:translate3d(0,var(--fx-closing-reveal-base-h,120px),0);transition:transform .55s var(--fx-closing-reveal-ease) calc(var(--fx-closing-reveal-wait) + 1250ms)}
.fx-closing-reveal .footer-base>:nth-child(2){transition-delay:calc(var(--fx-closing-reveal-wait) + 1320ms)}
.fx-closing-reveal .footer-base>:nth-child(3){transition-delay:calc(var(--fx-closing-reveal-wait) + 1390ms)}
.fx-closing-reveal .fx-closing-reveal-in .footer-base>*{transform:none}
.fx-closing-reveal .fx-closing-reveal-done :is(.footer-cols>div,.footer-base){overflow:visible} /* landed: underlines and focus rings need the edge */

/* ---------- giant wordmark: one mask-less letter per span, raised by the scroll from behind the legal strip ---------- */
.fx-closing-reveal .footer-mark{position:relative;color:rgba(241,242,236,.12);margin-top:clamp(34px,5.4vw,84px)} /* fixer: a ghost again, so "Ready for the new season?" stays the loudest line of the last screen */
.fx-closing-reveal-l{display:inline-block;transform:translate3d(0,135%,0);transition:transform .55s var(--out);will-change:transform}
.fx-closing-reveal-l>span{display:inline-block;transform-origin:50% 100%}

/* ---------- footer links: underline slides in from the left, leaves to the right ---------- */
.footer-cols li a,.footer-base>a{position:relative;display:inline-block}
.footer-cols li a::after,.footer-base>a::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:100% 50%}
.footer-cols li a:hover::after,.footer-cols li a:focus-visible::after,.footer-base>a:hover::after,.footer-base>a:focus-visible::after{transform:scaleX(1);transform-origin:0 50%}
@media (prefers-reduced-motion:no-preference){
  .footer-cols li a::after,.footer-base>a::after{transition:transform .45s var(--out)}
}

@media (max-width:820px){
  .fx-closing-reveal-vr{display:none} /* single column: nothing to divide */
}
