/* Visitor landing page v2 (helper landing-v2, 2026-10-24): the service logos circle Rashad on two slow, tilted rings.
   Pure CSS 3D: the figure and the rings share one 3D scene (transform-style: preserve-3d), so the back half of each
   ring really passes BEHIND Rashad's body; perspective makes those logos smaller and an opacity keyframe dims them.
   Only transform + opacity are animated (compositor work, no JavaScript per frame).
   Inner ring 80 s per turn; outer ring 120 s, the other way - all of them Rashad's services (2026-11-16; the inner
   ring was Manara's from 2026-10-25).
   Each logo counter-rotates, so it stays upright. hub/front.py gives every logo its place: --p (0..1 around the
   ring), --dp (phase of the depth animation), --o / --s (opacity / scale when nothing moves).
   Pause: hover, keyboard focus, a first tap (static/front-orbit.js) and the pause button.
   prefers-reduced-motion: no rotation (a static ring). Phone (<900px): both rings, smaller, + two swipeable named rows. */
.orbit-stage{--k:1;--tilt:66deg;--fig-h:calc(400px * var(--k));--r1:calc(208px * var(--k));--r2:calc(292px * var(--k));
  --l1:calc(60px * var(--k));--l2:calc(52px * var(--k));
  position:relative;z-index:1;width:100%;height:calc(var(--fig-h) + 64px * var(--k));perspective:1500px;perspective-origin:50% 45%}
.orbit-scene{position:absolute;inset:0;transform-style:preserve-3d}
/* Rashad stands upright in the middle of the scene (the plane z = 0) */
.orbit-fig{position:absolute;left:50%;bottom:calc(46px * var(--k));height:var(--fig-h);width:calc(var(--fig-h) * .859);
  transform:translateX(-50%) translateZ(0);pointer-events:none;transition:opacity .25s ease}
.orbit-fig picture,.orbit-fig img{display:block;width:100%;height:100%;max-width:none;max-height:none}
.orb img,.orbit-row img{filter:none;max-width:none;max-height:none;object-fit:cover}
.orbit-fig img{object-fit:contain;filter:drop-shadow(0 18px 24px rgba(10,30,20,.22))}
/* a ring: centred on the body (about 60% down the figure), tilted back */
.ring{position:absolute;left:50%;top:calc(18px * var(--k) + var(--fig-h) * .6);width:0;height:0;
  transform-style:preserve-3d;transform:rotateX(var(--tilt))}
.ring-inner{--T:80s;--r:var(--r1);--l:var(--l1)}
.ring-outer{--T:120s;--r:var(--r2);--l:var(--l2)}
.ring::before{content:"";position:absolute;left:calc(var(--r) * -1);top:calc(var(--r) * -1);width:calc(var(--r) * 2);height:calc(var(--r) * 2);
  border-radius:50%;border:1.5px dashed color-mix(in srgb,var(--accent) 34%,transparent);transform:translateZ(-1px);pointer-events:none}
.orbit-spin{position:absolute;left:0;top:0;transform-style:preserve-3d;animation:orbit-spin var(--T) linear infinite}
.orbit-slot{position:absolute;left:0;top:0;transform-style:preserve-3d;transform:rotate(calc(var(--p) * 360deg)) translateX(var(--r))}
.orbit-face{position:absolute;left:calc(var(--l) / -2);top:calc(var(--l) / -2);width:var(--l);height:var(--l);
  transform:rotate(calc(var(--p) * -360deg)) rotateX(calc(var(--tilt) * -1));animation:orbit-counter var(--T) linear infinite}
.orb{display:block;width:100%;height:100%;border-radius:50%;background:var(--surface);
  box-shadow:0 4px 10px rgba(6,40,30,.22);opacity:var(--o);transform:scale(var(--s));
  animation:orbit-depth var(--T) linear infinite;animation-delay:calc(var(--dp) * var(--T) * -1);
  transition:box-shadow .2s ease}
.orb picture,.orb img{display:block;width:100%;height:100%;border-radius:50%}
.ring-outer .orbit-spin,.ring-outer .orbit-face,.ring-outer .orb{animation-direction:reverse}
@keyframes orbit-spin{to{transform:rotate(360deg)}}
@keyframes orbit-counter{
  from{transform:rotate(calc(var(--p) * -360deg)) rotateX(calc(var(--tilt) * -1))}
  to{transform:rotate(calc(var(--p) * -360deg - 360deg)) rotateX(calc(var(--tilt) * -1))}}
/* 0% = the logo at the right end of the ring, 25% = in front of Rashad, 50% = left end, 75% = behind him */
@keyframes orbit-depth{0%{opacity:.88;transform:scale(.95)}25%{opacity:1;transform:scale(1)}50%{opacity:.88;transform:scale(.95)}
  75%{opacity:.46;transform:scale(.84)}100%{opacity:.88;transform:scale(.95)}}
