/* ==========================================================
   CDS Journey — Preparation Process (Phase 5)
   Namespace: .rd-prep*
   Role: sequential journey (not a four-card feature grid)
   Desktop: horizontal process line
   Tablet: 2×2 connected stages
   Mobile: vertical journey line
   Palette: Navy / Olive / Gold — no lavender/purple
   ========================================================== */

.rd-prep {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 56px 60px;
    background: var(--rd-surface-default, #F8F9FB);
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-prep__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.rd-prep__bg-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    opacity: 0.28;
    filter: saturate(0.85);
}

.rd-prep__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(248, 249, 251, 0.88) 0%,
            rgba(248, 249, 251, 0.78) 42%,
            rgba(248, 249, 251, 0.92) 100%
        );
}

.rd-prep__inner {
    position: relative;
    z-index: 2;
}

/* ---- Intro ---- */
.rd-prep__intro {
    margin-bottom: 36px;
    max-width: 42rem;
}

.rd-prep__eyebrow {
    position: relative;
    display: inline-block;
    margin: 0 0 14px;
    padding-bottom: 10px;
    font-family: var(--rd-font-mono, "IBM Plex Mono", monospace);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rd-color-olive, #4B5320);
}

.rd-prep__eyebrow::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--rd-color-gold, #D4AF37);
}

.rd-prep__heading {
    margin: 0;
    font-family: var(--rd-font-display, "Fraunces", Georgia, serif);
    font-size: clamp(28px, 6vw, 34px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--rd-color-navy, #1A2B4C);
    text-wrap: balance;
}

.rd-prep__lead {
    margin: 14px 0 0;
    max-width: 36rem;
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--rd-text-secondary, #6C757D);
}

/* ---- Journey: mobile vertical ---- */
.rd-prep__journey {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 28px;
}

.rd-prep__journey::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 28px;
    left: 5px;
    width: 2px;
    background: var(--rd-border-subtle, #DDE2E6);
}

.rd-prep__stage {
    position: relative;
    padding: 0 0 32px;
}

.rd-prep__stage:last-child {
    padding-bottom: 8px;
}

.rd-prep__num {
    display: block;
    margin: 0 0 8px;
    font-family: var(--rd-font-mono, "IBM Plex Mono", monospace);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--rd-color-gold, #D4AF37);
}

.rd-prep__marker {
    position: absolute;
    top: 4px;
    left: -28px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--rd-color-white, #FFFFFF);
    background: var(--rd-color-olive, #4B5320);
    box-shadow: 0 0 0 2px var(--rd-border-subtle, #DDE2E6);
    transition: background 180ms ease, box-shadow 180ms ease;
}

.rd-prep__title {
    margin: 0 0 6px;
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rd-color-navy, #1A2B4C);
    transition: color 180ms ease;
}

.rd-prep__copy {
    margin: 0;
    max-width: 28rem;
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--rd-text-secondary, #6C757D);
}

.rd-prep__stage:hover .rd-prep__title {
    color: var(--rd-color-olive, #4B5320);
}

.rd-prep__stage:hover .rd-prep__marker {
    background: var(--rd-color-olive-hover, #3C4319);
    box-shadow: 0 0 0 2px rgba(75, 83, 32, 0.28);
}

/* Cycle cue */
.rd-prep__cycle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0 28px;
    font-family: var(--rd-font-mono, "IBM Plex Mono", monospace);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rd-color-olive, #4B5320);
}

.rd-prep__cycle-arrow {
    font-size: 14px;
    line-height: 1;
    color: var(--rd-color-gold, #D4AF37);
}

/* ==========================================================
   Tablet 768–1199 — 2×2 process
   ========================================================== */
@media (min-width: 768px) {
    .rd-prep {
        padding-block: 68px 72px;
    }

    .rd-prep__intro {
        margin-bottom: 44px;
        max-width: 40rem;
    }

    .rd-prep__heading {
        font-size: 40px;
        line-height: 1.1;
    }

    .rd-prep__lead {
        font-size: 16px;
    }

    .rd-prep__journey {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 36px 40px;
        padding: 0;
    }

    .rd-prep__journey::before {
        display: none;
    }

    .rd-prep__stage {
        position: relative;
        padding: 28px 0 0;
    }

    .rd-prep__stage:last-child {
        padding-bottom: 0;
    }

    /* Horizontal connector within each row */
    .rd-prep__stage:nth-child(odd)::after {
        content: "";
        position: absolute;
        top: 5px;
        left: 12px;
        right: calc(-20px);
        height: 2px;
        background: var(--rd-border-subtle, #DDE2E6);
        z-index: 0;
    }

    .rd-prep__stage:nth-child(even)::after {
        display: none;
    }

    .rd-prep__marker {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }

    .rd-prep__num {
        margin-top: 8px;
    }

    .rd-prep__title {
        font-size: 18px;
    }

    .rd-prep__copy {
        font-size: 14px;
        max-width: 22rem;
    }

    .rd-prep__cycle {
        margin: 28px 0 0;
        justify-content: flex-end;
        width: 100%;
    }
}

/* ==========================================================
   Desktop >=1200 — horizontal journey
   ========================================================== */
@media (min-width: 1200px) {
    .rd-prep {
        padding-block: 88px 92px;
    }

    .rd-prep__bg-image {
        opacity: 0.32;
    }

    .rd-prep__scrim {
        background:
            linear-gradient(
                105deg,
                rgba(248, 249, 251, 0.94) 0%,
                rgba(248, 249, 251, 0.78) 48%,
                rgba(248, 249, 251, 0.7) 100%
            );
    }

    .rd-prep__intro {
        margin-bottom: 52px;
        max-width: 44rem;
    }

    .rd-prep__heading {
        font-size: 48px;
        line-height: 1.1;
    }

    .rd-prep__lead {
        font-size: 17px;
        max-width: 38rem;
    }

    .rd-prep__journey {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
        padding: 36px 0 0;
        align-items: start;
    }

    /* Continuous horizontal journey line */
    .rd-prep__journey::before {
        display: block;
        top: 5px;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 2px;
        background: var(--rd-border-subtle, #DDE2E6);
    }

    .rd-prep__stage {
        position: relative;
        padding: 28px 12px 0 0;
        text-align: left;
    }

    .rd-prep__stage::after {
        display: none !important;
    }

    .rd-prep__marker {
        top: 0;
        left: 0;
    }

    .rd-prep__num {
        margin-top: 10px;
        font-size: 14px;
    }

    .rd-prep__title {
        font-size: 20px;
    }

    .rd-prep__copy {
        font-size: 15px;
        max-width: 16rem;
    }

    .rd-prep__cycle {
        margin-top: 32px;
    }
}

@media (min-width: 1440px) {
    .rd-prep__heading {
        font-size: 52px;
    }

    .rd-prep__journey {
        gap: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rd-prep__title,
    .rd-prep__marker {
        transition: none;
    }
}
