/* LLL — Selected works, trial "screen" version (selected-works,
   client, 2026-11-17). Loaded after works.css; changes only the look of an
   open case. The story opens as a Mac window over the wall, the wall
   darkened behind it as behind her lets-talk window; its own title bar and
   traffic lights are her pixels (media/cases/win-*.webp, cut from
   lets-talk-plastic.webp). Inside: the text, previous/next project and a
   monitor whose glass is an Instagram post (4:5), with three simple keys on
   the glass (her mockup). A click outside the window, or any of the three
   lights, closes it (works.js). Earlier tries: backups/2026-11-17-ekran-*. */

/* Behind the window: the wall itself (no MS Moda painting), only darkened —
   to half its brightness, as measured in her mockup — never blurred (client). */
.is-screen .case-paint { display: none; }
.is-screen .niche.is-case .niche-dim {
  z-index: 3;
  background: rgba(0, 0, 0, .5);
}

/* The bar over the darkened wall: the main page's bar, its labels clearer
   than usual; "selected works" (this page) plain white, brighter than the
   rest, no glow (client); "let's talk" always in full colour. */
.is-screen .niche.is-plain ~ .head {
  background: linear-gradient(rgba(11,10,9,.36), rgba(11,10,9,.18));
  box-shadow: 0 10px 22px -6px rgba(0,0,0,.5);
  color: var(--ink);
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.is-screen .niche.is-plain ~ .head .head-burger i { box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.is-screen .niche.is-case ~ .head .head-menu,
.is-screen .niche.is-case ~ .head .head-link { opacity: .72; }
.is-screen .niche.is-case ~ .head .head-link[aria-current="page"],
.is-screen .niche.is-case ~ .head .head-menu:hover,
.is-screen .niche.is-case ~ .head .head-link:hover,
.is-screen .niche.is-case ~ .head .head-menu:focus-visible,
.is-screen .niche.is-case ~ .head .head-link:focus-visible,
.is-screen .niche.is-case ~ .head .head-menu[aria-expanded="true"] { opacity: 1; }
.is-screen .niche.is-case ~ .head .head-link[aria-current="page"] { color: #fff; }
.is-screen .niche.is-case ~ .head .head-cta { opacity: 1; }

/* The window, measured from her mockup (2026-11-17, 674-px column, 1cqw =
   6.74 px): 76cqw wide, 12cqw from each side (on a phone at least 8 px from
   the screen's edge), 126.7cqw tall, in the middle of the space under the
   bar; title bar 6.5cqw; 3.3cqw inside margins; type 2.4cqw (never under
   10 px). */
.is-screen .case {
  --bar: 6.5cqw;   /* as in her mockup at every size (a 30-px minimum made it taller and crowded "Back to selected works") */
  left: max(12cqw, calc((100cqw - 100vw) / 2 + 8px));
  right: max(12cqw, calc((100cqw - 100vw) / 2 + 8px));
  top: calc(32px + env(safe-area-inset-top) / 2 + 50% - var(--drop));
  translate: 0 -50%;
  padding: calc(var(--bar) + 1.8cqw) 3.3cqw 10.2cqw;
  font-size: max(2.4cqw, 10px);
  border-radius: 1.9cqw 1.9cqw 1.2cqw 1.2cqw;
  background: linear-gradient(180deg, #ececef 0%, #e6e7ea 50%, #e1e2e6 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    0 0 0 1px rgba(60, 64, 72, .28),
    0 2.4cqw 6cqw rgba(0, 0, 0, .45),
    0 .6cqw 1.6cqw rgba(0, 0, 0, .25);
  overflow: hidden;
}
.is-screen .case.is-open { transform: none; }

/* Title bar: her bar, stretched only sideways; her traffic lights at its
   left, scaled with it (crop 238 × 88 of a 101-px bar, 30 px in, 8 px down). */
.win-bar { display: none; }
.is-screen .win-bar {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--bar);
  background: url("../media/cases/win-bar.webp?v=1") 0 0 / 100% 100%;
}
.is-screen .win-bar::before {
  content: "";
  position: absolute;
  left: calc(var(--bar) * 30 / 101);
  top: calc(var(--bar) * 8 / 101);
  width: calc(var(--bar) * 238 / 101);
  height: calc(var(--bar) * 88 / 101);
  background: url("../media/cases/win-lights.webp?v=1") 0 0 / 100% 100%;
  pointer-events: none;
}
/* The three lights, as on a Mac (client, 2026-11-17): red closes, yellow
   minimises, green fills the screen under the bar; their signs show when
   the group is pointed at. Lights measured in her bar: 41 / 121 / 201 px,
   56 px. */
.win-close {
  position: absolute;
  left: calc(var(--bar) * 41 / 101);
  top: calc(var(--bar) * 21 / 101);
  width: calc(var(--bar) * 216 / 101);
  height: calc(var(--bar) * 56 / 101);
  z-index: 1;
}
.win-btn {
  position: absolute;
  top: 0;
  width: calc(var(--bar) * 56 / 101);
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: var(--cur-hand, pointer);
  -webkit-tap-highlight-color: transparent;
}
.win-btn i {
  font: 600 calc(var(--bar) * .36)/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-style: normal;
  opacity: 0;
  transition: opacity .15s ease;
}
.win-btn:nth-child(1) { left: 0; color: rgba(90, 0, 0, .72); }
.win-btn:nth-child(2) { left: calc(var(--bar) * 80 / 101); color: rgba(90, 50, 0, .78); }
.win-btn:nth-child(3) { left: calc(var(--bar) * 160 / 101); color: rgba(10, 60, 0, .78); }
.win-close:hover i, .win-btn:focus-visible i { opacity: 1; }
.win-btn:focus { outline: none; }
/* Full screen: works.js scales the whole window, proportions kept, into
   the room under the bar; the bar stays in sight (client). */
.is-screen .case { transform-origin: 0 0; }   /* the same pivot in and out of full screen: no jump */
.win-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 400 calc(var(--bar) * .44)/1 "Lucida Grande", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: #1d1d1f;
  pointer-events: none;
}

.is-screen .case-title { margin: 2.1cqw 0 2.6cqw; font-size: 7cqw; }
/* Label 19.8cqw, text beside it (mockup). */
.is-screen .story-text { grid-template-columns: 19.8cqw minmax(0, 1fr); gap: 0; }
.is-screen .story-texts { height: max(24.1cqw, 10em); margin: 0; }   /* mockup: text top to "previous project"; the longest slide (6 lines) fits */
/* Extra pictures past the last label keep its words standing still: the
   same slide again, so no fade-in (client, 2026-11-17: nothing twice). */
.is-screen .story-text.is-cont.is-on { animation: none; }
.is-screen .case-pn { margin: 0 0 3.8cqw; }   /* the monitor a little lower (client) */
.is-screen .pn-btn { font-size: max(2.4cqw, 10px); }

/* The monitor (mockup): housing 44.8cqw wide, glass 40.1cqw (4:5), centred. */
.is-screen .crt {
  position: relative;
  width: 44.8cqw;
  margin: 0 auto;
  padding: 2.7cqw 2.35cqw 5.2cqw;
  box-sizing: border-box;
  border-radius: 3cqw;
  background: linear-gradient(180deg, #f6f6f4 0%, #ecebe8 60%, #e2e0dc 100%);
  box-shadow:
    inset 0 .3cqw 0 #fff,
    inset 0 -.6cqw 1cqw rgba(80, 76, 70, .14),
    0 .3cqw 0 #cfccc6,
    0 1.6cqw 3cqw -.8cqw rgba(30, 28, 26, .35);
}
/* Three vents under the glass. */
.is-screen .crt::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.6cqw;
  width: 3cqw;
  height: 2cqw;
  translate: -50% 0;
  background: repeating-linear-gradient(90deg, #6f6a63 0 .35cqw, transparent .35cqw 1.1cqw) center / 2.6cqw 100% no-repeat;
  opacity: .55;
}
.is-screen .story-stage {
  aspect-ratio: 4 / 5;   /* an Instagram post (client) */
  border-radius: 10% / 8%;
  background: #141713;
  box-shadow:
    0 0 0 .55cqw #34312d,
    0 0 0 1.1cqw #d9d7d2,
    0 0 0 1.25cqw #bdb9b2;
}
/* The glass: a soft vignette and one light reflection, no scan lines (client:
   each client's pictures must look as they are). Never catches a tap. */
.is-screen .story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .03) 30%, transparent 46%),
    radial-gradient(ellipse 80% 75% at 50% 48%, transparent 70%, rgba(0, 0, 0, .22) 100%);
  box-shadow: inset 0 0 1.6cqw rgba(0, 0, 0, .3);
}
/* Each picture framed for the 4:5 glass (--fx / --focus per picture: the
   pot, the duck leg, the plate in the middle). Two pictures of one slide
   (Old Garden) take the whole glass in turn, the second fading in halfway;
   the slide lasts twice as long (data-shots, case.js). */