/* paused: hover / focus / first tap (front-orbit.js adds .paused) or the pause button (.stopped) */
.orbit-stage.paused .orbit-spin,.orbit-stage.paused .orbit-face,.orbit-stage.paused .orb,
.orbit-stage.stopped .orbit-spin,.orbit-stage.stopped .orbit-face,.orbit-stage.stopped .orb{animation-play-state:paused}
.orbit-stage:focus-within .orbit-spin,.orbit-stage:focus-within .orbit-face,.orbit-stage:focus-within .orb{animation-play-state:paused}
.orb:hover,.orb.on{opacity:1 !important;box-shadow:0 0 0 3px var(--accent),0 8px 18px rgba(6,40,30,.3)}
.orb:focus-visible{opacity:1 !important;outline:3px solid var(--accent);outline-offset:3px;box-shadow:0 0 0 6px var(--surface)}
/* keyboard focus: Rashad turns see-through so a logo behind him (and its focus ring) stays visible */
.orbit-stage.kbd .orbit-fig{opacity:.3}
/* the speech bubble near Rashad's head (start = his right in English, mirrors in Arabic) */
.orbit-bubble{position:absolute;z-index:5;top:calc(6px * var(--k));inset-inline-start:calc(50% + 96px * var(--k));
  max-width:min(260px,calc(50% - 100px * var(--k)));padding:10px 14px;border-radius:16px;background:var(--surface);color:var(--ink);
  border:1px solid var(--line);box-shadow:0 10px 24px -10px rgba(6,40,30,.35);font-size:13px;line-height:1.35;
  transition:transform .2s ease,border-color .2s ease}
.orbit-bubble::after{content:"";position:absolute;bottom:-8px;inset-inline-start:18px;width:14px;height:14px;background:var(--surface);
  border-inline-end:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg)}
[dir="rtl"] .orbit-bubble::after{transform:rotate(-45deg)}
.orbit-bubble b{display:block;color:var(--accent);font-size:14px;margin-bottom:2px}
.orbit-bubble span{display:block;color:var(--muted)}
.orbit-bubble.on{border-color:var(--accent);transform:translateY(-2px)}
/* pause / play */
.orbit-toggle{position:absolute;z-index:5;bottom:6px;inset-inline-end:6px;width:34px;height:34px;border-radius:50%;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;display:grid;place-items:center;font-size:13px;line-height:1}
.orbit-toggle:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.orbit-toggle .play{display:none}.orbit-stage.stopped .orbit-toggle .play{display:inline}.orbit-stage.stopped .orbit-toggle .pause{display:none}
/* the swipeable row (phone): every service with its name */
.orbit-row{display:none;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:6px 2px 10px;margin:6px 0 0;list-style:none;
  width:100%;position:relative;z-index:1;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.orbit-row li{flex:0 0 78px;scroll-snap-align:start}
.orbit-row a{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;font-size:11.5px;font-weight:600;
  line-height:1.25;color:var(--ink);text-decoration:none;padding:4px 2px;border-radius:10px}
.orbit-row a:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.orbit-row img{width:48px;height:48px;border-radius:50%;box-shadow:0 3px 8px rgba(6,40,30,.18)}
.orbit-hint{position:relative;z-index:1;margin:2px 0 0;font-size:12px;color:var(--muted);text-align:center}
@media (max-width:1200px){.orbit-stage{--k:.88}}
@media (max-width:1060px){.orbit-stage{--k:.78}}
@media (max-width:960px){.orbit-stage{--k:.7}}
/* both rings are Rashad's (dashed, green) since 2026-11-16. The ring label of the phone rows (.orbit-row-h) shows on
   phones only. */
.orbit-row-h{display:none;position:relative;z-index:1;margin:8px 0 0;font-size:12.5px;font-weight:700;color:var(--muted);align-self:flex-start}
@media (max-width:900px){
  /* phones: both rings stay (smaller), with the two named rows under Rashad */
  .orbit-stage{--k:1;--fig-h:226px;--r1:min(118px,calc(50vw - 70px));--r2:min(176px,calc(50vw - 30px));--l1:36px;--l2:32px;height:272px}
  .orbit-fig{bottom:30px}
  .ring{top:calc(16px + var(--fig-h) * .6)}
  .orbit-bubble{top:0;inset-inline-start:auto;inset-inline-end:0;max-width:44%;padding:7px 10px;font-size:12px}
  .orbit-bubble b{font-size:12.5px}
  .orbit-bubble::after{inset-inline-start:auto;inset-inline-end:22px}
  .orbit-row,.orbit-row-h{display:flex}}
/* fit (2026-10-24): on screens wider than a phone the stage fills the brand panel, whose height follows the screen
   (hub/templates/hub/entry.html); figure, rings and logos scale from the panel (container units): height-bound on
   laptops, width-bound in a narrow column. The rings are centred on the body (--cy). */
@media (min-width:901px){
  .entry-brand .orbit-stage{position:absolute;inset:0;height:auto;--cy:46%;
    --fig-h:min(calc(76cqh - 8px),calc(100cqw / 1.62),560px);
    --r1:calc(var(--fig-h) * .52);--r2:calc(var(--fig-h) * .73);
    --l1:max(34px,calc(var(--fig-h) * .15));--l2:max(30px,calc(var(--fig-h) * .13))}
  .entry-brand .orbit-fig{top:calc(var(--cy) - var(--fig-h) * .6);bottom:auto}
  .entry-brand .ring{top:var(--cy)}
  .entry-brand .orbit-bubble{top:8px;inset-inline-start:calc(50% + var(--fig-h) * .22);
    max-width:min(250px,calc(50% - var(--fig-h) * .22 - 10px))}
  .entry-brand .orbit-toggle{top:8px;bottom:auto;inset-inline-end:auto;inset-inline-start:8px}}
@media (prefers-reduced-motion:reduce){.orbit-spin,.orbit-face,.orb{animation:none !important}.orbit-toggle{display:none}
  .orb,.orbit-bubble{transition:none}}
