/* ==========================================
   AJUSTES GENERALES
========================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    color: #171717;
    background-color: #f7f7f5;

    font-family: "Inclusive Sans", sans-serif;
    font-weight: 300;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   PÁGINA DE COMISIONES
========================================== */

.commissions-page {
    position: relative;
    z-index: 1;

    width: 100%;
    min-height: 760px;

    overflow: hidden;

    background-color: #f7f7f5;
}

/* ==========================================
   IMAGEN FIJA DE FONDO
========================================== */

.commissions-background {
    position: absolute;
    inset: 0;
    z-index: 0;

    overflow: hidden;

    opacity: 0;
    transform: scale(1.04);

    animation: showBackground 1.2s ease forwards;
}

.commissions-background img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}



/* ==========================================
   PUNTOS DECORATIVOS
========================================== */

.decorative-dot {
    position: absolute;
    z-index: 5;

    width: 15px;
    height: 15px;

    border-radius: 50%;

    background-color: #ffffff;

    opacity: 0;

    animation: showDot 0.65s ease forwards;
}

.dot-top-left {
    top: 32px;
    left: 28px;

    animation-delay: 0.1s;
}

.dot-top-center {
    top: 32px;
    left: 50%;

    transform: translateX(-50%);

    animation-delay: 0.2s;
}

.dot-top-right {
    top: 32px;
    right: 28px;

    animation-delay: 0.3s;
}

.dot-left-center {
    top: 62%;
    left: 28px;

    animation-delay: 0.4s;
}

.dot-right-center {
    top: 62%;
    right: 28px;

    animation-delay: 0.5s;
}

.dot-bottom-left {
    bottom: 32px;
    left: 28px;

    animation-delay: 0.6s;
}

.dot-bottom-right {
    right: 28px;
    bottom: 32px;

    animation-delay: 0.7s;
}

/* ==========================================
   FLECHA
========================================== */

.back-button {
    position: absolute;
    top: 70px;
    left: 62px;
    z-index: 10;
    color: #ffffff;

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

    width: 48px;
    height: 48px;

    font-family: "Inclusive Sans", sans-serif;
    font-size: 48px;
    font-weight: 300;
    line-height: 1;

    opacity: 0;
    transform: translateX(12px);

    animation: showBackButton 0.7s ease 0.3s forwards;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.back-button:hover {
    opacity: 0.55;
    transform: translateX(-5px);
}


/* ==========================================
   MENÚ PRINCIPAL
========================================== */

.main-menu {
    position: absolute;
    top: 62px;
    right: 68px;
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    line-height: 0.95;

    opacity: 0;
    transform: translateY(-10px);

    animation: showMenu 0.7s ease 0.35s forwards;
}

.main-menu a {
    color: #ffffff;

    font-family: "Inclusive Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.05;

    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}

.main-menu a:hover {
    opacity: 0.55;
}

.main-menu a.active {
    color: #ffffff;

    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================
   CONTENIDO DE COMISIONES
========================================== */

.commissions-content {
    position: relative;
    z-index: 4;

    width: min(970px, 78%);
    min-height: 760px;

    margin: 0 auto;
    padding: 160px 0 110px;

    display: grid;
    grid-template-rows: auto auto auto;

    align-content: center;

    row-gap: 70px;
}

/* ==========================================
   FILAS
========================================== */

.commissions-row {
    display: grid;
    align-items: center;

    width: 100%;
}

.commissions-row-top {

    grid-template-columns: repeat(2, 1fr);

    width: 100%;

    justify-items: center;

}

.commissions-row-bottom {

    grid-template-columns: repeat(3, 1fr);

    width: 100%;

    justify-items: center;

}

/* ==========================================
   ENLACES
========================================== */

.commission-link {
    position: relative;

    display: inline-block;
    width: fit-content;

    color: #ffffff;

    font-family: "Cormorant Garamond", serif;
    font-size: 60px;
    font-weight: 500;
    line-height: 1;

    opacity: 0;
    transform: translateY(25px);

    animation: showCommissionLink 0.75s ease forwards;

    transition:
        opacity 0.3s ease,
        transform 0.35s ease;
}

.commission-link::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;

    height: 1px;

    background-color: #171717;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 0.35s ease;
}

.commission-link:hover {
    opacity: 0.6;
    transform: translateY(-5px);
}

.commission-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Posiciones */

.commission-product,
.commission-fashion,
.commission-architecture,
.commission-music,
.commission-documentary {

    justify-self: center;

}

.commission-product {
    animation-delay: 0.48s;
}

.commission-fashion {
    animation-delay: 0.58s;
}

.commission-architecture {
    animation-delay: 0.78s;
}

.commission-music {
    animation-delay: 0.88s;
}

.commission-documentary {
    animation-delay: 0.98s;
}

/* ==========================================
   TÍTULO CENTRAL
========================================== */

.commissions-heading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.commissions-heading h1 {
    margin: 0;

    color: #ffffff;

    font-family: "Cormorant Garamond", serif;
    font-size: 96px;
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.03em;

    opacity: 0;
    transform: translateY(30px);

    animation: showTitle 0.9s ease 0.65s forwards;
}

/* ==========================
   FOOTER
========================== */

.site-footer {
    position: relative;
    z-index: 3;

    width: min(1400px, calc(100% - 120px));

    margin: 40px auto 0;
    padding: 48px 0 55px;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    align-items: start;

    background: transparent;

    border-top: 1px solid rgba(255, 255, 255, 0.28);

    color: #ffffff;

    opacity: 0;
    transform: translateY(20px);

    animation: showFooter 0.75s ease 1s forwards;
}


/* IZQUIERDA */

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 58px;
}

