: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;
}

main.rr-main {
    display: block;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--rr-page-bg);
    color: var(--rr-navy);
}

.rr-main,
.rr-main *,
.rr-main *::before,
.rr-main *::after {
    box-sizing: border-box;
}

.rr-main {
    --rr-gutter: clamp(16px, calc(5 * var(--rr-design-unit, 1vw)), 72px);
}

    .rr-main .rr-main__wrap {
        min-width: 0;
    }

    .rr-main h1,
    .rr-main h2,
    .rr-main h3,
    .rr-main p {
        margin: 0;
    }

    .rr-main a {
        text-decoration: none;
    }

    .rr-main :is(h1, h2, h3, h4, h5, h6, p),
    .rr-feature__text,
    .rr-careers__text,
    .rr-sweden__item {
        overflow-wrap: anywhere;
    }

    .rr-main .rr-btn {
        max-width: 100%;
    }

/* Hero layout is handled by hero.css.
   Button appearance is handled by buttons.css.
   Card appearance is handled by cards.css. */

/* Containers and sections */

.rr-container {
    position: relative;
    width: 100%;
    max-width: calc(1120px + (var(--rr-gutter) * 2));
    margin: 0 auto;
    padding: 0 var(--rr-gutter);
}

    .rr-container.rr-container--wide {
        max-width: calc(1296px + (var(--rr-gutter) * 2));
    }

.rr-section {
    position: relative;
    padding: clamp(48px, calc(5.56 * var(--rr-design-unit, 1vw)), 80px) 0;
}

.rr-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: clamp(24px, calc(2.78 * var(--rr-design-unit, 1vw)), 40px);
}

.rr-main .rr-section__title {
    min-width: 0;
    color: var(--rr-navy);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
}

/* Introduction */

.rr-intro {
    padding-bottom: 0;
}

.rr-intro__inner {
    max-width: calc(760px + (var(--rr-gutter) * 2));
    text-align: center;
}

.rr-main .rr-intro__title {
    color: var(--rr-navy);
    font-size: clamp(24px, calc(18.4px + calc(1.5 * var(--rr-design-unit, 1vw))), 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;
}

/* Feature sections */

.rr-features {
    padding: clamp(64px, calc(11.12 * var(--rr-design-unit, 1vw)), 160px) 0 clamp(48px, calc(5.56 * var(--rr-design-unit, 1vw)), 80px);
}

.rr-features__swoosh {
    position: absolute;
    top: clamp(32px, calc(5.56 * var(--rr-design-unit, 1vw)), 80px);
    left: 0;
    width: clamp(140px, calc(29.87 * var(--rr-design-unit, 1vw)), 430px);
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

.rr-feature {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 463fr) minmax(0, 577fr);
    align-items: center;
    gap: clamp(24px, calc(5.56 * var(--rr-design-unit, 1vw)), 80px);
    margin: 0;
}

    .rr-feature + .rr-feature {
        margin-top: clamp(64px, calc(13.89 * var(--rr-design-unit, 1vw)), 200px);
    }

    .rr-feature.rr-feature--reverse {
        grid-template-columns: minmax(0, 577fr) minmax(0, 463fr);
    }

        .rr-feature.rr-feature--reverse .rr-feature__media {
            order: 2;
        }

.rr-feature__media {
    position: relative;
    width: 100%;
    min-width: 0;
    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 {
    width: 100%;
    max-width: 582px;
    min-width: 0;
}

.rr-main .rr-feature__title {
    color: var(--rr-navy);
    font-size: clamp(24px, calc(18.4px + calc(1.5 * var(--rr-design-unit, 1vw))), 40px);
    font-weight: 600;
    line-height: 1.25;
}

.rr-feature__text {
    max-width: 380px;
    color: var(--rr-navy);
    font-size: 16px;
    line-height: 1.5;
}

.rr-main .rr-feature .rr-feature__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(12px, calc(1.39 * var(--rr-design-unit, 1vw)), 20px);
    height: auto;
    min-height: 0;
    padding: 0;
}

    .rr-main .rr-feature .rr-feature__content > :not(.rr-btn) {
        margin: 0;
        padding: 0;
        min-height: 0;
        max-width: 100%;
    }

    .rr-main .rr-feature .rr-feature__content > :not(a):not(button):not(.rr-btn) {
        height: auto;
    }

    .rr-main .rr-feature .rr-feature__content :is(h1, h2, h3, h4, h5, h6) {
        margin: 0;
        padding: 0;
        min-height: 0;
        height: auto;
    }

    .rr-main .rr-feature .rr-feature__content .rr-feature__text,
    .rr-main .rr-feature .rr-feature__content .rr-feature__text *,
    .rr-main .rr-feature .rr-feature__content > p {
        margin: 0;
        padding: 0;
        min-height: 0;
        height: auto;
        font-weight: 400;
        line-height: 1.5;
    }

    .rr-main .rr-feature .rr-feature__content br,
    .rr-main .rr-feature .rr-feature__content p:empty,
    .rr-main .rr-feature .rr-feature__content p:has(> br:only-child) {
        display: none;
    }

    .rr-main .rr-feature .rr-feature__content .rr-btn,
    .rr-main .rr-feature .rr-feature__content .readmore {
        margin: clamp(4px, calc(.84 * var(--rr-design-unit, 1vw)), 12px) 0 0;
        text-transform: none;
        letter-spacing: normal;
    }

/* Insights and announcements */

.rr-news__grid,
.rr-happening__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, calc(1.67 * var(--rr-design-unit, 1vw)), 24px);
}

/* Careers */

.rr-careers {
    padding-bottom: clamp(64px, calc(8.34 * var(--rr-design-unit, 1vw)), 120px);
}

