/* Rune Nissen – Shortform (/shortform, shortform/index.html): seventeen upright clips from four projects (POWER,
   Transitions, Cases, RuneNP Brand Deals), on the light creme (board E "Casen ude til venstre" in the canvas). Each
   project: the client big on top, under it the case in a column at the left of its clips, which glide sideways on a
   rail when there are more than three, and a line under each clip; the clips look as on the wall in Alt arbejde and
   play under the mouse (a tap on phones, where they are swiped and the case is the first stop). Rune pushes the first
   brand deal and leans on POWER's last clip with his phone. Each part comes in as it scrolls into
   view (js/shortform.js). The burger and menu are the front page's (css/menu.css), the footer is the subpages'
   own (css/footer.css). */
body.sf { background: var(--creme); color: var(--petrol-900); }
:where(.sf) :is(h1, h2, h3, p) { margin: 0; }
.sf .logo { color: var(--petrol-900); }
/* (clipped at the sides: Rune with his phone starts 28px to the right of his place before he comes in, which at about
   1024px wide would let the page scroll a few px sideways until his row is in) */
.sf-main { --pad: clamp(20px, 3.9vw, 56px); overflow-x: clip; }
.sf-sm { font-family: 'Smooch Sans', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; line-height: .88; }
:where(.sf) ul { margin: 0; padding: 0; list-style: none; }

/* ---------- The name ---------- */
.sf-top { display: grid; grid-template-columns: 1fr minmax(260px, 400px); align-items: end; gap: 24px 64px; padding: 150px var(--pad) 20px; }
.sf-count { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(13,26,28,.6); }
.sf-count::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px rgba(13,26,28,.28); }
.sf-top h1 { font-size: clamp(64px, 11.7vw, 168px); line-height: .8; }
.sf-lede { font-size: 18px; line-height: 1.55; color: rgba(13,26,28,.72); }

/* ---------- A project: the client on top, then the case at the left of its clips ---------- */
/* --cw is a clip's width: the case's column, three clips and Rune leaning on POWER's last one (.53 of a clip past its
   edge, plus air) fill the row, so every row keeps one clip size (100cqw is the project's own width) */
.sf-proj { --gap: clamp(16px, 2.2vw, 32px); --case: clamp(230px, 19.5vw, 280px); --cw: min(300px, (100cqw - var(--case) - 3 * var(--gap) - 40px) / 3.53); padding: 120px var(--pad) 0; container-type: inline-size; }
.sf-head { padding-top: 22px; border-top: 1px solid rgba(13,26,28,.16); }
.sf-n { font-size: 12px; font-weight: 500; letter-spacing: .2em; color: rgba(13,26,28,.5); }
.sf-head h2 { margin-top: 12px; font-size: clamp(72px, 8.9vw, 128px); line-height: .8; }
/* The row: the case's column, then the rail with the clips. A fourth clip and more glide in on the rail, the next one
   peeking in at the screen's edge, with arrows and a dot per clip under it (.sf-nav, js/shortform.js); a clip snaps to
   the rail's start. The rail runs out to the screen's edge and has room over and under it for a clip lifting under the
   mouse and for its shadow. POWER's rail runs on past its last clip by Rune and some air, so at its end the rail
   stops with a whole clip at its start */
.sf-row { display: grid; grid-template-columns: var(--case) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: 56px; }
.sf-rail { margin: -16px calc(-1 * var(--pad)) -48px 0; padding: 16px var(--pad) 48px 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sf-rail::-webkit-scrollbar { display: none; }
.sf-clips { display: flex; gap: var(--gap); width: max-content; }
/* (a width as well as the basis: WebKit sizes the list from its items' own widths, which for the lines under the clips
   would be a whole sentence on one line) */
.sf-clips > li { flex: none; width: var(--cw); scroll-snap-align: start; }
.sf-clips > .sf-lean { margin-right: calc(var(--cw) * .5281 + 40px); }
/* The case, top to top with the clips: its title, a lead in full colour, a short body and the lime stroke */
.sf-case { margin-right: 24px; padding-top: 2px; }
.sf-case h3 { font-family: 'Smooch Sans', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: .06em; line-height: .9; text-transform: uppercase; }
.sf-case .sf-lead { margin-top: 14px; font-size: 17px; line-height: 1.45; color: var(--petrol-900); text-wrap: pretty; }
.sf-case p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: rgba(13,26,28,.66); text-wrap: pretty; }
.sf-case::after { content: ''; display: block; width: 32px; height: 3px; margin-top: 22px; background: var(--lime); }
/* Under each clip a line on what it is, as long as it needs (POWER's run to four or five lines) */
.sf-line { margin-top: 18px; padding-right: 4%; font-size: 15px; line-height: 1.5; color: rgba(13,26,28,.7); text-wrap: pretty; }
.sf-line.is-todo { color: rgba(13,26,28,.45); }

