/* =============================================================================================================
   LOUEI 3D PRINT · motto.css · THE OWNER'S LINE IN THE BAR (2026-10-06)

   The owner: "at the top of the page, instead of those 5 services, write: Every line has a purpose" - then, on seeing
   handwriting: "choose something SOLID and STRONG - this is INDUSTRIAL work, not child's play". So the sentence is set in
   the site's own Roboto Flex as heavy condensed capitals (860 weight, 30 % width, tracked .16em), in ink, cut into the bar's
   steel with the rails' one crisp under-cut, and closed by a copper full stop - the bead the nozzle leaves (the hero's
   "We make it." closes the same way). Chosen from three prototypes (A engraved caps / B etched wide caps with copper rules /
   C Playfair Display bold): see check_20261006/handwriting/header2/OPTIONS_SHEET.png.

   THE PRINT (motto.js): once per visit, on its first page, the line is built up from the bottom like an FDM print - five
   thin layers, each laid by a small brass nozzle sweeping across it (left to right, then back), the fresh layer warm copper
   while it is laid; the first layer slower, as a printer lays it; then the nozzle lifts away. 2.5 s, then still.
   (Review 2026-10-06: nine layers in 2.3 s swept the nozzle across the line every 167 ms - up to 89 px a frame at 1920x1080
   and 119 at 3440x1440, a flicker, not the calm print the owner liked; five layers at a near-constant pace: 32 / 43.)
   Reduced motion, later pages of the visit, ?motto=off and a page whose script never arrives: shown printed.

   COST: the line is absolutely placed in the bar (no layout shift, ever) and is its own composited layer; the print moves
   only transforms and opacity (compositor only: no style, layout, paint or raster when it starts, while it runs or when it
   ends - measured on the FDM and resin pages at 1920x1080 and 3440x1305). No filter, no blend.

   PALETTES (?pal=1..7): every colour is var(--ink) / var(--copper) (from styles.css, which the pal sheets recolour) or a
   neutral white/black alpha - so this sheet is NOT in make_palettes.py's SHEETS and its name must not start with styles or
   skin- (the ?pal= switch would look for pal/<n>/motto.css). The phone strip's cream is mobile.css's own, which no palette
   recolours either.
   ============================================================================================================= */

/* ---- the place: the bar's middle, where the five links stood - centred on the bar (the centre panel's axis) ------------- */
.topbar .motto {
  position: absolute; left: 0; right: 0; top: 0; height: 100%; margin: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  /* one DEVICE pixel in stage px (the stage is scaled 0.66..1.32 to the window), as skin-rails.css: the under-cut stays crisp */
  --dp: clamp(.75px, max(2.49px - .149vh, 2.49px - .0932vw), 1.5px);
}
.motto {
  /* the ink box of the capitals in em from the top of the line box (measured: tools/inkbox.py), the print's layer height in
     px of the line, and its length in ms - read by motto.js */
  --ink-top: .136; --ink-bot: .875; --layer: 4.7296; --t-total: 2500;
  /* the first layer's length in sweeps, and each sweep's pace: near constant, soft at the turns (1.25x the mean at its peak) */
  --first: 1.35; --sweep-ease: cubic-bezier(.2,0,.8,1);
}
.motto-t {
  display: block; position: relative; top: 1px;
  font: 860 32px/1 var(--label); font-stretch: 30%; letter-spacing: .16em; text-transform: uppercase;
}
/* the line is its own composited layer, at rest as while printing (the clip box and the text in it): a printed page and an
   unprinted one render it identically (same greyscale text), the print's end repaints nothing - and nothing that repaints
   the bar ever repaints the line (two small layers, ~70 KB each at 1920x1080) */
