/* An island: a device on a stone, rendered in Blender (blaze_web_test/scena, the island editor's pipeline), with a real project film
   laid into its screen. The home's references use the same files (assets/islands/hero/); this is the subpages' version
   (instead of the CSS laptop, which floated in the air on nothing). Built by assets/island.js.
   Markup: <div class="island" data-island="/assets/islands/<name>/" data-clip="<project>" data-label="…"></div>
   Files: rock.webp (the render, the screen cut out), spill.webp (the screen's light on the stone), island.json (size, screen corners) */

.island { position: relative; aspect-ratio: var(--ar, 1.3); }
.island__float { position: absolute; inset: 0; will-change: transform, opacity;
  /* the stone runs out of the render at the bottom: it fades into the page instead of ending in a straight line */
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%); mask-image: linear-gradient(to bottom, #000 70%, transparent 97%); }
.island__float > * { position: absolute; }
.island__img { inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.island__spill { opacity: var(--spill, 0); transition: opacity .25s linear; }
.island__screen { left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: #000; }
.island__screen video, .island__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.island__screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;   /* the glass: a soft glare, as on the home */
  background: linear-gradient(118deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .02) 34%, transparent 46%); }
/* a phone's display has a thin black border inside the frame (without it the film ran to the
   metal and the phone did not look real); in the screen's own 1600 px wide space, about 1.3 mm of a 67 mm wide display */
.island--phone .island__screen::after { box-shadow: inset 0 0 0 calc(var(--sw, 1600px) * .019) #040405,
  inset 0 0 calc(var(--sw, 1600px) * .012) calc(var(--sw, 1600px) * .019) rgba(4, 4, 5, .85); }   /* the border, its inner edge soft */
.island--phone .island__screen video, .island--phone .island__screen img { filter: brightness(.93) contrast(1.04); }
/* the glass over the film, so it does not look pasted in: a soft sheen from the top left, the bottom a little in shadow
   where the stone is, and the black border; the film sits under the glass instead of on top of it */
.island--phone .island__screen::after { background:
  linear-gradient(122deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .04) 26%, transparent 40%),
  linear-gradient(to bottom, transparent 58%, rgba(0, 0, 0, .22) 100%); }
/* the sound: small and quiet, in the screen's own space so it lies on the glass with the film; --k keeps it about 30 px on the page
   (22 px was too small, the cross was three pixels) */
.island__sound { position: absolute; z-index: 2; right: calc(var(--sw, 1600px) * .019 + 9px * var(--k, 4)); bottom: calc(var(--sw, 1600px) * .019 + 9px * var(--k, 4));
  width: calc(30px * var(--k, 4));
  aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .42); color: #f8f8f8;
  opacity: .55; cursor: pointer; transition: opacity .25s ease; pointer-events: auto; }
.island__sound:hover, .island__sound:focus-visible { opacity: 1; }
.island__sound:focus-visible { outline: calc(2px * var(--k, 4)) solid var(--fg); outline-offset: calc(2px * var(--k, 4)); }
.island__sound svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.island__sound svg path:first-child { fill: currentColor; stroke: none; }
