/* ============================================================
   Case studies as a bento (Liam, October 13, 2026: "yes make the row
   change on the bento and lets dpeloy it"). Ten cells since October 25,
   2026 (Eight Station and 044 Bureau), one per case, placed by their order
   in this.raw (nine from November 3, ten again since November 9, 2026 with Home
   Gym Builds): p1 big, p2 tall, p9 and p10 wide, the rest square. Ten cells cannot fill three rows of four, so the grid is
   four rows and the last one sits under the fold of a 900px window. p7 was
   the wide cell while there were seven. The logo badge and the result
   figure are the site's own .case-logo and .case-big from two-suns-home.css, so
   they follow the display face; this file only sizes them per cell.
   Study: _scratch/case-mockups.html. Script: assets/case-bento.js.
   ============================================================ */
.cx-host{position:relative;width:100%;max-width:calc(var(--shell) + 2 * var(--gutter));margin:0 auto;padding:0 var(--gutter)}

.cx-bento{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-areas:"p1 p1 p2 p3" "p1 p1 p2 p4" "p5 p6 p7 p8" "p9 p9 p10 p10";
  /* three rows that, with the heading, fit a 900px-tall window: the height left under the
     heading and the nav, split three ways. Never under 200px, where the small cells' text
     starts to touch, and never over the mockup's 298px */
  grid-auto-rows:clamp(200px,20.6vw,298px);
  grid-auto-rows:clamp(200px,min(20.6vw,calc((100svh - 330px) / 3)),298px)}

.cx-cell{position:relative;display:block;overflow:hidden;isolation:isolate;border:1px solid var(--line);border-radius:var(--r-card);
  background:var(--bg-c);color:var(--ink);text-decoration:none;transition:border-color var(--dur-2) var(--ease)}
.cx-cell:hover{border-color:rgba(237,233,225,.32)}

/* the footage: grey and still at rest, colour on the one awake cell. The grey is
   baked into X-grey.webp (uploads/cases-bg/make-grey.py) and laid over each clip by
   case-bento.js, which marks the cell's .cx-m with data-g once they have loaded:
   as a CSS filter on the footage, Firefox redrew it every frame while the page
   scrolled (Case Studies 46fps with it, 62 without, October 14, 2026). The filter
   below stays the look until then, and wherever a grey fails to load. */
.cx-m{position:absolute;inset:0;overflow:hidden;filter:saturate(.15) brightness(.42);transform:scale(1.03);
  transition:filter 1.3s var(--ease),transform 2s var(--ease)}
.cx-m[data-g]{filter:none;transition:transform 2s var(--ease)}
.cx-cell[data-on] .cx-m{filter:none;transform:scale(1)}
.cx-m video,.cx-m img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
/* each cell's still for a reader without scripts, in a <noscript> beside .cx-m, in the
   resting grey. Once scripts run a <noscript> is never drawn or fetched. */
.cx-ns{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.15) brightness(.42)}
.cx-m .cx-g{z-index:1;transition:opacity 1.3s var(--ease)}
.cx-cell[data-on] .cx-g{opacity:0}
.cx-cell[data-screen="ai-video"] :is(video,.cx-g,.cx-ns){object-position:72% 42%}
.cx-cell[data-screen="bustem"] :is(video,.cx-g,.cx-ns){object-position:70% 58%}
.cx-cell[data-screen="washtech"] :is(video,.cx-g,.cx-ns){object-position:50% 45%}
.cx-cell[data-screen="aetherhaus"] :is(video,.cx-g,.cx-ns){object-position:50% 32%}
.cx-cell[data-screen="044-bureau"] :is(video,.cx-g,.cx-ns){object-position:50% 40%}
/* Collabstr: its marketplace as a wall of creator videos, three columns at different
   speeds, the middle one running down, tiles in three shapes (the case card of October 12,
   2026; three columns and fourteen scenes October 24; the niche and city labels left
   October 25). It drifts only while the cell is awake. */
