/* Modules: the real app, full screen. The stage pins while you scroll; each step glides the
   camera to the next module, with a handwritten note on the part worth seeing. The tab row
   in the screenshot, the module bar and the arrows all jump straight to a module.
   Without JavaScript it is one screenshot and the list of modules; with reduced motion it
   doesn't pin or move, and the bar switches modules in place. */
.modules{position:relative;margin:0 calc(50% - 50vw);background:#111012;color:#F5F3ED;border-top:1px solid rgb(245 243 237/.1)}
.modules-stage{position:relative;padding:clamp(72px,9vw,120px) clamp(16px,4vw,56px) clamp(80px,9vw,120px)}
.modules-eyebrow{margin:0 0 22px;font:800 11px/1 var(--font);letter-spacing:.2em;text-transform:uppercase;color:rgb(245 243 237/.62)}
.modules-head{width:min(100%,1240px);margin:0 auto 40px}
.modules-head h2{margin:0;font:800 clamp(40px,5vw,76px)/1 var(--font);letter-spacing:-.055em}
.modules-lede{margin:20px 0 0;max-width:460px;font:500 17px/1.6 var(--font);color:rgb(245 243 237/.74)}
.modules-hint{display:none}
.modules-captions{list-style:none;width:min(100%,1240px);margin:32px auto 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:26px 34px}
.modules-num{display:block;font:800 11px/1.2 var(--font);letter-spacing:.16em;text-transform:uppercase;color:var(--module-color,#FF5722)}
.modules-captions h3{margin:8px 0 6px;font:800 clamp(24px,2.4vw,36px)/1.05 var(--font);letter-spacing:-.045em}
.modules-captions p{margin:0;max-width:520px;font:500 15px/1.6 var(--font);color:rgb(245 243 237/.74)}
.modules-static-shot{display:block;width:min(100%,1240px);height:auto;margin:0 auto;border-radius:12px;box-shadow:0 0 0 1px rgb(255 255 255/.08)}
.modules-window,.modules-phone,.modules-scrim,.modules-ui .modules-bar,.modules-skip{display:none}

/* The app window and its camera (shared by the pinned and the in-place versions). */
.modules-on .modules-static-shot{display:none}
.modules-window{position:relative;overflow:hidden;background:#1b1b1c}
.modules-camera{position:absolute;inset:0;transform-origin:0 0;transition:transform 1.6s cubic-bezier(.45,.05,.2,1);will-change:transform}
.modules-panel{position:absolute;inset:0}
.modules-shot{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .8s ease}
.modules-shot.is-on{opacity:1}
/* A live clip of the module, laid exactly over its part of the screenshot. */
.modules-live{position:absolute;display:block;object-fit:fill;opacity:0;pointer-events:none;transition:opacity .35s ease}
.modules-live.is-on{opacity:1}
.modules-notes{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.modules-dim{fill:rgb(8 7 10/.5);opacity:0;transition:opacity .9s ease}
.is-focused .modules-dim{opacity:1}
.modules-note path{fill:none;stroke:#FFEB3B;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.modules-note text{fill:#FFEB3B;font:400 25px 'Segoe Print','Comic Sans MS',cursive;opacity:0;transition:opacity .4s ease}
.modules-note .modules-arrow{stroke-dasharray:var(--len,600);stroke-dashoffset:var(--len,600);transition:stroke-dashoffset .25s ease}
.modules-note .modules-head-mark{opacity:0;transition:opacity .15s}
.modules-note.is-on text{opacity:1;transition:opacity .5s ease 1.1s}
.modules-note.is-on .modules-arrow{stroke-dashoffset:0;transition:stroke-dashoffset .8s cubic-bezier(.3,.6,.2,1) 1.25s}
.modules-note.is-on .modules-head-mark{opacity:1;transition:opacity .2s ease 2s}
/* Pointer shortcut: invisible buttons over the screenshot's own tab row and #general. */
.modules-tabs{position:absolute;inset:0;pointer-events:none}
.modules-tab{position:absolute;pointer-events:auto;margin:0;padding:0;border:0;border-radius:6px;background:transparent;cursor:pointer;transition:background-color .16s}
.modules-tab:hover{background:rgb(255 255 255/.07)}

/* The module bar: the accessible tabs on every screen size. */
.modules-bar{display:flex;align-items:center;gap:6px}
.modules-chips{display:flex;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none}
.modules-chips::-webkit-scrollbar{display:none}
.modules-chips button{position:relative;flex:none;display:flex;align-items:center;gap:7px;min-height:44px;padding:0 11px;border:0;background:transparent;color:rgb(245 243 237/.6);font:650 13px/1 var(--font);cursor:pointer;transition:color .16s}
.modules-chips button:hover{color:#F5F3ED}
.modules-chips svg{width:18px;height:18px;fill:currentColor;color:var(--module-color)}
.modules-chips button[aria-selected=true]{color:#F5F3ED;font-weight:800}
.modules-chips button[aria-selected=true] svg{color:#FF5722}
.modules-chips button[aria-selected=true]::after{content:'';position:absolute;left:9px;right:9px;bottom:0;height:2px;border-radius:2px 2px 0 0;background:#FF5722}
.modules-step{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid rgb(245 243 237/.18);border-radius:10px;background:rgb(17 16 18/.6);color:#F5F3ED;cursor:pointer;transition:background-color .16s,opacity .2s}
.modules-step:hover{background:rgb(245 243 237/.1)}
.modules-step:disabled{opacity:.3;cursor:default}
.modules-step svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.modules :is(button,a):focus-visible{outline:3px solid #FFEB3B;outline-offset:2px}

/* In place (reduced motion): the window, then one caption, then the bar. */
.modules-on:not(.modules-pinned) .modules-window{display:block;width:min(100%,1240px);aspect-ratio:1.6;margin:0 auto;border-radius:12px;box-shadow:0 0 0 1px rgb(255 255 255/.08)}
.modules-on:not(.modules-pinned) .modules-ui .modules-bar{display:flex;width:min(100%,1240px);margin:18px auto 0}
.modules-on .modules-captions{display:block;position:relative;min-height:120px}
.modules-on .modules-captions li{display:none}
.modules-on .modules-captions li.is-active{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);column-gap:40px}
.modules-on .modules-captions li>p{grid-column:2;grid-row:1/3;padding-top:2px}

/* Pinned: a full-screen stage over a scroll runway, one step per module. */
.modules-pinned{height:calc(100vh + var(--steps,9) * 58vh);height:calc(100svh + var(--steps,9) * 58svh)}
.modules-pinned .modules-stage{position:sticky;top:var(--site-bar-space,0px);height:calc(100vh - var(--site-bar-space,0px));height:calc(100svh - var(--site-bar-space,0px));padding:0;overflow:hidden;container-type:size}
/* Edge to edge: on wide screens the bottom of the window runs under the caption. */
.modules-pinned .modules-window{display:block;position:absolute;left:0;top:max(0px,calc((100cqh - 100cqw / 1.6) / 2));width:100cqw;aspect-ratio:1.6}
.modules-pinned .modules-scrim{display:block;position:absolute;inset:auto 0 0;height:44%;background:linear-gradient(180deg,rgb(17 16 18/0),rgb(17 16 18/.82) 48%,#111012 82%);opacity:0;transition:opacity .8s ease;pointer-events:none}
.modules-pinned.is-moduled .modules-scrim{opacity:1}
/* Title card first: the whole window under a veil, the heading over it. */
.modules-pinned .modules-head{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;justify-content:center;width:auto;margin:0;padding:0 clamp(24px,7vw,120px);background:linear-gradient(90deg,rgb(17 16 18/.95) 0%,rgb(17 16 18/.86) 45%,rgb(17 16 18/.45) 100%);transition:opacity .8s ease,visibility 0s linear 0s}
.modules-pinned .modules-head h2{font-size:clamp(48px,6.4vw,104px)}
.modules-pinned .modules-hint{display:flex;align-items:center;gap:8px;margin:34px 0 0;color:#FFEB3B;font:400 19px/1 'Segoe Print','Comic Sans MS',cursive;transform:rotate(-2deg);transform-origin:left}
.modules-hint svg{width:22px;height:30px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.modules-pinned.is-moduled .modules-head{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .6s ease,visibility 0s linear .6s}
.modules-pinned .modules-ui{position:absolute;inset:auto 0 0;z-index:3;padding:0 clamp(16px,4vw,56px) clamp(14px,2.6vh,26px)}
.modules-pinned .modules-captions{width:min(100%,1320px);margin:0 auto;min-height:clamp(96px,13vh,130px)}
.modules-pinned .modules-captions li.is-active{animation:modules-rise .6s cubic-bezier(.2,.7,.2,1) both}
.modules-pinned:not(.is-moduled) .modules-captions{visibility:hidden}
@keyframes modules-rise{from{opacity:0;translate:0 14px}to{opacity:1;translate:0 0}}
.modules-pinned .modules-ui .modules-bar{display:flex;width:min(100%,1320px);margin:12px auto 0;padding-top:10px;border-top:1px solid rgb(245 243 237/.14)}
.modules-pinned .modules-chips{flex:1;justify-content:center}
.modules-pinned .modules-skip{display:flex;position:absolute;z-index:4;top:clamp(12px,2.4vh,22px);right:clamp(16px,3vw,40px);align-items:center;min-height:40px;padding:0 14px;border-radius:9px;background:rgb(17 16 18/.7);color:rgb(245 243 237/.8);font:700 12px/1 var(--font)}
.modules-pinned .modules-skip:hover{color:#F5F3ED;text-decoration:underline;text-underline-offset:4px}

/* Phones: the phone layout of each module, scrolling gently, above the caption and bar. */
@media(max-width:899px){
  .modules-pinned .modules-window{display:none}
  .modules-on:not(.modules-pinned) .modules-window{display:none}
  .modules-on .modules-phone{display:block;position:relative;width:min(100%,360px);aspect-ratio:390/640;margin:0 auto;overflow:hidden;border:6px solid #050506;border-radius:30px;background:#181818;box-shadow:0 0 0 1px rgb(255 255 255/.1)}
  .modules-pinned .modules-phone{position:absolute;left:50%;top:clamp(56px,8vh,72px);width:auto;height:calc(100svh - var(--site-bar-space,0px) - clamp(56px,8vh,72px) - 250px);aspect-ratio:390/640;margin:0;translate:-50% 0}
  .modules-phone img{position:absolute;left:0;top:0;width:100%;height:auto;opacity:0;transition:opacity .6s ease}
  .modules-phone img.is-on{opacity:1}
  .modules-phone img.is-panning{transition:opacity .6s ease,transform 7s cubic-bezier(.45,.05,.3,1) .9s}
  .modules-pinned .modules-scrim{height:300px}
  .modules-pinned .modules-head{padding:0 24px}
  .modules-pinned .modules-captions{min-height:150px}
  .modules-on .modules-captions li.is-active{grid-template-columns:1fr}
  .modules-on .modules-captions li>p{grid-column:1;grid-row:auto;padding-top:6px}
  .modules-pinned .modules-chips{justify-content:flex-start}
  .modules-step{width:40px;height:40px}
  .modules-chips button{padding:0 9px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .modules-camera,.modules-shot,.modules-dim,.modules-note *,.modules-phone img{transition:none!important}
  .modules-note .modules-arrow{stroke-dashoffset:0}
}
