/* =========================================================
   RR Advertorial (templates/rr-advertorial.php)
   Hero follows the Swiss advertorial; body built from Figma
   "RR Lucas Jones Desktop" (node 12425:18695).
   ========================================================= */

.rr-advertorial-container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    color: #000;
}

.rr-advertorial-container .rr-wrap {
    width: min(1240px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

/* ---------- HERO (same as Swiss, grey #F2F2F2) ---------- */
.rr-advertorial-container .rr-hero-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #F2F2F2;
}

.rr-advertorial-container .rr-hero {
    max-width: 1320px;
    margin: 0 auto;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    color: #000;
}

.rr-advertorial-container .rr-hero__badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    min-width: 86px;
    height: 24px;
    background: #000;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
}

.rr-advertorial-container .rr-hero__heading {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0 25px;
}

.rr-advertorial-container .rr-hero__heading::after {
    content: "";
    position: absolute;
    bottom: -30px;
    width: 80px;
    height: 1px;
    background: #000;
}

.rr-advertorial-container .rr-hero__breadcrumbs {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: -0.01em;
}

.rr-advertorial-container .rr-hero__breadcrumbs a {
    color: #000;
    text-decoration: none;
}

.rr-advertorial-container .rr-hero__title {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 64px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    color: #000;
}

.rr-advertorial-container .rr-hero__partner {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 5px 0 0;
}

.rr-advertorial-container .rr-hero__subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    margin: 0;
    padding: 20px 40px 0;
}

.rr-advertorial-container .rr-hero__share {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.rr-advertorial-container .rr-hero__share a {
    display: inline-flex;
}

.rr-advertorial-container .rr-hero__disclaimer {
    margin: -10px 0 0;
}

.rr-advertorial-container .rr-hero__disclaimer a {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 16px;
    text-decoration: underline;
    text-transform: capitalize;
    color: #000;
}

/* ---------- VIDEO ----------
   Figma component "Frame 4233" has two states:
   Default  - white band, video 1240 x 700, 80px above it.
   Variant2 - black band, video 1779 x 1005 (92.66% of 1920), 70px above and below.
   The inline script sets --rr-p from 0 to 1 as the reader scrolls and everything
   below is worked out from it, so the video grows and the band darkens with the scroll. */
.rr-advertorial-container {
    overflow-anchor: none;
}

.rr-advertorial-container .rr-video-section {
    --rr-p: 0;
    --rr-video-start: min(1240px, calc(100vw - 40px));
    --rr-video-end: max(var(--rr-video-start), 92.66vw);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-top: calc(80px - 10px * var(--rr-p));
    padding-bottom: calc(70px * var(--rr-p));
    background-color: rgb(calc(255 * (1 - var(--rr-p))), calc(255 * (1 - var(--rr-p))), calc(255 * (1 - var(--rr-p))));
}

.rr-advertorial-container .rr-video {
    width: calc(var(--rr-video-start) + (var(--rr-video-end) - var(--rr-video-start)) * var(--rr-p));
    margin: 0 auto;
}

.rr-advertorial-container .rr-video iframe,
.rr-advertorial-container .rr-video video,
.rr-advertorial-container .rr-video img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    object-fit: cover;
}

/* ---------- BODY TEXT ---------- */
.rr-advertorial-container .rr-text p,
.rr-advertorial-container .rr-text li {
    font-family: 'Tinos', serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.45;
    letter-spacing: 0;
    margin: 0;
    color: #000;
}

.rr-advertorial-container .rr-text a {
    color: #000;
    font-style: italic;
    text-decoration: underline;
    text-underline-position: from-font;
}

.rr-advertorial-container .rr-text--intro {
    margin-top: 80px;
}

.rr-advertorial-container .rr-text--intro p + p {
    margin-top: 29px;
}

/* Interview: question on its own line, answer paragraphs run on with an indent */
.rr-advertorial-container .rr-text--interview p + p {
    text-indent: 30px;
}

.rr-advertorial-container .rr-text--interview h3,
.rr-advertorial-container .rr-text--interview h4,
.rr-advertorial-container .rr-text--interview p:has(> strong:only-child),
.rr-advertorial-container .rr-text--interview p:has(> b:only-child) {
    font-family: 'Tinos', serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.45;
    letter-spacing: 0;
    margin: 58px 0 0;
    text-indent: 0;
}

.rr-advertorial-container .rr-text--interview > :first-child {
    margin-top: 0;
}

.rr-advertorial-container .rr-text--interview h3 + p,
.rr-advertorial-container .rr-text--interview h4 + p,
.rr-advertorial-container .rr-text--interview p:has(> strong:only-child) + p,
.rr-advertorial-container .rr-text--interview p:has(> b:only-child) + p {
    margin-top: 29px;
    text-indent: 0;
}

/* empty spacer paragraphs pasted from Word/Docs: let the CSS spacing do the work */
.rr-advertorial-container .rr-text--interview p:empty {
    display: none;
}

.rr-advertorial-container .rr-interview {
    padding-top: 20px;
}

.rr-advertorial-container .rr-interview--continued {
    padding-top: 0;
}

.rr-advertorial-container .rr-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 40px;
    color: #000;
}

/* ---------- PHOTO ROWS ---------- */
.rr-advertorial-container .rr-gallery-block {
    margin-top: 100px;
}

.rr-advertorial-container .rr-gallery {
    display: flex;
    gap: 20px;
    aspect-ratio: 1240 / 570;
}

.rr-advertorial-container .rr-gallery__item {
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: 100%;
}

.rr-advertorial-container .rr-gallery__item--portrait {
    flex: 380 1 0;
}

