*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white-primary: rgb(236, 236, 236);
    --black-bg: rgb(21, 21, 21);
    --grey-accent: rgb(120, 120, 120);
    --red-accent: rgb(220, 40, 40);
}


body {
    background-color: var(--black-bg);
    color: var(--white-primary);
    font-family: "Readex Pro", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "HEXP" 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background image */

.bg-img {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .5;
    object-fit: cover;
    z-index: 0;
    transition: opacity 350ms ease;
}

/* Background video */
#bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 350ms ease;
    pointer-events: none;
}

#bg-video.visible {
    opacity: 1;
}

/* Overlay so text stays readable over video */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--black-bg);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 350ms ease;
}

/* Header */

header {
    position: fixed;
    top: 0;
    z-index: 20;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.header_link {
    pointer-events: all;
    padding-top: 25px;
    width: 30vw;
    max-width: 200px;
    display: block;
}

.header_link img {
    width: 100%;
    display: block;
}

/* Directors cluster */


.directors-cluster {
    display: grid;
    justify-content: center;
    grid-template-columns: 1fr;
    gap: 0px;
    padding: 140px 40px 80px;
    position: relative;
    z-index: 10;
}

/* Nav CSS */

nav {
    z-index: 10;
    margin: auto;
    margin-top: 40px;
    grid-column: 1 / -1;
    display: flex;
    gap: 2px;
    height: 44px;
    align-items: center;
    width: fit-content;
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--white-primary);
    font-size: 12px;
    font-weight: 300;
    padding: 10px;
    background-color: rgba(60, 60, 60, 0.4);
    backdrop-filter: blur(5px);
    overflow: hidden;
    transition: color 250ms ease-in-out;
}

nav a::after,
nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--white-primary);
    z-index: -1;
    transition: height 250ms ease-in-out;
}

nav a:hover {
    color: var(--black-bg);
}

nav a:hover::after,
nav a:hover::before {
    height: 100%;
}


.nav-contact {
    border-radius: 100px 0 0 100px;
    padding-left: 13px;
}

.nav_social_linkedin {
    border-radius: 0 100px 100px 0;
    padding-right: 15px;
}

.nav_social {
    display: flex;
}

.nav_social svg {
    width: 15px;
}

.director-link {
    display: inline-block;
    color: var(--white-primary);
    text-decoration: none;
    font-size: min(1.8vw, 20px);
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 10px 20px;
    position: relative;
    white-space: nowrap;
    opacity: 0;
    animation: fadeIn 500ms ease forwards;
}

/* Default label — invisible on hover but holds the space */
.director-link .label-default {
    display: block;
    transition: opacity 200ms ease;
    text-align: center;
}

/* Hover label — italic, different weight, absolutely placed */
.director-link .label-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    color: var(--red-accent);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
}

.director-link:hover .label-default {
    opacity: 0;
}

.director-link:hover .label-hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back link */
.back-link {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--grey-accent);
    text-decoration: none;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    transition: color 200ms ease;
    z-index: 20;
}

.back-link:hover {
    color: var(--white-primary);
}

@media (max-width: 600px) {
    .director-link {
        font-size: 13px;
        padding: 7px 10px;
    }
}

/* Fader CSS */

#fader {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
    background: rgb(33, 33, 33);
    animation-duration: 700ms;
    animation-timing-function: ease-in-out;
}


@keyframes fade-out {
    from { opacity: 1 }
      to { opacity: 0 }
}

@keyframes fade-in {
    from { opacity: 0 }
      to { opacity: 1 }
}

#fader.fade-out {
    opacity: 0;
    animation-name: fade-out;
}
#fader.fade-in {
    opacity: 1;
    animation-name: fade-in;
}