/* =========================================================
   HOME - BASE
========================================================= */

.home-project,
.home-news,
.home-company,
.home-links {
    position: relative;

    width: 100%;
    max-width: none;

    box-sizing: border-box;

    overflow: hidden;
}

.home-inner {
    position: relative;
    z-index: 2;

    width: min(calc(100% - 80px), 1480px);

    margin: 0 auto;
}


/* =========================================================
   SHARED SECTION HEADING
========================================================= */

.home-heading {
    margin: 0 0 55px;
}

.home-heading h2 {
    display: inline-block;

    margin: 0;

    font-size: clamp(64px, 7vw, 108px);
    font-weight: 600;

    line-height: .9;
    letter-spacing: -.06em;
}

.home-heading h2 + p {
    display: inline-block;

    margin: 0 0 0 20px;

    vertical-align: baseline;

    color: #666;

    font-size: 14px;
    font-weight: 500;

    letter-spacing: .12em;
}

.home-heading::after {
    content: "";

    display: block;

    width: 72px;
    height: 3px;

    margin-top: 22px;

    background:
        linear-gradient(
            90deg,
            #efa9c9,
            #9ecbff
        );
}


/* =========================================================
   PROJECT
========================================================= */

.home-project {
    padding: 110px 0 130px;

    background:
        radial-gradient(
            circle at 0 100%,
            rgba(200, 225, 255, .32),
            transparent 32%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(224, 211, 255, .28),
            transparent 30%
        ),
        #fff;
}

.home-project::after {
    content: "PROJECT";

    position: absolute;

    right: -2vw;
    bottom: -.18em;

    color: rgba(0, 0, 0, .025);

    font-size: clamp(170px, 20vw, 370px);
    font-weight: 700;

    line-height: .8;
    letter-spacing: -.075em;

    pointer-events: none;
}


/* Project grid */

.home-project-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 36px;
}


/* Card */

.home-project-card {
    position: relative;

    min-width: 0;

    padding: 34px;

    background: rgba(255, 255, 255, .92);

    border: 1px solid #d8d8d8;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.home-project-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, .045);
}


/* Project top */

.home-project-top {
    display: grid;

    grid-template-columns:
        80px
        minmax(0, 1fr)
        auto;

    gap: 24px;

    align-items: start;

    margin-bottom: 28px;
}

.home-project-no,
.home-project-year {
    margin: 0;

    font-size: 32px;
    font-weight: 300;

    line-height: 1;

    letter-spacing: .04em;
}

.home-project-year {
    font-size: 15px;
    font-weight: 500;

    letter-spacing: .18em;
}

.home-project-name p {
    margin: 0 0 7px;

    color: #888;

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

    letter-spacing: .22em;
}

.home-project-name h3 {
    margin: 0;

    font-size: clamp(24px, 2.4vw, 38px);
    font-weight: 500;

    line-height: 1.1;
    letter-spacing: -.03em;
}


/* Project image */

.home-project-card .wp-block-image {
    margin: 0 0 28px;

    overflow: hidden;
}

.home-project-card .wp-block-image img {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    transition:
        transform .4s ease;
}

.home-project-card:hover .wp-block-image img {
    transform: scale(1.02);
}


/* Description */

.home-project-desc {
    margin: 0;

    color: #555;

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


/* CTA */

.home-project-link {
    margin: 32px 0 0;
}

.home-project-link a {
    color: inherit;

    text-decoration: none;

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

    letter-spacing: .16em;

    border-bottom: 1px solid currentColor;

    padding-bottom: 5px;
}


/* Make linked projects whole-card clickable */

.home-project-link a::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;
}


/* =========================================================
   HOME NEWS
========================================================= */

.home-news {
    position: relative;

    padding: 110px 0 120px;

    overflow: hidden;

    background: #edf4f6;

    /*
     * Creates a predictable stacking context.
     */
    isolation: isolate;
}


/* Decorative background word */

.home-news::after {
    content: "NEWS";

    position: absolute;

    right: -1vw;
    bottom: -.16em;

    z-index: 0;

    color: rgba(255, 255, 255, .5);

    font-size: clamp(180px, 23vw, 390px);
    font-weight: 700;

    line-height: .8;
    letter-spacing: -.07em;

    white-space: nowrap;

    pointer-events: none;
}


/*
 * Keep all real content above decorative text.
 */

.home-news .home-inner {
    position: relative;
    z-index: 2;
}


/* =========================================================
   NEWS HEADING
========================================================= */

