/* /demo4 ACTIVITIES chapter — owned by its Block 3 lane. Palette values from docs/ops/DESIGN.md only:
   Ink #0A0A0A · Bone #EDE7D8.  Each card's --hue is written by the page from the same palette.

   bt020 L9 (row Y) — the five hero cards live in the MIDDLE band: under the header carousel and above the door,
   clear of the routes the camera frames (the SoCal web sits in the lower half at every width).  --bandB is the
   carousel band's own foot, the same expression demo3.css gives .mb4v-band (top + 1.12 x --f), so it measures
   216 / 177 / 147 / 109 / 129 px at 2560 / 1728 / 1440 / 1024 / 390 and can never drift from it.
   Names: Bone on a deep Ink foot, never blended, never filtered (the photograph dims, the word does not); sized
   off the CARD (container units) so CANYON fits the narrowest card whole.  No 01-05 digits. */
.mb4v-acts {
  --bandB: calc(clamp(20px, 3.4vh, 48px) + min(7.2vw, 15vh, 150px) * 1.12);
  --ac-grow: 1.45;   /* the hot / held card's flex-grow; v4-acts.js reads it to solve the balance offset */
}
.mb4v-acts .mb4v-ac {
  left: var(--rl-m, 64px); right: var(--rl-m, 64px);   /* 2026-11-12: the page margin (nav.css rail), not its own clamp */
  top: calc(var(--bandB) + clamp(30px, 5.4vh, 64px)); height: clamp(150px, 25vh, 320px);   /* L20: breathing room under the carousel; cards still end above the routes */
  gap: var(--rl-g, 24px);   /* the grid gutter */
}
.mb4v-acts .mb4v-ac__i {
  container-type: inline-size;
  /* M3: the rise is scrubbed on the camera's s (v4-acts.js writes --a 0..1 per card during the pan), so there
     is no transition on transform/opacity to run on after the camera lands; each card is its own compositor
     layer, so a frame of the rise moves a raster instead of repainting five filtered photographs */
  --a: 0;
  transform: translate3d(0, calc((1 - var(--a)) * 56px), 0) scale(calc(.94 + var(--a) * .06)); opacity: var(--a);
  will-change: transform, opacity;
  transition: flex-grow .6s cubic-bezier(.16, 1, .3, 1);   /* row 10: the page's one ease, the same clock as the row's glide */
}
.mb4v-acts .mb4v-ac__i.is-hot, .mb4v-acts .mb4v-ac__i.is-sel { flex-grow: var(--ac-grow); }
/* M2 #3: the exit — cards leave on their own transforms, staggered, then the layer hides (v4-acts.js holds it visible) */
.mb4v-acts.is-out .mb4v-ac__i { transform: translate3d(0, -44px, 0); opacity: 0; pointer-events: none;
  transition: transform .55s cubic-bezier(.5, 0, .8, .4) calc(var(--i) * 60ms), opacity .4s linear calc(var(--i) * 60ms + .1s); }
.mb4v-acts.is-out.is-back .mb4v-ac__i { transform: translate3d(0, 44px, 0); }

