/*
 * SNOW EXP modern house ads v8
 * Square = button/platter drag lift.
 * Wide = chairlift, contained Alpine ridge, content-width banner.
 */

.ru-modern-ad {
    --ru-black: #050505;
    --ru-white: #fff;
    --ru-soft: rgba(255,255,255,.70);
    --ru-line: rgba(255,255,255,.14);
    --ru-ridge: rgba(255,255,255,.34);
    --ru-coral: #ff5a3d;
    position: relative;
    margin: 0;
    color: var(--ru-white);
    isolation: isolate;
}

.ru-modern-ad__link {
    position: relative;
    display: grid;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 18%, rgba(255,255,255,.055), transparent 30%),
        linear-gradient(135deg, #050505 0%, #090909 54%, #030303 100%);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow:
        0 18px 42px rgba(0,0,0,.13),
        inset 0 0 0 1px rgba(255,255,255,.07);
    transform: translateZ(0);
}

.ru-modern-ad--wide {
    padding: 22px 0;
    background: #f4f6f8;
}

/*
 * Match the Bootstrap content width below rather than stretching to the
 * full available section width. 1170px is the theme's desktop container.
 */
.ru-modern-ad--wide .ru-modern-ad__link {
    width: calc(100% - 30px);
    max-width: 1170px;
    min-height: 250px;
    margin: 0 auto;
    grid-template-columns: 155px minmax(0,1fr) 245px;
    grid-template-rows: 32px 1fr;
    align-items: center;
    column-gap: 28px;
    padding: 18px 30px 22px;
    border-radius: 8px;
}

.ru-modern-ad--square .ru-modern-ad__link {
    width: 100%;
    aspect-ratio: 5 / 6;
    grid-template-columns: 1fr;
    grid-template-rows: 26px 142px minmax(150px,1fr) 58px;
    padding: 20px 22px 22px;
    border-radius: 5px;
}

.ru-modern-ad__canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

/* No negative inset: mountain graphics now terminate cleanly inside the ad. */
.ru-modern-ad__topo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ru-modern-ad__contours {
    fill: none;
    stroke: var(--ru-line);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    animation: ruContourDrift 13s linear infinite;
    transform-origin: center;
}

