.live-hero,
#ms-header:has(+ * > .live-hero:first-child) > .header-in {
    --live-hero-viewport: min(100svh, 1080px);
    /* height the screen has beyond the 720px the layout was designed for */
    --live-hero-room: max(0px, var(--live-hero-viewport) - 720px);
    --live-hero-width: calc(var(--page-max-width) + var(--live-hero-room) * .8);
}

/* a page that opens with this hero starts its header on the hero's content edges (the grid less the copy's inline padding),
   until the header turns sticky */
@media (min-width: 1361px) {
    #ms-header:not(:has(> .header-in.sticky-header)):has(+ * > .live-hero:first-child) > .header-in {
        max-width: calc(min(var(--live-hero-width), 100% - var(--spacing) / 3) - var(--spacing) / 2);
    }
}

.live-hero {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--live-hero-viewport) - var(--ms-header-height));
    /* bottom space keeps the content off the screen edge and grows with the extra height */
    padding: calc(var(--spacing) / 8) calc(var(--spacing) / 6) calc(var(--spacing) / 2 + var(--live-hero-room) / 6);
    position: relative;
    isolation: isolate;
    color: var(--text);
}

.live-hero-background {
    display: none;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--maestra-blue) 4%, var(--background)), var(--background) 70%);
}

/* right under the header, the background continues behind the transparent navbar */
#ms-header + * > .live-hero:first-child .live-hero-background { top: calc(var(--ms-header-height) * -1); }

.live-hero-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(color-mix(in srgb, var(--maestra-blue) 9%, transparent) calc(var(--font-xs) / 12), transparent calc(var(--font-xs) / 12));
    background-size: calc(var(--font-xs) * 2) calc(var(--font-xs) * 2);
    mask-image: radial-gradient(ellipse 70% 60% at 65% 45%, var(--maestra-black) 20%, transparent 75%);
}

/* the orbs and the glow are PNGs pre-rendered from their blurred shapes; each box is grown by the blur's reach
   (three standard deviations) on every side to fit the image */
.live-hero-background > i {
    position: absolute;
    aspect-ratio: 1;
    background: center / 100% no-repeat;
}

.live-hero-background > i:nth-child(1) {
    width: calc(var(--page-max-width) * .42 + var(--spacing) * 4.2);
    top: calc(6% - var(--spacing) * 2.1);
    right: calc(4% - var(--spacing) * 2.1);
    background-image: url("/static/blocks/live-hero/media/orb-blue.png");
    opacity: .16;
}

.live-hero-background > i:nth-child(2) {
    width: calc(var(--page-max-width) * .32 + var(--spacing) * 4.2);
    right: calc(30% - var(--spacing) * 2.1);
    bottom: calc(var(--spacing) * -3.1);
    background-image: url("/static/blocks/live-hero/media/orb-green.png");
    opacity: .18;
}

.live-hero-background > i:nth-child(3) {
    width: calc(var(--page-max-width) * .27 + var(--spacing) * 4.2);
    top: calc(12% - var(--spacing) * 2.1);
    left: calc(var(--spacing) * -2.9);
    background-image: url("/static/blocks/live-hero/media/orb-yellow.png");
    opacity: .14;
}

.live-hero-grid {
    display: grid;
    flex-grow: 1;
    width: 100%;
    grid-template-columns: minmax(0, calc(var(--page-max-width) / 2)) minmax(0, 1fr);
    max-width: var(--live-hero-width);
    margin-inline: auto;
    align-items: stretch;
}

.live-hero-copy, .live-hero-visual {
    position: relative;
    isolation: isolate;
    min-width: 0;
    display: flex;
    align-items: center;
}

.live-hero-copy { padding-bottom: calc(var(--live-hero-room) / 6); }

.live-hero-glow {
    position: absolute;
    inset: calc(6% - var(--spacing) * 1.65) calc(4% - var(--spacing) * 1.65);
    z-index: -1;
    background: url("/static/blocks/live-hero/media/glow.png") center / 100% 100% no-repeat;
    opacity: .2;
    animation: live-hero-glow 12s linear infinite, live-hero-fade 1.2s .1s ease-out backwards;
}
@keyframes live-hero-glow { to { transform: rotate(360deg); } }
.live-hero.is-offscreen .live-hero-glow, .live-hero.is-offscreen .cta-live-indicator::after { animation-play-state: paused; }

