/* OPTION 3A — 3D library with the real home page sections (only in the dist-v4 build, computers only).
   Each frame is the size of the screen; when the camera stands at a frame it fills the screen at 1:1 (crisp, readable). */
.v4 body { background: #050403; overflow-x: hidden; }
.v4 #main { display: none; }
.v4-stage { position: fixed; inset: 0; z-index: 1; overflow: hidden; perspective-origin: 50% 50%; }
.v4-world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.v4-corridor, .v4-seg { position: absolute; transform-style: preserve-3d; }
.v4-plane { position: absolute; }
/* bookshelf walls (darkened through the overlay, not a CSS filter: filters on large 3D planes are very slow) */
.v4-wall { transform-origin: 0 50%;
  background:
    repeating-linear-gradient(180deg, transparent 0 236px, #2a1a0e 236px 258px, #120b06 258px 266px),
    repeating-linear-gradient(90deg, #3b1d17 0 18px, #1d2a3a 18px 32px, #4a3418 32px 52px, #2b1410 52px 63px, #5a4932 63px 73px, #1c1c26 73px 93px, #41221a 93px 108px, #23301f 108px 124px, #4b3a21 124px 135px, #150f0c 135px 140px); }
.v4-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 30% 60% at 50% 45%, rgba(255, 190, 110, 0.18), transparent), linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.42) 30%, rgba(0, 0, 0, 0.42) 70%, rgba(0, 0, 0, 0.88)); }
.v4-floor { top: 0; transform-origin: 50% 0; background: repeating-linear-gradient(90deg, #2c1b10 0 150px, #24160d 150px 153px, #33200f 153px 300px, #1d1209 300px 303px), #2a190e; }
.v4-floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.75)); }
.v4-ceil { top: 0; transform-origin: 50% 0; background: repeating-linear-gradient(180deg, #0c0806 0 360px, #1a110a 360px 384px), #0c0806; }
.v4-lamp { width: 300px; height: 300px; left: -150px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 150, 0.95), rgba(255, 170, 90, 0.35) 30%, transparent 70%); }
/* the frames: full screen when you stand at them; the gold frame shows while you walk */
.v4-panel { overflow: hidden; background: #090909; box-shadow: 0 0 0 10px #2a1c10, 0 0 0 16px rgba(198, 166, 107, 0.6); }
.v4-inner { position: relative; will-change: transform; display: flex; flex-direction: column; }
.v4-inner > * { margin: 0 !important; flex: 0 0 auto; }
.v4-inner > :last-child { flex: 1 0 auto; }   /* short frames stretch to fill the screen */
.v4 .v4-inner .anim-pin, .v4 .v4-inner .research-pin, .v4 .v4-inner .journey-pin, .v4 .v4-inner .ink-pin { will-change: transform; }
.v4 .topic-index { position: relative !important; top: auto !important; }
/* inside a frame the page does not scroll, so pinned backgrounds are moved by script instead of position: sticky */
.v4 .v4-inner .anim-pin, .v4 .v4-inner .research-pin, .v4 .v4-inner .journey-pin, .v4 .v4-inner .ink-pin { position: absolute !important; top: 0; left: 0; right: 0; height: 100vh !important; }
.v4 .reveal { opacity: 1 !important; transform: none !important; }
.v4-hint { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; margin: 0; font: 600 11px Montserrat, sans-serif; letter-spacing: 0.3em; text-transform: uppercase; color: #C6A66B; transition: opacity 0.6s; text-shadow: 0 1px 8px #000; }
.v4-prog { position: fixed; left: 0; bottom: 0; height: 2px; width: 0; background: #C6A66B; z-index: 30; }
.v4 .site-header { z-index: 40; }
