/* ==========================================================================
   HYBRD — case-study pages (oakley, rhode, four-seasons, feisty, pretty, unstaged)

   Framer builds each case study as a free composition on a 1512 px canvas: a centred title,
   text blocks and images placed by hand, the closing lines, then the footer. The rebuild keeps
   every block where Framer put it:
     ≥ 1512 px   Framer's own constraints: each block is pinned left, right or to the centre
                 (data-pin) at its Framer distance; fonts at Framer's size.
     901–1511    the 1512 composition scaled down as a whole (on Framer these widths cut the
                 right-hand blocks off).
     ≤ 900       the blocks stack in reading order — keep the DOM in top-to-bottom order.

   Page:   <main class="cs-main theme-dark"><div class="cs-canvas" style="--ch:3057"> … </div></main>
           --ch = the canvas height (Framer's page height minus the footer).
   Block:  <div class="cs-block" data-pin="left" style="--y:834; --x:451; --w:360"> … </div>
           <figure class="cs-media" data-pin="right" style="--y:861; --r:198; --w:413; --h:551"><img …></figure>
     --y top · --w width · --h height (media) · --x left (pin left) · --r right (pin right)
     --c offset of the block's centre from the canvas centre (pin centre; 0 = centred)
     All in canvas px, written without a unit. Text sizes: the canvas font-size is Framer's 16 px;
     other sizes are set in em on the element (20 px = 1.25em) so they scale with the canvas.
   ========================================================================== */

.cs-main { container-type: inline-size; background: var(--c-black); color: var(--c-white); }

.cs-canvas {
  --u: 1px;                                   /* one canvas px */
  position: relative;
  height: calc(var(--ch) * var(--u));
  font: 400 calc(16 * var(--u))/1.4 var(--f-body);     /* Framer: Inter 16 / 22.4 */
}
@media (min-width: 901px) and (max-width: 1511px) {
  .cs-canvas { --u: calc(100cqw / 1512); }
}

.cs-canvas > * { position: absolute; top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); margin: 0; }
.cs-canvas > [data-pin="left"]   { left: calc(var(--x) * var(--u)); }
.cs-canvas > [data-pin="right"]  { right: calc(var(--r) * var(--u)); }
.cs-canvas > [data-pin="center"] { left: calc(50% + (var(--c, 0) - var(--w) / 2) * var(--u)); }

/* Title: Clash Display 56 / 67.2, −2.8 px tracking */
.cs-title { font: 700 3.5em/1.2 var(--f-display); letter-spacing: -.05em; text-align: center; white-space: nowrap; }

/* Text blocks: "01__Label" in Inter 900, lines in Inter 400; .cs-loose = Framer's 28.8 px leading */
.cs-block p { margin: 0; }
.cs-label { font-weight: 900; }
.cs-bold  { font-weight: 700; }
.cs-loose { line-height: 1.8; }
.cs-block b, .cs-block strong { font-weight: 900; }   /* Framer <strong> = Inter 900 */
.cs-title strong { font-weight: inherit; }
.cs-center { text-align: center; }

/* Media: fixed box, the image or video fills it (cover) or fits inside (.cs-media--contain) */
.cs-media { height: calc(var(--h) * var(--u)); overflow: hidden; }
.cs-media > img, .cs-media > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-media--contain > img, .cs-media--contain > video { object-fit: contain; }
.cs-media--fill > img, .cs-media--fill > video { object-fit: fill; }
/* Framer crops some media with a smaller frame: the figure is the frame, the media keeps its own box inside */
.cs-media--crop > img, .cs-media--crop > video {
  position: absolute; left: calc(var(--ix) * var(--u)); top: calc(var(--iy) * var(--u));
  width: calc(var(--iw) * var(--u)); height: calc(var(--ih) * var(--u)); max-width: none;
}

/* ── Phone: one column in reading order ─────────────────────────────── */
@media (max-width: 900px) {
  .cs-canvas {
    height: auto; font-size: 16px;
    display: flex; flex-direction: column; gap: var(--s-4);
    padding: calc(var(--header-h) + var(--s-3)) var(--gutter) var(--s-5);
  }
  .cs-canvas > * { position: static; width: auto; }
  .cs-title { font-size: 40px; align-self: center; white-space: normal; }
  .cs-media { height: auto; aspect-ratio: var(--w) / var(--h); }
  .cs-media--crop > img, .cs-media--crop > video { position: static; width: 100%; height: 100%; object-fit: cover; }
  .cs-canvas > [data-pin="center"] { align-self: center; }
  /* Framer keeps a label and its lines in separate boxes: consecutive text blocks read as one group */
  .cs-block + .cs-block { margin-top: calc(var(--s-2) - var(--s-4)); }
}
