/*
 * Final public hero contract.
 *
 * This layer is intentionally small. The base component owns typography and
 * artwork; this file only prevents late compatibility rules from changing
 * the frame geometry. The development badge is fixed and never participates
 * in the hero layout.
 */

:root {
    --copp-home-hero-height: 440px;
    --copp-home-hero-copy-max: 560px;
}

html body :is(
    .copp-hero,
    .copp-news-hero,
    .copp-gallery-hero,
    .copp-opportunity-hero,
    .copp-about-subpage-hero,
    .copp-programs-page-hero,
    .copp-partners-hero,
    .copp-resume-bank-hero,
    .copp-school-hero,
    .copp-students-hero,
    .copp-stories-hero,
    .copp-edu-orgs-hero,
    .copp-events-hero,
    .copp-contacts-hero,
    .copp-contests-hero,
    .copp-projects-hero,
    .copp-programs-archive__hero,
    .copp-program-article__hero,
    .copp-news-article__hero,
    .copp-project-article__hero,
    .copp-equipment-article__hero,
    .copp-contest-article__hero,
    .copp-knowledge-item__hero,
    .copp-resources-archive__hero,
    .copp-resource-article__hero
) {
    box-sizing: border-box !important;
    margin-block-start: 0 !important;
    position: relative !important;
    top: auto !important;
    transform: none !important;
}

/* Catalog and article heroes remain content-sized. */
html body :is(
    .copp-news-hero,
    .copp-gallery-hero,
    .copp-opportunity-hero,
    .copp-about-subpage-hero,
    .copp-programs-page-hero,
    .copp-partners-hero,
    .copp-resume-bank-hero,
    .copp-school-hero,
    .copp-students-hero,
    .copp-stories-hero,
    .copp-edu-orgs-hero,
    .copp-events-hero,
    .copp-contacts-hero,
    .copp-contests-hero,
    .copp-projects-hero,
    .copp-programs-archive__hero,
    .copp-program-article__hero,
    .copp-news-article__hero,
    .copp-project-article__hero,
    .copp-equipment-article__hero,
    .copp-contest-article__hero,
    .copp-knowledge-item__hero,
    .copp-resources-archive__hero,
    .copp-resource-article__hero
) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* Never inherit a stale offset, transform or hidden text state. */
html body :is(
    .copp-hero__copy,
    .copp-news-hero__copy,
    .copp-gallery-hero__copy,
    .copp-knowledge-hero__copy,
    .copp-programs-archive__copy,
    .copp-program-article__copy,
    .copp-news-article__hero-copy,
    .copp-project-article__copy,
    .copp-equipment-article__copy,
    .copp-contest-article__copy,
    .copp-knowledge-item__copy,
    .copp-resources-archive__copy,
    .copp-resource-article__copy
) {
    box-sizing: border-box !important;
    margin-block-start: 0 !important;
    min-width: 0 !important;
    position: relative !important;
    top: auto !important;
    transform: none !important;
}

html body :is(
    .copp-hero__copy,
    .copp-news-hero__copy,
    .copp-gallery-hero__copy,
    .copp-knowledge-hero__copy,
    .copp-programs-archive__copy,
    .copp-program-article__copy,
    .copp-news-article__hero-copy,
    .copp-project-article__copy,
    .copp-equipment-article__copy,
    .copp-contest-article__copy,
    .copp-knowledge-item__copy,
    .copp-resources-archive__copy,
    .copp-resource-article__copy
) :is(h1, p, span, strong, em, a) {
    -webkit-text-fill-color: currentColor;
    mix-blend-mode: normal;
    opacity: 1;
    visibility: visible;
}

html body :is(
    .copp-hero__copy h1,
    .copp-news-hero__title,
    .copp-gallery-hero__title,
    .copp-knowledge-hero__title
) {
    color: var(--copp-ink) !important;
    -webkit-text-fill-color: var(--copp-ink) !important;
}

html body :is(
    .copp-hero__copy h1 span,
    .copp-news-hero__title span,
    .copp-gallery-hero__title span,
    .copp-knowledge-hero__title span
) {
    color: var(--copp-red) !important;
    -webkit-text-fill-color: var(--copp-red) !important;
}

