/* Alex Broadstock — portfolio
   Two themes: body.dark (Directing, film, about) and body.light (Photography). */

/* Fonts:
   · PP Mori (Pangram Pangram): Semibold is the site's text (it holds up over
     moving video); Regular is a separate family, used only for the longer,
     quieter reading: the awards on About and a film's description and
     credits. Both are the licensed web fonts (.woff2, v2.7).
   · Fragment Mono (free, SIL Open Font License, from Google Fonts): only the
     editing tools in your local preview. (The time numbers under a film's
     timeline are PP Mori, with its evenly spaced numbers.)
   · DIRECTOR and PHOTOGRAPHER are Helvetica Neue Bold, from the visitor's own
     computer (see .corner). */
/* PP Mori: the licensed web fonts (Semibold and Regular, v2.7) */
@font-face { font-family: "PP Mori"; src: url("../fonts/PPMori-Semibold.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori Regular"; src: url("../fonts/PPMori-Regular.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/FragmentMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --pad: 20px;
  --sans: "PP Mori", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fg: #fff;
  /* Three strengths of text, used everywhere:
     100%  what you're on, and the main actions (Play, the current film/series)
      80%  secondary links that must read over pictures (About, Back, Mute…)
      30%  everything at rest (other films, categories, clients, your name)  */
  --quiet: .4; --middle: .8;   /* (quiet was 30%: raised to 40% so the resting words read over bright films and in sunlight) */
  --dim: rgba(255, 255, 255, var(--quiet));
  --bg: #000;
  /* Vertically the page is a 7-row grid inside the margins. The side lists,
     film list, laurels, film player row and photo labels all sit on the
     first row line. */
  --row: calc((100vh - 2 * var(--pad)) / 7);
  --mid: calc(var(--pad) + var(--row));

  /* 12-column grid: --cN is where column N starts (--step: one column plus its gutter) */
  --gutter: 12px;
  --col: calc((100vw - 2 * var(--pad) - 11 * var(--gutter)) / 12);
  --step: calc(var(--col) + var(--gutter));
  --c2: calc(var(--pad) + var(--step));
  --c4: calc(var(--pad) + 3 * var(--step));
  --c6: calc(var(--pad) + 5 * var(--step));

  /* Type size: 15px up to a 1600px-wide screen, then growing gently with the
     width to 19px on a 2560px studio display (and no bigger). --fs-s is the
     small numbers (11px at 15px). Phones set their own sizes below. */
  --fs: clamp(15px, calc(15px + (100vw - 1600px) * .0042), 19px);
  --fs-s: calc(var(--fs) * .7333);
}
body.light { --fg: #000; --dim: rgba(0, 0, 0, var(--quiet)); --bg: #fff; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 var(--fs)/1.06 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color .5s ease, color .5s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- corner navigation ---------- */
.corner {
  position: fixed; z-index: 50;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* DIRECTOR and PHOTOGRAPHER stay in Helvetica; everything else is PP Mori */
  font-weight: 700; font-size: var(--fs); text-transform: uppercase; letter-spacing: 0;
  color: var(--dim); padding: 6px 0; line-height: 1;
  /* trim the type to the letters themselves (cap height to baseline), so the
     visible words sit exactly --pad from the edges of the window */
  text-box: trim-both cap alphabetic;
  transition: color .25s ease, opacity .4s ease;
}
.corner:hover, .corner.on { color: var(--fg); }
.tl { top: calc(var(--pad) - 6px); left: calc(var(--pad) - 1px); }   /* -1px: the D's built-in side space */
.tr { top: calc(var(--pad) - 6px); right: var(--pad); }
.tp { display: none; }   /* (phones only: the + between DIRECTOR and PHOTOGRAPHER) */
.bl { bottom: calc(var(--pad) - 6px); left: var(--pad); }
.bm { bottom: calc(var(--pad) - 6px); }   /* (its column: see .bm below) */
/* on the Directing home the other corners step back so the film list leads */
body.directing .corner:not(.on):not(:hover) { color: rgba(255, 255, 255, var(--quiet)); }

/* Your name and About: set like the film list (same font, size and case, not
   bold). Your name sits quieter; About is brighter. About lines up with the
   brand column (columns 2–3, right-aligned like the client names). */
/* Photography page: every corner word is drawn in negative, like the labels on
   that page (white with "difference" blending): dark on the white page, the
   negative of any photo running underneath. No boxes. */
.tl, .tr { transition: color .25s ease, opacity .4s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
body.photography .corner, body.photography .bz { mix-blend-mode: difference; }
body.photography .corner { --fg: #fff; color: rgba(255, 255, 255, var(--quiet)); }
body.photography .corner.on, body.photography .corner:hover { color: #fff; }
body.photography .bm { color: rgba(255, 255, 255, var(--middle)); }
/* While the Photography page is still wiping in, the corner words don't
   blend (re-blending against moving pages every frame makes the wipe stutter):
   Photographer sits over the white page coming in, so it's plain black; the
   others sit over the dark page going out, so they keep their light colours.
   They switch back to the negative the moment the wipe lands. */
body.curtain-to-light .corner, body.curtain-to-light .bz { mix-blend-mode: normal; }
body.curtain-to-light .tr { color: #000; }
/* Director → Photographer: nothing changes colour on the click. The white
   page wipes in over the Director page, so its words and laurels stay white
   until the edge reaches them and covers them; the corner words, which sit
   above both pages, change colour as the edge passes each one (crossCorners
   in js/site.js). The Director page keeps its own white text while it's
   still showing, even though the page has already switched to Photography's
   colours underneath. */
body.curtain-to-light #view-directing { --fg: #fff; --dim: rgba(255, 255, 255, var(--quiet)); }

/* A hint that the other page is right next door: hovering the other page's
   name eases the word in from the edge a little, as if peeling the page back.
   Photographer moves left on the Director page; Director moves right on
   Photography. */
body.directing #nav-photography:hover { transform: translate3d(-12px, 0, 0); }
body.photography #nav-directing:hover { transform: translate3d(12px, 0, 0); }

/* Grid view: two separate buttons, "Zoom in" and "Zoom out", starting on
   column 5, in About's type, drawn in negative like the other corner words.
   Each click zooms the pile a step in or out. */
.bz {
  bottom: calc(var(--pad) - 6px); left: calc(var(--pad) + 4 * var(--step)); padding: 0;
  display: flex; gap: 18px;
  font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: -0.01em;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.bz button { padding: 6px 0; line-height: 1; text-box: trim-both cap alphabetic; }
body.grid:not(.photo-ordering) .bz { opacity: 1; pointer-events: auto; }
body.curtain-to-light .bz { opacity: 0; }
/* the moment the wipe lands, the words switch to their resting look with no fade (see landWipe in js/site.js) */
body.curtain-land :is(.corner, .bz, .bz button, #photo-toggle, #photo-toggle *, #photo-series, #photo-series *) { transition: none !important; }
/* only the button under the pointer brightens (not both, as the shared corner hover would) */
.bz button { color: rgba(255, 255, 255, var(--quiet)); transition: color .2s ease; }
.bz button:hover { color: #fff; }
@media (max-width: 900px) { .bz { display: none; } }   /* phones: no scroll-wheel zooming */

/* Edit (film pages, your computer only): set like About, on the next column (4) */
.be { bottom: calc(var(--pad) - 6px); left: var(--c4); color: rgba(255, 255, 255, var(--middle)); }
.be:hover, .be.on { color: #fff; }
.bl, .bm, .be {
  font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: -0.01em;
}
.bm { left: var(--c2); width: calc(2 * var(--step) - var(--gutter)); text-align: right; }
/* your name at rest (30%), About a step up (80%) */
.bl, body.directing .bl:not(.on):not(:hover) { color: rgba(255, 255, 255, var(--quiet)); }
.bm, body.directing .bm:not(.on):not(:hover) { color: rgba(255, 255, 255, var(--middle)); }
.bl:hover, .bm:hover, .bm.on { color: #fff; }
/* film page: Back and your name at 80%, so they read over a full-screen film */
body.film #nav-directing, body.film .bl { color: rgba(255, 255, 255, var(--middle)); }
body.film #nav-directing:hover, body.film .bl:hover { color: #fff; }
/* film page: "Back" is set like About (body font, regular weight, not capitals) */
body.film #nav-directing { font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: -0.01em; }

/* "backwards", not "both": once faded in, a view's opacity is free to change again (see body.leaving) */
.view { position: fixed; inset: 0; z-index: 10; animation: fade .5s ease backwards; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Directing and Photography sit side by side, Directing on the left and
   Photography on the right. Going to Photography, its page wipes in from the
   right edge while Directing drifts a little to the left; going back, Directing
   wipes in from the left and Photography drifts right. The incoming page's
   content starts a little offset and settles as the edge crosses, so it feels
   like sliding over to the next page. One slow start, a fast middle and a long
   soft landing. */
/* (plain percentages of the page's own width, 10% drift: every browser animates
   these smoothly, where mixing % and vw in one clip can jump and leave a sliver) */
@keyframes wipe-from-right {
  from { clip-path: inset(0% 0% 0% 90%); transform: translate3d(10%, 0, 0); }
  to { clip-path: inset(0% 0% 0% 0%); transform: translate3d(0, 0, 0); }
}
@keyframes wipe-from-left {
  from { clip-path: inset(0% 90% 0% 0%); transform: translate3d(-10%, 0, 0); }
  to { clip-path: inset(0% 0% 0% 0%); transform: translate3d(0, 0, 0); }
}
@keyframes drift-left { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-10%, 0, 0); } }
@keyframes drift-right { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(10%, 0, 0); } }
/* tell the browser up front which layers move, so it can slide them smoothly */
.curtain-in, .curtain-out { will-change: transform, clip-path; }
.curtain-in.from-right { animation: wipe-from-right 1s cubic-bezier(.5, .25, 0, 1) both; }
.curtain-in.from-left { animation: wipe-from-left 1s cubic-bezier(.5, .25, 0, 1) both; }
.curtain-out.to-left { animation: drift-left 1s cubic-bezier(.5, .25, 0, 1) both; }
.curtain-out.to-right { animation: drift-right 1s cubic-bezier(.5, .25, 0, 1) both; }
/* to Photography: the film preview stays up under the opening white page */
body.curtain-to-light #bg, body.curtain-to-light #bg-shade { opacity: 1 !important; transition: none; }
/* to Directing: the preview and the list open together over the photos */
/* the white page eases to black gently across almost the whole wipe, rather than dropping quickly */
body.curtain-to-dark #view-photography { z-index: 0; transition: background-color .9s cubic-bezier(.45, 0, .25, 1) .05s; }
/* the film's laurels wait until the page has fully arrived, then come in as usual */
body.curtain-to-dark #film-laurels .laurel { animation-play-state: paused; }
body.curtain-to-dark #bg, body.curtain-to-dark #bg-shade { transition: none; }

.side-list a, #film-list a, #photo-toggle a { color: var(--dim); transition: color .2s ease; }
.side-list a { display: block; padding: 1px 0; }
.side-list a:hover, .side-list a.on { color: var(--fg); }
/* Director page: everything you're not on (films, their clients, categories)
   sits at 30% white, so the highlighted film and category stand out clearly */
#film-filters a:not(.on):not(:hover), #film-list a { color: rgba(255, 255, 255, var(--quiet)); }

/* Each laurel is trimmed to its visible part (js/site.js, fitLaurel) and that
   part is shown --laurel-h tall, so they all read as the same size. */
/* 55px on big screens; on smaller ones they all shrink together with the
   columns (the widest laurel is about twice as wide as it is tall), so they
   keep one height and never run into each other */
:root { --laurel-h: min(calc(var(--fs) * 3.6667), calc(var(--col) * .5)); }   /* 55px at 15px type, growing with it */
.laurel { display: block; flex: none; height: var(--laurel-h); overflow: hidden; }
.laurel img { display: block; height: 100%; width: auto; }

/* ---------- background previews ---------- */
#bg, #bg-shade { position: fixed; inset: 0; z-index: 1; }
/* iPhones: run the film on past the edges, under the clock at the top and the
   home bar / Safari's toolbar at the bottom, rather than stopping short of them */
#bg, #bg-shade { top: calc(-1 * env(safe-area-inset-top, 0px)); bottom: calc(-1 * env(safe-area-inset-bottom, 0px)); }
#bg { background: #000; overflow: hidden; transition: opacity .5s ease; }
/* on a film page the preview stays up behind until the film itself is showing (body.film-ready) */
body.light #bg, body.light #bg-shade, body.film.film-ready #bg, body.film.film-ready #bg-shade { opacity: 0; pointer-events: none; }
#bg-shade { background: rgba(0, 0, 0, .34); pointer-events: none; transition: opacity .5s ease, background-color .5s ease; }
/* The incoming preview fades in on top; the outgoing one waits until it is
   covered before fading, so the screen never dips to black between films. */
.layer {
  position: absolute; inset: 0; opacity: 0; z-index: 1;
  transition: opacity .3s ease .45s;
  background: #000 center / cover no-repeat;     /* fills the screen, edges cropped */
}
.layer.shown { opacity: 1; transition: opacity .45s cubic-bezier(.33, 0, .2, 1); }
#stage iframe {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
}
.layer video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;   /* fills the screen, no black bars */
  pointer-events: none; opacity: 0;
}
.layer.playing video { opacity: 1; }
/* A film whose file has black bars built in (films.json "crop"): scale the
   picture inside the bars until it covers the screen, and centre it. --s is
   screen pixels per video pixel; the bars end up off-screen. */
.layer.crop {
  --s: max(calc(100vw / var(--cw)), calc(100vh / var(--ch)));
  --x: calc(50vw - var(--s) * (var(--cl) + var(--cw) / 2));
  --y: calc(50vh - var(--s) * (var(--ct) + var(--ch) / 2));
  background-size: calc(var(--s) * var(--W)) calc(var(--s) * var(--H));
  background-position: var(--x) var(--y);
}
.layer.crop video {
  inset: auto; left: var(--x); top: var(--y);
  width: calc(var(--s) * var(--W)); height: calc(var(--s) * var(--H)); object-fit: fill;
}

/* ---------- Directing home ----------
   col 1: categories · cols 2–3: client (right-aligned) · cols 4–5: title
   cols 6–12: laurels, one per column. Everything top-aligns on --mid. */
#view-directing { cursor: pointer; }   /* (a click on the film behind opens it) */
#film-filters, #film-laurels { cursor: default; }
#film-filters { position: absolute; left: var(--pad); top: var(--mid); z-index: 2; }
#film-index {
  position: absolute; top: var(--mid); left: var(--c2); width: calc(4 * var(--step) - var(--gutter)); bottom: 70px;
  overflow-y: auto; scrollbar-width: none;
}
#film-index::-webkit-scrollbar { display: none; }
#swipe-hint { margin: 2.2em 0 0; color: var(--fg); transition: opacity .5s ease; }
#swipe-hint.gone { opacity: 0; }
#film-list li a { display: flex; padding: 1px 0; }
/* Waterfall: the first title lands, then the rest drop in right behind it */
#film-list li {
  animation: drop .5s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(min(var(--i, 0), 1) * 70ms + var(--i, 0) * 24ms);
}
@keyframes drop { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
/* The client / Short Film column reads one step behind its title (24% at
   rest, 50% on the lit film), same type, so
   the titles lead and the column steps back. */
:root { --client-rest: rgba(255, 255, 255, .24); --client-on: rgba(255, 255, 255, .5); }
#film-list .client { width: calc(2 * var(--step) - var(--gutter)); text-align: right; flex: none; color: var(--client-rest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#film-list .title { margin-left: var(--gutter); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Hovered title: quick to light up, slower to let go, so a sweep down the list
   leaves a short fading trail behind the pointer. */
#film-list li a, #film-list li .client { transition: color .55s cubic-bezier(.3, 0, .2, 1); }
#film-list li.on a, #film-list li.on .client { color: var(--fg); transition-duration: .09s; }
#film-list li.on .client { color: var(--client-on); }
/* Laurels sit on columns 6+, centred vertically on the hovered film's row
   (js/site.js sets "top"); a fixed height keeps that centring exact. */
#film-laurels {
  position: absolute; top: var(--mid); left: var(--c6); height: calc(var(--laurel-h) + 17px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--col); column-gap: var(--gutter);
  align-items: center; justify-items: start; pointer-events: none;   /* each laurel starts on its column's line */
}
/* Laurels arrive a beat after the hover, left to right, each lifting slightly
   into place; when the film changes, the old ones fade away quickly first. */
#film-laurels .laurel {
  animation: laurel-in .5s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(.18s + var(--i, 0) * 90ms);
}
#film-laurels .laurel.out { animation: laurel-out .15s ease both; }
@keyframes laurel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes laurel-out { from { opacity: 1; } to { opacity: 0; } }
/* smaller laptops: titles take one more column so long names fit; laurels start on column 7 */
@media (max-width: 1300px) {
  #film-index { width: calc(5 * var(--step) - var(--gutter)); }
  #film-laurels { left: calc(var(--pad) + 6 * var(--step)); }
}

/* ---------- list editor (local preview only) ---------- */
#film-filters .edit-toggle { margin-top: 22px; font: 12px var(--mono); text-transform: uppercase; color: var(--dim); }
#film-filters .edit-toggle:hover { color: var(--fg); }
#film-filters .edit-status { display: block; margin-top: 4px; font: 11px var(--mono); text-transform: uppercase; color: var(--dim); }
body.list-editing #film-laurels { display: none; }
body.list-editing #film-index { width: auto; right: var(--pad); }
body.list-editing #film-list li, body.list-editing #film-others li { animation: none; display: flex; align-items: baseline; }
body.list-editing #film-list li a, body.list-editing #film-others li a { flex: none; width: calc(4 * var(--step) - var(--gutter)); cursor: inherit; }
body.list-editing #film-list li { cursor: grab; }
body.list-editing #film-list li:hover a, body.list-editing #film-list li:hover .client { color: var(--fg); }
#film-list li.dragging { opacity: .3; }
.cats { display: flex; gap: 14px; margin-left: var(--gutter); }
.cats button { font: 11px var(--mono); text-transform: uppercase; color: rgba(255, 255, 255, var(--quiet)); }
.cats button:hover { color: rgba(255, 255, 255, var(--middle)); }
.cats button.on { color: #fff; }
#film-others li.other a { display: flex; padding: 1px 0; }
#film-others li.other .client { width: calc(2 * var(--step) - var(--gutter)); text-align: right; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#film-others li.other .title { margin-left: var(--gutter); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#film-others .others-head { display: block; margin: 26px 0 6px calc(2 * var(--step)); font: 11px var(--mono); text-transform: uppercase; color: var(--dim); }
#film-others li.other a, #film-others li.other .client { color: rgba(255, 255, 255, var(--quiet)); }
#film-others li.other a:hover, #film-others li.other a:hover .client { color: rgba(255, 255, 255, var(--middle)); }

/* ---------- film page ---------- */
body.film { --dim: rgba(255, 255, 255, var(--middle)); }   /* Mute, Fullscreen, Info over the film: 80% */
/* The film page is see-through at first: the preview from the home page keeps
   playing behind it, and the film fades in over it once its first frames are
   showing (body.film-ready, set in js/site.js), so there's no drop to black. */
#stage, #stage-click, #info-shade { position: absolute; inset: 0; }
#stage { background: #000; opacity: 0; transition: opacity .8s cubic-bezier(.4, 0, .2, 1); }
body.film-ready #stage { opacity: 1; }
/* the dark layer also comes up while the controls show (mouse moving), so the
   timeline reads clearly; it goes with them. Not during the opening. */
body.film-ready:not(.idle) #info-shade { opacity: 1; }
body:not(.film-ready) #info-shade, body.intro-play #info-shade { opacity: 0 !important; }
#stage iframe { width: min(100vw, calc(100vh * var(--ar))); height: min(100vh, calc(100vw / var(--ar))); }
#stage.cover iframe { width: max(100vw, calc(100vh * var(--ar))); height: max(100vh, calc(100vw / var(--ar))); }
/* Bunny Stream films play in a plain video element */
#stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
#stage.cover video { object-fit: cover; }
#stage-click { cursor: pointer; }
/* Paused or showing Info: the same dark layer as the home page, no blur */
#info-shade { background: rgba(0, 0, 0, .34); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
body.info-open #info-shade, body.film-paused #info-shade { opacity: 1; }

#player-ui { transition: opacity .5s ease; }
/* while a film plays untouched the controls fade; Back, your name and About stay */
body.idle #player-ui, body.idle .corner:not(#nav-directing):not(#nav-name):not(#nav-about) { opacity: 0; }
body.idle #stage-click { cursor: none; }

/* Film page, one row on the grid at the height of the top of the film list
   (--mid), so the clicked title can rise into it:
   cols 2–3 Play (right-aligned, where the client names sit) · cols 4–9 the
   timeline · from column 10, Mute then Fullscreen (Mute sits the same one
   gutter after the line ends as Play sits before it starts). Info is at the
   bottom of the page on column 5, in line with your name and About.
   Everything is centred on --line, the middle of that row's capitals. */
#view-film { --line: calc(var(--mid) + var(--fs) * .5333); }   /* (8px at 15px type: the middle of the capitals) */
#player-ui button#play, #player-buttons button, #btn-info {
  font-family: var(--sans); font-weight: 400; font-size: var(--fs); letter-spacing: -0.01em;   /* the page's typeface, like the rest of the page */
  line-height: 1; padding: 8px 0; text-box: trim-both cap alphabetic;
}
#play {
  position: absolute; top: var(--line); transform: translateY(-50%); color: #fff;
  left: var(--c2); width: calc(2 * var(--step) - var(--gutter)); text-align: right;
}
#scrub {
  position: absolute; left: var(--c4); right: calc(var(--pad) + 3 * var(--step)); top: var(--line);
  height: 36px; transform: translateY(-50%); cursor: pointer; touch-action: none;
}
#scrub-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .85); transform-origin: left center; }
#scrub-tick { position: absolute; top: 25%; bottom: 25%; width: 1px; background: #fff; left: 0; }
#scrub-range { position: absolute; top: calc(50% - 1px); height: 3px; background: #fff; display: none; }
/* Time, in small numbers: the current time rides under the playhead
   (centred on it, held inside the line's ends), the length sits under the
   line's end, quieter. The length steps aside when the playhead reaches it. */
#scrub-time, #scrub-dur {
  position: absolute; top: calc(50% + 15px); font: var(--fs-s)/1 var(--sans); letter-spacing: 0;   /* PP Mori, with its evenly spaced (tabular) numbers so the time doesn't jiggle */   /* under the line, 6px clear of the playhead's end */
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  transition: opacity .25s ease;
}
#scrub-time { left: 0; color: rgba(255, 255, 255, var(--middle)); }
#scrub-dur { right: 0; color: rgba(255, 255, 255, var(--quiet)); }
#scrub-dur.covered { opacity: 0; }
#scrub-time:empty, #scrub-dur:empty { display: none; }
body.intro-play :is(#scrub-time, #scrub-dur), body.leaving-film :is(#scrub-time, #scrub-dur) { opacity: 0; }

/* Mute / Fullscreen: in line with the timeline, starting on column 10 */
#player-buttons {
  position: absolute; top: var(--line); transform: translateY(-50%); left: calc(var(--pad) + 9 * var(--step));
  display: flex; gap: var(--gutter);   /* Fullscreen sits one gutter after Mute, as Play sits before the line */
}
#player-buttons button, #btn-info { color: var(--dim); transition: color .2s ease; }
#player-buttons button:hover, #player-buttons button.on, #btn-info:hover, #btn-info.on { color: #fff; }
/* Info: bottom of the page, column 5, its baseline on the bottom margin */
#btn-info { position: absolute; left: calc(var(--pad) + 4 * var(--step)); bottom: calc(var(--pad) - 8px); }

/* Editing tools (only on your computer, and only after clicking Edit):
   icon buttons under the timeline, the loop range and a red line at the still. */
#edit-bar { position: absolute; left: calc(var(--c4) - 4px); top: calc(var(--line) + 34px);   /* below the time numbers */ display: flex; gap: 14px; align-items: center; }
#edit-bar button { display: block; width: 24px; height: 24px; padding: 4px; color: var(--dim); transition: color .2s ease; }
#edit-bar button:hover { color: #fff; }
#edit-bar svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
#btn-still:hover { color: #ff3b30; }
#edit-status { margin-left: 8px; font: 12px var(--mono); text-transform: uppercase; color: var(--dim); }
#scrub-still { position: absolute; top: 22%; bottom: 22%; width: 2px; margin-left: -1px; background: #ff3b30; display: none; pointer-events: none; }
body:not(.film-editing) #scrub-range, body:not(.film-editing) #scrub-still { display: none !important; }

/* Opening a film: the clicked title has risen to the top row of the list
   (.film-fly, below) and dissolves into Play; the timeline then draws out from
   column 4, where the title stood; Info / Mute / Fullscreen fade in last.
   These run every time the film view is shown. */
#play { animation: fade .4s ease .05s both; }
#play .play-word { display: inline-block; transform-origin: 50% 55%; backface-visibility: hidden; }   /* (turns when Play ⇄ Pause) */
/* during the opening only Play shows (body.intro-play); the timeline and
   buttons appear with the next mouse move, no animation of their own */
#scrub, #player-buttons, #edit-bar, #btn-info { transition: opacity .35s ease, color .2s ease; }
body.intro-play #player-buttons, body.intro-play #edit-bar, body.intro-play #btn-info { opacity: 0; pointer-events: none; }
/* …except the timeline: once Play has landed it draws out from column 4 to
   its end (body.line-draw), holds a beat with Play, then both fade together */
body.intro-play #scrub { pointer-events: none; }
/* at the end of the opening, Play and the line fade away a little quicker than the usual controls */
body.intro-play.idle #player-ui { transition: opacity .2s ease; }
body.intro-play #scrub-tick, body.intro-play #scrub-range, body.intro-play #scrub-still { opacity: 0; }
body.intro-play:not(.line-draw) #scrub-line { transform: scaleX(0); }
/* the same gesture and speed as the page wipes (Director ⇄ Photographer, About): 1s, slow start, fast middle, long soft landing */
body.line-draw #scrub-line { animation: line-draw 1s cubic-bezier(.5, .25, 0, 1) both; }
@keyframes line-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* The clicked film's row, lifted out of the list: it rises to the top row
   while the rest of the list fades, holds, then flips over (all at once) into
   "Play" (js/site.js, flyTitle). While it does (body.flying) the real Play is
   hidden and the timeline and buttons wait; then Play takes over in place. */
.film-fly {
  position: fixed; z-index: 60; display: flex; padding: 1px 0; pointer-events: none;
  font: 400 var(--fs)/1.06 var(--sans); letter-spacing: -0.01em; color: #fff; white-space: nowrap;
  transition: transform .5s cubic-bezier(.22, .9, .25, 1);
}
.film-fly .client { width: calc(2 * var(--step) - var(--gutter)); text-align: right; flex: none; color: var(--client-on); }
.film-fly .title { margin-left: var(--gutter); }
.flap-play { font-family: var(--sans); letter-spacing: -0.01em; color: #fff; }   /* (Play at full strength, though it sits in the client column) */
.film-fly .client, .film-fly .title { transform-origin: 50% 55%; backface-visibility: hidden; }
body.flying #play { opacity: 0; }
/* Back: the opening in reverse. The timeline draws back into its start, the
   buttons and dark layer fade, Play stays until it flips into the list. */
body.leaving-film #player-ui { opacity: 1; }
body.leaving-film #scrub-line { transform: scaleX(0); transition: transform 1s cubic-bezier(.5, .25, 0, 1); }   /* same gesture as the page wipes */
body.leaving-film #scrub-tick, body.leaving-film #scrub-range, body.leaving-film #scrub-still,
body.leaving-film #player-buttons, body.leaving-film #edit-bar, body.leaving-film #btn-edit, body.leaving-film #btn-info { opacity: 0; transition: opacity .25s ease; }
body.leaving-film #info-shade { opacity: 0 !important; }
body.flown #play { animation: none; }

/* Leaving the Directing home for a film: the words fade out first */
#view-directing { transition: opacity .28s ease; }
/* (Photographer keeps its colour fade and hover slide alongside this fade) */
#nav-photography { transition: opacity .28s ease, color .25s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
body.leaving #view-directing, body.leaving #nav-photography { opacity: 0; }

/* Info sits in the bottom right, on columns 10–12: laurels first, then the
   description, then the credits, whose last line sits on the same line as the
   words along the bottom (your name, About, Info). It grows upwards and
   scrolls if a film has more than fits below the timeline. */
#info {
  /* (--info-drop: the space under the last line's baseline, so that baseline lands on the footer's) */
  /* everything in this corner is set smaller, like the awards on About (80%: 12px at 15px type) */
  font-size: calc(var(--fs) * .8);
  --info-drop: calc(var(--fs) * .8 * .3);   /* the space under the last line's baseline at that size */
  position: absolute; left: calc(var(--pad) + 6 * var(--step)); right: var(--pad); bottom: calc(var(--pad) - var(--info-drop));
  padding-left: calc(3 * var(--step)); max-height: calc(100vh - var(--line) - 60px - var(--pad));
  overflow-y: auto; scrollbar-width: none; animation: fade .45s ease both;
}
#info::-webkit-scrollbar { display: none; }
#info, .about-awards { font-family: "PP Mori Regular", var(--sans); }   /* the longer, quieter reading in Regular */
#info-desc { margin: 0 0 30px; line-height: 1.2; color: #fff; }
#info-desc:empty { display: none; }
#info-title { display: none; }   /* (phones held upright only, below) */
/* roles right-aligned in columns 7–9, names starting on column 10, both quiet */
#info-credits {
  margin: 0 0 0 calc(-3 * var(--step)); font: inherit; line-height: 1.2;
  display: grid; grid-template-columns: calc(3 * var(--step) - var(--gutter)) 1fr; column-gap: var(--gutter);
}
#info-credits dt { color: rgba(255, 255, 255, var(--quiet)); text-align: right; }
#info-credits dd { margin: 0; color: rgba(255, 255, 255, var(--middle)); }
/* laurels on the grid: one per column across 10–12, starting on each column's
   left edge, wrapping onto another row when there are more than three */
#info-laurels {
  display: grid; width: calc(3 * var(--step) - var(--gutter));
  grid-template-columns: repeat(3, var(--col)); column-gap: var(--gutter); row-gap: 22px;
  align-items: center; justify-items: start; margin-bottom: 34px;   /* above the description */
}
#info-laurels:empty { display: none; }

