/* The homepage. Every rule is scoped to an .hp- class inside #home-view, apart from
   the film dialog the hero opens. Shared pieces (header, type, colours) are in styles.css. */
:root{--hp-gutter:clamp(20px,4.2vw,60px);--hp-edge:max(var(--hp-gutter),calc(50vw - 720px + var(--hp-gutter)));--hp-night:#080913}
#home-view{--hp-gap:clamp(16px,2.2vw,32px);--hp-space:clamp(56px,7.2vw,104px)}
.hp-wrap{max-width:1440px;margin:0 auto;padding-inline:var(--hp-gutter)}
.hp-label,.hp-kicker{font-size:12px;line-height:1.5;letter-spacing:.14em;text-transform:uppercase}
.hp-label{letter-spacing:.16em;color:var(--accent)}
.hp-kicker{color:var(--muted)}

/* At the top of the homepage the header sits on the hero's night sky. */
body:has(#home-view:not([hidden])) .site-header{--header-gutter:var(--hp-edge)}
body:has(#home-view:not([hidden])) .site-header:not(.scrolled){background:var(--hp-night);border-bottom-color:transparent;backdrop-filter:none}
.site-header{transition:background-color .25s,border-color .25s}

/* Hero: the text column lines up with the page content, the artwork runs to the edge of the screen. */
.hp-hero{display:flex;flex-direction:column-reverse;background:var(--hp-night);overflow:hidden}
.hp-hero-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:28px var(--hp-gutter) clamp(40px,5vw,72px)}
#vw-title{margin-top:16px;font:300 clamp(48px,7.4vw,112px)/.96 var(--serif);letter-spacing:-.025em}
#vw-title em{font-weight:inherit;font-style:italic;color:var(--accent)}
.hp-hero-question{margin-top:clamp(16px,2vw,28px);max-width:17em;font:400 clamp(20px,1.9vw,28px)/1.3 var(--serif);text-wrap:balance}
.hp-button{display:inline-flex;align-items:center;gap:14px;min-height:52px;margin-top:clamp(24px,2.6vw,36px);padding:0 24px;background:var(--text);color:var(--bg);font-size:15px;font-weight:600;transition:background-color .2s}
.hp-button:hover{background:var(--accent)}
.hp-hero-art{position:relative;display:block;min-height:clamp(280px,44svh,460px);overflow:hidden;-webkit-mask-image:linear-gradient(0deg,transparent,#000 12%);mask-image:linear-gradient(0deg,transparent,#000 12%)}
.hp-hero-art img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:46.6% 50%;-webkit-mask-image:linear-gradient(180deg,transparent,#000 7%);mask-image:linear-gradient(180deg,transparent,#000 7%)}
.hp-hero-art:focus-visible{outline-offset:-4px}
@media(min-width:940px){
.hp-hero{flex-direction:row}
.hp-hero-copy{flex:none;width:calc(var(--hp-edge) + clamp(360px,34vw,520px) + var(--hp-gutter));padding-left:var(--hp-edge)}
.hp-hero-art{flex:1 1 0;min-height:clamp(420px,calc(min(56vw,100svh) - var(--header-h)),760px);-webkit-mask-image:linear-gradient(90deg,transparent,#000 9%);mask-image:linear-gradient(90deg,transparent,#000 9%)}
}

/* Two films */
.hp-films{background:var(--hp-night);border-top:1px solid #f0efe824}
.hp-films-inner{display:flex;flex-wrap:wrap;align-items:center;gap:20px var(--hp-gutter);padding-block:28px}
.hp-films-intro{flex:1.2 1 300px}
@media(max-width:939px){.hp-films-intro{flex-basis:100%}}
.hp-films h2{font:400 24px/1.25 var(--serif)}
.hp-films-intro p{margin-top:6px;max-width:34em;color:var(--muted);font-size:15px;line-height:1.5}
.hp-film{flex:1 1 260px;display:flex;align-items:center;gap:16px;min-height:96px}
.hp-film-still{position:relative;flex:none;width:72px;height:96px;overflow:hidden;background:#000}
.hp-film-still img{width:100%;height:100%;object-fit:cover}
.hp-film-still:before{content:"";position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;background:#080913cc}
.hp-film-still:after{content:"";position:absolute;left:50%;top:50%;margin:-6px 0 0 -3px;border-left:9px solid var(--text);border-block:6px solid transparent}
.hp-film-text{display:flex;flex-direction:column;gap:4px}
.hp-film-title{font:400 22px/1.2 var(--serif);transition:color .2s}
.hp-film:hover .hp-film-title{color:var(--accent)}

/* Sections */
.hp-section{padding-block:var(--hp-space)}
.hp-section+.hp-section{border-top:1px solid var(--line)}
.hp-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 24px}
.hp-head h2{font:300 clamp(34px,3.6vw,52px)/1.1 var(--serif);letter-spacing:-.02em}
.hp-more{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:15px;color:var(--accent);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px}
.hp-more:hover{color:var(--text)}
.hp-intro{margin-top:10px;max-width:40em;color:var(--muted);font-size:16px;line-height:1.5}
.hp-head+.hp-work,.hp-head+.hp-rows,.hp-intro+.hp-scroller,.hp-sources+.hp-scroller{margin-top:clamp(24px,2.8vw,40px)}
.hp-sources{display:flex;flex-wrap:wrap;gap:0 28px;margin-top:6px}
.hp-sources a{display:inline-flex;align-items:center;min-height:44px;font-size:14px;color:var(--muted);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
.hp-sources a:hover{color:var(--accent)}

/* Works: six slots. One wide lead, a pair, then a row of three. Every work is the same block, so a block can be moved from slot to slot as it is. */
.hp-work{display:block}
.hp-work img{width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;object-position:var(--hp-focus,50% 50%);background:var(--panel)}
.hp-work h3{margin-top:6px;font:400 clamp(24px,2.1vw,30px)/1.15 var(--serif);letter-spacing:-.01em;transition:color .2s}
.hp-work .hp-kicker{display:block;margin-top:16px}
.hp-work p{margin-top:8px;color:var(--muted);font-size:16px;line-height:1.5}
.hp-work:hover h3,.hp-card:hover h3,.hp-pair:hover .hp-pair-title{color:var(--accent)}
/* the lead is whichever work sits directly in the section, outside the pair and the row */
.hp-wrap>.hp-work{display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:32px}
.hp-wrap>.hp-work img{grid-column:1/-1;aspect-ratio:auto;height:clamp(260px,39vw,561px)}
.hp-wrap>.hp-work h3{grid-area:2/1;margin-top:18px;font-size:clamp(28px,2.6vw,38px)}
.hp-wrap>.hp-work .hp-kicker{grid-area:2/2;margin-top:18px}
.hp-wrap>.hp-work p{grid-column:1/-1;max-width:44em}
@media(max-width:700px){.hp-wrap>.hp-work{grid-template-columns:1fr}.hp-wrap>.hp-work .hp-kicker{grid-area:3/1;margin-top:6px}}
.hp-pairing{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:28px var(--hp-gap);margin-top:clamp(40px,4.4vw,64px)}

/* A row of three that becomes a sideways scroll on narrow screens */
.hp-scroller{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(min(300px,78vw),1fr);gap:var(--hp-gap);overflow-x:auto;scroll-snap-type:x proximity;scroll-padding-inline:var(--hp-gutter);margin-inline:calc(var(--hp-gutter)*-1);padding:8px var(--hp-gutter);margin-block:-8px;scrollbar-width:none}
.hp-scroller::-webkit-scrollbar{display:none}
.hp-scroller>a{display:block;min-width:0;scroll-snap-align:start}
.hp-works .hp-scroller{margin-top:calc(clamp(40px,4.4vw,64px) - 8px)}
.hp-scroller .hp-work h3{font-size:26px}
.hp-scroller .hp-work p{font-size:15px}

/* Seasky and Aria */
.hp-pair img{width:100%;height:auto;object-fit:cover;background:var(--panel)}
.hp-pair img:first-child{aspect-ratio:1.3/1}
.hp-pair img+img{aspect-ratio:16/9;margin-top:2px}
.hp-pair-caption{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 16px;margin-top:12px;font-size:15px}
.hp-pair-title{transition:color .2s}
.hp-pair-caption span+span{color:var(--muted)}

/* Collections */
.hp-card img{width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;background:var(--panel)}
.hp-card h3{margin-top:16px;font:400 26px/1.15 var(--serif);letter-spacing:-.01em;transition:color .2s}
.hp-card p{margin-top:6px;color:var(--muted);font-size:15px;line-height:1.5}
.hp-rows{display:flex;flex-direction:column;border-bottom:1px solid var(--line)}
.hp-rows>div{display:contents}
.hp-scroller+.hp-rows{margin-top:clamp(40px,3.9vw,56px)}
.hp-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 24px;padding:20px 0;border-top:1px solid var(--line)}
.hp-row-title{flex:1 1 260px;font:400 24px/1.3 var(--serif);transition:color .2s}
.hp-row-note{flex:2 1 260px;color:var(--muted);font-size:15px;line-height:1.5}
.hp-row-count{flex:0 0 7.5em;text-align:right;color:var(--muted);font-size:14px}
@media(max-width:700px){.hp-row-title{flex:1 1 0}.hp-row-count{order:2;flex:none}.hp-row-note{order:3;flex:1 1 100%}}
.hp-row:hover .hp-row-title{color:var(--accent)}

/* Writing */
.hp-post{gap:4px 32px;padding-block:22px}
.hp-row-date{flex:0 0 250px;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.hp-post .hp-row-title{flex:1 1 300px;font-size:clamp(22px,2vw,26px);line-height:1.25}

/* About */
.hp-about{padding-block:clamp(64px,7.8vw,112px)}
.hp-about-inner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:40px 64px}
.hp-about h2{flex:1 1 380px;font:300 clamp(40px,5.4vw,76px)/1.02 var(--serif);letter-spacing:-.025em}
.hp-about h2 em{font-weight:inherit;font-style:italic;color:var(--accent)}
.hp-about-copy{flex:1 1 380px;max-width:560px}
.hp-about-copy>p{font-size:17px;line-height:1.6}
.hp-about-copy>p+p{margin-top:18px}
.hp-about-copy>.hp-label{margin-bottom:20px;font-size:12px;line-height:1.5}
.hp-about-copy>.hp-label+p{margin-top:0}

/* Footer */
main>footer.hp-footer{padding:0;border-top:1px solid var(--line)}
main>footer.hp-footer>.hp-wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 32px;margin-top:0;padding-block:36px;border-top:0;font-size:14px;color:var(--text)}
.hp-footer-mark{display:flex;align-items:center;min-height:44px}
.hp-footer-mark img{width:84px;height:auto}
.hp-footer-links{display:flex;flex-wrap:wrap;align-items:center;gap:0 28px}
.hp-footer-links>a,.hp-footer-links>button{display:flex;align-items:center;min-height:44px;font-size:14px}
.hp-footer-links>a:hover,.hp-footer-links>button:hover{color:var(--accent)}
.hp-footer-links>span{color:var(--muted);font-size:13px}

/* Film player */
.vw-dialog{background:var(--hp-night);color:var(--text);border:1px solid #464651;padding:16px;width:min(520px,94vw);max-height:94dvh}
.vw-dialog::backdrop{background:#02030aea;backdrop-filter:blur(12px)}
.vw-player-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.vw-player-head h2{font:400 20px/1.2 var(--serif)}
.vw-player-head button{min-height:44px;padding:0 12px;border:1px solid #62626d;font-size:13px}
.vw-player-head button:hover{border-color:var(--accent);color:var(--accent)}
.vw-dialog video{display:block;width:100%;max-height:79dvh;background:#000}
