:root {
    --background: #f6f5f1;
    --text: #171717;
    --muted: #77736c;
    --border: #dedbd3;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(246,245,241,.90);

    backdrop-filter: blur(14px);

    border-bottom:
        1px solid
        rgba(222,219,211,.8);
}

.nav {
    max-width: 1240px;
    height: 76px;

    margin: auto;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--text);
    text-decoration: none;

    font-size: 19px;
    font-weight: 750;

    letter-spacing: -.04em;
}

.brand span {
    font-weight: 400;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;

    font-size: 13px;

    transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    max-width: 1240px;

    margin: auto;

    padding:
        82px 28px 64px;

    display: grid;

    grid-template-columns:
        1.15fr .85fr;

    gap: 60px;

    align-items: end;
}

.eyebrow {
    text-transform: uppercase;

    letter-spacing: .16em;

    font-size: 11px;

    color: var(--muted);

    margin-bottom: 18px;
}

.hero h1 {
    font-size:
        clamp(52px, 8vw, 105px);

    line-height: .88;

    letter-spacing: -.075em;

    margin: 0;

    max-width: 780px;

    font-weight: 650;
}

.hero-right p {
    max-width: 420px;

    color: var(--muted);

    font-size: 16px;

    line-height: 1.65;

    margin: 0 0 5px;
}


/* =========================================================
   LOCATION NAVIGATION
========================================================= */

.location-bar {
    max-width: 1240px;

    margin: auto;

    padding: 20px 28px;

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    border-top:
        1px solid
        var(--border);
}

.location-pill {
    display: inline-block;

    padding: 9px 15px;

    border:
        1px solid
        var(--border);

    border-radius: 100px;

    color: var(--text);

    text-decoration: none;

    font-size: 12px;

    transition: all .2s ease;
}

.location-pill:hover,
.location-pill.active {
    background: var(--text);

    color: white;

    border-color: var(--text);
}

.no-locations {
    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   GALLERY CONTAINER
========================================================= */

.gallery-container {
    max-width: 1240px;

    margin: auto;

    padding:
        30px 28px 110px;
}


/* =========================================================
   LOCATION HEADING
========================================================= */

.location-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin: 18px 0 25px;
}

.small-label {
    color: var(--muted);

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .15em;

    margin-bottom: 7px;
}

.location-heading h2 {
    font-size: 46px;

    letter-spacing: -.055em;

    line-height: 1;

    margin: 0;
}

