/* Loading screen: two word cards, a fist clip, the logo resolve, sideways wipe.

   Timeline in seconds (from the moment the display font is ready, at most 300 ms after first paint):
     0     to .78   "Purpose over comfort" on red; lines rise in .13 s, readable from .13
     .78   to 1.64  the founder credit and "Why not you?"; readable from .91, credit on screen .86 s
     1.64           a red flash cuts to the fist clip (video, or the poster frame when the video cannot play)
     3.20  to 3.92  the single fist holds; the frame dims, a red light passes, and the logo resolves
     4.00  to 4.38  the page opens with the sideways wipe and its red edge

   Base styles are the final frame (the logo), so reduced motion (no animation) shows the logo still, with no
   video and no word cuts, then fades. Without JavaScript the layer never shows (html.intro-on is set by the
   head script), and its own exit ends in visibility:hidden even if the script never runs. */

.intro{display:none}
html.intro-on .intro{display:block;position:fixed;inset:0;z-index:9999;overflow:hidden;cursor:pointer;
  color:var(--text);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
html.intro-wait .intro,html.intro-wait .intro *,html.intro-wait .intro::before,html.intro-wait .intro::after{animation-play-state:paused!important}
html.intro-wait .intro>*{visibility:hidden!important}
.intro__skip{position:absolute;right:clamp(1rem,3vw,1.6rem);bottom:clamp(1rem,3vh,1.4rem);z-index:9;font-family:var(--mono);
  font-size:.66rem;font-weight:600;letter-spacing:.22em;text-transform:uppercase;color:#fff;background:rgba(5,5,6,.55);
  padding:.4rem .7rem;border-radius:999px;animation:introSkipIn .5s ease .7s backwards}
@keyframes introSkipIn{from{opacity:0}}
html.intro-on .intro.is-skip{animation:introSkipOut .26s ease forwards!important}
@keyframes introSkipOut{to{opacity:0;visibility:hidden}}
.intro::after{content:"";position:absolute;inset:-60px;z-index:8;pointer-events:none;opacity:.06;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:introGrain .5s steps(3) infinite}
@keyframes introGrain{0%{transform:translate(0,0)}33%{transform:translate(-23px,17px)}66%{transform:translate(19px,-29px)}100%{transform:translate(0,0)}}

/* ---------- the wipe that opens the page ---------- */
html.intro-on .intro--r{background:#050506;animation:rOpen .38s cubic-bezier(.7,0,.25,1) 4s forwards}
@keyframes rOpen{to{transform:translate3d(104%,0,0) skewX(-7deg);visibility:hidden}}
.intro--r::before{content:"";position:absolute;top:-10%;bottom:-10%;left:0;width:6px;z-index:10;background:var(--red);
  box-shadow:0 0 34px 4px rgba(225,29,43,.8);opacity:0;animation:rEdge .1s linear 4s forwards}
@keyframes rEdge{to{opacity:1}}

/* ---------- the words ---------- */
.r-c1{--at:0s;--dur:.78s}
.r-c2{--at:.78s;--dur:.86s}
.r-card{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
  padding:0 6vw;visibility:hidden;animation:rShow var(--dur) steps(1,end) var(--at)}
@keyframes rShow{0%,100%{visibility:visible}}
.r-red{background:var(--red);color:#070708}
.r-why{background:#070708;color:var(--text)}
.r-why .r-you{color:var(--red-soft)}
.r-lines{--fw:88vw;--fh:66vh;transform-origin:0 50%;animation:rPush var(--dur) cubic-bezier(.2,.6,.4,1) var(--at) both}
@keyframes rPush{from{transform:scale(1.05)}to{transform:scale(1)}}
.r-l{display:block;overflow:hidden;font-family:var(--display);font-weight:400;text-transform:uppercase;line-height:.86;
  padding-top:.05em;margin-bottom:-.02em;letter-spacing:.01em;
  font-size:min(calc(var(--fw) / var(--em,3.2)),calc(var(--fh) / var(--lines)))}
.r-l__in{display:block;white-space:nowrap;animation:rLine .13s cubic-bezier(.2,.8,.2,1) var(--at) backwards}
@keyframes rLine{from{transform:translate3d(0,104%,0)}}
.r-set--wide{display:none}
@media (min-aspect-ratio:1/1){.r-set--tall{display:none}.r-set--wide{display:block}}
.r-kick{display:flex;align-items:center;gap:.8rem;margin-bottom:clamp(.9rem,2.4vh,1.4rem);font-family:var(--mono);font-weight:600;
  font-size:clamp(13px,1.15vw,16px);letter-spacing:.2em;text-transform:uppercase;color:rgba(243,240,234,.82);
  animation:rKick .2s ease var(--at) backwards}
.r-kick::before{content:"";width:28px;height:2px;background:var(--red)}
@keyframes rKick{from{opacity:0}}

/* ---------- the fist clip ---------- */
.r-film{position:absolute;inset:0;z-index:2;visibility:hidden;background:#050506;animation:rOn .01s steps(1,end) 1.64s forwards}
@keyframes rOn{to{visibility:visible}}
.r-poster,.r-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:47% 42%}
.r-film.is-tall .r-poster{object-position:47% 30%}
.r-film.is-tall .r-video{object-position:50% 50%}
/* the poster frame always sits under the video; with no video it carries the shot with a slow push in */
.r-poster{animation:rPoster 2.4s cubic-bezier(.2,.6,.3,1) 1.64s backwards}
@keyframes rPoster{from{transform:scale(1.08)}}
.r-poster:not([src]){visibility:hidden}
.r-video{opacity:0}
.r-film.is-playing .r-video{opacity:1}
.r-dim{position:absolute;inset:0;background:#050506;opacity:.72;animation:rDim .54s ease 3.24s backwards}
@keyframes rDim{from{opacity:0}}
/* a red light passes across the frame as the fist gives way to the logo */
.r-pass{position:absolute;top:-10%;bottom:-10%;left:0;width:60%;pointer-events:none;mix-blend-mode:screen;opacity:0;
  background:linear-gradient(100deg,transparent 0%,rgba(225,29,43,.0) 20%,rgba(255,60,72,.55) 50%,rgba(225,29,43,0) 80%,transparent 100%);
  animation:rPass .62s cubic-bezier(.45,0,.25,1) 3.2s}
@keyframes rPass{from{opacity:1;transform:translate3d(-110%,0,0) skewX(-12deg)}to{opacity:1;transform:translate3d(190%,0,0) skewX(-12deg)}}
.r-flash{position:absolute;inset:0;z-index:5;background:var(--red);visibility:hidden;animation:rFlash .2s ease-out 1.64s}
@keyframes rFlash{0%{visibility:visible;opacity:1}100%{visibility:visible;opacity:0}}

/* ---------- the logo ---------- */
.r-end{position:absolute;inset:0;z-index:3;animation:rEndIn .5s cubic-bezier(.2,.7,.2,1) 3.28s backwards}
@keyframes rEndIn{from{opacity:0;transform:scale(1.06)}}
.r-lockup{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-bottom:4vh}
.r-mark{display:block;width:clamp(140px,min(40vw,34vh),290px);height:auto;overflow:visible;filter:drop-shadow(0 10px 30px rgba(0,0,0,.6))}
.r-shade{fill:#08080a;fill-opacity:.3}
.r-light{transform:translate(250px,0) skewX(-16deg);animation:rLight .6s cubic-bezier(.5,0,.2,1) 3.34s backwards}
@keyframes rLight{from{transform:translate(0,0) skewX(-16deg)}}
.r-shard{transform-box:fill-box;transform-origin:50% 50%;animation:rShard .5s cubic-bezier(.16,1,.3,1) calc(3.32s + var(--i) * 7ms) backwards}
@keyframes rShard{from{transform:translate(var(--dx),var(--dy)) scale(.15) rotate(var(--r));opacity:0}30%{opacity:1}}
.r-word{margin-top:clamp(.9rem,2.6vh,1.5rem);font-family:var(--display);font-weight:400;text-transform:uppercase;white-space:nowrap;
  font-size:clamp(2.4rem,min(10.5vw,8.6vh),4.6rem);line-height:1;letter-spacing:.16em;padding-left:.16em;color:var(--text);
  text-shadow:0 2px 24px rgba(0,0,0,.6)}
.r-ch{display:inline-block;animation:rCh .32s cubic-bezier(.2,.8,.2,1) calc(3.4s + var(--i) * 16ms) backwards}
@keyframes rCh{from{opacity:0;transform:translate3d(0,.3em,0)}}
.r-rule{width:clamp(56px,12vw,112px);height:2px;margin-top:clamp(.7rem,1.8vh,1rem);background:var(--red);
  box-shadow:0 0 14px rgba(225,29,43,.7);animation:rRule .4s cubic-bezier(.65,0,.35,1) 3.52s backwards}
@keyframes rRule{from{transform:scaleX(0)}}

@media (prefers-reduced-motion:reduce){
  html.intro-on .intro--r *,html.intro-on .intro--r::before,html.intro-on .intro--r::after{animation:none!important}
  html.intro-on .intro--r{animation:introFade .4s ease .85s forwards!important}
}
@keyframes introFade{to{opacity:0;visibility:hidden}}
