/* =========================================================
   MAKE A HOME LLC — the crew (styles for assets/js/crew.js)
   ---------------------------------------------------------
   The little workers from the logo: the footer crew, the pop-up
   cameos, the "Start your project" button helper and the workers
   placed in the pages with data-crew="…". Nothing here does
   anything until crew.js adds the workers, and none of it can
   catch clicks or move the page layout (it all floats on top of
   the page).
   1. (The home page intro has its own styles: intro.css)
   2. Shared: logo pieces placed over the page
   3. Footer crew
   4. Pop-up cameos (and the section boxes workers are placed in)
   5. Button helper
   6. Workers in the pages
   ========================================================= */

:root { --crew-css: 2; }   /* crew.js checks this: without these styles it shows no workers at all */

/* ---------- 1. HOME PAGE INTRO ----------
   It has its own files now: assets/css/intro.css and assets/js/intro.js. */

/* ---------- 2. SHARED: LOGO PIECES PLACED OVER THE PAGE ---------- */
.crew-rig { position: absolute; left: 0; top: 0; pointer-events: none; user-select: none; -webkit-user-select: none; }
/* (margin: 0 and max-width: none keep page rules such as ".footer__brand img" off the pieces) */
.crew-rig .crew-part { position: absolute; display: block; max-width: none; margin: 0; pointer-events: none; -webkit-user-drag: none; }
/* Dust and sawdust specks */
.crew-speck { position: absolute; display: block; border-radius: 50%; pointer-events: none; opacity: 0; }
/* A clipping box: the worker slides up from (and back down behind) its bottom edge */
.crew-pop { position: absolute; overflow: hidden; pointer-events: none; z-index: 2; contain: layout paint; }
.crew-actor { position: absolute; display: block; width: 0; height: 0; }
/* Hammer sparks: three short cyan lines that flash at each hit */
.crew-spark { position: absolute; display: block; width: 0; height: 0; opacity: 0; color: var(--cyan); pointer-events: none; }
.crew-spark i {
  position: absolute; display: block; left: -1px; bottom: 2px; width: 2px; height: var(--s, 6px);
  background: currentColor; border-radius: 1px; transform-origin: 50% calc(100% + 2px);
}
/* The walking beam carrier (body + two legs, each a cut-out copy of the same picture) */
.crew-walk { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.crew-walk__turn, .crew-walk__bob, .crew-walk__piece { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.crew-walk__turn { transform-origin: 50% 100%; }
.crew-walk__piece img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; -webkit-user-drag: none; }

/* ---------- 3. FOOTER CREW ----------
   The rebuilt logo sits exactly on top of the original picture. The picture keeps its
   place (no layout change) and stays readable for screen readers; it's only made
   invisible once every piece of the rebuilt logo has loaded. */
.crew-footer-brand { position: relative; }
.crew-footer-logo { z-index: 1; visibility: hidden; }
.crew-footer-live .crew-footer-logo { visibility: visible; }
.crew-footer-live > img { opacity: 0; }

/* ---------- 4. POP-UP CAMEOS ---------- */
.crew-host { position: relative; }   /* the section a worker is placed in (only added to sections that weren't positioned) */
.crew-track { z-index: 2; }          /* the strip the beam carrier walks along */

/* ---------- 5. BUTTON HELPER ----------
   He sits in a clipping box just above the button's top (border) edge; when the button shows its
   keyboard focus ring, he stands on top of the ring instead of covering it (sizes set by crew.js). */
.crew-helper-host { position: relative; }
.crew-helper { bottom: calc(100% + var(--crew-bt, 0px)); display: block; transition: bottom .15s ease; }
.crew-helper-host:focus-visible > .crew-helper { bottom: calc(100% + var(--crew-bt, 0px) + var(--crew-ring, 6px)); }

/* ---------- 6. WORKERS IN THE PAGES (data-crew="…" attributes) ----------
   crew.js puts each one in a small box on the edge of its element; the box's bottom is the
   line he stands on (anything below it is cut off). It floats over the page, so nothing moves. */
.crew-spot { z-index: 2; }
.crew-spot .crew-actor { will-change: transform; }

/* White workers standing over the banner photos get a soft shadow, so they stay easy to see
   even when the photo behind them is light (e.g. white marble). */
.hero .crew-pop img, .page-hero .crew-pop img { filter: drop-shadow(0 1px 1.5px rgba(11, 13, 14, .65)); }