/* ---------- Photography ---------- */
/* The view has its own white background so the labels below can blend with it */
#view-photography { overflow: hidden; background: var(--bg); }
/* Scroll | Grid and the series list are drawn in white with "difference"
   blending: black on the white page, the negative of the photo where one runs
   underneath. Same values as the Director page: the current item full
   strength, everything else at 30%. */
#photo-toggle, #photo-series { --fg: #fff; --dim: rgba(255, 255, 255, var(--quiet)); mix-blend-mode: difference; }
/* while the page wipes in they're drawn plain black instead (identical on the
   white page, and far cheaper while it's moving) */
body.curtain-to-light :is(#photo-toggle, #photo-series) { mix-blend-mode: normal; --fg: #000; --dim: rgba(0, 0, 0, var(--quiet)); }
#photo-toggle { position: absolute; z-index: 5; left: var(--pad); top: var(--mid); }
#photo-toggle .bar { margin: 0 7px 0 4px; color: var(--fg); font-weight: 400; }
#photo-toggle a.on, #photo-toggle a:hover { color: var(--fg); }
/* which photo you're on, and how many the series has (3 / 18); none in the grid */
#photo-count {
  /* under Scroll | Grid: which photo you're on, and how many (3 / 18) */
  display: block; margin-top: 6px; font-size: var(--fs-s); letter-spacing: 0;
  color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transform: translate3d(0, 6px, 0); pointer-events: none;
  transition: opacity .25s ease, transform .3s ease, color .2s ease;
}
/* Edit order (your computer only): the toggle under Scroll | Grid, then the
   series as a numbered grid between the labels, scrolling if it's long */
