/* ============================================================
   Страница кейса (/nashi-raboty/{slug})
   Поверх works.css (кнопки wp-btn, крошки, липкая кнопка).
   Образ — инженерный: фото объекта, шильдик «паспорт объекта»,
   линия кабеля по этапам, светлый «бетонный» блок. Классы — wc-*.
   ============================================================ */

.wc {
    --wc-ink: #0B1424;
    --wc-navy: #0E1A2E;
    --wc-panel: #141D2E;
    --wc-cyan: #00B2FF;
    --wc-ice: #B2E0FF;
    --wc-concrete: #E6E9ED;
    --wc-graphite: #1C2636;
    font-family: Inter, sans-serif;
}

.wc-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}

.wc-kicker {
    margin-bottom: 14px;
    color: var(--wc-cyan);
    font-size: 14px;
    font-weight: 600;
}

.wc-h2 {
    max-width: 760px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(32px, 3.8vw, 52px);
    font-weight: 500;
    line-height: 1.05;
    text-transform: uppercase;
}

.wc-sub {
    max-width: 560px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 18px;
    line-height: 1.55;
}

.wc a:focus-visible,
.wc button:focus-visible {
    outline: 2px solid var(--wc-cyan);
    outline-offset: 3px;
}

/* ===== Первый экран ===== */

.wc-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: max(760px, 100svh);
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(0, 178, 255, 0.16), rgba(0, 178, 255, 0) 70%),
        var(--wc-ink);
    overflow: hidden;
}

/* Фото — левая половина экрана целиком, станция в кадре */
.wc-hero__media {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.wc-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 78%;
    animation: wc-hero-zoom 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wc-hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 20, 36, 0) 70%, var(--wc-ink) 100%);
}

.wc-hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 40px;
    max-width: 680px;
    padding: 130px 30px 56px 48px;
}

.wc-hero__content > * {
    animation: wc-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wc-hero__content > :nth-child(2) { animation-delay: 0.08s; }
.wc-hero__content > :nth-child(3) { animation-delay: 0.16s; }
.wc-hero__content > :nth-child(4) { animation-delay: 0.24s; }
.wc-hero__content > :nth-child(5) { animation-delay: 0.32s; }

.wc-hero__title {
    max-width: 760px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(44px, 5.4vw, 80px);
    font-weight: 500;
    line-height: 0.95;
    text-transform: uppercase;
    text-wrap: balance;
}

.wc-hero__place {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--wc-ice);
    font-size: 17px;
    font-weight: 500;
}

.wc-hero__place::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--wc-cyan);
}

.wc-hero__lead {
    max-width: 560px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.55;
}

.wc-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    margin-top: 34px;
}

.wc-hero__scroll {
    color: #FFF;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 3px;
    transition: border-color 0.25s, color 0.25s;
}

.wc-hero__scroll:hover {
    color: var(--wc-ice);
    border-color: var(--wc-cyan);
}

/* Шильдик «паспорт объекта» */
.wc-plate {
    padding: 22px 24px 10px;
    border: 1px solid rgba(178, 224, 255, 0.28);
    border-radius: 6px;
    background: rgba(11, 20, 36, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    animation: wc-rise 0.9s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wc-plate__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--wc-cyan);
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wc-plate__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wc-ice);
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.wc-plate__status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3DDC84;
    box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18);
}

.wc-plate__rows {
    margin: 0;
}

