/*
 * Services page (rm/services-hero, rm/practices, rm/timeline) and the split hero
 * shared with About (rm/about-intro); entrance animations come from reveal.css.
 * Values from staging post-1200.css / post-538.css and getComputedStyle at 1440 and 390;
 * the stepper from rm-elementor-theme assets/css/timeline.css.
 */

/* Split hero: Services 3d41f6b, About cf2ad5b */
/* overflow-x: clip keeps wide media from widening the page */
.rm-split-hero {
    display: flex;
    gap: 20px;
    overflow-x: clip;
    width: 100%;
    max-width: var(--rm-container);
    margin: 0 auto;
    padding: 50px 0;
}

.rm-split-hero__copy,
.rm-split-hero__media {
    flex: 1 1 0;
    min-width: 0;
}

.rm-split-hero__copy {
    display: flex;
    flex-direction: column;
    padding: 0 var(--rm-gutter);
}

.rm-split-hero__inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.rm-split-hero__title {
    width: 99.87%;
    margin: 0;
    color: var(--rm-black);
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 400;
    line-height: 1.05;
}

.rm-services-hero .rm-accent {
    color: var(--rm-red);
}

.rm-about-intro .rm-split-hero__title {
    font-family: var(--rm-font);
    font-size: 60px;
    font-weight: 500;
}

.rm-split-hero__text {
    color: var(--rm-grey);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-split-hero__text p {
    margin: 1em 0;
}

.rm-split-hero__media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
}

.rm-split-hero__figure {
    max-width: 100%;
}

/* WordPress "large" with content_width 800: staging's images are at most 800px wide */
.rm-split-hero__figure img,
.rm-split-hero__figure .rm-media__video {
    display: block;
    max-width: min(100%, 800px);
    height: auto;
    border-radius: 30px;
}

@media (max-width: 1024px) {
    .rm-split-hero {
        flex-direction: column-reverse;
    }

    .rm-split-hero__copy,
    .rm-split-hero__media {
        flex: none;
    }

    .rm-split-hero__title {
        width: 782px;
        max-width: 100%;
    }

    .rm-about-intro .rm-split-hero__title {
        font-size: 48px;
    }

    .rm-about-intro .rm-split-hero__text {
        font-size: 17.8px;
        line-height: 1.3;
    }
}

@media (max-width: 767px) {
    .rm-about-intro .rm-split-hero__title {
        font-size: 34.2px;
    }

    .rm-about-intro .rm-split-hero__text {
        font-size: 18.8px;
        line-height: 1.2;
    }
}

/* Practices: 57d6648 / panel bd3e981 / cards 3db2dae … */
.rm-practices {
    overflow-x: clip;
    width: 100%;
    max-width: var(--rm-container);
    margin: 0 auto;
    padding: 10px var(--rm-gutter);
}

.rm-practices__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.rm-practices__title {
    align-self: flex-start;
    width: 71.64%;
    margin: 0;
    padding: 0 300px 0 72px;
    color: var(--rm-black);
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 400;
    line-height: 1.05;
}

.rm-practice {
    width: 1370px;
    max-width: 100%;
    margin: 10px 0;
    padding: 50px;
    border-radius: 40px;
    background: var(--rm-white);
}

.rm-practice__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.rm-practice--reverse .rm-practice__row {
    flex-direction: row-reverse;
}

.rm-practice__copy {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    width: 43.07%;
    padding: 10px;
}