#photo-toggle .order-toggle { display: block; margin-top: 22px; font: 12px var(--mono); text-transform: uppercase; }
#photo-toggle .order-status { display: block; margin-top: 4px; font: 11px var(--mono); text-transform: uppercase; color: var(--dim); }
.order-grid {
  position: absolute; top: 0; bottom: 0; left: calc(var(--pad) + 2 * var(--step)); right: calc(var(--pad) + 2 * var(--step));
  overflow-y: auto; scrollbar-width: none; padding: 13vh 0;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 18px 12px;
}
.order-grid::-webkit-scrollbar { display: none; }
.order-tile { position: relative; height: 130px; cursor: grab; user-select: none; }
.order-tile img { height: 100%; width: auto; display: block; pointer-events: none; }
.order-tile .order-num { position: absolute; left: 0; top: calc(100% + 3px); font: 11px var(--mono); color: var(--dim); }
.order-tile.dragging { opacity: .3; }
body.photo-ordering #photo-series a { cursor: grab; }
#photo-series a.dragging { opacity: .3; }
#photo-toggle .order-add { display: block; margin-top: 8px; font: 12px var(--mono); text-transform: uppercase; }
/* a text slide in the editor: a card with its words; click to type */
.order-text, .order-tile textarea {
  width: 195px; height: 100%; padding: 12px; box-sizing: border-box;
  background: #f2f2f2; color: #000; font: 12px/1.35 var(--sans); text-align: center;
  display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: pre-wrap; cursor: text;
}
.order-tile textarea { display: block; border: 1px solid #000; resize: none; outline: none; }
.order-tile.writing { cursor: default; }

/* Text slides on the site: the words centred on the page, both ways */
.text-slide { padding: 0 var(--pad); }
.slide-text {
  max-width: 34em; text-align: center; white-space: pre-wrap;
  font: 400 20px/1.4 var(--sans); letter-spacing: -0.01em; color: #000;
}
@media (max-width: 900px) { .slide-text { font-size: 17px; } }
/* …and in the grid, a small card of its words in the pile */
#photo-grid a.pile-text {
  background: #f2f2f2; color: #000; display: flex; align-items: center; justify-content: center;
  padding: 8px; box-sizing: border-box; overflow: hidden; text-align: center;
  font: 400 clamp(6px, 0.55vw, 11px)/1.35 var(--sans); white-space: pre-wrap;
}
#photo-grid a.pile-text span { display: block; width: 100%; }
/* remove: a small × in the corner, shown on hover; it asks "Delete?" before removing */
.order-del {
  position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 6px;
  background: #fff; color: #000; font: 13px/20px var(--sans); text-align: center;
  opacity: 0; transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}
