/* The home. Loads after site.css (tokens, tiles, table, ledgers) and record.css (large title, night ending).
   Same language as the record pages: plaster ground, one large line at weight 500, mono bars, night ending.
   Weights 300 / 400 / 500 only. Nothing under 11px. */
body.home{overflow-x:clip}
.home .header .kind{color:var(--muted)}

/* ---------- hero: the studio's front door. A reel cut from the key art, full bleed; the name set over it ---------- */
.home .header{position:absolute;left:0;right:0;top:0;z-index:4;color:#f3f1ec}
.home .header .kind{color:rgba(243,241,236,.72)}
.h-hero{position:relative;height:100svh;min-height:560px;overflow:hidden;background:#000;color:#f3f1ec;display:flex;flex-direction:column;justify-content:flex-end}
.h-reel{position:absolute;inset:0}
.h-reel img,.h-reel video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.h-reel video{opacity:0;transition:opacity 1.2s var(--p2-out)}
.h-hero.playing .h-reel video{opacity:1}
.h-reel img{transform:scale(1.04);transition:transform 2.4s var(--expo-out)}
.ready .h-reel img{transform:none}
/* the shade keeps the name readable on any cut: a floor of black, a soft top for the header */
.h-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to top,rgba(0,0,0,.94) 0,rgba(0,0,0,.8) 17%,rgba(0,0,0,.44) 40%,rgba(0,0,0,0) 68%),linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0) 18%)}
.h-copy{position:relative;z-index:2;padding:0 var(--m) 18px}
.h-hero .r-title{padding:0 0 6px;color:#f3f1ec}
/* Now showing lives in the bottom bar: the bar is the reel's programme line, and its top hairline fills over each cut */
.h-now{display:flex;gap:14px;align-items:baseline;margin:0;color:rgba(243,241,236,.66);white-space:nowrap;min-width:0}
.h-now-k:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#e5482f;margin-right:10px;vertical-align:.08em}
.h-hero .slate-meta .h-now-v{color:#f3f1ec;position:relative;padding:12px 0;margin:-12px 0;text-align:left;overflow:hidden;text-overflow:ellipsis}
.h-hero .slate-meta{position:relative}
.h-hero .slate-meta>.h-now{grid-column:span 6}
.h-hero .slate-meta>.h-prog{grid-column:auto}
.h-hero .slate-meta>span{grid-column:span 3}
.h-prog{position:absolute;left:0;right:0;top:-1px;height:1px;background:#f3f1ec;transform:scaleX(0);transform-origin:left;pointer-events:none}
.h-now-v.in{animation:now-in .7s var(--expo-out) both}
@keyframes now-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.h-now-v:after{content:'';position:absolute;left:0;right:0;bottom:10px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .5s var(--expo-out)}
.h-now-v:hover:after{transform:scaleX(1)}
.h-say{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--g);align-items:last baseline;margin-bottom:clamp(22px,4vh,40px)}
.h-label{grid-column:1/8;font-size:clamp(20px,1.7vw,28px);font-weight:400;letter-spacing:-.02em;line-height:1.2;color:#f3f1ec}
.h-role{grid-column:1/8;font-size:clamp(28px,3.4vw,62px);font-weight:300;letter-spacing:-.04em;line-height:1.02;color:#f3f1ec}
.h-say .say-sub{grid-column:9/-1;color:rgba(243,241,236,.78);font-size:clamp(15px,1.1vw,17px);line-height:1.45;max-width:36ch;padding-bottom:0;text-wrap:pretty}
.h-hero .slate-meta{border-top-color:rgba(243,241,236,.22);color:rgba(243,241,236,.66)}
.h-hero .slate-meta a{color:#f3f1ec}
.rise-in{opacity:0;transform:translateY(14px);transition:opacity 1s var(--expo-out) var(--d,.35s),transform 1.2s var(--expo-out) var(--d,.35s)}
.h-hero .line{transform:translateY(112%);transition:transform 1.15s var(--expo-out) .05s}
.ready .h-hero .line{transform:none}
.ready .rise-in{opacity:1;transform:none}

/* ---------- selected work: key-art tiles, the star of the page ----------
   One aspect (3:2) for every tile; sizes in an editorial rhythm: 7|5, 5|7, 4|4|4, 7|5, 5|7.
   In a two-up row the smaller tile drops, so the rows step like a magazine spread. */
/* #work lands with its rule near the top of the screen, so the first row and its caption clear the fold */
.work{padding-top:clamp(96px,12vw,160px)}
.work .section-top{position:relative}
.anchor{position:absolute;left:0;top:-28px;width:1px;height:1px;pointer-events:none}
.mosaic.keyed{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:clamp(56px,7vw,112px) var(--g);align-items:start}
.mosaic.keyed .tile{display:block;min-width:0}
.mosaic.keyed .size-l{grid-column:span 7}
.mosaic.keyed .size-s{grid-column:span 5;margin-top:clamp(48px,9vw,150px)}
.mosaic.keyed .size-m{grid-column:span 4}
.mosaic.keyed .tile-visual{height:auto;aspect-ratio:3/2;max-height:calc(100svh - 236px);background:#000;border-radius:2px}
.tile-visual>img,.tile-visual>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;transition:transform 1.4s var(--expo-out),opacity .6s}
.tile-visual>video{opacity:0}
.tile-visual.playing>video{opacity:1}
a.tile:hover .tile-visual>img,a.tile:hover .tile-visual>video,a.tile:focus-visible .tile-visual>img,a.tile:focus-visible .tile-visual>video{transform:scale(1.035)}
.tile-label{position:absolute;left:16px;top:14px;right:16px;display:flex;gap:12px;color:rgba(243,241,236,.86);z-index:2;pointer-events:none;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.tile-label .tile-note{margin-left:auto;color:rgba(243,241,236,.6)}
/* hover: the art eases in and the caption's title draws its rule; the name is never set twice */
.tile-caption h3{display:flex;align-items:baseline;gap:12px;min-width:0}
.tile-caption h3 .u{position:relative}
.tile-caption h3 .u:after{content:'';position:absolute;left:0;right:0;bottom:-.06em;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .7s var(--expo-out)}
.tile-caption h3 .go{font-family:var(--mono);font-size:13px;font-style:normal;opacity:0;transform:translateX(-8px);transition:opacity .35s,transform .6s var(--expo-out)}
a.tile:hover .tile-caption .u:after,a.tile:focus-visible .tile-caption .u:after{transform:scaleX(1)}
a.tile:hover .tile-caption .go,a.tile:focus-visible .tile-caption .go{opacity:1;transform:none}
.tile-label{transition:opacity .5s}
.mosaic.keyed .tile-caption{margin-top:14px;align-items:baseline}
.mosaic.keyed .tile-caption h3{font-size:clamp(20px,1.6vw,26px)}
.mosaic.keyed .tile-caption>span{max-width:58%;text-wrap:balance}
/* the narrow tiles stack the caption: a long role never wraps into a ragged right column */
.mosaic.keyed .size-m .tile-caption{flex-direction:column;align-items:flex-start;gap:6px}
.mosaic.keyed .size-m .tile-caption>span{max-width:none;text-align:left}
#preview-pause{color:var(--muted);font-family:var(--mono);font-size:11px;letter-spacing:.04em;text-transform:uppercase}
#preview-pause:hover{color:var(--ink)}

/* ---------- studies: a compact band ---------- */
.ai.compact{margin-top:120px;padding-top:40px;padding-bottom:48px}
.ai.compact .ai-head{margin-bottom:32px;align-items:baseline}
.ai.compact h2{font-size:clamp(30px,3.2vw,48px);grid-column:span 5}
.ai.compact .ai-head p{grid-column:7/-1;max-width:none}
/* one strip at every width: each study keeps its own proportion at a shared height, and snaps as it scrolls */
.ai.compact .ai-strip{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;margin:0 calc(var(--m)*-1);padding:0 var(--m);scroll-padding:0 var(--m);scrollbar-width:none;outline:none}
.ai.compact .ai-strip::-webkit-scrollbar{display:none}
.ai.compact .ai-strip:focus-visible{box-shadow:inset 0 0 0 1px var(--glow)}
.ai.compact .ai-slot{flex:0 0 auto;height:clamp(260px,22vw,400px);aspect-ratio:var(--ar,16/9);scroll-snap-align:start}
.ai-top-r{display:flex;align-items:baseline;gap:28px}
.ai-nav{display:flex;gap:6px}
.ai.compact .ai-strip::after{content:'';flex:0 0 1px}
.ai-nav button{width:36px;height:24px;min-height:0;min-width:0;padding:0;border:1px solid var(--rule);border-radius:12px;color:#f3f1ec;font:inherit;line-height:1;transition:border-color .3s}
.ai-nav button:hover,.ai-nav button:focus-visible{border-color:#f3f1ec}
.ai-filled{margin:0;overflow:hidden;background:#000;border-color:transparent}
.ai-filled video,.ai-filled img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.ai.compact .ai-filled::after{background:linear-gradient(to bottom,rgba(0,0,0,.5),transparent 24%),linear-gradient(to top,rgba(0,0,0,.66),rgba(0,0,0,.2) 26%,transparent 42%)}
.ai-still img{transition:transform 1.4s var(--expo-out)}
.ai-still:hover img{transform:scale(1.025)}
.ai-filled::after{content:'';position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.45),transparent 20%)}
.ai-filled>span,.ai-filled figcaption{position:relative;z-index:1;color:#f3f1ec}
.ai-filled figcaption{display:flex;flex-direction:column;gap:4px}
.ai-filled small{font-size:11px;color:rgba(243,241,236,.7);line-height:1.35}

/* ---------- all records: a row is a link when the record has a page ---------- */
.record-row{cursor:default}
a.record-row{cursor:pointer}
.record-row:not(a) .row-title{color:var(--muted)}
.row-title .go{font-family:var(--mono);font-size:11px;font-style:normal;letter-spacing:.04em;margin-left:12px;display:inline-block;opacity:0;transform:translateX(-6px);transition:opacity .3s,transform .5s var(--expo-out);vertical-align:.25em}
a.record-row:hover .go,a.record-row:focus-visible .go{opacity:1;transform:none}
.body-list{display:flex;flex-wrap:wrap;gap:6px 28px;border-top:1px solid var(--rule);padding:18px 0 0;font-size:21px;font-weight:300;letter-spacing:-.015em;color:var(--muted);list-style:none;margin:0}

@media(max-width:800px){
  .h-hero{height:92svh;min-height:520px}
  .h-copy{padding-bottom:14px}
  .h-say{display:block;margin-bottom:24px}
  .h-role{font-size:9.4vw;letter-spacing:-.035em;line-height:1.04}
  .h-label{font-size:19px}
  .home .wordmark .mono.kind{display:inline}
  .h-say .say-sub{font-size:15px;margin-top:14px;padding:0}
  .mosaic.keyed{grid-template-columns:1fr;gap:48px}
  .mosaic.keyed .tile:nth-child(n){grid-column:1;margin-top:0}
  .mosaic.keyed .tile-visual{max-height:none}
  .mosaic.keyed .tile .tile-caption{flex-direction:column;align-items:flex-start;gap:4px;margin-top:12px}
  .mosaic.keyed .tile .tile-caption>span{max-width:none;text-align:left}
  .tile-caption h3 .go{display:none}
  .h-hero .slate-meta{grid-template-columns:minmax(0,1fr) auto}
  .h-hero .slate-meta>span{display:none}
  .h-hero .slate-meta>.h-now{grid-column:auto}
  .h-now-k>span{display:none}
  .h-now-k:before{margin-right:0}
  .h-now{gap:10px}
  .ai.compact{margin-top:88px}
  .ai.compact .ai-slot{flex:0 0 auto;height:min(54vw,300px)}
  .ai-nav{display:none}
  .row-title .go{opacity:1;transform:none;margin-left:8px}
  .body-list{font-size:17px;gap:4px 20px}
}
@media(prefers-reduced-motion:reduce){
  .h-hero .line{transform:none}
  .rise-in{opacity:1;transform:none}
}

/* ---------- on black (settings.SITE_BLACK): the studies band joins the ground instead of sitting on a navy panel ---------- */
html.black .home .ai{background:#000;--rule:rgba(236,234,230,.14);--muted:#8c8a84}
html.black .home .ai-head p{color:#a9a7a1}

/* the ending on the home is a sign-off, not a full screen of black */
.home footer.end{min-height:0;padding-bottom:clamp(120px,18svh,200px)}
#theme[hidden]{display:none}

/* All records hover preview: a small 3:2 loop that trails the cursor (js/home.js, row-peek). Pointer devices only. */
.row-peek{position:fixed;left:0;top:0;z-index:40;width:clamp(240px,22vw,340px);aspect-ratio:3/2;margin:0 0 0 28px;translate:0 -50%;pointer-events:none;
  border-radius:6px;overflow:hidden;background:#000;box-shadow:0 0 0 1px rgba(236,234,230,.1),0 24px 60px rgba(0,0,0,.55);
  opacity:0;scale:.92;transition:opacity .25s ease,scale .45s cubic-bezier(.16,1,.3,1);will-change:transform}
.row-peek.on{opacity:1;scale:1}
.row-peek img,.row-peek video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.row-peek video{opacity:0;transition:opacity .3s}
.row-peek.has-video video{opacity:1}
