/* sarahwaterson.net — one stylesheet. Change the look here; content never needs touching. */
:root{--rust:#A3461F;--ink:#111;--mid:#555;--muted:#888;--faint:#aaa;--rule:#ddd;--side:340px;--lblcol:96px;--gap:24px}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#fff;color:var(--ink);font-family:Inter,"Helvetica Neue",Arial,sans-serif;font-size:16px;line-height:1.6}
a{color:var(--ink);text-decoration:none}
img{display:block;max-width:100%}
em{font-style:italic}
.muted{color:var(--muted)}.faint{color:var(--faint)}.small{font-size:12px}.small-text{font-size:14px;line-height:22px}
.muted-link{color:var(--mid)}
.lbl{margin:0;font-size:11px;letter-spacing:.12em;color:var(--muted);font-weight:400}

/* underline that draws in on hover */
.t{background:linear-gradient(var(--ink),var(--ink)) 0 100%/0 1px no-repeat;transition:background-size .45s ease}
a:hover .t,.hero:hover .t,.fo summary:hover .t{background-size:100% 1px}
.st{overflow:hidden;display:block}.st img{transition:transform .9s cubic-bezier(.2,.7,.2,1)}.st:hover img{transform:scale(1.03)}

/* frame: side column with burger + lockup, main column */
.frame{display:flex;flex-wrap:wrap;min-height:100vh}
.side{flex:0 0 var(--side);padding:40px 0 40px 24px;display:flex;gap:96px;align-items:flex-start}
.side{position:sticky;top:0;align-self:flex-start}
.burger,.menu-close{width:44px;height:44px;border:0;background:none;padding:0;cursor:pointer}
.lockup img{width:134px;height:auto}
.main{flex:1 1 600px;min-width:0;padding:40px 64px 64px 40px}

/* grids shared by home + work */
.g3{display:grid;grid-template-columns:var(--lblcol) minmax(0,1fr) 220px;gap:var(--gap);align-items:baseline}
.g2{display:grid;grid-template-columns:var(--lblcol) minmax(0,1fr);gap:var(--gap)}
.titleblock{display:flex;flex-direction:column;gap:6px}
h1,.h1{margin:0;font-size:28px;line-height:34px;font-weight:400}
.sub{margin:0;font-size:14px;line-height:21px;color:var(--mid)}
.filed{display:flex;flex-direction:column;gap:4px;font-size:13px;line-height:20px;color:var(--mid)}
.prose{font-size:16px;line-height:27px;max-width:640px}
.prose p{margin:0 0 16px}.prose p:last-child{margin-bottom:0}
.prose img.logos{display:block;width:100%;max-width:400px;height:auto;margin-top:24px}

/* home */
.home{display:flex;flex-direction:column;gap:72px}
.hero{display:flex;flex-direction:column;gap:18px}
.hero .im{display:block;overflow:hidden}
.hero img{width:100%;aspect-ratio:16/9;object-fit:cover;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
.hero:hover img{transform:scale(1.02)}
.hero:active{transform:translateY(1px)}
.catalogue{display:flex;flex-direction:column;gap:8px}
.cat-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 32px}
.filters{display:flex;flex-wrap:wrap;gap:0 20px}
.fl{background:none;border:0;padding:6px 0;font:inherit;font-size:13px;color:#777;cursor:pointer;min-height:44px;transition:color .25s}
.fl:hover{color:var(--ink)}
.fl.on{color:var(--ink);text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:.8px}
.idx{font-size:14px;line-height:20px;font-variant-numeric:tabular-nums}
.idx-row{display:grid;grid-template-columns:72px 104px minmax(0,1fr) 80px 240px;gap:16px;align-items:center;padding:8px 0;border-bottom:.6px solid var(--rule)}
.idx-headrow{padding:0 0 8px;border-bottom:.8px solid var(--ink);font-size:11px;letter-spacing:.12em;color:var(--muted)}
.idx-row img,.thumb-empty{width:72px;height:40px;object-fit:cover;background:#eee;display:block}
.idx-year,.idx-tags{color:var(--mid)}
.idx-meta{display:none}
.row{transition:opacity .35s ease,padding .35s ease;animation:rin .5s ease both}
.idx:hover .row{opacity:.4}.idx .row:hover{opacity:1;padding-left:8px}
.idx .row.nolink,.idx .row.nolink:hover{cursor:default;padding-left:0}
.row[hidden]{display:none}
.empty{margin:16px 0 0;font-size:13px;color:#777}
@keyframes rin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* work post */
.work{display:flex;flex-direction:column;gap:56px}
.work-head{display:flex;flex-direction:column;gap:18px}
.crumbs{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:12px 24px;font-size:12px}
.crumbs a{color:var(--muted)}.crumbs .crumbs-next{color:var(--mid)}
.lead{width:100%;aspect-ratio:16/9;object-fit:cover}
.lead-empty{background:#f3f3f1}
/* small or square images: show whole, on black, never cropped or blown up */
.lead-contain,.hero img.lead-contain{object-fit:scale-down;background:#000}
.stills .st img[src$='.png']{object-fit:contain;background:#000}
.band{align-items:start}
.shown{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.shown li{display:grid;grid-template-columns:56px minmax(0,1fr);gap:16px}
.stills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stills img{width:100%;aspect-ratio:16/9;object-fit:cover}
.more{display:flex;flex-wrap:wrap;gap:8px 32px}
.works-nav{display:flex;justify-content:space-between;flex-wrap:wrap;gap:16px;padding-top:24px;border-top:.8px solid var(--ink);font-size:13px}

/* folio accordion: rows stay put, contents slide in and sit flush left */
.fo{border-top:.8px solid var(--rule)}.fo:last-child{border-bottom:.8px solid var(--rule)}
.fo summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:var(--lblcol) minmax(0,1fr) 28px;gap:16px;align-items:baseline;padding:16px 0;min-height:44px}
.fo summary::-webkit-details-marker{display:none}
.fo-title{font-size:15px;line-height:22px}.fo-title .muted{font-size:13px}
.fo .pm{justify-self:end;font-size:18px;line-height:18px;color:var(--mid);transition:transform .35s ease}
.fo[open] .pm{transform:rotate(45deg)}
.fo .bd{margin-left:calc(-1 * (var(--lblcol) + var(--gap)));padding:8px 0 40px}
.fo[open] .bd{animation:foSlide .5s cubic-bezier(.2,.7,.2,1)}
@keyframes foSlide{from{opacity:0;transform:translateX(120px)}to{opacity:1;transform:none}}
.plates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.plate{display:flex;flex-direction:column;gap:8px;color:var(--mid)}.plate .im{overflow:hidden;display:block}
.plate img{width:100%;height:auto}
.fo .bd>a img{width:auto;max-width:100%;height:auto}
.prose-long{max-width:720px;font-size:17px;line-height:29px}
.prose-long h2,.prose-long h3{font-size:17px;line-height:26px;font-weight:500;margin:32px 0 14px}
.prose-long p{margin:0 0 14px}

/* simple pages */
.page{display:flex;flex-direction:column;gap:40px}
.writing-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}

/* menu overlay */
.menu{position:fixed;inset:0;background:#fff;z-index:10;display:flex;padding:40px 24px;animation:min .35s ease both}
.menu[hidden]{display:none}
.menu-nav{margin-left:272px;display:flex;flex-direction:column;gap:14px;font-size:40px;line-height:52px;font-weight:300}
.menu-nav a{transition:padding .25s}.menu-nav>a:hover{padding-left:8px}
.menu-small{margin-top:32px;font-size:13px;line-height:22px;color:var(--muted);font-weight:400}.menu-small a{color:var(--muted)}
@keyframes min{from{opacity:0}to{opacity:1}}

/* phone and narrow screens */
@media (max-width:900px){
  :root{--lblcol:0px;--gap:0px}
  .frame{flex-direction:column;flex-wrap:nowrap}
  .main{width:100%;flex:none}
  .side{position:static;flex:none;width:100%;padding:20px 16px 0 20px;flex-direction:row-reverse;justify-content:space-between}
  .lockup img{width:64px}
  .main{padding:28px 20px 48px}
  .g3,.g2{grid-template-columns:1fr;gap:6px}
  .g3>span:empty,.g2>span:empty{display:none}
  .filed{margin-top:8px}
  .band{gap:10px}
  .stills,.plates{grid-template-columns:1fr}
  .home{gap:40px}
  .cat-head{display:block}
  .filters{flex-wrap:nowrap;overflow-x:auto;gap:18px;scrollbar-width:none;min-width:0;max-width:100%}
  .fl{white-space:nowrap;flex:0 0 auto}
  .side{gap:0}
  .idx-row{grid-template-columns:64px minmax(0,1fr) auto;gap:14px}
  .idx-row>span:nth-child(2),.idx-tags,.idx-headrow{display:none}
  .idx-row img,.thumb-empty{width:64px;height:36px}
  .idx-meta{display:block;font-size:12px;color:var(--muted)}
  .idx-title{display:flex;flex-direction:column}
  .fo summary{grid-template-columns:auto minmax(0,1fr) 28px}
  .fo .bd{margin-left:0}
  .menu{padding:20px 16px;flex-direction:column;align-items:flex-end}
  .menu-nav{margin:40px 0 0;align-self:stretch;font-size:32px;line-height:46px;gap:8px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* writing index: same feel as the catalogue */
.idx-writing .idx-row{grid-template-columns:80px minmax(0,1fr) 160px 240px}
@media (max-width:900px){
  .idx-writing .idx-row{grid-template-columns:minmax(0,1fr) auto}
  .idx-writing .idx-row>span:first-child{order:2;color:var(--mid)}
  .idx-writing .idx-headrow{display:none}
  .idx-writing .idx-row>span:nth-child(2){display:flex}
}

/* the catalogue: one colour, everywhere it appears, so it's always easy to find */
.cat-link,.crumbs a.cat-link{color:var(--rust);font-weight:500}
.cat-link .t{background-image:linear-gradient(var(--rust),var(--rust))}
.cat-mark{color:var(--rust);font-weight:500}

/* keyboard users: a clear focus ring and a skip link */
:focus-visible{outline:2px solid var(--rust);outline-offset:3px}
.skip{position:absolute;left:-9999px;top:8px;background:#fff;padding:8px 12px;z-index:20}
.skip:focus{left:8px}

/* lightbox: white ground, the image whole, quiet controls */
.lb{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#fff;color:var(--ink)}
.lb::backdrop{background:#fff}
.lb[open]{display:grid;grid-template-columns:72px minmax(0,1fr) 72px;align-items:center;animation:min .3s ease both}
.lb-fig{margin:0;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:64px 0 32px;box-sizing:border-box}
.lb-fig img{max-width:100%;max-height:calc(100vh - 150px);object-fit:contain}
.lb-fig img.in{animation:lbIn .45s cubic-bezier(.2,.7,.2,1)}
.lb-fig figcaption{display:flex;gap:24px;font-size:12px;color:var(--mid)}
.lb-count{color:var(--muted);font-variant-numeric:tabular-nums}
.lb-close{position:absolute;top:24px;right:24px;width:44px;height:44px;border:0;background:none;cursor:pointer}
.lb-prev,.lb-next{width:72px;height:100%;border:0;background:none;font:inherit;font-size:22px;color:var(--mid);cursor:pointer;transition:color .25s}
.lb-prev:hover,.lb-next:hover{color:var(--ink)}
.lb-prev[hidden],.lb-next[hidden]{visibility:hidden;display:block}
html.lb-on{overflow:hidden}
@keyframes lbIn{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}
@media (max-width:900px){
  .lb[open]{grid-template-columns:44px minmax(0,1fr) 44px}
  .lb-prev,.lb-next{width:44px}
  .lb-close{top:12px;right:12px}
}

/* keep the lead image from filling the whole window: the title and the start of the catalogue always show */
.hero img{max-height:max(300px, calc(100vh - 300px))}
.lead{max-height:max(300px, calc(100vh - 240px))}

/* clicking CATALOGUE glides the index up to fill the screen */
html{scroll-behavior:smooth}
.catalogue{min-height:calc(100vh - 40px);scroll-margin-top:40px}
.cat-jump .t{background-image:linear-gradient(var(--rust),var(--rust))}
@media (max-width:900px){.catalogue{scroll-margin-top:20px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* about: portrait beside the bio */
.about-intro{display:grid;grid-template-columns:200px minmax(0,640px);gap:32px;align-items:start}
.portrait{width:200px;height:200px;object-fit:cover}
@media (max-width:900px){.about-intro{grid-template-columns:1fr;gap:20px}.portrait{width:160px;height:160px}}

.menu-nav{--gcol:21px;--ggap:18px}
.menu-nav>a{display:flex;align-items:center;gap:var(--ggap)}
.glyph{width:var(--gcol);height:var(--gcol);flex:none;color:var(--muted);overflow:visible}
.glyph-at{display:inline-block;width:var(--gcol);font-size:calc(var(--gcol)*1.1);line-height:1;text-align:center;font-weight:400}
.menu-nav>a[aria-current="page"],.menu-nav>a[aria-current="page"] .glyph{color:var(--rust)}
.menu-small{display:flex;flex-direction:column;gap:4px}
.menu-small a{display:flex;align-items:center;gap:var(--ggap);width:max-content}
.sicon{width:var(--gcol);display:flex;justify-content:center;flex:none}
.sicon svg{width:13px;height:13px}
@media (max-width:900px){.menu-nav{--gcol:17px;--ggap:14px}}
.glyph *{vector-effect:non-scaling-stroke}
.stills.s4{grid-template-columns:repeat(4,minmax(0,1fr))}
.stills.full img{aspect-ratio:auto;height:auto;object-fit:contain}
@media (max-width:900px){.stills.s4{grid-template-columns:repeat(2,minmax(0,1fr))}}
.lead-contain.lead-enlarge,.hero img.lead-enlarge{object-fit:contain}
.vid{position:relative;display:inline-block;width:100%;max-width:240px;background:#000;cursor:pointer}
.vid img{display:block;width:100%;height:auto;opacity:.9;transition:opacity .25s}
.vid:hover img{opacity:1}
.vid .play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff}
.vid .play svg{width:36px;height:36px;transition:transform .25s}
.vid:hover .play svg{transform:scale(1.08)}
.vid-cap{margin:8px 0 0;font-size:12px;color:var(--mid)}
.vlb[open]{display:flex;align-items:center;justify-content:center;background:#000}
.vlb::backdrop{background:#000}
.vlb video{width:min(960px,92vw);max-height:calc(100vh - 120px);background:#000}
.vlb .lb-close{color:#fff}
.lead-card{background:#111;color:#eee;display:flex;flex-direction:column;justify-content:flex-end;gap:6px;padding:clamp(20px,4vw,48px);box-sizing:border-box}
.lead-card .lc-no{font-size:13px;letter-spacing:.08em;color:#8a8a8a}
.lead-card .lc-t{font-size:clamp(32px,5vw,64px);line-height:1.05;font-weight:300}
.lead-card .lc-note{font-size:13px;color:#8a8a8a}
.thumb-card{background:#111;color:#bbb;font-size:10px;letter-spacing:.06em;display:flex;align-items:center;justify-content:center}
