/* ================================================================
   DESIGN STACKED SECTION — Home Page (v2)
   Stacking cards, vertical line benefit animation, no border/shadow
   ================================================================ */

/* ─── SECTION ──────────────────────────────────────────────── */
.design-stacked-section {
    position: relative;
    padding: var(--space-15) 0 var(--space-15);
    background: var(--creo-dark);
}

/* ─── STICKY HEADER ────────────────────────────────────────── */
.design-stacked-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.design-stacked-header .badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 106, 0, 0.12);
    color: var(--creo-accent);
    border: 1px solid rgba(255, 106, 0, 0.3);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-3);
}

.design-stacked-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--creo-white);
    margin-bottom: var(--space-3);
    line-height: 1.1;
}

.design-stacked-header .subtitle {
    max-width: 760px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.7;
    color: rgba(239, 229, 207, 0.75);
}

/* ─── STACKED CARDS CONTAINER ──────────────────────────────── */
.stacked-cards-container {
    position: relative;
}

/* Each wrapper is sticky so cards overlap on scroll */
.service-card-wrapper {
    position: sticky;
    top: 80px;
    z-index: 1;
    padding-bottom: 0;
    will-change: transform;
}

/* Each successive card overlaps the previous, leaving ~40px of the 
   previous image peeking out from below the active card */
.service-card-wrapper+.service-card-wrapper {
    margin-top: -40px;
}

/* Each card stacks higher z-index than the one before */
.service-card-wrapper:nth-child(1) {
    z-index: 1;
}

.service-card-wrapper:nth-child(2) {
    z-index: 2;
}

.service-card-wrapper:nth-child(3) {
    z-index: 3;
}

.service-card-wrapper:nth-child(4) {
    z-index: 4;
}

/* ─── THE CARD ─────────────────────────────────────────────── */
.service-card {
    background: var(--creo-dark);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
    min-height: 78vh;
    padding: var(--space-8);
    border: none;
    /* 20px border radius + soft shadow for the stacked card look */
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    position: relative;
}

/* ── CARD COLOR VARIANTS ───────────────────────────────────── */

/* Card 1 — Cream / Light */
.service-card--cream {
    background: var(--creo-light);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    color: var(--creo-dark) !important;
}

.service-card--cream h3,
.service-card--cream p,
.service-card--cream span,
.service-card--cream .card-desc,
.service-card--cream .benefit-text {
    color: var(--creo-dark) !important;
}

.service-card--cream .benefit-item.is-active .benefit-text,
.service-card--cream .benefit-item.is-done .benefit-text {
    color: var(--creo-dark) !important;
    opacity: 1;
}

.service-card--cream .benefit-text {
    /* pending state: slightly faded but still legible */
    opacity: 0.4;
}

.service-card--cream .pulsating-dot {
    background: rgba(11, 23, 61, 0.15);
    border-color: rgba(11, 23, 61, 0.2);
}

.service-card--cream .benefit-item.is-done .pulsating-dot,
.service-card--cream .benefit-item.is-active .pulsating-dot {
    background: var(--creo-dark);
    border-color: var(--creo-dark);
}

.service-card--cream .benefit-item.is-active .pulsating-dot::before {
    border-color: rgba(11, 23, 61, 0.5);
}

.service-card--cream .benefit-item.is-active .pulsating-dot::after {
    border-color: rgba(11, 23, 61, 0.25);
}

.service-card--cream .benefit-line {
    background: var(--creo-dark);
}

/* Card 2 — Blue (lighter than dark bg) */
.service-card--blue {
    background: #1e3a6e;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

/* Card 3 — Orange */
.service-card--orange {
    background: var(--creo-accent-hover);
    /* #FF6A00 */
    box-shadow: 0 12px 48px rgba(255, 106, 0, 0.3);
}

.service-card--orange .benefit-text {
    color: rgba(255, 255, 255, 0.4);
}

.service-card--orange .benefit-item.is-active .benefit-text,
.service-card--orange .benefit-item.is-done .benefit-text {
    color: var(--creo-white);
}

.service-card--orange .pulsating-dot {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.service-card--orange .benefit-item.is-done .pulsating-dot,
.service-card--orange .benefit-item.is-active .pulsating-dot {
    background: #fff;
    border-color: #fff;
}

.service-card--orange .benefit-item.is-active .pulsating-dot::before {
    border-color: rgba(255, 255, 255, 0.7);
}

.service-card--orange .benefit-item.is-active .pulsating-dot::after {
    border-color: rgba(255, 255, 255, 0.35);
}

.service-card--orange .benefit-line {
    background: rgba(255, 255, 255, 0.6);
}

/* Card 4 — White */
.service-card--white {
    background: var(--creo-white);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    color: var(--creo-dark) !important;
}

.service-card--white h3,
.service-card--white p,
.service-card--white span,
.service-card--white .card-desc,
.service-card--white .benefit-text {
    color: var(--creo-dark) !important;
}

.service-card--white .benefit-item.is-active .benefit-text,
.service-card--white .benefit-item.is-done .benefit-text {
    color: var(--creo-dark) !important;
    opacity: 1;
}

.service-card--white .benefit-text {
    /* pending state: faded but readable */
    opacity: 0.35;
}

.service-card--white .pulsating-dot {
    background: rgba(255, 106, 0, 0.15);
    border-color: rgba(255, 106, 0, 0.2);
}

.service-card--white .benefit-item.is-done .pulsating-dot,
.service-card--white .benefit-item.is-active .pulsating-dot {
    background: var(--creo-accent);
    border-color: var(--creo-accent);
}

.service-card--white .benefit-line {
    background: var(--creo-accent);
}

/* ─── CARD CONTENT (LEFT SIDE) ─────────────────────────────── */
.service-card__content {
    position: relative;
}

/* TEXT FADE OVERLAY: only the content side fades when covered */
.service-card__content-inner {
    transition: opacity 0.5s ease;
    opacity: 1;
}

.service-card-wrapper.is-covered .service-card__content-inner {
    opacity: 0.12;
}

.service-card__content h3 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--creo-white);
    margin-bottom: var(--space-3);
    line-height: 1.15;
}

