/* Team (contract 6n-3): each founder IS the scene. The person is an RGBA cut (tools/bake-team-studio.py) drawn by team.js on one
   square lattice with the ground, so there is no backdrop and no box: wherever there is no person, the field shows. The figure is
   set here; team.js snaps it onto the lattice, fades the shoulders out before the scene ends, and draws. Without script the cut
   photograph shows in the same place with the same fade. */
.tm-scene{--sh:clamp(640px,calc(100svh - var(--bar)),1080px);--fh:min(calc(var(--sh) * 1.12),calc(78vw / .8056));--fw:calc(var(--fh) * .8056);--f0:58%;--f1:84%;--ed:max(var(--pad),calc((100% - var(--max)) / 2));position:relative;height:var(--sh);overflow:hidden;background:var(--g0);isolation:isolate}
.tm-scene+.tm-scene{box-shadow:inset 0 1px 0 var(--line)}
.tm-bg{position:absolute;left:0;top:0;z-index:0;width:100%;height:100%;image-rendering:pixelated;pointer-events:none}

/* the page title, label-sized, in the first scene's corner: the first screen is the whole portrait */
.tm-title{position:absolute;z-index:3;left:var(--ed);top:clamp(48px,7svh,72px);max-width:min(30ch,34vw)}
.tm-title .in-h1{font-size:clamp(2.4rem,3.6vw,3.6rem)}

