/* Global definition */
:root {
    --header_height: 71px;
    --gutter_size: clamp(12px, 2.4vw, 30px);
    --gallery_row_margin_bottom: 70px;
    --side_margins: 35px;
    --grid-template: var(--side_margins) repeat(12, minmax(0, 1fr)) var(--side_margins);
    --dark: #363636;
    --light: #FAFAFA;
    --accent_yellow: #DEEE81;
    --accent_blue: #264676;
    --links: #005C8A;
}

@font-face {
    font-family: Haskoy;
    src: url('../fonts/Haskoy-variable.woff2') format('woff2');
    font-display: swap;
}

body {
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: var(--gutter_size);
    font-family: Haskoy;
    font-size: 17px;
    color: var(--dark);
    margin: auto;
    background-color: var(--light);
    max-width: 1600px;
}

body.body-menu-open {
    overflow: hidden;
}

p {
    margin-bottom: 5px;
}

a {
    color: var(--links);
    text-shadow: none;
    transition: text-shadow 0.2s ease;
}

a:hover {
    text-shadow: 0.4px 0 0 currentColor, -0.4px 0 0 currentColor;
}

body.home-layout {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
    /* margin-top: 0; */
    margin-bottom: -8px;
}

h1, h2, h3 {
    font-weight: 550;
}

nav {
    display: flex;
    align-items: baseline;
    width: 100%;
    grid-column: 2 / 14;
}

nav .nav-links {
    display: flex;
    align-items: center;
    margin-left: auto;
    transition: none;
}

nav.animate .nav-links {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-size: 18px;
    padding: 16px 16px;
    transition: text-shadow 0.1s ease, color 01s ease;
    text-transform: uppercase;
}

nav>a {
    font-size: 30px;
    font-weight: 600;
    padding-left: 0;
    text-transform: none;
    z-index: 5000;
    white-space: nowrap;
}

nav .nav-links a {
    font-size: 17px;
    letter-spacing: 5%;
    padding-left: clamp(8px, 1.5vw, 24px);
    padding-right: clamp(8px, 1.5vw, 24px);
}

nav .nav-links a:last-child {
    padding-right: 0;
}

nav a:hover {
    text-shadow: 0.4px 0 0 currentColor, -0.4px 0 0 currentColor;
    ;
}

nav>a:hover {
    text-shadow: none;
}

nav a.active {
    /* color: #000; */
    /* font-weight: 600; */
    /* text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor; */
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

nav>a:hover {
    text-decoration: none;
}

.nav-toggle {
    display: none;
}

h3 {
    font-size: 20px;
    margin-bottom: -8px;
}

hr {
    display: block;
    border: 0;
    border-top: 2px solid var(--dark);
    margin: 0 0 20px 0;
    padding: 0;
    grid-column: 1 / 16;
}

img {
    width: 100%;
}

.uppercase {
    text-transform: uppercase;
}

#grid-container {
    /* display: grid;
    grid-template-columns: var(--side_margins) repeat(12, minmax(0, 1fr)) var(--side_margins);
    gap: 0 var(--gutter_size); */
    grid-column: 1 / 15;
    box-sizing: border-box;
    margin-top: var(--header_height);
    margin-bottom: var(--gutter_size)
}

.grid-inherit {
    display: grid;
    grid-template-columns: subgrid;
    gap: var(--gutter_size);
}

header {
    display: grid;
    grid-template-columns: var(--side_margins) repeat(12, minmax(0, 1fr)) var(--side_margins);
    gap: 0 var(--gutter_size);
    grid-column: 1/ 14;
    height: var(--header_height);
    z-index: 3;
    position: fixed;
    /* top: 0;
    left: 0;
    right: 0; */
    width: 100%;
    max-width: 1600px;
    background-color: var(--light);

    transition: transform 0.25s ease;
    z-index: 1000;
}

header.hidden {
    transform: translateY(-105%);
}

main {
    margin-top: var(--gutter_size);
}

.home-layout main {
    margin-top: 0;
}

hr,
main {
    grid-column: 1 / 15;
}

