/* --- Hero --- */
.home-hero {
    color: #ffffff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.home-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.home-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 10, 30, 0.6);
    z-index: 1;
}

.home-hero .container {
    position: relative;
    z-index: 2;
}

.home-hero h1 {
    font-size: clamp(2.25rem, 7vw, 4rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

.home-hero p {
    font-size: 1.1rem;
    max-width: 600px;
    color: #dcdcdc;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.home-hero__icons {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.home-hero__icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
    font-weight: 600;
    color: #ffffff;
}

.home-icon-circle {
    background: #ffffff;
    border: 3px solid var(--cre-teal);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.home-icon-circle img {
    width: 120px;
    height: 120px;
}

/* --- Services --- */
.home-services {
    background-color: #dfcadd;
    padding: 60px 0;
    text-align: center;
}

.home-services h2 {
    color: var(--cre-purple);
    margin-bottom: 40px;
    font-size: 2rem;
}

.home-services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.home-service-item {
    color: var(--cre-purple);
    font-weight: 600;
}

.home-service__icon {
    margin-bottom: 15px;
}

.home-service__icon img {
    width: 120px;
    height: 120px;
}

/* --- Portfolio --- */
.home-portfolio {
    background-color: var(--cre-purple);
    padding: 80px 0;
    color: #ffffff;
}

.home-portfolio__content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.home-portfolio__text {
    flex: 1;
}

.home-portfolio__text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.home-portfolio__grid {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.home-portfolio__item {
    background-color: var(--cre-purple);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid var(--cre-teal);
}

.home-portfolio__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.home-portfolio__item:hover img {
    transform: scale(1.05);
}

/* --- Process --- */
.home-process {
    padding: 80px 0;
    background-color: #ffffff;
    text-align: center;
    background-image: url('/assets/images/mountain_bg.jpg');
    background-repeat: no-repeat;
    background-position: bottom center;
}

.home-process__timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

.home-process__timeline::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--cre-purple);
    z-index: 1;
}

.home-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    overflow: visible;
}

.home-step__number {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    border: 4px solid var(--cre-teal);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--cre-teal);
    margin-bottom: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.home-step.is-active .home-step__number {
    background-color: #ffffff;
    color: var(--cre-purple);
}

.home-process__needle {
    position: absolute;
    top: 0;
    left: 0;
    height: 120px;
    width: auto;
    padding-left: 20px;
    z-index: 3;
    transition: left 0.8s ease, top 0.8s ease;
    pointer-events: none;
}

.home-process__needle.is-stitching {
    animation: stitch 1.2s linear forwards;
}

@keyframes stitch {
    0%   { transform: translate(0, 0); }
    10%  { transform: translate(20px, -10px); }
    20%  { transform: translate(40px, 10px); }
    30%  { transform: translate(60px, -10px); }
    40%  { transform: translate(80px, 10px); }
    50%  { transform: translate(100px, -10px); }
    60%  { transform: translate(80px, 10px); }
    70%  { transform: translate(60px, -10px); }
    80%  { transform: translate(40px, 10px); }
    90%  { transform: translate(20px, -10px); }
    100% { transform: translate(0, 0); }
}

.home-step__title {
    font-weight: 800;
    color: var(--cre-text);
    font-size: 1.1rem;
}

/* --- Testimonial --- */
.home-testimonial {
    padding: 40px 0;
    text-align: center;
    font-style: italic;
    color: var(--cre-purple);
    background-color: #ffffff;
}

/* --- Responsive --- */
@media (max-width: 413px) {
    .home-hero h1 {
        font-size: 2.25rem;
    }

    .home-hero__icons {
        justify-content: space-around;
        gap: 10px;
        width: 100%;
    }

    .home-hero__icon {
        flex: 1;
        width: auto;
    }

    .home-portfolio__content {
        flex-direction: column;
    }

    .home-portfolio__grid {
        display: block;
        position: relative;
    }

    .home-portfolio__item {
        display: none;
        max-width: 400px;
        margin: 0 auto;
    }

    .home-portfolio__item.is-visible {
        display: block;
        animation: portfolioFade 0.5s ease;
    }

    @keyframes portfolioFade {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    .home-process {
        background-position: center center;
    }

    .home-process__timeline {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .home-process__timeline::before {
        display: none;
    }

    .home-process__needle {
        height: 120px;
    }
}

@media (min-width: 414px) and (max-width: 768px) {
    .home-hero h1 {
        font-size: 2.25rem;
    }

    .home-hero__icons {
        justify-content: space-around;
        gap: 10px;
        width: 100%;
    }

    .home-hero__icon {
        flex: 1;
        width: auto;
    }

    .home-portfolio__content {
        flex-direction: column;
    }

    .home-portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-portfolio__item:nth-child(n+5) {
        display: none;
    }

    .home-process {
        background-position: center center;
    }

    .home-process__timeline {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .home-process__timeline::before {
        display: none;
    }

    .home-process__needle {
        height: 120px;
    }
}
