/* Plates (shared component, 21 Oct 2026; approved templates plate-glide, plate-text-sets and frame-button-arrival,
   generalised from Place). components/plates/plates.js sets html.plates-on on desktop with the page glide; everything
   here applies only then, so phone, reduced motion and no script keep ordinary scrolling with text at rest.
   Markup: <main data-plates>; each child section is a plate ([data-plate-skip] for an overlay such as a film room) (a strip when taller than the screen); [data-plate-text]
   blocks enter in two sets; [data-plate="closing"] is the closing image plate before the footer (its [data-plate-hold]
   text holds while the image scrolls on). Page files keep composition; this file keeps the shared behaviour. */

@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 /* Every plate holds once its foot reaches the bottom of the screen (plates.js sets a strip's top; a plate one screen
    tall holds at the top), so the next plate rises over it. Each plate paints its own ground. */
 html.plates-on main[data-plates] > :not([data-plate-skip],.visually-hidden,script,template) { position:sticky; top:0; min-height:100svh; box-sizing:border-box; margin-block:0 !important; }
 /* A plate that sets no ground of its own takes the page's chalk (zero specificity: any page rule wins), so a plate
    rising over another never shows the one beneath through it. */
 :where(html.plates-on main[data-plates] > :not([data-plate-skip],.visually-hidden,script,template)) { background-color:var(--chalk); }
 /* Joined sections (plate-group) scroll as one strip on the page ground; flow-root keeps their margins inside. */
 html.plates-on main[data-plates] > .plate-group { display:flow-root; background:var(--chalk); }

 /* The nav stays clear over plates; the plate's own ground runs under it. When a strip's content (or the closing's
    image) moves under the nav, that plate's ground fades in beneath the nav, 360ms on the calm curve. Its lower edge is
    clean: no blur, gradient or line (site rule, Camille 21 Oct 2026: "no blur nav bottom border"). */
 html.plates-on body .structure-header[data-header-surface] { background:transparent; }
 html.plates-on body .structure-header::before { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
  background:var(--plates-ground,var(--chalk));
  opacity:0; transition:opacity 360ms cubic-bezier(.45,0,.55,1); }
 html.plates-on.plates-ground body .structure-header::before { opacity:1; }

 /* Closing image plate: exactly one screen; its text holds where it settled while the image scrolls on, and the footer
    follows at its own height (one 700ms glide). overflow:clip, not hidden, so the held text still holds. */
 html.plates-on main[data-plates] > [data-plate="closing"] { position:relative; height:100svh; overflow:clip; }
 html.plates-on main[data-plates] > [data-plate="closing"] [data-plate-hold] { position:sticky; }

 /* Text in two sets out of line masks (plate-text-sets). */
 html.plates-on .plate-wait > * { opacity:0; animation:none !important; }
 /* One entrance only: a page's older reveal (for example Conversation's .film-chapter__heading h2 rising 16px over 1.5s on
    .is-visible) must not move a plate text's children as well, or the text moves twice and shakes (21 Oct 2026). */
 html.plates-on .plate-wait > :not(.plate-unit) { transform:none !important; }
 html.plates-on .plate-wait.is-in > * { opacity:1; transition:opacity 700ms cubic-bezier(.45,0,.55,1) 150ms; }
 html.plates-on .plate-wait[data-plate-sets] > * { opacity:1; transition:none; }
 html.plates-on .plate-wait[data-plate-sets] .plate-split { display:flow-root; }
 html.plates-on .plate-wait[data-plate-sets] .plate-mask { display:block; overflow:clip; padding-bottom:.2em; margin-bottom:-.2em; }
 html.plates-on .plate-wait[data-plate-sets] .plate-line { display:block; opacity:0; transform:translate3d(0,calc(100% + .2em),0); will-change:transform,opacity; backface-visibility:hidden; }
 html.plates-on .plate-wait[data-plate-sets] .plate-unit { opacity:0; transform:translate3d(0,4px,0); }
 html.plates-on .plate-wait[data-plate-sets].is-in .plate-line,
 html.plates-on .plate-wait[data-plate-sets].is-in .plate-unit { opacity:1; transform:none; }
}

/* frame-button-arrival: an arriving frame button draws itself and stays drawn; hover and focus fade a flat fill in and
   out over 600ms on the calm curve. The fill is held at zero opacity from the start so the arrival never flashes. */