.rr-careers__banner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(400px, calc(32.23 * var(--rr-design-unit, 1vw)), 464px);
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--rr-purple);
    color: var(--rr-white);
}

.rr-careers__image {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    height: auto;
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
}

    .rr-careers__image::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( 90deg, var(--rr-purple) 0%, rgba(106, 89, 253, .55) 35%, rgba(106, 89, 253, 0) 75% );
    }

.rr-careers__content {
    position: relative;
    z-index: 1;
    width: 48%;
    max-width: 640px;
    min-width: 0;
    padding: clamp(28px, calc(3.34 * var(--rr-design-unit, 1vw)), 48px) clamp(20px, calc(2.78 * var(--rr-design-unit, 1vw)), 40px);
}

.rr-careers__banner:not(:has(.rr-careers__image)) {
    min-height: 0;
}

    .rr-careers__banner:not(:has(.rr-careers__image)) .rr-careers__content {
        width: 100%;
        max-width: 760px;
    }

.rr-main .rr-careers__title {
    color: var(--rr-white);
    font-size: clamp(24px, calc(2.5 * var(--rr-design-unit, 1vw)), 36px);
    font-weight: 500;
    line-height: 1.2;
}

.rr-careers__text {
    max-width: 560px;
    margin-top: 16px;
    color: var(--rr-white);
    font-size: clamp(16px, calc(1.25 * var(--rr-design-unit, 1vw)), 18px);
    line-height: 1.45;
}

    .rr-careers__text p {
        margin: 0;
    }

.rr-careers__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

/* Sweden links */

.rr-sweden__intro {
    margin-bottom: 32px;
    text-align: center;
    font-size: clamp(16px, calc(1.25 * var(--rr-design-unit, 1vw)), 18px);
}

.rr-sweden__grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(min(200px, 100%), 1fr) );
    gap: clamp(16px, calc(1.67 * var(--rr-design-unit, 1vw)), 24px);
    text-align: center;
}

.rr-sweden__item {
    min-width: 0;
}

    .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;
}

/* Shared gutter fallback outside .rr-main */

@media (max-width: 1439.98px) {
    :root {
        --rr-gutter: 40px;
    }
}

/* Tablet and smaller */

@media (max-width: 999.98px) {
    :root {
        --rr-gutter: 24px;
    }

    .rr-careers__banner {
        flex-direction: row;
        align-items: center;
        min-height: 0;
    }

    .rr-careers__content {
        width: 100%;
        max-width: none;
        padding: 32px 28px;
    }

    .rr-careers__image {
        display: none;
    }
}

/* Tablet announcements */

@media (min-width: 750px) and (max-width: 999.98px) {
    .rr-happening__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

/* Mobile */

@media (max-width: 749.98px) {
    :root {
        --rr-gutter: 20px;
    }

    /* Features */

    .rr-features {
        padding-top: 80px;
    }

    .rr-feature,
    .rr-feature.rr-feature--reverse {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-bottom: 0;
    }

        .rr-feature + .rr-feature {
            margin-top: 88px;
        }

        .rr-feature.rr-feature--reverse .rr-feature__media {
            order: 0;
        }

    .rr-feature__media {
        max-width: 463px;
        max-height: none;
        aspect-ratio: 463 / 442;
        justify-self: center;
    }

    .rr-feature__content,
    .rr-feature__text {
        max-width: none;
    }

    .rr-main .rr-feature .rr-feature__content {
        gap: 20px;
    }

        .rr-main .rr-feature .rr-feature__content .rr-btn,
        .rr-main .rr-feature .rr-feature__content .readmore {
            margin-top: 24px;
        }

    /* Insights and announcements */

    .rr-news__grid,
    .rr-happening__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rr-news__grid {
        justify-items: center;
        gap: 24px;
    }

    .rr-happening__grid {
        gap: 16px;
    }

    .rr-news + .rr-happening {
        padding-top: 0;
    }

    .rr-news .rr-section__head,
    .rr-happening .rr-section__head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0 16px;
    }

    .rr-main .rr-news .rr-section__title,
    .rr-main .rr-happening .rr-section__title {
        width: 100%;
        min-width: 0;
        line-height: 1.15;
    }

    .rr-main .rr-news .rr-section__title {
        max-width: 220px;
    }

    .rr-main .rr-happening .rr-section__title {
        max-width: clamp(185px, calc(55 * var(--rr-design-unit, 1vw)), 220px);
    }

    .rr-news .rr-section__head .rr-btn,
    .rr-happening .rr-section__head .rr-btn {
        justify-self: end;
        align-self: center;
        max-width: 110px;
        margin: 0;
    }

    /* Preserve the existing mobile announcement order. */

    .rr-happening__grid > :nth-child(1) {
        order: 1;
    }

    .rr-happening__grid > :nth-child(2) {
        order: 2;
    }

    .rr-happening__grid > :nth-child(3) {
        order: 4;
    }

    .rr-happening__grid > :nth-child(4) {
        order: 3;
    }

    .rr-happening__grid > :nth-child(n+5) {
        order: 5;
    }

    /* Careers */

    .rr-careers__banner {
        border-radius: 20px;
    }

    .rr-careers__content {
        width: 100%;
        padding: 40px;
    }

    .rr-main .rr-careers__title {
        font-size: 24px;
        line-height: 1.2;
    }

    .rr-main .rr-careers__text {
        max-width: none;
        margin-top: 16px;
        font-size: 20px;
        line-height: 1.2;
    }

        .rr-main .rr-careers__text p {
            font-size: inherit;
            line-height: inherit;
        }

    .rr-careers__actions {
        align-items: flex-start;
        gap: 16px;
        margin-top: 64px;
    }

    .rr-main .rr-careers__actions .rr-btn {
        flex: 0 1 auto;
        min-width: 0;
    }
}
