
  /* the pending hide is scoped to the page content (header, .page,
     footer) instead of the whole body, so the opening cover — which
     now carries the timeline loader — stays visible while the fonts
     load; the content beneath the opaque cover still cannot paint a
     fallback-font frame early, and the same 2s failsafe applies */
  html.fonts-pending .site-head,html.fonts-pending .page,html.fonts-pending .site-foot{opacity:0;animation:fontGateFail .25s ease 2s forwards}
  @keyframes fontGateFail{to{opacity:1}}
  /* opening fade: ONE cover, ONE fade (user's call, third attempt —
     the page must load as a single smooth fade, everything appearing
     together, never some elements first and others popping in later).
     The two earlier mechanisms animated the BODY's opacity, and both
     could be beaten: a transition whose hidden from-state was never
     painted got skipped wholesale, and a keyframe fade keyed to
     fonts.ready still ran while the real fonts were still in flight
     (fonts.ready can resolve on an empty load set — see the gate
     script), so shapes faded in and the text popped in after. The
     cover cannot be beaten that way: it is a plain opaque paper
     layer, first element in the body, above everything (z 999),
     present from the very first paint. Nothing beneath it can show
     early because nothing beneath it is visible at all. The gate
     script now waits for the actual font files (explicit
     document.fonts.load calls), then fades ONLY the cover — 1.6s
     on a gentle ease-in-out curve (see the timing note on the rule
     itself) — revealing the complete, final page in one motion. pointer-events:none throughout, so the cover can
     never trap a click; a pure-CSS failsafe fades it at 4.8s even
     if every script dies, and the gate script removes it from the
     DOM once its fade has finished. The hero underline draw is
     keyed to the cover fade ACTUALLY finishing (.cover-faded,
     added by the gate script when the cover's real opacity
     reaches ~0 — watched frame by frame, not a nominal timer;
     see the gate script for the truncation bug that forced
     this): the line starts drawing at the exact moment the
     page becomes fully visible, never during the fade and never
     after a delay. */
  #page-cover{
    position:fixed;inset:0;background:#FFFDF8;z-index:999;
    opacity:1;pointer-events:none;
    display:flex;align-items:center;justify-content:center;
    /* slow, even fade (user's call): the old .9s run on the site's
       ease-out curve did almost all of its work in the first ~40% —
       that curve decelerates INTO a settle, so a fade on it reads
       as a quick dip rather than a fade, and on the phone it felt
       fast and abrupt. 1.6s on a gentle ease-in-out curve spreads
       the opacity change evenly across the whole fade, so the page
       eases in smoothly on every device. The failsafe below shares
       the same timing so a script-dead load fades just as slowly. */
    transition:opacity 1.6s cubic-bezier(.45,0,.25,1);
    /* failsafe delay sits past the two-step exit's worst case
       (1.5s gate cap + 0.62s loader fade + 1.6s cover fade), so it
       only ever fires when the gate script truly died */
    animation:coverFail 1.6s cubic-bezier(.45,0,.25,1) 4.8s forwards;
  }
  /* .fade also disarms the failsafe animation: once the gate is
     alive enough to start its own fade, the failsafe must never
     start — a CSS animation overrides the opacity transition, so
     a failsafe starting mid-fade snapped the cover to invisible
     up to ~0.7s early and swallowed the transitionend the hero
     underline's release used to wait for (see the gate script).
     Script-dead loads never add .fade, so their failsafe is
     untouched. */
  #page-cover.fade{opacity:0;animation:none}
  @keyframes coverFail{to{opacity:0;visibility:hidden}}
  /* ---------- loader: minimal timeline (TEST) ----------
     The cover carries only the bare timeline idea, nothing else:
     three flat filled tracks (blue, violet and ink clips — no
     yellow anywhere in the loader) sitting
     directly on the paper — no panel, no box, no strokes or
     outlines anywhere — and one filled playhead that sweeps across
     them on the cover fade's own gentle curve. Pure CSS on one
     2.2s cycle; the clips pop in staggered on the site's ease when
     the loader first paints. Under reduced motion the cover is
     display:none (see the reduced-motion block), so the loader
     never plays there.
     PHONE JITTER FIX: the playhead is NOT part of the SVG. It is a
     plain HTML layer (.ld-head) laid over the static SVG, because
     mobile browsers do not reliably promote an SVG <g> to its own
     compositor layer — will-change on the group was ignored on
     phones, so every sweep frame re-rasterised the whole timeline
     on the main thread while that thread was still busy parsing
     the page, and the sweep stepped. An HTML element with
     will-change:transform IS promoted on mobile Chrome and Safari,
     so the sweep now runs entirely on the compositor thread and
     glides at display rate even while the page loads underneath.
     Desktop was never affected (its raster is fast enough either
     way), which is why the lag only ever showed on phones.
     COLD-LOAD JITTER FIX (user's report: jittery on the FIRST
     load, smooth on refresh, phone only): the HTML-layer fix
     above was not enough, because on a cold load the sweep and
     the clip pops started at first paint — mid-parse of the
     document, while the end-of-body scripts still had to run,
     the hidden page still had to lay out, and the page's own
     ambient animations (deck loops, button shine) were already
     running under the opaque cover, all fighting the loader for
     the phone's main thread. On a refresh everything is cached,
     those bursts shrink to nothing, and the same animation plays
     smooth; a PC has the CPU headroom to hide them entirely.
     Three changes close the window: (1) the pops and the sweep
     start PAUSED and the gate script only releases them
     (html.ld-go) once parsing and the script bursts are done —
     DOMContentLoaded plus two painted frames, so the playhead's
     compositor layer already exists before its first frame;
     (2) every CSS animation inside the page content and footer
     stays paused until the cover starts lifting (.cover-gone) — they
     are invisible under the opaque cover anyway, and pausing
     them hands the whole main thread to the loader during load;
     (3) the gate's minimum hold now also waits for one full
     sweep measured from the loader's actual start, so the
     delayed start never eats the sweep the hold exists to show. */
  .ld-wrap{position:relative;width:min(88vw,460px)}
  .ld-svg{display:block;width:100%;height:auto}
  /* phone: the desktop width read a little big on a phone screen
     (88vw of a ~390px viewport is ~343px of timeline), so phones
     get a smaller cap */
  @media (max-width:640px){.ld-wrap{width:min(76vw,320px)}}
  /* loader exit: the timeline fades out on its own first (the gate
     adds .loader-out), leaving plain paper — the white dip — before
     the cover's own fade reveals the page */
  #page-cover .ld-wrap{transition:opacity .55s cubic-bezier(.45,0,.25,1)}
  #page-cover.loader-out .ld-wrap{opacity:0}
  .ld-clip{transform-box:fill-box;transform-origin:center;animation:ldPop .55s cubic-bezier(.22,1,.36,1) both;animation-play-state:paused}
  html.ld-go .ld-clip{animation-play-state:running}
  @keyframes ldPop{from{opacity:0;transform:scale(.55)}to{opacity:1;transform:scale(1)}}
  /* the playhead layer spans the whole timeline box, so a
     percentage translateX maps 1:1 onto the SVG's user units:
     the bar rests at the tracks' left edge (x=20 of 440 = 4.55%)
     and the sweep carries it +400 units = +90.909% of the layer's
     own width, landing on the tracks' right edge (x=420) */
  .ld-head{position:absolute;inset:0;will-change:transform;animation:ldSweep 2.2s cubic-bezier(.45,0,.25,1) infinite;animation-play-state:paused}
  html.ld-go .ld-head{animation-play-state:running}
  .ld-tri{position:absolute;left:2.5%;top:0;width:4.09%;height:9.33%;background:#111;clip-path:polygon(0 0,100% 0,50% 100%)}
  .ld-bar{position:absolute;left:4.03%;top:9.33%;width:1.03%;height:85.33%;background:#111}
  @keyframes ldSweep{
    0%{transform:translate3d(0,0,0);opacity:0}
    7%{transform:translate3d(0,0,0);opacity:1}
    58%{transform:translate3d(90.909%,0,0);opacity:1}
    70%{transform:translate3d(90.909%,0,0);opacity:0}
    71%{transform:translate3d(0,0,0);opacity:0}
    100%{transform:translate3d(0,0,0);opacity:0}
  }
  /* cold-load contention cut (see the loader note above): the
     page's ambient CSS animations — the hero deck's SVG loops,
     the CTA shine, the arrow nudges, the footer doodles — all run
     from first paint even though the opaque cover hides them, and
     on a phone they steal main-thread frames from the loader
     sweep during the cold-load burst. They stay paused until the
     gate marks the cover gone, then resume from the same point.
     Scoped to html.js so a script-dead load never freezes them,
     and to the content/footer so the header menu's open/close
     animation is never held. */
  html.js:not(.cover-gone) .page *,html.js:not(.cover-gone) .site-foot *{animation-play-state:paused !important}
