/* =========================================================================
   RISHØJ & DE LORENZO — the brand frame

   One frame, identical for every brand. It is defined here and nowhere else:
   if the shape of a brand image needs to change, it changes on this line and
   on the matching value in content/brands.json — never per brand, never in a
   page. There is no layout in this file; that comes later.

   Not yet loaded by any page.
   ========================================================================= */

:root{
  --brand-frame-ratio: 4 / 5;     /* must match frame.aspect in brands.json  */
  --brand-frame-max:   640px;     /* THE frame ceiling, everywhere it appears */
  --brand-focal:       50%;       /* per brand, from heroFocal               */
}

/* heroFocal -> object-position. The build already crops to the focal point,
   so this only matters if a source is ever served uncropped. */
[data-focal="top"]    { --brand-focal: 0%   }
[data-focal="center"] { --brand-focal: 50%  }
[data-focal="bottom"] { --brand-focal: 100% }

.bframe{
  position:relative;
  width:100%;
  max-width:var(--brand-frame-max);
  aspect-ratio:var(--brand-frame-ratio);
  overflow:hidden;
  background:var(--bg-plate);
}

/* Mobile: full width less the page margin on each side. --shell is the site's
   own gutter token, so the frame stays in step with everything else. */
@media (max-width:720px){
  .bframe{ max-width:calc(100vw - 2 * var(--shell)) }
}

.bframe img{
  width:100%; height:100%;
  object-fit:cover;                          /* never pad, never letterbox */
  object-position:50% var(--brand-focal);
  display:block;
}

/* Motion contract.
   Brand images may be translated on scroll. They may NOT be scaled: several
   sources have no crop headroom, so the 4:5 crop already uses every pixel of
   the original and scaling up would pull the frame edge into view. The build
   reports headroom per brand — treat anything near 0% as untouchable.
   Use translate on this element, and nothing else. */
.bframe__move{
  position:absolute; inset:0;
  will-change:transform;
  /* transform: translate3d(0, Npx, 0)  — translate only. No scale(). */
}
