body {
    margin: 0;
    padding: 0;
    background-color: #020617;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* --- Accordion Section Styles --- */
.services-accordion-section {
    padding: 80px 5%;
    background-color: #020617;
}

.label-small {
    color: #a855f7;
}

.huge-header-text {
    font-size: 6rem;
    line-height: 0.85;
    text-transform: uppercase;
    margin: 0;
    color: #f5f5f7;
}

.accordion-container {
    border-top: 1px solid #333;
    margin-top: 40px;
}

.accordion-item {
    position: relative;
    border-bottom: 1px solid #333;
    overflow: hidden;
    transition: height 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    height: 160px;
}

.accordion-item.active {
    height: 440px; 
}

/* Background Number Scaling */
.item-number {
    position: absolute;
    left: 2%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #333;
    font-weight: 700;
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
    pointer-events: none;
}

.item-number span {
    color: #a855f7;
}

.accordion-item.active .item-number {
    font-size: 6rem; 
    top: 25%;
    color: #1a1a1a;
}

/* Collapsed Title */
.item-trigger {
    display: flex;
    align-items: center;
    height: 160px;
    padding-left: 62%; 
    cursor: pointer;
}

.item-title-collapsed {
    font-size: 2rem;
    font-weight: 500;
    translate: -40px;
    margin: 0;
    white-space: nowrap;
    /* Fades out over 1.2s to match the card opening */
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 1;
}

.accordion-item.active .item-title-collapsed {
    opacity: 0;
}

/* Expanded Content */
.item-expanded-content {
    opacity: 0;
    height: 100%;
    display: flex;
    align-items: center;
    /* Fades in smoothly to match the handoff */
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 5%;
    box-sizing: border-box;
    pointer-events: none;
}

.accordion-item.active .item-expanded-content {
    opacity: 1;
    pointer-events: auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    width: 100%;
    align-items: center;
    z-index: 2;
}

/* Image shifts 40px left and scales from 20% to 100% */
.content-image {
    display: flex;
    justify-content: flex-end;
    padding-right: 40px; 
    transition: padding 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.content-image img {
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    height: 300px;
    object-fit: cover;
    /* START AT 20% SIZE */
    transform: scale(0.2); 
    /* SMOOTH 1.2s ANIMATION */
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.accordion-item.active .content-image img {
    transform: scale(1);
}

.content-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-text h2 {
    font-size: 3.5rem;
    line-height: 1;
    margin: 0 0 10px 0;
}

.content-text p {
    font-size: 1.1rem;
    color: #999;
    max-width: 380px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag-cloud span {
    border: 1px solid #333;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #aaa;
}

.process-label {
    color: #a855f7;
}

/* --- Horizontal Scroll Section --- */
.horizontal-wrapper { height: 400vh; position: relative; margin-top: 100px; }
.sticky-container { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; display: flex; align-items: center; }
.scroll-content { display: flex; padding-left: 5%; will-change: transform; }
.section-header { min-width: 500px; position: relative; }
.huge-text { font-size: 6rem; line-height: 0.9; text-transform: uppercase; margin: 0; }
.step-card { min-width: 400px; height: 80vh; border-left: 1px solid #333; border-bottom: 1px solid #333; border-top: 1px solid #333; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.step-num { color: #a855f7; font-weight: bold; font-size: 1.2rem; }
.step-text h3 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 500; }
.step-text p { color: #aaa; font-size: 1.1rem; line-height: 1.5; }

/* --- Responsive Styles --- */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .huge-header-text {
        font-size: 4.5rem;
    }

    .accordion-item {
        height: 140px;
    }

    .accordion-item.active {
        height: 400px;
    }

    .item-number {
        font-size: 1.5rem;
    }

    .accordion-item.active .item-number {
        font-size: 4.5rem;
    }

    .item-title-collapsed {
        font-size: 1.8rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .content-image {
        padding-right: 0;
        justify-content: center;
    }

    .content-image img {
        max-width: 400px;
    }

    .content-text h2 {
        font-size: 2.5rem;
    }

    .content-text p {
        font-size: 1rem;
    }

    .huge-text {
        font-size: 4.5rem;
    }

    .step-text h3 {
        font-size: 2.5rem;
    }

    .step-text p {
        font-size: 1rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .services-accordion-section {
        padding: 60px 3%;
    }

    .huge-header-text {
        font-size: 3rem;
        line-height: 1;
    }

    .label-small {
        font-size: 0.9rem;
    }

    .accordion-container {
        margin-top: 30px;
    }

    .accordion-item {
        height: 120px;
    }

    .accordion-item.active {
        height: auto;
        min-height: 500px;
        padding-bottom: 20px;
    }

    .item-number {
        font-size: 1.2rem;
        left: 5%;
    }

    .accordion-item.active .item-number {
        font-size: 3rem;
        top: 15%;
    }

    .item-trigger {
        height: 120px;
        padding-left: 25%;
    }

    .item-title-collapsed {
        font-size: 1.3rem;
        translate: 0;
    }

    .item-expanded-content {
        padding: 20px 5%;
        position: relative;
        margin-top: 20px;
    }

    .content-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .content-image {
        order: 2;
    }

    .content-text {
        order: 1;
    }

    .content-image img {
        max-width: 100%;
        height: 200px;
    }

    .content-text h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .content-text p {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .tag-cloud {
        gap: 8px;
        margin-top: 15px;
    }

    .tag-cloud span {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    /* Horizontal scroll becomes vertical stack on mobile */
    .horizontal-wrapper {
        height: auto;
        margin-top: 60px;
    }

    .sticky-container {
        position: relative;
        height: auto;
    }

    .scroll-content {
        flex-direction: column;
        padding-left: 3%;
        padding-right: 3%;
    }

    .section-header {
        min-width: 100%;
        margin-bottom: 30px;
    }

    .huge-text {
        font-size: 3rem;
        line-height: 1;
    }

    .process-label {
        font-size: 0.9rem;
    }

    .step-card {
        min-width: 100%;
        height: auto;
        min-height: auto;
        border-left: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .step-num {
        font-size: 1rem;
    }

    .step-text h3 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .step-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .services-accordion-section {
        padding: 40px 5%;
    }

    .huge-header-text {
        font-size: 2.2rem;
    }

    .accordion-item {
        height: 100px;
    }

    .accordion-item.active {
        min-height: 450px;
    }

    .item-number {
        font-size: 1rem;
    }

    .accordion-item.active .item-number {
        font-size: 2.5rem;
    }

    .item-trigger {
        height: 100px;
        padding-left: 20%;
    }

    .item-title-collapsed {
        font-size: 1.1rem;
    }

    .content-text h2 {
        font-size: 1.6rem;
    }

    .content-text p {
        font-size: 0.9rem;
    }

    .tag-cloud span {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .huge-text {
        font-size: 2.2rem;
    }

    .step-text h3 {
        font-size: 1.6rem;
    }

    .step-text p {
        font-size: 0.9rem;
    }

    .step-card {
        padding: 25px 15px;
    }
}