/* Humyn Labs montage: the orange icon tile opens from its centre line out to full height when it
   scrolls into view, and its four icons keep turning slowly in place. It sits exactly over the
   tile in the montage image; the black cover hides the static tile until it opens. */
.hl-icons { position: absolute; background: #000; pointer-events: none; }
.hl-icons-tile {
  position: absolute;
  overflow: hidden;
  border-radius: 12px;
  background-repeat: no-repeat;
  clip-path: inset(50% 0 50% 0 round 12px);
  transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1);
}
.hl-icons.is-in .hl-icons-tile { clip-path: inset(0 0 0 0 round 12px); }
.hl-icon {
  position: absolute;
  border-radius: 50%;
  background-repeat: no-repeat;
  transform: scale(.4) rotate(-180deg);
  opacity: 0;
  transition: transform .9s cubic-bezier(.2, .9, .25, 1.15), opacity .4s ease;
  transition-delay: calc(.55s + var(--i) * .12s);
}
.hl-icons.is-in .hl-icon { transform: none; opacity: 1; }
/* Once in place, each icon turns continuously; neighbours turn opposite ways. */
.hl-icons.is-spinning .hl-icon { animation: hl-spin 9s linear infinite; }
.hl-icons.is-spinning .hl-icon:nth-child(2n) { animation-direction: reverse; }
@keyframes hl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hl-icons-tile { clip-path: inset(0 round 12px); transition: none; }
  .hl-icon { transform: none; opacity: 1; transition: none; }
  .hl-icons.is-spinning .hl-icon { animation: none; }
}

/* The big humyn(labs) tile does the same, but opens sideways from its centre line. */
.hl-wide .hl-icons-tile { clip-path: inset(0 50% 0 50% round 12px); transition-duration: 1.2s; }
.hl-wide.is-in .hl-icons-tile { clip-path: inset(0 0 0 0 round 12px); }
@media (prefers-reduced-motion: reduce) { .hl-wide .hl-icons-tile { clip-path: inset(0 round 12px); } }

/* The colour-palette dots: they pop in one by one, quickly (see humyn-dots.js). */
.hl-dots { position: absolute; pointer-events: none; }
.hl-dots canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hl-dot {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .34s cubic-bezier(.3, 1.45, .55, 1) calc(var(--i) * .085s);
}
.hl-dots.is-in .hl-dot { transform: none; }

/* The (h) tile: the parentheses start closed in the middle and slide apart while the h grows in
   between them (see humyn-mark.js). The cover hides the static mark in the image. */
