/* ═══════════════════════════════════════
   ROADMAP — «Как мы работаем»
   Integrated into main site. Uses global
   vars from main.css (--accent, --font-h,
   --font-b, --ease-out-expo, etc.)
   ═══════════════════════════════════════ */

/* ── Section ── */
.rm {
    position: relative;
    z-index: 10;
    padding: clamp(40px, 7vw, 80px) 0;
}
.rm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
    position: relative;
}

/* ── Header ── */
.rm-header {
    text-align: center;
    margin-bottom: clamp(28px, 4vw, 48px);
}
.rm-tag {
    display: block;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.85;
}
.rm-h {
    font-family: var(--font-h);
    font-size: clamp(1.4rem, 3.5vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.rm-h .gold { color: var(--accent) }
.rm-sub {
    font-size: clamp(0.82rem, 1vw, 0.95rem);
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ── Ambient glow (статичный, без blur-фильтра) ── */
.rm-glow {
    position: absolute;
    top: 55%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70%; height: 55%;
    background: radial-gradient(ellipse at center, rgba(255,215,0,.05) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

/* ═══════ Panel ═══════ */
.rm-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(170deg, rgba(14,14,16,.96), rgba(6,6,8,.98));
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 24px 70px -20px rgba(0,0,0,.75),
        0 0 0 1px rgba(255,255,255,.03),
        inset 0 1px 0 rgba(255,255,255,.05),
        0 0 80px -25px rgba(255,215,0,.08);
}

/* Top glow line */
.rm-panel::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,215,0,.4) 50%, transparent 95%);
    z-index: 3;
}

/* ── Status bar (как в референсе: слева линия, справа шаг) ── */
.rm-bar {
    position: relative; z-index: 2;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,215,0,.07);
    background: linear-gradient(180deg, rgba(255,215,0,.03), transparent);
}
.rm-led {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255,215,0,.5), 0 0 2px rgba(255,215,0,.9);
}
.rm-bar-text {
    flex: 1 1 180px;
    min-width: 0;
    font-family: var(--font-label), var(--font-mono);
    font-size: clamp(0.52rem, 1.5vw, 0.58rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.82);
}
.rm-bar-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.rm-bar-inter {
    font-family: var(--font-label), var(--font-mono);
    font-size: 0.52rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.45);
}
.rm-bar-step-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    background: rgba(0, 0, 0, 0.35);
}
.rm-bar-arr {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255, 215, 0, 0.35);
    user-select: none;
}
.rm-bar-step-num {
    font-family: var(--font-h);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--accent);
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
    min-width: 1.5em;
    text-align: center;
}
.rm-bar-status {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,215,0,.5);
}
@media (max-width: 719px) {
    .rm-bar-meta {
        width: 100%;
        justify-content: flex-end;
    }
    .rm-bar-status {
        flex: 1 1 100%;
        text-align: center;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid rgba(255, 215, 0, 0.06);
    }
}
@media (min-width: 720px) {
    .rm-bar-status {
        margin-left: auto;
        text-align: right;
    }
}
/* ═══════ Flow grid ═══════ */
.rm-flow {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* Blueprint grid texture */
.rm-flow::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,215,0,.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,215,0,.008) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none; z-index: 0;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black, transparent);
}

/* ── Track ── */
.rm-track {
    position: absolute; top: 42px;
    left: calc(12.5% + 1px); right: calc(12.5% + 1px);
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255,255,255,.04),
        rgba(255,215,0,.28) 20%,
        rgba(255,215,0,.38) 50%,
        rgba(255,215,0,.28) 80%,
        rgba(255,255,255,.04));
    z-index: 1; border-radius: 2px;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
}.rm-track-fill {
    position: relative;
    height: 100%; width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), rgba(255,215,0,.4));
}
.rm-track-fill::after {
    content: '';
    position: absolute; top: 50%; right: -2px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px 2px rgba(255,215,0,.6), 0 0 25px 4px rgba(255,215,0,.15);
    transform: translateY(-50%);
    opacity: 1;
}

/* ── Phase ── */
.rm-phase {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
    padding: 18px 14px 22px;
    opacity: 1;
}

/* Separator */
.rm-phase + .rm-phase::before {
    content: ''; position: absolute;
    left: 0; top: 12%; bottom: 12%; width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255,215,0,.1) 50%, transparent);
}

