/* =========================================================
   FONT
========================================================= */

@font-face {
    font-family: "Cormorant Infant";
    src: url("fonts/CormorantInfant-VariableFont_wght.ttf") format("truetype");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FAFAF8;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

h1,
h2,
h3 {
    font-family: "Cormorant Infant", serif;
    font-style: normal;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    width: 100%;

    padding: 10px 2vw;

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

    position: sticky;
    top: 0;

    z-index: 1000;
}


/* =========================================================
   LOGO
========================================================= */

.brand {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.logo {
    width: 250px;
    height: auto;

    display: block;

    transform: translateY(18px);
}


/* =========================================================
   NAVIGATION
========================================================= */

.navigation {
    display: flex;
    align-items: center;

    gap: 30px;

    transform: translateY(23px);
}

.navigation a {
    position: relative;

    font-family: "Cormorant Infant", serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1;

    opacity: 0.9;
}

.navigation a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -5px;

    width: 100%;
    height: 1.5px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.3s ease;
}

.navigation a:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   ANCHOR POSITIONS
========================================================= */

#work,
#about,
#contact {
    scroll-margin-top: 20px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 75vh;

    display: flex;
    align-items: center;

    padding: 80px 2vw;

    transform: translateY(-60px);
}

.hero-content {
    max-width: 900px;
}

.hero h1 {
    margin-top: 24px;

    font-size: clamp(60px, 9vw, 140px);
    line-height: 0.9;
    letter-spacing: -0.06em;
    font-weight: 500;
}

.hero-description {
    max-width: 460px;

    margin-top: 50px;

    transform: translateY(-40px);

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


/* =========================================================
   PROJECTS
========================================================= */

.projects {
    width: 100%;

    padding: 0 6vw 160px;

    margin-top: 100px;
}


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

.project-grid {
    width: 100%;

    display: grid;

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

    column-gap: 6vw;
    row-gap: 4.5vw;

    align-items: start;
}

.project {
    width: 100%;
    margin: 0;
}

.project:last-child {
    margin-bottom: 0;
}


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

.project-image {
    width: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;

    display: block;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.project:hover .project-image img {
    transform: scale(1.015);
}


/* =========================================================
   OPTIONAL RATIOS
========================================================= */

.project-image.ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.project-image.ratio-3-4 {
    aspect-ratio: 3 / 4;
}

.project-image.ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.project-image.ratio-4-3 img,
.project-image.ratio-3-4 img,
.project-image.ratio-1-1 img {
    width: 100%;
    height: 100%;
}


/* =========================================================
   PROJECT INFO — HOME
========================================================= */

.project-info {
    width: 100%;

    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 20px;

    margin-top: 14px;
}

.project-info h3 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.1;
}

.project-info p {
    flex-shrink: 0;

    font-size: 13px;

    opacity: 0.5;
}


/* =========================================================
   ABOUT
========================================================= */

.about {
    padding: 160px 2vw;

    border-top: 1px solid #ccc;
}

.about-content {
    max-width: 900px;
}

.about-content h2 {
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 500;
}

.about-content p {
    max-width: 500px;

    margin-top: 50px;

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


/* =========================================================
   FOOTER
========================================================= */

.footer {
    width: 100%;

    padding: 25px 2vw;

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

    gap: 20px;

    font-size: 12px;
}

.footer p {
    opacity: 0.5;
}


/* =========================================================
   CONTACT MODAL
========================================================= */

.contact-modal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.25);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;

    z-index: 9999;
}

.contact-modal.active {
    opacity: 1;
    visibility: visible;
}

.contact-window {
    position: relative;

    width: min(500px, 85vw);

    padding: 45px;

    background: #fff;

    transform: translateY(15px);

    transition: transform 0.3s ease;
}

.contact-modal.active .contact-window {
    transform: translateY(0);
}

