/*
    Rouse Refresh home page
    Used by Views/landingMaster-new.cshtml + Views/LandingPageNew.cshtml and the
    Views/Partials/RouseRefresh/home-*-new / *-new card partials.

    Everything is prefixed rr- so the old site CSS (.title, .item, .readmore, .section ...) does not apply.
    Fonts come from _base.css: headings Archivo, body Noto Sans.
*/

:root {
    --rr-purple: #6A59FD;
    --rr-navy: #171245;
    --rr-page-bg: #F9F9F9;
    --rr-card-grey: #E8E8E8;
    --rr-white: #FFFFFF;
    --rr-gutter: 72px;
    --rr-radius: 12px;
    --rr-radius-lg: 20px;
}

/* ---------- Page ---------- */

/* main.rr-main: out-ranks the old global `main { padding-top: 50px }`; the hero sits under the fixed header. */
main.rr-main {
    display: block;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--rr-page-bg);
    color: var(--rr-navy);
}

    .rr-main h1,
    .rr-main h2,
    .rr-main h3,
    .rr-main p {
        margin: 0;
    }

    .rr-main a {
        text-decoration: none;
    }

.rr-container {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0;
}

    .rr-container.rr-container--wide {
        max-width: calc(1296px + (var(--rr-gutter) * 2));
        padding: 0 var(--rr-gutter);
    }

.rr-section {
    position: relative;
    padding: 80px 0;
}

.rr-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.rr-main .rr-section__title {
    color: var(--rr-navy);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
}

/* ---------- Buttons ---------- */

.rr-main .rr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

    .rr-main .rr-btn.rr-btn--sm {
        height: 38px;
        padding: 0 16px;
        font-size: 13px;
    }

    .rr-main .rr-btn.rr-btn--light {
        background-color: var(--rr-white);
        color: var(--rr-navy);
    }

        .rr-main .rr-btn.rr-btn--light:hover {
            background-color: var(--rr-navy);
            color: var(--rr-white);
        }

    .rr-main .rr-btn.rr-btn--dark {
        background-color: var(--rr-navy);
        color: var(--rr-white);
    }

        .rr-main .rr-btn.rr-btn--dark:hover {
            background-color: var(--rr-purple);
            color: var(--rr-white);
        }

    .rr-main .rr-btn.rr-btn--outline-light {
        border-color: rgba(255, 255, 255, 0.85);
        background-color: transparent;
        color: var(--rr-white);
    }

        .rr-main .rr-btn.rr-btn--outline-light:hover {
            background-color: var(--rr-white);
            color: var(--rr-navy);
        }

    .rr-main .rr-btn.rr-btn--outline-dark {
        border-color: rgba(23, 18, 69, 0.6);
        background-color: transparent;
        color: var(--rr-navy);
    }

        .rr-main .rr-btn.rr-btn--outline-dark:hover {
            border-color: var(--rr-navy);
            background-color: var(--rr-navy);
            color: var(--rr-white);
        }

/* ---------- Hero ---------- */

.rr-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--rr-purple);
    /* background-image comes from the CMS (refreshHeroBackground), set inline by home-hero-new.cshtml */
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    color: var(--rr-white);
}

.rr-hero__inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 800px;
    padding: 0 var(--rr-gutter);
}

.rr-hero__content {
    position: relative;
    z-index: 1;
    align-self: center;
    max-width: 560px;
    padding: 120px 0 80px;
}

.rr-main .rr-hero__title {
    color: var(--rr-white);
    font-size: 72px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.rr-main .rr-hero__text {
    max-width: 540px;
    margin-top: 28px;
    color: var(--rr-white);
    font-size: 16px;
    line-height: 1.5;
}

.rr-hero .rr-btn {
    margin-top: 32px;
}

.rr-hero__image {
    position: absolute;
    bottom: 0;
    left: 48%;
    display: block;
    width: auto;
    height: 86%;
    max-height: 690px;
    object-fit: contain;
    object-position: bottom;
}

/* ---------- Intro ---------- */

.rr-intro {
    padding-bottom: 0;
}

.rr-intro__inner {
    max-width: 760px;
    text-align: center;
}

.rr-main .rr-intro__title {
    color: var(--rr-navy);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
}

.rr-main .rr-intro__text {
    margin-top: 20px;
    color: var(--rr-navy);
    font-size: 16px;
    line-height: 1.5;
}

/* ---------- Features (alternating rows) ---------- */

.rr-features {
    padding: 160px 0 80px;
}

.rr-features__swoosh {
    position: absolute;
    top: 0;
    left: 0;
    width: 430px;
    height: auto;
    pointer-events: none;
}

.rr-feature {
    position: relative;
    display: grid;
    grid-template-columns: 463px 1fr;
    align-items: center;
    gap: 80px;
}

    .rr-feature + .rr-feature {
        margin-top: 200px;
    }

    .rr-feature.rr-feature--reverse {
        grid-template-columns: 1fr 463px;
    }

        .rr-feature.rr-feature--reverse .rr-feature__media {
            order: 2;
        }

.rr-feature__media {
    position: relative;
    overflow: hidden;
    border-radius: var(--rr-radius-lg);
    aspect-ratio: 463 / 442;
}

.rr-feature__image,
.rr-feature__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rr-feature__content {
    max-width: 460px;
}

.rr-main .rr-feature__title {
    color: var(--rr-navy);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.25;
}

.rr-feature__text {
    max-width: 380px;
    margin-top: 20px;
    color: var(--rr-navy);
    font-size: 16px;
    line-height: 1.5;
}

    .rr-feature__text p {
        margin: 0;
    }

.rr-feature .rr-btn {
    margin-top: 48px;
}

/* ---------- Latest articles and insights ---------- */

.rr-news__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rr-news-card {
    display: flex;
    flex-direction: column;
    min-height: 262px;
    padding: 40px;
    border-radius: var(--rr-radius);
    color: var(--rr-white);
}

    .rr-news-card.rr-news-card--purple {
        background-color: var(--rr-purple);
    }

    .rr-news-card.rr-news-card--navy {
        background-color: var(--rr-navy);
    }

.rr-main .rr-news-card__title {
    max-width: 520px;
    color: var(--rr-white);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
}

    .rr-main .rr-news-card__title a,
    .rr-main .rr-news-card__title a:hover {
        color: inherit;
    }

.rr-main .rr-news-card__text {
    max-width: 360px;
    margin-top: 12px;
    color: var(--rr-white);
    font-size: 14px;
    line-height: 1.45;
}

.rr-news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 32px;
}

