/* =========================================================
   Gnomissimo — Photography Home V1
   ========================================================= */

.gn-home {
    --gn-text: #151515;
    --gn-muted: #77736e;
    --gn-gap: clamp(16px, 2vw, 34px);

    width: min(1560px, calc(100% - clamp(28px, 6vw, 104px)));
    margin-inline: auto;
	padding-bottom: 3rem;
}

.gn-home__intro {
    max-width: 780px;
    margin: 0 0 clamp(52px, 7vw, 110px);
}

.gn-home__eyebrow {
    margin: 0 0 18px;
    color: var(--gn-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gn-home__title {
    margin: 0;
    color: var(--gn-text);
    font-size: clamp(30px, 3vw, 50px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.045em;
}

.gn-home__title span {
    font-style: italic;
    font-weight: 300;
}

.gn-wall {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: var(--gn-gap);
    align-items: start;
}

.gn-story {
    min-width: 0;
}

.gn-story--a-wide {
    grid-column: span 8;
}

.gn-story--a-tall {
    grid-column: span 4;
}

.gn-story--b-square {
    grid-column: span 5;
}

.gn-story--b-wide {
    grid-column: span 7;
}

.gn-story--c-wide {
    grid-column: span 7;
}

.gn-story--c-tall {
    grid-column: span 5;
}

.gn-story--feature {
    grid-column: 2 / span 10;
    margin-block: clamp(18px, 2vw, 40px);
}

.gn-story__link {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
}

.gn-story__media {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: #f2f1ef;
}

.gn-story--a-wide .gn-story__media {
    aspect-ratio: 16 / 9;
}

.gn-story--a-tall .gn-story__media {
    aspect-ratio: 8 / 9;
}

.gn-story--b-square .gn-story__media {
    aspect-ratio: 1 / 1;
}

.gn-story--b-wide .gn-story__media {
    aspect-ratio: 7 / 5;
}

.gn-story--c-wide .gn-story__media {
    aspect-ratio: 7 / 4;
}

.gn-story--c-tall .gn-story__media {
    aspect-ratio: 5 / 4;
}

.gn-story--feature .gn-story__media {
    aspect-ratio: 2 / 1;
}

.gn-story__image,
.gn-story__image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.gn-story__image {
    object-fit: cover;
    transform: scale(1);
    transition:
        transform .65s cubic-bezier(.2,.65,.25,1),
        filter .45s ease;
}

.gn-story__image-placeholder {
    min-height: 280px;
    background: #efeeeb;
}

.gn-story__meta {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: clamp(18px, 2.2vw, 34px);
    color: #fff;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity .28s ease,
        transform .35s ease;
}

.gn-story__link::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .46) 0%,
            rgba(0, 0, 0, .09) 35%,
            rgba(0, 0, 0, 0) 62%
        );
    opacity: 0;
    transition: opacity .35s ease;
}

.gn-story__title {
    max-width: 90%;
    margin: 0;
    color: inherit;
    font-size: clamp(17px, 1.5vw, 25px);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -.02em;
}

.gn-story__link:hover .gn-story__image {
    transform: scale(1.018);
}

.gn-story__link:hover::after,
.gn-story__link:focus-visible::after {
    opacity: 1;
}

.gn-story__link:hover .gn-story__meta,
.gn-story__link:focus-visible .gn-story__meta {
    opacity: 1;
    transform: translateY(0);
}

.gn-story__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}


/* Tablet */
@media (max-width: 900px) {

    .gn-home {
        width: min(100% - 40px, 1100px);
        padding-top: 60px;
    }

    .gn-home__intro {
        margin-bottom: 56px;
    }

    .gn-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px;
    }

    .gn-story,
    .gn-story--feature {
        grid-column: span 1;
        margin-block: 0;
    }

    .gn-story__media,
    .gn-story--a-wide .gn-story__media,
    .gn-story--a-tall .gn-story__media,
    .gn-story--b-square .gn-story__media,
    .gn-story--b-wide .gn-story__media,
    .gn-story--c-wide .gn-story__media,
    .gn-story--c-tall .gn-story__media,
    .gn-story--feature .gn-story__media {
        aspect-ratio: 4 / 5;
    }

    .gn-story__meta {
        position: static;
        padding: 12px 0 0;
        color: var(--gn-text);
        opacity: 1;
        transform: none;
    }

    .gn-story__link::after {
        display: none;
    }

    .gn-story__title {
        max-width: none;
        font-size: 16px;
    }
}


/* Mobile */
@media (max-width: 620px) {

    .gn-home {
        width: calc(100% - 28px);
        padding: 42px 0 90px;
    }

    .gn-home__intro {
        margin-bottom: 44px;
    }

    .gn-home__eyebrow {
        margin-bottom: 13px;
        font-size: 10px;
    }

    .gn-home__title {
        max-width: 520px;
        font-size: clamp(35px, 12vw, 54px);
    }

    .gn-wall {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .gn-story {
        grid-column: 1;
    }

    .gn-story__media,
    .gn-story--a-wide .gn-story__media,
    .gn-story--a-tall .gn-story__media,
    .gn-story--b-square .gn-story__media,
    .gn-story--b-wide .gn-story__media,
    .gn-story--c-wide .gn-story__media,
    .gn-story--c-tall .gn-story__media,
    .gn-story--feature .gn-story__media {
        aspect-ratio: auto;
    }

    .gn-story__image {
        height: auto;
        object-fit: contain;
    }

    .gn-story__title {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gn-story__image,
    .gn-story__meta,
    .gn-story__link::after {
        transition: none;
    }
}


/* =========================================================
   Gnomissimo — Home V2
   ========================================================= */

/* A slightly tighter editorial canvas than the original wall */
.gn-home {
    width: min(
        1320px,
        calc(100% - clamp(28px, 6vw, 104px))
    );
}


/* Entry into the complete archive */
.gn-home__archive-link {
    width: 100%;

    margin:
        clamp(58px, 7vw, 96px)
        0
        0;

    padding-top:
        clamp(24px, 3vw, 38px);

    border-top:
        1px solid rgba(18, 27, 36, .12);
}

.gn-home__archive-link a {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #151515;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;

    letter-spacing: .08em;
    text-transform: uppercase;

    text-decoration: none;
}

.gn-home__archive-link a span {
    font-size: 18px;

    transition:
        transform .25s ease;
}

.gn-home__archive-link a:hover span,
.gn-home__archive-link a:focus-visible span {
    transform: translateX(4px);
}


/* Mobile */
@media (max-width: 620px) {

    .gn-home__archive-link {
        margin-top: 52px;
    }
}


/* =========================================================
   Gnomissimo — Home exact row alignment
   ========================================================= */

@media (min-width: 901px) {

    /*
     * Let every grid row establish one exact common height.
     */
    .gn-wall {
        align-items: stretch;
    }


    /*
     * These cards are the flexible partner in their row.
     *
     * a-tall:
     *   pairs with a-wide on rows 1 and 5
     *
     * b-wide:
     *   pairs with b-square
     *
     * c-tall:
     *   pairs with c-wide
     */
    .gn-story--a-tall .gn-story__link,
    .gn-story--b-wide .gn-story__link,
    .gn-story--c-tall .gn-story__link {
        height: 100%;
    }


    .gn-story--a-tall .gn-story__media,
    .gn-story--b-wide .gn-story__media,
    .gn-story--c-tall .gn-story__media {
        height: 100%;
        aspect-ratio: auto;
    }


    .gn-story--a-tall .gn-story__image,
    .gn-story--b-wide .gn-story__image,
    .gn-story--c-tall .gn-story__image {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }
}