.motto-c { display: block; overflow: hidden; will-change: transform; }
.motto-x {
  display: block; white-space: nowrap; will-change: transform;
  color: var(--ink); text-shadow: 0 var(--dp) 0 rgba(255,255,255,.62);
}
.motto-dot {                               /* the copper full stop: a bead, lit from the top right like the rails */
  display: inline-block; vertical-align: baseline; border-radius: 50%;
  width: .2em; height: .2em; margin-left: -.06em;
  background: var(--copper);                /* (no color-mix(): a plain copper bead) */
  background: radial-gradient(circle at 62% 30%, color-mix(in srgb, var(--copper) 55%, #fff) 0 18%, var(--copper) 60%,
    color-mix(in srgb, var(--copper) 70%, #000) 100%);
  box-shadow: 0 var(--dp) 0 rgba(255,255,255,.55);
}
.mmotto { display: none; }

/* ---- the print (motto.js) ------------------------------------------------------------------------------------------------
   In the markup, beside the line: .motto-h, the warm strip - a copy of the sentence made by CSS (attr(data-say), aria-hidden,
   so the words are in the page once) - and .motto-noz, the nozzle. Both display:none unless the line is to print.
   html.motto-print (set in <head> before the first paint) HOLDS every piece at the print's first frame from the first paint
   on: the line's clip box parked just under the capitals (the text inside it held still, so nothing of it shows), the warm
   strip parked over the empty band under them, the nozzle at .001 opacity. So the line is never seen whole before it is
   printed, AND its glyphs are rastered with the page's first frames (on a GPU that first raster of the heavy variable
   capitals costs 20-30 ms at 3440, which must not land later, on a film page's first segment; motto.js keeps the pieces
   animated-still from the first layout so the print's start re-rasters nothing). motto.js animates from exactly these
   values; .motto-done (set when the print is over, or never to happen) lets go of the holds. */
.motto-h, .motto-noz { display: none; }
html.motto-print .motto:not(.motto-done) > .motto-t > .motto-c { transform: translateY(calc(var(--ink-bot) * 1em + 1.6px)); }
html.motto-print .motto:not(.motto-done) > .motto-t > .motto-c > .motto-x { transform: translateY(calc(var(--ink-bot) * -1em - 1.6px)); }
html.motto-print .motto:not(.motto-done) .motto-h { display: block; transform: translateY(calc(var(--ink-bot) * 1em + 1.5px)); }
html.motto-print .motto:not(.motto-done) .motto-h > .motto-c { transform: translateY(calc(var(--ink-bot) * -1em - 1.5px)); }
html.motto-print .motto:not(.motto-done) .motto-noz { display: block; opacity: .001; transform: translateY(calc(var(--ink-bot) * 1em - var(--layer) * 1px)); }
.motto-h { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--layer) * 1px + .5px); overflow: hidden; will-change: transform; pointer-events: none; }
.motto-hx::before { content: attr(data-say); }
.motto .motto-t > .motto-h .motto-x { color: var(--copper); color: color-mix(in srgb, var(--copper) 82%, #fff); text-shadow: none; }   /* the warm layer */
.motto .motto-t > .motto-h .motto-x::after {               /* the copy's full stop: the same bead, warm */
  content: ""; display: inline-block; vertical-align: baseline; border-radius: 50%;
  width: .2em; height: .2em; margin-left: -.06em;
  background: var(--copper); background: color-mix(in srgb, var(--copper) 82%, #fff);
}
.motto-noz { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; pointer-events: none; }
.motto-noz::before {                       /* the nozzle: a small brass hot-end tip, in em of the line */
  content: ""; position: absolute; left: -.13em; top: -.3em; width: .26em; height: .29em;
  clip-path: polygon(0 0, 100% 0, 100% 42%, 66% 100%, 34% 100%, 0 42%);
  background: var(--copper);
  background: linear-gradient(90deg, color-mix(in srgb, var(--copper) 70%, #000) 0%, color-mix(in srgb, var(--copper) 55%, #fff) 38%,
    var(--copper) 62%, color-mix(in srgb, var(--copper) 60%, #000) 100%);
}
.motto-noz::after {                        /* its hot point, on the layer it lays */
  content: ""; position: absolute; left: -.05em; top: -.05em; width: .1em; height: .1em; border-radius: 50%;
  background: #fff6e8;
  background: color-mix(in srgb, var(--copper) 25%, #fff6e8);
  box-shadow: 0 0 .14em .06em color-mix(in srgb, var(--copper) 70%, transparent);
}

/* ---- the phone: no bar (mobile.css hides .topbar; the navigator rides the top band). The line is the first thing in the
   page's own scroller - a slim cream plate under the navigator, in the top bar's own cream (mobile.css .topbar), that
   scrolls away with the page. Printed where the navigator's column is shut (the films); under the open column, shown printed. ------------- */
@media (max-width: 820px) {
  :root:not([data-mobile-layout="off"]) .mmotto {
    display: flex; position: relative; margin: 0; height: 40px; flex: none;
    align-items: center; justify-content: center; pointer-events: none;
    background: linear-gradient(180deg, #f4efe6 0%, #e9e2d6 100%);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.55);
    --dp: .67px; --layer: 2.8082;   /* five layers at the strip's size too (the ink is 14 px tall at 19 px) */
  }
  :root:not([data-mobile-layout="off"]) .mmotto .motto-t { font-size: 19px; top: .5px; }
}
@media (max-width: 359px) {
  :root:not([data-mobile-layout="off"]) .mmotto .motto-t { font-size: 17px; letter-spacing: .14em; }
}


/* @motto-rules:start - the owner, 2026-10-06: "the engraved bold one is my choice; put those two lines left and right of it;
   desktop only, I don't want it on the phone". Two copper rules flank the line, each ending in a small copper bead next to
   the words (as on option B); they draw out from the beads once the print is done (transform only), and stand drawn on every
   later page. The phone strip is gone (its markup removed from the shell; this keeps it hidden in any old page). */
.topbar .motto-t::before, .topbar .motto-t::after {
  content: ""; position: absolute; top: 50%; width: 118px; height: 8px; margin-top: -4.5px; pointer-events: none;
  transition: transform .75s cubic-bezier(.2,.8,.2,1) .05s; transform: scaleX(1);
  filter: drop-shadow(0 var(--dp) 0 rgba(255,255,255,.55));
}
.topbar .motto-t::before {
  right: calc(100% + 18px); transform-origin: 100% 50%;
  background:
    radial-gradient(circle at calc(100% - 4px) 50%, var(--copper) 0 2.7px, rgba(0,0,0,0) 3.2px),
    linear-gradient(90deg, rgba(0,0,0,0), var(--copper) 26%) 0 50% / calc(100% - 14px) 1.5px no-repeat;
}
.topbar .motto-t::after {
  left: calc(100% + 18px); transform-origin: 0 50%;
  background:
    radial-gradient(circle at 4px 50%, var(--copper) 0 2.7px, rgba(0,0,0,0) 3.2px),
    linear-gradient(270deg, rgba(0,0,0,0), var(--copper) 26%) 100% 50% / calc(100% - 14px) 1.5px no-repeat;
}
html.motto-print .topbar .motto:not(.motto-done) .motto-t::before,
html.motto-print .topbar .motto:not(.motto-done) .motto-t::after { transform: scaleX(0); transition: none; }
.mmotto { display: none !important; }
/* @motto-rules:end */