.home-heading-row {
    display: flex;

    justify-content: space-between;
    align-items: end;

    gap: 30px;

    margin-bottom: 55px;
}


.home-heading-row .home-heading {
    margin-bottom: 0;
}


.home-view-all {
    margin: 0;
}


.home-view-all a {
    color: inherit;

    text-decoration: none;

    padding-bottom: 6px;

    border-bottom: 1px solid currentColor;

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

    letter-spacing: .14em;

    transition:
        opacity .2s ease;
}


.home-view-all a:hover {
    opacity: .5;
}


/* =========================================================
   HORIZONTAL NEWS RAIL
========================================================= */

.home-news-loop {
    position: relative;
	z-index: 2;
    width: 100%;
}


/*
 * WordPress Post Template becomes a horizontal rail.
 */

.home-news-loop .wp-block-post-template {
    display: grid;

    grid-template-columns: none;

    grid-auto-flow: column;

    /*
     * Desktop:
     * around 3.3 cards visible at once.
     */
    grid-auto-columns:
        clamp(280px, 29vw, 390px);

    gap: 22px;

    margin: 0;

    padding:
        0
        0
        22px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;

    /*
     * Keep an actual visible scrollbar.
     */
    scrollbar-width: thin;

    -webkit-overflow-scrolling: touch;
}


.home-news-loop .wp-block-post-template > li {
    min-width: 0;

    margin: 0;

    scroll-snap-align: start;
}


/* WebKit scrollbar */

.home-news-loop
.wp-block-post-template::-webkit-scrollbar {
    height: 6px;
	z-index:2;
}


.home-news-loop
.wp-block-post-template::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, .06);
}


.home-news-loop
.wp-block-post-template::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .28);
}


.home-news-loop
.wp-block-post-template::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, .45);
}


/* =========================================================
   NEWS CARD
========================================================= */

.home-news-card {
    position: relative;

    height: 100%;
    min-width: 0;

    box-sizing: border-box;

    padding: 22px;

    display: flex;
    flex-direction: column;

    background: #fff;
	
	z-index:2;

    border: 1px solid #d9d9d9;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.home-news-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, .045);
}


/* =========================================================
   NEWS META
========================================================= */

.home-news-meta {
    position: relative;
    z-index: 3;

    display: flex;

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

    gap: 12px;

    margin-bottom: 20px;
}


.home-news-meta .wp-block-post-date {
    margin: 0;

    color: #888;

    font-size: 10px;

    letter-spacing: .1em;
}


.home-news-meta .wp-block-post-date a {
    color: inherit;
    text-decoration: none;
}


.home-news-meta .wp-block-categories {
    margin: 0;
    padding: 0;

    list-style: none;
}


.home-news-meta .wp-block-categories li {
    margin: 0;
}


.home-news-meta .wp-block-categories a {
    position: relative;
    z-index: 3;

    color: #d291b5;

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

    letter-spacing: .1em;

    text-underline-offset: 3px;
}


/* =========================================================
   FEATURED IMAGE
========================================================= */

.home-news-card .wp-block-post-featured-image {
    position: relative;
    z-index: 2;

    width: 100%;

    margin: 0 0 22px;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #eee;
}


.home-news-card .wp-block-post-featured-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .4s ease;
}


.home-news-card:hover
.wp-block-post-featured-image img {
    transform: scale(1.025);
}


/* =========================================================
   NEWS TITLE
========================================================= */

.home-news-card .wp-block-post-title {
    margin: 0;

    font-size: clamp(19px, 1.5vw, 25px);
    font-weight: 600;

    line-height: 1.3;
    letter-spacing: -.025em;
}


.home-news-card .wp-block-post-title a {
    color: inherit;

    text-decoration: none;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;
}


/* Whole card clickable */

.home-news-card
.wp-block-post-title a::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;
}


/*
 * Keep category links/image above
 * whole-card overlay.
 */

.home-news-card
.wp-block-post-featured-image a,