/* ── Dot marker ── */
.ph-dot {
    position: relative; z-index: 4;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(10,10,12,.95);
    border: 2px solid rgba(255,215,0,.35);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; flex-shrink: 0;
}
.ph-dot-n {
    font-family: var(--font-h);
    font-size: 0.68rem; font-weight: 800;
    color: rgba(255,255,255,.45);
    line-height: 1;
}
.rm-phase.is-active .ph-dot {
    background: var(--accent); border-color: rgba(255, 248, 140, 1);
    box-shadow:
        0 0 22px rgba(255,215,0,.55),
        0 0 10px rgba(255,215,0,.35),
        inset 0 1px 0 rgba(255,255,255,.35);
}
.rm-phase.is-active .ph-dot-n { color: #0a0a0a }

.ph-ping {
    display: none;
}

/* ── Phase body ── */
.ph-body {
    position: relative; width: 100%;
    padding: 16px 14px; border-radius: 12px;
    background: rgba(255,255,255,.018);
    border: 1px solid transparent;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.rm-phase.is-active .ph-body {
    background: linear-gradient(165deg, rgba(255,215,0,.025), rgba(255,255,255,.015));
    border-color: rgba(255,215,0,.1);
}

/* Иконка шага — квадрат со скруглением (референс) */
.ph-icon {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 215, 0, 0.38);
    background: linear-gradient(165deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.03));
    color: var(--accent);
    box-shadow:
        0 0 22px rgba(255, 215, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ph-icon svg {
    width: 22px;
    height: 22px;
}
/* Ghost number */
.ph-num {
    position: absolute; top: -6px; right: 8px;
    font-family: var(--font-h);
    font-size: 3.6rem; font-weight: 900; line-height: 1;
    color: rgba(255,215,0,.03);
    pointer-events: none;
    z-index: 0;
}
.rm-phase.is-active .ph-num { color: rgba(255,215,0,.06) }

/* Text */
.ph-name {
    position: relative; z-index: 1;
    font-family: var(--font-h);
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.4px; color: #fff; line-height: 1.2;
}
.ph-hook {
    position: relative; z-index: 1;
    font-size: clamp(0.7rem, 0.82vw, 0.8rem);
    color: var(--text-muted); line-height: 1.4;
}

/* List */
.ph-list {
    position: relative; z-index: 1;
    list-style: none;
    display: flex; flex-direction: column; gap: 5px;
    margin-top: 6px; flex: 1;
}
.ph-list li {
    display: flex; align-items: baseline; gap: 7px;
    font-size: clamp(0.66rem, 0.74vw, 0.74rem);
    line-height: 1.45; color: rgba(255,255,255,.62);
}
.ph-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    margin-top: 0.42em;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
    flex-shrink: 0;
}
/* Output badge + календарь */
.ph-out {
    position: relative; z-index: 1;
    margin-top: auto;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 11px; border-radius: 8px;
    background: rgba(255,215,0,.05);
    border: 1px solid rgba(255, 215, 0, 0.14);
    border-left: 2px solid var(--accent);
    font-family: var(--font-mono);
    font-size: 0.6rem; font-weight: 600;
    color: rgba(255,215,0,.85);
    letter-spacing: 0.3px; line-height: 1.45;
}
.ph-out-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: rgba(255, 215, 0, 0.65);
    opacity: 0.95;
}
.ph-out-icon svg {
    display: block;
}
.ph-out-copy {
    flex: 1;
    min-width: 0;
}
.ph-out--win {
    border-left-color: #3dd68c;
    background: rgba(61,214,140,.06);
    border-color: rgba(61, 214, 140, 0.18);
    color: rgba(61,214,140,.9);
}
.ph-out--win .ph-out-icon {
    color: rgba(61, 214, 140, 0.75);
}
/* ── Итоговый блок «Результат» (референс: цель + 4 столпа) ── */
.rm-result {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding: clamp(18px, 3.5vw, 26px) clamp(16px, 3vw, 24px);
    background:
        linear-gradient(165deg, rgba(255, 215, 0, 0.04) 0%, transparent 42%),
        rgba(5, 6, 9, 0.65);
}
.rm-result-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(18px, 3vw, 26px);
    align-items: start;
}
@media (min-width: 900px) {
    .rm-result-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: clamp(22px, 3vw, 36px);
    }
}
.rm-result-hero {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.rm-result-target {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--accent);
    border: 1px solid rgba(255, 215, 0, 0.38);
    background: linear-gradient(165deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.03));
    box-shadow:
        0 0 28px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.rm-result-target svg {
    width: 26px;
    height: 26px;
}
.rm-result-kicker {
    margin: 0 0 8px;
    font-family: var(--font-h);
    font-size: clamp(0.82rem, 2vw, 0.98rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}
.rm-result-lead {
    margin: 0;
    font-size: clamp(0.78rem, 1.6vw, 0.88rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
}
.rm-result-pillars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.rm-result-pillars li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}
.rm-pillar-ic {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--accent);
    border: 1px solid rgba(255, 215, 0, 0.22);
    background: rgba(0, 0, 0, 0.35);
}
.rm-pillar-ic svg {
    width: 18px;
    height: 18px;
}
.rm-pillar-txt {
    font-size: clamp(0.66rem, 1.45vw, 0.76rem);
    line-height: 1.38;
    color: rgba(255, 255, 255, 0.72);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1080px) {
    .rm-flow { grid-template-columns: repeat(2, 1fr) }
    .rm-track { display: none }
    .rm-phase + .rm-phase::before { display: none }
    .rm-phase {
        padding: 16px 14px 18px;
        border-bottom: 1px solid rgba(255,215,0,.05);
    }
    .rm-phase:nth-child(odd) { border-right: 1px solid rgba(255,215,0,.05) }
    .rm-phase:nth-last-child(-n+2) { border-bottom: none }
    .ph-dot { width: 26px; height: 26px; margin-bottom: 12px }
    .ph-dot-n { font-size: 0.55rem }
}

