/* I MADE A BUG: perches for the autonomous Glitch Bug on the homepage (gb-zones.js reads them). Each anchor is an invisible, absolutely
   positioned box (no layout shift, no pointer events, never painted): its CENTRE is where the Bug stands and its HEIGHT is the Bug's size
   there. left = % of the section width, top = px from the section top. A perch that is not set at a breakpoint (no --s) is not used; one
   whose footprint would overlap text, buttons, project imagery or the footer is rejected at runtime (the free-space check), so the
   in-between widths stay safe. Same anchors in the EN and PT pages. */
.bug-perch { position: absolute; display: block; visibility: hidden; pointer-events: none; left: var(--x, 50%); top: var(--y, 0); width: var(--s, 0px); height: var(--s, 0px); margin: calc(var(--s, 0px) / -2) 0 0 calc(var(--s, 0px) / -2); }
html.roam-away .bug-hit { pointer-events: none; }                      /* the Bug is elsewhere: the hero's invisible keyboard button must not catch mouse clicks */

/* desktop: the free gutters beside headings and the services grid */
[data-bug-perch="hero-l"] { --x: 19%; --y: 300px; --s: 190px; } [data-bug-perch="hero-r"] { --x: 81%; --y: 300px; --s: 190px; }
[data-bug-perch="hero-ll"] { --x: 14%; --y: 640px; --s: 150px; } [data-bug-perch="hero-rr"] { --x: 86%; --y: 640px; --s: 150px; }
[data-bug-perch="work-head-l"] { --x: 18%; --y: 104px; --s: 120px; } [data-bug-perch="work-head-r"] { --x: 82%; --y: 104px; --s: 120px; }
[data-bug-perch="work-gut-l"] { --x: 4.6%; --y: 520px; --s: 96px; } [data-bug-perch="work-gut-r"] { --x: 95.4%; --y: 520px; --s: 96px; }
[data-bug-perch="svc-head-l"] { --x: 17%; --y: 190px; --s: 150px; } [data-bug-perch="svc-head-r"] { --x: 83%; --y: 190px; --s: 150px; }
[data-bug-perch="svc-gut-l"] { --x: 6.7%; --y: 560px; --s: 110px; } [data-bug-perch="svc-gut-r"] { --x: 93.3%; --y: 560px; --s: 110px; }
[data-bug-perch="teaser-l"] { --x: 20%; --y: 250px; --s: 170px; } [data-bug-perch="teaser-r"] { --x: 80%; --y: 250px; --s: 170px; }
[data-bug-perch="contact-l"] { --x: 17%; --y: 170px; --s: 160px; } [data-bug-perch="contact-r"] { --x: 83%; --y: 170px; --s: 160px; }
[data-bug-perch="contact-bl"] { --x: 8%; --y: 380px; --s: 120px; }

/* tablet: reduced range, smaller scale (only the side spaces that still fit) */
@media (max-width: 1100px) {
  [data-bug-perch="hero-l"] { --x: 11%; --y: 280px; --s: 120px; } [data-bug-perch="hero-r"] { --x: 89%; --y: 280px; --s: 120px; }
  [data-bug-perch="hero-ll"] { --x: 9%; --y: 560px; --s: 100px; } [data-bug-perch="hero-rr"] { --x: 91%; --y: 560px; --s: 100px; }
  [data-bug-perch="work-head-l"] { --x: 7%; --y: 44px; --s: 80px; } [data-bug-perch="work-head-r"] { --x: 93%; --y: 44px; --s: 80px; }
  [data-bug-perch="work-gut-l"], [data-bug-perch="work-gut-r"] { --s: 0px; }
  [data-bug-perch="svc-head-l"] { --x: 8%; --y: 190px; --s: 96px; } [data-bug-perch="svc-head-r"] { --x: 92%; --y: 190px; --s: 96px; }
  [data-bug-perch="svc-gut-l"], [data-bug-perch="svc-gut-r"] { --s: 0px; }
  [data-bug-perch="teaser-l"] { --x: 10%; --y: 240px; --s: 110px; } [data-bug-perch="teaser-r"] { --x: 90%; --y: 240px; --s: 110px; }
  [data-bug-perch="contact-l"] { --x: 9%; --y: 150px; --s: 100px; } [data-bug-perch="contact-r"] { --x: 91%; --y: 150px; --s: 100px; }
  [data-bug-perch="contact-bl"] { --s: 0px; }
}

/* mobile: the hero (beside the stage) and a small pocket at the top corner of a few sections */
@media (max-width: 760px) {
  [data-bug-perch="hero-l"] { --x: 14%; --y: 250px; --s: 100px; } [data-bug-perch="hero-r"] { --x: 88%; --y: 250px; --s: 100px; }
  [data-bug-perch="hero-ll"], [data-bug-perch="hero-rr"] { --s: 0px; }
  [data-bug-perch="work-head-l"] { --s: 0px; } [data-bug-perch="work-head-r"] { --x: 88%; --y: 40px; --s: 70px; }
  [data-bug-perch="work-gut-l"], [data-bug-perch="work-gut-r"] { --s: 0px; }
  [data-bug-perch="svc-head-l"] { --s: 0px; } [data-bug-perch="svc-head-r"] { --x: 88%; --y: 38px; --s: 70px; }
  [data-bug-perch="svc-gut-l"], [data-bug-perch="svc-gut-r"] { --s: 0px; }
  [data-bug-perch="teaser-l"] { --s: 0px; } [data-bug-perch="teaser-r"] { --x: 88%; --y: 110px; --s: 76px; }
  [data-bug-perch="contact-l"] { --s: 0px; } [data-bug-perch="contact-r"] { --x: 88%; --y: 36px; --s: 70px; }
  [data-bug-perch="contact-bl"] { --s: 0px; }
}
