/* Cover artwork and approved bare chevron. Content pages use their existing shell. */
:root {
  --site-home-paper:#fff;
  --site-home-ink:#263142;
  --site-home-gutter:clamp(20px,3vw,48px);
}
[data-theme="dark"] { --site-home-paper:#101820; --site-home-ink:#dbe3e8; }
@media(prefers-color-scheme:dark) {
  [data-theme="auto"] { --site-home-paper:#101820; --site-home-ink:#dbe3e8; }
}
/* The cover can paint before the shared reading styles arrive. */
html:has(body.is-cover) { overflow:clip; height:100%; scrollbar-gutter:stable; scrollbar-width:thin; }
body.is-cover,body.is-cover *,body.is-cover *::before,body.is-cover *::after { box-sizing:border-box; }
body.is-cover {
  margin:0; line-height:1.6;
  height:100svh;
  overflow:clip;
  background:var(--site-home-paper);
}
body.is-cover .site-header {
  --site-header-height:calc(96px + env(safe-area-inset-top));
  position:fixed; inset:0 0 auto; z-index:20;
  height:var(--site-header-height); padding-top:env(safe-area-inset-top);
  border:0; background:transparent; pointer-events:none;
}
body.is-cover .site-header__inner {
  display:flex; align-items:center;
  height:96px; max-width:1600px; margin:auto;
  padding-inline:var(--site-home-gutter); gap:25px;
}
body.is-cover .site-header :is(a,button) { pointer-events:auto; }
body.is-cover .site-brand { display:flex; align-items:center; gap:8px; }
body.is-cover .site-logo { display:inline-flex; align-items:center; width:auto; padding:0; color:var(--site-home-ink); }
body.is-cover .site-logo .liz-wordmark { width:62px; height:50px; fill:currentColor; }
body.is-cover :is(.visually-hidden,.sr-only) { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body.is-cover .skip-link:not(:focus) { position:absolute; top:-100%; }
body.is-cover .site-header__drawer-title { display:none; }
body.is-cover :is(.site-search,.site-sidebar__backdrop) { display:none; }
body.is-cover .site-header__context { display:block; flex:1; }
body.is-cover :is(.site-search__toggle,.bookmarks-toggle,.site-header .theme-toggle,.header-icon-link,.header-ask-link,.site-lang,.site-lang-banner) { display:none !important; }
body.is-cover :is(.firefly-pet-invite,#back-to-top) { display:none; }
body.is-cover :is(.site-sidebar,.site-header__hamburger) { display:none !important; }
body.is-cover .site-sidebar { position:fixed; }
body.is-cover .site-main__wrapper { height:100svh; min-height:0; }
.home-main.site-main--cover { display:block; height:100svh; min-height:0; padding:0; overflow:clip; }
.home-cover.home-gateway {
  position:relative; display:block; width:100%; height:100svh; min-height:0;
  margin:0; padding:0; overflow:clip; transform:none; text-align:left;
}
.home-gallery { position:absolute; inset:0; height:100%; background:var(--site-home-paper); }
.home-artwork {
  position:absolute; z-index:0; top:0; left:0; width:100%; height:85svh;
  overflow:visible; touch-action:pan-x pinch-zoom; user-select:none; -webkit-user-select:none;
  transform-origin:68% 42%;
}
.home-gateway { touch-action:pan-x pinch-zoom; }
.home-gateway[data-home-interacting] .home-artwork { will-change:transform; }
.home-artwork picture,.home-glass-canvas {
  position:absolute; inset:0; display:block; width:100%; height:100%; pointer-events:none;
}
.home-artwork img { display:block; width:100%; height:100%; object-fit:cover; border:0; }
.home-artwork .home-artwork__still--dark { display:none; }
[data-theme="dark"] .home-artwork .home-artwork__still--light { display:none; }
[data-theme="dark"] .home-artwork .home-artwork__still--dark { display:block; }
@media(prefers-color-scheme:dark) {
  [data-theme="auto"] .home-artwork .home-artwork__still--light { display:none; }
  [data-theme="auto"] .home-artwork .home-artwork__still--dark { display:block; }
}
.home-glass-canvas { opacity:0; }
.home-artwork.is-rendered .home-glass-canvas { opacity:1; }
/* Swap the identical zero frame atomically. Crossfading two transparent
   copies changes the glass opacity even when their pixels match. */
.home-artwork.is-rendered picture { opacity:0; }
html[data-home-live-passage] .home-artwork :is(picture,.home-glass-canvas) {transition:none;}
.home-threshold {
  position:absolute; z-index:2; bottom:32px; left:50%; transform:translateX(-50%);
  display:grid; place-items:center; width:52px; height:52px; padding:0;
  border:0; background:none; color:#7f939f; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.home-threshold svg { width:24px; height:16px; transition:color 140ms ease; }
@media(prefers-reduced-motion:reduce) { .home-threshold svg { transition:none; } }
@media(hover:hover) and (pointer:fine) { .home-threshold:hover { color:var(--site-home-ink); } }
.home-threshold:focus-visible { outline:2px solid currentColor; outline-offset:4px; }
@media(orientation:portrait) { .home-artwork { height:88svh; } }
@media(max-width:1024px) { body.is-cover .site-logo { min-width:44px; min-height:44px; } }
@media(max-width:600px) {
  body.is-cover .site-header { --site-header-height:calc(76px + env(safe-area-inset-top)); --site-home-gutter:20px; }
  body.is-cover .site-header__inner { height:76px; gap:12px; }
  body.is-cover .site-logo .liz-wordmark { width:54px; height:44px; }
  .home-threshold { bottom:30px; width:48px; height:48px; }
  .home-threshold svg { width:22px; }
}
@media(max-height:560px) and (orientation:landscape) {
  body.is-cover .site-header { --site-header-height:60px; }
  body.is-cover .site-header__inner { height:60px; }
  .home-artwork { height:83svh; }
  .home-threshold { bottom:12px; width:44px; height:44px; }
}

/* The first document arrival has motion too; repeated PJAX returns use the
   passage itself. Controls remain visible and usable during this entrance. */
.home-arriving .home-gallery { animation:home-first-light 700ms cubic-bezier(.18,.72,.2,1) both; }
@keyframes home-first-light { from { opacity:.92; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .home-arriving .home-gallery { animation:none; } }

/* Keep the desktop directory laid out while concealed by the cover. */
@media(min-width:1025px) {
  body.is-cover .site-sidebar {display:flex !important;visibility:hidden;pointer-events:none;}
}

@media(prefers-reduced-motion:reduce){.home-artwork :is(picture,.home-glass-canvas){transition:none;}}

/* Keep the real home link above the HUD pet's transparent drag target. */
.site-logo{position:relative;z-index:3}

body.is-cover .site-logo .liz-wordmark path { stroke:none; }
