@font-face {
    font-family: AlteHaasGrotesk;
    src: url(/assets/fonts/AlteHaasGroteskRegular.woff);
}

@font-face {
    font-family: TorreFarfan;
    src: url(/assets/fonts/TorreFarfan.woff);
}

button {
  font-family: inherit; 
  font-size: 100%;
  line-height: 1.15; 
  margin: 0; 
}

button { 
  overflow: visible;
}

button { 
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

:root{
    --bk-color: rgba(247, 243, 240, 0.95);
    --main-color: #171616;
    --secondary-color: #171616;
    --hover-color: #ff3232;
    --link-color: gray;

    --titles-font-family: AlteHaasGrotesk, helvetica;
    --body-font-family: TorreFarfan, Serif;
    --details-font-family: AlteHaasGrotesk, helvetica;

    --body-font-size: 1em; 
    --title-font-size: 1.6em; 
    --sections-font-size: 1.3em;

    --gap: 1em; 
    --margin: 20px; 
}

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

a{
    color: var(--main-color);
    text-decoration: none;
    font-style: italic;
    cursor: pointer;
}

a:hover{
    font-style: normal;
}

a:visited{
    color: gray;
}

body{
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--body-font-family), serif;
}

.home{
    background-color: var(--bk-color);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0;
    width: 100vw;
    height: 100vh;
    justify-content: space-between;
    overflow-y: scroll;
}

.kate_briggs{
    font-family: var(--titles-font-family);
    font-size: var(--title-font-size);
    align-self: flex-start;
    margin: 0; 
    padding: var(--margin);
    padding-top: 18px;
    padding-left: 25px;
}

.navigator{
    display: flex;
    width: 45%;
    padding: var(--margin);
    padding-top: calc(var(--margin) + 5px);
    flex-direction: row;
    flex-wrap: wrap;
    align-self: flex-start;
    gap: calc(var(--gap) + 1em);
    justify-content: center;
}

.section{
    display: flex;
    flex-direction: row;
    align-content: flex-start;
    justify-content: flex-start;
    gap: var(--gap); 
    flex-wrap: wrap;
    max-width: 100%;
}

.section h2{
    font-size: var(--sections-font-size);
    margin: 0;
}

.section_title{
    font-family: var(--body-font-family);
    font-size: var(--sections-font-size);
}

.section_item{
    display: block;
    height: 4em;
    width: 3em;
    border: 1px solid var(--secondary-color);
    cursor: pointer;
    overflow: hidden;
}

.section_item img{
    transform: scale(1.67);
    height: 100%;
}

.section_item::before {
    content: '';
    position: relative;
    display: none;
    top: 0;
    left: 0;
    height: 4em;
    width: 3em;
    background-color: var(--hover-color);
    pointer-events: none;
}

.section_item.item-hovered::before {
    display: block;
}

.section_item.item-hovered img {
    opacity: 0;
}