@media (max-width: 768px) {
    .rm { padding: 28px 0 36px }
    .rm-header { text-align: left; margin-bottom: 20px }
    .rm-sub { margin: 0 }
    .rm-glow { width: 90%; height: 45% }
    .rm-bar { padding: 10px 16px }
    .rm-bar-text { font-size: 0.52rem; letter-spacing: 1px }
    .rm-bar-status { font-size: 0.5rem }
    .rm-phase { padding: 14px 12px 16px }
    .ph-num { font-size: 2.8rem; top: -4px }
    .ph-body { padding: 14px 12px }
    .rm-result {
        display: none;
    }
}

@media (max-width: 580px) {
    .rm-panel { border-radius: 14px }
    .rm-flow {
        grid-template-columns: 1fr;
        padding-left: 38px;
        padding-top: 8px; padding-bottom: 8px;
    }
    .rm-flow::before {
        content: ''; position: absolute;
        left: 19px; top: 30px; bottom: 30px;
        width: 2px; z-index: 1;
        background: repeating-linear-gradient(180deg, rgba(255,215,0,.2) 0px, rgba(255,215,0,.2) 6px, transparent 6px, transparent 12px);
    }
    .rm-flow::after { display: none }
    .rm-phase {
        padding: 12px 0 12px 10px;
        align-items: flex-start;
        border-bottom: none !important;
        border-right: none !important;
    }
    .rm-phase + .rm-phase { margin-top: 4px }
    .ph-dot {
        position: absolute; left: -27px; top: 16px;
        width: 18px; height: 18px; margin: 0; border-width: 1.5px;
    }
    .ph-dot-n { font-size: 0.45rem }
    .ph-body { padding: 12px 12px 12px 10px }
    .ph-num { font-size: 2.4rem; top: -3px; right: 6px }
    .ph-name { font-size: 0.82rem }
    .ph-hook { font-size: 0.72rem }
    .ph-list li { font-size: 0.68rem }
    .ph-out { font-size: 0.56rem; padding: 6px 9px }
}

@media (max-width: 380px) {
    .rm-wrap { padding: 0 10px }
    .rm-h { font-size: 1.15rem }
    .rm-sub { font-size: 0.75rem }
    .rm-bar-text { font-size: 0.48rem }
    .rm-bar-status { display: none }
    .rm-flow { padding-left: 32px }
    .rm-flow::before { left: 15px }
    .ph-dot { left: -23px; width: 16px; height: 16px }
    .ph-dot-n { font-size: 0.4rem }
    .ph-body { padding: 10px }
    .ph-num { font-size: 2rem }
}

