/*
 * Aamin AI (HAFR workspace): lib/alive.css, the "alive" layer (v7, 2026-11-28). lib/alive.js builds the layers;
 * the system is written up in knowledge/60-website/Alive Layer.md.
 *
 * The founder (2026-11-28): the hero is excellent; the rest of the page should be as lively, "texture running,
 * gradient moving", and "around the book now button ... a nice gradient colour boundary moving".
 *
 * One system, "the dot current", in three parts that read as one story:
 *   1. The wash      two to four large soft fields of the lustre colours (sea glass, silver, champagne, shell, a
 *                    hint of the amber) drifting slowly behind a chapter.
 *   2. The current   the brand's dot lattice (14 px, the call band's and the process stage's) drifting in the
 *                    reading direction (right in English, left in Arabic), masked away from the words; now and
 *                    then a lit teal band runs through it, stepping dot by dot so the lit dots stay on the grid.
 *   3. The ring      a 2 px rim in the brand colours (sea teal, the map's fence green, the amber of the logo's
 *                    eyes) turning around every Book button, with a soft glow that breathes; faster on hover.
 *   The night (02 Secure, the red-team chapter) gets its own variant: a teal glow that drifts behind the laptop
 *   and a scan that lights the night's dot field row by row. The call band is the warm close: its wash moves the
 *   most. Calm chapters (start, FAQ) keep their plain ground: the rings make start alive.
 *
 * Engineering: only transform and opacity animate, on composited layers (will-change: transform); the ring's
 * angle is a registered @property on a small pseudo-element. Every layer sits behind the content (z-index -1 in
 * the section, which gets isolation: isolate) and under lib/transitions.css's seam and foot (appended later), so
 * it never meets a band edge. lib/alive.js pauses whatever is off screen (data-alive-run="off"). Reduced motion,
 * ?motion=reduce, ?alive=still and lowPower() (no GPU) show the calm still: the same fields, nothing moving.
 * ?alive=off removes the layer (for comparison). No glass, no blur, no new requests.
 */