.contact-close {
    position: absolute;

    top: 15px;
    right: 18px;

    border: none;
    background: none;

    padding: 5px;

    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 200;

    cursor: pointer;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.contact-email {
    font-family: "Cormorant Infant", serif;
    font-size: 22px;
}

.contact-phone {
    margin-top: 8px;

    font-family: "Cormorant Infant", serif;
    font-size: 18px;
}

.contact-email:hover,
.contact-phone:hover {
    text-decoration: underline;
}


/* =========================================================
   =========================================================
   PROJECT PAGES — DESKTOP
   =========================================================
========================================================= */

.project-page {
    width: 100%;
    min-height: 100vh;

    display: grid;
    grid-template-columns: 50% 50%;

    padding-top: 100px;
}


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

.project-images {
    width: 100%;

    padding-left: 20%;
    padding-right: 8%;
    padding-bottom: 100px;

    display: flex;
    flex-direction: column;

    gap: 35px;
}

.project-images img {
    display: block;

    width: 100%;
    max-width: 600px;

    height: auto;

    object-fit: contain;
}


/* =========================================================
   PROJECT FIXED INFO
========================================================= */

.project-info-page {
    position: fixed;

    top: 50%;
    right: 0;

    width: 50%;

    min-height: 0;

    padding-left: 5%;
    padding-right: 15%;

    transform: translateY(-50%);

    z-index: 10;
}

.project-info-inner {
    width: 100%;
}


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

.project-category {
    margin-bottom: 10px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    opacity: 0.5;
}


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

.project-info-inner h1 {
    margin: 0 0 15px 0;

    font-family: "Cormorant Infant", serif;
    font-size: 40px;
    font-weight: 500;

    line-height: 0.95;

    text-decoration: underline;
    text-decoration-thickness: 0.8px;
    text-underline-offset: 5px;
}


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

.project-subtitle {
    max-width: 350px;

    margin: 0 0 15px 0;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;

    line-height: 1.25;

    opacity: 0.9;
}


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

.project-text-description {
    max-width: 370px;

    margin: 0;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;

    line-height: 1.4;
}


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

.project-intro {
    width: 70%;
    max-width: 1000px;

    margin: 0 auto 120px auto;
}

.project-intro h1 {
    margin: 15px 0 40px 0;

    font-family: "Cormorant Infant", serif;
    font-size: clamp(60px, 8vw, 120px);

    font-weight: 400;

    line-height: 0.9;
}

.project-description {
    max-width: 600px;

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


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

.project-hero {
    width: 75%;
    max-width: 1100px;

    margin: 0 auto 150px auto;
}

.project-hero img {
    width: 100%;
    height: auto;

    display: block;
}


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

.project-text {
    width: 70%;
    max-width: 1000px;

    margin: 0 auto 150px auto;

    display: flex;
    justify-content: flex-end;
}

.project-text-content {
    width: 50%;
    max-width: 500px;
}

.project-text-content h3 {
    margin: 0 0 15px 0;

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

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-text-content h2 {
    margin: 0 0 30px 0;

    font-family: "Cormorant Infant", serif;
    font-size: 48px;
    font-weight: 400;

    line-height: 1;
}

.project-text-content p {
    margin: 0 0 20px 0;

    font-size: 16px;
    line-height: 1.6;
}


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

.project-gallery {
    width: 70%;
    max-width: 1000px;

    margin: 0 auto 150px auto;

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

    gap: 80px 100px;
}

.gallery-image {
    width: 100%;
}

.gallery-image img {
    width: 100%;
    height: auto;

    display: block;
}

.gallery-image:nth-child(2) {
    margin-top: 120px;
}

.gallery-image:nth-child(3) {
    margin-top: -20px;
}


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

.project-conclusion {
    width: 60%;
    max-width: 700px;

    margin: 0 auto 120px auto;

    text-align: center;
}

.project-conclusion p {
    font-family: "Cormorant Infant", serif;
    font-size: 32px;
    line-height: 1.2;
}


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

.project-back {
    width: 70%;
    max-width: 1000px;

    margin: 0 auto 150px auto;
}

.project-back a {
    font-size: 14px;
}


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

@media screen and (max-width: 700px) {


    /* =====================================================
       PAGE
    ===================================================== */

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }


    /* =====================================================
       HEADER
    ===================================================== */

    .header {
        width: 100%;

        padding: 20px;

        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        width: 135px;
        height: auto;

        transform: translateY(10px);
    }

    .navigation {
        gap: 16px;

        transform: translateY(10px);
    }

    .navigation a {
        font-size: 19px;
    }


  /* =====================================================
   HERO — MOBILE
===================================================== */

.hero {
    min-height: auto;

    /* Plus d'espace entre le header et les projets */
    padding: 110px 20px 90px;

    transform: none;
}

.hero-content {
    max-width: none;
}

.hero h1 {
    font-size: clamp(52px, 15vw, 78px);

    line-height: 0.9;
    letter-spacing: -0.055em;

    margin-top: 0;
}

.hero-description {
    max-width: 340px;

    margin-top: 35px;

    transform: none;

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


/* =====================================================
   PROJECTS — MOBILE
===================================================== */

.projects {
    width: 100%;

    padding: 50px 20px 120px;

    margin-top: 0;
}


/* =====================================================
   GRILLE 2 COLONNES
===================================================== */

@media screen and (max-width: 700px) {

    /* =====================================================
       PROJECT GRID — MOBILE ONLY
    ===================================================== */

    .project-grid {
        width: 100%;

        display: grid;

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

        column-gap: 20px;
        row-gap: 25px;

        align-items: start;
    }


    /*
       On enlève la structure des 3 colonnes
       uniquement sur mobile.
    */

    .project-column {
        display: contents;
    }


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

    /* Bottle */
    .project-column:nth-child(1) .project:nth-child(1) {
        order: 1;
        grid-column: 1;
        grid-row: 1;
    }

    /* Kit Brick */
    .project-column:nth-child(2) .project:nth-child(1) {
        order: 2;
        grid-column: 2;
        grid-row: 1;
    }

    /* Clover */
    .project-column:nth-child(3) .project:nth-child(1) {
        order: 3;
        grid-column: 1;
        grid-row: 2;
    }

    /* Steps */
    .project-column:nth-child(1) .project:nth-child(2) {
        order: 4;
        grid-column: 2;
        grid-row: 2;
    }

    /* Tronc */
    .project-column:nth-child(2) .project:nth-child(2) {
        order: 5;
        grid-column: 2;
        grid-row: 3;
    }


}
/* =====================================================
   PROJET
===================================================== */

.project {
    width: 100%;

    margin: 0;
}


/* =====================================================
   IMAGES
===================================================== */

.project-image {
    width: 100%;

    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;

    display: block;

    object-fit: cover;
}


/* =====================================================
   INFOS PROJET
===================================================== */

.project-info {
    width: 100%;

    display: flex;

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

    gap: 10px;

    margin-top: 10px;
}

.project-info h3 {
    font-size: 14px;

    font-weight: 500;

    line-height: 1.1;
}

.project-info p {
    flex-shrink: 0;

    font-size: 11px;

    opacity: 0.5;
}


    /* =====================================================
       HOME PROJECT IMAGES
    ===================================================== */

    .project-image {
        width: 100%;
        overflow: hidden;
    }

    .project-image img {
        width: 100%;
        height: auto;

        display: block;

        object-fit: cover;
    }


    /* =====================================================
       HOME PROJECT INFO
    ===================================================== */

    .project-info {
        width: 100%;

        display: flex;
        align-items: baseline;
        justify-content: space-between;

        gap: 15px;

        margin-top: 12px;
    }

    .project-info h3 {
        font-size: 16px;
        font-weight: 500;

        line-height: 1.1;
    }

    .project-info p {
        flex-shrink: 0;

        font-size: 12px;

        opacity: 0.5;
    }


    /* =====================================================
       ABOUT
    ===================================================== */

    .about {
        padding: 120px 20px;
    }

    .about-content {
        max-width: none;
    }

    .about-content h2 {
        font-size: clamp(40px, 11vw, 60px);

        line-height: 0.95;
        letter-spacing: -0.045em;
    }

    .about-content p {
        max-width: 340px;

        margin-top: 35px;

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


    /* =====================================================
       CONTACT MODAL
    ===================================================== */

    .contact-window {
        width: calc(100% - 40px);

        padding: 45px 25px;
    }

    .contact-close {
        top: 12px;
        right: 14px;

        font-size: 26px;
    }

    .contact-email {
        max-width: 100%;

        font-size: 20px;

        overflow-wrap: anywhere;
    }

    .contact-phone {
        font-size: 17px;
    }


    /* =====================================================
       FOOTER
    ===================================================== */

    .footer {
        width: 100%;

        padding: 20px;

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

        gap: 20px;

        font-size: 11px;
    }


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

    .project-page {
        width: 100%;

        min-height: 0;

        display: flex;
        flex-direction: column;

        padding-top: 40px;
    }


    /* =====================================================
       PROJECT IMAGES — MOBILE
    ===================================================== */

    .project-images {
        width: 100%;

        padding:  20px 20px;
         display: flex;
        flex-direction: column;

        /*
           One fixed gap.
           Every image gets exactly the same spacing.
        */

        gap: 20px;
    }

    .project-images img {
        width: 100%;
        max-width: none;

        height: auto;

        display: block;

        object-fit: contain;
    }


    /* =====================================================
       PROJECT INFO — MOBILE
    ===================================================== */

    .project-info-page {
        position: static;

        width: 100%;
        min-height: 0;

        padding: 30px 20px 100px;

        transform: none;
    }

    .project-info-inner {
        width: 100%;
        max-width: 360px;
    }

    .project-info-inner h1 {
        font-size: 40px;

        line-height: 0.95;
    }

    .project-subtitle {
        max-width: 340px;

        font-size: 13px;
        line-height: 1.3;
    }

    .project-text-description {
        max-width: 340px;

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


    /* =====================================================
       PROJECT INTRO — MOBILE
    ===================================================== */

    .project-intro {
        width: auto;
        max-width: none;

        margin: 0 20px 80px;
    }

    .project-intro h1 {
        font-size: clamp(52px, 15vw, 75px);

        line-height: 0.9;

        margin: 15px 0 30px;
    }

    .project-description {
        max-width: 340px;

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


    /* =====================================================
       PROJECT HERO — MOBILE
    ===================================================== */

    .project-hero {
        width: auto;
        max-width: none;

        margin: 0 20px 100px;
    }

    .project-hero img {
        width: 100%;
        height: auto;

        display: block;
    }


    /* =====================================================
       PROJECT TEXT — MOBILE
    ===================================================== */

    .project-text {
        width: auto;
        max-width: none;

        margin: 0 20px 100px;

        display: block;
    }

    .project-text-content {
        width: 100%;
        max-width: 360px;
    }

    .project-text-content h3 {
        font-size: 11px;

        margin-bottom: 12px;
    }

    .project-text-content h2 {
        font-size: 40px;

        line-height: 0.95;

        margin-bottom: 25px;
    }

    .project-text-content p {
        font-size: 15px;

        line-height: 1.55;

        margin-bottom: 18px;
    }


    /* =====================================================
       PROJECT GALLERY — MOBILE
    ===================================================== */

    .project-gallery {
        width: auto;
        max-width: none;

        margin: 0 20px 120px;

        display: grid;
        grid-template-columns: 1fr;

        /*
           Identical vertical gap between every image.
        */

        gap: 80px;
    }

    .gallery-image {
        width: 100%;

        margin-top: 0 !important;
    }

    .gallery-image img {
        width: 100%;
        height: auto;

        display: block;
    }


    /* =====================================================
       CONCLUSION — MOBILE
    ===================================================== */

    .project-conclusion {
        width: auto;
        max-width: none;

        margin: 0 30px 100px;

        text-align: center;
    }

    .project-conclusion p {
        font-size: 28px;

        line-height: 1.2;
    }


    /* =====================================================
       BACK — MOBILE
    ===================================================== */

    .project-back {
        width: auto;
        max-width: none;

        margin: 0 20px 100px;
    }

    .project-back a {
        font-size: 14px;
    }

}