.rm-practice__head {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.rm-practice__title {
    margin: 0;
    color: var(--rm-black);
    font-family: var(--rm-font);
    font-size: 45px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -2.8px;
}

.rm-practice__text {
    margin: 0;
    color: var(--rm-black);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-practice__media {
    flex: none;
    width: 44%;
    text-align: center;
}

.rm-practice__media img,
.rm-practice__media .rm-media__video {
    display: inline-block;
    width: 100%;
    max-width: 74%;
    height: auto;
    border-radius: 40px;
    vertical-align: middle;
}

@media (max-width: 1024px) {
    .rm-practices__title {
        width: 980px;
        max-width: 100%;
        padding: 0 97.33px 0 40.03px;
    }

    .rm-practice {
        margin: 20px 0;
    }

    .rm-practice__row,
    .rm-practice--reverse .rm-practice__row {
        flex-direction: column-reverse;
        align-items: center;
    }

    .rm-practice__copy,
    .rm-practice__media {
        width: 100%;
    }

    .rm-practice__media img,
    .rm-practice__media .rm-media__video {
        width: 585px;
        max-width: 100%;
    }

    .rm-practice__title {
        font-size: 26.28px;
        line-height: 1.2;
    }
}

@media (max-width: 767px) {
    .rm-practices__title {
        padding: 0 78.05px 0 22.46px;
    }

    .rm-practice {
        padding: 20px;
    }

    .rm-practice__title {
        font-size: 23.85px;
    }
}

/* Timeline: 433c026 (margin 60px on every side, so staging shifts it 60px right and the page
   scrolls sideways; here the overflow is clipped, and at ≤768 the shift is dropped so nothing
   is cut off), heading 6fc4edf, widget rm-timeline */
.rm-timeline-section {
    margin: 60px 0;
    overflow-x: clip;
}

.rm-timeline-section__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: var(--rm-container);
    margin-left: calc(var(--rm-bleed) + 60px);
    padding: 10px var(--rm-gutter);
}

.rm-timeline-section__title {
    width: 83%;
    margin: 0;
    padding: 0 316px 0 72px;
    color: var(--rm-black);
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 400;
    line-height: 1.05;
}

@media (max-width: 768px) {
    .rm-timeline-section__inner {
        margin-left: 0;
    }
}

@media (max-width: 1024px) {
    .rm-timeline-section__title {
        width: 980px;
        max-width: 100%;
        padding: 0 97.33px 0 40.03px;
    }
}

@media (max-width: 767px) {
    .rm-timeline-section__title {
        padding: 0 78.05px 0 22.46px;
    }
}

.rm-timeline {
    --rm-tl-blurple: var(--rm-blurple);
    --rm-tl-blurple-200: #A5B4FC;
    --rm-tl-grey: var(--rm-grey);
    --rm-tl-ease: cubic-bezier(.23, 1, .32, 1);
    --rm-tl-fast: 180ms;
    --rm-tl-normal: 300ms;
    position: relative;
    display: flex;
    gap: 80px;
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 60px 20px;
}

.rm-timeline-image-container {
    position: relative;
    flex: 0 0 50%;
    min-height: 100vh;
}

.rm-timeline-image-sticky {
    position: sticky;
    top: 100px;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
    transition: transform var(--rm-tl-normal) var(--rm-tl-ease);
}

.rm-timeline-image-sticky:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .15);
}

.rm-timeline-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity var(--rm-tl-normal) var(--rm-tl-ease), transform var(--rm-tl-normal) var(--rm-tl-ease);
}

.rm-timeline-image.is-active {
    z-index: 2;
    opacity: 1;
    transform: scale(1);
}

.rm-timeline-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 20px;
    object-fit: cover;
}

.rm-timeline-steps {
    position: relative;
    flex: 0 0 45%;
    margin: 0;
    padding: 0 0 0 40px;
    list-style: none;
}

.rm-timeline-steps::before {
    content: "";
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 25px;
    z-index: 0;
    width: 2px;
    background: var(--rm-tl-blurple-200);
}

.rm-timeline-step {
    position: relative;
    margin-bottom: 120px;
    padding-left: 80px;
    transition: opacity .4s ease, transform .4s ease;
}

.rm-timeline-step:focus {
    outline: none;
}

.rm-timeline-step:focus-visible {
    outline: 2px solid var(--rm-blurple);
    outline-offset: 4px;
}

