/**
 * Stylesheet for participatory-archives.ch
 * Author: Adrian Demleitner
 * (c) 2022
 */

/* basic reset */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* utility */
.absolute { position: absolute }
.relative { position: relative }
.flex { display: flex }
.grid { display: grid }
.uppercase { text-transform: uppercase; }
.cursor-pointer { cursor: pointer; }

.flex-center {
    background-position: center;
    background-size: cover;
    justify-content: center;
    place-items: center;
}
.grid {
    grid-template-columns: 1fr 1fr 1fr;
}
main .grid > * { padding: 14px 16px; }
main .grid > .col-span-2 { padding: 0 16px; }
.col-span-2 {
    grid-column: 2 / 4;
}
.bg-gray {
    background-color: #D0D0D0;
}

/* typography */
body {
    font: 14px/18px Helvetica, sans;
}
.font-mono {
    font-family: monospace;
    font-size: 13.5px;
    line-height: 18px;
}
.font-mono p {
    margin-bottom: 0;
}
.font-mono p + p {
    margin-top: 1rem;
}
.font-sans {
    font-family: "Helvetica", sans-serif;
}
h2 {
    font: 14px/46px "Helvetica", sans-serif;
    font-weight: bold;
    margin: 0;
    padding-top: 2px;
}
h2 + .acc-content > p:first-child {
    position: relative;
    top: -4px;
}
p {
    margin-top: 0;
}
a {
    color: black;
    text-decoration: none;
}

/* specific typo */
header .flex {
    color: white;
}
header .flex span:first-child {
    text-align: center;
}
header .flex span:last-child {
    font-size: 220px;
    font-weight: bold;
}

main .acc-content h3,
main .acc-content p,
main .acc-content ul {
    font: 24.5px/28px "Times New Roman", serif;
}
main .acc-content h3 {
    margin-top: 0;
    margin-bottom: 0;
}
main .acc-content ul {
    margin-top: 0;
    padding-left: 14px;
}
ul li {
    list-style: disc;
    margin-left: 1.4rem;
    padding-left: 0.2rem;
}
.collections {
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.collections > .grid + div {
    height: calc(100% - 48px); 
}
.coll-triggers {
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}
.coll-triggers li {
    display: inline-block;
    margin: 0;
    padding: 0;
    cursor: pointer;
}
.coll-triggers li:before {
    position: relative;
    top: 4px;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid black;
    border-radius: 50%;
    margin-right: 8px;
}
.coll-triggers li.active:before {
    background-color: black;
}
.coll-triggers li h2 {
    display: inline-block;
}
.coll-content {
    transition: opacity 0.25s;
    opacity: 1;
    height: 100%;
}
.coll-content.hide {
    display: none;
    opacity: 0;
}
figure {
    box-sizing: border-box;
    padding-bottom: 32px;
}
figure img {
    height: 100%;
    width: auto;
    margin: 0 auto;
}
figcaption.font-mono {
    line-height: 16px;
}
main .acc-content h3 + p {
    margin-top: 16px;
}

/* layout */
header,
header > section {
    height: 100vh;
}
header .flex span:first-child {
    top: 0;
    line-height: 64px;
    width: 100%;
}
section {
    background: #efefef;
}

.nav-lang {
    width: 32px;
    top: 16px;
    right: 16px;
}
.nav-lang a {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6D6D6D;
    margin-bottom: 8px;
    text-align: center;
    line-height: 34px;
}
.nav-lang a.active {
    background: white;
}

.acc-content {
    overflow: hidden;
    max-height: 1500px;
    transition: .25s;
    border-bottom: 1px solid black;
}
.acc-content:last-child {
    border-bottom: 0;
}
.acc-content.max-h-0 {
    max-height: 0;
}
.swiper-wrapper {
    align-items: center;
    justify-content: bottom;
}
.swiper-slide {
    display: flex;
    justify-content: center;
}
.swiper-lazy {
    transition: .25s;
    opacity: 0;
}
.swiper-lazy.swiper-lazy-loaded {
    opacity: 1;
}
.swiper-button-prev, .swiper-button-next {
    width: 50%;
    height: 100%;
    top: 0;
}
.swiper-button-prev {
    left: 0px !important;
    cursor: url('/assets/imgs/prev.svg'), auto;
}
.swiper-button-next {
    right: 0px !important;
    cursor: url('/assets/imgs/next.svg'), auto;
}
.swiper-button-next::after, .swiper-button-prev::after {
    content: none !important;
}
figure {
    text-align: center;
    line-height: 0;
    margin: 0;
    padding-bottom: 32px;
}
figure img {
    display: block;
}
figcaption a {
    text-decoration: underline dotted;
}

/* footer */
.logos {
    padding: 48px;
    margin-bottom: 0;
    gap: 50px;
    justify-content: center;
    align-items: center;
}
.logos img {
    height: 50px;
}
.logos .logo-ub img {
    height: 80px;
}
.logos .logo-hkb img {
    height: 70px;
}

/* fadein and other anims */
body {
    background: #181818;
    animation: fadeInAnimation ease 2s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}
@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* media queries */
@media (max-width: 1120px) {
    .collections {
        height: auto;
    }
    .coll-triggers,
    .coll-triggers li {
        display: block;
    }
    .coll-triggers {
        padding: 12px 0;
    }
    .coll-triggers h2 {
        line-height: 28px;
    }
    figure img {
        max-width: 100%;
        height: auto;
    }
    .logos {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    .swiper-button-prev, .swiper-button-next {
        display: none;
    }

}
@media (max-width: 768px) {
    header .flex span:first-child {
        text-align: left;
        padding-left: 16px;
        line-height: 32px;
    }
    .grid { grid-template-columns: 1fr;  }
    .col-span-2 { grid-column: 1; }
    header .flex span:last-child {
        font-size: 120px;
    }
    main .acc-content h3,
    main .acc-content p,
    main .acc-content ul {
        font: 15.8px/18px "Times New Roman", serif;
    }
    .coll-triggers {
        padding-top: 0;
    }
}
