/* A luminous plane, suspended within the existing Garamond composition. */
.shared-home .window {
  left: 23vw; width: 71vw;
  transform: perspective(1600px) translateY(var(--float-y,0px)) rotateX(var(--face-x,2deg)) rotateY(var(--face-y,-9deg)) rotateZ(-1.2deg);
  transform-origin: 50% 50%;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 12px 22px 55px #0009, 2px 3px 0 rgba(160,160,160,.18);
  will-change: transform;
}
.shared-home .window::after {
  inset: 0;
  background: linear-gradient(125deg,rgba(255,255,255,.09),transparent 46%,rgba(0,0,0,.12));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}
.window .floating-canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.window.webgl-ready > img { opacity:0; }
.window-outgoing { z-index:1; }
.window .window-hint { z-index:2; }
@media(max-width:820px) {
  .shared-home .window { left:16vw; width:78vw; transform:perspective(1000px) rotateY(-7deg) rotateZ(-1deg); }
}
@media(prefers-reduced-motion:reduce) { .shared-home .window { will-change:auto; } }

/* The surface itself is the image-edit affordance. */
.shared-home .window .window-hint { display:none; }
.shared-home .window { border-color:rgba(255,255,255,.07); transition:border-color 180ms ease, background-color 520ms ease; }
.shared-home .window:hover { border-color:rgba(255,255,255,.24); }
.shared-home .window:focus-visible { outline:1px solid rgba(255,255,255,.35); outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { .shared-home .window { transition:none; } }

/* Flat mode uses the original image directly and suspends rendering and motion. */
.shared-home .window.screen-flat { transform:none; box-shadow:none; }
.shared-home .window.screen-flat .floating-canvas { display:none; }
.shared-home .window.screen-flat > img { opacity:1; }
.shared-home .window.screen-flat::after { background:none; box-shadow:none; }
.screen-display-control { display:grid; gap:10px; margin:22px 0; font:400 13px/1.4 var(--sans); }
.screen-display-control > span { letter-spacing:.08em; text-transform:uppercase; }
.screen-display-control select { width:100%; padding:12px; color:var(--ink,#eeeae0); background:#151515; border:1px solid #ffffff40; border-radius:0; font:400 15px/1.4 var(--sans); }

/* Keep the title legible over photographs in both display modes. */
.shared-home .window::after,
.shared-home .window.screen-flat::after {
  z-index:1;
  background:linear-gradient(to top, rgba(0,0,0,.94) 0%, rgba(0,0,0,.66) 16%, rgba(0,0,0,.22) 31%, transparent 44%);
}

/* A clean edge at rest; a restrained stroke only on hover or keyboard focus. */
.shared-home .window { border-color:transparent; box-shadow:12px 22px 55px #0009; }
.shared-home .window::after { box-shadow:none; }
.shared-home .window:hover { border-color:rgba(255,255,255,.24); }
.shared-home .window.screen-flat { box-shadow:none; }

/* An un-tilted window into a spherical panorama; only the camera moves. */
.shared-home .window.screen-panorama { transform:none; box-shadow:none; }

/* Immersive panoramas fill the viewport behind the homepage composition. */
.shared-home .window.screen-immersive {
  position:absolute; inset:0; width:100%; height:100svh;
  transform:none; border:0; border-radius:0; opacity:1;
  box-shadow:none; will-change:auto;
}
.shared-home .window.screen-immersive::after {
  background:
    linear-gradient(to bottom, rgba(0,0,0,.88) 0%, rgba(0,0,0,.45) 16%, transparent 34%),
    linear-gradient(to top, rgba(0,0,0,.98) 0%, rgba(0,0,0,.85) 22%, rgba(0,0,0,.56) 42%, rgba(0,0,0,.16) 65%),
    linear-gradient(to right, rgba(0,0,0,.30), transparent 65%);
}
.shared-home .window.screen-immersive:focus-visible { outline-offset:-4px; }
/* Keep all image fades beneath the live text and navigation. */
.shared-home .window { z-index:0; isolation:isolate; }
.shared-home .stage > .titles,
.shared-home .stage > .links { z-index:2; }

/* Image brightness is independent of the readability gradients. */
.shared-home .window.screen-has-image { background-color:#000; }
.shared-home .window .floating-canvas,
.shared-home .window.screen-flat > img,
.shared-home .window:not(.webgl-ready) > img,
.shared-home .window .window-outgoing > img { opacity:var(--image-opacity,1); }
.screen-opacity-control { display:grid; gap:12px; margin:22px 0 26px; font:400 13px/1.4 var(--sans); }
.screen-opacity-control > span { display:flex; justify-content:space-between; gap:12px; letter-spacing:.08em; text-transform:uppercase; }
.screen-opacity-control output { letter-spacing:0; }
.screen-opacity-control input { width:100%; margin:0; accent-color:#eeeae0; }
.homepage-edge-label { position:fixed; z-index:45; pointer-events:none; padding:7px 11px; color:#eeeae0; background:rgba(0,0,0,.55); border-radius:2px; font:400 18px/1.2 var(--display); white-space:nowrap; text-shadow:0 1px 6px #000; }
.homepage-edge-label[hidden] { display:none; }

/* Fade the immersive space into black as the homepage cards expand. */
.shared-home .window.screen-immersive::before {
  content:""; position:absolute; inset:0; z-index:2;
  pointer-events:none; background:#000;
  opacity:calc(var(--g,0) * .94);
}