.rm-timeline-step:last-child {
    margin-bottom: 0;
}

.rm-timeline-step-number {
    position: absolute;
    top: 0;
    left: -8%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--rm-tl-grey);
    box-shadow: none;
    transform: scale(1);
    transition: transform var(--rm-tl-fast) var(--rm-tl-ease), background-color var(--rm-tl-fast) linear, box-shadow var(--rm-tl-fast) linear;
}

.rm-timeline .rm-timeline-step.is-active .rm-timeline-step-number,
.rm-timeline .rm-timeline-step.step-one .rm-timeline-step-number {
    background: var(--rm-tl-blurple);
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
    transform: scale(1.05);
}

.rm-timeline .rm-timeline-step.step-one.deactivated .rm-timeline-step-number {
    background: var(--rm-tl-grey);
    box-shadow: none;
    transform: scale(1);
}

.rm-step-number {
    color: var(--rm-white);
    font-size: 18px;
    font-weight: 600;
}

.rm-timeline-step-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 575px;
    min-height: 214px;
    padding: 32px;
    border: 1px solid var(--rm-grey-medium);
    border-radius: 40px;
    background: var(--rm-white);
    box-shadow: 0 0 50px rgba(41, 41, 41, .06);
    transition: box-shadow var(--rm-tl-normal) var(--rm-tl-ease), transform var(--rm-tl-normal) var(--rm-tl-ease);
}

.rm-timeline-step-title {
    width: 100%;
    max-width: 485px;
    min-height: 34px;
    margin: 0;
    color: var(--rm-black);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.05;
    transition: color .4s var(--rm-tl-ease);
}

.rm-timeline-step-description {
    width: 100%;
    max-width: 511px;
    min-height: 30px;
    margin: 0;
    color: var(--rm-black);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.5;
}

@keyframes rm-tl-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rm-tl-fade-down {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: .98; transform: translateY(6px); }
}

@keyframes rm-tl-pop {
    0% { transform: scale(.95); }
    70% { transform: scale(1.08); }
    100% { transform: scale(1.05); }
}

.rm-timeline-step.is-animating-in .rm-timeline-step-title {
    animation: rm-tl-fade-up var(--rm-tl-normal) var(--rm-tl-ease) both;
}

.rm-timeline-step.is-animating-in .rm-timeline-step-description {
    animation: rm-tl-fade-up var(--rm-tl-normal) var(--rm-tl-ease) 60ms both;
}

.rm-timeline-step.is-animating-in .rm-timeline-step-number {
    animation: rm-tl-pop 260ms var(--rm-tl-ease);
}

.rm-timeline-step.is-animating-out .rm-timeline-step-content {
    animation: rm-tl-fade-down 200ms var(--rm-tl-ease);
}