#backToTop {
    position: fixed;
    right: 2rem;
    bottom: 2rem;

    width: 48px;
    height: 48px;

    background-color: #ddd;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    opacity: 0;
    transform: translateY(12px);

    pointer-events: none;

    transition:
        opacity .25s ease,
        transform .25s ease,
        background-color .25s ease;
}

#backToTop.visible {
    opacity: 1;
    transform: translateY(0);

    pointer-events: auto;
}

#backToTop:hover {
    background-color: #aaa;
}

#backToTop svg {
    transform: rotate(-90deg);
    color: var(--light);
}

.image-wrapper + p {
    margin-top: 5px;
    font-size: 15px;
}

.home-slider {
    position: relative;
    background-color: var(--light);
}

#home-slider {
    cursor: none;
}

@media (pointer: coarse) {
    .home-layout #slider-cursor {
        display: none;
    }
}

#slider-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    perspective: 800px;

    opacity: 0;
    transition:
        opacity 0.2s ease,
        transform 0.3s ease;

    /* transform-origin: center center; */
    transform: translate(-50%, -31%);
}

#slider-cursor.visible {
    opacity: 1;
}

#slider-cursor.left svg {
    transform: rotateY(180deg);
}

#slider-cursor svg {
    transition: transform 0.3s ease;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    /* transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; */
    /* will-change: transform; */
    /* left: 100%; */
    /* transform: translateX(100vw); */
    display: grid;
    /* grid-template-columns: 25px repeat(12, minmax(0, 1fr));
  gap: var(--gutter_size);  */
    grid-column: 1/ 15;
}

.slide img {
    /* width: 100%; */
    height: calc(100vh - var(--header_height));
    object-fit: cover;
    object-position: center;
    grid-column: 1 / 14;

    transform-origin: 0 0;
    /* /* transform: translateX(100vw); */
    /* transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; */
    */
}

.slide[data-active] {
    opacity: 1;
    /* transform: translateX(0); */
    /* left: 0; */
    pointer-events: auto;
}

/* .slide[data-active] img {
    opacity: 1;
  transform: translateX(0);
} */

.slide.next-stage {
    transition: none;
    opacity: 0;
    /* transform: translateX(100vw); */
}

.slide.prev-stage {
    transition: none;
    opacity: 0;
    /* transform: translateX(-100vw); */
}

.slide.exit-left {
    /* transform: translateX(-100%); */
    opacity: 0;
}

.slide.exit-right {
    /* transform: translateX(100vw); */
    opacity: 0;
}

.no-transition {
    transition: none !important;
}

.slide-caption {
    position: fixed;
    bottom: 120px;
    /* Distance from the bottom edge */
    /* left: 10vw;  Locks perfectly to your wife's 75px left grid margin! */
    grid-column: 2;
    grid-row: 3;
    grid-template-columns: subgrid;
    display: block;
    color: var(--dark);
    background-color: color-mix(in srgb, var(--light), transparent 30%);
    padding: 2px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.05em;
    z-index: 10;
    /* opacity: 0; */
    visibility: hidden;
    /* transition: opacity 0.4s ease, visibility 0.4s ease; */
}

.home-feature {
    grid-column: 1 / 16;
}

.design-grid {
    grid-column: 1 / 14;
}

.design-layout {
    grid-column: 1 / 14;
}

.design-column {
    grid-column: 2 / 14;
    gap: var(--gutter_size) var(--gutter_size);
}

.design-column span {
    font-size: 20px;
}

.design-column h3 {
    margin-bottom: -12px;
}

.design-column-1 {
    grid-column: 1 / 6;
}

.design-column-2 {
    grid-column: 7 / 13;
    margin-top: var(--gutter_size);
}

.design-column-2 img {
    grid-column: 1 / 13;
}

.design-bottom {
    grid-column: 1 / 14;
    margin-top: 25px;
}

.design-text-container {
    grid-area: text;
}

.text-top {
    grid-area: texttop;
}

.text-rest {
    grid-area: textrest;
}

.design-img-first {
    grid-area: first;
    /* align-self: center; */
    margin-top: 26px;
    height: 95%;
    object-fit: cover;
}

.design-img-stacked {
    grid-area: stacked;
    align-self: center;
}

.design-img-fullwidth:nth-of-type(3) {
    grid-area: full1;
}

