/* TRUJILLO â€” HOME */

/* HERO */

.home-hero--immersive {
    position: relative;
    isolation: isolate;
    padding: 0;
    background: #21182a;
    color: #fff;
}

.home-hero--immersive .home-hero__grid {
    position: static;
    display: flex;
    align-items: center;
    min-height: 720px;
    min-height: min(820px, 90svh);
    gap: 0;
}

.home-hero--immersive .home-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 100px 0 150px;
    pointer-events: none;
}

.home-hero--immersive .home-hero__content a {
    pointer-events: auto;
}

.home-hero--immersive h1 {
    max-width: 100%;
    margin: 0 0 28px;
    color: #fff;
    font-size: clamp(48px, 5.2vw, 80px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: initial;
}

.home-hero--immersive h1 > span {
    display: block;
}

.home-hero--immersive .home-hero__content > p {
    max-width: 480px;
    margin: 0 0 36px;
    color: #fff;
    font-size: 18px;
    line-height: 1.6;
}

.home-hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-hero--immersive .button--primary {
    border: 1px solid #fff;
    background: #fff;
    color: #531080;
}

.home-hero--immersive .button--primary:hover {
    background: #eee7f3;
    border-color: #eee7f3;
}

.home-hero--immersive .button--secondary {
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: transparent;
    color: #fff;
}

.home-hero--immersive .button--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.home-hero--immersive .home-hero__scroll {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 46px;
    margin-top: 40px;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
}

.home-hero--immersive .home-hero__project {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
}

.home-hero--immersive .home-hero__project img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
    transition: transform 0.6s ease;
}

.home-hero--immersive .home-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(18, 12, 24, 0.86) 0%,
            rgba(18, 12, 24, 0.58) 45%,
            rgba(18, 12, 24, 0.12) 100%
        ),
        linear-gradient(
            0deg,
            rgba(18, 12, 24, 0.65),
            transparent 35%
        );
}

.home-hero--immersive .home-hero__project-info {
    position: absolute;
    right: 80px;
    bottom: 36px;
    left: auto;
    display: flex;
    flex-direction: column;
    max-width: 280px;
    font-size: 13px;
    line-height: 1.45;
}

.home-hero__project-info strong {
    margin-bottom: 3px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
}

.home-hero--immersive .home-hero__project-arrow {
    position: absolute;
    right: 32px;
    bottom: 36px;
    font-size: 22px;
    transition: transform 0.2s ease;
}

.home-hero__project:hover .home-hero__project-arrow {
    transform: translateX(5px);
}

.home-hero--immersive a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 5px;
}

/* CARRUSEL */

.home-hero--immersive .home-hero__slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
}

.home-hero--immersive .home-hero__slide.is-active {
    opacity: 1;
    pointer-events: none;
}

.home-hero--immersive .home-hero__slide.is-active .home-hero__project-info,
.home-hero--immersive .home-hero__slide.is-active .home-hero__project-arrow {
    pointer-events: auto;
}

.home-hero--immersive .home-hero__controls {
    position: absolute;
    z-index: 3;
    left: max(24px, calc((100% - var(--container)) / 2));
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.home-hero--immersive .home-hero__controls[hidden] {
    display: none;
}

.home-hero--immersive .home-hero__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0;
    background: rgba(18, 12, 24, 0.45);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.home-hero--immersive .home-hero__control:hover {
    background: rgba(18, 12, 24, 0.75);
}

.home-hero--immersive .home-hero__control:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.home-hero--immersive .home-hero__counter {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .home-hero--immersive .home-hero__grid {
        min-height: 680px;
    }

    .home-hero--immersive .home-hero__content {
        padding: 80px 0 200px;
    }

    .home-hero--immersive .home-hero__scroll {
        display: none;
    }

    .home-hero--immersive .home-hero__project-info {
        right: auto;
        bottom: 28px;
        left: 24px;
        max-width: calc(100% - 100px);
    }

    .home-hero--immersive .home-hero__project-arrow {
        right: 24px;
        bottom: 28px;
    }

    .home-hero--immersive .home-hero__controls {
        bottom: 108px;
    }
}

@media (max-width: 600px) {
    .home-hero--immersive .home-hero__grid {
        min-height: 640px;
    }

    .home-hero--immersive .home-hero__content {
        padding: 64px 0 200px;
    }

    .home-hero--immersive h1 {
        font-size: clamp(36px, 8.5vw, 50px);
    }

    .home-hero--immersive .home-hero__content > p {
        font-size: 16px;
    }

    .home-hero--immersive .home-hero__actions {
        align-items: stretch;
        flex-direction: column;
        max-width: 320px;
    }

    .home-hero--immersive .home-hero__overlay {
        background: linear-gradient(
            90deg,
            rgba(18, 12, 24, 0.85),
            rgba(18, 12, 24, 0.5)
        );
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero--immersive .home-hero__project img {
        transition: none;
        transform: none;
    }

    .home-hero--immersive .home-hero__slide {
        transition: none;
    }
}

/* PROJECTES DESTACATS */

.featured-projects {
    padding: 100px 0 120px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr 0.8fr;
    grid-template-rows: 340px 340px;
    gap: 24px;
}

.project-card {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
}

.project-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.project-card:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1;
}

.project-card:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2;
}

.project-card:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

.project-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.025);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background:
    linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.08) 48%,
    rgba(0, 0, 0, 0) 70%
    );
}

.project-card__info {
    position: absolute;
    left: 22px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.45;
}

.project-card__info strong {
    margin-bottom: 3px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
}

.project-card__arrow {
    position: absolute;
    right: 22px;
    bottom: 22px;
    font-size: 20px;
    transition: transform 0.2s ease;
}

.project-card:hover .project-card__arrow {
    transform: translateX(5px);
}

@media (max-width: 900px) {
    .featured-projects {
        padding: 80px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .project-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .project-card {
        min-height: 340px;
    }
}

/* DESTACATS Â· ADAPTACIÃ“ A 1, 2 O 3 PROJECTES */

@media (min-width: 901px) {
    .projects-grid:has(> .project-card:only-child),
    .projects-grid:has(> .project-card:nth-child(2):last-child) {
        grid-template-rows: 340px;
    }

    .projects-grid > .project-card:only-child {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .projects-grid > .project-card:nth-child(3):last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .projects-grid {
        grid-auto-rows: 320px;
    }

    .projects-grid > .project-card:only-child,
    .projects-grid > .project-card:nth-child(3):last-child {
        grid-column: 1 / -1;
    }
}
/* SERVEIS I EMPRESA */

.home-services {
    padding: 100px 0;
    background: var(--color-bg-soft);
}

.home-services__heading {
    margin-bottom: 56px;
}

.home-services__heading h2 {
    margin-bottom: 16px;
}

.home-services__heading p {
    margin: 0 0 24px;
    font-size: 14px;
}

.home-services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 48px;
}

.home-services__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border: 1px solid var(--color-purple);
    border-radius: 50%;
    color: var(--color-purple);
    font-size: 14px;
    line-height: 1;
}

.home-services__item h3 {
    margin-bottom: 8px;
}

.home-services__item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .home-services {
        padding: 72px 0;
    }

    .home-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .home-services__heading {
        margin-bottom: 40px;
    }

    .home-services__grid {
        grid-template-columns: 1fr;
    }
}

.home-company {
    padding: 100px 0;
}

.home-company__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 64px;
}

.home-company__content h2 {
    max-width: 460px;
    margin-bottom: 20px;
}

.home-company__content p {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
}

.home-company__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (max-width: 800px) {
    .home-company {
        padding: 72px 0;
    }

    .home-company__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}