/* The home page (site/tools/pages/home.mjs), after styles.css and css/pages.css. Works first: a compact hero beside the BR-mark canvas,
   the grid and its «Show more work» row, then the services, finishing, about, support and the form. Paper language: hairlines, mono
   labels, square chips, accent cells; no rounded cards, no shadows. */
.vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---- hero: text on the left, the mark's canvas on the right (its dither field thins out towards the text and the grid: hero.js fade);
   compact, so the first grid row is on screen at 1440 × 900 and the grid starts inside the first screen of a phone */
main.home .hero{height:auto;margin-top:var(--header);display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);overflow:hidden}
main.home .hero-text{position:relative;z-index:1;min-width:0;padding:var(--hero-top) 0 clamp(28px,4.5vh,44px) var(--gut)}
main.home .hero .label{margin-bottom:20px}
/* .h1: a share page's headline, a <p> there (home.mjs: the player's work title is that page's H1), same look */
main.home .hero :is(h1,.h1){font-size:clamp(34px,4.25vw,64px);line-height:.97;letter-spacing:-.035em;margin:0;font-weight:700;text-transform:uppercase;text-wrap:balance;overflow-wrap:break-word}
main.home .hero-lead{font-size:var(--t-lead);line-height:1.4;color:var(--body-ink);margin:22px 0 0;max-width:46ch;text-wrap:pretty}
main.home .hero .ctas{margin-top:28px}
main.home .hero-mark{position:relative;min-width:0}
main.home .hero-mark canvas{cursor:grab}

/* ---- the work: filters, grid, «Show more work» */
/* ---- the studio's reel (home.mjs reel, site/js/reel.js): a screen of its own between the hero and the grid, not a tile. Ink ground,
   the film's preview loop seen through a halftone screen, the page's own type and an accent Watch; the film then plays in the same box
   with a bar of its own. Phones in portrait: the vertical cut, the box upright */
main.home .reel{padding:0 var(--gut) clamp(28px,4vh,44px)}
.reel-box{position:relative;overflow:hidden;overflow:clip;background:var(--ink);color:#fff;aspect-ratio:16/9}   /* as wide as the grid below (the owner), 16:9; clip, not hidden: hidden would make the box the sticky title's scroller */
.reel-film,.reel-cover,.reel-bg{position:absolute;inset:0;width:100%;height:100%}
.reel-film{object-fit:cover;background:transparent;display:block}
.reel-box.playing{background:var(--paper)}   /* the film's own ground: no dark edge under it, and a frame the screen drops shows paper, not black */
.reel-box:fullscreen,.reel-box:-webkit-full-screen{background:var(--ink)}
.reel-box:fullscreen .reel-film,.reel-box:-webkit-full-screen .reel-film{object-fit:contain}
.reel-film[hidden]{display:none}
.reel-bg{object-fit:cover;opacity:0;transition:opacity .8s}
.reel-bg.on{opacity:.62}
.reel-cover{z-index:2;cursor:pointer;transition:opacity .45s;display:flex;flex-direction:column;justify-content:flex-end}
.reel-cover::before{content:'';position:absolute;inset:0;z-index:1;background:radial-gradient(circle,transparent 1.15px,var(--ink) 1.75px) 0 0/5px 5px;opacity:.72}   /* the halftone screen */
.reel-cover::after{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(11,13,20,.92),rgba(11,13,20,.5) 48%,rgba(11,13,20,.08))}
/* the title and Watch are anchored to the screen (the owner): on arrival they already stand at the bottom of the first screen, with
   the page's margin, ride along with the scroll and come to rest at the bottom of the film. Native sticky positioning: smooth, no script */
