/* Rune Nissen – Stills (/stills, stills/index.html): Rune's stills on the same dark wall as Alt arbejde on the front
   page, as the page's first screen (boards Stills and StillsMobil in the canvas), each a photo in a frame of 4:5; a
   click shows one large over everything (.still-lb). Then the footer on the wall's dark (css/footer.css).
   js/stills.js builds and moves the wall and shows the stills large. The burger and menu are the front page's
   (css/menu.css). */
body.st { background: #050A0B; color: var(--creme); }
:where(.st) :is(h1, h2, h3, p) { margin: 0; }
:where(.st) ul { margin: 0; padding: 0; list-style: none; }
.st .logo { color: var(--creme); }

/* ---------- The wall of stills, as Alt arbejde ---------- */
.stills { position: relative; z-index: 1; background: #050A0B; color: var(--creme); }
.stills-head { position: relative; z-index: 3; padding: 132px clamp(20px, 4vw, 56px) 32px; pointer-events: none; }
.stills-count { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(243,239,228,.6); }
.stills-count::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(212,238,106,.7); }
.stills-title { font-family: 'Smooch Sans', sans-serif; font-weight: 900; font-size: clamp(72px, 8.4vw, 120px); line-height: .8; letter-spacing: .02em; text-transform: uppercase; }

/* Without the script: a plain grid, each still a link to the large one */
.stills-view { position: relative; }
.stills-plane { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 0 clamp(20px, 4vw, 56px) 56px; }
.stills-light, .stills-hint, .stills-cursor, .stills-filter, .stills-open, .stills-close { display: none; }

/* A still: the photo filling a frame of 4:5 behind the wall's glass edges. Under the mouse the viewfinder closes in,
   the photo comes a touch closer and its name rises in; without a mouse the one nearest the middle of the wall
   shows its name (.is-near) */
.still-card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r, 16px); background: #0E1718; color: var(--creme); text-decoration: none; container-type: inline-size; box-shadow: 0 24px 50px -20px rgba(0,0,0,.9); -webkit-user-drag: none; }
.still-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); -webkit-user-drag: none; }
.still-card.is-hover .still-img { transform: scale(1.05); }
/* Glass: a bright rim, light catching the top edge, a hint of colour fringing at the sides */
.still-card::after {
  content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 26%);
  box-shadow: inset 0 0 0 1px rgba(243,239,228,.16), inset 0 1.5px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(255,255,255,.08),
    inset 4px 0 8px -5px rgba(255,96,150,.5), inset -4px 0 8px -5px rgba(96,214,255,.5), inset 0 0 30px rgba(255,255,255,.06);
}
/* The viewfinder: four corners close in around the still under the mouse */
.still-card::before {
  --c: rgba(243,239,228,.92); --l: 5cqw; --t: 1.5px;
  content: ''; position: absolute; inset: 3.5cqw; z-index: 4; pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  opacity: 0; transform: scale(1.06); transition: opacity .2s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.still-card.is-hover::before, .still-card:focus-visible::before, .still-card.is-focus::before { opacity: 1; transform: none; }
.still-card:focus-visible, .still-card.is-focus { outline: 2px solid var(--lime); outline-offset: 4px; }
.still-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: .5em; height: 42%; padding: 0 6cqw 5.5cqw; background: linear-gradient(180deg, rgba(5,10,11,0), rgba(5,10,11,.8) 55%, rgba(5,10,11,.94)); opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
.still-info b { font-family: 'Smooch Sans', sans-serif; font-weight: 900; font-size: clamp(20px, 10cqw, 56px); line-height: .84; letter-spacing: .02em; text-transform: uppercase; }
.still-info small { font-size: clamp(11px, 3.6cqw, 16px); letter-spacing: .03em; color: rgba(243,239,228,.74); }
.still-card:is(.is-hover, .is-near, .is-focus) .still-info { opacity: 1; transform: none; }
.stills:not(.is-live) .still-info { opacity: 1; transform: none; }
@media (hover: hover) {
  .stills:not(.is-live) .still-card:hover .still-img { transform: scale(1.05); }
  .stills:not(.is-live) .still-card:hover::before { opacity: 1; transform: none; }
}

/* ---- The wall (js/stills.js places each still in 3D and moves them) ---- */
.stills.is-live { height: 100vh; height: 100svh; min-height: 560px; }
.stills.is-live .stills-head { position: absolute; top: 0; left: 0; padding: clamp(96px, 12.4svh, 112px) clamp(20px, 3.6vw, 52px); }
.stills.is-live .stills-view { position: absolute; inset: 0; overflow: hidden; overflow: clip; perspective: var(--persp, 1400px); touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.stills.is-live.is-dragging .stills-view { cursor: grabbing; }
/* The list stays in the page for screen readers and the keyboard; a still in focus is brought to the middle */
.stills.is-live .stills-plane { position: absolute; top: 50%; left: 50%; display: block; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stills.is-live .stills-plane > li { position: absolute; top: 0; left: 0; }
.stills-stage { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.stills-cell { position: absolute; top: 0; left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform; pointer-events: auto; }
.stills-cell > .still-card { width: 100%; height: 100%; aspect-ratio: auto; }
/* The dark round the edges (--lr from the script), and over the top, under the name */
.stills.is-live .stills-light { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle var(--lr, 900px) at 50% 50%, rgba(5,10,11,0) 0, rgba(5,10,11,0) 38%, rgba(5,10,11,.55) 72%, #050A0B 100%); }
.stills.is-live .stills-view::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: clamp(240px, 33svh, 300px); z-index: 2; background: linear-gradient(180deg, rgba(5,10,11,.8), rgba(5,10,11,0)); pointer-events: none; }
/* The types, in a glass bar along the bottom */
.stills.is-live .stills-filter { display: flex; position: absolute; left: 50%; bottom: clamp(18px, 3.4svh, 34px); z-index: 4; gap: 2px; max-width: calc(100% - 24px); padding: 5px; overflow-x: auto; border: 1px solid rgba(243,239,228,.14); border-radius: 999px; background: rgba(16,25,26,.66); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); transform: translateX(-50%); scrollbar-width: none; overscroll-behavior-x: contain; }
.stills-filter::-webkit-scrollbar { display: none; }
.stills-filter button { flex: none; display: inline-flex; align-items: baseline; gap: 6px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: rgba(243,239,228,.78); font: 500 12px/38px 'Jost', sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.stills-filter button[hidden] { display: none; }
.stills-filter button sup { font-size: 9px; letter-spacing: .06em; color: rgba(243,239,228,.42); }
.stills-filter button:hover { background: rgba(243,239,228,.08); color: var(--creme); }
.stills-filter button[aria-pressed="true"] { background: var(--lime); color: var(--petrol-900); }
.stills-filter button[aria-pressed="true"] sup { color: rgba(13,26,28,.55); }
.stills-filter button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.stills.is-live .stills-hint { display: flex; position: absolute; left: 50%; bottom: calc(clamp(18px, 3.4svh, 34px) + 62px); z-index: 3; align-items: center; gap: 10px; margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(5,10,11,.62); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; transform: translateX(-50%); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
/* With no filter on the page (the stills have no types yet) the hint takes its place at the foot */
.stills.is-live:not(:has(.stills-filter)) .stills-hint { bottom: clamp(18px, 3.4svh, 34px); }
.stills-hint b { font-weight: 500; }
.stills-hint span { color: var(--lime); animation: stills-nudge 1.6s ease-in-out infinite; }
.stills-hint span:last-child { animation-direction: reverse; }
.stills.has-dragged .stills-hint, .stills.is-fit .stills-hint { opacity: 0; transform: translate(-50%, 8px); }
@keyframes stills-nudge { 50% { transform: translateX(-3px); } }
/* Coming in, and after a new filter, the stills come up from the middle outwards (--d) */
.stills.is-switching .stills-stage { opacity: 0; transition: opacity .15s ease; }
.stills.stills-in .stills-cell > .still-card { animation: stills-in .5s cubic-bezier(.2,.8,.2,1) var(--d, 0ms) both; }
@keyframes stills-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; } }
/* The pointer becomes a ring that says what a press does: drag the wall, or see the still */
.stills.is-live.has-cursor .stills-view, .stills.is-live.has-cursor .still-card { cursor: none; }
.stills.is-live.has-cursor .stills-cursor { display: grid; position: absolute; top: 0; left: 0; z-index: 5; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 1.5px solid rgba(243,239,228,.85); border-radius: 50%; font-size: 8.5px; font-weight: 500; letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; color: var(--creme); pointer-events: none; opacity: 0; transition: opacity .2s ease, width .2s ease, height .2s ease, margin .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; }
.stills.is-live.has-cursor .stills-cursor.is-on { opacity: 1; }
.stills.is-live.has-cursor .stills-cursor.is-card { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-color: var(--lime); background: var(--lime); color: var(--petrol-900); }
.stills.is-live.is-dragging .stills-cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
/* A few stills (a filter) are laid out once, as large as fits: nothing to drag, the ring only over a still */
.stills.is-live.is-fit .stills-view { cursor: default; }
.stills.is-live.has-cursor.is-fit .stills-cursor:not(.is-card) { opacity: 0; }
/* On phones the wall drifts behind frosted glass; Udforsk opens it over the whole screen to drag any way, Luk closes
   it. .stills-spacer keeps the section's place in the page meanwhile */
html.has-wall, html.has-lb { overflow: hidden; }
.stills.is-live.is-open { position: fixed; inset: 0; z-index: 40; height: auto; min-height: 0; margin: 0; }
.stills.is-live.is-open .stills-view { touch-action: none; }

/* ---------- A still large: over everything, in its own shape, with its name, its number and the way on ---------- */
.still-lb { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 96px 132px 64px; background: rgba(5,10,11,.92); color: var(--creme); opacity: 0; transition: opacity .25s ease; touch-action: pan-y; }
.still-lb[hidden] { display: none; }
.still-lb.is-on { opacity: 1; }
.still-lb-fig { display: flex; flex-direction: column; gap: 18px; max-width: 100%; margin: 0; }
.still-lb-fig img { display: block; max-width: min(1176px, calc(100vw - 264px)); max-height: calc(100vh - 230px); max-height: calc(100svh - 230px); border-radius: 14px; background: #0E1718; box-shadow: 0 40px 80px -30px #000; transform: scale(.96); transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s ease; -webkit-user-drag: none; user-select: none; }
.still-lb.is-on .still-lb-fig img { transform: none; }
.still-lb.is-turning .still-lb-fig img { opacity: .35; }
.still-lb-fig figcaption { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.still-lb-fig figcaption b { font-family: 'Smooch Sans', sans-serif; font-weight: 900; font-size: 36px; line-height: .86; letter-spacing: .02em; text-transform: uppercase; }
.still-lb-fig figcaption small { font-size: 14px; color: rgba(243,239,228,.66); }
.still-lb-n { margin-left: auto; font-size: 12px; font-weight: 500; letter-spacing: .22em; white-space: nowrap; color: rgba(243,239,228,.6); }
.still-lb-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin-top: -28px; padding: 0; border: 1px solid rgba(243,239,228,.2); border-radius: 50%; background: rgba(16,25,26,.7); color: var(--creme); font: 400 20px/1 'Jost', sans-serif; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.still-lb-nav:hover { border-color: var(--lime); background: var(--lime); color: var(--petrol-900); }
.still-lb-prev { left: clamp(16px, 3vw, 44px); }
.still-lb-next { right: clamp(16px, 3vw, 44px); }
.still-lb-close { position: absolute; top: 28px; right: clamp(16px, 3vw, 44px); display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px 0 12px; border: 1px solid rgba(243,239,228,.16); border-radius: 999px; background: rgba(16,25,26,.7); color: var(--creme); font: 500 12px/1 'Jost', sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.still-lb-close span { font-size: 18px; line-height: 1; }
.still-lb :is(.still-lb-nav, .still-lb-close):focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
/* Behind a still large the wall itself is blurred (Safari leaves the 3D stills out of a backdrop-filter), and what
   lies on it gives way */
html.has-lb .stills.is-live .stills-view { filter: blur(10px) saturate(1.1); }
html.has-lb .stills.is-live :is(.stills-hint, .stills-filter, .stills-head, .stills-close) { opacity: 0; }
/* Over a still large, or the open wall, the burger would cover Luk */
html.has-wall .burger, html.has-lb .burger { opacity: 0; visibility: hidden; pointer-events: none; }

@media (max-width: 699px) {
  .stills-head { padding: 96px 20px 20px; }
  .stills-plane { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 40px; }
  .stills.is-live .stills-head { padding: 84px 20px; }
  .stills.is-live .stills-title { font-size: 72px; }
  .stills.is-live .stills-view::before { height: 240px; }
  .stills.is-live .stills-hint { bottom: 118px; }
  .stills.is-live:not(:has(.stills-filter)) .stills-hint { bottom: 28px; }
  .stills.is-live:not(.is-open) .stills-hint { display: none; }
  /* At first the wall is only a glimpse: it drifts on behind frosted glass, and Udforsk stands big in the middle (a
     tap anywhere on the wall opens it too, js/stills.js), as Alt arbejde on the front page. The wall itself is
     blurred (Safari leaves the 3D stills out of a backdrop-filter), the dark laid over it. The filters wait for the
     open wall; a filter of a few lays them out plainly, with no glass */
  .stills.is-live .stills-view { transition: filter .3s ease; }
  .stills.is-live:not(.is-open):not(.is-fit) .stills-view { filter: blur(8px) saturate(1.1); }
  .stills.is-live .stills-view::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(120% 70% at 50% 52%, rgba(5,10,11,.3), rgba(5,10,11,.74)); opacity: 0; transition: opacity .3s ease; }
  .stills.is-live:not(.is-open):not(.is-fit) .stills-view::after { opacity: 1; }
  .stills.is-live:not(.is-open):not(.is-fit) .stills-filter { display: none; }
  .stills.is-live:not(.is-open):not(.is-fit) .stills-open { display: flex; position: absolute; left: 50%; top: 52%; z-index: 4; flex-direction: column; align-items: center; gap: 16px; padding: 0; border: 0; background: none; color: var(--creme); transform: translate(-50%, -50%); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .stills-open-key { display: inline-flex; align-items: center; gap: 12px; min-height: 68px; padding: 2px 34px 0 28px; border-radius: 999px; background: var(--lime); color: var(--petrol-900); font: 900 40px/1 'Smooch Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 24px 50px -16px rgba(0,0,0,.9); animation: stills-call 2.4s ease-out infinite; }
  .stills-open-key svg { width: 22px; height: 22px; margin-top: -2px; }
  .stills-open small { font: 500 11px/1 'Jost', sans-serif; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; color: rgba(243,239,228,.8); }
  .stills-open:active .stills-open-key { transform: scale(.97); }
  @keyframes stills-call { 0% { box-shadow: 0 24px 50px -16px rgba(0,0,0,.9), 0 0 0 0 rgba(212,238,106,.5); } 70%, 100% { box-shadow: 0 24px 50px -16px rgba(0,0,0,.9), 0 0 0 18px rgba(212,238,106,0); } }
  .stills.is-live.is-open .stills-close { display: inline-flex; position: absolute; top: 22px; right: 20px; z-index: 4; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px 0 12px; border: 1px solid rgba(243,239,228,.16); border-radius: 999px; background: rgba(16,25,26,.7); color: var(--creme); font: 500 12px/1 'Jost', sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
  .stills-close span { font-size: 18px; line-height: 1; }
  .stills-open:focus-visible, .stills-close:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
  .stills.is-live .stills-filter { bottom: 18px; }
  /* The still large: across the screen, its name under it, the arrows along the bottom */
  .still-lb { flex-direction: column; padding: 84px 14px 132px; }
  .still-lb-fig img { max-width: calc(100vw - 28px); max-height: calc(100svh - 260px); border-radius: 10px; }
  .still-lb-fig figcaption { flex-wrap: wrap; gap: 8px 12px; }
  .still-lb-fig figcaption b { font-size: 30px; }
  .still-lb-nav { top: auto; bottom: 48px; margin: 0; }
  .still-lb-prev { left: calc(50% - 68px); }
  .still-lb-next { right: calc(50% - 68px); }
  .still-lb-close { top: 22px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .still-img, .still-info, .still-lb, .still-lb-fig img { transition: none; }
  .still-card.is-hover .still-img { transform: none; }
  .stills-hint span, .stills-open-key { animation: none; }
  .stills.is-live .stills-view, .stills.is-live .stills-view::after { transition: none; }
}