.design-img-fullwidth:nth-of-type(4) {
    grid-area: full2;
}

.design-project-grid {
    display: grid;
    gap: var(--gutter_size);
    grid-column: 2 / 14;
    grid-template-columns: 1fr 2fr;

    grid-template-areas:
        "text first"
        "text first";
}

.design-project-grid .image-wrapper {
    grid-area: first;
}

.design-project-grid .credit {
    font-weight: 600;
}

.gallery {
    grid-column: 2 / 14;
    display: grid;
    grid-template-columns: subgrid;
}

.gallery-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    margin-bottom: var(--gutter_size);
    align-items: start;
}

.design-project-gallery .gallery-row.row-margin-bottom-large {
    margin-bottom: var(--gallery_row_margin_bottom);
}

.design-project-gallery .gallery-row.row-margin-bottom-small {
    margin-bottom: var(--gutter_size);
}

.gallery-row.full-width .gallery-row-element {
    grid-column: 1 / -1;
}

.gallery-row.left-wide .gallery-row-element:first-child {
    grid-column: 1 / 9;
}

.gallery-row.left-wide .gallery-row-element:last-child {
    grid-column: 9 / 13;
}

.gallery-row.right-wide .gallery-row-element:first-child {
    grid-column: 1 / 5;
}

.gallery-row.right-wide .gallery-row-element:last-child {
    grid-column: 5 / 13;
}

.gallery-row.halves .gallery-row-element:first-child {
    grid-column: 1 / 7;
}

.gallery-row.halves .gallery-row-element:last-child {
    grid-column: 7 / 13;
}

.gallery-row.thirds .gallery-row-element:first-child {
    grid-column: 1 / 5;
}

.gallery-row-element.image {
    display: grid;
}

.gallery-row.thirds .gallery-row-element {
    grid-column: 5 / 9;
}

.gallery-row.thirds .gallery-row-element:last-child {
    grid-column: 9 / 13;
}

.gallery-row-element .image-wrapper {
    width: 100%;
    /* height: 100%; */
}

.gallery-row-element img {
    width: 100%;
    height: 100%;
}

.gallery-row.fit-cover img {
    object-fit: cover;
}

.gallery-row.fit-contain img {
    object-fit: contain;
    object-position: top;
}

.gallery-row-element.text {
    align-content: center;
    width: 100%;
}

.gallery-row-element.text > h2:first-child, .gallery-row-element.text > p:first-child {
    margin-top: 0;
}

.gallery-row-element.image {
    height: 100%;
}

.gallery-row-element.text h3:first-of-type {
    margin-top: 0;
}

.project-card-wrapper {
    width: 100%;
}

.project-card {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    opacity: 0;
    clip-path: inset(50% 0 50% 0);
    transition: clip-path 0.6s ease-out, opacity 0.3s ease-out;
    transition-delay: var(--delay, 0s);
}

.project-card.visible {
    opacity: 1;
    clip-path: inset(0% 0 0% 0);
}

.project-card.no-link {
    /* pointer-events: none;
    cursor: default; */
}

.project-card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    margin-bottom: 16px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    width: 100%;
    color: var(--dark);
    margin-bottom: 36px;
    display: flex;
    align-items: center;
}

.project-info h3 {
    font-size: 17px;
    margin: 0 0 0px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5%;
}

.project-info p {
    font-size: 15px;
    margin: 0;
    letter-spacing: 5%;
    font-weight: 400;
}

.project-card:hover img {
    transform: scale(1.05);
}

#more-projects {
    display:grid;
    grid-template-columns:subgrid;
    grid-column:2/14;
}

#more-projects > h2 {
    display: grid;
    grid-column: 1 / 13;
    margin-bottom: 16px;
}

#more-projects div:nth-of-type(1) {
    grid-column: 1 / 5;
}

#more-projects div:nth-of-type(2) {
    grid-column: 5 / 9;
}

#more-projects div:nth-of-type(3) {
    grid-column: 9 / 13;
}

.full-photo {
    grid-column: 2 / 14;
}

.half-photo-left {
    grid-column: 2 / 8;
}

.half-photo-right {
    grid-column: 8 / 14;
}