.order-tile:hover .order-del, .order-del.armed { opacity: 1; }
.order-del.armed { background: #c0392b; color: #fff; font: 11px/20px var(--mono); text-transform: uppercase; }
.order-tile.removing { opacity: 0; transform: scale(.94); transition: opacity .25s ease, transform .25s ease; }
body.photo-ordering #photo-grid { overflow: visible; }
#photo-count.shown {
  opacity: 1; transform: none;
  transition: opacity .4s ease .05s, transform .55s cubic-bezier(.2, .7, .2, 1) .05s, color .2s ease;
}
#photo-series { position: absolute; z-index: 5; right: var(--pad); top: var(--mid); text-align: right; }

/* One photo at a time, all stacked in the same place (nothing scrolls).
   Changing photo is a plain crossfade. The pointer becomes an arrow: on the
   left half of the screen it points back, on the right half forward, and a
   click goes that way (js/site.js). */
#photo-scroll { position: absolute; inset: 0; overflow: hidden; }
#photo-leave { position: absolute; inset: 0; pointer-events: none; }
#photo-scroll figure, #photo-peek figure, #photo-leave figure {
  /* as big as the screen allows, stopping just short of the corner words */
  position: absolute; inset: calc(var(--pad) + 22px) 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; z-index: 0;
}
/* Changing photo (js/site.js, crossChange): the new photo fades in on top with
   an exponential ease-out (quick, then settling softly), and the old one
   starts fading out just after, underneath it, so the new one always leads. */