.home-news-meta a {
    position: relative;
    z-index: 3;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .home-news {
        padding:
            90px
            0
            100px;
    }


    .home-news-loop .wp-block-post-template {
        /*
         * Around 2.3 cards visible.
         */
        grid-auto-columns:
            clamp(270px, 42vw, 350px);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .home-news {
        padding:
            70px
            0
            80px;
    }


    .home-heading-row {
        margin-bottom: 38px;
    }


    .home-view-all a {
        font-size: 10px;
    }


    .home-news-loop .wp-block-post-template {
        /*
         * Shows one card plus part of next card
         * so swipe/scroll is obvious.
         */
        grid-auto-columns:
            min(82vw, 330px);

        gap: 14px;

        padding-bottom: 18px;

        scroll-snap-type: x mandatory;
    }


    .home-news-card {
        padding: 18px;
    }


    .home-news-card .wp-block-post-title {
        font-size: 22px;
    }


    .home-news::after {
        right: -8vw;

        font-size: 46vw;
    }

}


/* =========================================================
   COMPANY
========================================================= */

.home-company {
    padding: 120px 0 135px;
	background:
        radial-gradient(
            circle at 100% 100%,
            rgba(222, 212, 255, .22),
            transparent 32%
        ),
        #fff;
    
}

.home-company::after {
    content: "COMPANY";

    position: absolute;

    right: -2vw;
    bottom: -.2em;

    color: rgba(0, 0, 0, .025);

    font-size: clamp(160px, 19vw, 350px);
    font-weight: 700;

    line-height: .8;
    letter-spacing: -.075em;

    pointer-events: none;
}

.home-company .home-inner {
    display: grid;

    grid-template-columns:
        minmax(0, .9fr)
        minmax(430px, 1.1fr);

    gap: clamp(70px, 9vw, 150px);

    align-items: center;
}


/* Company copy */

.home-company-copy h3 {
    max-width: 720px;

    margin: 0 0 38px;

    font-size: clamp(34px, 3.5vw, 53px);
    font-weight: 400;

    line-height: 1.15;
    letter-spacing: -.035em;
}

.home-company-copy > p {
    max-width: 650px;

    margin: 0;

    color: #555;

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


/* Black accent */

.home-company-copy::after {
    content: "";

    display: block;

    width: 130px;
    height: 14px;

    margin-top: 65px;

    background: #111;
}


/* Company cards */

.home-company-nav {
    display: grid;

    gap: 18px;
}

.home-company-card {
    position: relative;

    min-height: 145px;

    padding: 35px 42px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: rgba(255, 255, 255, .93);

    border: 1px solid #d8d8d8;

    transition:
        transform .25s ease,
        background .25s ease;
}

.home-company-card:hover {
    transform: translateX(7px);

    background: #fafafa;
}

.home-company-small {
    margin: 0 0 7px;

    color: #888;

    font-size: 11px;
    font-weight: 500;

    letter-spacing: .12em;
}

.home-company-card h3 {
    margin: 0;

    font-size: clamp(30px, 3vw, 46px);
    font-weight: 500;

    letter-spacing: -.035em;
}

.home-company-card h3 a {
    color: inherit;

    text-decoration: none;
}

.home-company-card h3 a::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;
}


/* =========================================================
   LINKS
========================================================= */

.home-links {
    padding: 100px 0 110px;

    background: #edf4f6;
}

.home-links .home-inner {
    display: grid;

    grid-template-columns:
        minmax(260px, .65fr)
        minmax(0, 1.35fr);

    gap: clamp(60px, 8vw, 125px);

    align-items: start;
}


/* Left */

.home-links-copy h2 {
    margin: 0;

    font-size: 34px;
    font-weight: 400;

    letter-spacing: -.025em;
}

.home-links-copy h2 + p {
    margin: 18px 0 0;

    font-size: 17px;
}

.home-links-copy > p:last-child {
    max-width: 390px;

    margin: 48px 0 0;

    font-size: 20px;
    line-height: 1.5;
}


/* Cards */

.home-links-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    align-items: stretch;
}


/* Remove Gutenberg's automatic block spacing */
.home-links-grid > * {
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;

    align-self: stretch;
}


/* Extra protection against WordPress flow-layout spacing */
.home-links-grid.is-layout-flow > * + *,
.home-links-grid.is-layout-constrained > * + * {
    margin-block-start: 0 !important;
}




.home-link-card {
    position: relative;
height: 100%;
    min-height: 190px;

    padding: 36px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border: 1px solid rgba(0, 0, 0, .06);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.home-link-card:nth-child(1) {
    background: #fde8ef;
}

.home-link-card:nth-child(2) {
    background: #eee9ff;
}

.home-link-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, .045);
}

.home-link-number {
    margin: 0 0 5px;

    color: #cf9fba;

    font-size: 30px;
    font-weight: 300;
}

.home-link-card h3 {
    margin: 0;

    font-size: clamp(26px, 2.5vw, 38px);
    font-weight: 500;

    letter-spacing: -.025em;
}

.home-link-card h3 a {
    color: inherit;
    text-decoration: none;
}

