/* The Biomefolio company home page. Tokens, masthead, buttons and footer come from the Bench
   stylesheet (bench.css), so the company and its benchmark read as one family.

   Two voices, as on the Bench pages, with the weights swapped. The benchmark speaks in the sans and
   draws a plate. The company is people, so it speaks in the serif and draws the world.

   The one loud thing on this page is the figure in the hero: the world, pipetted into a plate.
   Twelve lab points on the globe feed twelve channels, the channels feed the twelve columns of a
   plate, and each row of the plate is a model. Picking a model sends its results back to the globe. */

:root{--cobalt:#2443cf;--line:#a3abc2}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---------- Hero: one sentence, three steps, and the figure ---------- */
.co-hero{--inst:clamp(21rem,39vw,35rem);display:grid;grid-template-columns:minmax(0,1fr) var(--inst);gap:clamp(28px,4.4vw,68px);align-items:center;padding-block:clamp(26px,5vh,64px) clamp(36px,6vh,72px)}
.co-hero h1{margin:0;color:var(--ink);font:400 clamp(2.5rem,min(4.9vw,10vh),4.6rem)/1.03 var(--serif);letter-spacing:-.02em;text-wrap:balance}
.co-lede{max-width:33em;margin:clamp(16px,2.4vh,28px) 0 0;color:var(--ink-2);font-size:var(--t-lede);line-height:1.55}
.co-lede strong{color:var(--ink);font-weight:600}
.co-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 26px;margin:clamp(18px,2.8vh,32px) 0 0}
.co-more{display:inline-flex;align-items:center;min-height:44px;font-weight:600}

/* The three steps of the figure, in words. The script marks the one being drawn. Without the script
   they are simply three lines. */
