/* The simpler harness variant (Dan, 2026-11-20): one stage of drifting gold
   dust, and a few riders at a time. Each fades in with a puff of dust, bobs
   on its own rhythm while the logo on its harness swaps through several
   AIs, then drifts away as the next one arrives. Tokens only, no raw hex. */

.hs-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  margin-top: clamp(-36px, -2vw, -12px);
  overflow: hidden;
  z-index: -1;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, var(--ink) 22%, var(--ink) 82%, transparent 100%),
    linear-gradient(to right, transparent 0%, var(--ink) 16%, var(--ink) 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, var(--ink) 22%, var(--ink) 82%, transparent 100%),
    linear-gradient(to right, transparent 0%, var(--ink) 16%, var(--ink) 84%, transparent 100%);
  mask-composite: intersect;
}

/* the dust: the painted plate, breathing and drifting very slowly */
.hs-plate {
  position: absolute; inset: -4%;
  width: 108%; height: 108%;
  object-fit: cover; object-position: 50% 70%;
  animation: hs-drift 38s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hs-drift {
  from { transform: translate3d(-1.5%, 0.5%, 0) scale(1.02); }
  to   { transform: translate3d(1.5%, -0.8%, 0) scale(1.06); }
}

/* a rider: a painted figure cut out of its background, glowing in the dust */
.hs-rider {
  position: absolute;
  width: 31%; aspect-ratio: 1;
  translate: -50% -50%;
  opacity: 0;
  transform: translateY(4%) scale(0.95);
  /* only opacity and transform move, the two things every browser animates cheaply */
  transition:
    opacity 2400ms cubic-bezier(.45,0,.2,1),
    transform 3000ms cubic-bezier(.22,.8,.3,1);
  will-change: opacity, transform;
}
.hs-rider.in  { opacity: 1; transform: translateY(0) scale(1); }
.hs-rider.out { opacity: 0; transform: translateY(-5%) scale(0.98); transition-duration: 2200ms, 2600ms; }
/* the gold light each rider stands in: a plain gradient, no filter */
.hs-glow {
  position: absolute; inset: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--kind-reference, var(--pen)) 34%, transparent), transparent);
}
.hs-bob {
  position: absolute; inset: 0;
  animation: hs-bob var(--bob, 3.4s) ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hs-bob {
  from { transform: translateY(-2.2%) rotate(calc(var(--sway, 1.4deg) * -1)); }
  to   { transform: translateY(2.2%)  rotate(var(--sway, 1.4deg)); }
}
.hs-bob > img.hs-paint { width: 100%; height: 100%; display: block; }

/* the swappable badge: a clean white disc over the painted badge, and the
   real logo file on it, so every logo reads at full strength */
.hs-badge {
  position: absolute;
  translate: -50% -50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: white; /* fixed white in every theme, so dark logos always read */
  color-scheme: only light;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--kind-reference, var(--pen)) 70%, transparent),
              0 0 1.2vw color-mix(in srgb, var(--kind-reference, var(--pen)) 55%, transparent);
}
.hs-badge img {
  position: absolute; inset: 16%;
  width: 68%; height: 68%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 380ms ease, transform 520ms cubic-bezier(.3,1.5,.5,1);
}
.hs-badge img.on { opacity: 1; transform: none; }
.hs-badge img.off { opacity: 0; transform: scale(0.6); transition: opacity 300ms ease, transform 300ms ease; }

