
/* #region ========== 01 | FORSIDE OG LOGO ========== */

.hero {
    text-align: center;
    padding: 65px 20px 70px;
}

.hero h1 {
    font-family: 'Allura', cursive;
    font-size: clamp(45px, 7vw, 110px);
    font-weight: normal;
    line-height: 1.2;
    margin: 0;
    color: #242424;
}

.hero p {
    font-size: 15px;
    letter-spacing: 3px;
    color: #777777;
    margin: 15px 0 0;
}

/* #endregion */


/* #region ========== 02 | NEW ARRIVALS ========== */

.gallery {
    max-width: 1500px;
    margin: 65px auto 0;
    padding: 0 30px 120px;
    text-align: center;
}

.gallery-heading {
    position: relative;
    margin-bottom: 55px;
}

.gallery h2 {
    font-size: 42px;
    font-weight: normal;
    margin: 0;
    color: #242424;
}

/* #endregion */


/* #region ========== 03 | PILE OG NUMMERERING ========== */

.gallery-controls {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-counter {
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    color: #888888;
    margin-right: 10px;
}

.gallery-arrow {
    width: 42px;
    height: 42px;

    border: 1px solid #D8D4CC;
    background: transparent;
    color: #242424;

    font-size: 20px;
    cursor: pointer;

    transition: 0.2s ease;
}

.gallery-arrow:hover {
    border-color: #242424;
    background-color: #EEEAE3;
}

.gallery-arrow:focus-visible {
    outline: 2px solid #242424;
    outline-offset: 3px;
}

/* #endregion */


/* #region ========== 04 | KARRUSELLENS LAYOUT ========== */

.gallery-viewport {
    overflow: hidden;
    width: 100%;
}

.artworks {
    display: flex;
    gap: 60px;
    align-items: flex-start;

    transition: transform 0.45s ease;
    will-change: transform;
}

.artwork {
    flex: 0 0 calc((100% - 60px) / 2);
    min-width: 0;
    text-align: left;
}

/* #endregion */


/* #region ========== 05 | MALERIERNES BILLEDER ========== */

/*
    Alle malerier vises i lige store kvadratiske felter.

    Hele motivet vises uden beskæring.

    Kvadratiske billeder fylder feltet.
    Aflange billeder får hvide kanter i siderne
    eller over og under billedet.
*/

.artwork-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Billedfeltet har altid samme størrelse */

.artwork-link img,
.artwork > img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 1 / 1;

    object-fit: contain;
    object-position: center;

    background-color: #ffffff;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}

/* Generel billedregel for øvrige kunstværker */

.artwork img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 1 / 1;

    object-fit: contain;
    object-position: center;

    background-color: #ffffff;
}

/* #endregion */


/* #region ========== 06 | TITLER OG BESKRIVELSER ========== */

.artwork h3 {
    font-size: 26px;
    font-weight: normal;
    margin: 22px 0 10px;
    color: #242424;
}

.artwork p {
    font-size: 13px;
    letter-spacing: 1px;
    color: #777777;
    margin: 0;
}

/* #endregion */


/* #region ========== 07 | KOMMENDE MALERIER ========== */

.placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;

    border: 1px solid #D8D4CC;
    box-sizing: border-box;

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

    background-color: #ffffff;
}

.placeholder span {
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    color: #999999;
}

/* #endregion */


/* #region ========== 08 | KLIKBARE MALERIER ========== */

.artwork-link img {
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.artwork-link:hover img {
    transform: scale(1.01);
    opacity: 0.96;
}

.artwork-link:hover h3 {
    text-decoration: underline;
}

/* #endregion */


/* #region ========== 09 | TABLET-VENLIG FORSIDE ========== */

@media (max-width: 900px) {

    .hero {
        padding: 55px 20px 60px;
    }

    .hero h1 {
        font-size: clamp(45px, 8vw, 82px);
    }

    .gallery {
        margin-top: 50px;
    }

    .gallery h2 {
        font-size: 38px;
    }

    .artworks {
        gap: 35px;
    }

    .artwork {
        flex-basis: calc((100% - 35px) / 2);
    }

    .gallery-heading {
        margin-bottom: 45px;
    }

}

/* #endregion */


/* #region ========== 10 | MOBILVENLIG FORSIDE ========== */

@media (max-width: 600px) {

    .hero {
        padding: 45px 20px 50px;
    }

    .hero h1 {
        font-size: clamp(42px, 10vw, 62px);
    }

    .hero p {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .gallery {
        margin-top: 40px;
        padding: 0 20px 80px;
    }

    .gallery-heading {
        margin-bottom: 30px;
    }

    .gallery h2 {
        font-size: 34px;
    }

    .gallery-controls {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 20px;
    }

    .artworks {
        gap: 20px;
    }

    .artwork {
        flex-basis: 100%;
    }

    .artwork h3 {
        font-size: 24px;
    }

}

/* #endregion */


/* #region ========== 11 | REDUCERET ANIMATION ========== */

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

    .artworks {
        transition: none;
    }

    .artwork-link img {
        transition: none;
    }

}

/* #endregion */