.wc-plate__rows > div {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

.wc-plate__rows > div:last-child {
    border-bottom: 0;
}

.wc-plate__rows dt {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

.wc-plate__rows dd {
    margin: 0;
    color: #FFF;
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.wc-plate__rows dd.is-pending {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    font-style: italic;
}

/* ===== Задача: светлый блок ===== */

.wc-task {
    position: relative;
    padding: clamp(72px, 9vw, 128px) 0 0;
    background: var(--wc-concrete);
    color: var(--wc-ink);
}

.wc-task__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.wc-task .wc-kicker {
    color: #0077B6;
}

.wc-task__title {
    color: var(--wc-ink);
    font-family: Oswald, sans-serif;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 500;
    line-height: 1.08;
    text-transform: uppercase;
    text-wrap: balance;
}

.wc-task__text > p:last-child {
    max-width: 560px;
    margin-top: 26px;
    color: #2B3648;
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.6;
}

/* Фото уходит вниз, внахлёст на тёмную секцию */
.wc-task__photo {
    position: relative;
    z-index: 2;
    margin: 0 0 -160px;
}

.wc-task__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 40px 80px rgba(11, 20, 36, 0.35);
}

.wc-task__photo figcaption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

/* ===== Ход работ: линия кабеля ===== */

.wc-process {
    padding: clamp(96px, 12vw, 200px) 0 clamp(72px, 9vw, 120px);
    background: var(--wc-navy);
}

.wc-line {
    --wc-progress: 1;
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin: 64px 0 0;
    padding: 0;
    list-style: none;
}

/* Кабель: серая трасса и голубой «ток» поверх, тянется при прокрутке */
.wc-line::before,
.wc-line::after {
    content: '';
    position: absolute;
    top: 21px;
    left: 22px;
    right: 22px;
    height: 2px;
}

.wc-line::before {
    background: rgba(255, 255, 255, 0.14);
}

.wc-line::after {
    background: linear-gradient(90deg, var(--wc-cyan), var(--wc-ice));
    box-shadow: 0 0 12px rgba(0, 178, 255, 0.7);
    transform-origin: left center;
    transform: scaleX(var(--wc-progress));
}

@supports (animation-timeline: view()) {
    .wc-line::after {
        animation: wc-current linear both;
        animation-timeline: view();
        animation-range: entry 20% cover 55%;
    }
}

.wc-line__step {
    position: relative;
}

.wc-line__node {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 26px;
    border: 2px solid var(--wc-cyan);
    border-radius: 50%;
    background: var(--wc-navy);
    color: var(--wc-ice);
    font-family: Oswald, sans-serif;
    font-size: 18px;
    font-weight: 500;
}

.wc-line__step:last-child .wc-line__node {
    background: var(--wc-cyan);
    color: var(--wc-ink);
}

.wc-line__step h3 {
    margin-bottom: 10px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.wc-line__step p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    line-height: 1.55;
}

/* ===== Итог + предложение ===== */

.wc-outcome {
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--wc-panel);
}

.wc-outcome__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

.wc-outcome__quote {
    margin: 0;
    padding-left: 28px;
    border-left: 3px solid var(--wc-cyan);
}

.wc-outcome__quote p:last-child {
    color: #FFF;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 500;
    line-height: 1.35;
    text-wrap: pretty;
}

.wc-offer {
    position: relative;
    padding: 36px 32px 32px;
    border-radius: 6px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(0, 178, 255, 0.28), rgba(0, 178, 255, 0) 60%),
        var(--wc-graphite);
    border: 1px solid rgba(0, 178, 255, 0.35);
}

.wc-offer__title {
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.wc-offer__list {
    margin: 22px 0 28px;
    padding: 0;
    list-style: none;
}

.wc-offer__list li {
    position: relative;
    padding: 9px 0 9px 30px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
}

.wc-offer__list li::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    width: 14px;
    height: 8px;
    border-left: 2px solid var(--wc-cyan);
    border-bottom: 2px solid var(--wc-cyan);
    transform: rotate(-45deg);
}

.wc-offer .wp-btn {
    width: 100%;
}

.wc-offer__phone {
    display: block;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    text-align: center;
    text-decoration: none;
}

.wc-offer__phone:hover {
    color: var(--wc-ice);
}

/* ===== Перелинковка: список-оглавление ===== */

.wc-next {
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--wc-navy);
}

.wc-index {
    margin: 44px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.wc-index li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.wc-index a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
    align-items: center;
    gap: 24px;
    padding: 24px 8px;
    color: #FFF;
    text-decoration: none;
    transition: background-color 0.25s, padding 0.25s;
}

.wc-index a:hover {
    padding-left: 20px;
    background: rgba(0, 178, 255, 0.07);
}

.wc-index__title {
    font-family: Oswald, sans-serif;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.wc-index__text {
    color: rgba(255, 255, 255, 0.62);
    font-size: 16px;
    line-height: 1.5;
}

.wc-index__arrow {
    justify-self: end;
    color: var(--wc-cyan);
    font-size: 24px;
    transition: transform 0.25s;
}

.wc-index a:hover .wc-index__arrow {
    transform: translateX(6px);
}

.wc-read {
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    line-height: 1.8;
}

.wc-read a {
    color: var(--wc-ice);
    text-decoration: underline;
    text-decoration-color: rgba(178, 224, 255, 0.4);
    text-underline-offset: 4px;
}

.wc-read a:hover {
    color: #FFF;
    text-decoration-color: var(--wc-cyan);
}

/* ===== Лента других работ ===== */

.wc-strip {
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--wc-panel);
}

