/* hero-me.css: the home hero's picture (assets/hero-me.js). Nate in his chair, the Virgin tail fin film,
   Watchman, the Journey card, the Lumis. Tokens only; the one hand-set number is each part's size, which
   the script lays out from his approved picture (the cast, the big size). */

/* The region: a layer over the whole hero, behind his words. Nothing in it takes a click or a tap
   except the pause button, so the words and the buttons stay live. */
#hero .hero-me {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: clip;
  pointer-events: none;
}
.hero-me .hm-art { position: absolute; inset: 0; overflow: clip; }

/* The picture's own box (his photo, the fin and Watchman are laid out from it). From 1024 up it sits
   at the bottom right, from 40% across to the right edge, a space-800 under the top. Under 1024 the
   script lays it over the slot in the words column. The pause button covers the same box. */
.hero-me :is(.hm-stage, .hm-pause) { position: absolute; }
.hero-me .hm-pause { pointer-events: auto; border-radius: var(--radius-3xl); }
@media (min-width: 1024px) {
  .hero-me :is(.hm-stage, .hm-pause) { left: 40%; right: 0; top: var(--space-800); bottom: 0; }
}

/* The frame: the whole hero, running a little past its right edge, sized by the script. */
.hm-frame { position: absolute; left: 0; top: 0; }
.hm-lay { position: absolute; left: 0; top: 0; pointer-events: none; }
.hm-lay :is(img, video) { display: block; width: 100%; height: 100%; }
.hm-frame .fly { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; pointer-events: none; will-change: transform, opacity; }
.hm-frame .fly canvas { display: block; }
/* Play (assets/hero-fly.js): each Lumi's body takes the pointer, a round patch the size of its body over its canvas,
   so a click beside it still reaches the pause button. A touch still scrolls the page; double tap never zooms. Paused,
   the patch lets every tap through to the pause button. The site cursor keeps its own pointer over it. */