/* NEW TOKENS ------------------------------------------------------------------------------------- */
:root {
  --hf-alive-step: 14px;                 /* the brand's dot lattice */
  --hf-alive-run: 280px;                 /* one cycle of the current: 20 steps, so the loop is seamless */
  --hf-alive-run-d: 44s;                 /* ... in 44 s (about 6 px a second) */
  --hf-alive-band: 336px;                /* the lit band: 24 steps wide */
  --hf-alive-dot: rgb(11 13 16 / 0.15);  /* the sector tiles' corner dots */
  --hf-alive-lit: rgb(0 135 155 / 0.8);  /* sea-500, the lit band */
  --hf-alive-fade: 96px;                 /* every layer fades in and out over its section's top and bottom edges */
  /* the lustre colours (page.css §2) as channels, for rgb(var(--c) / alpha) */
  --hf-alive-c-sea: 191 230 225;
  --hf-alive-c-mist: 210 230 230;
  --hf-alive-c-silver: 200 216 242;
  --hf-alive-c-champagne: 243 223 183;
  --hf-alive-c-shell: 244 211 196;
  --hf-alive-c-amber: 233 162 47;        /* the logo's eyes, --hf-color-seal */
  --hf-alive-c-teal: 0 135 155;          /* --hf-color-sea-500 */
  --hf-alive-c-teal-hi: 105 196 214;     /* a light sea for the night */
  /* the ring */
  --hf-ring-w: 2px;
  --hf-ring-d: 3.6s;                     /* one turn */
  --hf-ring-boost-d: 7.2s;               /* added on hover: 1.5 times as fast */
  /* the ring's colours, all brand tokens (/assets/css/tokens.css): sea 500, the map's fence green, sea glass (lustre 2),
     the seal amber of the logo's eyes and its highlight, sea 400, sea 600 */
  --hf-ring-colors: var(--hf-color-sea-500, #00879B) 0deg, var(--hf-color-map-fence, #48DDB1) 58deg, var(--hf-color-lustre-2, #BFE6E1) 96deg,
    var(--hf-color-seal, #E9A22F) 146deg, var(--hf-color-seal-hi, #F2B648) 168deg, var(--hf-color-sea-400, #22A7BC) 222deg,
    var(--hf-color-sea-600, #006776) 292deg, var(--hf-color-sea-500, #00879B) 360deg;
}

@property --hf-ring-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --hf-ring-b { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---- 1. The layer --------------------------------------------------------------------------------- */
.hf-alive-host { isolation: isolate; }
.hf-alive {
  --alive-dir: 1;
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none; contain: strict;
  /* no hard edge where two bands of the same ground meet (lib/transitions.css only eases bands that differ) */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--hf-alive-fade), #000 calc(100% - var(--hf-alive-fade)), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 var(--hf-alive-fade), #000 calc(100% - var(--hf-alive-fade)), transparent 100%);
}
[dir="rtl"] .hf-alive { --alive-dir: -1; }

/* The wash: soft fields of colour. Each is a circle sized as a share of the section's width, centred on
   (--x, --y) through its margins (percent margins are of the width, and so is the circle). */
.hf-alive__blob {
  position: absolute; inset-inline-start: var(--x, 50%); inset-block-start: var(--y, 50%);
  inline-size: var(--s, 60%); aspect-ratio: 1;
  margin-inline-start: calc(var(--s, 60%) * -0.5); margin-block-start: calc(var(--s, 60%) * -0.5);
  border-radius: 50%;
  background: radial-gradient(closest-side in oklab, rgb(var(--c) / var(--a, 0.6)) 0%, rgb(var(--c) / calc(var(--a, 0.6) * 0.55)) 42%, rgb(var(--c) / 0) 100%);
  will-change: transform;
  animation: hf-alive-drift-a var(--d, 36s) ease-in-out var(--dl, 0s) infinite alternate;
}
.hf-alive__blob:nth-child(2) { animation-name: hf-alive-drift-b; }
.hf-alive__blob:nth-child(3) { animation-name: hf-alive-drift-c; }
.hf-alive__blob:nth-child(4) { animation-name: hf-alive-drift-b; animation-direction: alternate-reverse; }
/* the night's glow: a short path that keeps it on the laptop's side, away from the words */
[data-section="secure"] > .hf-alive .hf-alive__blob { animation-name: hf-alive-glow; }
@keyframes hf-alive-glow {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(calc(var(--alive-dir) * -8%), -10%, 0) scale(1.12); }
  100% { transform: translate3d(calc(var(--alive-dir) * 6%), 8%, 0) scale(0.92); }
}
@keyframes hf-alive-drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(calc(var(--alive-dir) * 26%), -16%, 0) scale(1.16); }
  100% { transform: translate3d(calc(var(--alive-dir) * -12%), 14%, 0) scale(0.9); }
}
@keyframes hf-alive-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1.06); }
  50%  { transform: translate3d(calc(var(--alive-dir) * -24%), 14%, 0) scale(0.9); }
  100% { transform: translate3d(calc(var(--alive-dir) * 16%), -12%, 0) scale(1.14); }
}
@keyframes hf-alive-drift-c {
  0%   { transform: translate3d(0, 0, 0) scale(0.96); }
  50%  { transform: translate3d(calc(var(--alive-dir) * 16%), 18%, 0) scale(1.14); }
  100% { transform: translate3d(calc(var(--alive-dir) * -20%), -10%, 0) scale(1); }
}

/* The current: the dot lattice, wider than the section by a cycle on each side (lib/alive.js sets --alive-w,
   a whole number of steps), drifting one cycle in the reading direction, masked by the section's --alive-mask. */
.hf-alive__field {
  position: absolute; inset: 0;
  -webkit-mask-image: var(--alive-mask, none); mask-image: var(--alive-mask, none);
}
.hf-alive__dots {
  position: absolute; inset-block: 0; left: calc(var(--hf-alive-run) * -1);
  width: calc(var(--alive-w, 2400) * 1px);
  background-image: radial-gradient(var(--alive-dot, var(--hf-alive-dot)) 1.1px, transparent 1.6px);
  background-size: var(--hf-alive-step) var(--hf-alive-step);
  will-change: transform;
  animation: hf-alive-run var(--hf-alive-run-d) linear infinite;
}
@keyframes hf-alive-run { to { transform: translate3d(calc(var(--alive-dir) * var(--hf-alive-run)), 0, 0); } }
/* The lit band: rides on the drifting lattice and runs across it in whole steps (so its dots sit on the grid's),
   brightest at its leading edge; then rests off the edge until the next run. */
