Is there a way to apply page conditional styling to a template?

I’d like to have fixed, sticky header on my homepage (to overlay a big hero section) but a simpler solid background color with position: static for the rest of the site. Is it possible to do this with a single header template? Or do i need to have one with the fixed styles and a duplicate for the basic style?

I have a similar question - would like to apply background color of a section conditionally, rather than duplicating the section totally and setting it per page ID. The content is exactly the same (dynamically pulled) so there’s no reason to duplicate it (this is within a CPT single post template).

I need to do this.

I’m surprised more people haven’t talked about it.

I want a transparent header that overlaps the hero content on the home page only.
Setting it to sticky only partially works because it has that feature of making the header appear when you scroll up, which I don’t want, and there is no way to turn that off.

But there is also no way to not make static for the rest of the home page. I only want the overlay on home page and static everywhere else.

I thought I could save my inner header containers as templates and then create two different headers and insert the templates in there, but then I realized the saved templates can’t be edited globally, so it doesn’t work that way, I’d still have to edit both of them any time I need to make a change.

And the sticky header doesn’t have enough functionality to do what I need. And there aren’t template conditions so that I can only use sticky for certain pages.

It’s like everywhere I turn there is something blocking the ability to do this simple thing. A sticky/overlay header on home page that does NOT reappear just by scrolling up, and then normal static header for the rest of the site. And not duplicate content to do it.

It looks like BricksExtras can help, but I don’t own that and if feels wrong to buy for one feature only.

I guess I’m just asking what is the “right” way to do this in Bricks at the moment.