.hm-frame .fly-hit {
  position: absolute; left: 22%; top: 22%; width: 56%; height: 56%;   /* lint-ok: the engine draws her body 0.56 of her canvas wide */
  border-radius: 50%;   /* lint-ok: a circle, her body's own outline */
  pointer-events: auto; cursor: grab; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.hm-frame .fly[data-held] .fly-hit { cursor: grabbing; }
.hm-frame[data-fly-off] .fly-hit { pointer-events: none; }
/* The keyboard's ring (his pick, 20 Nov 2026, "Add keyboard play"): each Lumi's button is a hidden twin after the
   hero's words (hero-fly.js, KEYBOARD), so the site's focus ring is drawn on the Lumi it stands for. */
.hm-frame .fly[data-kb] .fly-hit { outline: var(--border-focus); outline-offset: var(--space-100); }
/* the hidden twins sit at the hero's top corner, so Tab onto one never scrolls the page down past the Lumis */
[id="hero"] .hm-keys,
[id="hero"] .hm-keys > * { position: absolute; top: 0; left: 0; }
/* what two Lumis say when they bounce: the case study's plain glass box (assets/lumi-bubble.css), over the flyers */
/* a flyer arrives with a short fade (its own opacity holds the depth afterwards) */
@media (prefers-reduced-motion: no-preference) {
  .hm-frame .fly { animation: hm-arrive var(--duration-slow) var(--ease-entrance) backwards; }
}
@keyframes hm-arrive { from { opacity: 0; } }

/* ---- the picture's entrance (his pick 21 Nov 2026, chat HERO ENTRANCE: "One by one"; his words: "Can't just be
   there"). The scroll-out played backwards, on the hero's own beat (--hxe-beat times --hi-f, sections.css HERO
   ENTRANCE). He drops in, solid within one fast beat so the fin never shows through him, and his floor shadow fades
   in as the chair settles (his words 21 Nov 2026: "it can't be separate from the chair if it's moving", so it is
   never on the floor while the chair is still in the air); the tail fin sweeps in from the top left, the way it
   leaves; Watchman rises from behind his shoulder; then the Lumis and the Claude logo burst out of him one at a time
   and the card rises last (hero-me.js, arrive()). Gated on data-hero-enter like the rest of the entrance: the head
   script writes it only when motion is allowed, so under Reduce motion the picture simply shows. Only opacity,
   translate and scale move: lay() places the layers with transform. ---- */
html[data-hero-enter] #hero { --hm-b: calc(var(--hxe-beat) * var(--hi-f, 1)); }
/* the flyers' short fade gives way to their arrival out of him */
html[data-hero-enter] .hm-frame .fly { animation: none; }
/* a floor light waits for its Lumi */
.hm-frame[data-arriving] .hm-fl { visibility: hidden !important; }   /* lint-ok: over the engine's inline visibility while the flyers arrive */
html[data-hero-enter="rest"] #hero :is(.hm-nate, .hm-shadow, .hm-fin, .hm-finph, .hm-finsh, .hm-wave) { opacity: 0; }
html[data-hero-enter="play"] #hero .hm-nate { animation: hm-in-fade var(--duration-fast) var(--ease-entrance) 0s both, hm-in-drop var(--duration-flourish) var(--ease-emphasized) 0s both; }
/* the drop's ease puts the chair within a few pixels of the floor after one base beat and spends the rest settling, so
   the shadow starts then, not at the drop's end (his words 21 Nov 2026: "too much of a pause ... come in sooner") */
html[data-hero-enter="play"] #hero .hm-shadow { animation: hm-in-fade var(--duration-moderate) var(--ease-entrance) var(--duration-base) both; }
html[data-hero-enter="play"] #hero :is(.hm-fin, .hm-finph) { animation: hm-in-fin var(--duration-expressive) var(--ease-emphasized) calc(2 * var(--hm-b)) both; }
html[data-hero-enter="play"] #hero .hm-finsh { animation: hm-in-fade var(--duration-expressive) var(--ease-emphasized) calc(2 * var(--hm-b)) both; }
html[data-hero-enter="play"] #hero .hm-wave { animation: hm-in-peek var(--duration-flourish) var(--ease-emphasized) calc(4 * var(--hm-b)) both; }
@keyframes hm-in-fade { from { opacity: 0; } }
@keyframes hm-in-drop { from { translate: 0 calc(var(--motion-reveal-begin) * -1); } }
@keyframes hm-in-fin { from { opacity: 0; translate: calc(var(--motion-reveal-rise) * -2) calc(var(--motion-reveal-rise) * -2); } }
@keyframes hm-in-peek { from { opacity: 0; translate: 0 var(--motion-reveal-rise); } }

/* him and his floor shadow, one group in front of everything behind (z 50); flyers above 50 pass in front of him.
   Inside the group the shadow lies under him. */
.hm-seat { z-index: 50; }
.hm-nate { z-index: 50; }
.hm-nate :is(img, video) { object-fit: contain; object-position: 50% 100%; }
/* every look lies over his still by position, whatever sits between them */
.hm-nate img ~ img { position: absolute; inset: 0; visibility: hidden; }
.hm-nate img.on { visibility: visible; }
.hm-nate img.off { visibility: hidden; }
/* his chair films lie exactly over his still, hidden until their first frame is drawn */
/* the chair holds still (his ask, 21 Nov 2026, chat CHAIR LEGS: "The chair shouldn't even be animated"): each film
   is drawn everywhere but round the two chair legs, and while a film plays his still (.legs) shows only there, so
   the legs are his photo's own pixels in every film and every gap. Each zone keeps clear of his knees and jeans in
   all four films. The still's shape reaches 4 of its pixels past the film's cut, so the film's soft edge always
   lies over his photo, never over the page: with exact opposites the page showed through as a hairline on the
   black leather (his catch, 21 Nov 2026). */
.hm-nate video.hm-clip { position: absolute; inset: 0; visibility: hidden; clip-path: polygon(0% 0%, 100% 0%, 100% 43.33%, 84.74% 43.33%, 87.11% 50%, 86.22% 58.33%, 85.33% 66.67%, 84.15% 73.33%, 86.52% 78.33%, 89.48% 83.33%, 89.48% 100%, 14.52% 100%, 14.81% 58.33%, 15.41% 50%, 15.41% 32.92%, 0% 32.92%); }
.hm-nate video.hm-clip.on { visibility: visible; }
.hm-nate img.legs { clip-path: polygon(0% 32.58%, 16% 32.58%, 16% 50%, 15.41% 58.33%, 15.11% 100%, 88.89% 100%, 88.89% 83.33%, 85.93% 78.33%, 83.56% 73.33%, 84.74% 66.67%, 85.63% 58.33%, 86.52% 50%, 84.15% 43%, 100% 43%, 100% 100%, 0% 100%); }
.hm-shadow { z-index: 49; }
.hm-shadow img.hm-sh { position: absolute; top: 58.333%; height: 41.667%; }   /* rows 700 to 1200 of the box */
.hm-shadow img.hm-sh-look { visibility: hidden; }
.hm-shadow img.hm-sh-look.on { visibility: visible; }
.hm-shadow img.hm-sh.off { visibility: hidden; }

/* The floor light (his picks, 20 Nov 2026, chat ORB LIGHT): under each Lumi a soft light in its own colours. Its
   look lives in critter.js (Critter.floorLight, .lumi-fl); here it only sits behind the fin, Watchman and him. */
.hm-fl { z-index: 4; }
.hm-fin { z-index: 5; -webkit-mask: var(--fin) center / contain no-repeat; mask: var(--fin) center / contain no-repeat; }
.hm-fin video { object-fit: cover; object-position: 50% 40%; }
/* the 3D phone over the fin (his picks 23 Nov 2026, chat HERO PHONE): its own layer in front of the fin, behind Watchman
   and him. The mask is the fin's outline (below the layer's head room) plus everything above the cut line, so the fin
   hides only the phone's bottom; hero-me.js sets the three lengths from the fin's drawn width */
.hm-finph { z-index: 6; overflow: hidden;
  -webkit-mask: var(--fin) 0 var(--ph-head) / 100% var(--ph-fin-h) no-repeat, linear-gradient(black, black) 0 0 / 100% var(--ph-cut) no-repeat; /* lint-ok: a mask's alpha, not a colour anyone sees */
  mask: var(--fin) 0 var(--ph-head) / 100% var(--ph-fin-h) no-repeat, linear-gradient(black, black) 0 0 / 100% var(--ph-cut) no-repeat; } /* lint-ok: a mask's alpha, not a colour anyone sees */
.hm-finph video { position: absolute; width: auto; height: auto; object-fit: contain; transform-origin: 50% 90%; will-change: transform, opacity; }
/* the fin's whisper of a shadow (his pick 22 Nov 2026, chat TAIL FIN): a soft oval of ink, never an edge; hero-me.js
   sizes and places it under the still fin (about 6% at its middle) */
.hm-finsh { z-index: 4; border-radius: 50%; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgb(var(--brand-ink-rgb)) 0%, rgb(var(--brand-ink-rgb) / var(--alpha-600)) 45%, transparent 100%); }
.hm-wave { z-index: 20; transform-origin: 50% 100%; }
.hm-wave :is(video, img) { object-fit: contain; object-position: 50% 100%; }
/* Watchman's move player lies over the wave, hidden until its first frame is drawn; the wave hides only then.
   Its box (bigger and shifted, see WM_BOX in hero-me.js) is set by the script */