#photo-scroll figure.on { opacity: 1; z-index: 1; }
#photo-scroll figure.under, #photo-leave figure { opacity: 1; z-index: 0; }
#photo-scroll figure.arrive { animation: fade .4s ease both; }
#photo-scroll figure.photo-in { animation: fade .6s cubic-bezier(.16, 1, .3, 1) both; }
#photo-scroll figure.photo-out, #photo-leave figure.photo-out { animation: photo-out .45s ease .12s both; }
@keyframes photo-out { from { opacity: 1; } to { opacity: 0; } }
/* the hover player changes photo the same way (js/site.js, showPeek) */
#photo-peek figure.on { opacity: 1; z-index: 1; }
#photo-peek figure.under { opacity: 1; z-index: 0; }
#photo-peek figure.photo-in { animation: fade .6s cubic-bezier(.16, 1, .3, 1) both; }
#photo-peek figure.photo-out { animation: photo-out .45s ease .12s both; }
/* Single-photo view: hovering a series name, its first photo fades in over
   the one you were on, which fades away underneath (like Next); moving off
   the list, your photo fades back in and the hover player fades away. */
#photo-scroll.peeking figure.on { animation: photo-out .45s ease .12s both; }
#photo-scroll.unpeek figure.on { animation: fade .6s cubic-bezier(.16, 1, .3, 1) both; }
/* a text slide has no picture to cover the one before, so it gets the page's
   white behind its words */
#photo-scroll figure.text-slide, #photo-peek figure.text-slide, #photo-leave figure.text-slide { background: var(--bg); inset: 0; }
#photo-scroll img, #photo-peek img, #photo-leave img { max-height: 100%; max-width: calc(100vw - 2 * var(--pad)); width: auto; height: auto; display: block; }
/* Hovering a series name (single-photo view): a white sheet over the current
   photo shows that series' photos one after another, then fades away when
   you move off the list. */
#photo-peek {
  position: absolute; inset: 0; z-index: 2; background: var(--bg); pointer-events: none;
  opacity: 0; transition: opacity .35s ease;
}
#photo-peek.on { opacity: 1; transition: opacity .3s ease; }
/* (single-photo view: no sheet; the photos themselves do the fading) */
body:not(.grid) #photo-peek { background: transparent; transition: opacity .45s ease .12s; }
body:not(.grid) #photo-peek.on { transition: none; }
/* The arrow is drawn by the page itself (a real pointer image can't change
   colour), following the pointer. Like the labels it's white with
   "difference" blending: black on the white page, the negative of whatever
   photo is underneath. */
#photo-scroll.go-prev, #photo-scroll.go-next { cursor: none; }
/* The pointer over a photo is a word: "Next" on the right half, "Previous" on
   the left, centred on the pointer, white with difference blending so it reads
   as the negative of whatever is underneath. */
#photo-cursor {
  position: fixed; left: 0; top: 0; z-index: 6; transform-origin: 0 0;
  pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity .15s ease;
  color: #fff; font: 400 calc(var(--fs) * .8667)/1 var(--sans); letter-spacing: -0.01em; white-space: nowrap;
}
#photo-cursor span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
#photo-cursor .w-prev, #photo-cursor.prev .w-next { display: none; }
#photo-cursor.prev .w-prev { display: inline; }
#photo-cursor.on { opacity: 1; }
body.grid #photo-cursor { display: none; }

/* Grid: the whole series as one organic pile on a single screen (laid out in
   js/site.js, layoutPile), between the labels on columns 3–10. Each photo
   rises and fades in on its own, from the middle of the pile outwards. */
#photo-grid { position: absolute; inset: 0; overflow: hidden; }
/* opening a series from the grid: the grid fades away as its first photo fades in */
#photo-grid.leaving { opacity: 0; pointer-events: none; transition: opacity .35s ease; }
#photo-grid .pile { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
#photo-grid .pile.smooth { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
/* zoomed in: the page can be dragged around */
#photo-grid.zoomed { cursor: grab; }
#photo-grid.zoomed.dragging { cursor: grabbing; }
#photo-grid.dragging a { pointer-events: none; }
#photo-grid img { -webkit-user-drag: none; user-select: none; }   /* (photos never get picked up: a drag moves the pile) */
#photo-grid a {
  position: absolute; display: block; opacity: 0; transform: translate3d(0, 14px, 0);
  transition: left .5s cubic-bezier(.2, .7, .2, 1), top .5s cubic-bezier(.2, .7, .2, 1), width .5s cubic-bezier(.2, .7, .2, 1), height .5s cubic-bezier(.2, .7, .2, 1);
}
#photo-grid a.ready { animation: thumb-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes thumb-in { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
#photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s ease; }

/* (if the site's lists fail to load: a plain line and the email, instead of a blank page) */
.load-failed { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: var(--pad); text-align: center; color: rgba(255, 255, 255, var(--middle)); z-index: 60; }
.load-failed p { margin: 0; }
#photo-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--dim); text-align: center; line-height: 1.4; }

/* ---------- About ---------- */
/* About: a slightly see-through white page that wipes up from the bottom over
   whatever is open (Director, a film or Photographer), its edge sweeping up
   while the page underneath drifts a little upwards; closing runs it back
   down. Your words are black on it. (Closed, it sits just below the bottom
   edge: shifted down 10% with only its own bottom 10% showing, off-screen.) */
