/* =========================================================
   RotoEdge — homepage "Our Process"
   Fits one screen on desktop; animated progress rail (no scroll reveal)
   Desktop ≥1025px · Tablet 768–1024px · Mobile ≤767px
========================================================= */

.re-proc {
    --proc-red: #ff1f1f;
    --proc-line: rgba(255, 255, 255, .12);
    --proc-muted: rgba(255, 255, 255, .62);
    --proc-cycle: 10s;
    padding: clamp(32px, 3.5vw, 56px) 0;
    background: var(--e-global-color-primary, #121212);
    color: #fff;
}

.re-proc__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(32px, 4.5vw, 80px);
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.re-proc .tp-subtitle-text { color: #fff; }

.re-proc__title {
    margin: 16px 0 14px;
    font-family: "Marcellus", serif;
    font-weight: 400;
    font-size: clamp(34px, 3.6vw, 58px);
    line-height: 1.05;
    color: var(--proc-red);
    text-wrap: balance;
}

.re-proc__intro {
    margin: 0 0 clamp(20px, 2vw, 28px);
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.6;
    color: var(--proc-muted);
    text-wrap: pretty;
}

/* framed showreel */
.re-proc__video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 1px rgba(255, 31, 31, .35), 0 24px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(255, 31, 31, .12);
}

.re-proc__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- steps on a progress rail ---------- */

.re-proc__steps {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

/* rail */
.re-proc__steps::before,
.re-proc__steps::after {
    content: "";
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 29px;
    width: 2px;
    border-radius: 2px;
}

.re-proc__steps::before { background: var(--proc-line); }

/* red progress running down the rail */
.re-proc__steps::after {
    background: linear-gradient(180deg, var(--proc-red), rgba(255, 31, 31, .35));
    box-shadow: 0 0 12px rgba(255, 31, 31, .6);
    transform-origin: top;
    animation: re-proc-fill var(--proc-cycle) linear infinite;
}

@keyframes re-proc-fill {
    0%   { transform: scaleY(0); opacity: 1; }
    90%  { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

.re-proc__step {
    --i: 0;
    position: relative;
    display: grid;
    grid-template-columns: 60px 1fr;
    column-gap: 22px;
    align-items: start;
    padding: 12px 18px 12px 0;
    border-radius: 16px;
}

.re-proc__step + .re-proc__step { margin-top: 6px; }

.re-proc__badge {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #252525, #141414 70%);
    box-shadow: 0 0 0 6px var(--e-global-color-primary, #121212);
    animation: re-proc-light var(--proc-cycle) linear infinite;
    animation-delay: calc(var(--i) * var(--proc-cycle) * .18);
}

.re-proc__badge img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.re-proc__badge::after {
    counter-increment: step;
    content: "0" counter(step);
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 24px;
    padding: 3px 5px;
    border-radius: 20px;
    background: var(--proc-red);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    color: #fff;
}

/* each badge lights up as the progress passes it */
@keyframes re-proc-light {
    0%, 14%   { border-color: var(--proc-red); box-shadow: 0 0 0 6px var(--e-global-color-primary, #121212), 0 0 24px rgba(255, 31, 31, .55); }
    22%, 100% { border-color: rgba(255, 255, 255, .16); box-shadow: 0 0 0 6px var(--e-global-color-primary, #121212); }
}

.re-proc__title-sm {
    margin: 4px 0 6px;
    font-family: "Marcellus", serif;
    font-weight: 400;
    font-size: clamp(19px, 1.5vw, 23px);
    line-height: 1.2;
    color: #fff;
}

.re-proc__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--proc-muted);
    text-wrap: pretty;
}

/* ---------- Tablet: stack header + video, steps below in two columns ---------- */
@media (max-width: 1024px) {
    .re-proc__inner { grid-template-columns: 1fr; }

    .re-proc__steps {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .re-proc__steps::before,
    .re-proc__steps::after { display: none; }

    .re-proc__step {
        padding: 18px;
        border: 1px solid var(--proc-line);
        background: #171717;
    }

    .re-proc__step + .re-proc__step { margin-top: 0; }

    .re-proc__step:last-child { grid-column: 1 / -1; }

    .re-proc__badge { box-shadow: none; }
}

/* ---------- Mobile: single column rail ---------- */
@media (max-width: 767px) {
    .re-proc__inner { padding: 0 18px; gap: 28px; }

    .re-proc__steps { display: block; }

    .re-proc__steps::before,
    .re-proc__steps::after {
        display: block;
        left: 23px;
        top: 24px;
        bottom: 24px;
    }

    .re-proc__step {
        grid-template-columns: 48px 1fr;
        column-gap: 16px;
        padding: 8px 0;
        border: 0;
        background: none;
    }

    .re-proc__step + .re-proc__step { margin-top: 4px; }

    .re-proc__badge {
        width: 48px;
        height: 48px;
        box-shadow: 0 0 0 5px var(--e-global-color-primary, #121212);
    }

    .re-proc__badge img { width: 24px; height: 24px; }

    .re-proc__title-sm { font-size: 19px; }

    .re-proc__text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .re-proc__steps::after { animation: none; transform: scaleY(1); }
    .re-proc__badge { animation: none; }
}
