.hero-section {
    position: relative;

    background-color: #ffffff;

    background-image:
        linear-gradient(to right,
            rgba(0, 0, 0, 0.06) 1px,
            transparent 1px),
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.06) 1px,
            transparent 1px);

    background-size: 20px 20px;

    min-height: calc(100vh - 85px);

    display: flex;
    align-items: center;
    z-index: 2;
    overflow: visible;
}

.hero-section > .container {
    position: static;
}


/* Keep the crane image as the positioning reference */
.crane-stage {
    position: relative;
    width: 100%;
}

.crane-stage .crane-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Flashlight layer: positioned over the blue container face */

.container-flashlight {
    position: absolute;
    left: 20.5%;
    top: 46%;
    width: 56.3%;
    height: 47.7%;

    background-image: url("../../images/hero/container_base_img.jpeg");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    pointer-events: auto;
    cursor: crosshair;

    --flash-x: 50%;
    --flash-y: 50%;
    /* --flash-size: 110px; */

    -webkit-mask: radial-gradient(
        circle var(--flash-size) at var(--flash-x) var(--flash-y),
        black 0%,
        transparent 100%
    );

    mask: radial-gradient(
        circle 110px at var(--flash-x) var(--flash-y),
        black 0%,
        transparent 100%
    );
}

.container-flashlight.is-active {
    opacity: 1;
}

.crane-image-container {
    position: absolute;
    top: -40px;
    left: 50%;

    width: 900px;

    z-index: 20;
    pointer-events: none;

    opacity: 0;

    transform: translate(-50%, 0);
}

.crane-img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 12px 18px rgba(0, 0, 0, 0.25)
        );
}


.hero-content {
    width: 100%;
    padding: 5rem 0;
    z-index: 10;
}


.hero-content h1 {
    margin: 0;
    color: #111827;

    font-size: clamp(3rem, 9vw, 8.2rem);
    font-weight: 800;
    line-height: 0.95;
    word-spacing: 0.11em;

    transform: scaleY(2);
    transform-origin: center;

    white-space: nowrap;
    text-align: center;
}

.hero-description {
    max-width: 680px;

    margin: 4rem 0 0;

    color: #5d6675;

    font-size: 18px;
    line-height: 1.7;
}


.hero-actions {
    width: 100%;
    margin-top: 2.5rem;
}

.hero-actions-left {
    display: flex;
}

.hero-actions-right {
    display: flex;
}


.hero-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 50px;

    padding: 0 24px;

    border-radius: 7px;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}


/* Primary */

.primary-btn {
    background: #0056da;
    color: #ffffff;

    border: 1px solid #0056da;
}

.primary-btn:hover {
    background: #0047b5;
    color: #ffffff;

    transform: translateY(-2px);
}

.secondary-btn {
    background: #ffffff;
    color: #172033;

    border: 1px solid #d7dee8;
}

.secondary-btn:hover {
    color: #0056da;

    border-color: #0056da;

    transform: translateY(-2px);
}


/* Arrow */

.arrow {
    font-size: 20px;
    line-height: 1;

    transition: transform 0.25s ease;
}

.primary-btn:hover .arrow {
    transform: translateX(4px);
}


@media (max-width: 991.98px) {

    .hero-section {
        min-height: calc(100vh - 72px);
    }

    .hero-content {
        padding: 4rem 0;
    }

    .hero-content h1 {
        font-size: clamp(3rem, 8vw, 4.5rem);

        letter-spacing: -2px;

        transform: scaleY(1.5);
    }

    .hero-description {
        max-width: 620px;

        margin-top: 3rem;

        font-size: 17px;
        line-height: 1.6;
    }

    .hero-actions {
        margin-top: 2rem;
    }

    .hero-btn {
        min-height: 48px;

        padding: 0 20px;

        font-size: 14px;
    }

    .crane-image-container {
        display: none;
    }

    /* .crane-img {
        width: 330px;
    }

    @keyframes containerDrop {
        0% {
            opacity: 0;
            transform: translate(-50%, -100px);
        }

        60% {
            opacity: 1;
        }

        100% {
            opacity: 1;
            transform: translate(-50%, 0);
        }
    } */
}

@media (max-width: 767.98px) {

    .hero-section {
        min-height: auto;

        align-items: flex-start;
    }

    .hero-content {
        padding: 4rem 0 5rem;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);

        line-height: 1;

        letter-spacing: -1.5px;

        transform: scaleY(1.25);
        transform-origin: left center;
    }

    .hero-description {
        max-width: 100%;

        margin-top: 2.5rem;

        font-size: 16px;
        line-height: 1.6;
    }

    .hero-actions {
        margin-top: 2rem;
    }

    .hero-actions-left,
    .hero-actions-right {
        width: 100%;
    }

    .hero-btn {
        width: 100%;

        min-height: 50px;
    }

    .crane-image-container {
        display:none;
    }

    /* .crane-img {
        width: 250px;
    }

    .crane-image-container {
        top: -45px;
    }

    .crane-img {
        width: 260px;
    } */

    /* @keyframes containerDrop {
        0% {
            opacity: 0;
            transform: translate(-50%, -80px);
        }

        60% {
            opacity: 1;
        }

        100% {
            opacity: 1;
            transform: translate(-50%, 0);
        }
    } */
}


@media (max-width: 575.98px) {

    .hero-section {
        min-height: auto;
    }

    .hero-content {
        padding: 3rem 0 4rem;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 12vw, 3.3rem);

        letter-spacing: -1px;

        transform: scaleY(1.15);
    }

    .hero-description {
        margin-top: 2rem;

        font-size: 15px;
        line-height: 1.65;
    }

    .hero-actions {
        margin-top: 1.75rem;
    }

    .hero-btn {
        font-size: 14px;
    }

    .crane-image-container {
        display:none;
    }

    /* .crane-img {
        width: 220px;
    } */
}

@media (prefers-reduced-motion: reduce) {
    .crane-image-container {
        animation: none;
        opacity: 1;
        transform: translateX(-50%);
    }
}

@media (max-width: 400px) {

    .hero-content {
        padding: 2.5rem 0 3.5rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-btn {
        min-height: 48px;

        padding: 0 16px;

        font-size: 13px;
    }
}