/* ══ 2026-11-24 (ledger docs/ops/requests/2026-11-23-overnight-homepage.md rows 19, 23, 25) — THE SEAMS, Projects → footer.
 *
 * Carter: "each section just scrolls to the next, there's no animation from one to the next."
 *
 * One mechanism, five different shots.  A seam is the one screen of scroll in which the incoming section's top travels
 * from the frame's foot to its top — its `entry`, which is also the outgoing section's `exit` (the sections touch: the
 * wide screen's in-flow hold margins are gone, below).  Through that screen BOTH frames hold still: every child of each
 * section is counter-moved by exactly the scroll (compositor `translate`, CSS view timelines, nothing in script), so the
 * wheel plays a shot instead of sliding a page.  The outgoing parts leave on their own offsets in the first half, the
 * incoming land on theirs from a quarter in, the fields cross in the middle (phone: the in-section fields fade here;
 * wide: ground.js crossfades the fixed worlds over the same window — no cut, no hairline), everything has landed by
 * about 70 %, and the rest is still.
 *
 * THE HOLD has a floor in pixels, not a percentage (planner 11-24: 30 % of a 390 px frame is one wheel notch).  Each
 * section is --sm-hold taller than its content and its frame is counter-moved through that last stretch too (an
 * additive translate over the end of `contain`), so a landed section stands still for (the seam's still tail) +
 * --sm-hold of wheel.
 *
 *   Recent → Projects   the strip lifts away card by card as the builds rise into place   (demo4-recent/-projects.css)
 *   Projects → Beta     the builds fall through the floor; Beta's word rises out of its line and its photograph wipes up
 *   Beta → Tools        Beta recedes into the field as one plane; the spine draws down and the first stops arrive
 *   Tools → About       the stops part to their own sides and the spine fades; About's stage comes up under its word
 *   About → footer      About's photograph goes to night (about.js) while the footer writes itself onto it, line by line
 *
 * Reduced motion and engines without view timelines: none of this applies — the sections scroll and keep their one-shot
 * entrances (demo4-close.css); every hidden start state lives inside the @supports + no-preference block.  Values from
 * DESIGN.md via --sf-*; keyframes animate translate / scale / opacity / clip-path only — no skew, no rotation.
 * ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

html.mb2 { --sm-hold: max(80px, 360px - 25svh); }

@keyframes sm-hin { from { translate: 0 -100dvh; visibility: hidden; } to { translate: 0 0; visibility: visible; } }
@keyframes sm-hmid { from { translate: 0 0; } to { translate: 0 var(--sm-hold, 80px); } }
@keyframes sm-hout { from { translate: 0 0; } to { translate: 0 100dvh; visibility: hidden; } }
@keyframes sm-fin { from { opacity: 0; } to { opacity: 1; } }
@keyframes sm-fout { from { opacity: 1; } to { opacity: 0; } }
@keyframes sm-veil { from { opacity: 0; } to { opacity: var(--sm-veil, .55); } }
@keyframes sm-fall { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 var(--sm-fy, 12vh); } }
@keyframes sm-rise { from { opacity: 0; translate: 0 var(--sm-y, 40px); visibility: hidden; } to { opacity: 1; translate: 0 0; visibility: visible; } }
@keyframes sm-line { 0% { translate: 0 112%; opacity: 0; } 35% { opacity: 1; } 100% { translate: 0 0; opacity: 1; } }   /* opacity too: a glyph's top sliver over its line mask read as a row of dashes (11-24 walk) */
@keyframes sm-wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sm-zoom { from { scale: 1.14; } to { scale: 1; } }
@keyframes sm-recede { from { opacity: 1; scale: 1; } to { opacity: 0; scale: .92; } }
@keyframes sm-side-in { from { opacity: 0; translate: var(--sm-x, 64px) 0; visibility: hidden; } to { opacity: 1; translate: 0 0; visibility: visible; } }
@keyframes sm-side-out { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: calc(1.6 * var(--sm-x, 64px)) 0; } }
@keyframes sm-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes sm-pop { from { scale: 0; } to { scale: 1; } }
@keyframes sm-group-out { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 6vh; visibility: hidden; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* the wide screen's in-flow holds stand down (demo4-native.css row 19): the seams carry the hold now, and the sections
       must touch for one section's exit to be the next one's entry */
    html.mb2.mb4-vs :is(#projects, #beta, #tools) { margin-bottom: 0; animation: none; }

    html.mb2 #beta.mb2-sec { view-timeline: --sb block; }
    html.mb2 #tools.mb2-sec { view-timeline: --st block; }
    html.mb2 #about.mb2-sec { view-timeline: --sa block, --mbab block; }
    html.mb2 #footer.mb2-sec { view-timeline: --sf block; }
    /* a section's own box must neither clip its counter-moved frame nor paint an opaque plate over its neighbour's */
    html.mb2.mb2 :is(#beta, #tools).mb2-sec { overflow: visible; overflow-x: clip; background: transparent; box-sizing: content-box; padding-bottom: var(--sm-hold); }   /* the hold is ADDED below the content (a min-height let a tall Beta at 844 x 390 spend its whole scroll in the hold, never showing its reports) */

    /* ── the frames hold still: each section's children ride the scroll back by exactly its travel (in, the hold, out) ── */
    html.mb2.mb2.mb2 :is(#beta, #tools).mb2-sec > * { animation: sm-hin linear both, sm-hmid linear both, sm-hout linear forwards; animation-composition: replace, add, add;
      animation-range: entry 0% entry 100%, contain calc(100% - var(--sm-hold)) contain 100%, exit 0% exit 100%; }
    html.mb2.mb2.mb2 :is(#beta, #tools).mb2-sec > :is(.mb10-sw, .mb8-bt__field, .mb8-tl__field) {
      animation: sm-hin linear both, sm-fin cubic-bezier(.45, 0, .55, 1) both, sm-hmid linear both, sm-hout linear forwards; animation-composition: replace, replace, add, add;
      animation-range: entry 0% entry 100%, entry 20% entry 60%, contain calc(100% - var(--sm-hold)) contain 100%, exit 0% exit 100%; }
    html.mb2.mb2.mb2 #beta.mb2-sec > * { animation-timeline: --sb, --sb, --sb, --sb; }
    html.mb2.mb2.mb2 #tools.mb2-sec > * { animation-timeline: --st, --st, --st, --st; }
    html.mb2.mb2.mb2 #about.mb2-sec > * { animation: sm-hin linear both; animation-timeline: --sa; animation-range: entry 0% entry 100%; }
    html.mb2.mb2.mb2 #about.mb2-sec > :is(.mb10-sw, .mb5-ab__stage) { animation: sm-hin linear both, sm-fin cubic-bezier(.45, 0, .55, 1) both;
      animation-timeline: --sa, --sa; animation-range: entry 0% entry 100%, entry 26% entry 62%; }   /* row 33: About's word < .3 until ~37 %, after Tools has gone (20 %) */
    html.mb2.mb2.mb2 #footer.mb2-sec > * { animation: sm-hin linear both; animation-timeline: --sf; animation-range: entry 0% entry 100%; }

    /* the one-shot entrances (native-close.js .is-in, time-based) stand down: the seams move these parts now */
    html.mb5-live :is(#beta, #tools) :is(.mb8-ln__in, .mb8-up, .mb8-bt__lm, .mb8-bt__row, .mb8-bt__empty, .mb8-bt__doors, .mb8-bt__ph, .mb8-bt__ph img, .mb8-tc, .mb8-tc__shot) { transform: none !important; transition: none !important; }

    /* ── PROJECTS → BETA: Beta's word rises out of its own line, the photograph wipes up from its foot and settles, the
       words beside it rise, then the latest reports one by one, then the doors ── */
    html.mb2 #beta .mb8-bt__h .mb8-ln__in { animation: sm-line var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb; animation-range: entry 14% entry 42%; }
    html.mb2 #beta .mb8-bt__intro { --sm-y: 24px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb; animation-range: entry 20% entry 44%; }
    html.mb2 #beta .mb8-bt__ph { animation: sm-wipe cubic-bezier(.7, 0, .2, 1) both; animation-timeline: --sb; animation-range: entry 14% entry 48%; }
    html.mb2 #beta .mb8-bt__ph img { animation: sm-zoom var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb; animation-range: entry 14% entry 58%; }
    html.mb2 #beta .mb8-bt__lm { --sm-y: 32px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb; animation-range: entry 24% entry 48%; }
    html.mb2 #beta :is(.mb8-bt__row, .mb8-bt__empty) { --sm-y: 28px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb;
      animation-range: entry calc(30% + var(--q, 0) * 4%) entry calc(50% + var(--q, 0) * 4%); }
    html.mb2 #beta .mb8-bt__doors { --sm-y: 20px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sb; animation-range: entry 40% entry 60%; }

    /* ── BETA → TOOLS: Beta goes back into the field as one plane, top first (the word, the lead, the reports) ── */
    html.mb2 #beta :is(.mb8-bt__head, .mb8-bt__lead, .mb8-bt__board) { transform-origin: 50% 0; animation: sm-recede cubic-bezier(.55, 0, .85, .35) forwards; animation-timeline: --sb; }
    html.mb2 #beta .mb8-bt__head { animation-range: exit 0% exit 24%; }
    html.mb2 #beta .mb8-bt__lead { animation-range: exit 4% exit 30%; }
    html.mb2 #beta .mb8-bt__board { animation-range: exit 6% exit 32%; }
    /* Tools' word goes the same way on its way out (it is usually above the frame by then; on a short Tools it is not) */
    html.mb2 #tools .mb8-tl__head { transform-origin: 50% 0; animation: sm-recede cubic-bezier(.55, 0, .85, .35) forwards; animation-timeline: --st; animation-range: exit 0% exit 26%; }

    /* ── ...and Tools lands: the word line by line, its line and door, the spine draws down from the word, the stops arrive
       from their own sides on their own scroll (view()), each node pops onto the spine as its card arrives ── */
    html.mb2 #tools .mb8-tl__hl .mb8-ln__in { animation: sm-line var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --st;
      animation-range: entry calc(30% + var(--l, 0) * 4%) entry calc(54% + var(--l, 0) * 4%); }   /* after Beta's word has gone (exit 30 %): the two titles never share a frame */
    html.mb2 #tools .mb8-tl__sub { --sm-y: 24px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --st; animation-range: entry 38% entry 58%; }
    html.mb2 #tools .mb8-tl__all { --sm-y: 20px; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --st; animation-range: entry 34% entry 56%; }
    html.mb2 #tools .mb8-tl__cards::before { transform-origin: 50% 0; animation: sm-draw cubic-bezier(.45, 0, .55, 1) both; animation-timeline: --st; animation-range: entry 26% entry 80%; }
    html.mb2 #tools .mb8-tl__cards::after { animation: sm-draw linear both; animation-timeline: --st; animation-range: entry 70% exit 10%; }   /* (the spine leaves with the list — row 33) */
    html.mb2 #tools .mb8-tc .mb8-tc__card { animation: sm-side-in var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: view(); animation-range: entry 8% entry 62%; }
    /* row 33 (coordinator, frames 042-043): the stops leave as ONE layer — opacity and a short drop on the list, never on each
       card, so no glass card ever shows the one beneath it — and they are gone (20 %) before About's word is a third in
       (its stage fades 26-62 %); the field crossfade (ground.js, 20-60 %) carries the motion in between */
    html.mb2 #tools .mb8-tl__cards { animation: sm-group-out cubic-bezier(.55, 0, .85, .35) forwards; animation-timeline: --st; animation-range: exit 0% exit 20%; }
    html.mb2 #tools .mb8-tc.is-l .mb8-tc__card { --sm-x: -72px; }
    html.mb2 #tools .mb8-tc.is-r .mb8-tc__card { --sm-x: 72px; }
    html.mb2 #tools .mb8-tc__dot { animation: sm-pop var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: view(); animation-range: entry 24% entry 56%; }

    /* ── TOOLS → ABOUT: About's stage comes up under the parting stops (held, fading in over the middle third).  On the phone
       its word no longer rides up from under the last card (demo4-about.css mbab-word): the stage is held in the frame
       from the first pixel, so the word simply sits at its row ── */
    html.mb7-live:not(.mb7-rm) #about .mb9-word { animation: none; }

    /* ── ABOUT → FOOTER: the footer's frame is held from its first pixel; a low Ink veil comes up over About's night so the
       type always reads; the lockup, the newsletter and the three columns write themselves on in order ── */
    html.mb2 #footer.mb2-sec { background: transparent; }
    /* fix round row 29: the base (newsletter + columns) also carried native.js's scrubbed [data-mb5-in] fade, so it lagged the
       lockup by a notch at 1440 — the seam owns its parts here */
    html.mb5-live #footer.mb7-foot [data-mb5-in] { opacity: 1; transform: none; }
    html.mb2.mb2.mb2.mb7-live #footer.mb7-foot > .mb5-ground { display: block; position: absolute; inset: 0; background: #0A0A0A; pointer-events: none;
      --sm-veil: .86; animation: sm-hin linear both, sm-veil linear both; animation-timeline: --sf, --sf; animation-range: entry 0% entry 100%, entry 4% entry 26%; }
    /* fix round (frames 070-072 at 1440: white type over About's greying snow): the night veil is nearly full before any
       footer type arrives — the lockup lands on its night field, never on the photograph */
    html.mb7-live #footer.mb7-foot { --sm-f0: 26%; }
    html.mb7-live #footer.mb7-foot :is(.mb5-mark, .mb5-word span, .mb5-news, .mb5-map__col, .mb5-legal) {
      --sm-y: 26px; transition: none; animation: sm-rise var(--sf-ease, cubic-bezier(.16, 1, .3, 1)) both; animation-timeline: --sf;
      animation-range: entry calc(var(--sm-f0, 14%) + var(--k, 0) * .6%) entry calc(var(--sm-f0, 14%) + 16% + var(--k, 0) * .6%); }   /* fix round row 29: the columns land WITH the lockup (a 4 % spread, not 14 %) */
    html.mb7-live #footer.mb7-foot .mb5-word span:first-child { --k: 1; }
    html.mb7-live #footer.mb7-foot .mb5-word span + span { --k: 2; }
    html.mb7-live #footer.mb7-foot .mb5-news { --k: 3; }
    html.mb7-live #footer.mb7-foot .mb5-map__col:nth-child(1) { --k: 4; }
    html.mb7-live #footer.mb7-foot .mb5-map__col:nth-child(2) { --k: 5; }
    html.mb7-live #footer.mb7-foot .mb5-map__col:nth-child(3) { --k: 6; }
    html.mb7-live #footer.mb7-foot .mb5-legal { --k: 7; }
  }
  /* the phone: Tools' stops all come in from the right of the spine; the footer lands over About's photograph earlier in
     its run, so its veil goes deeper */
  @media (prefers-reduced-motion: no-preference) and (max-width: 899px) {
    html.mb2 #footer > .mb5-ground { --sm-veil: .86; }
    /* coordinator (WebKit 390 #046: one empty black frame between the leaving list and About's teal): on the phone About's
       own light comes up from the first pixel of the seam, UNDER the leaving list, so the field shift carries the gap */
    html.mb2.mb2.mb2 #about.mb2-sec > .mb10-sw { animation-range: entry 0% entry 100%, entry 0% entry 26%; }
    html.mb2 #about.mb2-sec > .mb10-sw .mb10-w__in { opacity: 1; transform: none; }   /* (its IO bloom waited for mid-screen: ~2 notches late) */
    /* the phone About's clip (demo4-about.css: inset(-50vh 0 0 0)) cut the held frame at half a screen above the section's
       top — a hard Ink band across the top of the seam (WebKit 390 #045); the held frame reaches a full screen up */
    html.mb7-live #about.mb7-ab.mb2-sec { clip-path: inset(-105vh 0 0 0); }
    html.mb2 #about.mb2-sec > .mb10-sw .mb10-w__in > i { animation-play-state: running; }
    /* ...and later: on the phone About's block lands on the clock, so the footer gives it a beat longer before it writes on */
    html.mb2.mb2.mb2.mb7-live #footer.mb7-foot > .mb5-ground { animation-range: entry 0% entry 100%, entry 28% entry 56%; }
    html.mb7-live #footer.mb7-foot { --sm-f0: 32%; }
    html.mb2 #tools .mb8-tc.is-l .mb8-tc__card, html.mb2 #tools .mb8-tc.is-r .mb8-tc__card { --sm-x: 40px; }
  }
}

