/* =========================================================
   Industries — cinematic horizontal gallery
   ========================================================= */

.industries {
    position: relative;
    overflow: hidden;
    padding: clamp(88px, 9vw, 140px) 0;
    background: #f2f1ed;
    color: #111111;
}

.industries-inner {
    width: min(calc(100% - 80px), 1320px);
    margin: 0 auto;
}


/* =========================================================
   Header
   ========================================================= */

.industries-header {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: clamp(48px, 8vw, 130px);
    align-items: end;
    margin-bottom: clamp(44px, 5vw, 72px);
}

.industries-kicker {
    display: inline-block;
    margin-bottom: 20px;
    color: #8e6d19;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.industries-title {
    max-width: 840px;
    margin: 0;
    color: #111111;
    font-size: clamp(3.2rem, 5.8vw, 6.1rem);
    line-height: 0.96;
    font-weight: 500;
    letter-spacing: -0.065em;
}

.industries-header-side {
    padding-bottom: 5px;
}

.industries-header-side p {
    max-width: 430px;
    margin: 0 0 25px;
    color: #686868;
    font-size: clamp(1rem, 1.1vw, 1.14rem);
    line-height: 1.62;
    letter-spacing: -0.015em;
}

.industries-all-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111111;
    font-size: 0.98rem;
    line-height: 1.4;
    font-weight: 650;
    text-decoration: none;
    transition:
        gap 0.22s ease,
        color 0.22s ease;
}

.industries-all-link:hover {
    gap: 16px;
    color: #9a7410;
}


/* =========================================================
   Horizontal gallery
   ========================================================= */

.industries-track {
    display: grid;
    grid-auto-flow: column;

    /* Every card receives a real, predictable track width */
    grid-auto-columns: clamp(320px, 31vw, 430px);

    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;

    padding-bottom: 18px;

    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 17, 17, 0.28) transparent;
}

.industries-track::-webkit-scrollbar {
    height: 6px;
}

.industries-track::-webkit-scrollbar-track {
    background: transparent;
}

.industries-track::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(17, 17, 17, 0.25);
}

.industry-tile {
    position: relative;
    display: block;

    width: 100%;
    min-width: 0;
    height: clamp(430px, 49vw, 620px);
    min-height: 430px;

    overflow: hidden;
    border-radius: 12px;
    background: #252525;
    color: #ffffff;
    text-decoration: none;

    scroll-snap-align: start;
    isolation: isolate;
}

.industry-tile-large {
    min-width: 0;
}

.industry-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.015);
    transition: transform 0.75s cubic-bezier(.22, 1, .36, 1);
}

.industry-tile-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.05) 15%,
            rgba(0, 0, 0, 0.18) 48%,
            rgba(0, 0, 0, 0.88) 100%
        );
    transition: background 0.4s ease;
}

.industry-tile-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: clamp(25px, 3vw, 38px);
}

.industry-tile-label {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.69rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.industry-tile h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 3vw, 3.25rem);
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.05em;
    transition: transform 0.4s cubic-bezier(.22, 1, .36, 1);
}

.industry-tile p {
    max-width: 430px;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(15px);
    transition:
        max-height 0.45s ease,
        margin-top 0.4s ease,
        opacity 0.35s ease,
        transform 0.4s cubic-bezier(.22, 1, .36, 1);
}

.industry-tile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.88rem;
    line-height: 1.4;
    font-weight: 650;
    opacity: 0;
    transform: translateY(12px);
    transition:
        max-height 0.4s ease,
        margin-top 0.4s ease,
        opacity 0.35s ease,
        transform 0.4s cubic-bezier(.22, 1, .36, 1);
}


/* =========================================================
   Hover
   ========================================================= */

.industry-tile:hover img {
    transform: scale(1.065);
}

.industry-tile:hover .industry-tile-overlay {
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.08) 5%,
            rgba(0, 0, 0, 0.34) 43%,
            rgba(0, 0, 0, 0.94) 100%
        );
}

.industry-tile:hover h3 {
    transform: translateY(-3px);
}

.industry-tile:hover p {
    max-height: 110px;
    margin-top: 17px;
    opacity: 1;
    transform: translateY(0);
}

.industry-tile:hover .industry-tile-link {
    max-height: 30px;
    margin-top: 20px;
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991.98px) {
    .industries-inner {
        width: calc(100% - 88px);
    }

    .industries-header {
        grid-template-columns: 1fr;
        gap: 27px;
        align-items: start;
    }

    .industries-header-side p {
        max-width: 620px;
    }

    .industries-track {
        grid-auto-columns: minmax(300px, 72vw);
    }

    .industry-tile-large {
        min-width: 0;
    }

    .industry-tile {
        height: 530px;
    }

    .industry-tile p {
        max-height: 110px;
        margin-top: 17px;
        opacity: 1;
        transform: none;
    }

    .industry-tile-link {
        max-height: 30px;
        margin-top: 20px;
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767.98px) {
    .industries {
        padding: 76px 0 82px;
    }

    .industries-inner {
        width: calc(100% - 30px);
    }

    .industries-header {
        margin-bottom: 38px;
    }

    .industries-title {
        font-size: clamp(2.8rem, 13vw, 4rem);
    }

    .industries-header-side p {
        font-size: 1rem;
    }

    .industries-track {
        grid-auto-columns: 87%;
        gap: 12px;
        margin-right: -15px;
        padding-right: 15px;
    }

    .industry-tile {
        height: 490px;
        min-height: 490px;
        border-radius: 9px;
    }

    .industry-tile-content {
        padding: 25px;
    }

    .industry-tile h3 {
        font-size: 2.25rem;
    }
}


/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .industry-tile img,
    .industry-tile-overlay,
    .industry-tile h3,
    .industry-tile p,
    .industry-tile-link,
    .industries-all-link {
        transition: none;
    }
}