.live-hero-copy-content {
    width: 100%;
    padding: calc(var(--spacing) / 6) calc(var(--spacing) / 4);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--spacing) / 6 + var(--live-hero-room) / 12);
}
.live-hero-label {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--font-xs) * .8);
    padding: calc(var(--font-xs) / 3) var(--font-xs) calc(var(--font-xs) / 3) calc(var(--font-xs) / 3);
    border-radius: var(--button-border-radius);
    background: var(--ncs-container-weak);
    font-size: var(--font-sm);
    line-height: 1.4;
}
.live-hero-live {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: calc(var(--font-xs) / 2);
    padding: calc(var(--font-xs) / 3) calc(var(--font-xs) * .8);
    border-radius: var(--button-border-radius);
    background: #e61010;
    color: var(--text-light-contrast);
    letter-spacing: 0.1em;
    font-size: var(--font-xs);
}
.live-hero-live .cta-live-indicator { width: calc(var(--font-xs) / 2); height: calc(var(--font-xs) / 2); }
.live-hero-title.section-header { margin: 0; text-align: start; }
.live-hero-title .section-title {
    margin: 0;
    font-size: var(--font-xxxl);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.live-hero .live-hero-title .color-cycle {
    background: linear-gradient(95deg, var(--maestra-green), var(--maestra-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: none;
}
.live-hero-title .section-subtitle {
    margin: calc(var(--spacing) / 5) 0 0;
    font-size: var(--font-md);
    line-height: 1.4;
    color: color-mix(in srgb, var(--text) 78%, var(--background));
}
.live-hero-actions { display: flex; flex-wrap: wrap; gap: var(--font-sm); }
.live-hero-primary { --cta-bg: var(--ncs-transcription-primary); --cta-text: var(--ncs-transcription-on-primary); }
.live-hero .feature-checklist { justify-content: flex-start; text-align: start; }
.live-hero-visual { justify-content: center; }
.live-hero-visual > .showcase { max-width: 92%; }

.live-hero-label, .live-hero-title > :is(.section-title, .section-subtitle), .live-hero-actions > *, .live-hero .feature-checklist-item {
    animation: live-hero-rise .7s calc(var(--live-hero-step, 0) * 90ms) cubic-bezier(.2, .7, .2, 1) backwards;
}
.live-hero-title > .section-title { --live-hero-step: 1; }
.live-hero-title > .section-subtitle { --live-hero-step: 2; }
.live-hero-actions > :nth-child(1) { --live-hero-step: 3; }
.live-hero-actions > :nth-child(n + 2) { --live-hero-step: 4; }
.live-hero .feature-checklist-item:nth-child(1) { --live-hero-step: 5; }
.live-hero .feature-checklist-item:nth-child(2) { --live-hero-step: 6; }
.live-hero .feature-checklist-item:nth-child(n + 3) { --live-hero-step: 7; }
@keyframes live-hero-rise {
    from {
        opacity: 0;
        translate: 0 calc(var(--font-xs) * 1.5);
        filter: blur(calc(var(--font-xs) * .75));
    }
}
@keyframes live-hero-fade { from { opacity: 0; } }
/* --live-hero-exit goes from 0 to 1 as the hero scrolls away, set by live-hero.ts; not inherited, so scrolling
   restyles only the two columns and not the showcase inside. While it exits, each column gets its own layer, so the
   exit moves and fades it without repainting it (only then, so resting text keeps subpixel antialiasing) */
@property --live-hero-exit { syntax: "<number>"; inherits: false; initial-value: 0; }
.live-hero-copy, .live-hero-visual {
    opacity: calc(1 - var(--live-hero-exit, 0));
    translate: 0 calc(var(--live-hero-exit, 0) * var(--spacing) / 2);
    scale: calc(1 - var(--live-hero-exit, 0) * .04);
}
.live-hero.is-exiting :is(.live-hero-copy, .live-hero-visual) { will-change: transform; }

@media (max-width: 991px) {
    .live-hero { --live-hero-room: 0px; min-height: 0; padding-bottom: calc(var(--spacing) / 8); }
    .live-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .live-hero-copy-content { padding: calc(var(--spacing) * 3 / 4) calc(var(--spacing) / 2); }
    .live-hero-visual { padding-block: calc(var(--spacing) / 3) max(calc(var(--spacing) / 3), 7%); }
    .live-hero-visual > .showcase { max-width: none; }
    .live-hero-visual { opacity: 1; translate: none; scale: none; }
    .live-hero.is-exiting .live-hero-visual { will-change: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .live-hero-glow { animation: none; }
    .live-hero-label, .live-hero-title > :is(.section-title, .section-subtitle), .live-hero-actions > *, .live-hero .feature-checklist-item { animation-name: live-hero-fade; }
}
@media (max-width: 767px) {
    .live-hero-title .section-subtitle { font-size: var(--font-md); }
    .live-hero { padding-inline: calc(var(--spacing) / 8); }
    .live-hero-grid { max-width: none; }
    .live-hero-copy-content { padding-inline: calc(var(--spacing) / 3); }
    .live-hero-visual > .showcase { max-width: var(--page-max-width); }
    .live-hero-label { gap: calc(var(--font-xs) / 2); }
    .live-hero-copy-content { align-items: center; text-align: center; }
    .live-hero-title.section-header { text-align: center; }
    .live-hero-actions, .live-hero .feature-checklist { justify-content: center; }
}