.reel-text{position:sticky;z-index:2;bottom:clamp(20px,4vw,56px);margin:0 clamp(20px,4vw,56px) clamp(20px,4vw,56px);display:flex;flex-direction:column;align-items:flex-start}
.reel-title{font-size:clamp(30px,4.6vw,76px);line-height:.95;letter-spacing:-.035em;margin:0;font-weight:700;text-transform:uppercase;max-width:12ch;text-wrap:balance}
.reel-watch{display:inline-flex;align-items:center;gap:12px;margin-top:clamp(20px,3vw,36px);padding:16px 26px 15px;background:var(--accent);color:#fff;font-size:13px;transition:background .2s,color .2s}
.reel-watch svg{width:14px;height:14px;display:block}
.reel-cover:hover .reel-watch,.reel-watch:focus-visible{background:#fff;color:var(--ink)}
.reel-watch:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.reel-box.playing .reel-cover{opacity:0;pointer-events:none}
.reel-bar{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;align-items:center;gap:12px;padding:30px 14px 10px;background:linear-gradient(rgba(11,13,20,0),rgba(11,13,20,.78));transition:opacity .3s;will-change:opacity}
.reel-bar[hidden]{display:none}
.reel-box.idle .reel-bar{opacity:.001}   /* resting, not gone: the layer above the film stays, so the browser never re-stacks the film's own layer (a black frame on macOS) */
.reel-box.idle{cursor:none}
.reel-bar button{all:unset;box-sizing:border-box;cursor:pointer;width:34px;height:34px;display:grid;place-items:center;color:#fff;flex:0 0 auto}
.reel-bar button svg{width:18px;height:18px;display:block}
.reel-bar button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.rb-play .i-play,.reel-box.paused .rb-play .i-pause,.rb-mute .i-off,.rb-mute[aria-pressed="true"] .i-on{display:none}
.reel-box.paused .rb-play .i-play,.rb-mute[aria-pressed="true"] .i-off{display:inline}
.rb-time{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.rb-seek{-webkit-appearance:none;appearance:none;flex:1;min-width:40px;height:20px;margin:0;background:transparent;cursor:pointer;--p:0%}
.rb-seek::-webkit-slider-runnable-track{height:2px;background:linear-gradient(90deg,var(--accent) var(--p),rgba(255,255,255,.35) var(--p))}
.rb-seek::-webkit-slider-thumb{-webkit-appearance:none;width:10px;height:10px;margin-top:-4px;background:#fff;border:0;border-radius:0}
.rb-seek::-moz-range-track{height:2px;background:rgba(255,255,255,.35)}
.rb-seek::-moz-range-progress{height:2px;background:var(--accent)}
.rb-seek::-moz-range-thumb{width:10px;height:10px;background:#fff;border:0;border-radius:0}
.rb-seek:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (max-width:600px) and (orientation:portrait){
  .reel-box.has-v{aspect-ratio:9/16}
  .reel-box.has-v .reel-cover::after{background:linear-gradient(0deg,rgba(11,13,20,.94),rgba(11,13,20,.45) 55%,rgba(11,13,20,.12))}
}
@media (max-width:720px){.rb-time{display:none}.reel-bar{gap:8px}}
@media (prefers-reduced-motion:reduce){.reel-bg,.reel-cover,.reel-bar{transition:none}}
main.home section.work{padding:0 var(--gut) 72px}
main.home .filters{padding:16px 0 14px}
main.home .grid{position:relative}
main.home .tile{scroll-margin-top:96px}   /* keyboard focus brings a tile out from under the sticky filters (on top of the page's scroll padding) */
/* the server-rendered list of works is the base without JS; with JS the grid replaces it, so it never flashes up first (main.js shows
   it again when works.json cannot be loaded), and the empty grid holds about two rows of space meanwhile */
@media (scripting:enabled){main.home .worklist:not(.shown){display:none}main.home .worklist:not(.shown)+.grid:empty{min-height:min(60vh,560px)}}
.grid .sweep{position:absolute;left:0;z-index:3;pointer-events:none;image-rendering:pixelated}
.tile.arriving>img,.tile.arriving>video,.tile.arriving>.cap,.tile.arriving>.pin,.tile.arriving>.soon,.tile.arriving>.state{visibility:hidden}
.more{position:relative;margin-top:var(--gap)}
.more[hidden]{display:none}
.more-btn{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:60px;border:1px solid var(--line);color:var(--ink);
  font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;transition:color .2s,border-color .2s}
.more-btn::before{content:'';width:6px;height:6px;background:var(--accent);transition:transform .2s}
.more-btn .n{color:var(--accent)}
.more-btn:hover{color:var(--accent);border-color:var(--accent)}
.more-btn:hover::before{transform:scale(1.5)}
.more-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.more.charging .more-btn{color:transparent;border-color:transparent;transition:none}
.more.charging .more-btn::before,.more.charging .more-btn .n{visibility:hidden}
.more .more-fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;image-rendering:pixelated}

/* ---- two services: a large real picture each, a line, a link */
main.home .services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:72px var(--gut)}   /* four cards, two rows */
main.home .services>.label{grid-column:1/-1;margin-bottom:-44px}   /* the row gap minus the label's own 28 px */
.svc{display:flex;flex-direction:column;min-width:0}
.svc-media{display:block;overflow:hidden;background:#E4E6EB}
.svc-media img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.svc:hover .svc-media img{transform:scale(1.015)}
.svc-title{font-size:clamp(28px,3.3vw,46px);line-height:1;letter-spacing:-.03em;margin:30px 0 0;font-weight:700;text-transform:uppercase;text-wrap:balance}
.svc-title a:hover{color:var(--accent)}
.svc-line{font-size:var(--t-lead);line-height:1.4;color:var(--body-ink);margin:16px 0 0;max-width:38ch;text-wrap:pretty}
.svc .ctas{margin-top:auto;padding-top:26px}   /* both buttons of a pair on one line, like the crafts below */

/* ---- post-production & motion: two crafts side by side (like the services), each a finished piece with its title (the services'
   caption style), a line, a CTA */
main.home .finishing{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:48px var(--gut);align-items:start}
main.home .finishing>.label{grid-column:1/-1;margin-bottom:-20px}
.craft{display:flex;flex-direction:column;min-width:0}
.craft .sec-title{margin-top:30px;font-size:clamp(28px,3.3vw,46px);line-height:1}   /* the services' title size: the two pairs read as one rhythm */
.craft .sec-lead{max-width:44ch;margin-top:16px}   /* the services' line rhythm */
/* the two CTAs sit on one line whatever the length of the texts above them */
main.home .finishing{align-items:stretch}
.craft .ctas{margin-top:auto;padding-top:26px}
.fin-media{margin:0;display:block;min-width:0}
.fin-media img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:#0B0D14}
.fin-media .media-play{width:100%}   /* a block button shrinks to its content: 0 × 0 until the lazy image loads, then the page jumps */
dl.roles{margin:0;display:grid;gap:5px}
dl.roles div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 14px}
dl.roles dt{color:var(--mid);min-width:13ch}
dl.roles dd{margin:0;font-size:15px;line-height:1.4}

/* ---- about: the old intro + portrait layout (styles.css), new copy */
main.home .about h2 span{margin-top:12px;text-wrap:balance}
main.home .about .intro p,main.home .cap-grid p{text-wrap:pretty}
.nw{white-space:nowrap}

/* ---- ongoing production support: a short band */
main.home .support{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px 64px;align-items:end}
main.home .support .sec-title{text-wrap:balance}
main.home .support .sec-lead{margin-top:0}

@media (max-width:1024px){
  main.home .support{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:860px){
  main.home .hero{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}
  /* one swipeable line per filter row instead of two or three wrapped ones; the fade on the right says there is more */
  main.home .filters .row{flex-wrap:nowrap;gap:0 18px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin-right:calc(-1 * var(--gut));padding-right:40px;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent)}
  main.home .filters .row::-webkit-scrollbar{display:none}
  main.home .filters button{flex:0 0 auto;padding:8px 0 6px;white-space:nowrap}
}
@media (max-width:720px){
  main.home .finishing{grid-template-columns:minmax(0,1fr);gap:56px}
  main.home .finishing>.label{margin-bottom:-36px}
  main.home .hero{grid-template-columns:minmax(0,1fr)}
  main.home .hero-mark{display:none}
  main.home .hero-text{padding:var(--hero-top) var(--gut) 26px}
  main.home .hero .label{margin-bottom:16px}
  main.home .hero :is(h1,.h1){font-size:clamp(30px,8.6vw,40px);line-height:1}
  main.home .hero-lead{font-size:17px;margin-top:16px}
  main.home .hero .ctas{margin-top:22px;gap:10px}
  main.home .hero .cta{padding:10px 16px}
  main.home section.work{padding:0 var(--gut) 56px}
  main.home .filters{padding:10px 0 8px;gap:2px}
  main.home .services{grid-template-columns:minmax(0,1fr);gap:56px}
  main.home .services>.label{margin-bottom:-28px}
  .svc-title{margin-top:24px}
  .more-btn{height:56px}
}
@media (prefers-reduced-motion:reduce){.svc-media img{transition:none}.svc:hover .svc-media img{transform:none}}
