/*
Theme Name: Velera Design
Theme URI: https://velera.net
Author: Adriana Álvarez
Description: Velera Design Theme
Version: 1.0
Tags: museography, graphic-design, portfolio
Text Domain: velera-2025
*/

:root {
    font-size: 16px;

    --white: #ffffff;
    --black: #000000;
    --red: #E30613;
    --gray: #808080;

    --spacing-xs: 0.25rem; /* 4px */
    --spacing-s: 0.5rem; /* 8px */
    --spacing-m: 1rem; /* 16px */
    --spacing-l: 2rem; /* 32px */
    --spacing-xl: 2.5rem; /* 40px */
    --spacing-2xl: 3rem; /* 64px */
    --spacing-3xl: 5rem; /* 80px */
    

    scrollbar-width: 0px;

    --header-height: 58.5px;
    --header-height: 51.9px;
}

/* ----- Init ----- */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    box-sizing: border-box;

    font-family: 'Helvetica';
    font-weight: 400;

    scrollbar-width: none;
}

/* ----- Grid ----- */
.g-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding: 0px var(--spacing-m);
    gap: var(--spacing-m);
}

@media only screen and (max-width: 800px) {
    .g-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ----- Button ----- */
button {
    background-color: transparent;
    width: fit-content;
    cursor: pointer;
}

button:hover {
    color: var(--red);
}

/* ----- Fonts ----- */

@font-face {
  font-family: 'Helvetica';
  src: url('assets/fonts/HelveticaNeueRoman.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

h1 {
    font-size: 2rem;
    line-height: 115%;
}

h2 {
    font-size: 1.125rem;
    line-height: 115%;
}

p {
    font-size: 0.875rem;
    line-height: 135%;
}

button {
    font-size: 0.875rem;
    line-height: 135%;
}


@media only screen and (max-width: 800px) {
    h1 {
        font-size: 1.5rem;
        line-height: 115%;
    }

    h2 {
        font-size: 1rem;
        line-height: 115%;
    }

    p {
        font-size: 0.875rem;
        line-height: 135%;
    }

    button {
        font-size: 0.875rem;
        line-height: 135%;
    }
}

/* ----- Header ----- */

.header {
    z-index: 5;
    position: fixed;
    top: 0px;
    background-color: var(--white);
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: var(--spacing-m);
}

.nav-menu {
    display: flex;
    list-style: none;
    column-gap: 1.5rem;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--black);

    /* p */
    font-size: 0.875rem;
    line-height: 135%;
}

.nav-menu a:hover {
    color: var(--red);
}

.current-menu-item a {
    color: var(--red);
}

#toggleMenu {
    display: none;
}

.opened {
    left: 0px;
}

@media only screen and (max-width: 800px) {
    .header {
        padding: 0px;
    }

    .header .logo {
        position: fixed;
        display: flex;
        justify-content: space-between;
        top: 0px;
        left: 0px;
        width: 100%;
        padding: var(--spacing-m);
        z-index: 5;
        background-color: var(--white);
    }

    .nav-menu {
        position: fixed;
        display: flex;
        flex-direction: column;
        left: 100%;
        top: 0px;
        width: 100vw;
        height: 100dvh;
        background-color: var(--white);
        padding: calc(var(--spacing-3xl) + var(--header-height)) var(--spacing-m) var(--spacing-m);
        gap: var(--spacing-s);
        transition: 300ms ease-out;
        z-index: 4;
    }

    .nav-menu a {
        font-size: 1.5rem;
        line-height: 115%;
    }

    .open {
        left: 0;
    }

    #toggleMenu {
        display: block;
}
}

/* ----- Home ----- */

.home {
    display: flex;
    width: 100vw;
    padding: var(--spacing-m);
    gap: var(--spacing-m);
    height: 75dvh;
    position: absolute;
    bottom: 0;
    left: 0;
    margin-top: var(--header-height);
}

.home a {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    text-decoration: none;
    color: var(--black);
    width: 50%;
}

.home a:hover {
    color: var(--red);
}

.home a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}

@media only screen and (max-width: 800px) {
    .home {
        width: 100%;
        flex-direction: column;
        height: auto;
        position: static;
        gap: var(--spacing-l);
        padding-top: var(--spacing-3xl);
    }

    .home a {
        row-gap: var(--spacing-s)
    }

    .home a img {
        aspect-ratio: 1/1;
}
}

/* ----- X-scroll ----- */