.photography-layout {
    grid-column: 2 / 14;
    display: flex;
}

.photography-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gutter_size);
}

.photography-column img {
    width: 100%;
    height: auto;
    display: block;
}

.about-layout {
    grid-column: 2 / 14;
    gap: 0 var(--gutter_size);
}

.project-card:hover {
    text-shadow: none;
}

.about-column > h3:first-child {
    font-size: 20px;
    font-weight: 600;
    margin: 0px;
}

.about-layout hr {
    margin-top: 10px;
    margin-bottom: 0px;
    border-top: 1px solid var(--dark);
}

ul {
    list-style: none;
    padding-left: 0;
    /* line-height: 160%; */
    /* list-style-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 60 60'%3E%3Cpath d='M0 20 h60 L30 55 v-11 L44 27 H0z' fill='black'/%3E%3C/svg%3E"); */
}

ul li {
    display: flex;
    align-items: flex-start;
    /* 2. Vertically centers the SVG bullet and the text perfectly */
    gap: 7px;
    /* 3. Clean, uniform space between icon and words */
    margin-bottom: 8px;
    /* Spacing between list rows */
}

ul li::before {
    content: "";
    display: inline-block;
    width: 13px;
    /* Easily scale the size of the bullet icon right here */
    height: 13px;
    /* Drop your Data URI string as a background image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 60 60'%3E%3Cpath d='M0 20 h60 L30 55 v-11 L44 27 H0z' fill='%23000000'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;

    /* Safeguard: Stops the icon from shrinking if the text wraps to multiple lines */
    flex-shrink: 0;
    margin-top: 5px;
}

svg {
    vertical-align: center;
}

.about-column {
    /* display: flex; */
    flex-direction: column;
    gap: 0 var(--gutter_size);
    margin-bottom: 24px;
}

.about-column-1 {
    grid-column: 1 / 13;
}

.about-column-2 {
    grid-column: 1 / 8;
}

.about-column-3 {
    grid-column: 8 / 13;
}

.about-column-1 figure {
    grid-column: 1 / 8;
    margin: 0;
}

.about-column-1 figcaption {
    font-size: 0.6rem;
    text-align: right;
}

.about-column-1 div {
    grid-column: 8 / 13;
}

/* Image gallery lightbox */
/* LIGHTBOX BACKDROP LAYOUT */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    /* Floats above everything, including your navigation */

    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: 85px 1fr 85px;
    grid-template-rows: 5vh 1fr 5vh;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-trigger {
    cursor: pointer;
}

/* Open Active Toggle State */
.lightbox-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Lightbox Image Container Frame */
.lightbox-img-wrapper {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-self: center;
    align-items: center;
    grid-column: 2 / 3;
    grid-row: 2 / 2;
    width: fit-content;
    height: fit-content;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
    cursor: default;
}

/* CONTROLS & CAPTIONS */
.lightbox-close {
    /* position: absolute; */
    /* top: 10px; */
    /* right: 27px; */
    /* padding: 0; */
    background: none;
    border: none;
    color: var(--light);
    font-size: 44px;
    cursor: pointer;
    grid-column: 3 / 3;
    grid-row: 1 / 1;
    margin: -4px 0 0 0;
    /* justify-self: left; */
}

.lightbox-nav {
    /* position: absolute; */
    /* top: 50%; */
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    grid-row: 2 / 2;
    /* padding: 20px; */
    /* justify-self: center; */
}

.lightbox-prev {
    grid-column: 1 / 2;
    /* justify-self: right; */
    /* padding-right: 14px; */
}

.lightbox-next {
    grid-column: 3 / 4;
    /* justify-self: left; */
    /* padding-left: 14px; */
}

.lightbox-caption {
    position: absolute;
    bottom: 15px;
    color: #fff;
    font-family: sans-serif;
    font-size: 14px;
    letter-spacing: 0.05em;
}

