Hero Image Display

No, you don’t need a different markup. And no, you can’t use PHP in your external stylesheets, but you could inline you styles. So both these options are possible.

<style>
<?php 
if($image = $page->coverimage()->toFile() && $page->display() == "1"): ?>
.hero {
background-image: url(<?= $image->url() ?>);
}
<?php endif ?>
</style>

or

<?php
  $image = $page->coverimage()->toFile();
 ?>
<section class="hero" <?php if($image && $page->display() == "1"){ echo 'style="background-image:url(' . $image->url() . ')"'; }?>>bla bla bla</section>

If you have no knowledge of PHP whatsoever, I suggest you go through some basic PHP tutorials, especially if statements, foreach loops, stringing variables with html etc.

This post has some resources: Search best websites to learn php