.rr-news-card__date {
    color: var(--rr-white);
    font-size: 12px;
}

/* ---------- What's happening at Rouse ---------- */

.rr-happening__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rr-happening-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--rr-radius);
    background-color: var(--rr-card-grey);
}

.rr-happening-card__media {
    display: block;
    height: 200px;
    background-color: #D5D5DB;
}

    .rr-happening-card__media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.rr-happening-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px 28px 24px;
}

.rr-main .rr-happening-card__title {
    color: var(--rr-navy);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
}

    .rr-main .rr-happening-card__title a,
    .rr-main .rr-happening-card__title a:hover {
        color: inherit;
    }

.rr-happening-card__text {
    max-width: 460px;
    margin-top: 12px;
    color: var(--rr-navy);
    font-size: 14px;
    line-height: 1.45;
}

    .rr-happening-card__text p {
        margin: 0;
    }

.rr-happening-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 32px;
}

.rr-happening-card__date {
    color: rgba(23, 18, 69, 0.6);
    font-size: 12px;
}

/* ---------- Join Rouse ---------- */

.rr-careers {
    padding-bottom: 120px;
}

.rr-careers__banner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 464px;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--rr-purple);
    color: var(--rr-white);
}

/* CMS image sits on the right and fades into the purple, like the design. */
.rr-careers__image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

    .rr-careers__image::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, var(--rr-purple) 0%, rgba(106, 89, 253, 0.55) 35%, rgba(106, 89, 253, 0) 75%);
    }

.rr-careers__content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 48px 40px;
}

.rr-main .rr-careers__title {
    color: var(--rr-white);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.2;
}

.rr-careers__text {
    max-width: 560px;
    margin-top: 16px;
    color: var(--rr-white);
    font-size: 18px;
    line-height: 1.45;
}

    .rr-careers__text p {
        margin: 0;
    }

.rr-careers__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

/* ---------- RouseSE info block (not in the refresh design yet) ---------- */

.rr-sweden__intro {
    margin-bottom: 32px;
    text-align: center;
    font-size: 18px;
}

.rr-sweden__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: center;
}

.rr-sweden__item a {
    color: var(--rr-navy);
}

.rr-sweden__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    overflow: hidden;
    border-radius: 50%;
}

    .rr-sweden__circle img {
        width: 80%;
        height: 80%;
        object-fit: cover;
    }

.rr-main .rr-sweden__title {
    color: var(--rr-navy);
    font-size: 24px;
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
    :root {
        --rr-gutter: 40px;
    }

    .rr-container {
        padding: 0 var(--rr-gutter);
    }

    .rr-feature,
    .rr-feature.rr-feature--reverse {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 56px;
    }

    .rr-main .rr-hero__title {
        font-size: 60px;
    }
}

@media (max-width: 1024px) {
    :root {
        --rr-gutter: 20px;
    }

    .rr-section {
        padding: 56px 0;
    }

    .rr-hero__inner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding-top: 55px; /* header is solid on mobile */
    }

    .rr-hero__content {
        max-width: none;
        padding: 56px 0 32px;
    }

    .rr-main .rr-hero__title {
        font-size: 44px;
    }

    .rr-hero__image {
        position: relative;
        left: auto;
        align-self: center;
        width: 80%;
        max-width: 420px;
        height: auto;
    }

    .rr-main .rr-intro__title,
    .rr-main .rr-section__title,
    .rr-main .rr-feature__title {
        font-size: 28px;
    }

    .rr-features {
        padding-top: 80px;
    }

    .rr-features__swoosh {
        width: 220px;
    }

    .rr-feature,
    .rr-feature.rr-feature--reverse {
        grid-template-columns: 1fr;
        gap: 28px;
    }

        .rr-feature + .rr-feature {
            margin-top: 80px;
        }

        .rr-feature.rr-feature--reverse .rr-feature__media {
            order: 0;
        }

    .rr-feature__content,
    .rr-feature__text {
        max-width: none;
    }

    .rr-feature .rr-btn {
        margin-top: 28px;
    }

    .rr-news__grid,
    .rr-happening__grid {
        grid-template-columns: 1fr;
    }

    .rr-news-card {
        min-height: 0;
        padding: 28px;
    }

    .rr-main .rr-news-card__title,
    .rr-main .rr-happening-card__title {
        font-size: 22px;
    }

    .rr-careers__image {
        width: 100%;
        opacity: .35;
    }

    .rr-careers__content {
        padding: 40px 28px;
    }

    .rr-main .rr-careers__title {
        font-size: 28px;
    }

    .rr-careers__text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .rr-section__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .rr-main .rr-hero__title {
        font-size: 36px;
    }
}
