/* components/page-hero/PageHero.module.scss */
.mk-page-hero { position: relative; }
.mk-page-hero__container {
    padding-top: clamp(12rem, calc(12rem + 6 * ((100vw - 48rem) / 80)), 18rem);
}
@media (min-width: 720px) {
    .mk-page-hero__container {
        --column-count: 12;
        display: grid;
        row-gap: var(--grid-gutter);
        column-gap: min(var(--grid-gutter), calc(100% / 11));
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}
.mk-page-hero__content { grid-column: 2 / span 6; }
@media (min-width: 1080px) {
    .mk-page-hero__content { grid-column: 2 / span 5; }
}
.mk-page-hero__heading {
    margin: 0; padding: 0;
    column-span: all;
    display: inline-block;
    position: relative;
}
/* Type: the blocks' text styles (heading page-title, subheading h4, text body). */
.mk-page-hero__subheading { margin: 0; padding: 0; column-span: all; }
/* The original's text class is misspelled (pageHero___text), so it has no styles of its
   own: plain paragraphs with the browser's margins. */
/* :is(… .el-richtext) beats the rich text block's own p margins. */
:is(.mk-page-hero__text, .mk-page-hero__text .el-richtext) p { margin: 1em 0; }

/* Entrance (react-spring in PageHero.tsx; js/components/page-hero.js) */
.mk-page-hero__heading { opacity: 0; transform: translateY(20px); }
.mk-page-hero__body { opacity: 0; transform: translateY(10px); }
@media (prefers-reduced-motion: reduce), (scripting: none) {
    .mk-page-hero__heading, .mk-page-hero__body { opacity: 1; transform: none; }
}

/* Editable look (unset = the original): space, heading gap, dot, width, alignment. */
.mk-page-hero__container {
    padding-top: var(--mk-space-top, clamp(12rem, calc(12rem + 6 * ((100vw - 48rem) / 80)), 18rem));
    padding-bottom: var(--mk-space-bottom, 0);
}
.mk-page-hero__heading { margin-bottom: var(--mk-page-hero-heading-gap, 0); }
.mk-page-hero--align-center .mk-page-hero__content { text-align: center; }
@media (min-width: 720px) {
    .mk-page-hero--wide .mk-page-hero__content { grid-column: 2 / span 8; }
    .mk-page-hero--full .mk-page-hero__content { grid-column: 2 / span 10; }
    .mk-page-hero--align-center .mk-page-hero__content { grid-column: 4 / span 6; }
    .mk-page-hero--align-center.mk-page-hero--wide .mk-page-hero__content { grid-column: 3 / span 8; }
    .mk-page-hero--align-center.mk-page-hero--full .mk-page-hero__content { grid-column: 2 / span 10; }
}
/* Builder blocks in the slots: the heading block (h1) runs inline with the dot; an
   alignment chosen on it aligns the whole line (the wrapper takes the full width). */
.mk-page-hero__heading > .el-heading { display: inline; }
.mk-page-hero__heading:has(> .el-heading[style*="text-align"]) { display: block; }
.mk-page-hero__heading:has(> .el-heading[style*="text-align: left"]) { text-align: left; }
.mk-page-hero__heading:has(> .el-heading[style*="text-align: center"]) { text-align: center; }
.mk-page-hero__heading:has(> .el-heading[style*="text-align: right"]) { text-align: right; }

/* The yellow dot after the title is the text style page-title's (site.css
   .ts-page-title::after); the hero only sets its colour, hides it, and fades it in:
   js/components/page-hero.js springs --mk-page-hero-dot from 0 to 1. */
.mk-page-hero { --ts-page-title-dot-color: var(--mk-page-hero-dot-color, var(--color-accent-primary)); }
.mk-page-hero__heading { --ts-page-title-dot-opacity: var(--mk-page-hero-dot, 0); }
.mk-page-hero--no-dot { --ts-page-title-dot: none; }
@media (prefers-reduced-motion: reduce), (scripting: none) {
    .mk-page-hero__heading { --mk-page-hero-dot: 1; }
}