.hl-mark-cover { position: absolute; background: #ff6e42; pointer-events: none; }
.hl-mark { position: absolute; pointer-events: none; }
.hl-mark-left, .hl-mark-right {
  transform: translateX(var(--from));
  transition: transform 1s cubic-bezier(.7, 0, .2, 1);
}
.hl-mark-h {
  opacity: 0;
  transform: scale(.35);
  transition: transform .9s cubic-bezier(.3, 1.25, .5, 1) .18s, opacity .45s ease .18s;
}
.hl-mark-cover.is-in ~ .hl-mark { transform: none; opacity: 1; }

/* "Your field. Your instincts. Your lived reality." typing itself out (see humyn-type.js). */
.hl-type { position: absolute; pointer-events: none; }
.hl-type canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* The portrait tile's brackets: they start together in the centre, (), and slide out (see humyn-brackets.js). */
.hl-bracket-bg, .hl-bracket { position: absolute; pointer-events: none; }
.hl-bracket { transform: translateX(var(--from)); transition: transform 1.1s cubic-bezier(.7, 0, .2, 1); }
.hl-bracket.is-in { transform: none; }

/* While a tile is being put back to its start (off screen), nothing animates. */
.hl-instant .hl-icons-tile, .hl-instant .hl-icon, .hl-instant .hl-dot, .hl-instant .hl-mark, .hl-instant .hl-bracket { transition: none !important; }

/* "From Request to Delivery" stepping through its six steps (see humyn-workflow.js). */
.hl-wf-slide { position: absolute; overflow: hidden; border-radius: 6.72px; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.hl-wf-slide-own { inset: 0; overflow: visible; border-radius: 0; }   /* step 01's own card, left where it was */
.hl-wf-slide.is-active { opacity: 1; }
.hl-wf-inner { position: absolute; left: 0; top: 0; width: 1530px; height: 0; transform-origin: 0 0; }
.hl-wf-desc { opacity: 0; transition: opacity .25s ease; }
.hl-wf-desc.is-active { opacity: 1; }
.hl-wf-step { color: #b4b4b4 !important; font-weight: 500 !important; transition: color .2s ease; cursor: default; }
.hl-wf-step.is-active { color: #383532 !important; font-weight: 600 !important; }

/* Interface icon construction reveal (see humyn-construct.js). One 7s cycle, repeating while on
   screen: lines sweep in (0–1s), dashed circles trace (0.6–2.2s), ratios appear (2.3s), everything
   holds, then fades out (5–5.6s) leaving the clean icon for a beat before it starts again. */
.hl-construct { position: absolute; overflow: visible; pointer-events: none; }
.hl-construct line { stroke: #383532; stroke-width: .5; opacity: .5; transform-box: fill-box; }
.hl-construct .hc-h { transform-origin: left center; }
.hl-construct .hc-v { transform-origin: center top; }
.hl-construct .hc-circle { fill: none; stroke: #383532; stroke-width: .7; stroke-dasharray: 3 3; }
.hl-construct .hc-trace { fill: none; stroke: #fff; stroke-width: 6; stroke-dasharray: 100; stroke-dashoffset: 100; }
.hl-construct .hc-dot { fill: #ff6c40; }
.hl-construct text { font: 500 10.5px/1 "Neue Montreal", "Helvetica Neue", Arial, sans-serif; fill: #383532; text-anchor: middle; dominant-baseline: middle; }
.hl-construct line, .hl-construct .hc-marks, .hl-construct .hc-labels, .hl-construct .hc-circles { opacity: 0; }

.hl-construct.is-on .hc-h { animation: hc-sweep-h 7s cubic-bezier(.65, 0, .25, 1) var(--d) infinite both; }
.hl-construct.is-on .hc-v { animation: hc-sweep-v 7s cubic-bezier(.65, 0, .25, 1) var(--d) infinite both; }
.hl-construct.is-on .hc-trace { animation: hc-trace 7s cubic-bezier(.5, 0, .2, 1) var(--d) infinite both; }
.hl-construct.is-on .hc-circles { animation: hc-hold 7s linear infinite both; }
.hl-construct.is-on .hc-marks { animation: hc-pop 7s ease 0s infinite both; }
.hl-construct.is-on .hc-labels { animation: hc-labels 7s ease infinite both; }
@keyframes hc-sweep-h { 0% { transform: scaleX(0); opacity: .5 } 13% { transform: none; opacity: .5 } 72% { opacity: .5 } 80%, 100% { transform: none; opacity: 0 } }
@keyframes hc-sweep-v { 0% { transform: scaleY(0); opacity: .5 } 13% { transform: none; opacity: .5 } 72% { opacity: .5 } 80%, 100% { transform: none; opacity: 0 } }
@keyframes hc-trace { 0% { stroke-dashoffset: 100 } 14%, 100% { stroke-dashoffset: 0 } }
@keyframes hc-hold { 0% { opacity: 1 } 72% { opacity: 1 } 80%, 100% { opacity: 0 } }
@keyframes hc-pop { 0%, 22% { opacity: 0 } 27% { opacity: 1 } 72% { opacity: 1 } 80%, 100% { opacity: 0 } }
@keyframes hc-labels { 0%, 32% { opacity: 0 } 37% { opacity: 1 } 72% { opacity: 1 } 80%, 100% { opacity: 0 } }
/* Reduced motion: the construction is simply shown. */
.hl-construct.is-still line { opacity: .5; }
.hl-construct.is-still .hc-trace { stroke-dashoffset: 0; }
.hl-construct.is-still .hc-circles, .hl-construct.is-still .hc-marks, .hl-construct.is-still .hc-labels { opacity: 1; }

/* Gradient cards: the gradient underneath the pattern flows slowly (see humyn-flow.js). Scaled up
   enough that the drift and turn never show the card's edge. */
.hl-flow { animation: hl-flow-a 15s ease-in-out infinite alternate; transform-origin: 50% 50%; will-change: transform; }
@keyframes hl-flow-a {
  0%   { transform: scale(1.22) translate(0, 0) rotate(0deg); }
  35%  { transform: scale(1.3) translate(-4%, 3%) rotate(2.5deg); }
  70%  { transform: scale(1.24) translate(3.5%, -2.5%) rotate(-2deg); }
  100% { transform: scale(1.28) translate(-2%, -3%) rotate(1deg); }
}
@keyframes hl-flow-b {
  0%   { transform: scale(1.24) translate(2%, -2%) rotate(-1deg); }
  40%  { transform: scale(1.3) translate(-3.5%, -3%) rotate(-2.5deg); }
  75%  { transform: scale(1.22) translate(3%, 3.5%) rotate(2deg); }
  100% { transform: scale(1.27) translate(0, 2%) rotate(0deg); }
}