.wc-strip__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.wc-more-link {
    color: var(--wc-cyan);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.wc-more-link:hover {
    color: var(--wc-ice);
}

.wc-strip__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 340px);
    gap: 18px;
    overflow-x: auto;
    padding: 0 max(30px, calc((100vw - 1220px) / 2)) 12px;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 max(30px, calc((100vw - 1220px) / 2));
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 178, 255, 0.5) transparent;
}

.wc-strip__card {
    scroll-snap-align: start;
    color: #FFF;
    text-decoration: none;
}

.wc-strip__card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    transition: filter 0.3s;
    filter: saturate(0.85);
}

.wc-strip__card:hover img {
    filter: saturate(1.1);
}

.wc-strip__card span {
    display: block;
    margin-top: 14px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

/* ===== Финальный CTA на фото ===== */

.wc-final {
    position: relative;
    padding: clamp(110px, 14vw, 200px) 30px;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}

.wc-final__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.wc-final::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(70% 90% at 50% 50%, rgba(11, 20, 36, 0.78), rgba(11, 20, 36, 0.95));
}

.wc-final__inner {
    max-width: 760px;
    margin: 0 auto;
}

.wc-final__title {
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(40px, 5.6vw, 80px);
    font-weight: 500;
    line-height: 0.98;
    text-transform: uppercase;
}

.wc-final__inner > p {
    max-width: 520px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    line-height: 1.55;
}

.wc-final__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
}

/* ===== Анимации ===== */

@keyframes wc-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes wc-hero-zoom {
    from { transform: scale(1.06); }
    to { transform: scale(1); }
}

@keyframes wc-current {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ===== Адаптив ===== */

@media (max-width: 1100px) {
    .wc-outcome__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .wc-wrap {
        padding: 0 16px;
    }

    .wc-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .wc-hero__media {
        height: 78svh;
        min-height: 460px;
    }

    .wc-hero__bg {
        object-position: 30% 85%;
    }

    .wc-hero__media::after {
        background: linear-gradient(0deg, var(--wc-ink) 0%, rgba(11, 20, 36, 0) 35%);
    }

    .wc-hero__inner {
        max-width: none;
        margin-top: -40px;
        padding: 0 16px 48px;
        position: relative;
    }

    .wc-hero__inner .wp-crumbs {
        order: -1;
    }

    .wc-hero__lead,
    .wc-sub {
        font-size: 16px;
    }

    .wc-hero__actions {
        gap: 20px;
    }

    .wc-plate__rows > div {
        grid-template-columns: 88px 1fr;
    }

    .wc-task__grid {
        grid-template-columns: 1fr;
    }

    .wc-task__photo {
        margin-bottom: -100px;
    }

    .wc-process {
        padding-top: 150px;
    }

    /* Линия кабеля вертикально */
    .wc-line {
        grid-template-columns: 1fr;
        gap: 34px;
        margin-top: 44px;
        padding-left: 64px;
    }

    .wc-line::before,
    .wc-line::after {
        top: 22px;
        bottom: 22px;
        left: 21px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .wc-line::after {
        transform-origin: center top;
        transform: scaleY(var(--wc-progress));
    }

    @supports (animation-timeline: view()) {
        .wc-line::after {
            animation-name: wc-current-y;
            animation-range: entry 10% cover 70%;
        }
    }

    .wc-line__node {
        position: absolute;
        top: -8px;
        left: -64px;
        margin: 0;
    }

    .wc-outcome__quote {
        padding-left: 20px;
    }

    .wc-offer {
        padding: 28px 20px 24px;
    }

    .wc-index a {
        grid-template-columns: 1fr 28px;
        gap: 6px 16px;
        padding: 20px 4px;
    }

    .wc-index__text {
        grid-column: 1;
        grid-row: 2;
        font-size: 15px;
    }

    .wc-index__arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .wc-strip__track {
        grid-auto-columns: 72%;
        padding: 0 16px 12px;
        scroll-padding: 0 16px;
    }

    .wc-final {
        padding: 96px 16px;
    }

    .wc-final__actions .wp-btn {
        width: 100%;
    }
}

@keyframes wc-current-y {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .wc-hero__bg,
    .wc-hero__content > *,
    .wc-plate,
    .wc-line::after {
        animation: none !important;
    }

    .wc-index a,
    .wc-index__arrow,
    .wc-strip__card img {
        transition: none;
    }
}
