/* ============================================================
   B4B GLOBAL EDGE · Client Results (v2)
   Layers on top of edge.css + homepage-v2.css (same reveal system).
   Only loaded by client-results.html.
   ============================================================ */

/* ============================================================
   1 · HEADER OVERRIDE
   The page opens straight into the hero below, but that hero is this
   page's own full-bleed photo rather than the misty gradient used on
   What We Do, so no header contrast fix is needed here (the header's
   always-white nav already reads fine over a dark photo).
   ============================================================ */

/* ============================================================
   2 · HERO · full-bleed photo, slow Ken Burns drift, immediate proof
   ============================================================ */
.cr-hero{position:relative; min-height:100svh; overflow:hidden; background:var(--forest); display:flex}
.cr-hero .bg{position:absolute; inset:0; z-index:0; overflow:hidden}
.cr-hero .bg img{
  width:100%; height:100%; object-fit:cover; display:block;
  object-position:67% 35%; /* keep the speaker's face in frame on narrow screens */
  transform:scale(1.08); animation:crDrift 20s ease-in-out infinite alternate;
}
@keyframes crDrift{to{transform:scale(1.16) translate(-1.5%,-1.5%)}}
.cr-hero .scrim{
  position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(9,18,15,.6) 0%, rgba(9,18,15,.5) 32%, rgba(9,18,15,.62) 60%, rgba(9,18,15,.92) 100%);
}
.cr-hero .wrap{
  position:relative; z-index:2; width:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  text-align:center; flex:1; padding:clamp(7rem,14vh,10rem) var(--pad) clamp(3.5rem,9vh,6.5rem);
}
.cr-hero .v2-label{color:var(--sage)}
.cr-hero h1{
  max-width:20ch; margin:1rem 0 0; color:var(--paper);
  text-shadow:0 2px 40px rgba(6,14,11,.6);
}
.cr-hero .lede{margin:1.4rem auto 0; max-width:52ch; color:rgba(255,255,255,.88); text-align:center}

/* the two headline stats: shown immediately under the lede, so the page
   opens with proof rather than a claim */
.cr-hero-stats{
  display:flex; flex-wrap:wrap; justify-content:center; gap:clamp(2rem,6vw,5rem);
  margin-top:clamp(2.2rem,5vw,3.2rem);
}
/* deliberately not reusing edge.css's own ".stat" here: that component is
   styled as a solid dark card (background:var(--forest-2)), which reads as
   an odd filled box rather than plain text sitting over the hero photo */
.cr-hero-stats .cr-stat{text-align:center}
.cr-hero-stats .cr-stat b{
  display:block; font-family:var(--disp); font-weight:var(--w-medium); line-height:1;
  font-size:clamp(2.4rem,5vw,3.6rem); color:var(--paper);
}
.cr-hero-stats .cr-stat span{
  margin-top:.5rem; display:block; color:rgba(255,255,255,.78);
  font-size:var(--fs-copy);
}

/* ============================================================
   3 · CASE STUDIES · two full-screen sections, one under the other.
   Each is split 50/50 between photo and copy; .cr-case-flip swaps the
   sides (photo right, copy left). .cr-results is a light section.
   ============================================================ */
.cr-results{background:var(--cream); color:var(--ink-l)}
.cr-case{display:flex; min-height:100svh}
.cr-case-flip{flex-direction:row-reverse}
.cr-case-media{position:relative; width:50%; overflow:hidden; background:var(--forest-2)}
.cr-case-media img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block}
.cr-case-copy{
  width:50%; display:flex; flex-direction:column; justify-content:center;
  padding:clamp(3rem,8vw,6rem) clamp(2rem,6vw,6rem);
}
.cr-case-copy .where{margin-top:1.1rem; color:var(--mut-l); line-height:1.4; font-size:var(--fs-copy)}
.cr-case-copy .result-kicker{margin-top:1.8rem; display:block; color:var(--haze)}
.cr-case-copy .result{
  display:block; margin-top:.7rem; font-family:var(--disp); font-weight:var(--w-book);
  font-size:clamp(1.9rem,3.8vw,3.1rem); line-height:1.14; color:var(--ink-l); max-width:15ch;
}
.cr-case-copy .note{margin-top:1rem; color:var(--mut-l); max-width:36ch; font-size:var(--fs-copy)}
.cr-case-copy .tlink{margin-top:1.8rem; color:var(--deep); font-weight:var(--w-medium); display:inline-block; align-self:flex-start}
.cr-case-copy .tlink:hover{color:var(--teal)}
@media (max-width:900px){
  /* too narrow for a 50/50 split: photo on top, copy beneath, in both cases */
  .cr-case, .cr-case-flip{flex-direction:column}
  .cr-case-media, .cr-case-copy{width:100%}
  .cr-case-media{height:44svh; flex:none}
  .cr-case-copy{padding:2rem clamp(1.5rem,6vw,2.5rem) 3rem}
}

/* ============================================================
   EXPLORE TRANSITION (Dojo &rarr; its v2 story page) &middot; mirrors
   what-we-do-v2.css's .wwd-explore-clone pattern exactly: the clicked
   card's photo grows to fill the screen while the rest of the page
   dissolves, then the browser navigates.
   ============================================================ */
.cr-explore-clone{
  position:fixed; z-index:55; margin:0; object-fit:cover; will-change:left, top, width, height;
}
body.is-transitioning > section,
body.is-transitioning > footer{
  opacity:0 !important; transition:opacity .35s ease;
}

/* ============================================================
   PAGE TRANSITIONS &middot; arriving back here (the crumb link on a story
   page, or the browser's own Back) crossfades between the two pages,
   matching the fade already used between What We Do and its service
   pages. Explore's own outgoing navigation skips this (see the
   pageswap listener in client-results-v2.js), so the two never overlap.
   ============================================================ */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
}
::view-transition-old(root),
::view-transition-new(root){animation-duration:.4s; animation-timing-function:ease}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:760px){
  .cr-hero-stats{gap:2.4rem}
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion:reduce){
  .cr-hero .bg img{animation:none !important; transform:scale(1.02)}
}

/* the Outlaw House mark is a tall stacked lockup with fine detail, so it needs to run larger than other client logos */
.cr-case-copy .client-logo.is-outlaw{height:160px}
@media (max-width:900px){ .cr-case-copy .client-logo.is-outlaw{height:104px} }

/* grey image placeholder on the hub, swapped for a real photograph when supplied */
.cr-case-media .cr-ph, .post-thumb .cr-ph{
  position:absolute; inset:0; background:#9AA19F; display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:var(--fs-label); letter-spacing:var(--ls-label);
  text-transform:uppercase; font-weight:var(--w-medium); color:rgba(255,255,255,.85);
}
.post-thumb:has(.cr-ph){position:relative}