@media (max-width: 800px) {
    /* .design-column-1 {
        grid-column: 1 / 14;
    } */

    .nav-toggle {
        display: block;
        margin: auto 0 auto auto;
        background: none;
        border: none;
        cursor: pointer;
        padding: 12px 0 12px 12px;
        z-index: 3000;
        /* Keeps it on top of the menu when opened */
    }

    .hamburger {
        display: block;
        position: relative;
        width: 24px;
        height: 2px;
        background: var(--dark);
        transition: background 0.2s ease;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 24px;
        height: 2px;
        background: var(--dark);
        transition: transform 0.3s ease, top 0.3s ease;
    }

    .hamburger::before {
        top: -8px;
    }

    .hamburger::after {
        top: 8px;
    }

    nav .nav-links {
        position: fixed;
        top: 0;
        right: 100vw;
        width: 100vw;
        height: 100vh;
        background-color: var(--accent_yellow);
        z-index: 2500;
        flex-direction: column;
        justify-content: center;
        /* align-items: stretch; */
        /* gap: 24px; */
        /* transform: translateX(100%); */
        opacity: 0;
        transition: opacity 0.3s ease;
        /* transition: none; */
    }

    nav .nav-links a {
        font-size: 22px;
        /* padding: 12px 24px 12px 50px; */
    }

    nav .nav-links a:nth-child(1),
    nav .nav-links a:last-child {
        /* padding-left: 50px; */
        padding-right: 24px;
        font-size: 22px;
    }

    nav.menu-open .nav-links {
        /* transform: translateX(0); Glides directly into viewport */
        right: 0;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Morph the hamburger icon into an 'X' close button */
    nav.menu-open .hamburger {
        background: transparent;
    }

    nav.menu-open .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    nav.menu-open .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .about-column-1 {
        grid-column: 1 / 14;
        flex-direction: row;
        margin-bottom: 20px;
    }

    .about-column-2 {
        grid-column: 1 / 8;
    }

    .about-column-3 {
        grid-column: 8 / 13;
    }

    .design-text-container {
        display: contents;
    }

    .design-img-first {
        margin-top: 0;
    }

    .design-project-grid {

        grid-template-columns: 1fr;

        grid-template-areas:
            "texttop"
            "first"
            "textrest"
            "stacked";
    }

    /* Ensure all images scale cleanly */
    .design-project-grid img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .gallery-row {
        display: flex;
        flex-direction: column;
        gap: var(--gutter_size);
        align-items: unset;
    }

    .gallery-row-element.text h3 {
        margin-top: 12px;
    }

    .gallery-row.thirds,
    .gallery-row.right-wide,
    .gallery-row.left-wide {
        display: flex;
        flex-direction: column;
    }

    .gallery-row.thirds .gallery-row-element.image,
    .gallery-row.right-wide .gallery-row-element.image,
    .gallery-row.left-wide .gallery-row-element.image {
        order: 1;
    }

    .gallery-row.thirds .gallery-row-element.text,
    .gallery-row.gallery-row.right-wide .gallery-row-element.text,
    .gallery-row.gallery-row.left-wide .gallery-row-element.text {
        order: 2;
    }

    /* .lightbox-img-wrapper {
        grid-column: 1 / 4;
        margin: 0 10px;
    }

    .lightbox-nav {
        grid-column: 2 / 2;
        grid-row: 1 / 1;
        margin-top: 47px;
    }

    .lightbox-nav svg {
        width: 32px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
    }

    .lightbox-prev {
        margin-right: 30vw;
        justify-self: center;
    }

    .lightbox-next {
        margin-left: 30vw;
        justify-self: center;
    } */

    #slider-cursor {
        /* display: none; */
    }
}

@media (max-width: 635px) {

    :root {
        --side_margins: 5px;
    }

    header {
        /* margin-bottom: 20px; */
    }


    .home-layout #grid-container>hr {
        /* display: none; */
    }

    #grid-container>hr {
        /* margin-bottom: 20px; */
    }

    .home-slider {
        /* position: unset; */
    }

    .half-photo-left,
    .half-photo-right {
        grid-column: 2 / 14;
    }

    .photography-layout {
        flex-direction: column;
    }

    .photography-column {
        width: 100%
    }

    .about-column-1,
    .about-column-1 figure,
    .about-column-1 div,
    .about-column-2,
    .about-column-3 {
        grid-column: 1 / 14;
        flex-direction: column;
    }

    .lightbox-trigger {
        cursor: default;
    }
}