.hm-wave video.hm-move { position: absolute; visibility: hidden; }
.hm-wave video.hm-move.on { visibility: visible; }
.hm-wave video.off { visibility: hidden; }
.hm-mark img { display: block; width: 100%; height: auto; }

/* The coded Journey Tracker card: its frame is scaled to fit, with room round it for its shadow and confetti */
.hm-jc { position: relative; aspect-ratio: 1011 / 800; } /* lint-ok: the card page's own frame size, 1011 by 800 */
.hm-jc iframe { position: absolute; left: 0; top: 0; width: 1011px; height: 800px; /* lint-ok: the card page's own frame size */ border: 0; transform-origin: 0 0; transform: scale(var(--k, 1)); background: transparent; color-scheme: normal; }

/* ---- The Say g'day badge on him (his pick 20 Nov 2026, chat HERO CURSOR; hero-me.js BADGE) ----
   The About print's pointer badge as it shipped (assets/stop-motion.css before f69e279f), placed on the
   pointer by hero-me.js on every move. While it shows the pointer hides on the hero and everything in it.
   It grows in on the entrance curve and out on the exit curve, no spring. */
#hero[data-hm-badge],
#hero[data-hm-badge] * { cursor: none !important; }

.hm-badge-at { position: fixed; left: 0; top: 0; z-index: var(--z-tooltip); pointer-events: none; will-change: transform; }
.hm-badge-in {
  translate: -50% -50%;
  scale: 0;
  perspective: 500px;
  transition: scale var(--duration-fast) var(--ease-exit);
}
.hm-badge-at.is-on .hm-badge-in { scale: 1; transition: scale var(--duration-moderate) var(--ease-entrance); }