/* the photograph is its own layer, so its dim never touches the name */
.mb4v-acts .mb4v-ac__b { background: #0A0A0A; filter: none; box-shadow: inset 0 0 0 1px rgba(237, 231, 216, .14); transition: box-shadow .35s; }
.mb4v-acts .mb4v-ac__b::before {
  content: ""; position: absolute; inset: 0;
  background: color-mix(in srgb, var(--hue) 22%, #0A0A0A) var(--img, none) center / cover no-repeat;
  transform: scale(1.001);
  transition: filter .4s, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.mb4v-acts .mb4v-ac__b::after { z-index: 1; background: linear-gradient(to top, rgba(10, 10, 10, .88), rgba(10, 10, 10, .35) 38%, rgba(10, 10, 10, 0) 66%); }
.mb4v-acts .mb4v-ac__i.is-hot .mb4v-ac__b::before, .mb4v-acts .mb4v-ac__i.is-sel .mb4v-ac__b::before { transform: scale(1.04); }
/* the hue ring rides the positioned foot layer: an inset shadow or outline on the button paints UNDER the photo layer */
.mb4v-acts .mb4v-ac__i.is-hot .mb4v-ac__b::after, .mb4v-acts .mb4v-ac__i.is-sel .mb4v-ac__b::after { box-shadow: inset 0 0 0 2px var(--hue); }
/* Carter 2026-11-07: no card is ever dimmed — hover only widens + lifts the one under the cursor */
.mb4v-acts .mb4v-ac__b:focus { outline: none; }
.mb4v-acts .mb4v-ac__b:focus-visible { outline: 2px solid #EDE7D8; outline-offset: -2px; }

.mb4v-acts .mb4v-ac__t {
  z-index: 2; left: 8%; right: 8%; bottom: clamp(12px, 9cqi, 26px);
  font: 800 min(15cqi, 46px)/1 var(--disp, var(--display, system-ui)); letter-spacing: .06em; text-transform: uppercase;
  color: #EDE7D8; mix-blend-mode: normal; white-space: nowrap; overflow: visible; text-shadow: 0 1px 14px rgba(10, 10, 10, .85);
}

/* CRITIC-2 #7 (2026-11-11) — THE ROW WRAPS (replaces row 10's translated row + .is-away neighbours, which left three cards
   on the stage for an end card).  v4-acts.js re-orders the five so the held card takes the middle slot and plays a FLIP
   on the individual `translate` property (the --a rise owns `transform`): .is-flip parks the transition for the
   measuring frame, then translate eases home on the page's one ease, in step with the held card's grow.  A card that
   wraps round an end enters from its side, its photograph fading up (.is-enter).  No snap, no wheel capture. */
.mb4v-acts .mb4v-ac__i { transition: flex-grow .6s cubic-bezier(.16, 1, .3, 1), translate .6s cubic-bezier(.16, 1, .3, 1); }
.mb4v-acts .mb4v-ac__i.is-flip { transition: flex-grow .6s cubic-bezier(.16, 1, .3, 1), translate 0s; }
.mb4v-acts .mb4v-ac__b { transition: box-shadow .35s, opacity .45s cubic-bezier(.16, 1, .3, 1); }
.mb4v-acts .mb4v-ac__i.is-enter .mb4v-ac__b { opacity: 0; transition: none; }
@media (min-width: 900px) {
  .mb4v-acts.is-held .mb4v-ac__i.is-hot:not(.is-sel) { flex-grow: 1; }
}

/* phone + small tablet: one swipeable row (native horizontal pan; vertical pans stay the page's), names upright */
@media (max-width: 899px) {
  .mb4v-acts { --bandB: calc(72px + 13vw * 1.12); }   /* the phone band: top 72px, --f 13vw (demo3.css) */
  .mb4v-acts .mb4v-ac {
    left: 0; right: 0; padding: 0 var(--rl-m, 20px); top: calc(var(--bandB) + 30px); height: clamp(170px, 26vh, 240px);
    gap: var(--rl-g, 12px); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; pointer-events: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .mb4v-acts .mb4v-ac::-webkit-scrollbar { display: none; }
  .mb4v-acts .mb4v-ac::after { content: ""; flex: 0 0 6px; }
  .mb4v-acts .mb4v-ac__i { flex: 0 0 clamp(132px, 40vw, 220px); }
  .mb4v-acts .mb4v-ac__i.is-hot, .mb4v-acts .mb4v-ac__i.is-sel { flex-grow: 0; }
  .mb4v-acts .mb4v-ac__t { writing-mode: horizontal-tb; transform: none; top: auto; left: 8%; right: 8%; bottom: 14px; text-align: center; font-size: min(15cqi, 24px); }
}

/* 2026-11-12 P6 — the door is a segment of THE BAR (demo3.css `.mb4v-ch .mb4v-doors.mf-btn-group`): one glass capsule,
   the header's material; the per-pill Ink fill that stood here (CRITIC-2 #1) is gone with the pills.  The record and the
   lights still clear the bar (tracks.js koDoor keep-out). */

/* 2026-11-13 audit A2 — the phone's activity row ran off the right edge with no sign it scrolls: it fades at that edge */
@media (max-width: 899px) {
  .mb4v-acts .mb4v-ac { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%); }
}