/* A clip, as on the wall: upright behind glass edges; under the mouse the viewfinder closes in, the rec dot blinks,
   it lifts a little and plays (the still lies under the video until it runs) */
.sf-card { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #DCD5C6; color: var(--creme); font: inherit; text-align: left; container-type: inline-size; box-shadow: 0 34px 60px -38px rgba(13,26,28,.6); }
button.sf-card { cursor: pointer; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
button.sf-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.sf-card img, .sf-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-card img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.sf-card video { opacity: 0; transition: opacity .25s ease; }
.sf-card.is-playing video { opacity: 1; }
.sf-card::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; background: linear-gradient(165deg, rgba(255,255,255,.16) 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); }
.sf-card::before { --c: rgba(243,239,228,.92); --l: 7cqw; --t: 1.5px; content: ''; position: absolute; inset: 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); }
/* The play button: a lime disc with a petrol triangle (as on the menu's showreel), over the middle of the still; it
   shrinks away as the clip starts – a tap, or the mouse – and comes back when it stops */
.sf-play { position: absolute; left: 50%; top: 46%; z-index: 5; width: clamp(46px, 20cqw, 62px); aspect-ratio: 1; border-radius: 50%; background: var(--lime); box-shadow: 0 10px 26px rgba(5,10,11,.4), 0 0 0 6px rgba(243,239,228,.14); pointer-events: none; transform: translate(-50%, -50%); transition: opacity .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.sf-play::before { content: ''; position: absolute; left: 38%; top: 31%; width: 33%; height: 38%; background: var(--petrol-900); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.sf-card[aria-pressed="true"] .sf-play { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.sf-tag { position: absolute; top: 7cqw; left: 7cqw; z-index: 2; display: inline-flex; align-items: center; gap: .7em; padding: .65em 1em .65em .8em; border: 1px solid rgba(243,239,228,.16); border-radius: 999px; background: rgba(5,10,11,.5); font-size: clamp(9px, 3.6cqw, 12px); font-weight: 500; line-height: 1; letter-spacing: .18em; text-transform: uppercase; }
.sf-tag::before { content: ''; flex: none; width: .6em; height: .6em; border-radius: 50%; background: var(--lime); }
.sf-card.is-playing .sf-tag::before { animation: sf-rec 1s steps(1) infinite; }
@keyframes sf-rec { 50% { opacity: 0; } }
.sf-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: .5em; height: 46%; padding: 0 8cqw 8cqw; background: linear-gradient(180deg, rgba(5,10,11,0), rgba(5,10,11,.85)); }
.sf-info b { font-family: 'Smooch Sans', sans-serif; font-weight: 900; font-size: clamp(20px, 12cqw, 40px); line-height: .86; letter-spacing: .02em; text-transform: uppercase; }
.sf-info small { font-size: clamp(11px, 4.4cqw, 14px); color: rgba(243,239,228,.72); }
@media (hover: hover) {
  button.sf-card:hover { transform: translateY(-6px); box-shadow: 0 46px 70px -40px rgba(13,26,28,.72); }
  button.sf-card:hover img { transform: scale(1.04); }
  button.sf-card:hover::before { opacity: 1; transform: none; }
}
/* Rune with his phone leans on POWER's last clip: his shoulder blades rest on its right edge without coming over it
   (each frame is tipped about his feet until they do), his feet on its foot line, a head lower than it. The box is the
   frame he moves in (378×1104, the edge .0132 of the way in; tools/build-telefon.py). The loop runs only while he is
   on screen; until then, and with reduced motion, the still under it stands (js/shortform.js). His shoes are cut off
   in the frames, so his feet fade into a shadow. He and the card share a box (.sf-hold), so the line goes under both. */
.sf-lean, .sf-hold { position: relative; }
.sf-rune { --w: 53.5%; position: absolute; bottom: 0; left: calc(100% - var(--w) * .0132); z-index: 2; width: var(--w); aspect-ratio: 378 / 1104; pointer-events: none; }
.sf-rune img, .sf-rune video { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to top, transparent, #000 4.5%); mask-image: linear-gradient(to top, transparent, #000 4.5%); }
.sf-rune video { opacity: 0; transition: opacity .25s ease; }
.sf-rune.is-playing video { opacity: 1; }
.sf-rune.is-playing img { opacity: 0; transition: opacity 0s .25s; }
.sf-rune::after { content: ''; position: absolute; left: 12%; right: 3%; bottom: -2.2%; z-index: -1; height: 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(13,26,28,.3), rgba(13,26,28,.12) 55%, rgba(13,26,28,0)); }

/* Rune pushes Spontan's first clip from its left: his palm flat on its edge, his feet on its foot line, leaning in
   with his legs crossed (#4; a loop forward and back, tools/build-skub.py: the box 456×802, his palm .9912 of the way
   in). His row makes room for him: the rail reaches back over the gap and the case's margin, and the first clip's
   place is wider by what he needs past that, so the case keeps 16px clear of him and every row keeps one clip size */
.sf-pushed { --x: max(0px, var(--cw) * .8 + 16px - 24px - var(--gap)); }
.sf-pushed .sf-rail { margin-left: calc(-24px - var(--gap)); padding-left: calc(24px + var(--gap)); scroll-padding-left: calc(24px + var(--gap)); }
.sf-clips > .sf-pushee { width: calc(var(--cw) + var(--x)); padding-left: var(--x); }
.sf-push { --w: 80%; position: absolute; bottom: 0; right: calc(100% - var(--w) * .0088); z-index: 2; width: var(--w); aspect-ratio: 456 / 802; pointer-events: none; }
.sf-push img, .sf-push video { position: absolute; inset: 0; width: 100%; height: 100%; }
.sf-push video { opacity: 0; transition: opacity .25s ease; }
.sf-push.is-playing video { opacity: 1; }
.sf-push.is-playing img { opacity: 0; transition: opacity 0s .25s; }
.sf-push::after { content: ''; position: absolute; left: -4%; bottom: -1.6%; z-index: -1; width: 50%; height: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(13,26,28,.28), rgba(13,26,28,.1) 55%, rgba(13,26,28,0)); }

/* A place still to fill: a phone drawn in line */
.sf-card.is-empty { display: grid; place-items: center; background: #E8E2D5; box-shadow: none; }
.sf-card.is-empty::after { background: none; box-shadow: inset 0 0 0 1px rgba(13,26,28,.12); }
.sf-card.is-empty svg { width: 30%; fill: none; stroke: rgba(13,26,28,.32); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.sf-card.is-empty .sf-info { background: none; }
.sf-card.is-empty .sf-info b { color: rgba(13,26,28,.38); }
.sf-card.is-empty .sf-info small { color: rgba(13,26,28,.42); }

/* ---------- Coming in: the name rises out of its line, the line over the project draws, the rest fades up and the
   clips follow one by one, each clip's line a beat after it (html.sf-anim is set in the head; js/shortform.js gives
   each part .is-in) ---------- */
.sf-mask { display: block; overflow: hidden; padding: .1em 0 .04em; margin: -.1em 0 -.04em; }
.sf-rise { display: inline-block; }
.sf-anim [data-reveal] .sf-rise { transform: translateY(112%); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.sf-anim [data-reveal] .sf-fade { opacity: 0; transform: translateY(14px); transition: opacity .5s ease .22s, transform .6s cubic-bezier(.2,.8,.2,1) .22s; }
.sf-anim [data-reveal] :is(.sf-row > .sf-case, .sf-clips > li) { opacity: 0; transform: translateY(56px) scale(.97); transition: opacity .5s ease calc(.3s + var(--i, 0) * 90ms), transform .75s cubic-bezier(.2,.8,.2,1) calc(.3s + var(--i, 0) * 90ms); }
.sf-anim [data-reveal] .sf-rune { opacity: 0; transform: translateX(28px); transition: opacity .4s ease .9s, transform .55s cubic-bezier(.2,.8,.2,1) .9s; }
.sf-anim [data-reveal] .sf-push { opacity: 0; transform: translateX(-28px); transition: opacity .4s ease .9s, transform .55s cubic-bezier(.2,.8,.2,1) .9s; }
.sf-anim [data-reveal] .sf-line { opacity: 0; transform: translateY(8px); transition: opacity .45s ease calc(.55s + var(--i, 0) * 90ms), transform .5s cubic-bezier(.2,.8,.2,1) calc(.55s + var(--i, 0) * 90ms); }
.sf-anim [data-reveal] .sf-nav { opacity: 0; transition: opacity .45s ease .8s; }
.sf-anim [data-reveal].is-in :is(.sf-rise, .sf-fade, .sf-row > .sf-case, .sf-clips > li, .sf-rune, .sf-push, .sf-line, .sf-nav) { opacity: 1; transform: none; }
.sf-anim .sf-head { border-top-color: transparent; background: linear-gradient(rgba(13,26,28,.16), rgba(13,26,28,.16)) no-repeat 0 0 / 0 1px; transition: background-size .9s cubic-bezier(.6,0,.2,1); }
.sf-anim .sf-proj.is-in .sf-head { background-size: 100% 1px; }

/* ---------- Under a rail that glides: an arrow either side of a dot per clip, the clips in full view long and dark;
   a dot brings its clip to the rail's start (to the middle on phones). Only while the rail has more than it shows:
   js/shortform.js sets .is-still otherwise ---------- */
.sf-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 28px 0 0 calc(var(--case) + var(--gap)); }
.sf-nav.is-still { display: none; }
.sf-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(13,26,28,.2); border-radius: 50%; background: none; color: var(--petrol-900); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease; -webkit-tap-highlight-color: transparent; }
.sf-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-arrow:disabled { opacity: .3; cursor: default; }
.sf-arrow:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (hover: hover) {
  .sf-arrow:hover:not(:disabled) { border-color: var(--petrol-900); background: var(--petrol-900); color: var(--creme); }
}
/* 24px tall to tap; the long one 20px */
.sf-dots { display: flex; }
.sf-dots button { display: block; padding: 9px 3px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sf-dots button::before { content: ''; display: block; width: 6px; height: 6px; border-radius: 3px; background: rgba(13,26,28,.22); transition: width .25s ease, background-color .25s ease; }
.sf-dots button[aria-current="true"]::before { width: 20px; background: var(--petrol-900); }
.sf-dots button:focus-visible { outline: 2px solid var(--lime); outline-offset: 0; border-radius: 6px; }

/* Too narrow for the column: the case goes over the rail, which then runs out to both edges; clips that fit are
   centred (room either side for Rune: 3 clips + 2 × .53 = 4.06), more glide from the left. Brand deals' first clip
   keeps Rune's room at its left */
@media (max-width: 1180px) {
  .sf-proj { --cw: min(340px, (100cqw + 2 * var(--pad) - 2 * var(--gap) - 32px) / 4.06); }
  .sf-row { grid-template-columns: minmax(0, 1fr); }
  .sf-case { max-width: 640px; margin: 0 0 12px; }
  .sf-rail, .sf-pushed .sf-rail { margin-left: calc(-1 * var(--pad)); padding-left: var(--pad); scroll-padding-left: var(--pad); }
  .sf-clips { margin: 0 auto; }
  .sf-clips > .sf-pushee { width: calc(var(--cw) * 1.8); padding-left: calc(var(--cw) * .8); }
  .sf-nav { margin-left: 0; }
}
@media (max-width: 1000px) {
  .sf-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .sf-top { gap: 22px; padding: 118px 20px 0; }
  .sf-lede { font-size: 16px; }
  .sf-proj { padding: 80px 20px 0; }
  .sf-head { gap: 16px; padding-top: 16px; }
  .sf-head h2 { font-size: 72px; }
  /* The row swiped sideways: the case first, then the clips, the one in the middle in focus with the next peeking in
     (the rail and its list step aside, so the case and the clips are the row's own stops) */
  .sf-row { display: flex; gap: 14px; margin: 28px -20px 0; padding: 0 15vw 0 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .sf-row::-webkit-scrollbar { display: none; }
  .sf-rail, .sf-clips { display: contents; }
  .sf-row > .sf-case, .sf-clips > li { flex: none; width: 70vw; scroll-snap-align: center; }
  .sf-row > .sf-case { max-width: none; margin: 0 10px 0 0; scroll-snap-align: start; scroll-margin-left: 20px; }
  .sf-case h3 { font-size: 22px; }
  .sf-case .sf-lead { font-size: 16px; }
  .sf-case p { font-size: 14px; line-height: 1.55; }
  .sf-line { margin-top: 12px; padding-right: 0; font-size: 14px; line-height: 1.45; }
  /* Every clip stops in the middle of the screen. Rune keeps his place beside his clip – pushing Spontan's first, leaning
     on POWER's last – and is not a stop of his own, so he may stand partly off the screen */
  .sf-clips > .sf-pushee { width: 70vw; padding-left: 0; margin-left: calc(56vw - 12px); }
  .sf-clips > .sf-lean { margin-right: calc(70vw * .5281 + 16px - 15vw); }
  .sf-card { border-radius: 12px; }
  /* Only the dots under the swiped row, so it reads as something to swipe: 20px of air between the row and them */
  .sf-nav { margin-top: 11px; }
  .sf-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-card, .sf-card img, .sf-card video, .sf-card::before, .sf-play { transition: none !important; }
  .sf-card.is-playing .sf-tag::before { animation: none; }
  .sf-dots button::before, .sf-arrow { transition: none; }
}
