/* ========================================
   FUNCTIONS VARIABLES
======================================== */

:root {
    --functions-heading: #0A1022;
    --functions-copy: #4B5563;
    --functions-green: #00575a;
    --functions-deep: #00383b;
    --functions-container: 1320px;
}


/* ========================================
   PAGE BASE
======================================== */

.functions-page {
    overflow: visible;

    color: var(--functions-heading);
    background: #ffffff;
}

.functions-container {
    width: min(
        var(--functions-container),
        calc(100% - 64px)
    );

    margin: 0 auto;
}

.functions-page h1,
.functions-page h2,
.functions-page h3,
.functions-page h4,
.functions-page h5,
.functions-page h6 {
    color: var(--functions-heading);
}

.functions-page p {
    color: var(--functions-copy);

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.08px;
}


/* ========================================
   HERO
======================================== */

.functions-hero {
    padding: 155px 0 100px;

    background: #ffffff;
}

.functions-hero-copy {
    max-width: 900px;

    margin-bottom: 52px;
}

.functions-eyebrow {
    margin-bottom: 22px;

    display: flex;
    align-items: center;
    gap: 14px;

    color: var(--functions-green);

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.functions-eyebrow span {
    width: 35px;
    height: 1px;

    display: block;

    background: var(--functions-green);
}

.functions-hero h1 {
    max-width: 850px;

    margin: 0;

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: clamp(43px, 4.7vw, 52px);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -1.08px;
}


/* ========================================
   HERO IMAGE
======================================== */

.functions-hero-image-wrap {
    position: relative;

    width: 100%;
    height: 510px;

    overflow: hidden;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 28px 68px
        rgba(0, 48, 51, 0.11);
}

.functions-hero-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transform: scale(1.01);

    transition:
        transform 1.05s
        cubic-bezier(0.22, 1, 0.36, 1);
}

.functions-hero-image-wrap:hover
.functions-hero-image {
    transform: scale(1.035);
}


/* ========================================
   DIRECTORY
======================================== */

.functions-directory {
    padding: 30px 0 140px;

    background: #ffffff;
}

.functions-directory-header {
    margin-bottom: 72px;

    display: grid;
    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(350px, 0.75fr);

    gap: 90px;

    align-items: start;
}

.functions-directory-header h2 {
    max-width: 600px;

    margin: 0;

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: clamp(42px, 4.3vw, 58px);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -1.08px;
}

.functions-directory-copy {
    display: grid;
    gap: 22px;
}

.functions-directory-copy p {
    max-width: 510px;

    margin: 0;
}


/* ========================================
   FUNCTIONS GRID
======================================== */

.functions-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    column-gap: 64px;
    row-gap: 64px;

    border: 0;
}


/* ========================================
   FUNCTION ITEM
======================================== */

.function-item {
    position: relative;

    min-width: 0;

    padding: 0 0 10px;

    color: var(--functions-heading);
    text-decoration: none;

    background: transparent;
    border: 0;

    transition:
        transform 0.35s ease;
}

.function-item:hover {
    transform: translateY(-3px);
}


/* ========================================
   TITLE ROW
======================================== */

.function-title-row {
    position: relative;

    width: 100%;

    margin-bottom: 14px;

    padding-right: 34px;
}


/* ========================================
   FUNCTION TITLE
======================================== */

.function-title-row h3,
.function-item h3 {
    max-width: 100%;

    margin: 0;

    color: var(--functions-heading);

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.45px;

    transition:
        color 0.3s ease;
}

.function-item:hover h3 {
    color: var(--functions-green);
}


/* ========================================
   FUNCTION ARROW
======================================== */

.function-read-arrow {
    position: absolute;

    top: 1px;
    right: 0;

    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--functions-green);

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: 18px;
    font-weight: 300;
    line-height: 1;

    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

.function-item:hover
.function-read-arrow {
    color: var(--functions-deep);

    transform: translateX(5px);
}


/* ========================================
   FUNCTION DESCRIPTION
======================================== */

.function-item p {
    max-width: 95%;

    margin: 0;

    color: var(--functions-copy);

    font-family:
        "Graphik Trial",
        Arial,
        sans-serif;

    font-size: 15px;
    font-weight: 400;
    line-height: 1.68;
    letter-spacing: -0.08px;
}


/* ========================================
   SUBTLE HOVER LINE
======================================== */

