/*
Theme Name: Gregorio Pecorelli
Author: SU—F Studio
Description: Custom Theme by SU—F Studio
Version: 0.0.1
*/

@font-face {
    font-family: Lettera;
    src: url("fonts/Lettera-Regular.woff") format("woff"), 
         url("fonts/Lettera-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: Lettera;
    src: url("fonts/Lettera-Italic.woff2") format("woff2");
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: Alpina;
    src: url("fonts/Alpina-Light.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: Lettera;
    src: url("fonts/Alpina-Light-Italic.woff2") format("woff2");
    font-weight: normal;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

:root {
    --margin-primary: 40px;
    --margin-secondary: 20px;
    --margin-tertiary: 60px;
    --margin-quaternary: 120px;
    --mobile-spacing: 30px;
    --fs-large-desktop: 24px;
    --fs-small-desktop: 18px;
    --fs-large-mobile: 18px;
    --fs-small-mobile: 15px;
    --line-height: 1.33;
    --line-height-paragraph: 1.5;
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: #353535;
    background-color: #f6f6f6;
}

body {
    -ms-autohiding-scrollbar: auto;
    -ms-overflow-style: none;
    overflow: -moz-scrollbars-none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll {
    overflow:hidden;
} 

::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
}

img {
    height: 100%;
    width: 100%;
    font-size: 0;
}
h1, h2, h3, h4, h5, h6, li {
    font-family: Lettera, sans-serif;
    font-style: normal;
    font-weight: normal;
    line-height: var(--line-height);
    margin: 0;
    font-feature-settings: 'ss02' on;
}

h1, h2, h3, h4, li {
    font-size: var(--fs-large-desktop);
}
.single h2 {
    margin-bottom: calc(var(--fs-large-desktop) * var(--line-height));
}
p {
    font-family: Alpina, serif;
    font-size: var(--fs-small-desktop);
    font-style: normal;
    font-weight: normal;
    line-height: var(--line-height-paragraph);
    margin-bottom: calc(var(--fs-small-desktop) * var(--line-height-paragraph));
}

h5, h6, .section-drawer li {
    font-size: var(--fs-small-desktop);
}
.section-drawer li {
    color: #9d9d9c;
}
strong {
    color: #353535;
    font-weight: normal;
}
a {
    text-decoration: none;
    color: #353535;
}
ul {
    list-style:none;
    padding:0;
    margin: 0;
}

h3, .page-list li:not(.current_page_item) a, .cat-list li:not(.active), .info-list a:not(.active), .subpage-list a:not(.active) {
    color: #9d9d9c;
}

main figure {
    margin: 0;
}

main {
    display:grid;
    grid-template-columns: 1fr 2fr;
    padding:20px;
    width: 100%;
    height: auto;
    min-height: 100%;
    box-sizing: border-box;
}

.landing {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background-color: white;
    transition: all 0.5s ease;
    cursor: pointer;
    display: none;
    clip: rect(auto, auto, auto, auto);
    pointer-events: all;
}
.landing.hide {
    top:  -100%;
    bottom: 100%;
}
.landing.show {
    display: block;
}
.landing h1 {
    position: fixed;
    top:40px;
    left: 40px;
    color: white;
}
.landing figure {
    display:none;
    height: 100%;
    width: 100%;
}
.landing figure.show {
    display:block;
}
.landing figure img {
    object-fit: cover;
    height: 100%;
}

.logo *, h3 {
    margin-bottom: calc(var(--fs-large-desktop) * var(--line-height));
}

section {
    box-sizing: border-box;
}

.section-nav {
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
}
nav {
    height: inherit;
    width: inherit;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
}

.cat-list-title {
    color: #9d9d9c;
    cursor: pointer;
    display: contents;
}
.cat-list-title.open {
    color: #353535;
}
.cat-list-title::after {
    content: "+";
    display: inline-block;
    margin-left:6px;
    color: #9d9d9c;
}
.cat-list-title.open::after {
    content: "–";
    color: #353535;
}

.cat-list li {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease 0.5s;
}
.cat-list.open li {
    opacity: 1;
    max-height: 100px;
    transition: opacity 0.5s ease 0.5s, max-height 0.5s ease;
}
.cat-list li.active {
    opacity: 1;
    max-height: 100px;
}
.cat-list li span { 
    cursor: pointer;
}
.single .page-list li::before {
    content: "←";
    display: inline-block;
    margin-right:6px;
    color: #9d9d9c;
}
.single .page-list li:not(.current_page_parent) {
    display: none;
}
.page .subpage-list li {
    color: #9d9d9c;
}
.section-work .grid-item, .section-page .grid-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px;
    opacity: 1;
    max-height: 100vh;
    transition: opacity 0.5s ease 0.5s, max-height 0.5s ease, padding 0.5s ease;
}
.section-work .grid-item.hide {
    opacity: 0;
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease 0.5s, padding 0.5s ease 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.section-page, .section-work, .section-single {
    opacity: 0;
    animation: fadeIn 0.5s ease 0.5s forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.section-single {
    padding: 20px;
    display: block;
    width: 100%;
    overflow: hidden;
    height: calc(100vh - 40px);
}

.swiper {
    height:100%;
}

.swiper figure img {
    width: auto;
    max-height: 100%;
    float:right;
}

.swiper figure figcaption {
    display: none;
}

.swiper-navi {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 5;
    display:flex;

}
.prev-el, .next-el {
    width:50%;
    height:100%;
    cursor: none;
    
}
.prev-el:hover .hover-arrow, .next-el:hover .hover-arrow, .drawer-overlay:hover .hover-close {
    display: block;
}
.hover-arrow, .hover-arrow, .hover-close {
    display: none;
    position: fixed;
    font-family: Lettera, sans-serif;
    font-style: normal;
    font-weight: normal;
    font-size: calc(var(--fs-large-desktop) * 2);
    z-index: 100;
    transform: translate(-18px, -18px);
}
.hover-close {
    transform: rotate(45deg);
}

.section-drawer {
    position: fixed;
    left:0; 
    top: 0;
    width:100%;
    height:100%;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
    visibility: hidden;
    transition: visibility 0.5s ease;
}
.section-drawer.active {
    visibility: visible;
}
.drawer-overlay {
    position: fixed;
    left:0; 
    top: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
    cursor: none;
}
.drawer-inner {
    height: 100%;
    width: calc(33.33% + 40px);
    padding:40px;
    background-color: white;
    overflow: scroll;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.5s ease;
}
.section-drawer.active .drawer-inner {
    transform: translateX(0);
}
.section-drawer li {
    margin-bottom: calc(var(--fs-small-desktop) * var(--line-height));
}
.section-drawer img {
    margin-bottom: calc(var(--fs-large-desktop) * var(--line-height));
}


@media (max-width: 1080px) {

    h1, h2, h3, h4, li {
        font-size: var(--fs-large-mobile);
    }
    
    p {
        font-size: var(--fs-small-mobile);
        margin-bottom: calc(var(--fs-small-mobile) * var(--line-height));
    }
    
    h5, h6, .section-drawer li {
        font-size: var(--fs-small-mobile);
    }

    main {
        grid-template-columns: 1fr;
        padding:10px 10px 30px;
    }
    .landing h1 {
        top: 20px;
        left: 20px;
    }
    .logo *, h3 {
        margin-bottom: calc(var(--fs-large-mobile) * var(--line-height))
    }

    .section-nav {
        position: relative;
        top: 0;
    }
    .home .section-nav, .archive .section-nav, .page .section-nav {
        height: auto;
    }
    .single .section-nav {
        height: 100%;
    }

    nav {
        padding: 10px;
    }

    .page nav, .home nav, .archive nav {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .single nav {
        position: fixed;
        height: calc(100% - 20px);
        width: calc(100% - 20px);
    }
    .home .submenu-container, .page .submenu-container, .archive .submenu-container {
        margin-top: calc((var(--fs-large-mobile) * var(--line-height)) * 2);
    }

    .single .info-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }


    .section-work .grid-item {
        gap: 20px;
        padding: 26px 10px 10px;
    
    }
    .section-page .grid-item {
        display: block;
        padding: 26px 10px 10px;
    
    }
    .section-page .grid-item img, .section-drawer img {
        margin-bottom: calc(var(--fs-large-mobile) * var(--line-height));
    }
    .section-single {
        position: fixed;
        z-index: 1;
        left: 50%;
        top: 108px;
        transform: translateX(-50%);
        height: calc(100% - 258px);
    }
    .swiper figure img {
        float:left;
    }
    .swiper-navi {
        display: none;
    }
    .drawer-inner {
        height: 100%;
        width: 100%;
        padding:40px 20px;
        transform: translateY(100%);
    }
    .drawer-container { 
        min-height: 100vh;
    }
    .section-drawer.active .drawer-inner {
        transform: translateY(33.33%);
    }
    .section-drawer.active.scroll-top .drawer-inner {
        transform: translateY(0%);
    }
    .section-drawer li {
        margin-bottom: calc(var(--fs-small-mobile) * var(--line-height));
    }
    .prev-el:hover .hover-arrow, .next-el:hover .hover-arrow, .drawer-overlay:hover .hover-close {
        display: none;
    }
        
}