/* ==========================================================================
   ENGAGEMENT MODEL PAGE CSS
   ========================================================================== */

/* --- Philosophy Strip Animation --- */
.philosophy-strip {
    overflow: hidden;
}
.word-anim {
    display: inline-block;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.philosophy-text.in-view .word-anim {
    opacity: 1;
    transform: translateX(0);
}
/* Staggering using child selector (up to 40 words) */
.philosophy-text.in-view .word-anim:nth-child(1) { transition-delay: 0.1s; }
.philosophy-text.in-view .word-anim:nth-child(2) { transition-delay: 0.2s; }
.philosophy-text.in-view .word-anim:nth-child(3) { transition-delay: 0.3s; }
.philosophy-text.in-view .word-anim:nth-child(4) { transition-delay: 0.4s; }
.philosophy-text.in-view .word-anim:nth-child(5) { transition-delay: 0.5s; }
.philosophy-text.in-view .word-anim:nth-child(6) { transition-delay: 0.6s; }
.philosophy-text.in-view .word-anim:nth-child(7) { transition-delay: 0.7s; }
.philosophy-text.in-view .word-anim:nth-child(8) { transition-delay: 0.8s; }
.philosophy-text.in-view .word-anim:nth-child(9) { transition-delay: 0.9s; }
.philosophy-text.in-view .word-anim:nth-child(10) { transition-delay: 1.0s; }
.philosophy-text.in-view .word-anim:nth-child(11) { transition-delay: 1.1s; }
.philosophy-text.in-view .word-anim:nth-child(12) { transition-delay: 1.2s; }
.philosophy-text.in-view .word-anim:nth-child(13) { transition-delay: 1.3s; }
.philosophy-text.in-view .word-anim:nth-child(14) { transition-delay: 1.4s; }
.philosophy-text.in-view .word-anim:nth-child(15) { transition-delay: 1.5s; }
.philosophy-text.in-view .word-anim:nth-child(16) { transition-delay: 1.6s; }
.philosophy-text.in-view .word-anim:nth-child(17) { transition-delay: 1.7s; }
.philosophy-text.in-view .word-anim:nth-child(18) { transition-delay: 1.8s; }
.philosophy-text.in-view .word-anim:nth-child(19) { transition-delay: 1.9s; }
.philosophy-text.in-view .word-anim:nth-child(20) { transition-delay: 2.0s; }
.philosophy-text.in-view .word-anim:nth-child(21) { transition-delay: 2.1s; }
.philosophy-text.in-view .word-anim:nth-child(22) { transition-delay: 2.2s; }
.philosophy-text.in-view .word-anim:nth-child(23) { transition-delay: 2.3s; }
.philosophy-text.in-view .word-anim:nth-child(24) { transition-delay: 2.4s; }
.philosophy-text.in-view .word-anim:nth-child(25) { transition-delay: 2.5s; }
.philosophy-text.in-view .word-anim:nth-child(26) { transition-delay: 2.6s; }
.philosophy-text.in-view .word-anim:nth-child(27) { transition-delay: 2.7s; }
.philosophy-text.in-view .word-anim:nth-child(28) { transition-delay: 2.8s; }
.philosophy-text.in-view .word-anim:nth-child(29) { transition-delay: 2.9s; }
.philosophy-text.in-view .word-anim:nth-child(30) { transition-delay: 3.0s; }
.philosophy-text.in-view .word-anim:nth-child(31) { transition-delay: 3.1s; }
.philosophy-text.in-view .word-anim:nth-child(32) { transition-delay: 3.2s; }
.philosophy-text.in-view .word-anim:nth-child(33) { transition-delay: 3.3s; }
.philosophy-text.in-view .word-anim:nth-child(34) { transition-delay: 3.4s; }
.philosophy-text.in-view .word-anim:nth-child(35) { transition-delay: 3.5s; }
.philosophy-text.in-view .word-anim:nth-child(36) { transition-delay: 3.6s; }
.philosophy-text.in-view .word-anim:nth-child(37) { transition-delay: 3.7s; }
.philosophy-text.in-view .word-anim:nth-child(38) { transition-delay: 3.8s; }
.philosophy-text.in-view .word-anim:nth-child(39) { transition-delay: 3.9s; }
.philosophy-text.in-view .word-anim:nth-child(40) { transition-delay: 4.0s; }
.philosophy-text.in-view .word-anim:nth-child(41) { transition-delay: 4.1s; }
.philosophy-text.in-view .word-anim:nth-child(42) { transition-delay: 4.2s; }
.philosophy-text.in-view .word-anim:nth-child(43) { transition-delay: 4.3s; }
.philosophy-text.in-view .word-anim:nth-child(44) { transition-delay: 4.4s; }
.philosophy-text.in-view .word-anim:nth-child(45) { transition-delay: 4.5s; }
.philosophy-text.in-view .word-anim:nth-child(46) { transition-delay: 4.6s; }
.philosophy-text.in-view .word-anim:nth-child(47) { transition-delay: 4.7s; }
.philosophy-text.in-view .word-anim:nth-child(48) { transition-delay: 4.8s; }
.philosophy-text.in-view .word-anim:nth-child(49) { transition-delay: 4.9s; }
.philosophy-text.in-view .word-anim:nth-child(50) { transition-delay: 5.0s; }

/* --- Engagement Cards --- */
.btn-toggle-tiers {
    background: #f1f5f9;
    border: none;
    border-radius: 50px;
    display: inline-flex;
    padding: 5px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.btn-toggle-tiers span {
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-mid);
    transition: all 0.3s ease;
}
.btn-toggle-tiers span.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-top: 50px;
}
.tier-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}
.tier-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.tier-head {
    padding: 30px 25px;
    border-top: 5px solid;
    background: #f8fafc;
    text-align: center;
}
.tier-head h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
}
.tier-head p {
    font-size: 14px;
    color: var(--text-mid);
    margin: 0;
    font-weight: 600;
}
.tier-body {
    padding: 30px 25px;
    flex: 1;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.tier-body.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tier-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tier-list li {
    font-size: 15px;
    color: var(--text-mid);
    margin-bottom: 20px;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}
.tier-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--navy);
    font-weight: bold;
}
.view-bestfor p {
    font-size: 15px;
    color: var(--text-mid);
    line-height: 1.6;
}
.view-bestfor strong {
    color: var(--navy);
    display: block;
    margin-bottom: 5px;
}