.home-link-card h3 a::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;
}

.home-link-card h3 + p {
    margin: 8px 0 0;

    color: #888;

    font-size: 12px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .home-inner {
        width: min(calc(100% - 56px), 1480px);
    }


    /* Project */

    .home-project {
        padding-top: 90px;
        padding-bottom: 100px;
    }


    /* News */

    .home-news {
        padding-top: 90px;
        padding-bottom: 100px;
    }

    .home-news-loop .wp-block-post-template {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    /* Company */

    .home-company {
        padding-top: 95px;
        padding-bottom: 110px;
    }

    .home-company .home-inner {
        grid-template-columns: 1fr;

        gap: 65px;
    }

    .home-company-nav {
        max-width: 850px;
    }


    /* Links */

    .home-links .home-inner {
        grid-template-columns:
            minmax(220px, .6fr)
            minmax(0, 1.4fr);

        gap: 50px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .home-inner {
        width: calc(100% - 40px);
    }


    /* Shared heading */

    .home-heading {
        margin-bottom: 40px;
    }

    .home-heading h2 {
        display: block;

        font-size: clamp(50px, 16vw, 70px);

        line-height: .92;
    }

    .home-heading h2 + p {
        display: block;

        margin: 12px 0 0;

        font-size: 12px;
    }

    .home-heading::after {
        width: 55px;
        height: 2px;

        margin-top: 17px;
    }


    /* PROJECT */

    .home-project {
        padding:
            70px
            0
            80px;
    }

    .home-project-grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .home-project-card {
        padding: 20px;
    }

    .home-project-top {
        grid-template-columns:
            48px
            minmax(0, 1fr)
            auto;

        gap: 14px;
    }

    .home-project-no {
        font-size: 27px;
    }

    .home-project-name h3 {
        font-size: 27px;
    }

    .home-project-year {
        font-size: 12px;
    }

    .home-project-desc {
        font-size: 14px;
        line-height: 1.7;
    }

    .home-project::after {
        font-size: 43vw;
    }


    /* NEWS */

    .home-news {
        padding:
            70px
            0
            80px;
    }

    .home-heading-row {
        margin-bottom: 38px;
    }

    .home-view-all a {
        font-size: 10px;
    }


    /*
     * Horizontal swipe rail on mobile.
     */

    .home-news-loop .wp-block-post-template {
        display: grid;

        grid-template-columns: none;

        grid-auto-flow: column;
        grid-auto-columns: min(82vw, 330px);

        gap: 14px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;

        padding-bottom: 15px;

        scrollbar-width: none;
    }

    .home-news-loop
    .wp-block-post-template::-webkit-scrollbar {
        display: none;
    }

    .home-news-loop
    .wp-block-post-template > li {
        scroll-snap-align: start;
    }

    .home-news-card {
        padding: 18px;
    }

    .home-news-card .wp-block-post-title {
        font-size: 22px;
    }

    .home-news::after {
        font-size: 46vw;
    }


    /* COMPANY */

    .home-company {
        padding:
            75px
            0
            85px;
    }

    .home-company .home-inner {
        display: block;
    }

    .home-company-copy h3 {
        margin-bottom: 28px;

        font-size: clamp(30px, 9vw, 42px);
    }

    .home-company-copy > p {
        font-size: 15px;
        line-height: 1.8;
    }

    .home-company-copy::after {
        width: 95px;
        height: 11px;

        margin-top: 42px;
    }

    .home-company-nav {
        margin-top: 55px;

        gap: 14px;
    }

    .home-company-card {
        min-height: 110px;

        padding: 25px;
    }

    .home-company-card:hover {
        transform: none;
    }

    .home-company::after {
        font-size: 40vw;
    }


    /* LINKS */

    .home-links {
        padding:
            70px
            0
            80px;
    }

    .home-links .home-inner {
        display: block;
    }

    .home-links-copy h2 {
        font-size: 30px;
    }

    .home-links-copy > p:last-child {
        margin-top: 30px;

        font-size: 18px;
    }

    .home-links-grid {
        grid-template-columns: 1fr;

        gap: 14px;

        margin-top: 45px;
    }

    .home-link-card {
        min-height: 125px;

        padding: 25px;
    }

    .home-link-card:hover {
        transform: none;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .home-inner {
        width: calc(100% - 32px);
    }

    .home-project-card,
    .home-news-card {
        padding: 16px;
    }

    .home-company-card,
    .home-link-card {
        padding: 22px 20px;
    }

}