@media (min-width: 992px) {
    /* Home hero: one fixed frame, two stable columns. */
    html body .copp-hero {
        height: var(--copp-home-hero-height) !important;
        max-height: var(--copp-home-hero-height) !important;
        min-height: var(--copp-home-hero-height) !important;
        overflow: hidden !important;
    }

    html body :is(.copp-hero__slides, .copp-hero__track, .copp-hero__slide) {
        height: 100% !important;
        max-height: var(--copp-home-hero-height) !important;
        min-height: 0 !important;
    }

    html body .copp-hero__inner {
        align-items: stretch !important;
        box-sizing: border-box !important;
        gap: clamp(24px, 4vw, 58px) !important;
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr) !important;
        height: 100% !important;
        min-height: 0 !important;
        padding: 0 clamp(28px, 7vw, 108px) !important;
    }

    html body .copp-hero__copy {
        align-items: flex-start !important;
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        justify-content: center !important;
        max-width: var(--copp-home-hero-copy-max) !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 28px 0 34px !important;
    }

    html body .copp-hero__copy h1,
    html body .copp-hero__copy > p {
        min-height: 0 !important;
        width: 100% !important;
    }

    html body .copp-hero__copy h1 {
        font-size: clamp(36px, 3.1vw, 56px) !important;
        line-height: 1.08 !important;
        margin: 0 0 clamp(14px, 1.5vw, 24px) !important;
    }

    html body .copp-hero__copy > p {
        font-size: clamp(16px, 1.35vw, 20px) !important;
        line-height: 1.45 !important;
        margin: 0 0 clamp(18px, 2vw, 26px) !important;
    }

    html body .copp-hero__actions {
        display: grid !important;
        flex: 0 0 auto !important;
        gap: clamp(12px, 1.5vw, 22px) !important;
        grid-template-columns: repeat(2, minmax(0, 248px)) !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: min(100%, 518px) !important;
    }

    html body .copp-hero__btn {
        box-sizing: border-box !important;
        min-width: 0 !important;
        white-space: normal !important;
    }

    html body .copp-hero__visual,
    html body .copp-hero__visual > .copp-visual {
        align-self: stretch !important;
        height: 100% !important;
        min-height: 0 !important;
        transform: none !important;
    }

    html body .copp-hero__people {
        bottom: 0 !important;
        height: calc(100% + 16px) !important;
        max-height: none !important;
        right: -20px !important;
        top: auto !important;
        transform: none !important;
        width: min(88%, 560px) !important;
    }

    html body .copp-hero__people img {
        height: auto !important;
        max-height: none !important;
        max-width: none !important;
        object-fit: contain !important;
        object-position: right bottom !important;
        width: 100% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    html body .copp-hero,
    html body :is(.copp-hero__slides, .copp-hero__track, .copp-hero__slide, .copp-hero__inner) {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
    }

    html body .copp-hero__inner {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 32px clamp(28px, 6vw, 60px) 54px !important;
    }

    html body .copp-hero__copy {
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    html body .copp-hero__actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body .copp-hero__visual {
        min-height: 280px !important;
    }
}

@media (max-width: 767.98px) {
    html body :is(
        .copp-hero,
        .copp-hero__slides,
        .copp-hero__track,
        .copp-hero__slide,
        .copp-hero__inner
    ) {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
    }

    html body .copp-hero__inner {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 28px 18px 64px !important;
    }

    html body .copp-hero__copy {
        align-self: stretch !important;
        display: block !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    html body .copp-hero__copy h1 {
        font-size: 34px !important;
        line-height: 1.12 !important;
        margin: 0 0 18px !important;
    }

    html body .copp-hero__copy > p {
        font-size: 16px !important;
        line-height: 1.45 !important;
        margin: 0 0 20px !important;
    }

    html body .copp-hero__actions {
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: minmax(0, 1fr) !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    html body .copp-hero__btn {
        height: auto !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        white-space: normal !important;
        width: 100% !important;
    }

    html body .copp-hero__visual {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .copp-hero__track,
    html body .copp-hero__pill,
    html body .copp-hero__dot,
    html body .copp-visual__block,
    html body .copp-visual__tile {
        transition: none !important;
    }
}
