/* ============================================================
   Homepage HERO, "the night stage" (2026-11-25, Alex: a proper hero about peptides with Curio on it, cinematic 3D, quiet on sound).
   Markup: #hhHero in hero-preview.html (preview) / index.html. Script: assets/hero.js.
   - behind everything = the worlds (2026-12-05): one picture + one short looping film per place, see .hh-plate; the back canvas (plain stage light + far dust) only
     shows if the pictures cannot load; front canvas = a few big soft bokeh discs that drift in front
   - Curio stands on the stage (his own clips, assets/curio/lg/); the goal chips bring one crew character in beside him (assets/team/<id>.webp + dance.mp4)
   - --acc / --acc-rgb = the accent light of the scene, tweened by hero.js when a chip is chosen
   Easing tokens are local so this file does not depend on styles.css (the live styles.css is ahead of Git, never upload it from the repo).
   ============================================================ */
.hh{
  --night:#17002B; --soft:#D8CBE8; --warm:#F0E2BC;
  --acc:#F1CB6A; --acc-rgb:241,203,106;
  --e-out:cubic-bezier(.23,1,.32,1);
  --ch:clamp(250px, 50vh, 450px);     /* Curio's height on the stage */
  --gh:calc(var(--ch) * .84);          /* a guest's base height (times its own --k) */
  --sh:clamp(400px, 64vh, 600px);      /* the stage box */
  --feet:8%;                           /* how far above the stage box's bottom edge the characters stand (hero.js: M.fy is the rest; change both) */
  position:relative; isolation:isolate; overflow:hidden; background:var(--night); color:#fff;
  min-height:clamp(600px, calc(100svh - 150px), 860px); display:flex; flex-direction:column;   /* 150px = the promo bar + the sticky header above it */
}
.hh canvas.hh-bg,.hh canvas.hh-front{position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; display:block;}
.hh canvas.hh-bg{z-index:0;}
.hh canvas.hh-front{z-index:4;}
/* the worlds (2026-12-05, "inside the body"): Curio alone stands in an evening lab beside a hologram of the body; every goal opens its own place inside the body.
   .hh-plate is as large as the hero and melts into the night on the left (computer) or above and below the stage (phone), so no picture sits behind the words.
   Each world is one layer in it, placed by hero.js so its floor is under Curio's feet: its picture as the background and, on top, its short looping film, which
   fades in once it really plays. The canvas over the worlds draws what the page itself lights: the lights on the body, the goal's glow, the lamp on a guest. */
.hh-plate{position:absolute; inset:0; z-index:0; pointer-events:none; opacity:0; transition:opacity .9s ease;
  -webkit-mask-composite:source-in; mask-composite:intersect;}
.hh-plate.on{opacity:1;}
/* a change of world is a cross-fade: the world that leaves holds for a moment while the next one rises over it, so the stage never dips to dark in between */
.hh-world{position:absolute; left:0; top:0; z-index:0; background:0 0/100% 100% no-repeat; opacity:0; transition:opacity .62s cubic-bezier(.55,0,.8,.45);
  -webkit-mask-composite:source-in; mask-composite:intersect;}
.hh-world.on{opacity:1; z-index:1; transition:opacity .62s cubic-bezier(.2,.7,.3,1);}
.hh-world video{position:absolute; left:0; top:0; width:100%; height:100%; object-fit:fill; display:block; opacity:0; transition:opacity .45s ease; pointer-events:none;}
.hh-world video.on{opacity:1;}
.hh-plate canvas{position:absolute; left:0; top:0; z-index:2; width:100%; height:100%; display:block;}
.hh-plated canvas.hh-bg,.hh-plated .hh-floor{display:none;}
.hh-plated canvas.hh-front{opacity:.5;}
/* with a real floor under them the characters get a soft contact shadow */
.hh-plated .hh-curio::before,.hh-plated .hh-guest::before{content:""; position:absolute; left:8%; right:18%; bottom:-1.5%; height:9%; border-radius:50%; z-index:-1; pointer-events:none;
  background:radial-gradient(closest-side,rgba(6,0,14,.62),rgba(6,0,14,0));}
.hh-plated .hh-guest::before{left:14%; right:14%;}
/* (A change of guest: the lamp and its pool on the floor go down and come up, drawn in the canvas over the worlds by hero.js; the guest itself walks in from the
   left while it fades in and walks out the same way, see "A change of guest" there.) */
/* the edges fall into the dark, the middle stays lit */
.hh::after{content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(130% 95% at 68% 46%, rgba(8,0,18,0) 52%, rgba(8,0,18,.6) 100%);}

