:root{--hh-shade:rgba(11,35,73,.39)}   /* the header strip's shade in a section; the phone menu is the same shade, so the two join without a seam */
/* Shared by every page: header, section title with its emblem, the yellow light accent, the blue band. */
:root{--hh-ink:#111111;--hh-muted:#9A9A9A;--hh-light:#F2DC6B;--hh-glow:rgba(242,220,107,.6);--hh-m:clamp(18px,4vw,72px);
  --hh-font:"Helvetica Neue",Helvetica,Arial,"PingFang SC","苹方-简","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC","Source Han Sans SC",sans-serif}
@media (max-width:760px){:root{--hh-m:18px}}

/* ---- header: identical on every page. Cream type on a strip of the painting; on the homepage the painting itself is behind it ---- */
.hh{position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:center;gap:6px 18px;
  padding:calc(6px + env(safe-area-inset-top,0px)) max(var(--hh-m),env(safe-area-inset-right,0px)) 6px max(var(--hh-m),env(safe-area-inset-left,0px));font:500 14px/1.3 var(--hh-font);color:#F7F2E2;background:#2F88C9;
  text-shadow:0 1px 6px rgba(10,30,70,.25);-webkit-font-smoothing:antialiased}
.hh-bg{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.hh-bg canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.hh-home,.hh-burger{position:relative;z-index:2}
.hh-home{display:inline-flex;align-items:center;line-height:20px}
.hh-nav a{line-height:20px}
.hh-nav{position:relative;z-index:1}
.hh a{color:inherit;text-decoration:none}
.hh-sep{margin:0 8px;opacity:.6;font-weight:300}
.hh-nav{display:flex;gap:18px;align-items:center}
.hh-nav a{position:relative;color:rgba(247,242,226,.8);transition:color .2s}
.hh-emw,.hh-nav .hh-other,.hh-copy,.hh-slash{display:none}
.hh-menu-foot{display:contents}
/* the current section and a hovered link are marked by a short line of her yellow light */
.hh-lab{position:relative;display:inline-block}
.hh-lab::after{content:"";position:absolute;left:.06em;right:.06em;bottom:-2px;height:2px;border-radius:2px;background:var(--hh-light);   /* inset to the letters' ink, not their boxes */
  box-shadow:0 0 10px 2px var(--hh-glow);transform:scaleX(0);transform-origin:center;transition:transform .4s cubic-bezier(.2,.7,.2,1)}
.hh-nav a:hover,.hh-nav a[aria-current="page"]{color:#F7F2E2}
.hh-nav a:hover .hh-lab::after,.hh-nav a[aria-current="page"] .hh-lab::after,.hh-nav a:focus-visible .hh-lab::after{transform:none}
.hh-lang{display:inline-flex;gap:6px;margin-left:6px}
.hh-lang button{all:unset;cursor:pointer;color:rgba(247,242,226,.6)}
.hh-lang button[aria-pressed="true"]{color:#F7F2E2}
.hh :focus-visible{outline:2px solid var(--hh-light);outline-offset:3px}
.hh-burger{display:none}

/* on the homepage: no band; the words sit on the painting, half transparent until the pointer comes to them */
.hh.on-art{position:fixed;left:0;right:0;background:none;text-shadow:0 1px 10px rgba(8,16,36,.45)}
.hh.on-art>.hh-home,.hh.on-art>.hh-nav{opacity:.72;transition:opacity .35s}
.hh.on-art:hover>.hh-home,.hh.on-art:hover>.hh-nav,.hh.on-art:focus-within>.hh-home,.hh.on-art:focus-within>.hh-nav{opacity:1}

/* phones: one line; the menu is a full-screen room of brush-black with the four blocks */
@media (max-width:760px){
  .hh{align-items:center;padding-block:calc(2px + env(safe-area-inset-top,0px)) 2px;font-size:14px}
  .hh.on-art>.hh-home,.hh.on-art:not(.glassing)>.hh-burger{opacity:.67}   /* on the painting the menu button is as quiet as the name */
  .hh-burger{all:unset;box-sizing:border-box;position:relative;z-index:2;display:grid;align-content:center;gap:5px;width:44px;height:36px;margin-right:-12px;padding:0 12px;cursor:pointer;
    -webkit-tap-highlight-color:transparent;filter:drop-shadow(0 1px 3px rgba(8,16,36,.55));transition:opacity .35s}
  .hh-burger span{display:block;height:1.5px;border-radius:2px;background:#F7F2E2;transition:transform .3s cubic-bezier(.2,.7,.2,1),opacity .2s}
  .hh.open .hh-burger span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
  .hh.open .hh-burger span:nth-child(2){opacity:0}
  .hh.open .hh-burger span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}
  .hh.open>.hh-home,.hh.on-art.open>.hh-burger{opacity:1}
  /* full screen over the live homepage painting: on the homepage its four blocks fly in to become the list's icons;
     in a section the glass fades away to show the painting behind */
  .hh-nav{position:fixed;inset:0;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:0;
    padding:calc(64px + env(safe-area-inset-top,0px)) var(--hh-m) calc(20px + env(safe-area-inset-bottom,0px));
    /* the live painting, darkened with one single unbroken shade across both header and menu */
    background:var(--hh-shade);text-shadow:0 1px 8px rgba(10,30,70,.4);
    visibility:hidden;opacity:0;transition:opacity .3s,visibility 0s .3s}
  .hh.on-art>.hh-nav{opacity:0}
  .hh.open>.hh-nav,.hh.on-art.open>.hh-nav{visibility:visible;opacity:1;transition:opacity .3s}
  html.hh-locked,html.hh-locked body{overflow:hidden}
  .hh-nav a{display:flex;align-items:center;gap:20px;padding:13px 0;color:#F7F2E2;
    transform:translateY(10px);opacity:0;transition:transform .5s cubic-bezier(.2,.7,.2,1),opacity .4s}
  .hh.open .hh-nav a{transform:none;opacity:1}
  .hh.open .hh-nav a:nth-child(2){transition-delay:.04s}.hh.open .hh-nav a:nth-child(3){transition-delay:.08s}.hh.open .hh-nav a:nth-child(4){transition-delay:.12s}
  .hh-emw{display:grid;place-items:center;width:58px;height:46px;flex:none;filter:drop-shadow(0 2px 6px rgba(10,30,70,.35))}
  .hh-nav .hh-emb:not(.hh-art-emb) polygon{fill:#121214}
  .hh-lab{display:grid;gap:4px}
  .hh-name{font-size:28px;font-weight:400;letter-spacing:.08em;line-height:1.1}
  html[lang="en"] .hh-name{letter-spacing:0}
  .hh-nav .hh-other{display:block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:rgba(247,242,226,.72)}
  .hh-lab::after{display:none}
  .hh-nav a:not([aria-current]):not(.lit) .hh-name{color:rgba(247,242,226,.9)}
  .hh-nav>a:first-of-type{margin-top:auto}
  .hh.home-menu .hh-emw{visibility:hidden}             /* the blocks themselves fly there, then the icons take over */
  .hh.home-menu.arrived .hh-emw{visibility:visible}
  .hh.fly-menu .hh-nav a{transform:none}
  .hh.fly-menu .hh-lab{opacity:0;transform:translateX(-14px);transition:opacity .45s .3s,transform .6s .3s cubic-bezier(.2,.7,.2,1)}
  .hh.fly-menu.open .hh-lab{opacity:1;transform:none}
  .hh.open .hh-art{display:none}
  .hh-menu-foot{display:flex;justify-content:space-between;align-items:baseline;margin-top:auto;padding-top:14px;border-top:1px solid rgba(247,242,226,.35);
    font-size:13px;color:rgba(247,242,226,.75)}
  .hh-copy,.hh-slash{display:inline}
  .hh-lang{margin:0;gap:8px;font-size:15px}
  .hh-lang button{padding:6px 2px}
}
/* ---- section title: the black block that leads here, its slit glowing ---- */
.hh-sec{display:flex;align-items:flex-end;gap:14px;margin:clamp(14px,3vw,34px) 0 clamp(18px,3vw,30px);width:max-content;max-width:100%}
.hh-emb{display:block;flex:none;overflow:visible}
.hh-title{margin:0;display:flex;align-items:baseline;gap:10px;font:500 22px/1 var(--hh-font);color:var(--hh-ink)}
.hh-other{font-size:14px;font-weight:400;color:var(--hh-muted)}
.hh-slit{animation:hh-breathe 3.6s ease-in-out infinite}
@keyframes hh-breathe{0%,100%{opacity:.6}50%{opacity:1}}
.hh-st{transform:scale(0);transition:transform .35s ease-in}
.lit .hh-st{transform:none;transition:transform var(--du) cubic-bezier(.2,.75,.25,1) var(--dl)}
.lit .hh-slit{animation:none;opacity:1}
@media (prefers-reduced-motion: reduce){.hh-slit{animation:none;opacity:.9}.hh-st{transition:none}}

/* ---- the language switch is a small pill, so it does not read as one more section ---- */
.hh{--lc:#F7F2E2;--lb:rgba(247,242,226,.55);--lt:#2F88C9}
.hh .hh-lang{gap:0;margin-left:12px;padding:2px;border:1px solid var(--lb);border-radius:999px;font-size:11px;line-height:1;letter-spacing:.06em;text-shadow:none;
  transition:border-color .3s}
.hh .hh-lang button,.hh .hh-lang button[aria-pressed]{padding:3px 8px;border-radius:999px;color:var(--lc)!important;opacity:.75;transition:background-color .3s,color .3s,opacity .2s}
.hh .hh-lang button:hover{opacity:1}
.hh .hh-lang button[aria-pressed="true"]{background:var(--lc);color:var(--lt)!important;opacity:1}
.hh .hh-lang .hh-slash{display:none}
@media (max-width:760px){
  .hh .hh-lang{font-size:13px}
  .hh .hh-lang button,.hh .hh-lang button[aria-pressed]{padding:5px 12px}
}
@media (min-width:761px){
  /* the pill sits on the same middle line as the section names */
  .hh-nav{align-items:center}
}

/* ---- a section opening: the black block flies from the painting to the head of the section; the header is fully there ---- */
.hh-lift{position:fixed;z-index:28;transform-origin:0 0;pointer-events:none;transition:transform .7s cubic-bezier(.55,.05,.25,1)}
/* while a section is open the strip of painting in the header is shaded toward the glass's blue, and its words step back
   (they come up again under the pointer) */
.hh.on-art::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--hh-shade);
  opacity:0;transition:opacity .3s linear}
.hh.on-art.glassing::before{opacity:1;transition:opacity .5s ease-out}
/* a painting seen large: the header's strip goes nearly as dark as the room */
.hh.on-art::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:rgba(8,9,13,.62);opacity:0;transition:opacity .45s}
html.hh-dark .hh.on-art::after{opacity:1}
/* the menu opened over it: the header's darkening and shade fade with the room, so the menu sits on the bare painting */
html .hh.on-art.open::after,html .hh.on-art.open::before{opacity:0!important}
.hh.on-art.glassing>.hh-nav{opacity:.9}
.hh.on-art.glassing>.hh-home{opacity:.72}
.hh.on-art.glassing:hover>.hh-home,.hh.on-art.glassing:hover>.hh-nav,.hh.on-art.glassing:focus-within>.hh-home,.hh.on-art.glassing:focus-within>.hh-nav{opacity:1}
@media (max-width:760px){.hh.on-art.glassing>.hh-nav{opacity:0}.hh.on-art.glassing.open>.hh-nav{opacity:1}
  .hh.on-art.glassing>.hh-home{opacity:.67}.hh.on-art.glassing>.hh-burger{opacity:.67}.hh.on-art.glassing.open>.hh-home,.hh.on-art.glassing.open>.hh-burger{opacity:1}}
/* the section's name is not shown beside its block (the header already says where you are); kept for screen readers */
.hh-sec .hh-title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