.is-screen .story-media { object-position: var(--fx, 50%) var(--focus, 35%); }
.is-screen .story-pair { display: block; }
.is-screen .story-pair > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) var(--focus, 35%); }
.is-screen .story-pair.is-on img:last-child { animation: pair-in var(--ms, 6000ms) linear both; }
@keyframes pair-in { 0%, 46% { opacity: 0; } 54%, 100% { opacity: 1; } }
.is-screen .story.is-paused .story-pair img, .is-screen .story.is-paused .steam,
.is-screen .story.is-paused .steam i { animation-play-state: paused; }

/* Steam rising from her pot (og-1a): soft white wisps over the photo, the
   photo itself untouched; gone when the duck comes in. */
.steam { display: none; }
.is-screen .steam {
  display: block;
  position: absolute;
  left: 46%;
  top: 14%;
  width: 40%;
  height: 52%;
  pointer-events: none;
}
.is-screen .story-pair.is-on .steam { animation: steam-out var(--ms, 6000ms) linear both; }
@keyframes steam-out { 0%, 46% { opacity: 1; } 54%, 100% { opacity: 0; } }
.is-screen .steam i {
  position: absolute;
  bottom: 0;
  left: var(--x);
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .18) 45%, transparent 70%);
  filter: blur(6px);
  opacity: 0;
  animation: steam-rise 3.2s ease-out infinite;
  animation-delay: var(--d);
}
.is-screen .steam i:nth-child(1) { --x: 18%; --d: 0s; }
.is-screen .steam i:nth-child(2) { --x: 34%; --d: .65s; }
.is-screen .steam i:nth-child(3) { --x: 8%;  --d: 1.3s; }
.is-screen .steam i:nth-child(4) { --x: 40%; --d: 1.95s; }
.is-screen .steam i:nth-child(5) { --x: 24%; --d: 2.6s; }
@keyframes steam-rise {
  0%   { opacity: 0;   transform: translate(0, 0) scale(.5); }
  20%  { opacity: .75; }
  100% { opacity: 0;   transform: translate(-14%, -150%) scale(1.5); }
}
@media (prefers-reduced-motion: reduce) { .is-screen .steam { display: none; } }
/* The slide lines: short, simple, centred at the top of the glass (mockup). */
.is-screen .story-bars { left: 11%; right: 11%; top: 6.9%; gap: 1.7cqw; }
.is-screen .story-bars i { height: 2px; }