@media (max-width: 991px) {
    .tiers-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* --- Process Flow --- */
.process-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}
.process-line {
    position: absolute;
    top: 35px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}
.process-wrapper.in-view .process-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--blue);
    width: 0;
    animation: drawLine 1s ease 0.8s forwards;
}
@keyframes drawLine {
    to { width: 100%; }
}
.process-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 30%;
}
.ps-circle {
    width: 70px;
    height: 70px;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 8px #F7F9FC;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.process-wrapper.in-view .process-step:nth-child(2) .ps-circle { transition-delay: 0.1s; transform: scale(1); }
.process-wrapper.in-view .process-step:nth-child(3) .ps-circle { transition-delay: 0.4s; transform: scale(1); }
.process-wrapper.in-view .process-step:nth-child(4) .ps-circle { transition-delay: 0.7s; transform: scale(1); }

.ps-content {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.process-wrapper.in-view .process-step:nth-child(2) .ps-content { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.process-wrapper.in-view .process-step:nth-child(3) .ps-content { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.process-wrapper.in-view .process-step:nth-child(4) .ps-content { transition-delay: 0.9s; opacity: 1; transform: translateY(0); }

.ps-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
}
.ps-desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .process-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
    }
    .process-line {
        top: 0;
        bottom: 0;
        left: 55px;
        width: 2px;
        height: auto;
    }
    .process-wrapper.in-view .process-line::after {
        width: 100%;
        height: 0;
        animation: drawLineVert 1s ease 0.8s forwards;
    }
    @keyframes drawLineVert {
        to { height: 100%; }
    }
    .process-step {
        width: 100%;
        display: flex;
        text-align: left;
        margin-bottom: 40px;
    }
    .process-step:last-child {
        margin-bottom: 0;
    }
    .ps-circle {
        margin: 0 25px 0 0;
        flex-shrink: 0;
    }
    .ps-content {
        padding-top: 10px;
    }
}

/* --- Framework Badges --- */
.framework-badges-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}
.fw-badge {
    position: relative;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}
.fw-badge:hover {
    transform: scale(1.05);
}
.fw-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--navy);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 10;
    pointer-events: none;
}
.fw-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--navy) transparent transparent transparent;
}
.fw-tooltip span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
.fw-badge:hover .fw-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .framework-badges-row {
        gap: 10px;
    }
    .fw-badge {
        width: calc(33.333% - 10px);
        padding: 10px 5px;
        font-size: 13px;
    }
    .fw-tooltip {
        display: none;
    }
}
@media (max-width: 480px) {
    .fw-badge {
        width: calc(50% - 10px);
    }
}

/* --- FAQ Accordion --- */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 5px;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
}
.faq-icon {
    color: var(--blue);
    transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
}
.faq-answer {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}
.faq-answer p {
    padding: 0 0 20px 0;
    margin: 0;
    font-size: 15px;
    color: var(--text-mid);
    line-height: 1.6;
}