.hm-badge {
  position: relative;
  width: 128px; /* lint-ok: the About badge's own size */
  height: 128px; /* lint-ok: the About badge's own size */
  display: grid;
  place-items: center;
  isolation: isolate;
  rotate: var(--af-axis, 0 0 1) var(--af-angle, 0deg);
  filter: drop-shadow(0 var(--space-200) var(--space-400) color-mix(in srgb, var(--neutral-950) 16%, transparent));
}
.hm-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
.hm-ring .hm-disc { fill: var(--neutral-0); }
.hm-ring .hm-sep { fill: var(--lime-600); }
.hm-ring text { font-family: var(--font-display); letter-spacing: 0.07em; text-transform: uppercase; fill: var(--brand-ink); }
.hm-ring .hm-turn { transform-origin: 100px 100px; animation: hm-turn 14s linear infinite; }
.hm-badge-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hm-core, 58%);
  height: var(--hm-core, 58%);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--badge-radius);
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px var(--neutral-300);
}
.hm-badge-emo { position: relative; z-index: 2; display: block; width: 94%; height: 94%; max-width: none; }

/* Pearl: the Awards plaque material, as on the About badge */
.hm-af-shine, .hm-af-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.hm-af-shine {
  z-index: 1;
  overflow: hidden;
  opacity: calc(var(--af-opacity, 1) * 0.75);
  mix-blend-mode: multiply;
  filter: saturate(1.9) contrast(1.15);
  -webkit-mask-image: var(--af-grain, none); mask-image: var(--af-grain, none);
  -webkit-mask-size: 140px; mask-size: 140px; /* lint-ok: the About badge's grain size */
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
.hm-af-shine::before, .hm-af-shine::after { content: ""; position: absolute; inset: 0; }
.hm-af-shine::before {
  background:
    radial-gradient(circle at 30% 30%, var(--neutral-0) 0 22%, transparent 24%),
    radial-gradient(circle at 70% 68%, var(--neutral-0) 0 18%, transparent 20%),
    conic-gradient(from calc(var(--af-left, 0.3) * 120deg) at 50% 50%,
      var(--af-c6), var(--af-c2), var(--af-c4), var(--af-c5), var(--af-c6));
  background-size: 14px 14px, 14px 14px, cover; /* lint-ok: the About badge's dot size */
  background-position: 45% 45%, 55% 55%, center;
  background-blend-mode: soft-light, hard-light, normal;
}
.hm-af-shine::after {
  background:
    linear-gradient(100deg, transparent 34%, color-mix(in srgb, var(--neutral-0) 30%, transparent) 48%, var(--af-c3) 52%, transparent 68%),
    radial-gradient(circle at 0 100%, transparent 8%, var(--af-c5) 22%, var(--af-c1) 38%, var(--af-c3) 52%, transparent 64%);
  background-size: 240% 240%, calc(300% * var(--af-fscale, 1)) calc(300% * var(--af-fscale, 1));
  background-position: var(--af-sx, var(--af-bx, 45%)) var(--af-sy, var(--af-by, 42%)),
                       calc(var(--af-bx, 45%) + var(--af-fx, 0%)) calc(var(--af-by, 42%) + var(--af-fy, 0%));
  background-blend-mode: overlay;
  mix-blend-mode: soft-light;
}
.hm-af-glare {
  z-index: 2;
  opacity: calc(var(--af-opacity, 1) * 0.6);
  background: radial-gradient(farthest-corner circle at var(--af-x, 30%) var(--af-y, 28%),
    color-mix(in srgb, var(--neutral-0) 85%, transparent) 4%,
    color-mix(in srgb, var(--neutral-0) 30%, transparent) 26%,
    transparent 62%);
  mix-blend-mode: soft-light;
}
@keyframes hm-turn { to { transform: rotate(360deg); } }

/* Reduce motion: the badge still sits on the pointer (it moves only with the hand, like the Nate
   tag), but it holds still: no turning words, no light sweep, no grow in. */
@media (prefers-reduced-motion: reduce) {
  .hm-ring .hm-turn { animation: none; }
  .hm-badge-in, .hm-badge-at.is-on .hm-badge-in { transition: none; }
}
@media (forced-colors: active) { .hm-badge-at { display: none; } }