/* Three simple keys on the glass, at its foot (client's mockup): back,
   stop (play while held), faster — round, frosted, white signs. */
.is-screen .story-ctl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4.2%;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 3.7cqw;
  margin: 0;
  translate: none;
}
.is-screen .story-key:nth-child(n) {
  display: grid;
  place-items: center;
  width: max(4.15cqw, 24px);   /* mockup: a tenth of the glass's width */
  height: max(4.15cqw, 24px);
  border-radius: 50%;
  background: rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  color: #fff;
  transition: background .15s ease, transform .09s ease-out;
}
.is-screen .story-key svg { width: 46%; height: 46%; fill: currentColor; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.is-screen .story-key:hover, .is-screen .story-key:focus-visible { background: rgba(255, 255, 255, .38); }
.is-screen .story-key.is-down { transform: scale(.92); filter: none; background: rgba(255, 255, 255, .45); }
.is-screen .story-key .k-play { display: none; }
.is-screen .story.is-held .story-key .k-stop { display: none; }
.is-screen .story.is-held .story-key .k-play { display: block; }

/* Rebecca's SpaceX post as an Instagram carousel (client, 2026-11-17): five
   pages swiped right to left within the slide (--ms), each held a beat.
   No "1/5" counter: wherever it sat, it covered some of her words. */
/* No words of hers under the story bars (client: they become unreadable):
   each page sits lower by --dy, the gap above in the post's own black. */
.is-screen .story-carousel { overflow: hidden; background: #0b0b0b; }
.is-screen .car-track { display: flex; width: 500%; height: 100%; }
.is-screen .car-track img { width: 20%; height: 100%; object-fit: cover; flex: none; -webkit-user-drag: none; transform: translateY(var(--dy, 0%)); }
/* Pages with words (Rebecca's SpaceX post) sit lower; photos (MS Moda) fill the glass. */
.is-screen .car-text .car-track img { --dy: 5%; }
.is-screen .car-text .car-track img:first-child { --dy: 0%; }   /* the cover: its logo already clears the bars */
.is-screen .story-carousel.is-on .car-track { animation: car-swipe var(--ms, 7500ms) both; }
@keyframes car-swipe {
  0%, 16% { transform: translateX(0); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  20%, 36% { transform: translateX(-20%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  40%, 56% { transform: translateX(-40%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  60%, 76% { transform: translateX(-60%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  80%, 100% { transform: translateX(-80%); }
}
/* Six pages (MS Moda, client 2026-11-19: one picture more, now 9 s in all). */
.is-screen .car-6 .car-track { width: 600%; }
.is-screen .car-6 .car-track img { width: calc(100% / 6); }
.is-screen .car-6.is-on .car-track { animation-name: car-swipe-6; }
@keyframes car-swipe-6 {   /* five pages of 1.4 s, the last held 2 s (client: it ended too soon) */
  0%, 11.5% { transform: translateX(0); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  15.5%, 27% { transform: translateX(-16.6667%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  31%, 42.5% { transform: translateX(-33.3333%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  46.5%, 58% { transform: translateX(-50%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  62%, 73.5% { transform: translateX(-66.6667%); animation-timing-function: cubic-bezier(.3, .6, .15, 1); }
  77.5%, 100% { transform: translateX(-83.3333%); }
}
.is-screen .story.is-paused .car-track { animation-play-state: paused; }

/* The speaker key (client, 2026-11-17): on a film with its own sound only,
   top right under the story bars, like Instagram's; one of her round keys. */
.is-screen .story-sound { position: absolute; top: 11%; right: 8%; z-index: 2; }
.is-screen .story:not(.has-sound) .story-sound { display: none; }
.is-screen .story-sound .k-off, .film-muted .is-screen .story-sound .k-on { display: none; }
.film-muted .is-screen .story-sound .k-off { display: block; }
.is-screen .story-sound svg { width: 54%; height: 54%; }

/* A film whose words sit right at its top (MS Moda's trend reel, client
   2026-11-17): its true 3:4 shape, the glass's full width, set 5 % lower
   so the top label clears the story bars (label at 6.7 % of the film; the
   bars end at ~7.6 % of the glass); the thin band above is its own frame,
   blurred — the fog carries on. The foot (the swan) slips under the keys. */
.is-screen .story-fit { overflow: hidden; background: #d9dcdc; }
.is-screen .story-fit::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: var(--bg) center top / cover no-repeat;
  filter: blur(14px);
}
.is-screen .story-fit video {
  position: absolute;
  left: 0;
  top: 5%;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Enlarge the screen (client, 2026-11-19: "a button so the screen grows to
   about 70 % of the Mac window"). A fourth key in the row on the glass,
   always visible (no hover-only: a phone has no hover, and growing under a
   passing mouse would cover the words while one reads). works.js moves the
   monitor to the middle of the window and scales it; the words behind
   step back. The same key, Esc or a click beside the monitor brings it back. */
.is-screen .crt { transition: transform .4s cubic-bezier(.2, .8, .2, 1); transform-origin: 50% 50%; }
.is-screen .story.is-big .crt { z-index: 5; box-shadow: inset 0 .3cqw 0 #fff, inset 0 -.6cqw 1cqw rgba(80, 76, 70, .14), 0 .3cqw 0 #cfccc6, 0 3cqw 7cqw -1cqw rgba(30, 28, 26, .5); }
.is-screen .case .story-texts, .is-screen .case .case-pn, .is-screen .case .case-title, .is-screen .case .case-nav { transition: opacity .3s ease; }
.is-screen .case:has(.story.is-big) :is(.story-texts, .case-pn, .case-title, .case-nav) { opacity: .12; }
.is-screen .story-grow .k-shrink, .is-screen .story.is-big .story-grow .k-grow { display: none; }
.is-screen .story.is-big .story-grow .k-shrink { display: block; }
@media (prefers-reduced-motion: reduce) { .is-screen .crt { transition: none; } }