.footer-brand > a:first-child {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;

    color: #ffffff;
}

.footer-brand i {
    font-size: 18px;
    color: #ffffff;
}


/* CENTRO */

.footer-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;

    justify-self: center;
}

.footer-menu a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 15px;
    font-weight: 300;

    color: #ffffff;
}


/* DERECHA */

.footer-contact {
    justify-self: center;
    align-self: start;
}

.footer-contact a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 15px;
    font-weight: 300;

    color: #ffffff;
}


/* HOVER */

.footer-brand a,
.footer-menu a,
.footer-contact a {
    transition: opacity 0.3s ease;
}

.footer-brand a:hover,
.footer-menu a:hover,
.footer-contact a:hover {
    opacity: 0.55;
}


/* HOVER */

.footer-brand a,
.footer-menu a,
.footer-contact a {
    transition: opacity 0.3s ease;
}

.footer-brand a:hover,
.footer-menu a:hover,
.footer-contact a:hover {
    opacity: 0.55;
}

/* ==========================================
   TRANSICIÓN ENTRE PÁGINAS
========================================== */

.page-transition {
    position: fixed;
    inset: 0;
    z-index: 5000;

    width: 100%;
    height: 100%;

    background-color: #f7f7f5;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.45s ease,
        visibility 0.45s ease;
}

.page-transition.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ==========================================
   ANIMACIONES DE ENTRADA
========================================== */

@keyframes showBackground {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}

@keyframes showDot {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes showBackButton {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

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

@keyframes showMenu {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@keyframes showCommissionLink {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

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

@keyframes showTitle {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes showFooter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1000px) {

    .commissions-content {
        width: 82%;

        row-gap: 65px;
    }

    .commission-link {
        font-size: 42px;
    }

    .commissions-heading h1 {
        font-size: 88px;
    }

}

/* ==========================================
   MÓVIL
========================================== */

@media (max-width: 720px) {

    /* PÁGINA */
    .commissions-page {
        min-height: 100vh;
    }

    /* FONDO MÓVIL */
    .commissions-background {
    transform: none;
    opacity: 1 !important;
    filter: none !important;
}

.commissions-background picture {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1 !important;
}

.commissions-background picture img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

.background-overlay {
    display: none !important;
}

    /* PUNTOS DECORATIVOS */
    .decorative-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
        border-radius: 50%;
    }

    /* FLECHA */
    .back-button {
        top: 54px;
        left: 28px;
        font-size: 40px;
    }

    /* MENÚ */
    .main-menu {
        top: 50px;
        right: 28px;
    }

    .main-menu a {
        font-size: 16px;
    }

    /* CONTENIDO */
    .commissions-content {
        width: 76%;
        min-height: 100vh;
        padding: 170px 0 95px;

        display: flex;
        flex-direction: column;
        justify-content: center;

        gap: 52px;
    }

    /* FILAS */
    .commissions-row-top,
    .commissions-row-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;

        gap: 40px;
        padding: 0;
    }

    /* ENLACES */
    .commission-link,
    .commission-product,
    .commission-fashion,
    .commission-architecture,
    .commission-music,
    .commission-documentary {
        justify-self: auto;
        font-size: 34px;
    }

    /* ORDEN */
    .commissions-heading {
        order: 2;
    }

    .commissions-row-top {
        order: 1;
    }

    .commissions-row-bottom {
        order: 3;
    }

    /* TÍTULO */
    .commissions-heading h1 {
        font-size: 66px;
        text-align: center;
    }

    /* FOOTER */
    .site-footer {
        width: calc(100% - 55px);
        grid-template-columns: 1fr 1fr;
        row-gap: 30px;
        padding-bottom: 35px;
    }

    .footer-brand {
        gap: 45px;
    }

    .footer-menu {
        display: none;
    }

    .footer-contact {
        justify-self: end;
    }
}

/* ==========================================
   PANTALLAS PEQUEÑAS
========================================== */

@media (max-width: 420px) {

    .main-menu a {
        font-size: 14px;
    }

    .commissions-content {
        gap: 42px;
    }

    .commission-link,
    .commission-product,
    .commission-fashion,
    .commission-architecture,
    .commission-music,
    .commission-documentary {
        font-size: 29px;
    }

    .commissions-heading h1 {
        font-size: 55px;
    }

}

/* ==========================================
   REDUCIR MOVIMIENTO
========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}