#about-card {
  position: fixed; inset: 0; z-index: 45; overflow-y: auto;
  /* (no white while it's closed: iPhone Safari colours its top and bottom
     bars from full-screen layers like this one, even hidden ones, which
     painted them white over the films) */
  background: transparent;
  color: #000; --fg: #000; --dim: rgba(0, 0, 0, var(--quiet));
  clip-path: inset(90% 0% 0% 0%); transform: translate3d(0, 10%, 0);
  visibility: hidden; cursor: default;   /* (a click anywhere still closes it, but only the links show the hand) */
  transition: clip-path 1s cubic-bezier(.5, .25, 0, 1), transform 1s cubic-bezier(.5, .25, 0, 1), visibility 0s linear 1s, background-color 0s linear 1s;
}
body.about-open #about-card, #about-card.held {
  background: rgba(255, 255, 255, .9);
}
body.about-open #about-card {
  clip-path: inset(0% 0% 0% 0%); transform: translate3d(0, 0, 0); visibility: visible;
  transition: clip-path 1s cubic-bezier(.5, .25, 0, 1), transform 1s cubic-bezier(.5, .25, 0, 1), visibility 0s, background-color 0s;
}
/* Over a film, the film page's own words (Play, the timeline and its numbers,
   Mute, Fullscreen, Info, the description and credits) fade away as About
   comes in, so only the picture shows faintly through, and come back as it
   goes. */