.hf-alive__current {
  position: absolute; inset-block: 0; left: calc(var(--hf-alive-band) * -1); width: var(--hf-alive-band);
  background-image: radial-gradient(var(--alive-lit, var(--hf-alive-lit)) 1.45px, transparent 1.95px);
  background-size: var(--hf-alive-step) var(--hf-alive-step);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.35) 45%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.35) 45%, #000 88%, transparent 100%);
  will-change: transform;
  animation: hf-alive-sweep var(--alive-sweep-d, 8s) steps(var(--alive-steps, 160), end) var(--alive-sweep-dl, 0.6s) infinite;
}
[dir="rtl"] .hf-alive__current {
  left: calc(var(--alive-w, 2400) * 1px);
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, rgb(0 0 0 / 0.35) 45%, #000 88%, transparent 100%);
          mask-image: linear-gradient(270deg, transparent 0%, rgb(0 0 0 / 0.35) 45%, #000 88%, transparent 100%);
}
@keyframes hf-alive-sweep {
  0% { transform: translate3d(0, 0, 0); }
  55%, 100% { transform: translate3d(calc(var(--alive-dir) * var(--alive-travel, 2700px)), 0, 0); }
}

/* The night's scan: a band of lit dots on the night's own 18 px field (sections/secure .sec-dots), stepping down
   a row at a time, inside the same mask as that field (densest behind the laptop, gone under the text). */
.hf-alive__scanfield { position: absolute; inset: 0; }
.hf-alive__scan {
  position: absolute; inset-inline: 0; top: calc(var(--scan-h, 144px) * -1); height: var(--scan-h, 144px);
  background-image: radial-gradient(rgb(var(--hf-alive-c-teal-hi) / 0.95) 1.25px, transparent 1.8px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.3) 50%, #000 90%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.3) 50%, #000 90%, transparent 100%);
  will-change: transform;
  animation: hf-alive-scan var(--alive-scan-d, 9s) steps(var(--alive-steps-y, 60), end) 0.8s infinite;
}
/* the scan line at the band's leading edge */
.hf-alive__scan::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 14px; height: 1px;
  background: linear-gradient(90deg, rgb(var(--hf-alive-c-teal-hi) / 0) 0%, rgb(var(--hf-alive-c-teal-hi) / 0.55) 30%, rgb(var(--hf-alive-c-teal-hi) / 0.55) 70%, rgb(var(--hf-alive-c-teal-hi) / 0) 100%);
}
@keyframes hf-alive-scan {
  0% { transform: translate3d(0, 0, 0); }
  70%, 100% { transform: translate3d(0, calc(var(--alive-travel-y, 1200) * 1px), 0); }
}

/* Off screen, everything holds still (lib/alive.js: IntersectionObserver). So does the whole layer while the booking
   pop-up is open (lib/book.js sets html[data-book-open]): the page is behind its backdrop, the celebration gets the frames. */
.hf-alive[data-alive-run="off"] *, .hf-alive[data-alive-run="off"] *::after,
html[data-book-open] .hf-alive *, html[data-book-open] .hf-alive *::after,
html[data-book-open] .hf-btn--alive::before, html[data-book-open] .hf-btn--alive::after { animation-play-state: paused !important; }