@media (max-width: 768px) {
    .rm-timeline {
        flex-direction: column;
        gap: 40px;
        min-height: auto;
        padding: 40px 20px;
    }

    .rm-timeline-image-container {
        flex: none;
        order: 1;
        height: 300px;
    }

    .rm-timeline-image-sticky {
        position: relative;
        top: 0;
        height: 100%;
        border-radius: 16px;
    }

    .rm-timeline-image img {
        border-radius: 16px;
    }

    .rm-timeline-steps {
        position: relative;
        display: flex;
        flex: none;
        order: 2;
        gap: 16px;
        padding: 0 16px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
        scroll-padding-inline: 40%;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    .rm-timeline-steps::before {
        display: none;
    }

    .rm-timeline-step:focus-visible {
        outline-offset: -2px;
    }

    .rm-timeline-step {
        display: block;
        flex: 0 0 auto;
        min-width: clamp(320px, 85vw, 640px);
        margin-bottom: 0;
        padding-top: 0;
        padding-left: 0;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .rm-timeline-step-number {
        position: static;
        width: 32px;
        height: 32px;
        margin: 0 auto 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
        transform: none;
    }

    .rm-step-number {
        font-size: 16px;
    }

    .rm-timeline-step-content {
        gap: 12px;
        width: 100%;
        max-width: clamp(280px, 72vw, 520px);
        min-height: 200px;
        padding: 20px;
        border-radius: 24px;
    }

    .rm-timeline-step-title {
        font-size: clamp(18px, 4.7vw, 24px);
    }

    .rm-timeline-step-description {
        font-size: clamp(15px, 4vw, 18px);
        line-height: 1.45;
    }
}

@media (max-width: 480px) {
    .rm-timeline {
        gap: 30px;
        padding: 20px 15px;
    }

    .rm-timeline-image-container {
        height: 250px;
    }

    .rm-timeline-step {
        min-width: 92%;
        padding-top: 50px;
    }

    .rm-timeline-step-content {
        gap: 10px;
        min-height: 180px;
        padding: 20px;
    }

    .rm-timeline-step-title {
        font-size: 20px;
    }

    .rm-timeline-step-description {
        font-size: 16px;
        line-height: 1.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-timeline-image,
    .rm-timeline-image-sticky,
    .rm-timeline-step,
    .rm-timeline-step-number {
        transition: none;
    }

    .rm-timeline-step.is-animating-in .rm-timeline-step-title,
    .rm-timeline-step.is-animating-in .rm-timeline-step-description,
    .rm-timeline-step.is-animating-in .rm-timeline-step-number,
    .rm-timeline-step.is-animating-out .rm-timeline-step-content {
        animation: none;
    }
}

/* mediaPosition (parts/media.php): media first in the source; stacked (≤1024) it stays on top */
.rm-split-hero.rm-media--left,
.rm-practice__row.rm-media--left {
    flex-direction: row;
}

.rm-split-hero.rm-media--right,
.rm-practice__row.rm-media--right {
    flex-direction: row-reverse;
}

@media (max-width: 1024px) {
    .rm-split-hero.rm-media--left,
    .rm-split-hero.rm-media--right,
    .rm-practice__row.rm-media--left,
    .rm-practice__row.rm-media--right {
        flex-direction: column;
    }
}

/*
 * Timeline scenes (parts/timeline-scene.php): a drawn scene in the sticky panel that plays
 * each time its step becomes active (services.js toggles is-active), on the motion tokens.
 * Parts: sc-in (moves in from --x/--y/--r), sc-rise (grows from its base), sc-draw (stroke
 * draws; stroke-dashoffset paints inside the panel and never moves layout), sc-pop, sc-fade;
 * --t is each part's delay. Inactive and reduced-motion scenes show their final state.
 */
.rm-timeline-scene {
    background: var(--rm-lavender);
}

.rm-timeline-scene__art {
    display: block;
    width: 100%;
    height: 100%;
}

.rm-timeline-scene__art * {
    transform-box: fill-box;
}

.sc-card {
    fill: var(--rm-white);
}

.sc-cell {
    fill: #E6E5F3;
}

.sc-cell--a,
.sc-bar--a,
.sc-block--a,
.sc-bull {
    fill: var(--rm-blurple);
}

.sc-junk {
    fill: #C9C9D2;
}

.sc-scan {
    fill: var(--rm-blurple);
    opacity: 0;
}

.sc-badge {
    fill: var(--rm-black);
}

.sc-check,
.sc-shaft {
    fill: none;
    stroke: var(--rm-white);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sc-shaft {
    stroke: var(--rm-black);
    stroke-width: 5;
}

.sc-feather {
    fill: var(--rm-blurple);
}

.rm-timeline-scene__art .sc-wobble {
    transform-box: view-box;
    transform-origin: 320px 290px;
}

.sc-head {
    fill: var(--rm-black);
}

.sc-axis,
.sc-grid {
    fill: none;
    stroke: #D9D8E6;
    stroke-width: 2;
}

.sc-grid {
    stroke-dasharray: 4 8;
}

.sc-bar {
    fill: var(--rm-blurple-medium);
}

.sc-rise {
    transform-origin: center bottom;
}

.sc-bench,
.sc-old {
    fill: none;
    stroke: var(--rm-black);
    stroke-width: 3;
    stroke-dasharray: 1;
}

.sc-old {
    stroke: #C9C9D2;
}

.sc-link,
.sc-path,
.sc-line,
.sc-frame {
    fill: none;
    stroke: var(--rm-black);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1;
}

.sc-path--a,
.sc-line {
    stroke: var(--rm-blurple);
    stroke-width: 5;
}

.sc-frame {
    stroke: var(--rm-blurple);
    stroke-width: 2;
}

.sc-game {
    fill: var(--rm-black);
}

.sc-seg,
.sc-node {
    fill: var(--rm-blurple);
}

.sc-dim {
    opacity: .3;
}

.sc-ring {
    fill: none;
    stroke: var(--rm-blurple-medium);
    stroke-width: 18;
}

.sc-ring--a {
    stroke: #A9A4F8;
}

.sc-impact,
.sc-pulse {
    fill: none;
    stroke: var(--rm-blurple);
    stroke-width: 3;
    opacity: 0;
    transform-origin: center;
}

.sc-band {
    fill: #E6E5F3;
}

.sc-block {
    fill: var(--rm-blurple-medium);
}

.sc-pop,
.sc-in {
    transform-origin: center;
}

.rm-timeline-scene.is-active .sc-in {
    animation: rm-sc-in 900ms var(--rm-ease) both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-rise {
    animation: rm-sc-rise 900ms var(--rm-ease) both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-draw {
    animation: rm-sc-draw 1000ms var(--rm-ease-swap) both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-pop {
    animation: rm-sc-pop 600ms var(--rm-ease) both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-fade {
    animation: rm-sc-fade 900ms ease both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-scan {
    animation: rm-sc-scan 1400ms var(--rm-ease-swap) 200ms both;
}

.rm-timeline-scene.is-active .sc-impact {
    animation: rm-sc-ring 900ms var(--rm-ease) both;
    animation-delay: var(--t, 0ms);
}

.rm-timeline-scene.is-active .sc-pulse {
    animation: rm-sc-ring 1600ms var(--rm-ease) 1700ms 2 both;
}

.rm-timeline-scene.is-active .sc-wobble {
    animation: rm-sc-wobble 700ms ease-out 1550ms both;
}

.rm-timeline-scene.is-active .sc-junk {
    animation: rm-sc-out 700ms ease 900ms both;
}

@keyframes rm-sc-in {
    from { opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)); }
    40% { opacity: 1; }
}

@keyframes rm-sc-wobble {
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(3.5deg); }
    75% { transform: rotate(-1.5deg); }
}

@keyframes rm-sc-rise {
    from { transform: scaleY(0); }
}

@keyframes rm-sc-draw {
    from { stroke-dashoffset: 1; }
}

@keyframes rm-sc-pop {
    from { opacity: 0; transform: scale(.4); }
}

@keyframes rm-sc-fade {
    from { opacity: 0; }
}

@keyframes rm-sc-out {
    to { opacity: 0; }
}

@keyframes rm-sc-scan {
    from { opacity: 1; transform: translateX(0); }
    90% { opacity: 1; }
    to { opacity: 0; transform: translateX(400px); }
}

@keyframes rm-sc-ring {
    from { opacity: .8; transform: scale(1); }
    to { opacity: 0; transform: scale(3.5); }
}

@media (prefers-reduced-motion: reduce) {
    .rm-timeline-scene .rm-timeline-scene__art * {
        animation: none !important;
    }

    .rm-timeline-scene .sc-junk {
        opacity: 0;
    }
}
