/* Frontend + editor shared styles */
.ic-exchange-works {
    position: relative;
    overflow: hidden;
    background: var(--ic-exchange-bg, #171a29);
    color: var(--ic-exchange-text, #c9c9c9);
    padding-top: var(--ic-exchange-pt-mobile, 80px);
    padding-bottom: var(--ic-exchange-pb-mobile, 80px);
}

.ic-exchange-works__container {
    width: min(var(--ic-exchange-container-max, 1800px), calc(100% - (var(--ic-exchange-side-mobile, 24px) * 2)));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.ic-exchange-works__heading-wrap {
    max-width: 1100px;
    margin: 0 auto var(--ic-exchange-heading-space, 56px);
    text-align: center;
}

.ic-exchange-works__eyebrow {
    margin: 0 0 1rem;
    color: var(--ic-exchange-accent, #c5a95e);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ic-exchange-works__heading {
    margin: 0 0 1.25rem;
    color: var(--ic-exchange-heading, #faf8f5);
    font-size: var(--ic-exchange-heading-size-mobile, 40px);
    line-height: var(--ic-exchange-heading-line-height, 1.1);
    font-weight: 700;
    text-wrap: balance;
}

.ic-exchange-works__description {
    margin: 0;
    color: var(--ic-exchange-text, #c9c9c9);
    font-size: var(--ic-exchange-description-size-mobile, 19px);
    line-height: var(--ic-exchange-description-line-height, 1.75);
}

.ic-exchange-works__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ic-exchange-gap-mobile, 28px);
    max-width: var(--ic-exchange-content-max, 1760px);
    position: relative;
    margin: 0 auto;
}

.ic-exchange-works__step {
    display: block;
    background: var(--ic-exchange-step-bg, #040d16);
    border: 1px solid var(--ic-exchange-step-border, rgba(197,169,94,0.18));
    border-radius: var(--ic-exchange-step-radius, 16px);
    padding: var(--ic-exchange-step-padding, 56px);
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    min-height: 520px;
}

.ic-exchange-works--hover-lift .ic-exchange-works__step:hover {
    transform: translateY(-4px);
    border-color: var(--ic-exchange-step-hover-border, rgba(197,169,94,0.35));
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

.ic-exchange-works__number {
    display: block;
    margin: 0 0 28px;
    color: rgba(197,169,94,0.22);
    font-size: var(--ic-exchange-number-size, 100px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.ic-exchange-works__step-main {
    min-width: 0;
}

.ic-exchange-works__step-title {
    margin: 0 0 24px;
    color: var(--ic-exchange-heading, #faf8f5);
    font-size: var(--ic-exchange-title-size, 28px);
    line-height: 1.2;
    font-weight: 600;
}

.ic-exchange-works__step-description {
    margin: 0;
    color: var(--ic-exchange-text, #c9c9c9);
    font-size: var(--ic-exchange-body-size, 17px);
    line-height: var(--ic-exchange-body-line-height, 1.7);
    max-width: 320px;
}

.ic-exchange-works--animate .ic-exchange-works__heading-wrap {
    opacity: 0;
    animation: icExchangeFadeUp var(--ic-exchange-animation-duration, 0.8s) ease-out var(--ic-exchange-animation-delay, 0s) forwards;
}

.ic-exchange-works--animate .ic-exchange-works__step {
    opacity: 0;
    animation: icExchangeFadeUp var(--ic-exchange-animation-duration, 0.8s) ease-out forwards;
}

.ic-exchange-works--animate .ic-exchange-works__step:nth-child(1) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.12s); }
.ic-exchange-works--animate .ic-exchange-works__step:nth-child(2) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.22s); }
.ic-exchange-works--animate .ic-exchange-works__step:nth-child(3) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.32s); }
.ic-exchange-works--animate .ic-exchange-works__step:nth-child(4) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.42s); }
.ic-exchange-works--animate .ic-exchange-works__step:nth-child(5) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.52s); }
.ic-exchange-works--animate .ic-exchange-works__step:nth-child(6) { animation-delay: calc(var(--ic-exchange-animation-delay, 0s) + 0.62s); }

@keyframes icExchangeFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
    .ic-exchange-works__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .ic-exchange-works {
        padding-top: var(--ic-exchange-pt-desktop, 128px);
        padding-bottom: var(--ic-exchange-pb-desktop, 128px);
    }

    .ic-exchange-works__container {
        width: min(var(--ic-exchange-container-max, 1800px), calc(100% - (var(--ic-exchange-side-desktop, 48px) * 2)));
    }

    .ic-exchange-works__heading {
        font-size: var(--ic-exchange-heading-size-desktop, 72px);
    }

    .ic-exchange-works__description {
        font-size: var(--ic-exchange-description-size-desktop, 21px);
    }

    .ic-exchange-works__grid {
        grid-template-columns: repeat(var(--ic-exchange-columns-desktop, 3), minmax(0, 1fr));
        gap: var(--ic-exchange-gap-desktop, 56px);
    }
}


/* Frontend-only scroll animation support */
.ic-exchange-works.ic-animate-on-scroll .ic-exchange-works__heading-wrap,
.ic-exchange-works.ic-animate-on-scroll .ic-exchange-works__step { animation-play-state: paused; }
.ic-exchange-works.ic-animate-on-scroll.is-visible .ic-exchange-works__heading-wrap,
.ic-exchange-works.ic-animate-on-scroll.is-visible .ic-exchange-works__step { animation-play-state: running; }
