/* Website Made by Bence (bencebarens.nl) */

/* Header & footer */
header nav{
    z-index: 50;
    position: fixed;
    top: 0;
}

header nav ul{
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav a{
    text-decoration: none;
}

header p{
    margin: 0 auto;
    padding: 0.4em 0.7em;
    border-radius: 50em;
    text-align: center;
    width: max-content;
    max-width: 100%;
    background-color: var(--color-primary);
    text-wrap: pretty;
}

header p span{
    font-variant-numeric: tabular-nums;
    padding: 0 0.1em;
}

footer{
    padding: 0 1em 3em 1em;
    text-align: center;
}

footer p{
    margin: 0 auto;
    font-size: 0.8em;
}

@media (min-width: 1000px) {
    header nav{
        left: 1em;
        top: 50%;
        padding: 0.5em;
        border-radius: 0.5em;
        transform: translateY(-50%);
    }

    header nav ul{
        flex-direction: column;
    }

    header nav a[aria-current="page"]:after{
        content: "";
        height: 0.5em;
        width: 0.5em;
        display: inline-block;
        background-color: var(--color-accent);
        margin-left: 0.4em;
    }

    header p{
        position: fixed;
        top: 1em;
        left: 50%;
        transform: translateX(-50%);
        z-index: 50;
        background-color: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        animation: showBoxShadowLight linear both;
        animation-timeline: scroll(root block);
        animation-range: 0vh 15vh;
    }

    @media (prefers-color-scheme: dark) {
        header p{
            background-color: rgba(17, 17, 17, 0.6);
            animation: showBoxShadowDark linear both;
            animation-timeline: scroll(root block);
            animation-range: 0vh 15vh;
        }
    }

    @keyframes showBoxShadowLight{
        from{ box-shadow: 0 0 0em -0.5em #000000; border: solid rgba(0, 0, 0, 0) 0.1em; }
        to{ box-shadow: 0 0 0.7em -0.5em #000000; border: solid rgba(0, 0, 0, 0.2) 0.1em; }
    }

    @keyframes showBoxShadowDark{
        from{ box-shadow: 0 0 0em -0.3em #000000; border: solid rgba(255, 255, 255, 0) 0.1em; }
        to{ box-shadow: 0 0 0.7em -0.3em #000000; border: solid rgba(255, 255, 255, 0.2) 0.1em; }
    }

    footer{
        position: fixed;
        padding: 1em;
        right: 0;
        bottom: 0;
        z-index: 50;
        text-align: right;
    }
}

@media (max-width: 999px) {
    header nav{
        width: 100%;
        background-color: var(--color-primary);
        border-bottom: 0.1em solid var(--color-accent);
    }

    header nav ul{
        width: 100%;
        justify-content: space-around;
    }

    header nav li{
        width: 100%;
        position: relative;
        text-align: center;
    }

    header nav li a{
        display: inline-block;
        padding: 0.5em;
        position: relative;
    }

    header nav li:has(a[aria-current="page"]){
        font-weight: 700;
        font-stretch: 95%;
    }

    header nav li a[aria-current="page"]:before{
        content: "";
        background-color: var(--color-accent);
        width: 1em;
        height: 0.25em;
        margin-right: 0.4em;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        position: absolute;
        z-index: 99999999999;
    }

    header p{
        margin-top: 3.5em;
    }
}

@media (max-width: 400px) {
    header nav li{
        font-size: clamp(0.8em, 4vw, 1em);
    }
}

main{
    padding: 6em 1em 2em 1em;
    padding-top: 6em;
    min-height: 90vh;
}

@media (max-width: 999px) {
    main{
        padding-top: 2em;
    }
}

/* SPLASH SCREEN //////////////////////////////////////////////// */

#splash-screen {
    position: fixed;
    inset: 0;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    animation: splashFadeOut 0.5s cubic-bezier(.45,0,1,.1) forwards;
    animation-delay: 2s;
}

#splash-screen *{
    cursor: wait;
    touch-action: none;
}

#splash-screen p{
    font-size: 4em;
    transform: scaleY(3);
    opacity: 0;
    animation: splashFadeIn 0s linear forwards;
    animation-delay: 0.5s;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#splash-screen div{
    border: 0.3em solid var(--color-accent);
    width: 12em;
    height: 5em;
    position: absolute;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 5em), -50%);
    animation: 
        frameSwoop 1.5s cubic-bezier(0,1,0,1) forwards, 
        splashFadeIn 0s linear forwards,
        frameSwoopBack 0.5s cubic-bezier(.45,-0.1,1,.1) forwards;
    animation-delay: 1s, 1s, 2s;
}