/* the puff of dust a rider arrives in */
.hs-puff {
  position: absolute;
  width: 30%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--kind-reference, var(--pen)) 55%, transparent), transparent);
  opacity: 0;
  animation: hs-puff 1800ms ease-out forwards;
  pointer-events: none;
}
@keyframes hs-puff {
  0%   { opacity: 0;   transform: scale(0.3); }
  30%  { opacity: 0.9; }
  100% { opacity: 0;   transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .hs-plate, .hs-bob { animation: none; }
  .hs-rider { transition: none; }
}
@media (max-width: 760px) {
  .hs-stage { aspect-ratio: 4 / 3; }
  .hs-rider { width: 58%; }
}

/* wide screens: one full-width scene (Dan, 2026-11-20). The gold dust spans
   the whole hero and drifts; the words sit on the calm sky on the left, lined
   up with the page's content edge at every width, over a soft navy pool;
   riders fill the right and, now and then, drift across the bottom.
   Type is set as a hierarchy: a large tight display headline, a readable
   lead at a comfortable measure, the quote as a distinct warm voice, the
   model line as quiet small print, then the actions. Sizes scale from a
   1000px laptop to a 3440px ultrawide. */
@media (min-width: 1000px) {
  main > section.hh:not(.hero) {
    padding: 0 0 0 max(var(--site-pad), calc((100vw - var(--page-w)) / 2));
  }
  .hh {
    position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
    min-height: clamp(620px, calc(100vh - 80px), 1000px);
  }
  .hs-stage {
    position: absolute; inset: 0; z-index: 0;
    width: auto; aspect-ratio: auto; margin: 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, var(--ink) 9%, var(--ink) 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, var(--ink) 9%, var(--ink) 72%, transparent 100%);
  }
  .hs-plate {
    object-position: 50% 60%;
    -webkit-mask-image: linear-gradient(to right, color-mix(in srgb, var(--ink) 20%, transparent) 0%, color-mix(in srgb, var(--ink) 28%, transparent) 28%, var(--ink) 58%);
    mask-image: linear-gradient(to right, color-mix(in srgb, var(--ink) 20%, transparent) 0%, color-mix(in srgb, var(--ink) 28%, transparent) 28%, var(--ink) 58%);
  }
  /* the quiet sky behind the words: a pool of the page's own navy, no edge */
  .hh::before {
    content: ""; position: absolute; z-index: 1; pointer-events: none;
    inset: 0 auto 0 0; width: min(78%, 1500px);
    background:
      radial-gradient(ellipse 58% 68% at 30% 47%, color-mix(in srgb, var(--paper) 92%, transparent) 0%, color-mix(in srgb, var(--paper) 72%, transparent) 50%, transparent 100%),
      linear-gradient(to right, color-mix(in srgb, var(--paper) 66%, transparent) 0%, transparent 70%);
  }
  .hh .hh-text {
    position: relative; z-index: 2; order: 0; text-align: left;
    margin: 0; padding: clamp(24px, 4vh, 56px) 0;
    width: clamp(480px, 38vw, 760px); max-width: none;
  }
  /* a halo of the page's navy under each line, soft and wide, never a stroke */
  .hh .hh-text :is(p, a, span) { text-shadow: 0 0 18px var(--paper), 0 0 4px var(--paper); }

  .hh .hh-statement {
    font-size: clamp(46px, calc(2.6vw + 18px), 104px);
    line-height: 0.98; letter-spacing: -0.028em; font-weight: 600;
    text-wrap: balance;
    text-shadow: 0 0 40px var(--paper), 0 2px 14px color-mix(in srgb, var(--paper-sunk) 80%, transparent);
  }
  .hh .hh-bridge {
    margin: clamp(18px, 1.4vw, 30px) 0 0; max-width: 36ch;
    font: 450 clamp(17px, calc(0.45vw + 11px), 23px)/1.55 var(--body);
    color: var(--ink); letter-spacing: 0.002em; text-wrap: pretty;
  }
  .hh .hh-quote {
    margin: clamp(30px, 2.4vw, 50px) 0 0; max-width: 24em; padding-left: 1.05em;
    font: italic 500 clamp(22px, calc(0.9vw + 12px), 34px)/1.25 var(--display);
    color: color-mix(in srgb, var(--kind-reference) 76%, var(--ink));
    text-wrap: balance;
  }
  /* Dan, 2026-11-23: the headline line leads; the tools line stays body-sized */
  .hh .hh-quote small { margin-top: 0.55em; font-size: clamp(15px, calc(0.25vw + 12px), 19px); line-height: 1.45; text-wrap: balance; }
  .hh .hh-quote::before { left: -0.05em; top: -0.28em; translate: 0 0; font-size: 2.3em; color: color-mix(in srgb, var(--kind-reference) 85%, transparent); }
  .hh .hh-quote span { margin-top: 0.7em; font-size: clamp(11px, calc(0.2vw + 8px), 14px); letter-spacing: 0.1em; color: var(--ink-2); }
  .hh .hh-models {
    margin: clamp(22px, 1.8vw, 36px) 0 0; max-width: 46ch;
    font: 500 clamp(14px, calc(0.25vw + 10px), 17px)/1.5 var(--body);
    color: var(--ink-2); letter-spacing: 0.01em;
  }
  .hh .acts { justify-content: flex-start; margin-top: clamp(26px, 2.2vw, 44px); gap: clamp(18px, 1.6vw, 30px); }
  .hh .cta { font-size: clamp(16px, calc(0.25vw + 12px), 20px); padding: 0.85em 1.4em; }
  .hh .act-quiet { color: var(--ink); font-size: clamp(16px, calc(0.25vw + 12px), 20px); }

  .hs-rider { width: clamp(220px, 18vw, 520px); }
  .hs-rider.low { width: clamp(170px, 13vw, 380px); }
}