.scroll {
    height: calc(100dvh - var(--header-height));
    width: 100vw;
    overflow-x: scroll;
    display: flex;
    gap: var(--spacing-3xl);
    scrollbar-width: none;
}

.scroll__grid {
    z-index: 1;
    height: 100vh;
    gap: 12vw;
    display: flex;
    padding: 0px 12vw;
    align-items: center;
}

.scroll__card {
    cursor: pointer;
    text-decoration: none;
    max-height: 60dvh;
    width: 30vw;
    gap: var(--spacing-m);
    display: flex;
    flex-direction: column;
}

.scroll__card-media {
  min-height: 0; 
  display: flex;
}

.scroll__card-media img {
    width: 100%;
    object-fit: contain;
}

.scroll__card-text {
    row-gap: var(--spacing-s);
    display: flex;
    flex-direction: column;
}

.scroll__card-text h2:first-child {
    color: var(--black);
}

.scroll__card-text h2:last-child {
    color: var(--gray);
}

.scroll__card:hover h2:first-child {
    color: var(--red);
}


@media only screen and (max-width: 800px) {    
    .scroll__card {
        max-height: 60dvh;
        width: 60vw;
        gap: var(--spacing-s);
    }

    .scroll__grid {
        gap: 10vw;
    }
}

/* ----- Archive ----- */
#ajax-filter {
    z-index: 3;
    border-top: 1px solid var(--black);
    width: 100vw;
    padding: var(--spacing-m);
    display: flex;
    gap: var(--spacing-m);
    background-color: var(--white);
    /* offset-x | offset-y | blur-radius | spread-radius | color */
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.1);
    overflow-x: scroll;
    scrollbar-width: none;
    margin-top: 58.5px;
    position: fixed;
    transition: margin-right 2s ease-in-out 0.5s;
}

.filter-overflow {
    flex-wrap: nowrap;
    display: flex;
    gap: var(--spacing-m);
}

.filter-overflow div {
    display: flex;
    gap: var(--spacing-xs);
}

#ajax-filter a {
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 135%;
    color: var(--gray);
    text-wrap: nowrap;
}

#ajax-filter a:hover {
    color: var(--black);
    cursor: pointer;
}

#ajax-filter a.--active {
    color: var(--black);
}

#main-archive {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
    padding-top: calc(var(--header-height) + var(--header-height) + var(--spacing-3xl));
}

#main-archive .archive:last-child {
    padding-bottom: var(--spacing-3xl);
}

.archive__year {
    grid-column: 1 / span 2;
    position: sticky;
    top: calc(var(--header-height) + var(--header-height) + var(--spacing-l));
    height: fit-content;
}

.archive__grid {
    column-gap: var(--spacing-m);
    row-gap: var(--spacing-xl);
    grid-column: 3 / span 11;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.archive__card {
    display: flex;
    gap: var(--spacing-s);
    flex-direction: column;
}

.archive__card-media {
    min-height: 0px;
    aspect-ratio: 1/1;
    display: flex;
}

.archive__card-media img {
    width: 100%;
    object-fit: contain;
}

.archive__card-text p:last-child {
    color: var(--gray);
}

@media only screen and (max-width: 800px) {
    #ajax-filter a {
        font-size: 0.875rem;
        line-height: 135%;
    }

    .archive__grid {
        grid-column: 1/-1;
        grid-template-columns: repeat(2, 1fr);
    }

    #main-archive {
        gap: var(--spacing-2xl);
        padding-top: calc(var(--header-height) + var(--header-height) + var(--spacing-2xl));
    }

    .archive__year {
        position: static;
    }

    .align-end {
        justify-content: flex-end;
    }
}


/* ----- About ----- */

.about {
    padding-top: calc(var(--header-height) + var(--spacing-3xl));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
}

.about section:last-child {
    padding-bottom: var(--spacing-3xl);
}

.about h1  {
    grid-column: 3 / span 8;
}

.about__services {
    grid-column: 3 / span 8;
}

.about__title {
    grid-column: 1 / span 2;
    color: var(--gray);
}

.about__download {
    display: flex;
    gap: var(--spacing-xs);
}

.about__section {
    grid-column: 1 / span 11;
    display: grid;
}

.about__section-sub {
    grid-column: auto / span 4;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
}

.about__section-sub p {
    color: var(--gray);
}

.about__section-sub a {
    color: var(--black);
    text-decoration: none;
}

.about__section-sub a:hover {
    color: var(--red);
}

.about ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.download {
    grid-column: 3 / span 8;
}

.download a {
    display: flex;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: var(--black);
}

