/* OMNICOM Hero 3D, variant A. Classes are prefixed "oc-hero3d" to avoid collisions with the theme. */

.oc-hero3d-host { position: relative; overflow: hidden; isolation: isolate; }
/* Zero specificity, so the theme's own positioning of hero children always wins. */
:where(.oc-hero3d-host) > :where(:not(.oc-hero3d__layer)) { position: relative; z-index: 1; }

.oc-hero3d__layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
.oc-hero3d-ready > .oc-hero3d__layer { opacity: 1; }
.oc-hero3d__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Gutenberg Cover block: overlay (z-index 1) < 3D layer < content. */
.wp-block-cover.oc-hero3d-host > .oc-hero3d__layer { z-index: 1; }
.wp-block-cover.oc-hero3d-host > .wp-block-cover__inner-container { z-index: 2; }

/* Keeps the hero text readable over the mark. Colour = --oc-ink (#333132). */
.oc-hero3d__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(51, 49, 50, .9) 0%, rgba(51, 49, 50, .6) 40%, rgba(51, 49, 50, 0) 62%);
}
.oc-hero3d-host--mobile .oc-hero3d__shade { background: rgba(51, 49, 50, .72); }

/* The 3D mark replaces the flat decorative mark of the new homepage design once it is running. */
.oc-hero3d-ready .oc-hero__mark { display: none; }

/* Shortcode anchor takes no space. */
.oc-hero3d-anchor { display: none; }

@media (prefers-reduced-motion: reduce) {
  .oc-hero3d__layer { transition: none; }
}