/* ---- 2. Per chapter (home) ------------------------------------------------------------------------- */
/* walk, the first chapter after the hero: the strongest current, both sides, clear under the centred words */
[data-section="walk"] > .hf-alive {
  --alive-mask: radial-gradient(ellipse 58% 76% at 50% 46%, transparent 46%, rgb(0 0 0 / 0.55) 74%, #000 100%);
  --alive-sweep-d: 7s;
}
[data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.7; --s: 56%; --x: 8%; --y: 58%; --d: 34s; }
[data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-silver); --a: 0.5; --s: 50%; --x: 94%; --y: 30%; --d: 41s; --dl: -12s; }
[data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(3) { --c: var(--hf-alive-c-champagne); --a: 0.7; --s: 36%; --x: 70%; --y: 92%; --d: 29s; --dl: -7s; }

/* build: the pinned stage moves a lot already; a soft wash only */
[data-section="build"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.65; --s: 50%; --x: 76%; --y: 44%; --d: 38s; }
[data-section="build"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-champagne); --a: 0.6; --s: 38%; --x: 6%; --y: 86%; --d: 44s; --dl: -18s; }

/* secure, the night: a teal glow drifting behind the laptop (start side; end side in Arabic), and the scan */
[data-section="secure"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-teal); --a: 0.26; --s: 46%; --x: 28%; --y: 52%; --d: 26s; }
[data-section="secure"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: 34 167 188; --a: 0.12; --s: 30%; --x: 14%; --y: 30%; --d: 33s; --dl: -9s; }
[data-section="secure"] > .hf-alive .hf-alive__scanfield {
  -webkit-mask-image: radial-gradient(48% 66% at 30% 50%, #000 0%, rgb(0 0 0 / 0.55) 48%, transparent 82%);
          mask-image: radial-gradient(48% 66% at 30% 50%, #000 0%, rgb(0 0 0 / 0.55) 48%, transparent 82%);
}
[dir="rtl"] [data-section="secure"] > .hf-alive .hf-alive__scanfield {
  -webkit-mask-image: radial-gradient(48% 66% at 70% 50%, #000 0%, rgb(0 0 0 / 0.55) 48%, transparent 82%);
          mask-image: radial-gradient(48% 66% at 70% 50%, #000 0%, rgb(0 0 0 / 0.55) 48%, transparent 82%);
}

/* run: the sea-glass halo drifts around the map (the map is the star: no current) */
[data-section="run"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.5; --s: 48%; --x: 62%; --y: 40%; --d: 36s; }
[data-section="run"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-mist); --a: 0.7; --s: 40%; --x: 98%; --y: 92%; --d: 43s; --dl: -15s; }

/* sectors: the current runs behind the six cards (it shows in the gaps and the margins), clear around the head */
[data-section="sectors"] > .hf-alive {
  --alive-mask: radial-gradient(ellipse 40% 30% at 50% 14%, transparent 52%, rgb(0 0 0 / 0.6) 80%, #000 100%);
  --alive-sweep-d: 9s; --alive-sweep-dl: 2.4s;
}
[data-section="sectors"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-mist); --a: 0.8; --s: 46%; --x: 96%; --y: 70%; --d: 39s; }

/* process: a warm wash (the step words are dotted already). v7-fix: it read as still (frames 4.5 s apart barely
   differed), so the fields are stronger (+0.15) and drift twice as fast, like the call band's */
[data-section="process"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-champagne); --a: 0.75; --s: 44%; --x: 92%; --y: 22%; --d: 20s; }
[data-section="process"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-sea); --a: 0.75; --s: 40%; --x: 6%; --y: 64%; --d: 18s; --dl: -6s; }

/* trust: the current around the laptop (start side), a sea wash under it. The field stops above the laptop's caption
   (measured: the caption kept 4.59:1 with the dots under it; with this edge it keeps its own 5.08:1) and clear of the
   lead above. */
[data-section="trust"] > .hf-alive {
  --alive-mask: radial-gradient(ellipse 36% 34% at 27% 70%, #000 0%, rgb(0 0 0 / 0.5) 56%, transparent 100%), linear-gradient(180deg, #000 0%, #000 84%, transparent 89%);
  --alive-sweep-d: 10s; --alive-sweep-dl: 3.2s;
}
[dir="rtl"] [data-section="trust"] > .hf-alive { --alive-mask: radial-gradient(ellipse 36% 34% at 73% 70%, #000 0%, rgb(0 0 0 / 0.5) 56%, transparent 100%), linear-gradient(180deg, #000 0%, #000 84%, transparent 89%); }
[data-section="trust"] > .hf-alive .hf-alive__field { -webkit-mask-composite: source-in; mask-composite: intersect; }
[data-section="trust"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.55; --s: 44%; --x: 26%; --y: 66%; --d: 37s; }
/* v7-fix: the shell field beside the heading read as a stray peach disc; softer now */
[data-section="trust"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-shell); --a: 0.28; --s: 34%; --x: 92%; --y: 18%; --d: 42s; --dl: -14s; }

/* call, the warm close: the lustre's colours move the most here, with a hint of the amber */
[data-section="call"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-shell); --a: 0.55; --s: 50%; --x: 6%; --y: 30%; --d: 19s; }
[data-section="call"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-silver); --a: 0.48; --s: 46%; --x: 95%; --y: 26%; --d: 23s; --dl: -6s; }
[data-section="call"] > .hf-alive .hf-alive__blob:nth-child(3) { --c: var(--hf-alive-c-sea); --a: 0.6; --s: 54%; --x: 50%; --y: 100%; --d: 21s; --dl: -11s; }
[data-section="call"] > .hf-alive .hf-alive__blob:nth-child(4) { --c: var(--hf-alive-c-amber); --a: 0.14; --s: 30%; --x: 92%; --y: 80%; --d: 17s; --dl: -4s; }

/* footer: a wash rising behind the dotted mark (v7-fix: +0.15 and twice as fast, as for process) */
[data-section="footer"] > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.7; --s: 40%; --x: 20%; --y: 96%; --d: 19s; }
[data-section="footer"] > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-champagne); --a: 0.7; --s: 34%; --x: 78%; --y: 100%; --d: 22s; --dl: -10s; }