.cx-wall{display:flex;gap:6px;padding:0 8px;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 12%,#000 88%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0,#000 12%,#000 88%,transparent 100%)}
.cx-wall-col{flex:1;min-width:0}
.cx-wall-track{display:flex;flex-direction:column;gap:6px;animation:cx-up var(--dur) linear infinite;animation-play-state:paused;will-change:transform}
.cx-wall-track.is-down{animation-direction:reverse}
.cx-cell[data-on] .cx-wall-track{animation-play-state:running}
@keyframes cx-up{to{transform:translateY(calc(-50% - 3px))}}
.cx-tile{position:relative;margin:0;aspect-ratio:var(--ar,9/16);border-radius:10px;overflow:hidden;border:1px solid rgba(237,233,225,.12);background:var(--bg-b)}
.cx-tile :is(video,.cx-g){object-position:var(--pos,50% 30%)}
/* Collabstr's wall is busier than one film, so the badge and creds get a deeper shade over it */
.cx-cell:has(.cx-wall) .cx-shade{background:linear-gradient(to top,rgba(12,11,10,.94) 0%,rgba(12,11,10,.6) 30%,rgba(12,11,10,0) 60%),
  linear-gradient(to bottom,rgba(12,11,10,.85) 0%,rgba(12,11,10,.5) 18%,rgba(12,11,10,0) 34%)}
.cx-stills img:not(.cx-g){opacity:0;filter:brightness(.8) contrast(1.06);transform:scale(1.04);transition:opacity var(--dur-3) var(--ease),transform 6s linear}
.cx-stills img.cur{opacity:1;transform:scale(1)}

.cx-shade{position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(to top,rgba(12,11,10,.94) 0%,rgba(12,11,10,.6) 30%,rgba(12,11,10,0) 60%),
             linear-gradient(to bottom,rgba(12,11,10,.6) 0%,rgba(12,11,10,0) 28%)}
.cx-grain{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:.07;background-size:180px 180px;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E")}

.cx-in{position:relative;z-index:3;display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:clamp(16px,1.6vw,26px)}
.cx-top{display:flex;align-items:center;gap:var(--s-3);flex-wrap:wrap}

/* the site's badge, one step smaller in every cell but the big one */
.cx-cell:not(.xl) .case-name{font-size:var(--t-6)}

.cx-creds{margin:0;font-size:var(--t-7);font-weight:500;line-height:1.3;color:var(--ink-2);
  text-shadow:0 1px 14px rgba(12,11,10,.95),0 0 2px rgba(12,11,10,.6)}
.cx-creds span{white-space:nowrap}
.cx-creds span + span::before{content:"";display:inline-block;width:3px;height:3px;margin:0 10px;border-radius:50%;
  background:var(--quiet);vertical-align:middle;transform:translateY(-2px)}
.cx-cell .cx-creds{flex-basis:100%}
.cx-cell.xl .cx-creds{flex-basis:auto;padding-left:var(--s-3);border-left:1px solid var(--edge-3);font-size:var(--t-6)}
.cx-cell.square .cx-creds,.cx-cell.wide .cx-creds{display:none}

/* the figure is .case-big; only its size changes per cell */
.cx-cell .case-big{font-size:clamp(44px,4.1vw,62px)}
.cx-cell .case-big.is-long{font-size:clamp(36px,3.3vw,50px)}
.cx-cell.tall .case-big{font-size:clamp(58px,6vw,96px)}
.cx-cell.xl .case-big{font-size:var(--t-figure);font-size:min(var(--t-figure),14svh)}
.cx-line{margin:8px 0 0;max-width:20ch;font-size:var(--t-6);font-weight:500;line-height:1.14;letter-spacing:-.02em;color:var(--ink-2);text-wrap:balance}
.cx-cell.square .cx-line,.cx-cell.wide .cx-line{font-size:var(--t-7);line-height:1.2}
.cx-cell.xl .cx-line{max-width:17ch;font-size:var(--t-4);line-height:1.06;letter-spacing:-.03em;color:var(--ink)}
.cx-foot{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s-4)}

/* the site's Read the case button (.frame in assets/nav.css), on a frosted ground over the
   footage; on hover its corners close into a frame and the ground stays */
.cx-cell .case-read{background-color:rgba(12,11,10,.78);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
/* Firefox redraws this blur on every frame of the footage under it (see the nav's glass in
   two-suns-nav.css, October 25, 2026): there the label takes a deeper tint with no blur */
@supports (-moz-appearance:none){
  .cx-cell .case-read{-webkit-backdrop-filter:none;backdrop-filter:none;background-color:rgba(12,11,10,.9)}
}
.cx-arr{position:absolute;z-index:3;top:clamp(18px,1.9vw,30px);right:clamp(18px,1.9vw,30px);width:42px;height:42px;display:grid;place-items:center;
  border:1px solid var(--edge-3);border-radius:50%;font-size:16px;opacity:0;transform:translate(-6px,6px);transition:opacity var(--dur-2) var(--ease),transform var(--dur-2) var(--ease)}
.cx-cell:hover .cx-arr{opacity:1;transform:none}

@media (max-width:900px){
  .cx-bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(220px,52vw,320px);
    grid-template-areas:"p1 p1" "p1 p1" "p2 p3" "p2 p4" "p5 p6" "p7 p8" "p9 p10"}
  .cx-cell .cx-creds{display:none}
  .cx-cell.xl .cx-creds{display:block}
  .cx-cell.xl .case-big{font-size:clamp(72px,16vw,128px)}
}
@media (max-width:560px){
  .cx-bento{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;grid-template-areas:"p1" "p2" "p3" "p4" "p5" "p6" "p7" "p8" "p9" "p10"}
  .cx-cell{aspect-ratio:5/4}
  .cx-cell.xl,.cx-cell.tall{aspect-ratio:4/5}
  .cx-cell .case-big{font-size:clamp(52px,15vw,68px)}
  .cx-cell.xl .case-big{font-size:clamp(64px,19vw,88px)}
  .cx-cell.xl .cx-foot{flex-direction:column;align-items:flex-start}
  .cx-cell.xl .cx-creds{border-left:0;padding-left:0;flex-basis:100%;font-size:var(--t-7)}
  .cx-cell.xl .cx-shade{background:linear-gradient(to top,rgba(12,11,10,.94) 0%,rgba(12,11,10,.6) 30%,rgba(12,11,10,0) 60%),
    linear-gradient(to bottom,rgba(12,11,10,.85) 0%,rgba(12,11,10,0) 36%)}
  .cx-arr{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
  .cx-m,.cx-stills img,.cx-m .cx-g{transition:none}
  .cx-wall-track{animation:none}
}

/* ------------------------------------------------------------
   The bento's client logos, here so a landing page's bento shares them
   (assets/landing.css, the technical SEO services page, October 25, 2026).
   The homepage export still carries the same block inline until it is
   re-cut (DESIGN.md debt 1); the two must not drift.
   ------------------------------------------------------------ */
/* Client logos (Liam, October 24, 2026: the coloured chips "look like shit" and do not flow with the brand; of two options
   he picked the bracketed one). Each client's real logo, mark and name in one piece where it has both, inked in the site's
   cream through its own alpha (the element carries the mask image), so the footage carries the colour. Each logo has its
   own height so all eight read the same size; the big cell is 1.35x. The Frame button's four corner ticks (.frame in
   assets/nav.css) hold it at one height and run along the edges into a full frame while the cell is awake, the same move
   as the button's hover. */
.cx-cell .case-logo .case-badge{--c:rgba(237,233,225,.55);height:48px;min-width:0;padding:0 15px;border:0;border-radius:0;
  background-color:rgba(18,17,16,.35);
  background-image:linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),
                   linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c));
  background-repeat:no-repeat;
  background-position:left top,left top,right top,right top,left bottom,left bottom,right bottom,right bottom;
  background-size:var(--frame-t) 1px,1px var(--frame-t),var(--frame-t) 1px,1px var(--frame-t),
                  var(--frame-t) 1px,1px var(--frame-t),var(--frame-t) 1px,1px var(--frame-t);
  transition:--frame-t var(--dur-2) var(--ease,cubic-bezier(.22,1,.36,1)),background-color var(--dur-2) var(--ease,cubic-bezier(.22,1,.36,1));}
.cx-cell.xl .case-logo .case-badge{height:64px;padding:0 20px;}
.cx-cell[data-on] .case-logo .case-badge{--frame-t:51%;background-color:rgba(237,233,225,.05);}
.cx-cell .case-logo .case-badge > div{height:var(--lh,18px);width:auto;aspect-ratio:var(--ar,1);opacity:1;filter:none;background:var(--ink);
  -webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:left center;mask-position:left center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;}
.cx-cell.xl .case-logo .case-badge > div{height:calc(var(--lh,18px) * 1.35);}
.case-badge > div[style*="collabstr-logo"]{--lh:22px;}
.case-badge > div[style*="bustem-logo"]{--lh:17px;}
.case-badge > div[style*="washtech-lockup"]{--lh:28px;}
.case-badge > div[style*="aetherhaus-logo"]{--lh:15px;}
.case-badge > div[style*="butchers-hook-lockup"]{--lh:24px;}
.case-badge > div[style*="tenmar-logo"]{--lh:24px;}
.case-badge > div[style*="reyal-logo"]{--lh:17px;}