#splash-screen div:nth-last-of-type(1){
    width: 12em;
    height: 5em;
    z-index: 910;
}

#splash-screen div:nth-last-of-type(2){
    width: 17em;
    height: 10em;
}

#splash-screen div:nth-last-of-type(3){
    width: 30em;
    height: 23em;
}

#splash-screen div:nth-last-of-type(4){
    width: 60em;
    height: 53em;
}

#splash-screen div:nth-last-of-type(5){
    width: 90em;
    height: 83em;
}

@keyframes splashFadeIn {
    to { opacity: 1; }
}

@keyframes frameSwoop {
    from { width: 150em; height: 143em; }
}

@keyframes frameSwoopBack {
    to { width: 150em; height: 143em; }
}

@keyframes splashFadeOut {
    70% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(3); }
}

@media (prefers-reduced-motion: reduce){
    #splash-screen{
        display: none;
    }
}

/* PIXEL GRID //////////////////////////////////////////////////// */

#y2k-grid{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.scramble {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal; 
}

/* LIGHTBOX ////////////////////////////////////////////////////// */

#lightbox {
    border: none;
    background: transparent;
    padding: 1em;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#lightbox::backdrop {
    background-color: rgba(0,0,0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#lightbox-media {
    display: grid;
    place-items: center;
    max-width: 80vw;
    max-height: 60vh;
    overflow: hidden;
    position: relative;
}

#lightbox-media img,
#lightbox-media video {
    grid-area: 1 / 1;
    max-width: 80vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#lightbox-media .media-placeholder {
    filter: blur(15px);
    transform: scale(1.05);
    transition: opacity 300ms ease;
    pointer-events: none;
}

#lightbox-media .media-full {
    opacity: 0;
    transition: opacity 300ms ease;
}

#lightbox-media .media-full.is-loaded {
    opacity: 1;
}

#lightbox-title {
    margin-top: 1.5em;
    text-align: center;
    max-width: 100%;
    color: white;
    line-break: anywhere;
}

#lightbox-close {
    position: fixed;
    color: white;
    top: 0.5em;
    right: 0.5em;
    background: none;
    border: none;
    font-size: 3em;
    font-weight: 200;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 10;
}

#lightbox-close:hover {
    color: var(--color-accent);
}

#carousel-stage.paused {
    animation-play-state: paused;
}

/* CALENDLY ////////////////////////////////////////////////////// */

/* Iframe & content basis */
.calendly-badge-widget iframe,
.calendly-inline-widget iframe,
.calendly-overlay iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.calendly-popup-content {
    height: 100%;
    position: relative;
}

.calendly-popup-content.calendly-mobile {
    overflow-y: auto;
}

/* Modal Overlay */
.calendly-overlay {
    background-color: rgba(0,0,0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    inset: 0;
    overflow: hidden;
    position: fixed;
    z-index: 9999;
}

.calendly-overlay .calendly-close-overlay {
    inset: 0;
    position: absolute;
}

/* Modal Popup container */
.calendly-overlay .calendly-popup {
    box-sizing: border-box;
    height: 90%;
    width: calc(100% - 2em);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile */
/* Was 975px */
@media (max-width: 649px) {
    .calendly-overlay .calendly-popup {
        margin-top: 2em;
        border-radius: 1em;
        overflow: hidden;
    }
}

/* Sluitknop */
.calendly-overlay .calendly-popup-close {
    background: url(https://assets.calendly.com/assets/external/close-icon.svg) no-repeat center / contain;
    cursor: pointer;
    height: 1.2em;
    position: absolute;
    top: 2em;
    right: 2em;
    width: 1.2em;
}

/* Mobile */
/* Was 975px */
/* @media (max-width: 649px) {
    .calendly-overlay .calendly-popup-close {
        right: 1em;
        top: 1em;
    }
} */

.calendly-badge-widget, .calendly-badge-widget .calendly-badge-content {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    opacity: 0;
    display: none;
}

/* Loader / Spinner */
.calendly-spinner {
    inset-inline: 0;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.calendly-spinner > div {
    width: 5em;
    height: 5em;
    border-radius: 50%;
    border: 0.2em solid white;
    border-top-color: var(--color-accent);
    animation: loading 1.2s ease-in-out infinite;
    vertical-align: middle;
    display: inline-block;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

.calendly-spinner .calendly-bounce1, .calendly-spinner .calendly-bounce2 {
    display: none;
}