/* ---- 3. Inner pages: the page head (lustre) gets a wash and the current behind its visual ---------- */
[data-section="hero"].pg-hero > .hf-alive {
  --alive-mask: radial-gradient(ellipse 34% 62% at 80% 46%, #000 0%, rgb(0 0 0 / 0.55) 55%, transparent 100%);
  --alive-sweep-d: 8.5s; --alive-sweep-dl: 1.2s;
}
[dir="rtl"] [data-section="hero"].pg-hero > .hf-alive { --alive-mask: radial-gradient(ellipse 34% 62% at 20% 46%, #000 0%, rgb(0 0 0 / 0.55) 55%, transparent 100%); }
[data-section="hero"].pg-hero > .hf-alive .hf-alive__blob:nth-child(1) { --c: var(--hf-alive-c-sea); --a: 0.6; --s: 46%; --x: 78%; --y: 62%; --d: 33s; }
[data-section="hero"].pg-hero > .hf-alive .hf-alive__blob:nth-child(2) { --c: var(--hf-alive-c-champagne); --a: 0.5; --s: 40%; --x: 30%; --y: 104%; --d: 40s; --dl: -13s; }

/* ---- Narrow screens: one column, words almost edge to edge ---------------------------------------- */
@media (max-width: 63.99rem) {
  [data-section="walk"] > .hf-alive { --alive-mask: linear-gradient(180deg, transparent 0%, transparent 68%, rgb(0 0 0 / 0.7) 88%, #000 100%); }
  [data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 110%; --x: 0%; --y: 62%; }
  [data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 100%; --x: 100%; --y: 22%; }
  [data-section="walk"] > .hf-alive .hf-alive__blob:nth-child(3) { --s: 80%; --x: 70%; --y: 96%; }
  [data-section="build"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 110%; --x: 90%; --y: 60%; }
  [data-section="build"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 90%; --x: 0%; --y: 20%; }
  [data-section="secure"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 120%; --x: 50%; --y: 74%; }
  [data-section="secure"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 80%; --x: 20%; --y: 88%; }
  [data-section="secure"] > .hf-alive .hf-alive__scanfield,
  [dir="rtl"] [data-section="secure"] > .hf-alive .hf-alive__scanfield {
    -webkit-mask-image: radial-gradient(80% 40% at 50% 74%, #000 0%, rgb(0 0 0 / 0.5) 50%, transparent 85%);
            mask-image: radial-gradient(80% 40% at 50% 74%, #000 0%, rgb(0 0 0 / 0.5) 50%, transparent 85%);
  }
  [data-section="run"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 130%; --x: 60%; --y: 40%; }
  [data-section="run"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 90%; --x: 0%; --y: 10%; }
  /* sectors: the cards stack; the current shows in the gaps between them, clear around the head */
  [data-section="sectors"] > .hf-alive { --alive-mask: linear-gradient(180deg, transparent 0%, transparent 14%, rgb(0 0 0 / 0.8) 22%, #000 100%); }
  [data-section="sectors"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 110%; --x: 100%; --y: 60%; }
  [data-section="process"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 100%; --x: 100%; --y: 12%; }
  [data-section="process"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 100%; --x: 0%; --y: 70%; }
  [data-section="trust"] > .hf-alive,
  [dir="rtl"] [data-section="trust"] > .hf-alive { --alive-mask: radial-gradient(ellipse 80% 15% at 50% 80%, #000 0%, rgb(0 0 0 / 0.5) 56%, transparent 100%), linear-gradient(180deg, #000 0%, #000 93%, transparent 96%); }
  [data-section="trust"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 120%; --x: 50%; --y: 60%; }
  [data-section="trust"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 90%; --x: 100%; --y: 8%; }
  [data-section="call"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 110%; --x: 0%; --y: 16%; }
  [data-section="call"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 100%; --x: 100%; --y: 34%; }
  [data-section="call"] > .hf-alive .hf-alive__blob:nth-child(3) { --s: 120%; --x: 50%; --y: 92%; }
  [data-section="call"] > .hf-alive .hf-alive__blob:nth-child(4) { --s: 70%; --x: 90%; --y: 64%; }
  [data-section="footer"] > .hf-alive .hf-alive__blob:nth-child(1) { --s: 100%; --x: 10%; --y: 96%; }
  [data-section="footer"] > .hf-alive .hf-alive__blob:nth-child(2) { --s: 90%; --x: 90%; --y: 100%; }
  /* the page head: the visual sits under the copy */
  [data-section="hero"].pg-hero > .hf-alive,
  [dir="rtl"] [data-section="hero"].pg-hero > .hf-alive { --alive-mask: radial-gradient(ellipse 80% 30% at 50% 82%, #000 0%, rgb(0 0 0 / 0.5) 55%, transparent 100%); }
  [data-section="hero"].pg-hero > .hf-alive .hf-alive__blob:nth-child(1) { --s: 120%; --x: 70%; --y: 80%; }
  [data-section="hero"].pg-hero > .hf-alive .hf-alive__blob:nth-child(2) { --s: 100%; --x: 0%; --y: 10%; }
}

/* ---- 4. The ring on the Book buttons (lib/alive.js adds .hf-btn--alive) ---------------------------- */
/* The rim is drawn inside the pill's own edge (the button keeps its size, so nothing shifts and nothing pokes out
   of the hero's email pill); the focus ring stays outside it, untouched. The glow is an outer shadow (never over
   the button's words) whose opacity breathes. */
.hf-btn--alive { position: relative; }
.hf-btn--alive::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: var(--hf-ring-w);
  pointer-events: none;
  background: conic-gradient(from calc(var(--hf-ring-a) + var(--hf-ring-b)) in oklab, var(--hf-ring-colors));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: hf-ring-a var(--hf-ring-d) linear infinite, hf-ring-b var(--hf-ring-boost-d) linear infinite paused;
}
.hf-btn--alive::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 14px 1px rgb(var(--hf-alive-c-teal) / 0.5), 0 0 28px 5px rgb(var(--hf-alive-c-amber) / 0.2);
  opacity: 0.4;
  animation: hf-ring-breathe 3.2s ease-in-out infinite alternate;
}
.hf-ground--night .hf-btn--alive::after { box-shadow: 0 0 16px 2px rgb(var(--hf-alive-c-teal-hi) / 0.45), 0 0 30px 6px rgb(var(--hf-alive-c-amber) / 0.16); }
/* hover and keyboard focus: the second turn joins in (paused, it keeps its angle, so nothing jumps) */
.hf-btn--alive:is(:hover, :focus-visible)::before { animation-play-state: running, running; }
.hf-btn--alive:is(:hover, :focus-visible)::after { opacity: 0.95; animation-play-state: paused; transition: opacity 240ms var(--hf-ease-out, ease-out); }
/* Arabic: the ring turns the other way, like the current */
[dir="rtl"] .hf-btn--alive::before { animation-name: hf-ring-a-rtl, hf-ring-b-rtl; }
@keyframes hf-ring-a { to { --hf-ring-a: 360deg; } }
@keyframes hf-ring-b { to { --hf-ring-b: 360deg; } }
@keyframes hf-ring-a-rtl { to { --hf-ring-a: -360deg; } }
@keyframes hf-ring-b-rtl { to { --hf-ring-b: -360deg; } }
@keyframes hf-ring-breathe { from { opacity: 0.3; } to { opacity: 0.85; } }
/* the hero's email pill: the button's own focus ring is drawn inside it (sections/hero), so leave a gap */
[data-section="hero"] .hf-mail .hf-btn.hf-btn--alive:focus-visible { outline-offset: -5px; } /* v7-fix: one more class, so it beats sections/hero's -4px */
[data-section="hero"] .hf-mail .hf-btn--alive::after { box-shadow: 0 0 12px 1px rgb(var(--hf-alive-c-teal) / 0.45), 0 0 22px 3px rgb(var(--hf-alive-c-amber) / 0.16); }
/* Calm (the header's and the dock's Book a call, always on screen): a slower, thinner rim, no glow */
.hf-btn--alive-calm { --hf-ring-w: 1.5px; --hf-ring-d: 8s; --hf-ring-boost-d: 8s; }
.hf-btn--alive-calm::after { content: none; }
/* Rows (several Book now buttons in one chapter: the four rungs of How we work and the stalled-pilot line, the three
   Where to start cards). Eight turning rings at once would be busy, so each keeps a still rim in the same colours,
   and one turn travels along the row: lib/alive.js lights one button at a time (data-alive-lit) for one turn, in
   reading order, among those on screen; its glow fades in as it takes the turn and out as it hands it on. Hover
   and keyboard focus turn any of them at once, a little faster, as for the single buttons. */
.hf-btn--alive-row::before { animation-play-state: paused, paused; opacity: 0.66; transition: opacity 600ms var(--hf-ease-out, ease-out); }
.hf-btn--alive-row::after { animation: none; opacity: 0; transition: opacity 700ms var(--hf-ease-out, ease-out); }
.hf-btn--alive-row[data-alive-lit]::before { animation-play-state: running, paused; opacity: 1; }
.hf-btn--alive-row[data-alive-lit]::after { opacity: 0.7; }
.hf-btn--alive-row:is(:hover, :focus-visible)::before { animation-play-state: running, running; opacity: 1; }
.hf-btn--alive-row:is(:hover, :focus-visible)::after { opacity: 0.95; }
/* Off screen: still */
.hf-btn--alive[data-alive-off]::before, .hf-btn--alive[data-alive-off]::after { animation-play-state: paused !important; }

/* ---- 5. The calm still: reduced motion, ?motion=reduce, ?alive=still, no GPU ---------------------- */
html[data-alive="still"] .hf-alive *, html[data-alive="still"] .hf-alive *::after,
html[data-reduced] .hf-alive *, html[data-reduced] .hf-alive *::after { animation: none !important; }
html[data-alive="still"] .hf-btn--alive::before, html[data-reduced] .hf-btn--alive::before { animation: none !important; --hf-ring-a: 210deg; }
html[data-alive="still"] .hf-btn--alive::after, html[data-reduced] .hf-btn--alive::after { animation: none !important; opacity: 0.45; }
html[data-alive="still"] .hf-btn--alive-row::before, html[data-reduced] .hf-btn--alive-row::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hf-alive *, .hf-alive *::after { animation: none !important; }
  .hf-btn--alive::before { animation: none !important; --hf-ring-a: 210deg; }
  .hf-btn--alive::after { animation: none !important; opacity: 0.45; }
  .hf-btn--alive-row::before { opacity: 1; }
}
