/* Joy homepage hero: "Dialogue with CLOUDS".
   Lives inside the Lando hero's [data-gl="head"] box, so it follows that box when the sticky
   hero shrinks into the marquee card. Drawn by /assets/joy-hero/joy-hero.js. */

@font-face { font-family: "Joy Hero CN"; src: url("/assets/joy-hero/fonts/joy-hero-cn.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Joy Hero Mono"; src: url("/assets/joy-hero/fonts/joy-hero-mono.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Joy Hero Mono"; src: url("/assets/joy-hero/fonts/joy-hero-mono-medium.woff") format("woff"); font-weight: 500; font-display: swap; }

.joy-hero {
  --jh-u: 1px;
  --jh-paper: #fcfcfa;
  --jh-ink: #282c20;
  --jh-lime: #d2ff00;
  --jh-lime-ui: #78a300;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--jh-paper);
  pointer-events: none;
  contain: layout paint;
}
.joy-hero canvas { position: absolute; left: 0; top: 0; display: block; }
.joy-hero .jh-bg { z-index: 0; }
.joy-hero .jh-under { z-index: 1; }
.joy-hero .jh-top { z-index: 5; }
.joy-hero .jh-abs { position: absolute; left: 0; top: 0; }

.joy-hero .jh-row { z-index: 4; font: 500 calc(13 * var(--jh-u))/1 "Joy Hero Mono", "Joy Hero CN", monospace; letter-spacing: 0.06em; color: var(--jh-ink); white-space: nowrap; opacity: 0; }
.joy-hero .jh-row .jh-dim { color: #8b8e83; }
.joy-hero .jh-rule { z-index: 4; height: 1px; background: rgba(40, 44, 32, 0.22); transform-origin: 0 0; }
.joy-hero .jh-tick { z-index: 4; width: 1px; height: calc(9 * var(--jh-u)); background: rgba(40, 44, 32, 0.5); opacity: 0; }

.joy-hero .jh-head { z-index: 4; white-space: nowrap; color: var(--jh-ink); }
.joy-hero .jh-head .jh-line { display: block; white-space: nowrap; }
.joy-hero .jh-head span { display: inline-block; }
.joy-hero .jh-head .jh-l { opacity: 0; will-change: transform, filter, opacity; }

.joy-hero .jh-chat {
  z-index: 4; display: flex; align-items: center; box-sizing: border-box;
  height: calc(58 * var(--jh-u)); padding: 0 calc(46 * var(--jh-u)) 0 calc(24 * var(--jh-u));
  border-radius: calc(14 * var(--jh-u)); white-space: nowrap; opacity: 0;
  background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(40, 44, 32, 0.12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 calc(10 * var(--jh-u)) calc(30 * var(--jh-u)) rgba(40, 44, 32, 0.06);
}
.joy-hero .jh-msg { font: 400 calc(22 * var(--jh-u))/1 "Joy Hero CN", sans-serif; color: var(--jh-ink); letter-spacing: 0.02em; }
.joy-hero .jh-comp { font-family: "Joy Hero Mono", monospace; font-size: 0.9em; letter-spacing: 0.01em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.joy-hero .jh-caret { z-index: 4; width: calc(2 * var(--jh-u)); height: calc(26 * var(--jh-u)); border-radius: 1px; background: var(--jh-lime-ui); display: none; }
.joy-hero .jh-ime {
  z-index: 6; display: none; gap: calc(15 * var(--jh-u)); white-space: nowrap;
  padding: calc(9 * var(--jh-u)) calc(12 * var(--jh-u)); border-radius: calc(9 * var(--jh-u));
  font: 400 calc(16 * var(--jh-u))/1 "Joy Hero CN", sans-serif; color: var(--jh-ink);
  background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(40, 44, 32, 0.14);
  box-shadow: 0 calc(8 * var(--jh-u)) calc(24 * var(--jh-u)) rgba(40, 44, 32, 0.1);
}
.joy-hero .jh-ime b { font-weight: 400; color: var(--jh-lime-ui); }
.joy-hero .jh-ime i { font: 400 calc(11 * var(--jh-u))/1 "Joy Hero Mono", monospace; font-style: normal; color: #8b8e83; margin-right: calc(4 * var(--jh-u)); }
.joy-hero .jh-cue { z-index: 4; font: 500 calc(12 * var(--jh-u))/1 "Joy Hero Mono", monospace; letter-spacing: 0.1em; color: var(--jh-ink); white-space: nowrap; opacity: 0; transition: opacity 0.6s ease; }

/* On the way into the marquee the hero tones down like the template's grey portrait: joy-hero.js fades in two layers
   over the whole box, one taking the colour out, one multiplying in the portrait's olive grey (dark ink stays readable). */
.joy-hero .jh-desat,
.joy-hero .jh-tone { right: 0; bottom: 0; opacity: 0; }
.joy-hero .jh-desat { z-index: 7; background: #808080; mix-blend-mode: saturation; }
.joy-hero .jh-tone { z-index: 8; background: #595e4e; mix-blend-mode: multiply; }

/* Joy's signature in the marquee target (the template's signature slot, painted above the card): centred on the
   landed card and 1.7 times as wide, so the loops run past its edges. joy-hero.js draws it with the dash. */
html.joy-hero-on [data-sticky-hero="target"] { position: relative; }
.jh-sign { position: absolute; left: 50%; top: 50%; z-index: 6; width: 170%; aspect-ratio: 7 / 5; translate: -50% -50%; pointer-events: none; visibility: hidden; }
.jh-sign svg { display: block; width: 100%; height: 100%; overflow: visible; }
.jh-sign path { fill: none; stroke: #d2ff00; stroke-width: 8.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
@media screen and (max-width: 479px) { .jh-sign { width: 130%; } }

/* the hero replaces the portrait, so the portrait's own mobile extras step aside */
html.joy-hero-on [data-home-swipe-wrap],
html.joy-hero-on .home-hero-tablet-hero-text { display: none !important; }