.download a:hover {
    color: var(--red);
}

.download a:hover svg path {
    stroke: var(--red);
}

.christams {
    grid-column: 3 / span 8;
    gap: var(--spacing-m);
    display: grid;
    gap: var(--spacing-m);
    grid-template-columns: repeat(4, 1fr);
}

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

@media only screen and (max-width: 800px) {
    .about {
        gap: var(--spacing-2xl);
    }

    .about__section-sub {
        grid-column: 3 / span 3;
        gap: var(--spacing-s);
    }

    .about h1  {
        grid-column: 1 / span 6;
    }

    .download {
        grid-column: 3 / span 3;
    }

    .christams {
        grid-column: 1 / span 6;
        gap: var(--spacing-s);
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----- Contacto ----- */

.contacto div.g-cell {
    padding-top: calc(var(--header-height) + var(--spacing-3xl));
    grid-column: 3 / span 8;
    display: flex;
    gap: var(--spacing-l);
}

.contacto a,
.contacto a p {
    width: fit-content;
    font-size: 2rem;
    line-height: 115%;
    text-decoration: none;
    color: var(--black);
}

.contacto a p:hover,
.contacto a:hover {
    color: var(--red);
}

.contacto div {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

@media only screen and (max-width: 800px) {
    .contacto a {
        font-size: 1.5rem;
    }

    .contacto div.g-cell {
        grid-column: 1 / span 5;
        display: flex;
        gap: var(--spacing-l);
    }
}


/* ----- Detalle ----- */
.myDialog {
    background-color: transparent;
    min-height: 100vh;
    min-width: 100vw;
    scrollbar-width: none;

    transition: display 300ms ease-out allow-discrete, overlay 300ms ease-out allow-discrete;
    animation: close 300ms forwards;
    &[open] {
        animation: open 300ms forwards;
    }
}

.myDialog > div {
    display: flex;
    flex-direction: column;
    padding-top: var(--spacing-xl);
    gap: var(--spacing-xl);
    width: 65%;
    position: relative;
    background-color: var(--white);
    margin: var(--spacing-3xl) auto;
}

dialog::backdrop {
    transition: background-color 200ms ease-out;
    background-color: rgba(40,40,42,0.0);
}

dialog[open]::backdrop {
    background-color: rgba(40,40,42,0.5);
}

@keyframes open {
    from {
        margin-top: 100dvh;

    }
    to {
        margin-top: 0px;
    }
}

@keyframes close {
    from {
        margin-top: 0px;
    }
    to {
        margin-top: 100dvh;

    }
}
      
.closeFicha {
    position: absolute;
    top: var(--spacing-m);
    right: var(--spacing-m);
}

.myDialog ul {
    list-style: none;
    display: flex;
    font-size: 0.875rem;
    line-height: 135%;
}

.ficha__enlace {
    display: flex;
    width: fit-content;
    gap: var(--spacing-xs);
    color: var(--black);
    text-decoration: none;
    padding: 0px var(--spacing-m);
    align-items: center;
}

.ficha__enlace:hover {
    color: var(--red);
}

.ficha__enlace:hover svg path {
    stroke: var(--red);
}

.ficha__titular h1:last-child {
    color: var(--gray);
}

.ficha__titular, .ficha__cover {
    grid-column: 3 / span 8;
}

.ficha__cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
}

.ficha__titular {
    text-align: center;
}

.ficha__galeria {
    padding-bottom: var(--spacing-m);
}

.ficha__galeria img {
    width: 100%;
    object-fit: contain;
    min-width: 0;
}

.ficha__galeria-individual, .ficha__galeria-doble {
    aspect-ratio: 16/9;
    grid-column: 1 / span 12;
}

.ficha__galeria-doble {
    display: flex;
    gap: var(--spacing-m);
}

.myDialog ul li:nth-of-type(n + 2) {
  &::before {
    content: ", ";
  }
}

@media only screen and (max-width: 800px) {
    .home a {
        width: 100%;
    }

    .myDialog {
        width: 100%;
    }

    .ficha__cover {
        grid-column: 2 / span 4;
        aspect-ratio: 1/1;
    }

    .ficha__titular {
        grid-column: 1 / span 6;
    }

    .ficha__galeria-individual, .ficha__galeria-doble {
        grid-column: 1 / span 6;
    }

    .myDialog > div {
        padding-top: var(--spacing-3xl);
        gap: var(--spacing-xl);
        width: 100%;
        margin: 0px auto;
    }
}
















