/**
 * Homepage two-tone headings + Core Services 3D char flip.
 * Early words: blue/navy. Last 1–2 words: gold.
 */

/* ---------- Two-tone (Core Services / Projects / About) ---------- */
.heading-two-tone {
    color: var(--navy-800, #13285A);
}

.heading-two-tone .heading-tone-blue {
    color: var(--navy-800, #13285A);
}

.heading-two-tone .heading-tone-gold {
    color: var(--gold-500, #F5A623);
}

/* About label was solid gold — tone spans own colour */
.about-us-section .acc-about-body .acc-sub.heading-two-tone,
.about-us-section .acc-about-body .acc-sub .heading-tone-blue {
    color: var(--navy-800, #13285A);
}

.about-us-section .acc-about-body .acc-sub .heading-tone-gold {
    color: var(--gold-500, #F5A623);
}

.about-us-section .acc-about-body .acc-title.heading-two-tone,
.about-us-section .acc-about-body .acc-title .heading-tone-blue {
    color: var(--navy-800, #13285A);
}

.about-us-section .acc-about-body .acc-title .heading-tone-gold {
    color: var(--gold-500, #F5A623);
}

.acc-projects .acc-head .acc-title.heading-two-tone,
.acc-projects .acc-head .acc-title .heading-tone-blue {
    color: var(--navy-800, #13285A);
}

.acc-projects .acc-head .acc-title .heading-tone-gold {
    color: var(--gold-500, #F5A623);
}

/* ---------- Flip wrap (Core Services h2 only) ---------- */
.flip-wrap {
    display: flex;
    flex-wrap: wrap;
    perspective: 800px;
}

.flip-wrap .flip-word,
.flip-wrap .flip-space {
    display: inline-block;
}

.flip-wrap .flip-word > span,
.flip-wrap .flip-space {
    display: inline-block;
    opacity: 0;
    transform: rotateX(90deg) translateY(20px);
    transform-origin: bottom center;
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1);
    color: inherit;
    -webkit-text-fill-color: currentColor;
}

.flip-wrap.in .flip-word > span,
.flip-wrap.in .flip-space {
    opacity: 1;
    transform: rotateX(0) translateY(0);
}

/* Hide until .in so unwrapped CMS text does not flash before JS wraps chars */
.core-services-section:not(.core-services-anim-reduced) .core-services__heading:not(.in) {
    opacity: 0;
}

.core-services-section .core-services__heading.in {
    opacity: 1;
}

/* Keep centered layout when heading becomes a flex row of words/chars */
.core-services-section .core-services__heading.flip-wrap {
    justify-content: center;
    background-image: none;
    color: var(--navy-800, #13285A);
    -webkit-text-fill-color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
    .core-services-section .core-services__heading:not(.in),
    .core-services-section .core-services__heading.in {
        opacity: 1 !important;
    }

    .flip-wrap .flip-word > span,
    .flip-wrap .flip-space {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
