/* The products page (products.html, js/products.js, js/readings.js). The Original look, on the lab's pale light: the three
   panes' grounds are soft, translucent and iridescent (silk ribbons, a bloom of petals, fine threads in a wave), the words
   in ink, the results on frosted white glass. Along the seams and the reading's front the spectrum is the light that
   reads, and in the headline it is that light again.
   Uses css/about.css for .ab and its tokens. */
body.pd{background:#E9ECEF}

/* ---- 1: the opening. Pinned for the length of the section: the readings play out on one screen, then the panes part */
.ph{position:relative;height:170vh;height:170svh;background:#E9ECEF;--ex:0}
.ph-pin{position:sticky;top:0;height:100vh;height:100svh;min-height:560px;overflow:hidden}
/* without WebGL the panes keep a quiet spectral ground */
.ph.nogl .ph-p{background:radial-gradient(120% 80% at 40% 65%,rgba(255,140,110,.35),transparent 70%),#E9ECEF}
.ph-gl{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:1;pointer-events:none}

/* the panes: the page lays them out and the canvas reads their boxes, so the cloth's three readings follow them exactly.
   Scrolling on (--ex, 0..1, js) brings in margins and gaps and rounds their corners, and they become cards */
.ph-panes{position:absolute;z-index:2;display:flex;left:calc(var(--ex) * var(--m));right:calc(var(--ex) * var(--m));
  top:calc(var(--ex) * 12vh);bottom:calc(var(--ex) * 31vh);gap:calc(var(--ex) * 14px)}
.ph-p{position:relative;flex:1 1 0;min-width:0;min-height:0;overflow:hidden;border-radius:calc(var(--ex) * 22px);color:#111318;
  transition:flex-grow 1.15s var(--bez)}
.ph-panes[data-h="0"] .ph-p:nth-child(1),.ph-panes[data-h="1"] .ph-p:nth-child(2),.ph-panes[data-h="2"] .ph-p:nth-child(3){flex-grow:2.05}
/* a shade at the top of each pane for its words, and one at the foot for the headline */
.ph-p::before,.ph-p::after{content:"";position:absolute;left:0;right:0;pointer-events:none;z-index:0}
.ph-p::before{top:0;height:40%;background:linear-gradient(rgba(236,238,241,.82),rgba(236,238,241,.45) 45%,transparent)}
.ph-p::after{bottom:0;height:40%;background:linear-gradient(transparent,rgba(236,238,241,.55) 55%,rgba(236,238,241,.9));opacity:calc(1 - var(--ex))}

/* each product's words, top left of its pane; its features open under them when the pane is pointed at */
.ph-t{position:absolute;z-index:1;left:clamp(20px,2.1vw,34px);top:clamp(100px,14.5vh,152px);width:min(330px,calc(100% - 44px))}
.ph-n{margin:0;font-family:var(--fd,var(--f));font-weight:500;font-size:clamp(22px,1.95vw,31px);line-height:1.04;letter-spacing:-.035em;color:#111318}
.ph-n,.ph-l{overflow:hidden;padding-bottom:.12em;margin-bottom:-.12em}
.ph-n>span,.ph-l>span{display:inline-block;transform:translate3d(0,110%,0);transition:transform 1.2s var(--bez);
  transition-delay:calc(1.05s + var(--i) * .13s)}
.ph-l{margin-top:.55em;font-size:15px;line-height:1.45;color:rgba(17,19,24,.62)}
.ph-l>span{display:block;transition-delay:calc(1.17s + var(--i) * .13s)}
.ph.go .ph-n>span,.ph.go .ph-l>span{transform:none}
.ph-f{list-style:none;margin:20px 0 0;padding:0;max-width:300px}
.ph-f li{position:relative;padding:10px 0;font-size:14px;line-height:1.3;color:rgba(17,19,24,.86);
  opacity:0;transform:translate3d(0,8px,0);transition:opacity .45s var(--ease),transform .7s var(--ease)}
.ph-f li::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:rgba(17,19,24,.13);transform-origin:0 50%;transform:scaleX(0);transition:transform .9s var(--bez)}
/* a short tick in the spectrum, not a dot */
.ph-p.is-on .ph-f li{opacity:1;transform:none;transition-delay:calc(.28s + var(--j) * .07s)}
.ph-p.is-on .ph-f li::before{transform:none;transition-delay:calc(.22s + var(--j) * .07s)}

/* what each reading found, in the open space of its pane: the threads' directions, the colours, the conversation */
/* each sits on a small card of frosted white glass, like the result on the app's screen */
.ph-x{position:absolute;z-index:1;left:clamp(20px,2.1vw,34px);bottom:calc(clamp(54px,7.2vw,150px) * .9 + clamp(26px,5vh,56px) + 56px);
  margin:0;padding:16px 18px;border-radius:18px;background:rgba(255,255,255,.58);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 1px 2px rgba(40,48,90,.04);opacity:0;transform:translate3d(0,14px,0);transition:opacity 1s var(--ease),transform 1.2s var(--ease);transition-delay:2.3s}
.ph.go .ph-x.on{opacity:calc(1 - var(--ex) * 2.4);transform:none}
/* once the page has opened, they follow the scroll at once */
.ph.settled .ph-x,.ph.settled .ph-sub{transition-delay:0s;transition-duration:.25s}

.ph-dirs{display:grid;gap:14px;justify-items:start}
/* point paper: a filled square where the warp is up, in the warp's cool light; empty squares a hairline */
.ph-tw{display:grid;grid-template-columns:repeat(var(--c),12px);gap:2px}
.ph-tw i{width:12px;height:12px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(17,19,24,.12);transition:background-color .35s var(--ease),box-shadow .35s var(--ease)}
.ph-tw i.up.on{background:linear-gradient(135deg,#8C7BFF,#4FC9E8);box-shadow:none}
.ph-tw i:not(.up).on{background:rgba(255,154,92,.16);box-shadow:inset 0 0 0 1px rgba(255,154,92,.35)}
.ph-twn{margin:0;display:grid;gap:3px;font-size:13px;color:rgba(17,19,24,.58)}
.ph-twn b{font-family:"Geist Mono",ui-monospace,Menlo,monospace;font-weight:400;font-size:12px;letter-spacing:.02em;color:#111318}

.ph-pal{list-style:none;display:grid;grid-template-columns:repeat(3,auto);gap:10px 22px;font-family:"Geist Mono",ui-monospace,Menlo,monospace;font-size:12px;letter-spacing:.02em;color:rgba(17,19,24,.78)}
.ph-pal li{display:flex;align-items:center;gap:10px}
.ph-pal i{width:22px;height:14px;border-radius:3px;background:var(--c);box-shadow:inset 0 0 0 1px rgba(17,19,24,.08)}
.ph-pal span{color:rgba(238,240,244,.48);min-width:2.6em;text-align:right}
/* in a narrow pane the colours stand in one column */
.ph-p{container-type:inline-size}
@container (max-width:470px){.ph-pal{grid-template-columns:repeat(2,auto)}}

.ph-chat{right:clamp(20px,2.1vw,34px);max-width:420px;display:grid;gap:14px;justify-items:start}
.ph-q{justify-self:end;margin:0;max-width:92%;padding:10px 15px 11px;border-radius:16px 16px 4px 16px;font-size:15px;line-height:1.35;color:#F4F5F7;
  background:#111318;
  transition:opacity .5s var(--ease),transform .6s var(--ease)}
.ph-q:empty,.ph-q.off{opacity:0;transform:translate3d(0,6px,0)}
.ph-q span::after{content:"";display:inline-block;width:1px;height:1.05em;margin-left:2px;vertical-align:-.16em;background:currentColor;opacity:0}
.ph-q.typing span::after{opacity:1;animation:phCaret .9s steps(1) infinite}
@keyframes phCaret{50%{opacity:0}}
.ph-a{margin:0;font-size:16px;line-height:1.5;color:#111318;min-height:3em;transition:opacity .5s var(--ease)}
.ph-a.off{opacity:0}
.ph-a b{display:block;margin-bottom:6px;font-weight:500;font-size:12px;letter-spacing:.01em;color:rgba(17,19,24,.5)}
.ph-a em{font-style:normal;opacity:0;filter:blur(4px);transition:opacity .5s var(--ease),filter .6s var(--ease)}
.ph-a em.on{opacity:1;filter:none}
/* the doctor thinking: the word itself with the spectrum running through it */
.ph-a .ph-th{display:inline-block;font-size:15px;color:transparent;background:linear-gradient(90deg,rgba(17,19,24,.35) 30%,#F07CC6,#8C7BFF,#4FC9E8,rgba(17,19,24,.35) 70%) 0 0/200% 100%;
  -webkit-background-clip:text;background-clip:text;animation:phThink 1.6s linear infinite}
@keyframes phThink{to{background-position:-200% 0}}

/* the headline, at the foot across the three readings; the quiet half is the light that reads them */
/* the headline at the left and the line under it at the right, on one row while there is room; above it when there is not */
.ph-foot{position:absolute;z-index:3;left:var(--m);right:var(--m);bottom:clamp(26px,5vh,56px);pointer-events:none;
  display:flex;flex-wrap:wrap-reverse;align-items:flex-end;justify-content:space-between;gap:16px 40px}
.ph-h{margin:0;font-family:var(--fd,var(--f));font-weight:500;font-size:clamp(54px,7.2vw,150px);line-height:.9;letter-spacing:-.055em;color:#111318;white-space:nowrap}
.ph-h .ln{display:inline-block;overflow:hidden;vertical-align:top;padding:.06em .04em .16em;margin:-.06em -.04em -.16em}
.ph-h .ln>span{display:inline-block;transform:translate3d(0,112%,0) rotate(3deg);transform-origin:0 100%;transition:transform 1.35s var(--bez) .3s}
.ph-h .g>span{transition-delay:.42s;background:linear-gradient(90deg,#FF9A5C 0%,#F07CC6 30%,#8C7BFF 62%,#4FC9E8 100%) 0 0/200% 100%;
  -webkit-background-clip:text;background-clip:text;color:transparent;animation:phHue 9s ease-in-out infinite alternate}
@keyframes phHue{to{background-position:100% 0}}
.ph.go .ph-h .ln>span{transform:none}
.ph-sub{flex:0 1 17em;max-width:17em;margin:0;padding-bottom:.85em;font-size:15px;line-height:1.45;color:rgba(17,19,24,.62);
  opacity:0;transform:translate3d(0,12px,0);transition:opacity 1s var(--ease) 1.5s,transform 1.2s var(--ease) 1.5s}
.ph.go .ph-sub{opacity:calc(1 - var(--ex) * 1.6);transform:none}

@media (hover:hover) and (pointer:fine){ .ph-p{cursor:none} }

/* ---- 2: a product, explained. A general template (js/fabric.js draws the orb): the product's words in a column on the
   left, its features walked one at a time, the feature's figure on a glass card over the orb. data-st (js): the feature */
.fa{position:relative;height:340vh;height:340svh;background:#E9ECEF;color:#111318}
.fa-pin{position:sticky;top:0;height:100vh;height:100svh;min-height:600px;overflow:hidden}
.fa-gl{position:absolute;inset:0;width:100%;height:100%;display:block}
.fa.nogl .fa-pin{background:radial-gradient(34vh 34vh at 66% 50%,rgba(79,201,232,.55),rgba(51,89,230,.35) 60%,transparent 72%),#E9ECEF}
/* .fa-hd, not .fa-top: style.css has a .fa-top of its own (the footer's) */
.fa-hd{display:block;margin:0;padding:0}
.fa-col{position:absolute;z-index:2;left:var(--m);top:clamp(96px,14vh,150px);bottom:clamp(32px,6vh,64px);width:min(470px,36vw);display:flex;flex-direction:column}
.fa-h{margin:0;font-family:var(--fd,var(--f));font-weight:500;font-size:clamp(48px,min(6vw,10.5vh),112px);line-height:.9;letter-spacing:-.055em}
.fa-h .ln{display:inline-block;overflow:hidden;vertical-align:top;padding:.06em .04em .14em;margin:-.06em -.04em -.14em}
.fa-h .ln>span{display:inline-block;transform:translate3d(0,112%,0) rotate(3deg);transform-origin:0 100%;transition:transform 1.3s var(--bez)}
.fa-h .ln+.ln>span{transition-delay:.1s}
.fa-lead{margin:.75em 0 0;font-size:19px;line-height:1.4;letter-spacing:-.01em}
.fa-about{margin:.8em 0 0;max-width:27em;font-size:15px;line-height:1.55;color:rgba(17,19,24,.6)}
.fa-lead,.fa-about,.fa-fs,.fa-ask{opacity:0;transform:translate3d(0,12px,0);transition:opacity 1s var(--ease),transform 1.2s var(--ease)}
.fa-lead{transition-delay:.3s}.fa-about{transition-delay:.4s}.fa-fs{transition-delay:.5s}.fa-ask{transition-delay:.6s}
.fa.in .fa-h .ln>span,.fa.in .fa-lead,.fa.in .fa-about,.fa.in .fa-fs,.fa.in .fa-ask{transform:none;opacity:1}

/* the features: the one in hand opens with its line */
.fa-fs{list-style:none;margin:auto 0 0;padding:0}
.fa-f{border-top:1px solid rgba(17,19,24,.12)}
.fa-f button{all:unset;box-sizing:border-box;display:flex;align-items:baseline;gap:14px;width:100%;padding:15px 0 13px;cursor:pointer;
  font-family:var(--fd,var(--f));font-weight:500;font-size:clamp(19px,1.6vw,24px);letter-spacing:-.025em;line-height:1.15;color:rgba(17,19,24,.34);transition:color .6s var(--ease)}
.fa-f button:focus-visible{outline:2px solid #8C7BFF;outline-offset:4px;border-radius:4px}
.fa-fi{flex:0 0 1.3em;font-family:var(--f);font-size:13px;font-weight:500;letter-spacing:0;font-variant-numeric:tabular-nums}
.fa-fw{display:grid;grid-template-rows:0fr;transition:grid-template-rows .8s var(--bez)}
.fa-fd{margin:0;min-height:0;overflow:hidden;padding-left:calc(1.3em * 13 / 15 + 14px);font-size:15px;line-height:1.5;color:rgba(17,19,24,.62);opacity:0;transition:opacity .6s var(--ease)}
.fa[data-st="0"] .fa-f:nth-child(1) button,.fa[data-st="1"] .fa-f:nth-child(2) button,.fa[data-st="2"] .fa-f:nth-child(3) button,
.fa[data-st="3"] .fa-f:nth-child(4) button,.fa[data-st="4"] .fa-f:nth-child(5) button{color:#111318}
.fa[data-st="0"] .fa-f:nth-child(1) .fa-fw,.fa[data-st="1"] .fa-f:nth-child(2) .fa-fw,.fa[data-st="2"] .fa-f:nth-child(3) .fa-fw,
.fa[data-st="3"] .fa-f:nth-child(4) .fa-fw,.fa[data-st="4"] .fa-f:nth-child(5) .fa-fw{grid-template-rows:1fr}
.fa[data-st="0"] .fa-f:nth-child(1) .fa-fd,.fa[data-st="1"] .fa-f:nth-child(2) .fa-fd,.fa[data-st="2"] .fa-f:nth-child(3) .fa-fd,
.fa[data-st="3"] .fa-f:nth-child(4) .fa-fd,.fa[data-st="4"] .fa-f:nth-child(5) .fa-fd{opacity:1;transition-delay:.2s;padding-bottom:16px}
.fa-ask{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin-top:20px;padding:12px 18px;border-radius:999px;background:#111318;color:#F4F5F7;
  font-size:15px;text-decoration:none;transition:opacity 1s var(--ease) .6s,transform 1.2s var(--ease) .6s,background-color .3s}
.fa-ask svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;transition:transform .4s var(--bez)}
.fa-ask:hover svg{transform:translateX(3px)}

/* the feature's figure, on frosted glass over the orb, after the client's card reference */
.fa-card{position:absolute;z-index:2;right:var(--m);top:56%;width:300px;height:250px;padding:20px 22px;border-radius:24px;
  background:rgba(255,255,255,.5);-webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.8),0 1px 2px rgba(40,48,90,.04);
  opacity:0;transform:translate3d(0,16px,0);transition:opacity 1s var(--ease) .7s,transform 1.2s var(--ease) .7s}
.fa.in .fa-card{opacity:1;transform:none}
.fa-face{position:absolute;inset:20px 22px 44px;display:flex;flex-direction:column;opacity:0;filter:blur(8px);transform:translate3d(0,10px,0);
  transition:opacity .6s var(--ease),filter .7s var(--ease),transform .9s var(--bez)}
.fa[data-st="0"] .fa-face[data-s="0"],.fa[data-st="1"] .fa-face[data-s="1"],.fa[data-st="2"] .fa-face[data-s="2"],
.fa[data-st="3"] .fa-face[data-s="3"],.fa[data-st="4"] .fa-face[data-s="4"]{opacity:1;filter:none;transform:none;transition-delay:.15s}
.fa-ct{display:flex;justify-content:space-between;align-items:center;margin:0;font-size:14px}
.fa-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;background:#fff;font-size:12px;box-shadow:inset 0 0 0 1px rgba(17,19,24,.06)}
.fa-pill::after{content:"";width:5px;height:5px;margin-top:-3px;border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;transform:rotate(45deg)}
.fa-fig{margin:auto 0 0;display:flex;flex-direction:column;gap:6px}
.fa-fig b{font-family:var(--fd,var(--f));font-weight:500;font-size:84px;line-height:.9;letter-spacing:-.05em}
.fa-fig span{font-size:14px;color:rgba(17,19,24,.6)}
.fa-pg{position:absolute;left:22px;bottom:20px;margin:0;display:flex;gap:6px}
.fa-pg i{width:18px;height:3px;border-radius:2px;background:rgba(17,19,24,.16);transition:background-color .5s}
.fa[data-st="0"] .fa-pg i:nth-child(1),.fa[data-st="1"] .fa-pg i:nth-child(2),.fa[data-st="2"] .fa-pg i:nth-child(3),
.fa[data-st="3"] .fa-pg i:nth-child(4),.fa[data-st="4"] .fa-pg i:nth-child(5){background:#111318}

@media (max-width:860px){
  .fa{height:320vh;height:320svh}
  .fa-col{left:20px;right:20px;top:84px;bottom:20px;width:auto}
  .fa-h{font-size:clamp(40px,12vw,60px)}
  .fa-lead{font-size:16px;margin-top:.5em}
  .fa-about,.fa-ask{display:none}
  .fa-f button{padding:11px 0 9px;font-size:18px}
  .fa-fd{font-size:14px}
  .fa-card{right:20px;top:auto;bottom:calc(20px + 3 * 44px + 70px);width:min(200px,52vw);height:150px;padding:14px 16px;border-radius:18px}
  .fa-face{inset:14px 16px 30px}
  .fa-fig b{font-size:48px}
  .fa-fig span{font-size:12px}
  .fa-pg{left:16px;bottom:14px}
}
@media (prefers-reduced-motion:reduce){
  .fa-h .ln>span,.fa-lead,.fa-about,.fa-fs,.fa-ask,.fa-card{transform:none;opacity:1;transition:none}
  .fa-face{filter:none;transform:none}
}

/* ---- 3: a product. A general template: its name and lead, its features as cards (js/cards.js draws the cards and the
   ground from .pr-data). Pinned while the section scrolls; the scroll and a drag carry the row */
.pr{position:relative;height:330vh;height:330svh;background:#E9ECEF;color:#111318}
.pr-pin{position:sticky;top:0;height:100vh;height:100svh;min-height:560px;overflow:hidden;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
.pr-pin.dragging{cursor:grabbing}
.pr-gl{position:absolute;inset:0;width:100%;height:100%;display:block}
.pr.nogl .pr-pin{background:linear-gradient(90deg,rgba(255,154,92,.18),rgba(240,124,198,.16) 35%,rgba(140,123,255,.16) 65%,rgba(79,201,232,.18)),#E9ECEF}
.pr-head{position:absolute;z-index:2;left:var(--m);right:var(--m);top:clamp(96px,13vh,140px);display:flex;align-items:flex-end;justify-content:space-between;gap:24px 48px;flex-wrap:wrap;pointer-events:none}
.pr-h{margin:0;font-family:var(--fd,var(--f));font-weight:500;font-size:clamp(48px,6vw,116px);line-height:.9;letter-spacing:-.055em}
.pr-h .ln{display:inline-block;overflow:hidden;vertical-align:top;padding:.06em .04em .14em;margin:-.06em -.04em -.14em}
.pr-h .ln>span{display:inline-block;transform:translate3d(0,112%,0) rotate(3deg);transform-origin:0 100%;transition:transform 1.3s var(--bez)}
.pr-h .ln+.ln>span{transition-delay:.1s}
.pr-lead{margin:0;max-width:19em;padding-bottom:.5em;font-size:17px;line-height:1.45;color:rgba(17,19,24,.62);opacity:0;transform:translate3d(0,12px,0);transition:opacity 1s var(--ease) .35s,transform 1.2s var(--ease) .35s}
.pr.in .pr-h .ln>span,.pr.in .pr-lead{transform:none;opacity:1}
/* the features as words, for anyone not seeing the cards */
.pr-data{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;margin:0;padding:0}
.pr-foot{position:absolute;z-index:2;left:var(--m);right:var(--m);bottom:clamp(28px,5vh,52px);display:flex;justify-content:space-between;align-items:baseline;gap:20px;pointer-events:none;
  font-size:14px;color:rgba(17,19,24,.55)}
.pr-foot p{margin:0}
.pr-at{display:flex;gap:18px;align-items:baseline}
.pr-lb{color:#111318;font-size:15px}
.pr-of{font-variant-numeric:tabular-nums}
.pr-of b{font-weight:500;color:#111318}
@media (max-width:860px){
  .pr{height:300vh;height:300svh}
  .pr-head{top:84px;left:20px;right:20px;gap:12px}
  .pr-h{font-size:clamp(40px,12vw,64px)}
  .pr-lead{font-size:15px;padding:0}
  .pr-foot{left:20px;right:20px;bottom:22px;font-size:13px}
  .pr-hint{display:none}
  .pr-at{width:100%;justify-content:space-between}
}
@media (prefers-reduced-motion:reduce){ .pr-h .ln>span,.pr-lead{transform:none;opacity:1;transition:none} }

/* ---- phone: the panes are rows, one above another; a tap opens one */
@media (max-width:860px){
  .ph{height:150vh;height:150svh}
  /* the rows stop above the headline (--fb, its height, js), so a row opening never runs into it */
  .ph-panes{flex-direction:column;top:calc(var(--ex) * 10vh);bottom:calc(var(--fb,220px) + var(--ex) * 4vh)}
  .ph-panes[data-h="0"] .ph-p:nth-child(1),.ph-panes[data-h="1"] .ph-p:nth-child(2),.ph-panes[data-h="2"] .ph-p:nth-child(3){flex-grow:1.9}
  .ph-p::before{height:70%}
  .ph-p::after{display:none}
  .ph-t{top:16px;left:20px;width:calc(100% - 40px)}
  .ph-p:first-child .ph-t{top:calc(76px - var(--ex) * 56px)}
  .ph-n{font-size:21px}
  .ph-l{font-size:14px;margin-top:.35em}
  .ph-f{margin-top:10px}
  .ph-f li{padding:7px 0;font-size:13px}
  .ph-x{display:none}
  .ph-h{font-size:clamp(46px,15vw,84px);white-space:normal}
  .ph-h .ln{display:block}
  .ph-sub{flex-basis:100%;max-width:none;padding:0;font-size:14px}
}
@media (prefers-reduced-motion:reduce){
  .ph-n>span,.ph-l>span,.ph-h .ln>span{transform:none;transition:none}
  .ph-sub,.ph-x{transition:none}
}