.service-card__content p.card-desc {
    font-size: 17px;
    color: rgba(239, 229, 207, 0.75);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    max-width: 480px;
}

/* ─── BENEFIT LIST — SEQUENTIAL DOT + LINE ANIMATION ─────── */
.benefit-list {
    margin-top: var(--space-4);
    position: relative;
}

/* Each benefit entry: optional line above + item row */
.benefit-entry {
    display: flex;
    flex-direction: column;
}

/* The growing vertical line between entries */
.benefit-line {
    width: 2px;
    height: 0;
    background: var(--creo-accent);
    margin-left: 7px;
    /* centers on the 16px dot */
    transition: height 0.45s ease;
}

.benefit-line.is-grown {
    height: 24px;
}

/* Each row: dot connector + text */
.benefit-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Dot connector wrapper */
.benefit-item-connector {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
}

/* ── THE DOT ──────────────────────────────────────────────── */
.pulsating-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    /* Default: pending / dim */
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    transition: width 0.3s ease, height 0.3s ease,
        background 0.3s ease, border-color 0.3s ease,
        margin 0.3s ease;
}

/* DONE state: small, solid orange, no pulse */
.benefit-item.is-done .pulsating-dot {
    width: 10px;
    height: 10px;
    background: var(--creo-accent);
    border-color: var(--creo-accent);
}

/* ACTIVE state: bigger, bright orange, URGENT double ring */
.benefit-item.is-active .pulsating-dot {
    width: 16px;
    height: 16px;
    background: var(--creo-accent);
    border-color: var(--creo-accent);
}

/* Inner urgent ring */
.benefit-item.is-active .pulsating-dot::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 106, 0, 0.7);
    animation: urgent-pulse 1s ease-out infinite;
}

/* Outer urgent ring (offset delay for double pulse effect) */
.benefit-item.is-active .pulsating-dot::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 106, 0, 0.35);
    animation: urgent-pulse 1s ease-out 0.22s infinite;
}

@keyframes urgent-pulse {
    0% {
        transform: scale(0.75);
        opacity: 1;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* ── THE TEXT ─────────────────────────────────────────────── */
.benefit-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    padding: 5px 0;
    /* Default: dim / pending */
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.4s ease;
}

/* Active or done: full white */
.benefit-item.is-active .benefit-text,
.benefit-item.is-done .benefit-text {
    color: var(--creo-white);
    font-weight: 500;
}

/* ─── VISUAL SIDE (RIGHT) ──────────────────────────────────── */
.service-card__visual {
    position: relative;
    height: 380px;
    border-radius: 14px;
    overflow: visible;
}

.service-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.55s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* Stacking image: covered image scales and peeks from behind */
.service-card-wrapper.is-covered .service-card__visual img {
    transform: scale(0.88) translateY(48px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    border-radius: 14px;
}

/* ─── NAVIGATION CONTROLS ──────────────────────────────────── */
.card-controls {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--creo-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--creo-accent);
    background: rgba(11, 23, 61, 0.7);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: var(--transition-base);
}

.control-btn:hover {
    background: var(--creo-accent);
    color: var(--creo-white);
    transform: scale(1.08);
}

/* ─── TRANSITION FOOTER — WORD REVEAL ──────────────────────── */
.design-stacked-transition {
    /* Close to the last card, not way down */
    margin-top: var(--space-8);
    padding: var(--space-12) 0 var(--space-8);
    text-align: center;
    position: relative;
}

/* The large subtitle text */
.reveal-text {
    font-family: var(--font-body);
    /* Roboto */
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 500;
    line-height: 1.55;
    max-width: 860px;
    margin: 0 auto var(--space-8);
    /* Each word starts slightly darker than the background */
}

/* Each word is a span injected by JS */
.reveal-text .word {
    display: inline;
    /* Start color: just one tone above --creo-dark — barely visible */
    color: rgba(255, 255, 255, 0.08);
    transition: color 0.5s ease;
}

/* When the word is revealed by scroll */
.reveal-text .word.is-lit {
    color: var(--creo-light);
}

/* The CTA button, hidden until all words are lit */
.reveal-btn {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.reveal-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ─── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .service-card {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: var(--space-6);
        padding: var(--space-6) var(--space-4);
    }

    .service-card__visual {
        height: 300px;
        order: -1;
    }

    .service-card-wrapper {
        position: relative;
        top: unset;
    }
}

@media (max-width: 768px) {
    .design-stacked-header h2 {
        font-size: 2rem;
    }

    .card-controls {
        display: none;
    }
}