.function-item::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 0;
    height: 1px;

    background: var(--functions-green);

    transition:
        width 0.4s
        cubic-bezier(0.22, 1, 0.36, 1);
}

.function-item:hover::after {
    width: 42px;
}


/* ========================================
   REMOVE OLD NUMBER / ARROW
======================================== */

.function-item-top,
.function-number,
.function-arrow {
    display: none !important;
}


/* ========================================
   HERO LOAD ANIMATION
======================================== */

.functions-hero-copy,
.functions-hero-image-wrap {
    opacity: 0;

    transform: translateY(45px);
}

body.functions-page-loaded
.functions-hero-copy {
    opacity: 1;

    transform: translateY(0);

    transition:
        opacity 0.8s ease,
        transform 1s
        cubic-bezier(0.22, 1, 0.36, 1);
}

body.functions-page-loaded
.functions-hero-image-wrap {
    opacity: 1;

    transform: translateY(0);

    transition:
        opacity 0.8s ease 0.15s,
        transform 1s
        cubic-bezier(0.22, 1, 0.36, 1)
        0.15s;
}


/* ========================================
   SCROLL REVEAL
======================================== */

[data-functions-reveal] {
    opacity: 0;

    transform: translateY(48px);

    transition:
        opacity 0.8s ease,
        transform 1s
        cubic-bezier(0.22, 1, 0.36, 1);
}

[data-functions-reveal].is-visible {
    opacity: 1;

    transform: translateY(0);
}


/* ========================================
   LAPTOP
======================================== */

@media (max-width: 1200px) {

    .functions-container {
        width: calc(100% - 64px);
    }

    .functions-hero-image-wrap {
        height: 470px;
    }

    .functions-grid {
        column-gap: 44px;
        row-gap: 58px;
    }

    .function-title-row h3,
    .function-item h3 {
        font-size: 19px;
    }

}


/* ========================================
   TABLET
======================================== */

@media (max-width: 991px) {

    .functions-container {
        width: calc(100% - 48px);
    }

    .functions-hero-image-wrap {
        height: 410px;
    }

    .functions-directory-header {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .functions-directory-copy {
        max-width: 680px;
    }

    .functions-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        column-gap: 40px;
        row-gap: 50px;
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {

    .functions-container {
        width: calc(100% - 28px);
    }


    .functions-page p {
        font-size: 18px;
    }


    /* HERO */

    .functions-hero {
        padding: 105px 0 20px;
    }

    .functions-hero-copy {
        margin-bottom: 38px;
    }

    .functions-hero h1 {
        font-size: 42px;
        line-height: 1.04;
        letter-spacing: -1.4px;
    }

    .functions-hero-image-wrap {
        height: 315px;

        border-radius: 12px;
    }


    /* DIRECTORY */

    .functions-directory {
        padding: 25px 0 50px;
    }

    .functions-directory-header {
        margin-bottom: 50px;
    }

    .functions-directory-header h2 {
        font-size: 36px;
        line-height: 1.06;
    }


    /* GRID */

    .functions-grid {
        grid-template-columns: 1fr;

        column-gap: 0;
        row-gap: 38px;
    }


    /* ITEM */

    .function-item {
        padding-bottom: 8px;
    }

    .function-item:hover {
        transform: none;
    }

    .function-title-row {
        margin-bottom: 12px;

        padding-right: 34px;
    }

    .function-title-row h3,
    .function-item h3 {
        font-size: 23px;
        line-height: 1.25;
    }

    .function-item p {
        max-width: 100%;

        font-size: 18px;
        line-height: 1.65;
    }

    .function-read-arrow {
        top: 2px;

        font-size: 20px;
    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 480px) {

    .functions-container {
        width: calc(100% - 24px);
    }

    .functions-hero h1 {
        font-size: 38px;
    }

    .functions-hero-image-wrap {
        height: 270px;
    }

    .functions-directory-header h2 {
        font-size: 33px;
    }

    .function-title-row h3,
    .function-item h3 {
        font-size: 22px;
    }

    .function-item p {
        font-size: 18px;
    }

}


/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

    .functions-hero-copy,
    .functions-hero-image-wrap,
    [data-functions-reveal],
    .function-item,
    .function-read-arrow,
    .function-item::after {
        opacity: 1 !important;

        transform: none !important;

        transition: none !important;
    }

}