.ru-modern-ad__ridge,
.ru-modern-ad__snowcaps {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.ru-modern-ad__ridge {
    stroke: var(--ru-ridge);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ru-modern-ad__snowcaps {
    stroke: rgba(255,255,255,.72);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ru-modern-ad__label,
.ru-modern-ad__brand,
.ru-modern-ad__copy-stack,
.ru-modern-ad__cta {
    position: relative;
    z-index: 2;
}

.ru-modern-ad__label {
    grid-column: 1 / -1;
    color: rgba(255,255,255,.62);
    font-size: 11px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ru-modern-ad__brand {
    align-self: center;
}

.ru-modern-ad__brand img {
    display: block;
    width: 118px;
    height: 118px;
    object-fit: contain;
}

.ru-modern-ad--square .ru-modern-ad__brand {
    align-self: start;
}

.ru-modern-ad--square .ru-modern-ad__brand img {
    width: 132px;
    height: 132px;
}

.ru-modern-ad__copy-stack {
    position: relative;
    align-self: center;
    min-height: 94px;
}

.ru-modern-ad--square .ru-modern-ad__copy-stack {
    min-height: 150px;
    margin-top: 3px;
}

.ru-modern-ad__copy {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translate3d(0,6px,0);
    animation: ruCopyCycle 18s cubic-bezier(.22,.7,.28,1) infinite;
    will-change: opacity, transform;
    text-shadow: 0 2px 14px rgba(0,0,0,.72);
}

.ru-modern-ad__copy--1 { animation-delay: 0s; }
.ru-modern-ad__copy--2 { animation-delay: 6s; }
.ru-modern-ad__copy--3 { animation-delay: 12s; }

.ru-modern-ad__copy strong {
    display: block;
    margin: 0 0 8px;
    color: #fff !important;
    font-size: clamp(22px,2.2vw,30px);
    font-weight: 750;
    line-height: 1.07;
    letter-spacing: -.026em;
}

.ru-modern-ad__copy span {
    display: block;
    max-width: 650px;
    color: rgba(255,255,255,.91) !important;
    font-size: 16px;
    line-height: 1.42;
}

.ru-modern-ad--square .ru-modern-ad__copy strong {
    font-size: clamp(25px, 8.0cqi, 33px);
    line-height: 1.04;
}

.ru-modern-ad--square .ru-modern-ad__copy span {
    max-width: 100%;
    font-size: clamp(15px, 4.8cqi, 18px);
    line-height: 1.38;
}

.ru-modern-ad__cta {
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 19px;
    border-radius: 5px;
    background: var(--ru-coral);
    color: #fff !important;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(255,90,61,.18);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.ru-modern-ad--square .ru-modern-ad__cta {
    justify-self: start;
    align-self: end;
    min-height: 48px;
    padding: 0 15px;
    font-size: 12px;
}

.ru-modern-ad__cta span {
    font-size: 18px;
    transition: transform .25s ease;
}

.ru-modern-ad__link:hover .ru-modern-ad__cta,
.ru-modern-ad__link:focus-visible .ru-modern-ad__cta {
    transform: translate3d(0,-2px,0);
    background: #ff674d;
    box-shadow: 0 16px 34px rgba(255,90,61,.24);
}

.ru-modern-ad__link:hover .ru-modern-ad__cta span,
.ru-modern-ad__link:focus-visible .ru-modern-ad__cta span {
    transform: translateX(3px);
}

/* SNOW */
.ru-modern-ad__snow {
    position: absolute;
    inset: 0;
}

.ru-modern-ad__snow i {
    position: absolute;
    top: -18px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: rgba(255,255,255,var(--o));
    box-shadow: 0 0 3px rgba(255,255,255,.25);
    animation: ruSnowFall calc(7.5s + var(--d)) linear calc(var(--d) * -1) infinite;
}

/* LIFT COMMON */
.ru-modern-ad__lift {
    position: absolute;
    pointer-events: none;
    overflow: visible;
}

.ru-lift-cable,
.ru-chair-cable {
    fill: none;
    stroke: var(--ru-coral);
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
    opacity: .78;
    filter: drop-shadow(0 0 3px rgba(255,90,61,.18));
}

/* SQUARE: moving coral platter/button lift */
.ru-modern-ad__lift--drag {
    /*
     * The lift system itself starts well outside the ad.
     * This gives the cable a visible run-in from the left edge and lets each
     * platter enter smoothly already attached, rather than appearing suddenly.
     */
    width: 145%;
    height: auto;
    aspect-ratio: 425 / 196;
    left: -33%;
    right: auto;
    top: 4%;
}

.ru-drag-unit {
    stroke: var(--ru-coral);
    fill: var(--ru-coral);
    stroke-width: 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.ru-drag-button {
    fill: var(--ru-coral);
    stroke: var(--ru-coral);
    stroke-width: 2;
}

.ru-drag-unit--2 {
    opacity: 1;
}

/* LANDSCAPE: moving coral chair */
.ru-modern-ad__lift--chair {
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 220;
}

.ru-chair-unit {
    stroke: var(--ru-coral);
    fill: rgba(255,90,61,.16);
    stroke-width: 3;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.ru-chair-unit--2 {
    opacity: 1;
}

5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { transform: translate3d(-245px,105px,0); opacity: 0; }
}

4%   { opacity: 1; }
    96%  { opacity: 1; }
    100% { transform: translate3d(1380px,13px,0); opacity: 0; }
}

@keyframes ruContourDrift {
    0%   { transform: translate3d(0,0,0) scale(1.01); }
    25%  { transform: translate3d(-1.2%,.35%,0) scale(1.013); }
    50%  { transform: translate3d(-2.4%,0,0) scale(1.01); }
    75%  { transform: translate3d(-1.2%,-.35%,0) scale(1.013); }
    100% { transform: translate3d(0,0,0) scale(1.01); }
}

@keyframes ruSnowFall {
    from { transform: translate3d(0,-8%,0); opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    to { transform: translate3d(var(--drift),115vh,0); opacity: 0; }
}

@keyframes ruCopyCycle {
    0% {
        opacity: 0;
        transform: translate3d(0,6px,0);
    }
    3% {
        opacity: 1;
        transform: translate3d(0,0,0);
    }
    29.5% {
        opacity: 1;
        transform: translate3d(0,0,0);
    }
    33.333% {
        opacity: 0;
        transform: translate3d(0,-4px,0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0,-4px,0);
    }
}

@media (max-width: 1199px) {
    .ru-modern-ad--wide .ru-modern-ad__link {
        width: calc(100% - 30px);
        max-width: 970px;
    }
}

@media (max-width: 991px) {
    .ru-modern-ad--wide .ru-modern-ad__link {
        max-width: 750px;
    }
}

@media (max-width: 760px) {
    .ru-modern-ad--wide .ru-modern-ad__link {
        width: calc(100% - 24px);
        max-width: none;
        min-height: 270px;
        grid-template-columns: 104px minmax(0,1fr);
        grid-template-rows: 28px 1fr 56px;
        gap: 8px 16px;
        padding: 16px 18px 18px;
    }


    /* Keep chairlift geometry proportional on the taller/narrower mobile banner. */
    .ru-modern-ad__lift--chair {
        width: 165%;
        left: -32.5%;
        top: 2px;
        height: auto;
        aspect-ratio: 1200 / 220;
    }

    .ru-chair-unit {
        stroke-width: 3.2;
    }

    .ru-chair-cable {
        stroke-width: 2.6;
    }

    .ru-modern-ad--wide .ru-modern-ad__brand img {
        width: 92px;
        height: 92px;
    }

    .ru-modern-ad--wide .ru-modern-ad__copy-stack {
        min-height: 125px;
    }

    .ru-modern-ad--wide .ru-modern-ad__copy strong {
        font-size: clamp(21px,5vw,27px);
    }

    .ru-modern-ad--wide .ru-modern-ad__copy span {
        font-size: 14px;
    }

    .ru-modern-ad--wide .ru-modern-ad__cta {
        grid-column: 1 / -1;
        justify-self: start;
        min-height: 50px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ru-modern-ad__contours,
    .ru-modern-ad__snow i,
    .ru-modern-ad__copy {
        animation: none !important;
    }

    .ru-drag-unit,
    .ru-chair-unit {
        display: none;
    }

    .ru-modern-ad__copy {
        opacity: 0;
        transform: none;
    }

    .ru-modern-ad__copy--1 {
        opacity: 1;
    }
}
