
/**
 * WORKS Application Family Section
 *
 * File: assets/css/works-4apps.css
 *
 * Displays the four WORKS applications:
 * Drywall, Roofing, Painting, and Flooring.
 *
 * Uses shared tokens from works-foundation.css
 * Uses shared section components from works-components.css
 *
 * Responsive:
 * Desktop, tablet, and mobile.
 *
 * @package WORKS
 */

/* =========================================================
   1. APPLICATION SECTION
========================================================= */

.works-4apps {
    position: relative;
    isolation: isolate;

    color: var(--works-navy);
    background: var(--works-white);
}

/* =========================================================
   2. SECTION HEADING
========================================================= */

.works-4apps-heading {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.works-4apps-eyebrow {
    margin-bottom: 0.45rem;
}

.works-4apps-heading h2 {
    margin: 0 0 0.4rem;

    color: var(--works-navy);
    font-size: clamp(1.55rem, 2.5vw, 2.1rem);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.works-4apps-description {
    margin: 0;

    color: var(--works-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================================
   3. APPLICATION GRID
========================================================= */

.works-4apps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;

    width: 100%;
}

/* =========================================================
   4. APPLICATION CARD
========================================================= */

.works-4apps-card {
    position: relative;

    display: flex;
    min-width: 0;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--works-light-gray);
    border-radius: 0.75rem;

    background: var(--works-white);
    box-shadow: 0 3px 12px rgb(11 31 59 / 7%);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.works-4apps-card:hover {
    transform: translateY(-4px);

    border-color: var(--works-sky);
    box-shadow: 0 10px 24px rgb(11 31 59 / 12%);
}

/* =========================================================
   5. APPLICATION IMAGE AREA
========================================================= */

.works-4apps-card-media {
    position: relative;
    isolation: isolate;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;

    overflow: hidden;

    background: var(--works-navy);
}

.works-4apps-image-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;

    padding: 1rem;

    color: var(--works-white);
    background: var(--works-navy);

    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}

/* =========================================================
   6. APPLICATION CARD CONTENT
========================================================= */

.works-4apps-card-content {
    position: relative;

    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.65rem;

    min-width: 0;
    padding: 1rem 0.8rem 0.85rem;
}

/* =========================================================
   7. APPLICATION ICON
========================================================= */

.works-4apps-card-icon {
    position: relative;
    z-index: 1;

    display: flex;
    flex: 0 0 38px;

    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;

    margin-top: -2.25rem;

    border: 2px solid var(--works-white);
    border-radius: 50%;

    color: var(--works-white);
    background: var(--works-blue);

    font-size: 1rem;
    font-weight: 800;

    box-shadow: 0 3px 8px rgb(11 31 59 / 15%);
}

/* =========================================================
   8. APPLICATION TITLE AND DESCRIPTION
========================================================= */

.works-4apps-card-copy {
    flex: 1;
    min-width: 0;
}

.works-4apps-card-copy h3 {
    margin: 0 0 0.25rem;

    color: var(--works-navy);
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.3;
}

.works-4apps-card-copy p {
    margin: 0;

    color: var(--works-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* =========================================================
   9. ORANGE CARD ARROW
========================================================= */

.works-4apps-card-arrow {
    display: flex;
    flex: 0 0 27px;

    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;

    margin-left: auto;

    border-radius: 50%;

    color: var(--works-white);
    background: var(--works-orange);

    font-size: 1rem;
    font-weight: 800;
    line-height: 1;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.works-4apps-card:hover .works-4apps-card-arrow {
    transform: translateX(3px);
    background: var(--works-bold-orange);
}

/* =========================================================
   10. TABLET
========================================================= */

@media (max-width: 950px) {

    .works-4apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .works-4apps-heading {
        margin-bottom: 1.4rem;
    }

    .works-4apps-card-content {
        padding: 1rem;
    }

    .works-4apps-card-copy h3 {
        font-size: 1rem;
    }

    .works-4apps-card-copy p {
        font-size: 0.82rem;
    }
}

/* =========================================================
   11. MOBILE
========================================================= */

@media (max-width: 700px) {

    .works-4apps {
        padding-block: 2rem;
    }

    .works-4apps-heading {
        margin-bottom: 1.4rem;
        padding-inline: 0.25rem;
    }

    .works-4apps-heading h2 {
        font-size: clamp(1.45rem, 6vw, 1.8rem);
        line-height: 1.2;
    }

    .works-4apps-description {
        font-size: 0.88rem;
    }

    .works-4apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .works-4apps-card {
        border-radius: 0.65rem;
    }

    .works-4apps-card-media {
        aspect-ratio: 4 / 3;
    }

    .works-4apps-card-content {
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.85rem 0.65rem;
    }

    .works-4apps-card-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;

        margin-top: -1.8rem;

        font-size: 0.85rem;
    }

    .works-4apps-card-copy h3 {
        font-size: 0.84rem;
    }

    .works-4apps-card-copy p {
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .works-4apps-card-arrow {
        flex-basis: 23px;
        width: 23px;
        height: 23px;
        font-size: 0.85rem;
    }
}

/* =========================================================
   12. SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .works-4apps-grid {
        gap: 0.6rem;
    }

    .works-4apps-card-content {
        gap: 0.4rem;
        padding: 0.7rem 0.55rem;
    }

    .works-4apps-card-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    .works-4apps-card-copy h3 {
        font-size: 0.78rem;
    }

    .works-4apps-card-copy p {
        font-size: 0.68rem;
    }

    .works-4apps-card-arrow {
        flex-basis: 21px;
        width: 21px;
        height: 21px;
    }
}

/* =========================================================
   13. KEYBOARD ACCESSIBILITY
========================================================= */

.works-4apps-card:focus-within {
    outline: 3px solid var(--works-sky);
    outline-offset: 3px;
}

/* =========================================================
   14. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .works-4apps-card,
    .works-4apps-card-arrow {
        transition: none;
    }

    .works-4apps-card:hover,
    .works-4apps-card:hover .works-4apps-card-arrow {
        transform: none;
    }
}