/* the person: a button, because pressing it shows the photograph; ~1.12x the scene's height, head near the top, shoulders run off */
.tm-face{position:absolute;z-index:1;top:calc(var(--sh) * .04);left:calc(63% - var(--fw) / 2);width:var(--fw);height:var(--fh);margin:0;padding:0;border:0;border-radius:0;background:none;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tm-flip .tm-face{left:calc(37% - var(--fw) / 2)}
.tm-face:focus{outline:none}
.tm-face:focus-visible{outline:2px solid var(--j300);outline-offset:-6px}
.tm-in{position:absolute;left:0;top:0;width:100%;height:100%;display:block}
.tm-in img,.tm-fx{position:absolute;inset:0;display:block;width:100%;height:100%}
/* without script: the cut, its shoulders dissolving the same way the drawn one does (no edge, no box) */
.tm-ph{object-fit:cover;-webkit-mask-image:linear-gradient(#000 var(--f0),transparent var(--f1)),radial-gradient(ellipse 62% 66% at 50% 38%,#000 70%,transparent 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(#000 var(--f0),transparent var(--f1)),radial-gradient(ellipse 62% 66% at 50% 38%,#000 70%,transparent 100%);mask-composite:intersect}
.tm-fx{display:none}
.is-live .tm-ph{visibility:hidden}
.is-live .tm-fx{display:block}

/* the name, real text, in big type over the lower part of the person */
.tm-name{position:absolute;z-index:2;left:var(--ed);bottom:clamp(48px,9svh,104px);margin:0;font:900 clamp(4.5rem,13vw,15rem)/.82 var(--display);letter-spacing:.004em;text-transform:uppercase;pointer-events:none}
.tm-flip .tm-name{left:auto;right:var(--ed);text-align:right}
.tm-f,.tm-l{display:block}
/* the role over the name (operator 2026-11-17: "set me as founder and tayson as co founder"): a small lit label, not a second headline */
.tm-r{display:block;margin:0 0 clamp(12px,1.6vh,20px) .06em;color:var(--j300);font:500 clamp(.75rem,.9vw,.9375rem)/1 var(--mono);letter-spacing:.24em;text-shadow:none}
/* the first name thin and light, the surname heavy and lit: the reference's pairing in the brand's own face (6n-2) */
.tm-f{color:#c9c4b6;font-weight:300;letter-spacing:.01em}
.tm-l{color:var(--j300);text-shadow:0 0 34px rgba(210,219,42,.22)}

/* the instruments: every line is a fact */

/* phones and tablets held upright: the figure full-bleed and in the flow, the title above it in the first scene, the name on the
   chest under the chin; the shoulders are gone by 82% of the figure and the scene ends at 94%, so the instruments sit on clear
   ground and nothing waits in an empty band */
@media (max-width:899px){
  .tm-scene{--fw:min(112vw,720px);--fh:calc(var(--fw) / .8056);--f0:58%;--f1:82%;height:auto;padding-top:44px}
  .tm-title{position:relative;left:auto;top:auto;max-width:none;padding:0 var(--pad) 4px}
  .tm-face,.tm-flip .tm-face{position:relative;display:block;top:auto;left:auto;margin:0 0 calc(var(--fh) * -.06) calc((100vw - var(--fw)) / 2)}
  .tm-name,.tm-flip .tm-name{left:var(--pad);right:var(--pad);bottom:44px;font-size:min(19vw,8rem);text-align:left}
  .tm-flip .tm-name{text-align:right}
  }

/* ---- under the portraits (contract 6n-5): the letter on paper, one desk, the rules. Nothing here moves on scroll (request 82). ---- */

/* the letter: the page turns to paper, its edges the portraits' own square pixels (tools/bake-team-paper.py); ink type on it */
.tm-paper{--edge:72px;position:relative;padding-block:calc(var(--edge) + clamp(8px,2vh,24px));color:var(--ink);background:linear-gradient(var(--cream),var(--cream)) 0 var(--edge)/100% calc(100% - 2 * var(--edge)) no-repeat,url(/assets/team/paper-top.png) 0 0/768px var(--edge) repeat-x,url(/assets/team/paper-bottom.png) 0 100%/768px var(--edge) repeat-x}
.tm-lt{display:grid;grid-template-columns:minmax(0,8fr) minmax(0,4fr);gap:0 clamp(24px,4vw,64px);background-color:var(--cream)}   /* the box the letter sits in is paper too, so a contrast check reads ink on paper */
.tm-head{grid-row:1}.tm-re{grid-row:2}.tm-body{grid-row:3}
.tm-head{grid-column:1/-1;display:block;width:clamp(170px,16vw,240px);height:auto;margin:0 0 clamp(36px,6vh,64px)}
.tm-re{grid-column:1;padding-bottom:14px;border-bottom:2px solid var(--ink);color:var(--ink);font:600 1rem/1.3 var(--sans);letter-spacing:0;text-transform:none}
.tm-re span{margin-right:.4em;color:#6b675e;font-weight:400}
.tm-body{grid-column:1;margin-top:clamp(28px,4vh,44px)}
.tm-body p{max-width:30em;margin:0 0 .85em;color:var(--ink);font:400 clamp(1.25rem,1.6vw,1.5rem)/1.45 var(--sans);text-wrap:pretty}
.tm-body .tm-to{margin-bottom:1.1em;font-weight:500}
/* the sign-off, in the right-hand column with its foot on the letter's last line: room to sign above each line, the typed name
   and the role under it; the real signatures go in that room when they come */
.tm-sig{grid-column:2;grid-row:2/4;align-self:end;display:grid;gap:clamp(20px,3vh,32px);margin-bottom:.85em}
.tm-sig p{margin:0;color:#4a4740;font:400 .9375rem/1.5 var(--sans)}
.tm-sig p::before{content:"";display:block;height:clamp(52px,7vh,72px);margin-bottom:10px;border-bottom:1.5px solid var(--ink)}
.tm-sig b{display:block;color:var(--ink);font:600 1rem/1.4 var(--sans)}

/* one desk: two rails of the lattice's dots, a name at the head of each; every job is a rung joining both */
.tm-desk-s .sub{margin-top:12px}
.tm-desk{--lamp:14px;--rail:radial-gradient(circle,var(--j600) 1.6px,transparent 2.2px);position:relative;margin-top:clamp(36px,6vh,64px)}
.tm-who{display:flex;justify-content:space-between;margin:0 0 6px;color:var(--t1);font:900 clamp(3rem,6.2vw,6.25rem)/.9 var(--display);letter-spacing:.005em;text-transform:uppercase}
.tm-who span{cursor:default;transition:color .25s}
.tm-jobs{position:relative;margin:0;padding:28px 0 0;list-style:none}
.tm-jobs::before,.tm-jobs::after{content:"";position:absolute;top:0;bottom:calc(var(--row) / 2 - 7px);width:var(--lamp);background:var(--rail) 50% 0/var(--lamp) 14px repeat-y}
.tm-jobs{--row:clamp(68px,9vh,88px)}
.tm-jobs::before{left:0}
.tm-jobs::after{right:0}
.tm-jobs li{position:relative;z-index:1;display:grid;grid-template-columns:var(--lamp) minmax(16px,1fr) auto minmax(16px,1fr) var(--lamp);align-items:center;gap:0 clamp(10px,1.4vw,20px);min-height:var(--row)}
.tm-lamp{width:var(--lamp);height:var(--lamp);border-radius:50%;background:var(--g1);box-shadow:inset 0 0 0 2px #4a505e;transition:background-color .25s,box-shadow .25s}
.tm-run{height:4px;background:var(--rail) 0 50%/14px 4px repeat-x;opacity:.7;transition:opacity .25s}
.tm-job{color:var(--t1);font:600 clamp(1.25rem,1.6vw,1.5rem)/1.3 var(--sans);text-align:center;transition:color .25s}
.tm-job a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em;padding-block:13px;margin-block:-13px}
.tm-jobs li:is(:hover,:focus-within) .tm-lamp{background:var(--j300);box-shadow:var(--glow)}
.tm-jobs li:is(:hover,:focus-within) .tm-run{--rail:radial-gradient(circle,var(--j300) 1.8px,transparent 2.4px);opacity:1}
.tm-jobs li:is(:hover,:focus-within) .tm-job{color:var(--j300)}
/* a name lights its own side of every rung */
.tm-desk:has(.tm-who span:first-child:hover) .tm-lamp:first-child,.tm-desk:has(.tm-who span:last-child:hover) .tm-lamp:last-child{background:var(--j300);box-shadow:var(--glow)}
.tm-who span:hover{color:var(--j300)}

/* the rules hang on one rail of the lattice's dots, a lamp at each, the same line as the desk above; the reason beside each rule */
.tm-rules{--lamp:14px;--rs:clamp(2rem,3.4vw,3rem);--pt:clamp(20px,3.2vh,32px);position:relative;margin:clamp(20px,4vh,40px) 0 0;padding:0 0 0 calc(var(--lamp) + clamp(20px,3vw,44px));list-style:none}
.tm-rules::before{content:"";position:absolute;left:0;top:0;bottom:0;width:var(--lamp);background:radial-gradient(circle,var(--j600) 1.6px,transparent 2.2px) 50% 0/var(--lamp) 14px repeat-y;-webkit-mask-image:linear-gradient(transparent,#000 var(--pt),#000 calc(100% - var(--pt)),transparent);mask-image:linear-gradient(transparent,#000 var(--pt),#000 calc(100% - var(--pt)),transparent)}
.tm-rules li{position:relative;display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);align-items:baseline;gap:10px clamp(24px,4vw,64px);padding:var(--pt) 0}
.tm-rules li::before{content:"";position:absolute;left:calc(-1 * (var(--lamp) + clamp(20px,3vw,44px)));top:calc(var(--pt) + var(--rs) * .475 - var(--lamp) / 2);width:var(--lamp);height:var(--lamp);border-radius:50%;background:var(--g1);box-shadow:inset 0 0 0 2px #4a505e;transition:background-color .25s,box-shadow .25s}
.tm-rules li:hover::before{background:var(--j300);box-shadow:var(--glow)}
.tm-rules h3{margin:0;color:var(--t1);font:900 var(--rs)/.95 var(--display);letter-spacing:.005em;text-transform:uppercase;text-wrap:balance}
.tm-rules p{margin:0;max-width:38ch;color:var(--t2);font:400 1.25rem/1.5 var(--sans)}

@media (max-width:899px){
  .tm-paper{--edge:48px;background-size:100% calc(100% - 2 * var(--edge)),512px var(--edge),512px var(--edge)}   /* 4 px cells on a phone, still whole pixels */
  .tm-lt,.tm-rules li{grid-template-columns:minmax(0,1fr)}
  .tm-head,.tm-re,.tm-body,.tm-sig{grid-row:auto}
  .tm-sig{grid-column:1;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:clamp(20px,4vh,36px) 0 0}
  .tm-jobs{--row:76px}
  .tm-jobs li{gap:0 8px}
  .tm-job{font-size:1rem}
  .tm-who{font-size:clamp(2.6rem,12vw,4rem)}
  .tm-rules p{font-size:1rem}
  }
@media (prefers-reduced-motion:reduce){.tm-lamp,.tm-run,.tm-job,.tm-who span,.tm-rules li::before{transition:none}}