.co-steps{list-style:none;max-width:33em;margin:clamp(20px,3.6vh,44px) 0 0;padding:0;border-top:1px solid var(--rule)}
.co-steps li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 13px;align-items:center;padding:9px 0;border-bottom:1px solid var(--rule);color:var(--ink-2);transition:color .3s ease}
.co-steps p{margin:0;font-size:var(--t-m);line-height:1.4}
.co-steps strong{color:var(--ink);font-weight:600}
.seat{flex:none;width:11px;height:11px;border-radius:50%;background:var(--blue);transition:background-color .3s ease,box-shadow .3s ease}
[data-steps].is-live li:not(.is-now,.is-done) .seat{background:none;box-shadow:inset 0 0 0 1px #7f8bb0}
[data-steps].is-live li:not(.is-now,.is-done){color:var(--ink-3)}
[data-steps].is-live li:not(.is-now,.is-done) strong{color:var(--ink-2)}

/* ---------- The figure ---------- */
.inst{width:100%;margin:0}
.inst-box{--drop:clamp(40px,6.4vh,74px);position:relative;display:grid;justify-items:center;row-gap:var(--drop)}
.inst .globe{width:min(74%,clamp(12rem,39vh,21rem))}
.globe{position:relative;aspect-ratio:1;border-radius:50%}
/* The limb is drawn here, so the circle is on the page before the canvas paints. */
.globe::after{content:"";position:absolute;inset:0;border:1px solid var(--line);border-radius:50%;pointer-events:none}
.globe canvas,.globe img{position:absolute;inset:0;display:block;width:100%;height:100%;border-radius:50%}
.globe canvas{opacity:0;transition:opacity .4s ease-out}
[data-plate][data-painted] canvas{opacity:1}

/* Twelve channels, drawn over the whole figure. A droplet is one pulse of test data on its way to a well. */
.inst-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.inst-lines path{fill:none;stroke:#8e98b6;stroke-width:1;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .75s cubic-bezier(.5,0,.3,1)}
.inst.is-piped .inst-lines path{stroke-dashoffset:0}
.inst-lines circle{fill:var(--blue)}

/* The plate: twelve labs across, three to a country, one row for each model. The names hang outside
   the plate on the left, and an equal margin on the right keeps the wells centred under the globe. */
.tplate{--p:clamp(19px,min(2.15vw,3.5vh),31px);--g:clamp(4px,.6vw,9px);--w:calc(var(--p)*.72);--lab:clamp(52px,4.6vw,66px);position:relative;isolation:isolate;display:grid;
  grid-template-columns:var(--lab) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) var(--lab);
  grid-template-rows:auto repeat(6,var(--p)) auto;font-family:var(--sans)}
.tplate::before,.tplate::after{content:"";position:absolute;grid-column:2/17;grid-row:1/8;z-index:-1;border-radius:0 12px 12px 12px}
.tplate::before{inset:-2px -9px -9px;background:var(--rule-2);clip-path:polygon(11px 0,100% 0,100% 100%,0 100%,0 11px);filter:drop-shadow(0 12px 18px rgba(20,35,74,.07))}
.tplate::after{inset:-1px -8px -8px;background:var(--sheet);clip-path:polygon(10.6px 0,100% 0,100% 100%,0 100%,0 10.6px)}
.tp-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:center;justify-items:center;min-height:var(--p)}
.tp-row>:nth-child(1){grid-column:1;justify-self:start}
.tp-row>:nth-child(2){grid-column:2}.tp-row>:nth-child(3){grid-column:3}.tp-row>:nth-child(4){grid-column:4}
.tp-row>:nth-child(5){grid-column:6}.tp-row>:nth-child(6){grid-column:7}.tp-row>:nth-child(7){grid-column:8}
.tp-row>:nth-child(8){grid-column:10}.tp-row>:nth-child(9){grid-column:11}.tp-row>:nth-child(10){grid-column:12}
.tp-row>:nth-child(11){grid-column:14}.tp-row>:nth-child(12){grid-column:15}.tp-row>:nth-child(13){grid-column:16}
.tp-countries{margin-top:15px}
.tp-countries>.tp-c{justify-self:stretch;margin:0 2px;padding-top:4px;border-top:1px solid var(--rule-2);text-align:center}
.tp-countries>:nth-child(2){grid-column:2/5}.tp-countries>:nth-child(3){grid-column:6/9}.tp-countries>:nth-child(4){grid-column:10/13}.tp-countries>:nth-child(5){grid-column:14/17}
.tp-countries,.tp-nums{color:var(--ink-3);font-size:.6875rem;font-weight:500;font-variant-numeric:tabular-nums lining-nums;line-height:1.2}
.tp-nums{min-height:calc(var(--p)*.8)}
.tp-m{white-space:nowrap}
.tp-model{appearance:none;margin:0;padding:0;border:0;background:none;color:var(--ink-2);font:500 .75rem/1 var(--sans);text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tp-model:focus-visible{outline:2px solid var(--blue);outline-offset:1px;border-radius:6px}

/* A well. The ring is the empty well and the dot is the result. Bigger and darker is stronger. */
.tw{position:relative;display:grid;place-items:center;width:100%;height:100%}
.tw::before,.tw::after{content:"";grid-area:1/1;border-radius:50%}
.tw::before{width:var(--w);height:var(--w);box-shadow:inset 0 0 0 1px rgba(20,35,74,.15),inset 0 2px 3px -1px rgba(20,35,74,.13);transition:background-color .25s ease,box-shadow .25s ease}
.tw::after{width:calc(var(--w)*var(--d));height:calc(var(--w)*var(--d));background:var(--c);transform:scale(0);transition:transform .38s cubic-bezier(.2,.75,.25,1),opacity .25s ease}
.tp-model.is-read .tw::after{transform:scale(1)}
.v5{--d:1;--c:#2443cf}.v4{--d:.84;--c:#3a55d0}.v3{--d:.68;--c:#566dcc}.v2{--d:.46;--c:#6b7cc4}.v1{--d:.3;--c:#7f8bb8}
/* The chosen model: its name in ink, its weak wells under the marker, the other rows stepped back. */
.tplate.has-pick .tp-model:not([aria-pressed="true"]) .tw::after{opacity:.4}
.tp-model[aria-pressed="true"]{color:var(--ink);font-weight:600}
.tp-model[aria-pressed="true"] .weak::before{background:var(--mark);box-shadow:0 0 0 calc(var(--p)*.12) var(--mark)}
/* Without the script the plate is simply shown read. */
.inst:not([data-live]) .tw::after{transform:scale(1)}

.inst figcaption{display:grid;gap:2px;margin-top:clamp(12px,2vh,20px);padding-inline:var(--lab-pad,0)}
.inst-note{min-height:1.4em;margin:0;color:var(--ink-2);font:italic 400 1.0625rem/1.4 var(--serif);text-align:center}
.inst-note mark{margin:0 -.14em;padding:.06em .14em;border-radius:.3em;background:var(--mark);color:var(--ink)}
.inst-foot{display:flex;align-items:center;justify-content:center;gap:6px 16px;flex-wrap:wrap;min-height:44px;margin:0}
.globe-note{color:var(--ink-3);font:400 var(--t-s)/1.4 var(--sans)}
.globe-motion{flex:none;min-width:44px;height:44px;padding:0;border:0;background:none;color:var(--ink-3);cursor:pointer;font:500 .875rem/1 var(--sans);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em}
.globe-motion:hover{color:var(--ink)}

/* ---------- What we make: the benchmark, shown as its plate ---------- */
.co-product{padding:clamp(52px,7vw,104px) 0;border-top:1px solid var(--rule)}
.co-product-in{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);gap:40px clamp(32px,6vw,88px);align-items:center}
.co-kicker{margin:0 0 10px;color:var(--ink-3);font-size:var(--t-s);font-weight:500}
.co-product h2{margin:0;font:600 clamp(1.55rem,2.5vw,2.3rem)/1.12 var(--display);letter-spacing:-.025em}
/* The company speaks in the serif. Only the benchmark block keeps the sans. */
.co-why h2{margin:0;font:400 clamp(1.8rem,3vw,2.7rem)/1.1 var(--serif);letter-spacing:-.015em}
.company .brand span{font:400 1.32rem/1 var(--serif);letter-spacing:-.01em}
.co-product-copy p{max-width:44ch;margin:14px 0 0;color:var(--ink-2);font-size:var(--t-lede);line-height:1.5}
.co-product-copy .co-kicker{margin:0 0 10px;font-size:var(--t-s)}
.co-product-copy .co-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 26px;margin-top:22px;font-size:1rem;font-weight:600}
.co-links a{display:inline-flex;align-items:center;min-height:44px}
.co-product .cplate{justify-self:end;min-width:0;padding-inline-end:clamp(8px,1.4vw,18px)}
.co-product .plate-title{margin:0 0 clamp(12px,1.5vw,18px);color:var(--ink-2);font-size:var(--t-s);line-height:1.4}
.co-product .plate-title strong{color:var(--ink);font-weight:600}
.co-product .cplate-grid{--pitch:clamp(20px,3vw,42px)}