/* ---------- the holiday offer: a quiet strip, the gift boxes are panel 2 ---------- */
.hh-offer{position:relative; z-index:5; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 14px;
  padding:10px 20px; background:rgba(var(--acc-rgb),.11); color:var(--warm); font-size:13.5px; font-weight:600; text-align:center; line-height:1.4;}
.hh-offer b{color:#fff; font-weight:700;}
.hh-offer a{color:var(--acc); font-weight:800; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1.5px;
  transition:color .2s ease;}
.hh-offer a:hover{color:#fff;}

/* ---------- layout: copy on the left, stage on the right (phone: title, lede, stage, chips, buttons) ---------- */
.hh-in{position:relative; z-index:5; flex:1; width:100%; max-width:var(--maxw,1280px); margin:0 auto;
  padding:clamp(18px,3.2vw,44px) clamp(20px,4vw,40px) 0;
  display:grid; column-gap:clamp(12px,2.4vw,40px);
  grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr);
  grid-template-rows:1fr auto auto auto auto 1fr;
  grid-template-areas:". stage" "title stage" "lede stage" "chips stage" "ctas stage" ". stage";
  will-change:transform,opacity;}
.hh-title{grid-area:title; position:relative; z-index:8; margin:0 0 18px; font-size:clamp(38px,4.7vw,66px); font-weight:800; line-height:1.03; letter-spacing:-.022em; color:#fff; text-wrap:balance;}
.hh-title span{display:block;}
.hh-lede{grid-area:lede; margin:0 0 26px; max-width:44ch; font-size:clamp(16px,1.4vw,18.5px); line-height:1.6; color:var(--soft);}
.hh-ask{grid-area:chips; margin:0;}
.hh-ask p{margin:0 0 12px; font-size:15px; font-weight:700; color:var(--warm);}
.hh-chips{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 26px; padding:0; list-style:none;}
.hh-chip{appearance:none; border:0; cursor:pointer; min-height:44px; padding:0 18px; border-radius:999px;
  background:rgba(255,255,255,.1); color:#F4ECFB; font:700 14.5px/1 Montserrat,system-ui,sans-serif; letter-spacing:0;
  transition:background-color .2s ease, color .2s ease, transform .16s var(--e-out); -webkit-tap-highlight-color:transparent;}
.hh-chip:focus-visible{outline:3px solid var(--acc); outline-offset:3px;}
.hh-chip:active{transform:scale(.97);}
.hh-chip[aria-pressed="true"]{background:var(--acc); color:#1B0130;}
@media (hover:hover) and (pointer:fine){ .hh-chip:hover{background:rgba(255,255,255,.2);} .hh-chip[aria-pressed="true"]:hover{background:var(--acc); filter:brightness(1.06);} }
.hh-ctas{grid-area:ctas; display:flex; flex-wrap:wrap; align-items:center; gap:14px 22px; padding-bottom:clamp(28px,5vh,56px);}
.hh-ctas .btn-gold{padding:15px 26px; font-size:15px;}
.hh-more{color:#fff; font-weight:700; font-size:15px; text-decoration:underline; text-underline-offset:5px; text-decoration-thickness:1.5px; text-decoration-color:rgba(255,255,255,.45);
  transition:text-decoration-color .2s ease;}
.hh-more:hover{color:#fff; text-decoration-color:var(--acc);}

/* ---------- the stage ---------- */
.hh-stage{grid-area:stage; position:relative; align-self:end; height:var(--sh); min-height:var(--sh);}
/* the pool of light on the floor under the characters */
.hh-floor{position:absolute; left:-4%; right:-4%; bottom:1%; height:20%; pointer-events:none;
  background:radial-gradient(50% 50% at 50% 55%, rgba(var(--acc-rgb),.42), rgba(var(--acc-rgb),0) 74%);}
/* Curio keeps his place (Alex 2026-11-29: he no longer steps aside); --shift, set by hero.js, puts him a little right of the middle so a guest has room on his left */
.hh-curio{position:absolute; left:2%; bottom:var(--feet); height:var(--ch); aspect-ratio:540/690; z-index:3; cursor:pointer; -webkit-tap-highlight-color:transparent;
  translate:var(--shift,0px) 0;}
.hh-curio:focus-visible{outline:3px solid var(--acc); outline-offset:4px; border-radius:18px;}
.hh-cfig,.hh-gfig{position:absolute; inset:0; display:block; transform-origin:50% 100%; animation:hhBreathe 4.4s ease-in-out infinite;
  filter:drop-shadow(0 6px 6px rgba(0,0,0,.4));}
.hh-cfig img,.hh-cfig canvas,.hh-gfig img,.hh-gfig canvas{position:absolute; left:0; top:0; width:100%; height:100%; display:block; max-width:none;}
/* only the clip canvases themselves: Curio's second canvas (the copy of his last picture that dissolves away at a hand-over, curio-anim.js) sets its own blending */
#hhCv,.hh-gfig canvas{opacity:0; mix-blend-mode:plus-lighter; transition:opacity .16s linear;}
.hh-cfig.live #hhCv,.hh-gfig.live canvas{opacity:1;}
.hh-cfig img,.hh-gfig img{transition:opacity .16s linear;}
.hh-cfig.live .hh-still,.hh-gfig.live img{opacity:0;}
.hh-gfig canvas,.hh-gfig img{transition-duration:.11s;}   /* a guest's clip starts mid-step: a shorter dissolve shows its two pairs of feet for fewer frames */
.hh-cfig canvas[hidden],.hh-gfig canvas[hidden]{display:none;}
@keyframes hhBreathe{0%,100%{scale:1 1} 50%{scale:.987 1.018}}

.hh-guest{position:absolute; left:var(--gx,0px); bottom:calc(var(--feet) - var(--gdrop,0px)); z-index:3; height:var(--gp, calc(var(--gh) * var(--k,1))); aspect-ratio:var(--ar,1); transform-origin:50% 100%;}
.hh-guest[hidden]{display:none;}
.hh-gfig{display:block; text-decoration:none;}
.hh-gfig:focus-visible{outline:3px solid var(--acc); outline-offset:6px; border-radius:18px;}

/* what the guest says: a flat card above its head */
.hh-card{position:absolute; z-index:6; left:var(--gx,0px); width:min(290px,48%); bottom:calc(var(--feet) + var(--gp, calc(var(--gh) * var(--k,1))) + 12px);
  background:#33105A; border-radius:18px; padding:15px 17px 16px; box-shadow:0 18px 34px -16px rgba(0,0,0,.7);}
.hh-card[hidden]{display:none;}
.hh-card b{display:block; font-size:17px; line-height:1.2; font-weight:800; color:var(--acc);}
.hh-card i{display:block; margin:3px 0 9px; font-style:normal; font-size:13px; font-weight:600; color:var(--soft);}
.hh-card p{margin:0 0 11px; font-size:14.5px; line-height:1.5; font-weight:500; color:#fff;}
.hh-card a{color:var(--acc); font-weight:800; font-size:14px; text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:1.5px;}
.hh-card a:hover{color:#fff;}
/* under the words: the link to its page on the left and, on the right, the voice button (2026-11-30, voice on tap): a round speaker button ("Hear me") that turns into a
   stop square while the character speaks. Round and without a word because the card is 290 px wide: the link and a worded button do not fit on one line. */
.hh-crow{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.hh-chear{position:relative; flex:none; display:grid; place-items:center; width:36px; height:36px; margin:-6px -4px -7px 0; padding:0; border:0; border-radius:50%; background:rgba(255,255,255,.13);
  color:var(--acc); cursor:pointer; transition:background-color .2s ease, transform .16s var(--e-out); -webkit-tap-highlight-color:transparent;}
.hh-chear[hidden]{display:none;}
.hh-chear::after{content:""; position:absolute; inset:-5px;}                      /* the button is 36 px, the place to tap is 46 */
.hh-chear .hh-ic-stop,.hh-chear.on .hh-ic-hear{display:none;}
.hh-chear.on .hh-ic-stop{display:block;}
.hh-chear.on{background:rgba(255,255,255,.22);}
.hh-chear:active{transform:scale(.97);}
.hh-chear:focus-visible{outline:3px solid var(--acc); outline-offset:2px;}
@media (hover:hover) and (pointer:fine){ .hh-chear:hover{background:rgba(255,255,255,.24);} }

/* what Curio says: a cream speech bubble above his head, the words in step with his recorded line (hero.js). The guest's card is purple and flat; his is light, so a voice and a note never look alike. */
.hh-say{position:absolute; z-index:5; left:var(--sayx, calc(2% + var(--shift,0px) + var(--ch) * .3913)); bottom:calc(var(--feet) + var(--ch) * .76 + 16px); translate:-50% 0; box-sizing:border-box;
  width:min(306px, calc(100vw - 32px)); padding:13px 16px 14px; background:#FFF7E4; color:#2F024E; border-radius:20px; transform-origin:50% 100%; box-shadow:0 18px 34px -16px rgba(0,0,0,.7);}
.hh-say[hidden]{display:none;}
.hh-stage.has-guest .hh-say{display:none;}
.hh-say::after{content:""; position:absolute; left:50%; top:100%; width:18px; height:10px; margin-left:calc(-9px + var(--tail,0px)); background:#FFF7E4; clip-path:polygon(0 0,100% 0,50% 100%);}
.hh-s1{margin:0 96px 0 0; font-size:17px; line-height:1.3; font-weight:800;}
.hh-s2w{display:grid; grid-template-rows:0fr; transition:grid-template-rows .34s var(--e-out);}
.hh-say.s2 .hh-s2w{grid-template-rows:1fr;}
.hh-s2{min-height:0; overflow:hidden; margin:0; padding-top:5px; font-size:14.5px; line-height:1.45; font-weight:500; color:#4B2A6B; opacity:0; transition:opacity .26s ease .08s;}
.hh-say.s2 .hh-s2{opacity:1;}
.hh-hear{position:absolute; top:7px; right:8px; display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 13px 0 10px; border:0; border-radius:999px; background:rgba(47,2,78,.09);
  color:#2F024E; font:inherit; font-size:13px; font-weight:700; cursor:pointer; transition:background-color .2s ease, transform .16s var(--e-out); -webkit-tap-highlight-color:transparent;}
.hh-hear:active{transform:scale(.97);}
.hh-hear:focus-visible{outline:3px solid #2F024E; outline-offset:2px;}
@media (hover:hover) and (pointer:fine){ .hh-hear:hover{background:rgba(47,2,78,.17);} }
.hh-say.no-voice .hh-hear{display:none;}
.hh-say.no-voice .hh-s1{margin-right:0;}

/* the tour sign (2026-11-30): when he has asked "Want a quick tour?" his bubble hands over to this one cream button with the same little tail. It stays beside him while
   the crew hops through; hero.js keeps it clear of a guest's card (--tourx) and keeps the tail on his head (--ttail). */
.hh-tour{position:absolute; z-index:5; left:var(--tourx, var(--sayx, 50%)); bottom:calc(var(--feet) + var(--ch) * .76 + 14px); translate:-50% 0; box-sizing:border-box;
  display:inline-flex; align-items:center; gap:11px; min-height:46px; padding:6px 6px 6px 18px; border:0; border-radius:999px; background:#FFF7E4; color:#2F024E;
  font:800 15px/1.2 Montserrat,system-ui,sans-serif; letter-spacing:0; white-space:nowrap; cursor:pointer; transform-origin:50% 100%; box-shadow:0 18px 34px -16px rgba(0,0,0,.7);
  transition:transform .16s var(--e-out), background-color .2s ease; -webkit-tap-highlight-color:transparent;}
.hh-tour[hidden]{display:none;}
.hh-tour::after{content:""; position:absolute; left:50%; top:calc(100% - 1px); width:18px; height:10px; margin-left:calc(-9px + var(--ttail,0px)); background:inherit; clip-path:polygon(0 0,100% 0,50% 100%);}
.hh-tour i{display:grid; place-items:center; flex:none; width:34px; height:34px; border-radius:50%; background:#2F024E; color:#FFF7E4; transition:transform .2s var(--e-out);}
.hh-tour:active{transform:scale(.97);}
.hh-tour:focus-visible{outline:3px solid var(--acc); outline-offset:3px;}
@media (hover:hover) and (pointer:fine){ .hh-tour:hover{background:#fff;} .hh-tour:hover i{transform:translate3d(3px,0,0);} }

/* the jump down to his corner: a copy of his standing picture flies from the stage to the corner (hero.js); the stage Curio waits invisible while he is away */
.hh-ghost{position:fixed; left:0; top:0; z-index:62; display:none; max-width:none; pointer-events:none; transform-origin:50% 100%; will-change:transform; filter:drop-shadow(0 6px 6px rgba(0,0,0,.4));}
.hh-ghost.on{display:block;}
.hh-gone{visibility:hidden; pointer-events:none;}

/* ---------- the entrance: heading first, then the sentence, the chips one by one, the buttons (once, only when the script runs) ---------- */
.hh-js .hh:not(.hh-go) .hh-a{opacity:0; transform:translate3d(0,16px,0);}
.hh-js .hh .hh-a{transition:opacity .56s var(--e-out), transform .56s var(--e-out); transition-delay:var(--d,0ms);}
.hh-js .hh:not(.hh-go) .hh-stage{opacity:0;}
.hh-js .hh .hh-stage{transition:opacity .9s ease .1s;}
/* the chips come in one by one (an animation that does not hold its end state, so hover and press still work afterwards) */
.hh-js .hh:not(.hh-go) .hh-chip{opacity:0;}
.hh-go .hh-chip{animation:hhIn .56s var(--e-out) backwards; animation-delay:calc(200ms + var(--i,0) * 45ms);}
@keyframes hhIn{from{opacity:0; transform:translate3d(0,14px,0);} to{opacity:1; transform:none;}}

/* ---------- the panel after the hero slides over it like a sheet ---------- */
.hh + .hp-stage{position:relative; z-index:2; margin-top:-30px; border-radius:30px 30px 0 0; box-shadow:0 -18px 40px -22px rgba(8,0,18,.7);}

/* Curio waits in the corner while the hero Curio is on screen (hero.js sets .hh-here on <body>) */
.hh-here .hp-chip,.hh-here .hp-bubble,.hh-hop .hp-chip,.hh-hop .hp-bubble{opacity:0; pointer-events:none;}
.hh-here.hh-away .hp-chip,.hh-here.hh-away .hp-bubble{opacity:1; pointer-events:auto;}     /* he has jumped down: the corner Curio is there even while the hero is still partly on screen */
.hp-chip,.hp-bubble{transition:opacity .3s ease;}

/* the old second panel keeps its look; its heading is a level lower now that the hero owns the h1 */
.hp-curio h2.hp-h1{font-size:clamp(38px,6.4vw,74px); font-weight:800; line-height:1.02; color:var(--hp-ink); margin:0 0 18px; letter-spacing:-.01em;}

/* ---------- phone and narrow screens ---------- */
@media (max-width:900px){
  /* phone order: title, the stage (so a tap on a chip is seen at once), the chips in ONE sideways row, then the sentence and the buttons */
  .hh{--ch:clamp(200px,32vh,290px); --sh:clamp(324px,45vh,424px); --feet:5%; min-height:0;}   /* the stage is a little taller than it was (2026-11-30): room for the tour sign between a guest's card and Curio's head */
  .hh-in{grid-template-columns:minmax(0,1fr); grid-template-rows:auto;
    grid-template-areas:"title" "stage" "chips" "lede" "ctas"; padding-top:20px;}
  .hh-title{font-size:clamp(34px,9.6vw,54px); margin-bottom:4px;}
  .hh-stage{align-self:auto; margin:0 -14px;}
  .hh-ask{margin:2px 0 4px;}
  .hh-ask p{margin-bottom:10px; font-size:14.5px;}
  .hh-chips{flex-wrap:nowrap; overflow-x:auto; scroll-snap-type:x proximity; margin:0 -20px 18px; padding:0 20px 2px; scroll-padding-inline:20px; scrollbar-width:none; -webkit-overflow-scrolling:touch;}
  .hh-chips::-webkit-scrollbar{display:none;}
  .hh-chip{flex:0 0 auto; scroll-snap-align:start;}
  .hh-lede{margin-bottom:22px; font-size:16px;}
  .hh-say{padding:11px 14px 12px; width:min(296px, calc(100vw - 28px));}
  .hh-s1{font-size:16px; margin-right:92px;}
  .hh-s2{font-size:14px; line-height:1.4; padding-top:3px;}
  .hh-card{left:14px; right:14px; width:auto; top:0; bottom:auto; padding:11px 14px 12px;}
  .hh-card b{display:inline; font-size:15.5px;}
  .hh-card i{display:inline; margin:0 0 0 8px; font-size:13px;}
  .hh-card p{font-size:13.5px; line-height:1.45; margin:6px 0 7px;}
  .hh-chear{margin:-8px -2px -8px 0;}
  .hh-ctas{padding-bottom:30px;}
  .hh + .hp-stage{margin-top:-22px; border-radius:24px 24px 0 0;}
  .hh-offer{font-size:13px; padding:8px 14px;}
  .hh-offer .hh-val{display:none;}
}
/* a tablet held upright (744 to 900 wide): slightly slimmer goal buttons, so all eight fit in the one row and none is cut at the edge */
@media (min-width:740px) and (max-width:900px){ .hh-chip{padding:0 14px;} }

/* less motion: everything stands still, content and the chips still work */
@media (prefers-reduced-motion:reduce){
  .hh-cfig,.hh-gfig{animation:none;}
  .hh-plate,.hh-world,.hh-world.on,.hh-world video{transition:none;}
  .hh-curio{transition:none;}
  .hh-s2w{transition:none;}
  .hh-s2{transition:opacity .2s ease;}
  .hh-hear,.hh-chear,.hh-tour,.hh-tour i{transition:none;}
  .hh-js .hh:not(.hh-go) .hh-a{transform:none;}
  .hh-js .hh .hh-a{transition:opacity .3s ease;}
  .hh-go .hh-chip{animation:none;}
}
