/* Hero · Direction B "Monolith"
   One robot, huge and close, backlit by a single warm sun-orb on a deep navy stage.
   Every robot has its own framing and sun position (FRAME table in hero.js).
   Everything is namespaced hx- so it never collides with site.css. */

/* Sun position / size are registered so they glide when the robot changes */
@property --sx { syntax: "<number>"; inherits: true; initial-value: 0.69; }
@property --sy { syntax: "<number>"; inherits: true; initial-value: 0.43; }
@property --sk { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --hz { syntax: "<number>"; inherits: true; initial-value: 0.42; }

.hx {
  --sx: var(--sx-d, 0.69);          /* sun centre x (fraction of the content box) */
  --sy: var(--sy-d, 0.43);          /* sun centre y (fraction of hero height) */
  --sk: var(--sk-d, 1);             /* sun size multiplier */
  --hz: var(--hz-d, 0.42);          /* horizon (only shown with a floor) */
  --box: min(100vw, var(--maxw));   /* the content box the composition is laid out in */
  --sd: min(86svh, calc(var(--box) * 0.62)); /* base sun diameter */
  --hx-ease: cubic-bezier(0.62, 0, 0.3, 1);
  --hx-swb: 182px;                  /* hero bottom → switcher top (desktop; measured by hero.js) */
  --fl-gap: 14px;                   /* grounded robot: clearance above the switcher */
  --fl-bottom: calc(var(--hx-swb) + var(--fl-gap));
  --px: 0;                          /* pointer parallax, -1..1 (set by JS) */
  --py: 0;
  position: relative;
  height: 100svh;
  min-height: 620px;
  max-height: 1180px;
  overflow: hidden;
  isolation: isolate;
  background: #0a0e1d;
  color: var(--cream);
  transition: --sx 1.5s var(--hx-ease), --sy 1.5s var(--hx-ease), --sk 1.5s var(--hx-ease), --hz 1.5s var(--hx-ease);
}

/* ---------- Stage ---------- */
.hx-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hx-stage > * { position: absolute; }

.hx-sky {
  inset: 0;
  background:
    radial-gradient(ellipse 60% 48% at calc(50% + (var(--sx) - 0.5) * var(--box)) calc(var(--sy) * 100%), rgba(200, 23, 78, 0.22), rgba(200, 23, 78, 0) 70%),
    radial-gradient(ellipse 120% 60% at 70% 100%, rgba(29, 37, 71, 0.9), rgba(29, 37, 71, 0) 70%),
    linear-gradient(180deg, #070a15 0%, #0b1020 46%, #10162c 100%);
}

/* Sun and robot share the centred content box, so wide screens keep the composition */
.hx-frame { top: 0; bottom: 0; left: 50%; width: var(--box); translate: -50% 0; }
.hx-frame > * { position: absolute; }

/* Night veil under the nav bar: the orb's glow never tints the (translucent) nav.
   It sits above the sun/sky but below the robot. */
.hx-frame::before {
  content: ""; position: absolute; z-index: 2;
  top: 0; left: -100%; width: 300%; height: 250px;
  background: linear-gradient(180deg,
    rgba(7, 10, 21, 0.97) 0px, rgba(7, 10, 21, 0.93) 84px, rgba(7, 10, 21, 0.62) 128px,
    rgba(7, 10, 21, 0.24) 184px, rgba(7, 10, 21, 0) 250px);
}

/* The sun: a photographic light source, not a flat disc */
.hx-sun {
  z-index: 0;
  left: calc(var(--sx) * 100%); top: calc(var(--sy) * 100%);
  width: calc(var(--sd) * var(--sk)); aspect-ratio: 1;
  translate: calc(-50% + var(--px) * 14px) calc(-50% + var(--py) * 10px);
  will-change: transform;
}
.hx-sun i { position: absolute; border-radius: 50%; display: block; }
.hx-bloom {
  inset: -70%;
  background: radial-gradient(closest-side,
    rgba(240, 110, 70, 0.50) 0%,
    rgba(226, 72, 70, 0.32) 22%,
    rgba(200, 23, 78, 0.16) 44%,
    rgba(120, 18, 64, 0.06) 70%,
    rgba(11, 16, 32, 0) 100%);
}
.hx-disc {
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%,
      #fff3df 0%,
      #ffdca6 16%,
      #fcb866 35%,
      #f48a4e 56%,
      #e45a4a 76%,
      #cf2e4f 91%,
      #b8194d 100%);
  filter: blur(calc(var(--sd) * 0.03));
  box-shadow:
    0 0 calc(var(--sd) * 0.12) calc(var(--sd) * 0.02) rgba(246, 140, 80, 0.5),
    0 0 calc(var(--sd) * 0.38) calc(var(--sd) * 0.06) rgba(214, 52, 74, 0.32);
}
.hx-disc::after {
  /* atmospheric extinction: the lower limb sits in denser, redder air */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, rgba(120, 10, 50, 0) 42%, rgba(120, 10, 50, 0.42) 100%);
}
.hx-core {
  /* over-exposed heart of the light */
  inset: 22% 24% 30%;
  background: radial-gradient(closest-side, rgba(255, 250, 240, 0.95), rgba(255, 226, 180, 0.55) 45%, rgba(255, 200, 140, 0) 100%);
  filter: blur(calc(var(--sd) * 0.04));
}

/* Floor + horizon (low, wide robots stand on it; the sun sets behind it).
   The floor only exists around the sun: toward the sides it dissolves, so there is never a
   hard band across the page. */
.hx-floor {
  z-index: 1;
  left: -100%; width: 300%;
  /* desktop: the horizon sits at --fl-hz of the grounded robot's height (same geometry as
     .hx-bot[data-floor] below); phones use --hz (fraction of the room) */
  --ph: min(calc(var(--fl-bh, 55) * 1%), calc(var(--fl-bh, 55) * var(--box) / 160), calc(100% - var(--hx-swb) - var(--fl-gap) - var(--fl-bt, 22) * 1%));
  top: calc(100% - var(--hx-swb) - var(--fl-gap) - var(--ph) * (1 - var(--fl-hz, 0.58)));
  bottom: 0;
  --fx: calc((1 + var(--sx)) / 3 * 100%);   /* sun x in floor coordinates */
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
  background:
    /* the sky glow mirrored in the glossy floor */
    radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.9) calc(var(--sd) * var(--sk) * 0.3) at var(--fx) 0%, rgba(236, 110, 80, 0.30), rgba(200, 40, 80, 0.12) 50%, rgba(200, 40, 80, 0) 100%),
    /* the sun mirrored in the glossy floor: dimmer, softer, squashed */
    radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.46) calc(var(--sd) * var(--sk) * 0.2) at var(--fx) 0%, rgba(255, 196, 140, 0.42), rgba(240, 120, 84, 0.2) 45%, rgba(214, 70, 84, 0) 100%),
    radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.30) calc(var(--sd) * var(--sk) * 0.62) at var(--fx) 0%, rgba(255, 176, 118, 0.22), rgba(232, 96, 80, 0.08) 42%, rgba(232, 96, 80, 0) 78%),
    radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.95) calc(var(--sd) * var(--sk) * 0.22) at var(--fx) 0%, rgba(214, 70, 84, 0.16), rgba(214, 70, 84, 0) 100%),
    linear-gradient(180deg, #0d1226 0%, #0a0e1e 34%, #090c1a 100%);
  /* sharp horizon only across the sun's disc; elsewhere the floor emerges softly from haze */
  --fm: radial-gradient(ellipse calc(var(--sd) * var(--sk) * 1.05) calc(var(--sd) * var(--sk) * 1.2) at var(--fx) 0%, #000 48%, rgba(0, 0, 0, 0.62) 64%, rgba(0, 0, 0, 0.24) 82%, transparent 100%),
        linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.55) calc(var(--sd) * 0.12), #000 calc(var(--sd) * 0.3));
  -webkit-mask-image: var(--fm);
  mask-image: var(--fm);
}
.hx-floor i { position: absolute; display: block; left: 0; right: 0; }
.hx-horizon {
  /* where the sun meets the floor: a hot, thin line of light that fades out sideways */
  top: -1px; height: 2px;
  background: radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.5) 100% at var(--fx) 50%, rgba(255, 226, 180, 0.9), rgba(250, 150, 96, 0.45) 50%, rgba(244, 128, 82, 0) 100%);
  filter: blur(0.5px);
}
.hx-sheen {
  /* haze where the light grazes the floor */
  top: calc(var(--sd) * var(--sk) * -0.035); height: calc(var(--sd) * var(--sk) * 0.07);
  background: radial-gradient(ellipse calc(var(--sd) * var(--sk) * 0.55) 50% at var(--fx) 50%, rgba(255, 196, 140, 0.30), rgba(255, 150, 100, 0) 100%);
  filter: blur(5px);
}
.hx[data-floor] .hx-floor { opacity: 1; }

