/* The overture (js/overture.js) — shared by index.html and spike/writing.html (the writing studio). */
/* A traveller writes in their journal, then the map flies in.
   Covers everything until the hand-off; its paper + vignette lift away as the map draws itself. */
.ov { position: fixed; inset: 0; z-index: 1000; color: var(--ov-ink, var(--ink)); overflow: hidden; --ov-bg: 1; }
.ov[hidden] { display: none; }
.ov::before { content: ""; position: absolute; inset: 0; background: var(--paper); opacity: var(--ov-bg); }
/* no grain of its own: the map's sheet (js/map/paper.js, .paper-layer) lies over the overture from its first frame,
   so the ink drop, the title and the journal are on the very paper the map is drawn on */
.ov-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse 75% 70% at 50% 46%, transparent 55%, rgb(60 48 30 / var(--ov-vig, .22)) 100%); }
.ov-cam { position: absolute; inset: 0; z-index: 1; transform-origin: 0 0; } /* the journal camera moves it (js/journal-camera.js) */
/* the journal camera's depth of field: the edges of the shot go soft (a masked backdrop blur, set per frame) */
.ov-dof { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
/* the ink drop (js/ink-drop.js): over everything in the overture while it spreads */
.ov-drop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.ov-title { position: absolute; width: max-content; transform-origin: 40% 60%; will-change: transform, opacity; }
.ov-kicker { display: block; font-size: var(--ov-kick); line-height: 1; letter-spacing: var(--ov-kick-ls, .06em); font-weight: 700; white-space: nowrap; margin-bottom: .3em; }
.ov-name { font-size: var(--ov-name); line-height: .9; letter-spacing: var(--ov-name-ls, .04em); font-weight: 700; white-space: nowrap; margin-left: -.04em; }
.ov-page { position: absolute; width: var(--ov-col); font-size: var(--ov-body); line-height: var(--ov-lh); letter-spacing: var(--ov-body-ls, 0); transform-origin: 50% 50%; will-change: transform, opacity; }
.ov-page p { margin: 0 0 var(--ov-para, .55em); }
.ov-page p.ov-end { margin-bottom: .2em; }
/* the snow leopard easter egg (js/overture-peek.js), under the writing */
.ov-peek { position: absolute; pointer-events: none; display: none; }
/* the eraser works on a copy of the finished page (js/overture.js) */
.ov-erase { position: absolute; pointer-events: none; display: none; }
.ov-page.erasing .ov-erase { display: block; }
.ov-page.erasing p { visibility: hidden; }
.ov-title.erasing .ov-erase { display: block; }
.ov-title.erasing .ov-title-ink { visibility: hidden; }
/* the title is drawn on one canvas by the scribbling hand (js/scribble.js); its words stay in the markup, for screen readers */
.ov-title-ink { position: absolute; pointer-events: none; }
.ov-title .ov-kicker, .ov-title .ov-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ov-page p.ov-end.first { margin-top: .9em; }
.ov-loader { position: absolute; left: 50%; bottom: 12vh; width: 140px; height: 12px; margin-left: -70px; z-index: 3; overflow: visible; opacity: 0; transition: opacity .6s; }
.ov-loader.on { opacity: .55; }
.ov-loader path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: .25 .75; animation: ov-wait 1.6s linear infinite; }
@keyframes ov-wait { to { stroke-dashoffset: -1; } }

/* Skip (js/site.js → ov.skipOut): the writing fades out, then the map arrives as it does after the last line */
.ov-skip { position: absolute; right: 44px; bottom: 36px; z-index: 6; width: 116px; height: 46px; padding: 0; border: 0; background: none;
  color: var(--ov-ink, var(--ink)); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  font: 19px/1 "Architects Daughter", cursive; letter-spacing: .07em; transform: rotate(-1.6deg);
  opacity: 0; transition: opacity .6s ease, transform .25s ease; -webkit-tap-highlight-color: transparent; }
.ov-skip[hidden] { display: none; }
.ov-skip.on { opacity: .82; }
.ov-skip.on:hover, .ov-skip.on:focus-visible { opacity: 1; transform: rotate(-1.6deg) translateY(-1px); }
.ov-skip:focus { outline: none; }
.ov-skip-frame { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.ov-skip-frame .hatch { opacity: 0; transition: opacity .25s ease; }
.ov-skip:hover .hatch, .ov-skip:focus-visible .hatch { opacity: 1; }
.ov-skip-label { position: relative; padding-left: 6px; }
.ov-skip-arrow { position: relative; width: 21px; height: 13px; overflow: visible; transition: transform .25s ease; }
.ov-skip:hover .ov-skip-arrow { transform: translateX(3px); }
