/* Campaign header (template_parts/sitewide/campaign-header.php) */

/* Campaign pages (body class from page-klaviyo-follow-up-page.php): keep the
   footer at the bottom of the window when the content is short, e.g. the
   Klaviyo thank-you step. The admin bar variable only exists when logged in. */
body.campaign-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

body.campaign-page > #page {
    flex: 1 0 auto;
    width: 100%;
}

body.campaign-page > .campaign-header,
body.campaign-page > footer {
    flex-shrink: 0;
    width: 100%;
}

.campaign-header {
    --campaign-header-sand: #f2efea;
    --campaign-header-logo: 207px;
    --campaign-header-stripe: 28px;
    background: #000;
    border-top: 33px solid var(--campaign-header-sand);
    color: #fff;
}

.campaign-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 113px;
}

/* Brand colour blocks straddling the sand/black edge */
.campaign-header__stripes {
    position: absolute;
    top: -11px;
    left: 17%;
    width: calc(var(--campaign-header-stripe) * 4);
    height: var(--campaign-header-stripe);
    background: linear-gradient(to right,
        #612970 0 25%,
        #ffcc00 25% 50%,
        #5f6833 50% 75%,
        #ff3d00 75% 100%);
}

/* Stretched to the full band height so the stripes can sit on its top edge */
.campaign-header__logo {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
    flex-shrink: 0;
    width: var(--campaign-header-logo);
}

.campaign-header__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.campaign-header__tagline {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
}

.campaign-header__tagline-highlight {
    display: inline-block;
    padding: 0 .2em 0 .25em;
    background: #fff;
    color: #000;
    line-height: 1.2;
    clip-path: polygon(3% 0, 100% 4%, 98% 100%, 0 96%);
}

@media screen and (max-width: 767px) {
    .campaign-header {
        --campaign-header-logo: 247px;
        --campaign-header-stripe: 25px;
        border-top-width: 20px;
    }

    .campaign-header__inner {
        flex-direction: column;
        justify-content: flex-start;
        gap: 28px;
        min-height: 0;
        padding-top: 42px;
        padding-bottom: 22px;
        text-align: center;
    }

    .campaign-header__logo {
        align-self: center;
    }

    .campaign-header__stripes {
        top: -42px;
        left: 25%;
    }

    .campaign-header__tagline {
        font-size: 16px;
    }
}
