/* Single-page prototype: intro and route transitions on top of ../style.css (2026-11-25).
   White on html only, body transparent (the field library's grid canvas sits at z-index -1). */

html { background: #fff; }
body { background: transparent; }

/* layers: the intro's field (fixed, 0) < page (1) */
header, main, footer { position: relative; z-index: 1; }
#field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
html:not(.intro) #field { display: none; }
.route:focus { outline: 0; }

/* routes without JS: the hash target is shown, home when there is none.
   The huge scroll margin makes the jump to the target clamp to the top of the page. */
.route { scroll-margin-top: 400vh; }
.route:not(#home) { display: none; }
#cartridge:target, #landscape:target, #about:target { display: block; }
main:has(.route:target) #home { display: none; }
/* published files carry their route in html[data-route] (prerendered), so each path reads without JS (with JS the .js rules below decide) */
html:not(.js)[data-route="cartridge"] #cartridge, html:not(.js)[data-route="landscape"] #landscape, html:not(.js)[data-route="about"] #about { display: block; }
html:not(.js)[data-route]:not([data-route="home"]) #home { display: none; }

/* routes with JS: html[data-route] picks the page; a leaving page is pinned where it was while it fades */
.js .route, .js main:has(.route:target) #home { display: none; }
.js[data-route="home"] #home, .js[data-route="cartridge"] #cartridge, .js[data-route="landscape"] #landscape, .js[data-route="about"] #about { display: block; }
.js .route.is-leaving { display: block; position: fixed; left: 0; right: 0; pointer-events: none; }

/* intro: the home page with only its opening sentence visible, the sentence in the middle of the window */
.intro { overflow: hidden; }
.intro body { cursor: default; }
/* "View ->" under the sentence, only during the intro */
.enter { display: none; }
.intro .enter { display: block; position: absolute; margin-top: 20px; }
.intro-exit .enter a { background: none; color: #000; }
.intro .lede { transform: translate(var(--dx, 0px), var(--dy, 0px)); }
/* the opening sentence belongs to the intro only: hidden on home (and without JS; the meta description
   carries it), out of the flow during the intro so nothing moves when it goes; home starts with the paragraph */
#home .lede { display: none; }
.intro #home .lede { display: block; position: absolute; left: 0; right: 0; top: 0; }
.intro:not(.intro-ready) .lede { opacity: 0; }
.intro header, .intro footer, .intro #home > :not(.lede) { opacity: 0; }
.intro header, .intro main, .intro footer { pointer-events: none; }
.intro .lede a { pointer-events: auto; }

/* intro: words surface one by one (inline opacity / blur from spa.js); spectres pass over the clearing */
.intro .lede .w { display: inline-block; }
#spectres { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#spectres i { position: absolute; left: 0; top: 0; background: #fff; opacity: 0; will-change: transform, opacity; }

/* View link arrow: a thin drawn arrow instead of the font's (2026-11-25) */
.enter .arrow { display: inline-block; margin-left: 0.1em; }
.enter .arrow svg { display: inline-block; width: 0.786em; height: 0.643em; vertical-align: calc(0.02em - 1px); overflow: visible; shape-rendering: geometricPrecision; }

/* home without the hero and the sentence: the paragraph (was section#about) starts 120 / 60 under the header, as the other routes */
body.v12 #statement { margin-top: 120px; }
@media (max-width: 720px) { body.v12 #statement { margin-top: 60px; } }
/* about route: style.css gives #about 120 / 60 on top (body.v12 #about); the description block itself adds nothing,
   the pictures follow at .seq.pair's 180 / 100 */
#about > #work { margin-top: 0; }

/* cartridge: the dates, one centred line after the options (the only centred element) */
#dates { margin-top: 180px; text-align: center; }
@media (max-width: 720px) { #dates { margin-top: 100px; } }

/* home: one creature beside the paragraph and facts (columns 7-12), as tall as that block, 3:4, centred;
   drawn live by the field library's grid (one [data-entity] cell), the still underneath as fallback */
#statement { align-items: stretch; }
#statement .text { grid-column: 1 / 7; }
#statement .creature { grid-column: 7 / 13; display: flex; justify-content: center; align-items: flex-start; }
#statement .cell { height: 100%; aspect-ratio: 3 / 4; max-width: 100%; }
#statement .cell img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  #statement .text, #statement .creature { grid-column: 1 / -1; }
  /* phones: the creature is a block of its own, first under the header, then the section gap to the paragraph */
  #statement .creature { order: -1; }
  #statement .text { margin-top: 100px; }
  #statement .cell { height: auto; width: min(100%, 45vh); }   /* full width, at most 60vh tall */
}
