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

:root {
    --white-primary: rgb(236, 236, 236);
    --black-bg: rgb(21, 21, 21);
    --grey-accent: rgb(179, 179, 179);
}

/* Font
    .readex-pro-<uniquifier> {
    font-family: "Readex Pro", sans-serif;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
    font-variation-settings:
        "HEXP" 0;
*/

body {
    text-transform: uppercase;
    letter-spacing: 0.02rem;
    background-color: var(--black-bg);
    color: var(--white-primary);

    font-family: "Readex Pro", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings:
        "HEXP" 0;
}

video,
img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Header CSS */

header {
    position: fixed;
    z-index: 10;
    top: 0;
    width: 100%;
    display: flex;
}

.header_link {
    margin: auto;
    padding-top: 25px;
    width: 30vw;
    max-width: 200px;
}

/* Nav CSS */

nav {
    position: sticky;
    z-index: 10;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    margin-top: 10px;
    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;
    height: 15px;
}

.nav_social svg {
    width: 15px;
}


.content_container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.project_card {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    /* min-height: 30dvh;
    max-height: 70dvh; */
}

/* grid columns classes */

#projects-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
}

.full{ grid-column:span 6; }
.two-thirds{ grid-column:span 4; }
.half{ grid-column:span 3; }
.one-third{ grid-column:span 2; }

@media (max-width: 900px) {
    .slot {
        grid-column: 1 / -1;
        height: 56vw;
    }

    nav {
        grid-column: 1 / -1;
        margin: auto;
        left: auto;
        transform: translateX(0);
    }
}

/* END grid classes */

.project_link,
.project_data_wrapper {
    grid-column: 1;
    grid-row: 1;
}
.project_card {
    position: relative;
}
.project_link video {
    max-height: 70vh;
}
.dani_video_link video {
    aspect-ratio: 16 / 9;
}



.project_data_wrapper {
    margin: 15px 20px;
    margin-right: auto;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
}

.project_title {
    font-size: 15px;
}

.project_director {
    font-size: 10px;
    color: var(--grey-accent);
}


/* hover states for project cards */

.project_card {
    --frame-lenght: 40px;
    --frame-width: 1px;
}

.project_card::after,
.project_card::before,
.project_link::after,
.project_link::before {
    content: '';
    background-color: var(--white-primary);
    display: block;
    position: absolute;
    opacity: 0;
    outline: 3px var(--white-primary) solid;
    transition: outline 250ms linear;
}

.project_card::after {
    width: var(--frame-lenght);
    height: var(--frame-width);
    top: 15px;
    left: 15px;
}

.project_card::before {
    width: var(--frame-width);
    height: var(--frame-lenght);
    top: 15px;
    left: 15px;
}

.project_link::after {
    width: var(--frame-lenght);
    height: var(--frame-width);
    right: 15px;
    bottom: 15px;
}

.project_link::before {
    width: var(--frame-width);
    height: var(--frame-lenght);
    right: 15px;
    bottom: 15px;
}

.project_card:hover {
    animation: autoFocus 250ms linear;
}

@keyframes autoFocus {
    0% {
        filter: blur(5px);
    }
    100% {
        filter: blur(0);
    }
}

.project_card:hover::after,
.project_card:hover::before,
.project_link:hover::after,
.project_link:hover::before  {
    opacity: 1;
    outline-width: 0px;
}

.project_card:hover .project_data_wrapper {
    opacity: 1;
}

/* END of Hover states for project cards */


.footer_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 50px 0 30px 0;
    font-size: 15px;
    font-weight: 100;
    white-space: nowrap;
}


footer a {
    color: var(--white-primary);
    text-decoration: none;
    text-transform: none;
    transition: color 150ms ease-out;
}

footer a:hover {
    color: var(--grey-accent);
}

.footer_privacy_links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: fit-content;
    margin-left: auto;
}

.footer_social_links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer_social_links a svg {
    width: 25px;
}

.footer_contact_links {
    text-transform: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer_contact_links a {
    margin-top: 15px;
}

.footer_contact_madrid {
    font-weight: 300;
}

.footer_contact_address,
.footer_contact_postal {
    font-size: 12px;
}

.footer_copyright {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 40px;
    font-size: 10px;
    font-weight: 100;
}

@media (max-width: 900px) {
    .footer_wrapper {
        display: flex;
        flex-direction: column;
        gap: 30px;
        width: 33%;
        margin: auto;
    }
    .footer_privacy_links,
    .footer_contact_links {
        margin-left: 0;
    }
    .footer_social_links {
        justify-content: start;
    }
}

/* video player  */

/* Overlay hidden state */
#video_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;

  transition: opacity 0.35s ease, visibility 0.35s ease;

  z-index: 9999;
}

/* Visible state */
#video_overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Video container */
.video_container {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
}

/* Vimeo iframe */
#video_frame {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

/* Close button */
#close_video {
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: 30px;
  background-color: transparent;

  border: none;

  font-size: 18px;

  cursor: pointer;
}

#close_video::after,
#close_video::before {
    content: '';
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 10px;
    background-color: var(--grey-accent);
    transition: background-color 150ms ease-in-out;
}

#close_video:hover::after,
#close_video:hover::before {
    background-color: var(--white-primary);
}

#close_video::after {
    width: 30px;
    height: 5px;
}
#close_video::before {
    width: 5px;
    height: 30px;
}

/* 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;
}