


@font-face {
    font-family: 'Farnham-italic';
    src: url('../fonts/FarnhamDisplayGR13-Italic.woff2') format('woff2'), url('../fonts/FarnhamDisplayGR13-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* body * {
    background-color: rgba(0, 255, 0, 0.3);
} */

main section:has( + section.loreal-section) {
    margin-bottom: 0;
}

section.loreal-section {
    position: relative;
    background-color: black;
    padding-block: 5rem 3rem;
    /* overflow-x: hidden; */
}

section.loreal-section .post-container {
    padding: 4rem;
}

@media (max-width: 800px) {
    section.loreal-section .post-container {
        max-width: 100%;
        padding: 3rem;
    }
}  

@media (max-width: 770px) {
    section.loreal-section {
        padding: 0;
    }
}

@media (max-width: 500px) {
    section.loreal-section .post-container {
        padding-inline: 1.5rem;
    }
}
  

/* Title */
.loreal-section-title > * {
    color: #efeaea;
    text-align: center;
}

.loreal-section-title h4 {
    font-size: 2rem;
    line-height: 0.85;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.loreal-section-title h2 {
    font-family: var(--accent-font-family);
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.85;
    font-weight: 400;
    margin-bottom: 0.75rem;
    white-space: nowrap;
}

.loreal-section-title h2 em {
    display: block;
    font-family: 'Farnham-italic';
    font-style: italic;
}

.loreal-section-title h2 a {
    color: inherit;
}

.loreal-section-title p {
    font-size: 1.12rem;
    max-width: 65ch;
    margin-inline: auto;
}

@media (max-width: 670px) {
    .loreal-section-title p {
        font-size: 0.95rem;
        max-width: 45ch;
    }
}



/* Grid */
.loreal-section-grid {
    display: grid;
    grid-auto-flow: column;
    width: 100%;
    margin-block: 8vh;
}

@media (max-width: 1200px) {
    .loreal-section-grid {
        margin-block: 7vmax;
    }
}

@media (max-width: 670px) {
    .loreal-section-grid {
        margin-block: 2.5rem;
    }
}


.loreal-section-grid .image {
    width: 100%;
    aspect-ratio: 9 / 16;
    box-shadow: 0 0 5rem rgba(0, 0, 0, 0.7);
    background-color: black;
    border-radius: 0.75rem;
}


@media (max-width: 670px) {
    .loreal-section-grid .image {
        box-shadow: 0 0 2rem rgba(0, 0, 0, 0.7);
    }    
}


@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {

        .loreal-section-grid .image {
            scale: 1 1;    
            animation: imagesAnimation linear forwards; 
            animation-timeline: view();
            animation-range: entry -5rem;
            /* animation-range-start: -4rem; */
            /* animation-range-end: 50vh;     */
        }
        
        @keyframes imagesAnimation {
            from {
                scale: 0.8 0.8;
            }    
        }
    }
}

.loreal-section-grid .image:nth-child(1),
.loreal-section-grid .image:nth-child(2) {
    transform-origin: right center;
}

.loreal-section-grid .image:nth-child(4),
.loreal-section-grid .image:nth-child(5) {
    transform-origin: left center;
}


.loreal-section-grid .image:nth-child(2),
.loreal-section-grid .image:nth-child(4) {
    z-index: 1;
    scale: 1.15;
}

.loreal-section-grid .image:nth-child(3) {
    z-index: 2;
    scale: 1.3;
    transform-origin: center center;
}

.loreal-section-grid .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}



/* Loreal Section Footer */
.loreal-section-footer {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.loreal-section-footer p {
    color: #efeaea;
}

.loreal-section-footer a {
    flex: 0 1 auto;
    width: 250px;
}

.loreal-section-footer a svg {
    width: 100%;
    height: auto;
    fill: #efeaea;
}


@media (max-width: 670px) {
    .loreal-section-footer a {
        width: 190px;
    }
}