/* Chrysalis v2, step 2: the rest of the homepage (Claude, 10 Nov 2026). Only loaded on the homepage while chv2_s2_on()
   (inc/v2/v2-site.php); every rule sits under body.chv2s2, so with the switch off nothing here applies.
   One idea for the whole page, the same as the first screen: a black floor, and each thing lit in the colour of its
   research area (the three --a-* variables of assets/v4/v2-site.css, set by [data-area]).
   1. Delivery and payment cards: dark glass (they were a white band between two black sections)
   2. Pens: the real pens in colour (template-parts/c3/v2-pens.php)
   3. Articles (template-parts/c3/v2-articles.php)
   4. Research Library: the shelf in the colours of its compounds (template-parts/c3/v2-library.php)
   5. Reveal on scroll ([data-rv], assets/v4/v2-home.js) */

/* ---------- 1. delivery and payment cards ---------- */
.chv2s2 section.c3-root.i4a{background:#000;padding:10px 0 64px}
.chv2s2 .i4-card{background:linear-gradient(180deg,rgba(255,255,255,.085) 0%,rgba(255,255,255,.03) 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1),inset 0 1px 0 rgba(255,255,255,.18)}
.chv2s2 .i4-sh{background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.2) 46%,rgba(255,255,255,.06) 52%,transparent 64%)}
.chv2s2 .i4-ic{color:#fff;background:radial-gradient(120% 120% at 30% 20%,rgba(255,255,255,.24) 0%,rgba(255,255,255,.08) 55%,rgba(255,255,255,.03) 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.chv2s2 .i4-ic svg circle[fill]{fill:#1b1b1f}
.chv2s2 .i4-lab,.chv2s2 .i4-num{color:#fff}
.chv2s2 .i4-num small,.chv2s2 .i4-line{color:#a2a3a9}
.chv2s2 .i4a-tape i{border-top-color:rgba(255,255,255,.18)}
.chv2s2 .i4a-tape i::before{background:rgba(255,255,255,.75)}
.chv2s2 .i4a-tape i::after{background:repeating-linear-gradient(90deg,rgba(255,255,255,.18) 0 1px,transparent 1px 49px)}
@media (max-width:899px){.chv2s2 section.c3-root.i4a{padding:6px 0 44px}}

/* ---------- 2. pens ---------- */
.chv2s2 .px{position:relative;isolation:isolate;overflow:hidden;padding:0;background:#000;color:#fff}
.chv2s2 .px *{box-sizing:border-box}
.px-art{position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;width:min(100%,1536px);margin:0 auto}
.px-art picture{display:block;width:100%;height:100%}
.px-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.px-in{display:flex;flex-direction:column;min-height:min(35vw,537.6px)}
/* wider than the picture: it stays with the page's column and its sides fade into the black */
@media (min-width:1537px){.px-art{-webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}}
.chv2s2 .c3-root.px .c3-chap{margin-bottom:0}
.px-copy{margin:auto 0;padding:20px 0 44px;max-width:320px}
.chv2s2 .c3-root.px .px-h{margin:0;padding-bottom:.07em;font-size:clamp(88px,7.4vw,124px);font-weight:500;letter-spacing:-.05em;line-height:.9}
.px-facts{margin:10px 0 26px;font-size:17px;line-height:1.35;letter-spacing:-.005em;color:#c4c5cb}
.px-facts .f3-sep{margin:0 .15em;color:#77787e}
.px-facts .nw{white-space:nowrap}
@media (max-width:1279.98px){
  .chv2s2 .px{display:flex;flex-direction:column}
  .px-art{position:static;order:2;z-index:auto;width:auto;aspect-ratio:2880/1008;margin:-5% 0 8px}
  .chv2s2 .c3-root.px .px-in{position:relative;z-index:1;width:100%;min-height:0}
  .px-copy{display:grid;grid-template-columns:1fr auto;align-items:end;column-gap:28px;max-width:none;margin:0;padding:34px 0 0}
  .chv2s2 .c3-root.px .px-h{grid-row:1/3;font-size:88px}
  .px-facts{margin:0 0 14px;text-align:right}
  .px-copy .btn{justify-self:end}
}
@media (max-width:767.98px){
  .px-art{aspect-ratio:1170/860;margin:-4% 0 0}
  .px-copy{display:block;padding:30px 0 0;text-align:center}
  .chv2s2 .c3-root.px .px-h{font-size:72px}
  .px-facts{margin:8px 0 20px;text-align:center;font-size:16px}
}

/* ---------- 3. articles ---------- */
.chv2s2 .ar{padding:var(--s2,96px) 0 calc(var(--s2,96px) - 24px);background:#000;color:#fff}
.chv2s2 .ar *{box-sizing:border-box}
.chv2s2 .c3-root.ar .ar-all{color:#fff}
.ar-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:20px}
.ar--pair .ar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ar--one .ar-grid{grid-template-columns:minmax(0,1fr)}
.chv2s2 .c3-root.ar .ar-c{position:relative;display:flex;flex-direction:column;border-radius:20px;overflow:hidden;color:#fff;text-decoration:none;
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.025));box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);
  --ar:rgb(var(--a-core,222 225 232));transition:box-shadow .35s linear,transform .5s cubic-bezier(.16,1,.3,1)}
.ar-pic{position:relative;overflow:hidden;background:#101013}
.ar-pic .cla-cover{display:block;width:100%;height:100%}
.ar-pic img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .9s cubic-bezier(.16,1,.3,1)}
.ar-c--lead .ar-pic,.ar-c--half .ar-pic{aspect-ratio:16/9}
/* the colour of the article's compound: a line of light where the picture meets the text, and a glow that rises on hover */
.ar-pic::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--ar) 18%,var(--ar) 82%,transparent);opacity:.9}
.ar-c[data-area] .ar-pic::before{content:"";position:absolute;z-index:1;left:0;right:0;bottom:0;height:46%;background:linear-gradient(0deg,rgb(var(--a-core) / .34),rgb(var(--a-core) / 0));opacity:.55;transition:opacity .4s linear;pointer-events:none}
.ar-c:not([data-area]) .ar-pic::after{opacity:.4}
.ar-tx{display:flex;flex-direction:column;flex:1;padding:22px 26px 26px}
.ar-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 12px;font-size:12px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;line-height:1.3;color:#a2a3a9}
.ar-meta b{display:inline-flex;align-items:center;gap:8px;font-weight:500;color:#fff}
.ar-meta b::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--ar);box-shadow:0 0 10px var(--ar)}
.chv2s2 .c3-root.ar .ar-t{margin:0;font-size:32px;font-weight:500;line-height:1.06;letter-spacing:-.03em;text-wrap:balance}
.ar-t .cla-nw{white-space:nowrap}
.ar-deck{margin:12px 0 0;font-size:16px;line-height:1.45;color:#b4b5bb;max-width:38em;text-wrap:pretty}
.ar-go{display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding-top:22px;font-size:14px;font-weight:500;letter-spacing:.06em;text-transform:uppercase}
.ar-go span{display:inline-block;transition:transform .35s cubic-bezier(.16,1,.3,1)}
.ar--pair .ar-t{font-size:28px}
/* one article only: the picture beside the words */
@media (min-width:900px){
  .chv2s2 .c3-root.ar.ar--one .ar-c{flex-direction:row}
  .ar--one .ar-pic{flex:none;width:58%}
  .ar--one .ar-pic::after{left:auto;top:0;bottom:0;width:2px;height:auto;background:linear-gradient(180deg,transparent,var(--ar) 18%,var(--ar) 82%,transparent)}
  .ar--one .ar-c[data-area] .ar-pic::before{left:auto;top:0;width:46%;height:auto;background:linear-gradient(270deg,rgb(var(--a-core) / .34),rgb(var(--a-core) / 0))}
  .ar--one .ar-tx{justify-content:center;padding:40px 44px}
  .ar--one .ar-go{margin-top:28px;padding-top:0}
}
/* the list beside the newest article */
.ar-list{display:flex;flex-direction:column;gap:12px}
.chv2s2 .c3-root.ar .ar-c--row{flex:1;flex-direction:row;align-items:stretch;border-radius:16px}
.ar-c--row .ar-pic{flex:none;width:168px}
.ar-c--row .ar-pic::after{left:auto;top:0;bottom:0;width:2px;height:auto;background:linear-gradient(180deg,transparent,var(--ar) 18%,var(--ar) 82%,transparent)}
.ar-c--row[data-area] .ar-pic::before{left:auto;top:0;width:60%;height:auto;background:linear-gradient(270deg,rgb(var(--a-core) / .34),rgb(var(--a-core) / 0))}
.ar-c--row .ar-tx{justify-content:center;padding:16px 22px}
.ar-c--row .ar-meta{margin-bottom:8px;font-size:11px}
.chv2s2 .c3-root.ar .ar-c--row .ar-t{font-size:20px;line-height:1.14;letter-spacing:-.02em}
@media (hover:hover){
  .chv2s2 .c3-root.ar .ar-c:hover{box-shadow:inset 0 0 0 1px rgba(255,255,255,.24);transform:translateY(-3px)}
  .ar-c:hover .ar-pic img{transform:scale(1.035)}
  .ar-c[data-area]:hover .ar-pic::before{opacity:1}
  .ar-c:hover .ar-go span{transform:translate(3px,-3px)}
}
.chv2s2 .c3-root.ar .ar-c:focus-visible{outline:2px solid #fff;outline-offset:4px}
@media (max-width:1099.98px){
  .chv2s2 .c3-root.ar .ar-t{font-size:26px}
  .ar-c--row .ar-pic{width:132px}
  .chv2s2 .c3-root.ar .ar-c--row .ar-t{font-size:18px}
}
@media (max-width:899px){
  .chv2s2 .ar{padding:var(--s2,64px) 0 calc(var(--s2,64px) - 16px)}
  .ar-grid,.ar--pair .ar-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .chv2s2 .c3-root.ar .ar-c{border-radius:16px}
  .ar-tx{padding:18px 18px 20px}
  .chv2s2 .c3-root.ar .ar-t,.ar--pair .ar-t{font-size:24px}
  .ar-deck{font-size:15px}
  .ar-go{padding-top:16px}
  .ar-c--row .ar-pic{width:96px}
  .ar-c--row .ar-tx{padding:12px 14px}
  .chv2s2 .c3-root.ar .ar-c--row .ar-t{font-size:16px}
  .chv2s2 .c3-root.ar .c3-head{flex-direction:row;align-items:flex-end;justify-content:space-between}
}

/* ---------- 4. Research Library: the shelf in the colours of its compounds ---------- */
.chv2s2 .i5v .i5-spines>li{position:relative}
.chv2s2 .i5v .i5-spine{--ac:var(--a-core,205 210 220);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.1),inset 6px 0 10px -6px rgba(255,255,255,.18),inset -8px 0 12px -8px rgba(0,0,0,.6),inset 0 4px 0 rgb(var(--ac)),0 0 26px -6px rgb(var(--ac) / .5)}
.chv2s2 .i5v .i5-spine.m-black{background:linear-gradient(0deg,rgb(var(--ac) / .5) 0%,rgb(var(--ac) / .13) 30%,rgb(var(--ac) / 0) 58%),linear-gradient(90deg,#070708 0%,#1b1c1f 38%,#0d0d0f 100%)}
.chv2s2 .i5v .i5-spine.m-graph{background:linear-gradient(0deg,rgb(var(--ac) / .5) 0%,rgb(var(--ac) / .13) 30%,rgb(var(--ac) / 0) 58%),linear-gradient(90deg,#17181b 0%,#2e2f34 40%,#1b1c20 100%)}
.chv2s2 .i5v .i5-spine .i5-ix{color:rgb(var(--a-glow,230 233 240));opacity:1}
/* the pool of colour on the shelf under each spine (it stays on the shelf while the spine lifts) */
.chv2s2 .i5v .i5-pool{position:absolute;left:50%;top:100%;width:220%;height:54px;margin-left:-110%;pointer-events:none;
  background:radial-gradient(50% 100% at 50% 0%,rgb(var(--a-core,205 210 220) / .5),rgb(var(--a-core,205 210 220) / 0) 72%)}
.chv2s2 .i5v .i5-spines>li::after{content:"";position:absolute;left:8%;right:8%;bottom:-2px;height:3px;border-radius:3px;background:rgb(var(--a-glow,230 233 240));box-shadow:0 0 14px 2px rgb(var(--a-core,205 210 220) / .8);pointer-events:none}
.chv2s2 .i5v .i5-refl{background:none}
.chv2s2 .i5v .i5-shelf::after{opacity:.45}
.chv2s2 .i5v .i5-tip .i5-ar{display:inline-flex;align-items:center;gap:7px;color:#0e0e10}
.chv2s2 .i5v .i5-tip .i5-ar i{width:8px;height:8px;border-radius:50%;background:rgb(var(--a-core,150 152 160))}
/* the key: which colour is which research area */
.chv2s2 .i5-key{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 28px;margin:26px 0 0;padding:0;list-style:none;font-size:13px;font-weight:500;letter-spacing:.02em;color:#c4c5cb}
.chv2s2 .i5-key li{display:inline-flex;align-items:center;gap:9px;white-space:nowrap}
.chv2s2 .i5-key i{width:9px;height:9px;border-radius:50%;background:rgb(var(--a-core));box-shadow:0 0 12px rgb(var(--a-core) / .9)}
.chv2s2 .i5-key b{font-weight:500;color:#77787e}
@media (max-width:899px){
  .chv2s2 .i5v .i5-pool{height:40px}
  .chv2s2 .i5-key{justify-content:flex-start;gap:8px 18px;margin-top:22px;font-size:12.5px}
}

/* ---------- 5. reveal on scroll ---------- */
.rv-js .chv2s2 [data-rv]:not(.rv-in) :is(.px-art,.px-copy,.ar-c){opacity:0;transform:translateY(22px)}
.rv-js .chv2s2 [data-rv] :is(.px-art,.px-copy,.ar-c){transition:opacity .8s linear,transform 1.1s cubic-bezier(.16,1,.3,1)}
.rv-js .chv2s2 [data-rv] .px-copy{transition-delay:.12s}
.rv-js .chv2s2 [data-rv] .ar-c:nth-child(2),.rv-js .chv2s2 [data-rv] .ar-list .ar-c:nth-child(1){transition-delay:.09s}
.rv-js .chv2s2 [data-rv] .ar-list .ar-c:nth-child(2){transition-delay:.17s}
.rv-js .chv2s2 [data-rv] .ar-list .ar-c:nth-child(3){transition-delay:.25s}
.rv-js .chv2s2 [data-rv].rv-done :is(.px-art,.px-copy,.ar-c){transition-delay:0s}
.rv-js .chv2s2 [data-rv].rv-done .ar-c{transition:box-shadow .35s linear,transform .5s cubic-bezier(.16,1,.3,1)}
@media (prefers-reduced-motion:reduce){
  .rv-js .chv2s2 [data-rv] :is(.px-art,.px-copy,.ar-c){opacity:1!important;transform:none!important;transition:none!important}
  .ar-pic img,.ar-go span{transition:none}
}

/* ---------- 6. first screen: the chosen vial steps forward (Alik, 10 Nov: "zoom animations for the vials we choose") ----------
   Each vial button carries its own piece of the first screen's picture (the same file, already loaded: --hx-img is set by
   v2-home.js; the piece is worked out from the vial's place in the picture, --fx/--fw/--fy/--fh, numbers 0..1). The chosen
   vial's piece grows from the point where the vial stands, so the vial and its reflection come towards you while the others
   stay and dim; one glint runs across the glass. Computer: the vial under the cursor. Phone: the vial in the frame.
   Only transform and opacity move. Without the script, or with reduced motion, nothing here shows.
   10 Nov, later (Alik: "it goes for the square not just the vial"; his pick C): the piece and the glint are cut to the vial's
   own outline (hero/hero-d-shape.webp, hero-p-shape.webp: the same scene rendered with the vials only, used as a mask), so the
   background no longer grows or flashes with the vial, and the step forward is calmer: 1.07 (was 1.13 / 1.1). */
.chv2s2 .hx-row{--hx-shape:url(hero/hero-d-shape.webp?v=20261116)}
@media (max-width:767.98px){.chv2s2 .hx-row{--hx-shape:url(hero/hero-p-shape.webp?v=20261116)}}
.chv2s2 .hx-v{--fx:var(--dxn);--fw:var(--dwn);--fy:var(--dyn);--fh:var(--dhn)}
@media (max-width:767.98px){.chv2s2 .hx-v{--fx:var(--pxn);--fw:var(--pwn);--fy:.4;--fh:.38}}
.chv2s2 .hx-v::before{content:"";position:absolute;pointer-events:none;--a:.22;--b:.12;--c:.36;
  left:calc(var(--a) * -100%);right:calc(var(--a) * -100%);top:calc(var(--b) * -100%);bottom:calc(var(--c) * -100%);
  --w2:calc(var(--fw) * (1 + 2 * var(--a)));--x2:calc(var(--fx) - var(--a) * var(--fw));
  --h2:calc(var(--fh) * (1 + var(--b) + var(--c)));--y2:calc(var(--fy) - var(--b) * var(--fh));
  background-image:var(--hx-img,none);background-repeat:no-repeat;
  background-size:calc(100% / var(--w2)) calc(100% / var(--h2));
  background-position:calc(100% * var(--x2) / (1 - var(--w2))) calc(100% * var(--y2) / (1 - var(--h2)));
  transform-origin:50% calc(100% * (1 + var(--b)) / (1 + var(--b) + var(--c)));
  opacity:0;transition:transform .75s var(--hx-ease),opacity .3s linear .14s;
  -webkit-mask-image:var(--hx-shape);mask-image:var(--hx-shape);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-size:calc(100% / var(--w2)) calc(100% / var(--h2));mask-size:calc(100% / var(--w2)) calc(100% / var(--h2));
  -webkit-mask-position:calc(100% * var(--x2) / (1 - var(--w2))) calc(100% * var(--y2) / (1 - var(--h2)));mask-position:calc(100% * var(--x2) / (1 - var(--w2))) calc(100% * var(--y2) / (1 - var(--h2)))}
.chv2s2 .hx-v::after{content:"";position:absolute;left:-12%;right:-12%;top:-8%;bottom:-2%;pointer-events:none;opacity:0;mix-blend-mode:color-dodge;
  background:linear-gradient(102deg,transparent 43%,rgba(255,255,255,.3) 50%,transparent 57%) no-repeat 130% 0 / 280% 100%;
  /* the glint's own piece of the outline (its box is the vial's + 12 % each side, 8 % above, 2 % below); it grows with the vial */
  --a3:.12;--b3:.08;--c3:.02;--w3:calc(var(--fw) * (1 + 2 * var(--a3)));--x3:calc(var(--fx) - var(--a3) * var(--fw));
  --h3:calc(var(--fh) * (1 + var(--b3) + var(--c3)));--y3:calc(var(--fy) - var(--b3) * var(--fh));
  -webkit-mask-image:var(--hx-shape);mask-image:var(--hx-shape);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-size:calc(100% / var(--w3)) calc(100% / var(--h3));mask-size:calc(100% / var(--w3)) calc(100% / var(--h3));
  -webkit-mask-position:calc(100% * var(--x3) / (1 - var(--w3))) calc(100% * var(--y3) / (1 - var(--h3)));mask-position:calc(100% * var(--x3) / (1 - var(--w3))) calc(100% * var(--y3) / (1 - var(--h3)));
  transform-origin:50% calc(100% * (1 + var(--b3)) / (1 + var(--b3) + var(--c3)));transition:transform .75s var(--hx-ease)}
@keyframes hx-glint{0%{opacity:0;background-position:130% 0}18%{opacity:1}82%{opacity:1}100%{opacity:0;background-position:-30% 0}}
.chv2s2 .hx-br{transform-origin:50% 93%;transition:left .55s var(--hx-ease),top .55s var(--hx-ease),width .55s var(--hx-ease),height .55s var(--hx-ease),opacity .5s linear,transform .75s var(--hx-ease)}
@media (min-width:768px){
  .chv2s2 .hx[data-hx="on"].is-picked .hx-v[aria-pressed="true"]::before{opacity:1;transform:scale(1.07);transition:transform .75s var(--hx-ease),opacity .16s linear}
  .chv2s2 .hx[data-hx="on"].is-picked .hx-v[aria-pressed="true"]::after{transform:scale(1.07);animation:hx-glint 1.05s cubic-bezier(.3,.1,.2,1) .16s both}
  .chv2s2 .hx[data-hx="on"].is-picked .hx-br{transform:scale(1.07)}
}
@media (max-width:767.98px){
  .chv2s2 .hx[data-hx="on"] .hx-v[aria-pressed="true"]::before{opacity:1;transform:scale(1.07);transition:transform .75s var(--hx-ease),opacity .16s linear}
  .chv2s2 .hx[data-hx="on"] .hx-v[aria-pressed="true"]::after{transform:scale(1.07);animation:hx-glint 1.05s cubic-bezier(.3,.1,.2,1) .16s both}
  .chv2s2 .hx-brp{transform-origin:50% 96%;transition:opacity .5s linear,transform .75s var(--hx-ease)}
  .chv2s2 .hx[data-hx="on"] .hx-brp{transform:translateX(-50%) scale(1.07)}
}
@media (prefers-reduced-motion:reduce){
  .chv2s2 .hx-v::before,.chv2s2 .hx-v::after{display:none}
  .chv2s2 .hx .hx-br,.chv2s2 .hx .hx-brp{transition:none}
  .chv2s2 .hx[data-hx="on"].is-picked .hx-br{transform:none}
  .chv2s2 .hx[data-hx="on"] .hx-brp{transform:translateX(-50%)}
}

/* 13 Nov 2026 (Alik: "should we remove animation bright flash ... the cursor on it on the compounds"): no white streak
   sweeps over a vial when the pointer or a tap picks it (the ::after glint above). The vial still grows a little. */
.chv2s2 .hx-v::after{content:none;animation:none}
