/* Home page */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    min-height: 100dvh;
    max-height: 900px;
    padding: 101px 0;
    background-color: var(--dark-blue);
}

@media (min-width: 2560px) {
    .hero {
        min-height: 50dvh;
    }
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-content h1 {
    color: var(--white);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-buttons .btn-outline.btn-bg-blue {
    background: transparent;
}

.hero-buttons .btn-outline.btn-bg-blue:hover {
    background: var(--dark-blue-02);
}

@media (min-width: 576px) {
    .hero {
        text-align: center;
    }

    .hero-content {
        gap: 0px;
    }

    .hero-content h1 {
        max-width: 1000px;
        margin: 0 auto;
        margin-bottom: 42px;
    }

    .hero-content p {
        max-width: 613px;
        margin: 0 auto;
        margin-bottom: 32px;
    }

    .hero-buttons {
        justify-content: center;
    }
}

.what-we-do-section-home, .trusted-by-section-home, .case-studies-section-home, .our-values-section-home, .blog-posts-section-home {
    padding-bottom: 64px;
}

.introduction-section {
    min-height: 500px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 64px 0;
    position: relative;
}

.introduction-section .introduction-content {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 710px;
    text-align: center;
    align-items: center;
    gap: 28px;
}

.introduction-section .introduction-content .caption-bold {
    color: var(--blue);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .introduction-section {
        padding-top: 128px;
        padding-bottom: 128px;
    }

    .our-values-section-home .introduction-section {
        padding-bottom: 64px;
    }
}

@media (min-width: 992px) {
    .introduction-section {
        padding-top: 170px;
        padding-bottom: 170px;
    }

    .our-values-section-home .introduction-section {
        padding-bottom: 64px;
    }
}

@media (max-width: 991.98px) {
    .introduction-section {
        min-height: auto;
    }
}

.introduction-section .introduction-content .introduction-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.introduction-section::before, .introduction-section::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 52.7px;
    background: url('../assets/imgs/plus-icon.svg') no-repeat center;
    background-size: contain;
    display: none;
    transform: rotate(0deg);
    transition: transform 1.2s ease-out;
}

.introduction-section.is-visible::before {
    transform: rotate(180deg);
}

.introduction-section.is-visible::after {
    transform: rotate(-180deg);
}

@media (min-width: 1200px) {
    .introduction-section::before, .introduction-section::after {
        display: block;
    }

    .introduction-section::before {
        top: 140px;
        left: 32px;
    }

    .introduction-section::after {
        bottom: 110px;
        right: 32px;
    }
}

@media (min-width: 1400px) {
    .what-we-do-section-home {
        background: url('../assets/imgs/cupola.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: top center;
    }
}

.services-cards-home, .specialties-list-home {
    margin-bottom: 70px;
}

.services-cards-home h3, .specialties-list-home h3, .product-cards-home h3 {
    margin-bottom: 32px;
}

.services-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 45%;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.services-scroll::-webkit-scrollbar {
    display: none;
}

.service-card {
    display: block;
    text-decoration: none;
    height: 100%;
    color: inherit;
    scroll-snap-align: start;
}

.service-card-content {
    display: flex;
    flex-direction: column;
    gap: 58px;
    height: 100%;
    padding-top: 32px;
    padding-left: 17px;
    padding-right: 17px;
}

.service-card-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card-number {
    color: var(--grey-300);
}

.service-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.service-card-bottom, .service-card-arrow {
    margin-top: auto;
}

@media (max-width: 1399.98px) {
    .services-cards-home {
        margin-bottom: 56px;
    }

    .services-cards-home h3 {
        margin-bottom: 0px;
    }

    .service-card-content {
        gap: 24px;
    }

    .service-card-bottom {
        gap: 24px;
    }
}

@media (max-width: 767.98px) {
    .service-card-content {
        padding-left: 0px;
        padding-right: 0px;
    }

    .services-scroll {
        grid-auto-columns: 95%;
        gap: 8px;
    }
}

@media (min-width: 1400px) {
    .services-scroll {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        overflow-x: unset;
        scroll-snap-type: unset;
    }

    .service-card {
        scroll-snap-align: unset;
    }
}

.service-card:hover .service-card-title {
    color: var(--blue);
}

.service-card:hover .arrow-icon {
    transform: scale(1.25);
}

.specialties-list-home {
    position: relative;
}

.specialty-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 17px;
    text-decoration: none;
    position: relative;
}

@media (max-width: 767.98px) {
    .specialty-item {
        padding-left: 0px;
        padding-right: 0px;
    }
}

.specialty-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.specialty-icon {
    width: 48px;
    height: 48px;
}

.specialty-hover-preview {
    position: absolute;
    left: 55%;
    top: 50%;
    transform: translateY(-50%) scale(0.96);
    width: 264px;
    height: 164px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.specialty-hover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialty-item:hover {
    background-color: var(--blue-30);
}

.specialty-item:hover h4, .product-card-home:hover h4 {
    color: var(--blue);
}

.specialty-item:hover .arrow-icon, .product-card-home:hover .arrow-icon {
    transform: scale(1.25);
}

@media (max-width: 1199.98px) {
    .specialties-list-home {
        margin-bottom: 56px;
    }

    .specialty-item {
        border-bottom: 1px solid var(--grey-10);
        overflow: hidden;
    }

    .specialty-item:first-of-type {
        border-top: 1px solid var(--grey-10);
    }

    .specialty-item:hover {
        border: none;
    }

    .specialty-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 992px) {
    .specialty-icon {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 1200px) {
    .specialty-item:hover .specialty-hover-preview {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.products-grid {
    display: grid;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.product-card-home {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-height: 400px;
    scroll-snap-align: start;
}

.product-card-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 1) 100%);
    z-index: 1;
}

.product-card-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card-home:hover .product-card-image img {
    transform: scale(1.1);
}

.product-card-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding-top: 0px;
    padding-left: 17px;
    padding-right: 17px;
    padding-bottom: 17px;
    color: var(--white);
}

.product-card-text h4 {
    color: var(--white);
    margin-bottom: 24px;
}

.product-card-text p {
    margin-bottom: 16px;
}

@media (max-width: 767.98px) {
    .products-grid {
        grid-auto-columns: 95%;
        gap: 8px;
        scrollbar-width: none;
    }

    .products-grid::-webkit-scrollbar {
        display: none;
    }

    .product-card-text {
        padding: 16px;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        overflow-x: unset;
        scroll-snap-type: unset;
    }

    .product-card-home {
        scroll-snap-align: unset;
    }
}

.trusted-by-section-home, .our-values-section-home {
    background-color: var(--dark-blue);
    color: var(--grey-100);
}

@media (max-width: 576px) {
    .trusted-by-section-home {
        padding-bottom: 48px;
    }
}

.trusted-by-section-home h2, .our-values-section-home h2 {
    color: var(--white);
}

.trusted-logos {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.trusted-logo-container {
    display: flex;
    width: max-content;
    animation: scroll-logos 18s linear infinite;
}

.trusted-logo {
    margin-right: 64px;
    display: flex;
    align-items: center;
}

.trusted-logo img {
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@keyframes scroll-logos {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (min-width: 1400px) {
    .case-studies-section-home {
        background: url('../assets/imgs/vitruvian-man.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
    }
}

@media (min-width: 1400px) {
    .case-studies-section-home .cards-grid .post-card {
        border: 0;
    }
}

.case-studies-grid-home .cards-grid {
    margin-bottom: 64px;
}

.case-studies-grid-home .section-btn, .our-values-section-home .section-btn {
    display: flex;
    justify-content: center;
}

.values-wrapper {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.values-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.values-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 6.5px;
    width: 1.5px;
    height: 100%;
    background-color: var(--grey-500);
}

.value-item {
    display: flex;
    gap: 25px;
}

.value-marker img {
    position: absolute;
    top: 9px;
    left: 0;
    filter: brightness(0) invert(1);
}

@media (min-width: 769px) and (max-width: 1199.98px) {
    .value-marker img {
        top: 12px;
    }
}

.value-content {
    display: flex;
    flex-direction: column;
    gap: 24px
}

.value-top {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.value-top span {
    font-family: var(--font);
    font-weight: 400;
    font-size: 28px;
    line-height: 40px;
    margin: 0;
    color: var(--white);
}

@media (max-width: 991.98px) {
    .value-top span {
        font-size: 22px;
        line-height: 34px;
    }
}

.value-content p {
    color: var(--grey-50);
}

.pulse-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    box-shadow: 0 0 30px var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white);
    animation: pulse 2.5s ease-in-out infinite;
}

.pulse-btn:hover .btn-text {
    text-decoration: underline;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.values-section-desktop {
    --radius: 280px;
    --active-color: var(--white);
    --inactive-color: var(--grey-500);
}

.values-wrapper-desktop {
    position: relative;
    min-height: 600px;
}

.orbit-area {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 600px;
    overflow: hidden;
    z-index: 2;
}

.team-btn {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(30%, -50%);
    z-index: 3;
}

.orbit-path {
    position: absolute;
    top: 50%;
    left: calc(-1 * var(--radius));
    width: calc(var(--radius) * 2);
    height: calc(var(--radius) * 2);
    border: 2px solid var(--grey-500);
    border-radius: 50%;
    transform: translateY(-50%);
}

.values-points-list {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.values-points-list li {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    gap: 20px;
    cursor: default;
    font-size: 24px;
    color: var(--inactive-color);
    transition: all 0.4s ease;
    transform:
        rotate(var(--angle)) translateX(var(--radius)) rotate(calc(var(--angle) * -1));
}

.orbit-dot {
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.orbit-dot img {
    filter: invert(60%) sepia(7%) saturate(306%) hue-rotate(191deg) brightness(92%) contrast(90%);
}

.orbit-text {
    position: absolute;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    gap: 16px;
    color: var(--inactive-color);
    transition: all 0.4s ease;
}

.values-points-list li.active .orbit-dot img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.values-points-list li.active .orbit-text {
    font-size: 28px;
    color: var(--active-color);
}

.description-area {
    position: absolute;
    right: 0;
    top: 0;                
    height: 100%;        
    width: 40%;
    max-width: 521px;
    z-index: 3;
    display: flex;
    align-items: center;    
}

.description-area p {
    color: var(--grey-50);
    font-size: 20px;
    font-style: italic;
    text-shadow: 0 8px 4px var(--black-title);
}

.orbit-description {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.orbit-description.active {
    opacity: 1;
}

.image-layer {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.orbit-image {
    position: absolute;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.orbit-image.active {
    opacity: 0.35;
    transform: scale(1);
}

@media (min-width: 992px) {
    html {
        scroll-snap-type: y proximity;
        overflow-y: auto;
    }

    body {
        overflow-x: visible;
    }

    section {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        scroll-margin-top: 100px; /* Consider fixed navbar */
        /* border: 2px solid red; Just for visual test */
    }

    footer {
        scroll-snap-align: start;
    }
}

.header-pattern {
    width: 100%;
    height: 300px;
    position: relative;
}

.pattern-canvas {
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
}