.rr-advertorial-container .rr-gallery__item--landscape {
    flex: 855 1 0;
}

.rr-advertorial-container .rr-gallery__item img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    opacity: 0;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.rr-advertorial-container .rr-from-top img {
    transform: translateY(-100%);
}

.rr-advertorial-container .rr-from-bottom img {
    transform: translateY(100%);
}

.rr-advertorial-container .rr-gallery__item:nth-child(2) img {
    transition-delay: .2s;
}

.rr-advertorial-container .rr-gallery__item:nth-child(3) img {
    transition-delay: .4s;
}

.rr-advertorial-container .rr-gallery.is-active img {
    opacity: 1;
    transform: translateY(0);
}

.rr-advertorial-container .rr-caption {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    text-align: right;
    margin: 0;
    padding: 30px 0 70px;
    color: #000;
}

.rr-advertorial-container .rr-gallery-block:not(:has(.rr-caption)) {
    padding-bottom: 70px;
}

/* ---------- PULL QUOTE ---------- */
.rr-advertorial-container .rr-quote {
    width: min(1070px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 100px;
    border: 0;
}

.rr-advertorial-container .rr-quote p {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 48px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    margin: 0;
    color: #000;
}

/* ---------- CLOSING ---------- */
.rr-advertorial-container .rr-closing {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 100px 0;
}

.rr-advertorial-container .rr-divider {
    width: 100%;
    margin: 0;
    border: 0;
    border-top: 1px solid #000;
    opacity: 1;
}

.rr-advertorial-container .rr-closing__link + .rr-closing__bio {
    margin-top: 29px;
}

.rr-advertorial-container .rr-closing__bio p + p {
    margin-top: 29px;
}

/* ---------- SCROLL REVEAL ---------- */
.rr-advertorial-container .rr-reveal {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.rr-advertorial-container .rr-reveal.is-active {
    opacity: 1;
}

/* ---------- TABLET ---------- */
@media (max-width: 1024px) {
    .rr-advertorial-container .rr-hero {
        padding: 40px 16px 20px;
    }

    .rr-advertorial-container .rr-hero__heading {
        padding: 0;
    }

    .rr-advertorial-container .rr-hero__badge {
        min-width: 76px;
        font-size: 12px;
    }

    .rr-advertorial-container .rr-hero__breadcrumbs {
        font-size: 12px;
        line-height: 16px;
    }

    .rr-advertorial-container .rr-hero__title {
        font-size: 32px;
        line-height: 38px;
    }

    .rr-advertorial-container .rr-hero__partner {
        font-size: 12px;
        line-height: 12px;
    }

    .rr-advertorial-container .rr-hero__subtitle {
        font-size: 18px;
        line-height: 140%;
        padding: 20px 0 0;
    }

    .rr-advertorial-container .rr-hero__disclaimer a {
        font-size: 12px;
        line-height: 12px;
    }

    .rr-advertorial-container .rr-quote p {
        font-size: 36px;
        line-height: 1.5;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 767px) {
    .rr-advertorial-container .rr-wrap,
    .rr-advertorial-container .rr-quote {
        width: calc(100% - 32px);
    }

    .rr-advertorial-container .rr-video-section {
        --rr-video-start: calc(100vw - 32px);
        --rr-video-end: 100vw;
        padding-top: 0;
        padding-bottom: 0;
    }

    .rr-advertorial-container .rr-text p,
    .rr-advertorial-container .rr-text li {
        font-size: 18px;
    }

    .rr-advertorial-container .rr-text--intro {
        margin-top: 40px;
    }

    .rr-advertorial-container .rr-text--interview h3,
    .rr-advertorial-container .rr-text--interview h4,
    .rr-advertorial-container .rr-text--interview p:has(> strong:only-child),
    .rr-advertorial-container .rr-text--interview p:has(> b:only-child) {
        font-size: 19px;
        margin-top: 44px;
    }

    .rr-advertorial-container .rr-text--interview p + p {
        text-indent: 20px;
    }

    .rr-advertorial-container .rr-heading {
        font-size: 28px;
        margin-bottom: 30px;
    }

    /* photo rows stack: portraits alternate left and right */
    .rr-advertorial-container .rr-gallery-block {
        margin-top: 50px;
    }

    .rr-advertorial-container .rr-gallery {
        flex-direction: column;
        aspect-ratio: auto;
        gap: 16px;
    }

    .rr-advertorial-container .rr-gallery__item {
        flex: none;
        height: auto;
    }

    .rr-advertorial-container .rr-gallery__item--landscape {
        width: 100%;
        aspect-ratio: 3 / 2;
    }

    .rr-advertorial-container .rr-gallery__item--portrait {
        width: 70%;
        aspect-ratio: 2 / 3;
    }

    .rr-advertorial-container .rr-gallery__item:nth-child(odd) {
        align-self: flex-start;
    }

    .rr-advertorial-container .rr-gallery__item:nth-child(even) {
        align-self: flex-end;
    }

    .rr-advertorial-container .rr-caption {
        font-size: 12px;
        text-align: left;
        padding: 20px 0 50px;
    }

    .rr-advertorial-container .rr-gallery-block:not(:has(.rr-caption)) {
        padding-bottom: 50px;
    }

    .rr-advertorial-container .rr-quote {
        padding: 10px 0 50px;
    }

    .rr-advertorial-container .rr-quote p {
        font-size: 28px;
        line-height: 1.45;
    }

    .rr-advertorial-container .rr-closing {
        gap: 30px;
        padding: 50px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rr-advertorial-container .rr-gallery__item img,
    .rr-advertorial-container .rr-reveal {
        transition: none;
        transform: none;
        opacity: 1;
    }
}