/* Robots */
.hx-bots { z-index: 3; inset: 0; translate: calc(var(--px) * -8px) calc(var(--py) * -4px); will-change: transform; }
.hx-bot {
  --bh: 136; --bx: 64; --bt: 12; --ar: 0.43; --f0: 0.37; --f1: 0.74; --rx: -3px; --ry: 3px;
  --fa: var(--f0); --fb: var(--f1);
  position: absolute;
  height: min(calc(var(--bh) * 1%), calc(var(--bh) * var(--box) / 160));
  aspect-ratio: var(--ar);
  top: calc(var(--bt) * 1%);
  left: calc(var(--bx) * 1%);
  translate: -50% 0;
  margin: 0;
  opacity: 0;
  transform: translateX(4%);
  filter: blur(10px);
  transition: opacity 0.9s var(--ease-out), transform 1.2s var(--ease-out), filter 0.9s var(--ease-out);
}
/* grounded robots stand a fixed distance above the switcher, so they never reach it */
.hx-bot[data-floor] {
  --ph: min(calc(var(--bh) * 1%), calc(var(--bh) * var(--box) / 160), calc(100% - var(--hx-swb) - var(--fl-gap) - var(--bt) * 1%));
  height: var(--ph);
  top: auto;
  bottom: var(--fl-bottom);
}
.hx-bot.is-on { opacity: 1; transform: none; filter: none; }
.hx-bot.is-off { opacity: 0; transform: translateX(-5%); filter: blur(10px); }
.hx-bot .hx-img { width: 100%; height: 100%; object-fit: contain; object-position: top center; display: block; position: relative; }
.hx-bot i[data-mask] {
  position: absolute; inset: 0; display: block; pointer-events: none;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: top center; mask-position: top center;
}
/* light wrap: the bright sky bleeds softly around the silhouette (upper body only) */
.hx-bot .hx-wrap {
  position: absolute; inset: 0;
  filter: blur(7px);
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 42%);
  mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 42%);
}
.hx-bot .hx-wrap i { background: linear-gradient(180deg, #ffd6a0, #f59a5a 60%, #e8584a); }
/* rim light: the silhouette minus a copy of itself shifted away from the sun leaves a thin
   edge on the sun-facing side, lit warm and fading down the body */
.hx-bot i.hx-rim {
  background: linear-gradient(180deg, #fff0d6 0%, #ffc183 22%, rgba(255, 150, 96, 0.5) 40%, rgba(255, 130, 90, 0) 58%);
  -webkit-mask-size: contain, contain; mask-size: contain, contain;
  -webkit-mask-repeat: no-repeat, no-repeat; mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: 50% 0, calc(50% + var(--rx)) var(--ry);
  mask-position: 50% 0, calc(50% + var(--rx)) var(--ry);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  mix-blend-mode: screen;
  opacity: 0.54;
  filter: blur(0.5px);
}
/* warm spill from the sun onto the body */
.hx-bot .hx-grade {
  background: radial-gradient(ellipse 70% 40% at 70% 22%, rgba(255, 170, 110, 0.55), rgba(255, 170, 110, 0) 70%);
  mix-blend-mode: soft-light;
}
/* light falls off toward the floor (per robot: --f0 → --f1) */
.hx-bot .hx-shade {
  background: linear-gradient(180deg,
    rgba(10, 14, 29, 0) calc(var(--fa) * 100%),
    rgba(10, 14, 29, 0.55) calc((var(--fa) + (var(--fb) - var(--fa)) * 0.4) * 100%),
    rgba(10, 14, 29, 0.92) calc((var(--fa) + (var(--fb) - var(--fa)) * 0.75) * 100%),
    #0a0e1d calc(var(--fb) * 100%));
}
/* grounded robots: contact shadow + a faint reflection in the glossy floor */
.hx-bot .hx-contact {
  position: absolute; left: 6%; right: 6%; bottom: 0.4%; height: 9%;
  background: radial-gradient(closest-side, rgba(3, 5, 12, 0.9), rgba(3, 5, 12, 0.5) 55%, rgba(3, 5, 12, 0) 100%);
  filter: blur(6px);
}
.hx-bot .hx-refl {
  position: absolute; left: 0; top: 96.2%; width: 100%; height: 100%;
  object-fit: contain; object-position: top center;
  transform: scaleY(-1);
  opacity: 0.2;
  filter: blur(1.4px) brightness(0.75) saturate(1.1);
  -webkit-mask-image: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.55) 90%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.55) 90%, #000 100%);
}

.hx-fade {
  inset: 0;
  background:
    linear-gradient(0deg, #0a0e1d 0%, rgba(10, 14, 29, 0.85) 9%, rgba(10, 14, 29, 0) 30%),
    linear-gradient(90deg, rgba(10, 14, 29, 0.55) 0%, rgba(10, 14, 29, 0.2) 34%, rgba(10, 14, 29, 0) 52%);
}
.hx-grain {
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.22;
}

/* ---------- Copy ---------- */
.hx-inner {
  position: relative; z-index: 2;
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.hx-copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(40px, 8svh, 84px);
  width: min(52vw, 760px);
  display: grid; gap: clamp(18px, 2.6svh, 28px);
  justify-items: start;
}
.hx-eyebrow {
  font-family: var(--f-display);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 14px;
}
.hx-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.7; }

.hx-title {
  --hx-t: clamp(3rem, min(calc(var(--box) * 0.084), 12.6svh), 9.2rem);
  font-family: var(--f-display);
  font-weight: 300;
  font-size: calc(var(--hx-t) * var(--hx-fit, 1));
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  white-space: nowrap;
}
.hx-ln { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hx-ln > span { display: inline-block; }
.hx-ln.ind { padding-left: 0.62em; }
.hx-title .lit {
  background: linear-gradient(95deg, #f6efe6 0%, #ffd9b0 45%, #f7a35e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hx-lede {
  max-width: 27em;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.6; font-weight: 300;
  color: rgba(246, 239, 230, 0.72);
}
.hx-ph { display: inline-block; }
.hx-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* ---------- Model switcher ---------- */
.hx-switch {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(40px, 8svh, 84px);
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "meta meta" "ctl thumbs";
  justify-items: end; align-items: center;
  column-gap: 6px; row-gap: 10px;
  margin-right: -10px;
}
.hx-switch::before {
  /* a soft pool of night behind the switcher keeps it legible over any robot body */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -64px -90px -70px -150px;
  background: radial-gradient(closest-side, rgba(9, 12, 26, 0.86), rgba(9, 12, 26, 0.6) 55%, rgba(9, 12, 26, 0) 100%);
}
.hx-meta { grid-area: meta; display: grid; justify-items: end; gap: 3px; text-align: right; padding-right: 10px; }
.hx-name { font-family: var(--f-display); font-size: 1.02rem; font-weight: 400; letter-spacing: 0.01em; }
.hx-type { font-size: 0.84rem; color: rgba(246, 239, 230, 0.7); display: inline-flex; align-items: center; gap: 8px; }
.hx-type svg { width: 13px; height: 13px; color: var(--gold); transition: transform 0.4s var(--ease-out); }
.hx-meta:hover .hx-name { color: #fff; }
.hx-meta:hover .hx-type svg { transform: translateX(3px); }

.hx-thumbs { grid-area: thumbs; display: flex; gap: 0; }
.hx-thumbs button {
  position: relative;
  height: 44px; min-width: 44px; padding: 0 9px;
  font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.1em; line-height: 1;
  color: rgba(246, 239, 230, 0.66);
  transition: color 0.3s;
}
.hx-thumbs button::before,
.hx-thumbs button::after {
  content: ""; position: absolute; left: 9px; right: calc(9px + 0.1em); bottom: 7px; height: 1.5px;
  border-radius: 1px; pointer-events: none;
}
.hx-thumbs button::before { background: rgba(246, 239, 230, 0.2); opacity: 0; transition: opacity 0.4s; }
.hx-thumbs button::after {
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.hx-thumbs button:hover { color: var(--cream); }
.hx-thumbs button[aria-pressed="true"] { color: var(--cream); }
.hx-thumbs button[aria-pressed="true"]::before { opacity: 1; }
.hx-thumbs button[aria-pressed="true"]::after { transform: scaleX(1); }
/* auto-advance: the progress line IS the timer (its animationend advances the robot) */
.hx.is-auto .hx-thumbs button[aria-pressed="true"]::after {
  transition: none;
  animation: hxProg var(--hx-dur, 7s) linear both;
}
.hx.is-auto.is-hold .hx-thumbs button[aria-pressed="true"]::after { animation-play-state: paused; }
.hx.is-still .hx-thumbs button[aria-pressed="true"]::after { animation-delay: calc(var(--hx-dur, 7s) * -0.4); } /* ?hxhold=1 */
@keyframes hxProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hx-ctl { grid-area: ctl; display: flex; align-items: center; position: relative; padding-right: 6px; }
.hx-ctl::after {
  /* divider between counter/pause and the codes */
  content: ""; position: absolute; right: 0; top: 15px; bottom: 15px; width: 1px;
  background: rgba(246, 239, 230, 0.2);
}
.hx-count {
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  color: rgba(246, 239, 230, 0.66);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.hx-count b { font-weight: 400; color: var(--cream); }
.hx-play {
  width: 40px; height: 44px; display: grid; place-items: center;
  color: rgba(246, 239, 230, 0.66);
  position: relative;
  transition: color 0.3s;
}
.hx-play:hover { color: var(--cream); }
.hx-play svg { width: 11px; height: 11px; fill: currentColor; }
.hx-play .pl { display: none; }
.hx-play.is-paused .ps { display: none; }
.hx-play.is-paused .pl { display: inline; }
.hx-play[hidden] { display: none; }

/* ---------- Language ---------- */
html.lang-zh .hx-title {
  --hx-t: clamp(2.4rem, min(calc(var(--box) * 0.054), 8.9svh), 5.6rem);
  line-height: 1.22;
  letter-spacing: 0.02em;
  font-weight: 300;
}
html.lang-zh .hx-ln { padding-bottom: 0.06em; margin-bottom: -0.06em; }
html.lang-zh .hx-eyebrow { letter-spacing: 0.24em; }
html.lang-zh .hx-lede { line-height: 1.85; }

/* ---------- Right-to-left (Hebrew) ----------
   Desktop mirrors the composition: copy on the right, robot and sun on the left.
   --bx / --sx stay the authored left-to-right values; they are flipped here. */
.hx-ln.ind { padding-left: 0; padding-inline-start: 0.62em; }
@media (min-width: 1101px), (min-width: 761px) and (orientation: landscape) {
  html[dir="rtl"] .hx { --sx: calc(1 - var(--sx-d, 0.69)); }
  html[dir="rtl"] .hx-bot { left: calc((100 - var(--bx)) * 1%); }
  html[dir="rtl"] .hx-fade {
    background:
      linear-gradient(0deg, #0a0e1d 0%, rgba(10, 14, 29, 0.85) 9%, rgba(10, 14, 29, 0) 30%),
      linear-gradient(270deg, rgba(10, 14, 29, 0.55) 0%, rgba(10, 14, 29, 0.2) 34%, rgba(10, 14, 29, 0) 52%);
  }
  html[dir="rtl"] .hx-copy { left: auto; right: var(--gutter); }
  html[dir="rtl"] .hx-switch { right: auto; left: var(--gutter); margin-right: 0; margin-left: -10px; direction: ltr; justify-items: start; }
  html[dir="rtl"] .hx-switch::before { inset: -64px -150px -70px -90px; }
  html[dir="rtl"] .hx-meta { justify-items: start; text-align: left; padding-right: 0; padding-left: 10px; }
}
html[dir="rtl"] .hx-title { letter-spacing: 0; }

/* ---------- Entrance (≤1.6 s) ---------- */
.js-motion .hx-disc { animation: hxSunIn 1.5s var(--ease-out) both; }
.js-motion .hx-bloom { animation: hxFade 1.6s var(--ease-out) both; }
.js-motion .hx-bots { animation: hxBotIn 1.4s 0.12s var(--ease-out) both; }
.js-motion .hx-ln > span { animation: hxRise 1.05s var(--ease-out) both; animation-delay: calc(0.3s + var(--i, 0) * 0.08s); }
.js-motion .hx-eyebrow { animation: hxUp 0.9s 0.25s var(--ease-out) both; }
.js-motion .hx-lede { animation: hxUp 0.9s 0.6s var(--ease-out) both; }
.js-motion .hx-ctas { animation: hxUp 0.9s 0.7s var(--ease-out) both; }
.js-motion .hx-switch { animation: hxFade 0.9s 0.7s var(--ease-out) both; }

@keyframes hxSunIn { from { opacity: 0; transform: translateY(6%) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes hxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hxBotIn { from { opacity: 0; transform: translateY(5%) scale(1.03); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hxRise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes hxUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ambient: the light breathes, very slowly */
.js-motion .hx-bloom { animation: hxFade 1.6s var(--ease-out) both, hxBreathe 9s 1.6s ease-in-out infinite; }
@keyframes hxBreathe { 50% { transform: scale(1.04); opacity: 0.86; } }
.hx.is-paused .hx-bloom { animation-play-state: paused; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hx-copy { width: min(56vw, 640px); }
}

/* Phones / portrait tablets: the robot lives in the measured "room" between the nav bar
   (+24px) and the switcher; hero.js sets --hx-top / --hx-cut in px. */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .hx {
    --sx: var(--sx-m, 0.6);
    --sy: var(--sy-m, 0.43);
    --sk: var(--sk-m, 1);
    --hz: var(--hz-m, 0.38);
    --hx-top: 102px;
    --hx-cut: 46svh;
    --hx-room: calc(var(--hx-cut) - var(--hx-top));
    --sd: min(94vw, calc(var(--hx-room) * 1.22));
    height: 100svh;
    min-height: 640px;
  }
  .hx-frame::before { height: 190px; background: linear-gradient(180deg, rgba(7, 10, 21, 0.97) 0px, rgba(7, 10, 21, 0.92) 80px, rgba(7, 10, 21, 0.4) 120px, rgba(7, 10, 21, 0) 190px); }
  .hx-sky {
    background:
      radial-gradient(ellipse 80% 40% at calc(var(--sx) * 100%) calc(var(--hx-top) + var(--sy) * var(--hx-room)), rgba(200, 23, 78, 0.24), rgba(200, 23, 78, 0) 70%),
      linear-gradient(180deg, #070a15 0%, #0b1020 46%, #0a0e1d 100%);
  }
  .hx-sun { top: calc(var(--hx-top) + var(--sy) * var(--hx-room)); }
  .hx-floor { top: calc(var(--hx-top) + var(--hz) * var(--hx-room)); }
  .hx-bot, .hx-bot[data-floor] {
    bottom: auto;
    --fa: var(--f0m); --fb: var(--f1m);
    height: min(calc(var(--bhm, 2) * var(--hx-room)), calc(92vw / var(--ar)));
    top: calc(var(--hx-top) + var(--btm, 0) * var(--hx-room));
    left: calc(var(--bxm, 56) * 1%);
  }
  .hx-bot .hx-contact { filter: blur(4px); }
  .hx-fade {
    /* per robot: the stage fades to night from --fz (fraction of the room) to the switcher */
    background:
      linear-gradient(180deg,
        rgba(10, 14, 29, 0) calc(var(--hx-top) + var(--fz-m, 0.62) * var(--hx-room)),
        rgba(10, 14, 29, 0.74) calc(var(--hx-top) + (var(--fz-m, 0.62) + (1 - var(--fz-m, 0.62)) * 0.62) * var(--hx-room)),
        #0a0e1d calc(var(--hx-cut) - 4px));
  }
  .hx-inner {
    display: flex; flex-direction: column; justify-content: flex-end;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }
  .hx-copy { position: static; width: auto; min-width: 0; gap: 14px; }
  .hx-switch {
    position: static; order: -1;
    grid-template-columns: auto 1fr; grid-template-areas: "thumbs ctl";
    justify-items: start;
    margin: 0 -8px 4px -10px;
  }
  .hx-switch::before { display: none; }
  .hx-ctl { justify-self: end; }
  .hx-meta { display: none; }
  .hx-eyebrow { display: none; }
  .hx-title { --hx-t: clamp(1.8rem, 9.6vw, 2.8rem); line-height: 1.16; letter-spacing: -0.015em; }
  .hx-ln.ind { padding-inline-start: 0; }
  html.lang-zh .hx-title { --hx-t: clamp(1.8rem, 9.8vw, 2.8rem); line-height: 1.22; letter-spacing: 0.02em; }
  /* the robots rotate on their own; the model row stays in the flow (hero.js measures it) but is not shown */
  .hx-switch { visibility: hidden; height: 0; overflow: hidden; margin: 0 0 6px; }
  .hx-lede { font-size: 0.95rem; max-width: 26em; }
  .hx-ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: 100%; }
  .hx-ctas .btn { height: 50px; width: 100%; justify-content: space-between; }
  .hx-ctl { padding: 0 0 0 10px; }
  .hx-ctl::after { left: 0; right: auto; }
}
@media (max-width: 374px) {
  .hx-count .of { display: none; }
  .hx-thumbs button { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hx { transition: none; }
  .hx-bloom, .hx-disc, .hx-bots, .hx-ln > span, .hx-eyebrow, .hx-lede, .hx-ctas, .hx-switch { animation: none !important; }
  .hx-bot { transition: opacity 0.3s linear !important; transform: none !important; filter: none !important; }
  .hx-floor { transition: opacity 0.3s linear; }
}