:is(html.plates-on,html.phone-buttons-on) .fbtn .fbtn__frame path { fill-opacity:0; }
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn .fbtn__frame path { stroke-dashoffset:0; fill:var(--sweep-fill,#E9E1C5); fill-opacity:0; transition:stroke-dashoffset var(--fbtn-out) var(--fbtn-ease), fill-opacity 600ms cubic-bezier(.45,0,.55,1); }
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn :is(.fbtn__label,.fbtn__icon) { transform:translate3d(var(--fbtn-shift),0,0); }
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:is(.fbtn--centred,.fbtn--centred-closing) :is(.fbtn__label,.fbtn__icon) { transform:translate3d(0,0,0); }
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn.plate-drawing .fbtn__frame path,
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawing :is(.fbtn__label,.fbtn__icon) { transition-duration:2000ms; transition-timing-function:cubic-bezier(.2,.2,.6,.95); }
@media (hover:hover) and (pointer:fine) {
 :is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:hover .fbtn__frame path { fill-opacity:1; transition-duration:var(--fbtn-in), 600ms; }
}
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:focus-visible .fbtn__frame path { fill-opacity:1; transition-duration:var(--fbtn-in), 600ms; }
@media(prefers-reduced-motion:reduce) { html.plates-on body .structure-header::before { transition:none; } }
/* Preserve the outgoing nav ground in the whole-page dissolve; never expose the image before the snapshot. */

/* Light ink frame buttons over film or a dark ground (fbtn--white, fbtn--gold): the pale sweep under gold or white ink
   could not be read (Camille 21 Oct 2026, Home: "hover fill - text should change ... gold cannot read it"). As on
   Watch the film: the fill is solid chalk and the label and icon turn bark with it, 600ms in and out, calm curve. */
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:is(.fbtn--white,.fbtn--gold) .fbtn__frame path { fill:var(--chalk,#F2EFE7); }
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:is(.fbtn--white,.fbtn--gold) :is(.fbtn__label,.fbtn__icon) { transition:transform var(--fbtn-out) var(--fbtn-ease), color 600ms cubic-bezier(.45,0,.55,1); }
@media (hover:hover) and (pointer:fine) {
 :is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:is(.fbtn--white,.fbtn--gold):hover :is(.fbtn__label,.fbtn__icon) { color:var(--bark,#332F24); }
}
:is(html.plates-on,html.phone-buttons-on) .fbtn.plate-drawn:is(.fbtn--white,.fbtn--gold):focus-visible :is(.fbtn__label,.fbtn__icon) { color:var(--bark,#332F24); }

/* Motion engine, arrive.media and arrive.unit (DESIGN.md 3.6): images, portraits and other units that an older reveal used
   to move are held until their place in the sequence, then fade in with no travel. Desktop with the engine on only. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on .m-wait { opacity:0; }
 html.plates-on .m-wait.is-in { opacity:1; transition-property:opacity; transition-duration:var(--m-move,700ms); transition-timing-function:var(--m-curve,cubic-bezier(.45,0,.55,1)); }
}
/* A block waiting for its turn is hidden as a whole until it is split into lines (a lone heading has no child elements for
   the rule above to hide). Once split, its lines carry the entrance; once in, it shows. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on .plate-wait:not([data-plate-sets]):not(.is-in) { opacity:0; }
}

/* arrive.pin (DESIGN.md 3.6; Camille 22 Oct 2026, Place map: "the only thing we actually ANIMATE in this page is the PIN
   SABLE once upon opening"). On a still plate's first landing, the declared marker's own trace ring draws round it once
   (--m-move), holds, and retracts (500ms, the marker's out), the draw it makes on hover; it never stays drawn, which would
   read as selected. Nothing else on the plate moves. Desktop with the engine; phone, reduced motion and no script: at rest. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on .plate-landed [data-motion-pin] .mk-trace { animation:m-pin-trace 2000ms var(--m-curve,cubic-bezier(.45,0,.55,1)) var(--m-pause,150ms) 1 backwards; }
}
/* Then its label ([data-motion-pin-label], the gold SABLE badge; Camille 22 Oct 2026: "pin animation is good - we just need
   to have the entrance of the gold sable logo label"): once the ring has drawn and one step has passed, the label unfolds
   out of the pin from left to right over --m-move, the reading direction and the frame button's draw. Held folded only
   while its plate rises; afterwards it is always shown. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on [data-plate-still]:not(.plate-landed) [data-motion-pin] [data-motion-pin-label] { clip-path:inset(0 100% 0 0); }
 html.plates-on .plate-landed [data-motion-pin] [data-motion-pin-label] { animation:m-pin-label var(--m-move,700ms) var(--m-curve,cubic-bezier(.45,0,.55,1)) calc(var(--m-pause,150ms) + var(--m-move,700ms) + var(--m-step,160ms)) 1 backwards; }
}
@keyframes m-pin-label { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
@keyframes m-pin-trace { 0% { stroke-dashoffset:1.02; } 35% { stroke-dashoffset:0; } 75% { stroke-dashoffset:0; } 100% { stroke-dashoffset:1.02; } }
/* still.plate: the frame button's prompt line drop in (frame-button.js, data-reveal) is switched off inside a still plate or
   section; the prompt is simply there (22 Oct 2026, Design and Conversation strips made still). */
html.plates-on [data-plate-still] .fbtn-prompt[data-reveal] { opacity:1; animation:none; }

/* arrive.text as blocks (DESIGN.md 3.6; Camille 22 Oct 2026: "the text should always animate as a BLOCK - not line by line").
   Each heading, paragraph or label fades and rises --m-rise-text as a whole, one after another; a lone heading block is its own
   unit. Buttons and other units keep --m-rise. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on .plate-wait[data-plate-sets].plate-unit { opacity:0; transform:translate3d(0,var(--m-rise,4px),0); }
 html.plates-on .plate-wait[data-plate-sets] .plate-text,
 html.plates-on .plate-wait[data-plate-sets].plate-text { transform:translate3d(0,var(--m-rise-text,12px),0); }
 /* While it moves, each unit is its own layer so it glides at sub-pixel steps; as plain text Chrome snaps it to whole pixels
    every frame and a slow, light paragraph trembles (22 Oct 2026, Camille: "not smooth"). The layer ends when the unit is
    handed back after its entrance. */
 html.plates-on .plate-wait[data-plate-sets] .plate-unit,
 html.plates-on .plate-wait[data-plate-sets].plate-unit { will-change:transform,opacity; backface-visibility:hidden; }
 html.plates-on .plate-wait[data-plate-sets].is-in .plate-unit,
 html.plates-on .plate-wait[data-plate-sets].is-in.plate-unit { opacity:1; transform:none; }
}

/* arrive.text settle: text that has entered keeps the same layer it moved on, so landing changes nothing on screen (no snap to
   whole pixels, no change of antialiasing). Desktop with the engine on. */
@media(min-width:721px) and (prefers-reduced-motion:no-preference) {
 html.plates-on .plate-settled { will-change:transform,opacity; backface-visibility:hidden; }
}
