/* ==========================================================================
   home.css — playground settings on the beach home page
   Home text is sized in px, so text size uses zoom on the text containers.
   At default settings nothing here applies, except hiding the .sandt text
   that stands in for the sand title images.
   ========================================================================== */
.sandt{display:none;font-family:"Gabarito",sans-serif;font-weight:800;letter-spacing:-.015em;line-height:1.05;color:var(--jux-ink,#042B38)}
html:is([data-jux-size="2"],[data-jux-size="3"],[data-jux-font="lexend"],[data-jux-font="atkinson"],[data-jux-contrast="high"]) .sandh{display:none!important}
html:is([data-jux-size="2"],[data-jux-size="3"],[data-jux-font="lexend"],[data-jux-font="atkinson"],[data-jux-contrast="high"]) .sandt{display:block}

/* text size */
html[data-jux-size="2"] :is(header.intro,.about-hero .txt,.tl-head,.timeline,.tl-m-body,.tl-m-head,.pk-wrap-inner .tl-sub,#kw .card,#cs .card){zoom:1.25}
html[data-jux-size="3"] :is(header.intro,.about-hero .txt,.tl-head,.timeline,.tl-m-body,.tl-m-head,.pk-wrap-inner .tl-sub,#kw .card,#cs .card){zoom:1.5}
/* zoom scales the width too, so these stay inside the screen. The intro title sits in a fixed layer with no scrolling */
html[data-jux-size="2"] header.intro{width:min(760px,calc(90vw/1.25))}
html[data-jux-size="3"] header.intro{width:min(760px,calc(90vw/1.5))}
html[data-jux-size="2"] .intro .sandt{font-size:min(10.4vw,3.4rem)}
html[data-jux-size="3"] .intro .sandt{font-size:min(8.6vw,3rem)}
@media(max-width:760px){
  /* the date column takes too much of a phone at larger text: the date moves above its card and the logo above the words */
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .timeline::before{left:10px}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .tl-item{grid-template-columns:20px minmax(0,1fr);column-gap:8px;row-gap:4px}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .tl-dot-col{grid-column:1;grid-row:1;padding-top:4px}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .tl-date{grid-column:2;grid-row:1;text-align:left;padding-top:0}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about :is(.tl-d1,.tl-d2){display:inline}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .tl-card{grid-column:2;grid-row:2;min-width:0;flex-direction:column;gap:8px;padding:12px 14px}
  html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about .tl-card-body{width:100%;overflow-wrap:break-word}
}
html[data-jux-size="2"] .float .tag{font-size:14px}
html[data-jux-size="3"] .float .tag{font-size:15px}
html body.bar .float .tag{font-size:13px}
/* About me is built to fit one screen: larger text may need to scroll instead of clip */
html:is([data-jux-size="2"],[data-jux-size="3"]) #v-about{overflow-y:auto}
html:is([data-jux-size="2"],[data-jux-size="3"]) .about-hero{height:auto;min-height:100%;align-items:flex-start}
html:is([data-jux-size="2"],[data-jux-size="3"]) .about-hero .txt{padding-bottom:190px}

/* an open study hides the floaties on wider screens, so the playground needs its own way in. Classic has one in its header */
.jux-open{display:none}
html[data-jux-style="personality"] body.side .jux-open{display:block}

/* motion */
html[data-jux-motion="calm"] #dive{display:none}

/* high contrast: solid colour behind text instead of photos */
html[data-jux-contrast="high"]{--jux-ink:#000}
html[data-jux-contrast="high"] #palmsbg,html[data-jux-contrast="high"] #shore{background:#FFF4DC!important;background-image:none!important}
html[data-jux-contrast="high"] :is(#abpan,#beachdeco){display:none!important}
html[data-jux-contrast="high"] :is(header.intro .lead,#v-about .lead,#v-about p.bio,.tl-sub,.timeline h3,.timeline p,.tl-role){color:#000!important;text-shadow:none!important}
html[data-jux-contrast="high"] :is(header.intro .lead .w,#v-about .lead .w){color:#034A3B!important}
html[data-jux-contrast="high"] :is(.iconlink,.status,.scroll-hint){background:#fff!important;color:#000!important;border:2px solid #000!important}
html[data-jux-contrast="high"] .status .s-text{color:#000!important}
html[data-jux-contrast="high"] :is(#kw,#cs) .card{background:#000!important;color:#fff!important;border:2px solid #fff!important}
html[data-jux-contrast="high"] :is(#kw,#cs) .card :is(p,figcaption,b,span){color:#fff!important;background:transparent!important}
html[data-jux-contrast="high"] .float .tag{background:#000!important;color:#fff!important;border:1px solid #fff}

/* case studies: the briefcase floatie opens these cards, bobbing on the water like the recommendations */
#cs{position:fixed;left:0;right:0;top:calc(env(safe-area-inset-top,0px) + 118px);bottom:env(safe-area-inset-bottom,0px);z-index:2;display:grid;grid-auto-flow:column;grid-auto-columns:max-content;align-content:safe center;justify-content:safe center;gap:24px;padding:12px 8vw 40px;overflow-x:auto;overflow-y:auto;visibility:hidden;pointer-events:none;scrollbar-width:thin}
/* one shared row, so every card takes the height of the tallest and Impact and the button line up */
#cs .cw{display:flex}
body[data-view=work] #cs{visibility:visible;pointer-events:auto}
body[data-view=work] #cs .cw{opacity:1;transform:none;transition-delay:calc(.5s + var(--i)*70ms)}
body[data-view=work] #deep{opacity:.45}
.cs-card{display:flex;flex-direction:column;width:clamp(272px,80vw,372px);max-height:none;padding:0;text-align:left;font:inherit;color:var(--ink);cursor:pointer}
.cs-card:hover{border-color:var(--accent2)}
.cs-card img{display:block;width:100%;height:clamp(120px,19vh,190px);object-fit:cover;object-position:50% 20%;border:0;border-radius:0;flex:none;background:radial-gradient(58% 95% at 12% 8%,rgba(246,176,116,.8),transparent 72%),radial-gradient(58% 95% at 92% 12%,rgba(94,242,200,.65),transparent 72%),radial-gradient(60% 75% at 50% 105%,rgba(236,244,240,.35),transparent 72%),#5C8F8D}
.cs-body{flex:1;display:flex;flex-direction:column;gap:8px;padding:16px 20px 18px}
.cs-kicker{font-size:.84rem;font-weight:600;color:#B4C3C8}
.cs-title{font-family:var(--hero);font-size:1.14rem;font-weight:700;line-height:1.25;color:var(--accent2)}
.cs-summary{flex:1;font-size:.93rem;line-height:1.45}
.cs-impact{padding-top:8px;border-top:1px solid var(--line2);font-size:.93rem;line-height:1.4;color:#fff}
.cs-impact b{display:block;margin-bottom:2px;font-size:.84rem;font-weight:600;color:var(--accent2)}
.cs-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;margin-top:6px;font-size:.88rem}
.cs-go{padding:8px 14px;border-radius:999px;font-weight:700;background:#fff;color:#042B38;transition:background .2s}
.cs-card:hover .cs-go,.cs-card:focus-visible .cs-go{background:var(--accent2)}
html[data-jux-contrast="high"] #cs .cs-card .cs-go{background:#fff;color:#000}
/* hovering a card on a big screen: its screenshot, uncropped, rising out of the card (cs-pop.js) */
/* no box of its own: the prototype itself sits half in the card's picture and half above it */
.cs-pop{position:fixed;z-index:40;pointer-events:none;opacity:0;visibility:hidden;transform:scale(.6);transform-origin:var(--ox,50%) 100%;
  transition:opacity .22s,transform .28s cubic-bezier(.2,.9,.3,1.15),visibility 0s .28s}
.cs-pop.on{opacity:1;visibility:visible;transform:none;transition:opacity .18s,transform .28s cubic-bezier(.2,.9,.3,1.15),visibility 0s}
.cs-pop img{display:block;width:100%;height:100%;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 24px 30px rgba(0,8,14,.55))}
/* while it's out, the card keeps its coloured backdrop but not its own copy of the prototype */
#cs .cs-card.popped img{object-position:-9999px 0}
html[data-jux-motion="calm"] .cs-pop{transform:none;transition:opacity .15s,visibility 0s .15s}
html[data-jux-motion="calm"] .cs-pop.on{transition:opacity .15s,visibility 0s}
@media(prefers-reduced-motion:reduce){.cs-pop,.cs-pop.on{transform:none}}
html[data-jux-style="classic"] .cs-pop{display:none}
/* zoom scales the card width too, so larger text stays inside a phone screen */
@media(max-width:760px){
  /* phones: the cards stack in one column and the page scrolls down through them */
  #cs{grid-auto-flow:row;grid-auto-columns:auto;grid-auto-rows:max-content;justify-content:center;align-content:start;overflow-x:hidden;padding:12px 16px 120px}
  html[data-jux-size="2"] #cs .cs-card{width:calc(84vw/1.25)}
  html[data-jux-size="3"] #cs .cs-card{width:calc(84vw/1.5)}
}
/* phones: labels on the outer floaties line up with the screen edge instead of running off it */
@media(max-width:640px){
  body[data-view=intro] :is(.float[data-id=work],.float[data-id=duck]) .tag{left:0;transform:translate(0,4px)}
  body[data-view=intro] :is(.float[data-id=kind],.float[data-id=pencil]) .tag{left:auto;right:0;transform:translate(0,4px)}
}