#player-ui, #info { transition: opacity .5s ease; }
body.about-open.film :is(#player-ui, #info) { opacity: 0 !important; pointer-events: none; }
/* the page underneath drifts up as About comes in, and back down as it goes */
body.about-open :is(#view-directing, #view-photography, #view-film, #bg, #bg-shade) { transform: translate3d(0, -10%, 0); }
/* while About is open the corner links invert, so they read dark on its white
   (whichever page's colours they had) */
body.about-open .corner { mix-blend-mode: difference; color: rgba(255, 255, 255, var(--quiet)) !important; }
body.about-open .corner:hover, body.about-open #nav-about { color: #fff !important; }
/* Director and Photographer in full black on About */
body.about-open :is(#nav-directing, #nav-photography) { color: #fff !important; }
/* (About and your name stay where they are on the bottom line while About is open; About reads Close) */
/* "AND" between Director and Photographer, only while About is open: set
   like them, centred on the top line, fading in as the wipe arrives */
/* …and "And" and Photographer slide left with the wipe so the top line reads
   as one: DIRECTOR AND PHOTOGRAPHER (distances measured in js/site.js, liftCorners) */
/* (the pages underneath ease back when About goes) */
#view-directing, #view-photography, #view-film, #bg, #bg-shade { transition: transform 1s cubic-bezier(.5, .25, 0, 1); }
/* Switching Director ⇄ Photographer with About open: About is held where it
   is and the new page wipes in sideways on top of it; the pages underneath
   snap back into place unseen (they're behind About). */
#about-card.held { clip-path: inset(0% 0% 0% 0%); transform: none; visibility: visible; transition: none; }
body.about-swap :is(#view-directing, #view-photography, #view-film, #bg, #bg-shade) { transition: none; }
body.about-swap .curtain-in { z-index: 46; }
/* its words populate upwards, one paragraph after another, as the curtain opens */
#about-body > * { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .3s ease, transform .3s ease; }
body.about-open #about-body > * {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(.32s + var(--n, 0) * 70ms);
}
#about-card a { cursor: pointer; }
/* The About page, kept simple, on the 12-column grid:
   · one column of labelled rows on the film list's top line: About (the
     intro), Contact, Follow, Select Clients; labels right-aligned in
     columns 1–3, their text from column 4 (the intro runs
     to the end of column 7)
   · the awards in the bottom right from column 10, the last on the footer line
   · where you're based joins the top line, after DIRECTOR + PHOTOGRAPHER
   Strengths as everywhere: 80% for what you read and click, 30% at rest. */
#about-body { position: absolute; inset: 0; line-height: 1.2; --ink: rgba(0, 0, 0, var(--middle)); --rest: rgba(0, 0, 0, var(--quiet)); }
#about-body > * { position: absolute; margin: 0; }
/* set like the Info panel on a film page: the same size and line spacing
   (1.2), labels right-aligned in a three-column-wide column (columns 1–3)
   with the text one gutter after (column 4), the intro at full strength with
   30px under it, as under a film's description; a blank line between the
   other groups */
.about-row {
  display: grid; grid-template-columns: calc(3 * var(--step) - var(--gutter)) 1fr; column-gap: var(--gutter);
  margin-bottom: 1.2em;
}
.about-row.intro { margin-bottom: 30px; }
.about-row.intro .about-items > * { color: #000; }
.about-label { text-align: right; color: rgba(0, 0, 0, .24); }   /* the label column steps back like the client column on the main page (24%, behind the 40% text) */
.about-items > * { display: block; color: var(--ink); }
.about-intro { margin: 0; }
.about-meta { left: var(--pad); width: calc(7 * var(--step) - var(--gutter)); top: var(--mid); }   /* the same line as the top of the film list */
.about-row.clients .about-items > * { color: var(--rest); }
/* Email, Instagram, Vimeo, Substack: like the series names on the Photo page,
   30% at rest and full black under the pointer */
.about-row.links .about-items > * { color: var(--rest); transition: color .2s ease; }
.about-row.links .about-items > a:hover { color: #000; }
/* Awards, smaller: the film's name (80%) beside its first award, the awards
   quieter; one per line, the block against the right margin, as wide as it
   needs, the last line on the footer line */
.about-awards {
  right: var(--pad); bottom: calc(var(--pad) - var(--fs) * .8 * .33);   /* (the space under the last line's baseline, so it lands on the footer line) */
  display: grid; grid-template-columns: max-content max-content; column-gap: var(--gutter);
  font-size: calc(var(--fs) * .8); line-height: 1.25;
}
.about-awards > * { white-space: nowrap; }
.award-film { color: rgba(0, 0, 0, .5); text-align: right; }   /* the film's name in the same grey as its awards */
.award-text { color: rgba(0, 0, 0, .5); }
.about-location { display: none; color: rgba(0, 0, 0, .5); }   /* (big screens: it's on the top line instead) */
/* The top line on About: DIRECTOR + PHOTOGRAPHER, then where you're based,
   quieter. It's one line laid over the real Director (a hidden copy of the
   word keeps the rest one space after it), so nothing slides or is measured:
   the real Photographer fades out and the line fades in, at any window size.
   (On a film the top left says Back, so it doesn't show there.) */
.tw { top: calc(var(--pad) - 6px); left: calc(var(--pad) - 1px); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.tw-ghost { visibility: hidden; }
.tw-on { color: #fff; }   /* full strength, like Director (white blended = black on About's white) */
.tw-where { font-family: var(--sans); font-weight: 400; letter-spacing: -0.01em; }   /* (in PP Mori; only DIRECTOR + PHOTOGRAPHER are Helvetica) */
/* where you're based starts on column 4, straight above the intro and the
   other About text (the line itself is set from just inside the left margin,
   so the offset is column 4 less that). On narrower windows, where column 4
   would run into PHOTOGRAPHER, it simply follows one space after it. */
@media (min-width: 1100px) {
  .tw-where { position: absolute; left: calc(var(--c4) - var(--pad) + 1px); }
}
body.about-open:not(.film) .tw { opacity: 1; transition: opacity .5s ease .45s; }
body.about-open:not(.film) .tw-photo { pointer-events: auto; cursor: pointer; }
body.about-open:not(.film) #nav-photography { opacity: 0; pointer-events: none; transition: opacity .25s ease; }

/* ---------- phones ---------- */
/* below 900px the columns get too narrow for client names; switch to the stacked layout */
@media (max-width: 900px) {
  :root { --pad: 16px; --mid: 16vh; }
  body { font-size: 13px; }   /* About, Info, Photography labels */
  #bg-shade { background: rgba(0, 0, 0, .45); }
  #film-list .client { color: var(--client-rest); }
  /* Phones: DIRECTOR + PHOTOGRAPHER across the top (a quiet + halfway
     between them, on column 4); About alone in the bottom left, set like the
     film list (your name isn't shown on phones).
     Phones use a 7-column grid: --col7 wide, the usual gutter; --half is
     columns 1–3 (labels, clients) and --c4 starts column 4 (titles, text). */
  :root {
    --col7: calc((100vw - 2 * var(--pad) - 6 * var(--gutter)) / 7);
    --half: calc(3 * var(--col7) + 2 * var(--gutter));
    --c4p: calc(var(--pad) + var(--half) + var(--gutter));
  }
  .corner { font-size: clamp(15px, 5vw, 20px); }
  .bl { display: none; }
  .bm { font-size: 15px; }
  body.film #nav-directing { font-size: 15px; }   /* (Back, on a film, stays in the body type) */
  .tp { display: block; top: calc(var(--pad) - 6px); left: var(--c4p); pointer-events: none; }
  body.film .tp { opacity: 0; }
  /* About (not over a film): rather than the About line fading in, the real
     PHOTOGRAPHER and + slide left with the wipe into DIRECTOR + PHOTOGRAPHER
     (distances from placePhone in js/site.js), all three quiet; back out as it closes */
  #nav-photography, .tp { transition: color .25s ease, opacity .4s ease, transform 1s cubic-bezier(.5, .25, 0, 1); }
  body.about-open:not(.film) .tw { opacity: 0 !important; }
  body.about-open:not(.film) #nav-photography { opacity: 1; pointer-events: auto; transform: translate3d(var(--slide-photo, 0px), 0, 0); transition: color .25s ease, opacity .4s ease, transform 1s cubic-bezier(.5, .25, 0, 1); }
  body.about-open:not(.film) .tp { transform: translate3d(var(--slide-plus, 0px), 0, 0); }
  /* About: the top line reads DIRECTOR + PHOTOGRAPHER, all of it quiet */
  body.about-open :is(#nav-directing, #nav-photography) { color: rgba(255, 255, 255, var(--quiet)) !important; }
  .tw-on { color: inherit; }
  .bm { left: var(--pad); right: auto; width: auto; text-align: left; }
  .be { display: none; }
  #film-filters, #photo-series { display: flex; gap: 14px; left: var(--pad); right: var(--pad); text-align: left; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  #film-index { left: var(--pad); width: auto; right: var(--pad); top: calc(var(--mid) + 44px); bottom: 130px; }
  /* Director home on phones: set exactly like the big screen (same size,
     spacing and colours), just stacked. The categories are a column,
     right-aligned on the same edge as the client names; the films sit
     underneath, client then title on one line, split on a centre line. */
  /* Director home: the films split down the middle (the same split as the
     About page): the client (or Short Film) right-aligned on the left half,
     the title on the right half. The categories stand on the title column
     above the films (two blank lines between); the lit film's laurels sit
     under the list on the same column (js/site.js, placeLaurels). */
  #film-filters, #film-index { font-size: 15px; line-height: 1.1; }
  #film-filters {
    display: block; overflow: visible; white-space: nowrap; text-align: right;
    left: auto; right: var(--pad); width: auto; top: auto; bottom: calc(var(--pad) - 4px);   /* Archive on the About line */
  }
  #film-filters a { display: block; padding: 1px 0; }
  #film-filters .edit-toggle, #film-filters .edit-status { display: none; }   /* editing is for the big screen */
  #film-index { top: 22vh; bottom: 230px; }   /* room underneath for the laurels and the categories */
  #film-list li a { flex-direction: row; padding: 1px 0; font-size: inherit; }
  #film-list .client { order: 0; flex: none; width: var(--half); text-align: right; font-size: inherit; margin: 0; }
  #film-list .title { order: 1; flex: 1 1 0; min-width: 0; margin: 0 0 0 var(--gutter); }
  #film-laurels .laurel:nth-child(n + 3) { display: none; }   /* at most two laurels on phones */
  #swipe-hint { margin-left: calc(var(--half) + var(--gutter)); margin-top: calc(30px + var(--laurel-h) + 24px); }   /* under the laurels */
  #film-laurels { bottom: auto; left: var(--c4p); right: auto; width: auto; height: var(--laurel-h); grid-auto-columns: auto; column-gap: 18px; justify-content: start; align-items: center; }
  :root { --laurel-h: 42px; }
  /* phones: Play on the left, the timeline after it, the buttons on a row underneath */
  #view-film { --line: 50vh; }
  #play { left: var(--pad); width: auto; text-align: left; }
  #scrub { left: calc(var(--pad) + 54px); right: var(--pad); }
  /* phones: Info, Mute and Fullscreen in a row under the timeline */
  #player-buttons { top: calc(var(--line) + 44px);   /* below the time numbers */ left: auto; right: var(--pad); display: flex; gap: 22px; }
  #btn-info { bottom: auto; top: calc(var(--line) + 44px); left: var(--pad); transform: translateY(-50%); }
  #edit-bar { display: none; }
  #info { left: var(--pad); bottom: 52px; max-height: calc(100vh - var(--line) - 60px - 52px); }
  @supports (height: 100dvh) { #info { max-height: calc(100dvh - var(--line) - 60px - 52px); } }   /* (the visible height, with Safari's toolbars showing) */
  #info-laurels { display: flex; flex-wrap: wrap; width: auto; gap: 18px; }
  #info { padding-left: 0; }
  #info-credits { margin-left: 0; grid-template-columns: max-content 1fr; }
  #info-credits dt { text-align: left; }
  /* Photography: the photo full width up top; underneath it the count
     (3 / 18) on the left and the series down the right, sitting just above
     your name and About, so more series simply push the list up and the
     photo takes whatever room is left (no grid on phones; tap or swipe) */
  #photo-toggle { top: var(--series-top, 560px); left: var(--pad); font-size: 15px; line-height: 1.1; }
  #photo-toggle > :not(#photo-count) { display: none; }
  #photo-count { margin: 0; padding: 1px 0; font-size: inherit; }
  #photo-series {
    display: block; overflow: visible; white-space: nowrap; text-align: right;
    left: auto; right: var(--pad); top: auto; bottom: calc(var(--pad) - 4px); font-size: 15px; line-height: 1.1;   /* the last series on the About line, like the categories */
  }
  #photo-series a { display: block; padding: 1px 0; }
  #photo-scroll figure, #photo-peek figure, #photo-leave figure {
    inset: calc(var(--pad) + 52px) var(--pad) var(--series-room, 180px);
  }
  #photo-scroll img, #photo-peek img, #photo-leave img { max-width: 100%; }
  #photo-cursor { display: none; }   /* (no Next / Previous on phones: a tap or swipe moves on) */
  #photo-scroll.go-prev, #photo-scroll.go-next { cursor: auto; }
  /* a text slide: its words in a light grey square, in the photo's place, the
     same size every time (as wide as the screen allows, or as tall) */
  #photo-scroll figure.text-slide, #photo-peek figure.text-slide, #photo-leave figure.text-slide {
    inset: calc(var(--pad) + 52px) var(--pad) var(--series-room, 180px); padding: 0;
  }
  .slide-text {
    width: min(100%, calc(100vh - var(--pad) - 52px - var(--series-room, 180px))); aspect-ratio: 1; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; padding: 28px;
    background: #f2f2f2; font-size: 15px;
  }
  /* About on phones: one column that scrolls, in reading order */
  /* About: the intro across the top at full width, then the rows split down
     the middle: labels right-aligned on the left half, their words on the right */
  #about-body { position: static; inset: auto; padding: calc(var(--pad) + 52px) var(--pad) 90px; font-size: 15px; line-height: 1.2; }
  #about-body > * { position: static; }
  .tw-where { display: none; }   /* (phones: the location sits at the end of the page instead) */
  #about-body .about-location { display: block; margin-top: 1.2em; }   /* under the intro, a blank line between */
  #about-body .about-meta, #about-body .about-awards { width: auto; margin-bottom: 28px; }
  .about-row, .about-awards { grid-template-columns: var(--half) 1fr; column-gap: var(--gutter); }   /* the 7-column split, like the film list */
  .about-row.intro { display: block; margin-bottom: 56px; }
  .about-row.intro .about-label { display: none; }
  /* the awards set exactly like the rows above: same type, size and weight;
     film names as labels, awards as the quiet list (a little air between
     awards, which wrap here) */
  .about-awards { font-family: var(--sans); font-size: inherit; line-height: inherit; row-gap: .3em; }
  /* phones: everything on About in the one grey, 50% black (the intro,
     where you're based, labels, links, clients and awards) */
  #about-body :is(.about-label, .about-items > *, .award-film, .award-text, .about-location) { color: rgba(0, 0, 0, .5); }
  .award-film:not(:empty):not(:first-child), .award-film:not(:empty):not(:first-child) + .award-text { margin-top: 1em; }   /* a blank line before each film's awards */
  .about-awards > * { white-space: normal; }   /* awards wrap here, so a little air keeps each one whole */
  .about-row { margin-bottom: 1.4em; }
  #about-body .about-location { white-space: normal; }
  /* the words scroll under soft white bands behind the top and bottom lines, so they never run into them */
  body.about-open::before, body.about-open::after {
    content: ""; position: fixed; left: 0; right: 0; z-index: 46; pointer-events: none;
    animation: fade .3s ease .7s both;   /* once the white page has arrived, not over the page it's covering */
  }
  body.about-open::before { top: 0; height: 52px; background: linear-gradient(#fff 55%, rgba(255, 255, 255, 0)); }
  body.about-open::after { bottom: 0; height: 64px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 45%); }
  /* About is solid white on phones: on a small screen the page underneath showing through reads as clutter */
  body.about-open #about-card, #about-card.held { background: #fff; }
}

/* Phones held upright: the film sits near the top, full width, with its own
   controls on the picture itself, like a player: Play and the timeline along
   its bottom, Mute and Fullscreen in its top-right corner, over a soft
   darkening at its top and bottom edges; they fade while the film plays and a
   tap brings them back. The film's words sit underneath, scrolling if long.
   (Held sideways, the phone keeps the overlay layout.) */
@media (max-width: 900px) and (orientation: portrait) {
  #view-film {
    --vtop: calc(var(--pad) + 44px);                /* the picture's top edge, just clear of Back */
    --vh: calc(100vw / var(--ar, 1.7778));          /* the picture's height at full width */
    --line: calc(var(--vtop) + var(--vh) - 34px);   /* Play and the timeline, over the picture's bottom (the time numbers below the line) */
  }
  #player-buttons { top: calc(var(--vtop) + 20px); right: var(--pad); left: auto; transform: translateY(-50%); }
  #player-buttons button { color: rgba(255, 255, 255, var(--middle)); }
  /* the darkening behind the controls: over the picture only, at its edges */
  #info-shade {
    inset: auto 0; top: var(--vtop); height: var(--vh);
    background: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 40px, rgba(0, 0, 0, 0) calc(100% - 64px), rgba(0, 0, 0, .55));
  }
  #stage video, #stage.cover video { top: var(--vtop); bottom: auto; height: var(--vh); object-fit: contain; }
  #stage iframe, #stage.cover iframe { top: var(--vtop); transform: translateX(-50%); width: 100vw; height: var(--vh); }
  #info { top: calc(var(--line) + 80px); bottom: 52px; max-height: none; }
  /* the space under the picture isn't left empty: the film's name and client,
     then its description, laurels and credits are always there to read
     (scrolling if long), so there's no Info button */
  #view-film #info[hidden] { display: block !important; }
  #btn-info { display: none; }
  #info { top: calc(var(--vtop) + var(--vh) + 30px); }   /* under the picture */
  #info-title { display: block; margin: 0 0 18px; font-family: var(--sans); font-size: 15px; line-height: 1.2; color: #fff; }
  #info-title .it-client { color: rgba(255, 255, 255, var(--quiet)); }
  #info-desc { margin-bottom: 24px; }
  /* opening a film: the list fades, Play comes in and the timeline draws out,
     then Back and the words under the picture rise in, one after another */
  body.film #info > * { animation: info-in .7s cubic-bezier(.2, .7, .2, 1) both; }
  body.film #info > :nth-child(1) { animation-delay: .55s; }
  body.film #info > :nth-child(2) { animation-delay: .65s; }
  body.film #info > :nth-child(3) { animation-delay: .75s; }
  body.film #info > :nth-child(4) { animation-delay: .85s; }
  body.film #nav-directing { animation: info-in .6s cubic-bezier(.2, .7, .2, 1) .35s both; }
  @keyframes info-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
}

/* Safari's bars (phones held in the hand only; an experiment): the page is
   60px taller than the screen and held scrolled down by 60px (js/site.js,
   holdRunway), so Safari shows the page under its clock bar and toolbar
   rather than solid colour. The film runs 70px past the top and 140px past
   the bottom; everything else stays fixed where it is. */
@media (max-width: 900px) and (hover: none) {
  html { height: auto; overflow-y: scroll; overscroll-behavior: none; background: #000; scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
  #about-card, #info, #film-index { overscroll-behavior: contain; }   /* (scrolling to their end never carries on into the page) */
  html:has(body.light), html:has(body.about-open) { background: #fff; }
  body { height: auto; min-height: calc(100dvh + 60px); overflow: visible; }
  #bg, #bg-shade { position: absolute; left: 0; right: 0; top: calc(60px - 70px); bottom: auto; height: calc(100dvh + 70px + 140px); }
  /* on Photography and About, no black film layer left lying under Safari's bars */
  body.light:not(.curtain-to-light):not(.curtain-to-dark) :is(#bg, #bg-shade) { visibility: hidden; }
  /* About too is part of the page here, not pinned over it: Safari paints a
     solid bar over anything pinned to the screen's edges. The white card
     runs past both edges like the film (its words pushed in to match), and
     the soft white bands at the top and bottom run on under Safari's bars. */
  /* the pages themselves too (Director, Photography, a film): pinned, the
     white Photography page wiping in made Safari switch back to solid bars.
     Each sits exactly on the screen, 60px down the held page. */
  .view { position: absolute; top: 60px; bottom: auto; height: 100dvh; }
  /* …and the white Photography page carries its white on past both edges
     (under Safari's bars), and the Director ⇄ Photography wipe lets that
     overhang through, so the film never shows above or below the page as it
     wipes in */
  #view-photography { box-shadow: 0 -70px 0 var(--bg), 0 140px 0 var(--bg); }
  /* going back to Director the page fades from white to black underneath as
     the film wipes in; its overhang fades with it rather than snapping black */
  body.curtain-to-dark #view-photography { transition: background-color .9s cubic-bezier(.45, 0, .25, 1) .05s, box-shadow .9s cubic-bezier(.45, 0, .25, 1) .05s; }
  @keyframes wipe-from-right-tall {
    from { clip-path: inset(-70px 0% -140px 90%); transform: translate3d(10%, 0, 0); }
    to { clip-path: inset(-70px 0% -140px 0%); transform: translate3d(0, 0, 0); }
  }
  @keyframes wipe-from-left-tall {
    from { clip-path: inset(-70px 90% -140px 0%); transform: translate3d(-10%, 0, 0); }
    to { clip-path: inset(-70px 0% -140px 0%); transform: translate3d(0, 0, 0); }
  }
  .view.curtain-in.from-right { animation-name: wipe-from-right-tall; }
  .view.curtain-in.from-left { animation-name: wipe-from-left-tall; }
  #about-card { position: absolute; top: calc(60px - 70px); bottom: auto; height: calc(100dvh + 70px + 140px); }
  #about-body { padding-top: calc(var(--pad) + 52px + 70px); padding-bottom: calc(90px + 140px); }
  body.about-open::before { position: absolute; top: calc(60px - 70px); height: calc(70px + 52px); background: linear-gradient(#fff calc(70px + 28px), rgba(255, 255, 255, 0)); }
  body.about-open::after { position: absolute; bottom: auto; top: calc(60px + 100dvh - 64px); height: calc(64px + 140px); background: linear-gradient(rgba(255, 255, 255, 0), #fff 29px); }
}

/* iPhones: keep the corner words clear of the notch / camera and the home bar
   (the page is allowed under them: viewport-fit=cover in index.html). On
   screens without them these are all 0, so nothing moves. */
.tl, .tr, .tw, .tp { margin-top: env(safe-area-inset-top, 0px); }
.bl, .bm, .be, .bz { margin-bottom: env(safe-area-inset-bottom, 0px); }
.tl, .bl, .tw { margin-left: env(safe-area-inset-left, 0px); }
.tr { margin-right: env(safe-area-inset-right, 0px); }
@media (max-width: 900px) { .bm { margin-right: env(safe-area-inset-right, 0px); } }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01s !important; animation-duration: .01s !important; }
}

/* the bottom corner word reads "Close" while About is open */
#nav-about .ab-close, body.about-open #nav-about .ab-word { display: none; }
body.about-open #nav-about .ab-close { display: inline; }