/* (2026-11-24 fix round, ledger row 32: About's two slant strokes are part of the approved About design and stay — "no
   stray lines" meant the overnight build's new lines.  The rule that hid them is gone.) */

/* ── row 25 — "why is my footer broken": on a short landscape frame (844 × 390) the footer was 670 px tall in a 390 px
   frame, its lockup and newsletter above the top.  Short frames get a compact footer that fits whole: a smaller lockup,
   the newsletter beside the three columns, tighter rows. ── */
@media (max-height: 560px) and (min-width: 600px) {
  html .mb5-foot.mb2-sec { padding-top: 64px; padding-bottom: 12px; }
  html.mb2 .mb5-foot .mb5-foot__in { gap: 14px; }
  html.mb2 .mb5-foot .mb5-foot__hero { --fw: 30px; }
  html.mb2 .mb5-foot .mb5-foot__base { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); row-gap: 10px; padding-top: 14px; padding-bottom: 8px; }
  html.mb2 .mb5-foot .mb5-map { gap: 12px; }
  html.mb2 .mb5-foot .mb5-map a { min-height: 24px; font-size: 13px; }
  html.mb2 .mb5-foot .mb5-legal { flex-direction: row; gap: 16px; }
}

/* About's gold block fades with its copy as it sinks — it never thins into a gold bar across the photograph (11-24 walk) */
html.mb7-live .mb9-bk { opacity: calc(1 - var(--ab-w, 0)); }

/* short landscape frames (844 × 390): the seams have a third of the height to cross in, so the incoming words wait until
   the outgoing ones have gone (11-24 walk: TOOLS printed over Beta's last report); About's run gets a floor in pixels so
   its photograph and copy are reached before the footer (380 svh of a 390 px frame is only ~1,100 px) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (max-height: 560px) {
    html.mb2 #tools .mb8-tl__hl .mb8-ln__in { animation-range: entry calc(44% + var(--l, 0) * 4%) entry calc(66% + var(--l, 0) * 4%); }
    html.mb2 #tools .mb8-tl__sub { animation-range: entry 50% entry 70%; }
    html.mb2 #tools .mb8-tl__all { animation-range: entry 54% entry 72%; }
    html.mb2 #beta .mb8-bt__h .mb8-ln__in { animation-range: entry 40% entry 62%; }
    html.mb2 #beta .mb8-bt__intro { animation-range: entry 46% entry 66%; }
  }
}
@media (max-width: 899px) and (max-height: 560px) {
  html.mb7-live .mb7-ab.mb2-sec { height: max(380svh, 2600px); }
}