.home_image{
    width: 20%;
    margin: 0;
    align-self: flex-start;
    padding: var(--margin);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.home_image img{
    width: 100%;
}

.home_image details{
    margin-top: 0.5em;
    text-align: right;
    width: 80%;
}

.home_image details p:nth-child(3) {
    font-family: var(--titles-font-family);
}

.home_image details > summary {
   list-style: none;
   font-family: var(--titles-font-family);
 }
 .home_image details > summary::-webkit-details-marker {
   display: none;
 }

.home_image p{
    font-size: small;
    margin: 0.9em 0 0 0;
}

.credits h3{
    font-family: var(--titles-font-family);
    font-weight: 100;
    font-size: small;
    margin: 0.6em 0 0 0;
}

.hidden{
    display: none !important;
}

.visible{
    display: flex;
}

/************ Visualizer ************/

.visualizer{
    position: fixed;
    bottom: 0;
    height: 42%;
    width: 100%;
}

.close_btn{
    position: absolute;
    right: var(--gap);
    top: var(--gap);
    border: none;
    background-color: unset;
    /* color: gray; */
    width: 19px;
    height: 19px;
    overflow: hidden;
    z-index: 15;
    cursor: pointer;
}

.close_btn:hover::before {
   background: gray;
}

.close_btn:hover::after {
    background: gray;
}

.close_btn::before, .close_btn::after {
    content: '';
    position: absolute;
    border-radius: 2px;
    height: 2px;
    width: 100%;
    top: 50%;
    left: 0;
    margin-top: -1px;
    background: lightgray;
}

.close_btn::before {
    transform: rotate(45deg);
}

.close_btn::after {
    transform: rotate(-45deg);
}

.item_section{
    position: absolute;
    display: flex;
    height: calc(100% - 3.9em);
    width: calc(100% - 3.8em);
    padding-left: 2.1em;
    padding-right: 1.9em;
    padding-top: 1.9em;
    padding-bottom: 1.9em;
    box-shadow: 0 3px 10px var(--main-color);
    flex-direction: row;
    justify-content: space-between;
    gap: calc(var(--gap) * 2);
    background-color: var(--bk-color);
    align-items: flex-end;
}

.item_editions{
    width: 25%;
    max-height: 100%;
}

.item_editions h3{
    margin-bottom: 0.5em;
}

.item_editions ul{
    list-style: auto;
    padding-inline-start: 1em;
    margin: 0;
    font-size: smaller;
}

.item_editions li{
    margin-bottom: 0.5em;
    width: 70%;
}

.item_editions li:last-child{
    margin-bottom: 0;
}

.item_image{
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    border: 1px solid var(--secondary-color);
}

.item_image img{
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.carrousel_btns{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    pointer-events: none;
    z-index: 10;
}

.carrousel_btns span {
    pointer-events: all;
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
}

.carousel_counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--bk-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-family: var(--titles-font-family);
    font-weight: 500;
    pointer-events: none;
    z-index: 15;
}

 .item_image:hover .carrousel_btns span{
    opacity: 1;
}

.item_image .left{
    background: linear-gradient(to right, rgba(0,0,0,0.5), transparent);
}

.item_image .left:hover{
    cursor: w-resize;
}

.item_image .right:hover{
    cursor: e-resize;
}

.item_image .right{
    background: linear-gradient(to left, rgba(0,0,0,0.5), transparent);
}

.item_text{
    display: flex;
    width: 45%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}

.item_title{
    margin-top: 0;
    font-family: var(--titles-font-family);
    max-width: 75%;
}

.item_title h3{
    margin-top: 0;
    font-size: var(--sections-font-size);
}

.item_text p{
    margin-bottom: 0;
    max-width: 70%;
    font-size: var(--body-font-size);
}

.item_text p:last-child{
    display: none;
}

.item_connectors{
    width: 25%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--margin);
    flex-wrap: wrap;
    align-content: center;
}

.item_connectors a{
    color: var(--main-color);
    text-decoration: none;
    min-width: 60%;
}

.item_connectors > a {
  display: block;
  margin: .35rem 0 0 0;   
}

.item_connectors > a:first-child {
  margin-left: 3ch;
}

.item_connectors > a:nth-child(2n) {
  margin-left: 1ch;
}

.item_connectors > a:nth-child(3n) {
  margin-left: 7ch;
}

.item_connectors > a:nth-child(6n) {
  margin-left: 5ch; 
}

.item_connectors a:hover{
    font-style: normal;
}

.item_connectors a:visited{
    color: var(--link-color);
}

@media (max-width: 768px) {
    .home{
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .home_image{
        width: calc(100% - (var(--margin) * 2));
    }

    .kate_briggs{
        width: calc(100% - (var(--margin) * 2));
        text-align: center;
        padding-top: 27px
    }

    .navigator{
        width: calc(100% - (var(--margin) * 2));
        align-self: unset;
        justify-content: space-around;
    }

    .section{
        max-width: 100%;
        justify-content: center;
    }

    .visualizer{
        height: 93.3%;
    }

    .item_section{
        flex-direction: column;
        align-items: flex-start;
        overflow-y: scroll;
    }

    .item_editions{
        width: 100%;
        order: 3;
    }

    .item_image{
        width: 80%;
        height: 60%;
        order: 2;
        align-self: center;
    }

    .item_image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .item_text{
        order: 1;
        width: 100%;
        display: inline-table;
    }

    .item_title{
        font-size: var(--title-font-size);
        max-width: 98%;
    }

    .item_text p{
        max-width: 90%;
    }

    .item_connectors{
        order: 4;
        margin-top: 3em;
        width: 100%;
    }
}