/* INTRO B, "the swatch book" (js/intro-b.js). A pale aurora studio. Real swatches from the library flick through a viewfinder,
   faster and faster, each one named in giant type as it is read; the load is measured on a tape along the bottom. It lands on
   "any fabric." and then the whole screen opens like the shed of a loom: alternate warp bands lift and drop away, and the hero is
   behind them. */

html[data-intro="b"] .intro{background:#EFEFF3;cursor:progress}
html[data-intro="b"] .in-c,html[data-intro="b"] .in-led,html[data-intro="b"] .in-skip{display:none}

.b-scene{position:absolute;inset:0;overflow:hidden;color:var(--ink);
  background:
    radial-gradient(60% 55% at 18% 22%,rgba(176,190,255,.55),transparent 70%),
    radial-gradient(55% 50% at 86% 78%,rgba(255,196,170,.6),transparent 70%),
    radial-gradient(45% 45% at 74% 18%,rgba(230,200,255,.5),transparent 70%),
    radial-gradient(50% 45% at 30% 88%,rgba(186,236,246,.45),transparent 72%),
    #EFEFF3}

/* the viewfinder */
.b-frame{position:absolute;left:50%;top:9vh;height:52vh;width:41.6vh;transform:translateX(-50%);will-change:transform}
.b-imgs{position:absolute;inset:0;overflow:hidden;background:#DCDCE3;clip-path:inset(50% 50% 50% 50%);will-change:clip-path}
.b-imgs img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;visibility:hidden;will-change:transform,clip-path}
.b-c{position:absolute;width:22px;height:22px;border:0 solid var(--ink);opacity:0}
.b-c.tl{left:-14px;top:-14px;border-width:1.5px 0 0 1.5px}
.b-c.tr{right:-14px;top:-14px;border-width:1.5px 1.5px 0 0}
.b-c.bl{left:-14px;bottom:-14px;border-width:0 0 1.5px 1.5px}
.b-c.br{right:-14px;bottom:-14px;border-width:0 1.5px 1.5px 0}
.b-scan{position:absolute;left:0;right:0;height:22%;top:0;opacity:0;pointer-events:none;mix-blend-mode:screen;
  background:linear-gradient(180deg,rgba(150,160,255,0),rgba(200,180,255,.35) 60%,rgba(255,210,190,.8) 98%,rgba(255,255,255,.95) 100%)}

/* either side of the viewfinder */
.b-k,.b-read{position:absolute;top:calc(9vh + 26vh);font-size:14px;line-height:1.35;opacity:0}
.b-k{right:calc(50% + 20.8vh + 34px);text-align:right;color:var(--soft)}
.b-k b{display:block;font-weight:500;color:var(--ink)}
.b-read{left:calc(50% + 20.8vh + 34px);font-variant-numeric:tabular-nums}
.b-read span{display:block;color:var(--soft)}
.b-read b{display:block;font-weight:500}
.b-k,.b-read{transition:opacity .8s var(--ease),transform 1s var(--ease);transform:translate3d(0,10px,0)}
.intro.b-on .b-k,.intro.b-on .b-read{opacity:1;transform:none}

/* the name, giant, centred under the viewfinder and just over its foot; white in difference, so ink on the studio and
   inverted over the photograph */
.b-word{position:absolute;left:0;right:0;top:calc(9vh + 52vh - .3em);text-align:center;font-weight:500;font-size:clamp(64px,12.4vw,230px);
  line-height:.92;letter-spacing:-.055em;color:#fff;mix-blend-mode:difference;white-space:nowrap;pointer-events:none}
.b-wm{display:inline-block;overflow:hidden;padding:0 .08em .12em;vertical-align:top}
.b-wi{display:inline-block;transform:translate3d(0,105%,0);will-change:transform}

/* the tape measure */
.b-tape{position:absolute;left:var(--m);right:var(--m);bottom:4.2vh;height:46px;clip-path:inset(0 100% 0 0)}
.b-ticks{position:absolute;left:0;right:0;bottom:0;height:12px;
  background:
    linear-gradient(90deg,rgba(17,19,24,.55) 1px,transparent 1px) 0 100%/80px 12px repeat-x,
    linear-gradient(90deg,rgba(17,19,24,.3) 1px,transparent 1px) 0 100%/16px 6px repeat-x,
    linear-gradient(90deg,rgba(17,19,24,.18) 1px,transparent 1px) 0 100%/8px 3px repeat-x}
.b-base{position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(17,19,24,.25)}
.b-fill{position:absolute;left:0;bottom:0;height:2px;width:100%;transform-origin:0 50%;transform:scaleX(0);
  background:linear-gradient(90deg,#FF9A5C,#F07CC6 35%,#8C7BFF 68%,#4FC9E8)}
.b-nums{position:absolute;left:0;right:0;bottom:15px;height:12px;font-size:10.5px;line-height:1;color:rgba(17,19,24,.58);font-variant-numeric:tabular-nums}
.b-nums span{position:absolute;transform:translateX(-50%)}
.b-nums span:first-child{transform:none}.b-nums span:last-child{transform:translateX(-100%)}
.b-mark{position:absolute;left:0;bottom:0;width:1px;height:46px;background:var(--ink)}
.b-mark b{position:absolute;left:6px;top:0;font-size:12px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.b-mark b i{font-style:normal;font-weight:400;color:var(--soft);margin-left:3px}

/* the shed: the screen cut into warp bands that lift and drop; a thread of light runs down each band's edge as it parts */
.b-band{position:fixed;top:0;height:100vh;overflow:hidden;will-change:transform;z-index:60}
.b-band>.b-scene{width:100vw;height:100vh;right:auto;bottom:auto}
.b-band::after{content:"";position:absolute;top:0;bottom:0;left:0;width:1px;opacity:0;transition:opacity .25s;
  background:linear-gradient(180deg,#4FC9E8,#8C7BFF 35%,#F07CC6 68%,#FF9A5C)}
.b-band.go::after{opacity:.9}

@media (max-width:860px){
  .b-frame{top:13vh;height:auto;width:64vw;aspect-ratio:4/5}
  .b-k,.b-read{top:calc(13vh + 80vw + 28px);font-size:12.5px}
  .b-k{right:auto;left:18vw;text-align:left}
  .b-read{left:auto;right:18vw;text-align:right}
  .b-word{top:calc(13vh + 80vw + 82px);font-size:17vw}
  .b-nums span:nth-child(even){display:none}
  .b-tape{bottom:9vh}
}

/* THE SWITCH: the Intro tab, beside the type button once the page has arrived */
.ix-tab{position:fixed;left:64px;bottom:16px;z-index:90;display:flex;align-items:center;gap:2px;height:40px;padding:0 4px 0 14px;border-radius:99px;
  background:rgba(255,255,255,.72);border:1px solid rgba(17,19,24,.1);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  box-shadow:0 6px 18px -10px rgba(17,19,24,.18);font-size:12px;color:var(--ink);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.ix-l{margin-right:8px;color:var(--soft)}
.ix-tab button{height:30px;min-width:30px;padding:0 9px;border:0;border-radius:99px;background:none;font-size:12px;font-weight:500;cursor:pointer;
  transition:background .3s var(--ease),color .3s}
.ix-tab button:hover{background:rgba(17,19,24,.07)}
.ix-tab button.on{background:var(--ink);color:#F4F5F6}
.ix-tab .ix-r{display:grid;place-items:center;padding:0}
.ix-tab .ix-r svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body.is-loading:not(.intro-nav) .ix-tab{opacity:0;transform:translate3d(0,10px,0);pointer-events:none}
body[data-theme="dark"] .ix-tab{background:rgba(20,22,28,.6);border-color:rgba(255,255,255,.12);color:#F2F3F5}
body[data-theme="dark"] .ix-tab button.on{background:#F4F5F6;color:var(--ink)}
@media (max-width:860px){ .ix-tab{left:56px;bottom:12px;height:36px} .ix-tab button{height:28px;min-width:28px} }