.photo-count {
    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   PHOTO GRID
========================================================= */

.photo-grid {
    display: grid;

    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    gap: 14px;

    align-items: start;
}


/*
|--------------------------------------------------------------------------
| PHOTO CARD
|--------------------------------------------------------------------------
|
| Absolutely NO fixed height.
|
*/

.photo-card {
    position: relative;

    margin: 0;

    padding: 0;

    overflow: hidden;

    background: #e8e6e1;

    cursor: zoom-in;

    /*
     * Do not give this element a height.
     */
    height: auto;

    min-height: 0;

    aspect-ratio: auto;
}


/*
|--------------------------------------------------------------------------
| Desktop layout
|--------------------------------------------------------------------------
*/

.photo-card:nth-child(1) {
    grid-column: span 7;
}

.photo-card:nth-child(2) {
    grid-column: span 5;
}

.photo-card:nth-child(n+3) {
    grid-column: span 4;
}


/*
|--------------------------------------------------------------------------
| THE IMAGE
|--------------------------------------------------------------------------
|
| The image determines its own height.
|
*/

.photo-card img {
    display: block;

    width: 100%;

    /*
     * CRITICAL:
     * Never use height: 100%.
     */

    height: auto;

    min-height: 0;

    max-width: 100%;

    object-fit: initial;

    object-position: initial;

    aspect-ratio: auto;

    user-select: none;

    -webkit-user-drag: none;

    transition:
        transform .8s
        cubic-bezier(.2,.7,.2,1);
}

.photo-card:hover img {
    transform: scale(1.025);
}


/* =========================================================
   CAPTION
========================================================= */

.photo-card figcaption {
    position: absolute;

    left: 18px;
    bottom: 16px;

    color: white;

    font-size: 12px;

    text-shadow:
        0 1px 14px
        rgba(0,0,0,.8);

    opacity: 0;

    transform:
        translateY(5px);

    transition:
        all .3s ease;
}

.photo-card:hover figcaption {
    opacity: 1;

    transform:
        translateY(0);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty {
    padding: 100px 20px;

    text-align: center;

    color: var(--muted);
}


/* =========================================================
   LIGHTBOX
========================================================= */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 1000;

    background:
        rgba(10,10,10,.96);

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.lightbox.open {
    opacity: 1;

    visibility: visible;
}

.lightbox-image-container {
    width:
        min(90vw, 1500px);

    height: 88vh;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;
}

.lightbox-image-container img {
    display: block;

    max-width: 100%;

    max-height:
        calc(100% - 35px);

    width: auto;

    height: auto;

    object-fit: contain;

    user-select: none;

    -webkit-user-drag: none;
}

.lightbox-caption {
    color:
        rgba(255,255,255,.75);

    font-size: 12px;

    margin-top: 12px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    border: 0;

    background: transparent;

    color: white;

    cursor: pointer;

    z-index: 10;
}

.lightbox-close {
    top: 20px;

    right: 28px;

    font-size: 42px;

    font-weight: 200;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;

    transform:
        translateY(-50%);

    font-size: 60px;

    font-weight: 200;

    padding: 20px;
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: .65;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    max-width: 1240px;

    margin: auto;

    border-top:
        1px solid
        var(--border);

    padding:
        30px 28px;

    color: var(--muted);

    font-size: 12px;

    display: flex;

    justify-content: space-between;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {

    /*
    |--------------------------------------------------------------------------
    | Header
    |--------------------------------------------------------------------------
    */

    .nav {
        height: 68px;

        padding:
            0 20px;
    }

    .nav-links {
        display: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Hero
    |--------------------------------------------------------------------------
    */

    .hero {
        grid-template-columns: 1fr;

        gap: 35px;

        padding:
            55px 20px 45px;
    }

    .hero h1 {
        font-size:
            clamp(
                50px,
                16vw,
                80px
            );
    }


    /*
    |--------------------------------------------------------------------------
    | Locations
    |--------------------------------------------------------------------------
    */

    .location-bar {
        padding:
            20px;
    }


    /*
    |--------------------------------------------------------------------------
    | Gallery
    |--------------------------------------------------------------------------
    */

    .gallery-container {
        padding:
            30px 20px 80px;
    }


    /*
    |--------------------------------------------------------------------------
    | Location heading
    |--------------------------------------------------------------------------
    */

    .location-heading {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 15px;
    }

    .location-heading h2 {
        font-size: 40px;
    }


    /*
    |--------------------------------------------------------------------------
    | MOBILE GRID
    |--------------------------------------------------------------------------
    |
    | Completely remove the 12-column desktop layout.
    |
    */

    .photo-grid {
        display: block;

        width: 100%;

        margin: 0;

        padding: 0;
    }


    /*
    |--------------------------------------------------------------------------
    | MOBILE PHOTO CARD
    |--------------------------------------------------------------------------
    |
    | Every card is exactly as tall as its image.
    |
    */

    .photo-card,
    .photo-card:nth-child(1),
    .photo-card:nth-child(2),
    .photo-card:nth-child(n+3) {

        display: block;

        width: 100%;

        height: auto;

        min-height: 0;

        max-height: none;

        aspect-ratio: auto;

        grid-column: auto;

        margin:
            0 0 14px;

        padding: 0;

        overflow: hidden;
    }


    /*
    |--------------------------------------------------------------------------
    | MOBILE IMAGE
    |--------------------------------------------------------------------------
    |
    | These are deliberately explicit.
    |--------------------------------------------------------------------------
    */

    .photo-card img {

        display: block;

        width: 100%;

        height: auto;

        min-width: 0;

        min-height: 0;

        max-width: 100%;

        max-height: none;

        object-fit: fill;

        object-position: center;

        aspect-ratio: auto;

        transform: none !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Mobile captions
    |--------------------------------------------------------------------------
    */

    .photo-card figcaption {

        opacity: 1;

        transform: none;

        left: 14px;

        bottom: 14px;
    }


    /*
    |--------------------------------------------------------------------------
    | Footer
    |--------------------------------------------------------------------------
    */

    footer {
        display: block;

        padding:
            30px 20px;
    }

    footer div + div {
        margin-top: 10px;
    }


    /*
    |--------------------------------------------------------------------------
    | Lightbox
    |--------------------------------------------------------------------------
    */

    .lightbox-image-container {
        width: 94vw;

        height: 85vh;
    }

    .lightbox-image-container img {
        max-width: 94vw;

        max-height:
            calc(85vh - 40px);

        width: auto;

        height: auto;

        object-fit: contain;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 42px;

        padding: 10px;
    }

    .lightbox-prev {
        left: 2px;
    }

    .lightbox-next {
        right: 2px;
    }

    .lightbox-close {
        top: 10px;

        right: 16px;
    }

}