/* ---------- Why: the letter ---------- */
.co-why{padding:clamp(52px,7vw,104px) 0;border-top:1px solid var(--rule)}
.co-why-in{display:grid;grid-template-columns:minmax(0,.5fr) minmax(0,1fr);gap:24px clamp(32px,6vw,88px);align-items:start}
.letter p{margin:0 0 1.1em;max-width:60ch;color:#2a3759;font:400 clamp(1.1rem,1.45vw,1.28rem)/1.62 var(--serif)}
.letter .letter-sign{margin:1.6em 0 0;color:var(--ink);font-style:italic}
/* Two strokes of the marker, one in each paragraph: what goes wrong, and the answer. Read alone,
   they are the letter. The stroke is a little shorter than the line, the way a highlighter sits on
   type. It is simply there: a stroke that draws itself while someone reads looks like a fault. */
.letter mark{margin:0 -.12em;padding:0 .12em;border-radius:.28em;background:linear-gradient(var(--mark),var(--mark)) no-repeat 0 62%/100% 76%;color:var(--ink);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.letter-sign span{display:block;color:var(--ink-3);font:400 var(--t-s)/1.5 var(--sans)}

/* ---------- The invitation: the one question a model team is asked ---------- */
.co-cta{padding:clamp(56px,7.4vw,108px) 0;background:var(--navy);color:#f3f5fb}
.co-cta :focus-visible{outline-color:#fff}
.co-cta-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:22px clamp(28px,5vw,80px);align-items:center}
.co-cta h2{margin:0;color:#fff;font:400 clamp(2rem,3.7vw,3.3rem)/1.06 var(--serif);letter-spacing:-.018em;text-wrap:balance}
.co-cta p{max-width:38ch;margin:0;color:#c5cde3;font-size:var(--t-lede);line-height:1.5}

@media(max-width:1000px){
  .co-cta-in{grid-template-columns:1fr}
  .co-cta .btn{justify-self:start}
  .co-product-in{grid-template-columns:1fr}
  .co-product .cplate{justify-self:start}
  .co-product .cplate-grid{--pitch:clamp(20px,min(calc((100vw - 2*var(--gutter) - 300px)/6),6.4vh),46px)}
}
@media(max-width:780px){
  /* On a phone the plate stacks each group's name over its wells, so the wells take the width of the screen.
     Without this the tablet rule above leaves them tiny and the names spill out of the plate. */
  .co-product .cplate-grid{--pitch:min(48px,calc((100vw - 2*var(--gutter) - 2*var(--pad))/6))}
  .co-product .cplate{padding-inline-end:0}
}
@media(max-width:860px){
  /* The words first, then the figure at the width of the screen. */
  .co-hero{grid-template-columns:1fr;gap:34px;padding-top:26px}
  .co-hero h1{font-size:clamp(2.4rem,11vw,3.4rem)}
  .inst{justify-self:center;max-width:30rem}
  .inst .globe{width:min(70%,17rem)}
  /* On a phone the names keep their column and the spare margin on the right is given to the wells. */
  .tplate{--lab:60px;--g:5px;--p:min(31px,calc((100vw - 2*var(--gutter) - var(--lab) - 3*var(--g) - 10px)/12));
    grid-template-columns:var(--lab) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) var(--g) repeat(3,var(--p)) 10px}
  .tp-model{font-size:.6875rem}
  .inst-foot{text-align:center}
  .co-why-in{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .globe canvas,.tw::after,.tw::before,.inst-lines path,.co-steps li,.seat{transition:none}
}
