/* The studio's header on every published project page: Home at the top left, Data & Privacy at the top
   right, nothing between them (the AI line went on 4 October 2026, at the user's word).
   tools/sync-work.py puts it first in each copied page's <body>, with this file, studio-header.js and a
   small <style> of the project's own (its ink, and the room its own top corners make for the header).

   It is the studio header's corner link (style.css "The four corners", legal.css .site-nav a): the same
   face, weight, size, letter spacing, side margin and bar height at every window size, so Home stands
   where it stands on the studio's page. These lines repeat that file's values; when they change there,
   change them here (tools/check-projects.mjs compares the two pages). No box and no strip: the words
   stand on the project's first screen in the project's ink (--sh-ink), with a soft shadow only where a
   photograph is busy under them (--sh-shadow).

   It belongs to the opening screen. Without a script it stands at the top of the document and scrolls
   away with it. With studio-header.js it stays at the top until the visitor has moved about 40 % of a
   window into the page (The Monarch: until its title page leaves), then fades out, and comes back at the
   top. A link that has faded stays in the tab order, and the keyboard that reaches it shows it. */
:root{--sh-edge:clamp(18px,4vw,60px);--sh-bar:70px;--sh-size:17px}
@media(min-height:1000px){:root{--sh-size:18px}}
@media(min-height:1300px) and (min-width:1200px){:root{--sh-size:20px}}
@media(max-width:600px){:root{--sh-edge:17px;--sh-bar:64px;--sh-size:16px}}
@media(max-width:370px){:root{--sh-edge:12px}}
@media(max-width:340px){:root{--sh-size:15px}}
/* Where the corner words' baseline lies under the top edge (measured in Chrome, WebKit within 0.7px), so a
   project's own words can stand on it (sync-work.py, Rucker Park and NO PEARLS). */
:root{--sh-base:40.3px}
@media(min-height:1000px){:root{--sh-base:40.6px}}
@media(min-height:1300px) and (min-width:1200px){:root{--sh-base:42.5px}}
@media(max-width:600px){:root{--sh-base:37.7px}}
@media(max-width:340px){:root{--sh-base:37.3px}}

/* A project's own rules for nav, a, p or their pseudo-elements must not reach in here. */
.studio-header,.studio-header *,.studio-header *::before,.studio-header *::after{all:unset;box-sizing:border-box}
.studio-header{position:absolute;top:0;left:0;right:0;z-index:2147483000;display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:baseline;height:var(--sh-bar);padding:0 var(--sh-edge);
  color:var(--sh-ink,#fff);font:400 var(--sh-size)/1.1 'Helvetica Neue',Helvetica,Arial,sans-serif;letter-spacing:.02em;text-shadow:var(--sh-shadow,none);white-space:nowrap;pointer-events:none;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-font-smoothing:antialiased;transition:opacity .35s ease,transform .35s ease}
.studio-header nav{grid-area:1/1;display:flex;align-items:baseline;justify-content:space-between;gap:20px}
/* A corner link is its word: its box reaches 8px past the word and the margin takes that back, ::before
   makes it 44px tall to touch, ::after is the hairline that hangs under the word beneath a pointer. */
.studio-header a{display:block;position:relative;margin:0 -8px;padding:10px 8px 11px;color:inherit;font-weight:500;line-height:1.1;letter-spacing:.02em;text-decoration:none;cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:transparent}
.studio-header a::before{content:'';position:absolute;inset:-4px -2px}
.studio-header a::after{content:'';position:absolute;inset:auto 8px 0;height:1px;background:currentColor;opacity:0;box-shadow:var(--sh-shadow-line,none)}
.studio-header a:active::after{opacity:1}
@media(hover:hover){.studio-header a:hover::after{opacity:1}}
.studio-header a:focus-visible{outline:auto 1px Highlight;outline:auto 1px -webkit-focus-ring-color;outline-offset:0}
/* No shade under the words any more, on any project: the blurred patch under each word over Rucker Park's and
   NO PEARLS's photographs read as a gradient, and the client never wants one in the header (2026-10-11). Their
   words keep a 2 px shadow only (sync-work.py SHADOW). */

/* With the script: fixed at the top while the opening screen is up, faded once the visitor has moved on. */
.sh-js .studio-header{position:fixed}
/* Under Safari's clock (work/bleed.js): the page opens scrolled down by --bleed, and the header stands on the page
   at the window's top instead of being fixed there, since a fixed element on the edge makes Safari paint one flat
   colour. It scrolls away with the opening screen rather than staying. */
html.bleed .studio-header{position:absolute;top:var(--bleed)}
.studio-header.is-away{opacity:0;transform:translateY(-8px)}
.studio-header.is-away a{pointer-events:none}
.studio-header.is-away:focus-within{opacity:1;transform:none}
.studio-header.is-away:focus-within a{pointer-events:auto}
@media(prefers-reduced-motion:reduce){.studio-header{transition:opacity .2s ease}.studio-header.is-away{transform:none}}
@media print{.sh-js .studio-header{position:absolute}.studio-header{text-shadow:none}}
