/* =========================================================
   DESORDEN SOCIAL — USUARIOS

   FONDO:
   #2927FF

   OPUESTO RGB EXACTO:
   255-41  = 214 = D6
   255-39  = 216 = D8
   255-255 =   0 = 00

   → #D6D800
========================================================= */

:root {
    --users-bg: #2927FF;
    --users-opposite: #D6D800;

    --users-opposite-soft:
        rgba(214, 216, 0, 0.48);

    --users-opposite-faint:
        rgba(214, 216, 0, 0.18);
}


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


html,
body {
    width: 100%;
    min-height: 100%;
}


html {
    background:
        var(--users-bg);
}


body {
    min-height: 100vh;

    overflow-x: hidden;

    background:
        var(--users-bg);

    color:
        var(--users-opposite);
}


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


button,
input {
    color: inherit;
}


button {
    font: inherit;
}


/* =========================================================
   VOLVER
========================================================= */

.back-home {
    position: fixed;

    top: 25px;
    left: 28px;

    z-index: 12000;

    font-family:
        "Times New Roman",
        Times,
        serif;

    font-size: 30px;
    line-height: 1;

    color:
        var(--users-opposite);

    opacity: 0.62;

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


.back-home:hover {
    opacity: 1;

    transform:
        translateX(-4px);
}


/* =========================================================
   PRIMERA PANTALLA

   Nada decorativo de fondo.
   Solo color + buscador + usuarios.
========================================================= */

.users-library {
    width: 100%;
}


.users-landing {
    position: relative;

    width: 100%;
    min-height: 100svh;

    display: grid;

    grid-template-rows:
        auto
        1fr
        auto;

    padding:
        27px
        clamp(24px, 4vw, 72px)
        30px;
}


.users-label {
    justify-self: end;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    letter-spacing: 0.16em;

    color:
        var(--users-opposite);

    opacity: 0.62;
}


/* =========================================================
   BUSCADOR — CENTRO DE LA PÁGINA
========================================================= */

.search-zone {
    align-self: center;
    justify-self: center;

    width:
        min(
            780px,
            calc(100vw - 56px)
        );

    transform:
        translateY(-3vh);
}


.user-search {
    position: relative;

    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: end;

    width: 100%;

    border-bottom:
        2px solid
        var(--users-opposite);
}


.search-at {
    padding:
        0
        10px
        7px
        0;

    font-family:
        "Times New Roman",
        Times,
        serif;

    font-size:
        clamp(
            40px,
            6vw,
            72px
        );

    line-height: 0.9;
}


.user-search input {
    min-width: 0;

    border: 0;
    outline: 0;

    padding:
        0
        0
        7px;

    background:
        transparent;

    color:
        var(--users-opposite);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            32px,
            6.5vw,
            82px
        );

    font-weight: 700;
    line-height: 0.9;

    letter-spacing:
        -0.055em;
}


.user-search input::placeholder {
    color:
        var(--users-opposite);

    opacity: 0.35;
}


.search-submit {
    border: 0;

    padding:
        0
        0
        11px
        20px;

    background:
        transparent;

    color:
        var(--users-opposite);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 9px;
    letter-spacing: 0.09em;

    text-transform: uppercase;

    opacity: 0.58;

    transition:
        opacity 0.2s ease;
}


.search-submit:hover {
    opacity: 1;
}


.library-message {
    min-height: 17px;

    margin-top: 10px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    letter-spacing: 0.06em;

    color:
        var(--users-opposite);

    opacity: 0.55;
}


/* =========================================================
   SUGERENCIAS DE BÚSQUEDA
========================================================= */

.user-suggestions {
    position: absolute;

    left: 0;
    right: 0;
    top:
        calc(
            100% + 2px
        );

    z-index: 500;

    padding:
        11px
        0
        12px;

    background:
        var(--users-bg);

    border-bottom:
        1px solid
        var(--users-opposite);
}


.user-suggestion {
    display: block;

    width: 100%;

    border: 0;

    padding:
        5px
        0;

    background:
        transparent;

    color:
        var(--users-opposite);

    text-align: left;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            17px,
            2vw,
            25px
        );

    font-weight: 600;

    opacity: 0.62;

    transition:
        opacity 0.2s ease,
        padding-left 0.2s ease;
}


.user-suggestion:hover {
    opacity: 1;

    padding-left:
        12px;
}


/* =========================================================
   NUBE DE USUARIOS — PARTE INFERIOR

   TODOS LOS NOMBRES EN EL COLOR OPUESTO.
========================================================= */

.people-index {
    align-self: end;

    width: 100%;

    padding-top:
        clamp(
            18px,
            3vh,
            34px
        );
}


.people-index-list {
    width: 100%;

    display: flex;

    flex-wrap: wrap;

    justify-content: center;
    align-items: baseline;

    gap:
        clamp(5px, 1.2vw, 16px)
        clamp(13px, 2.6vw, 38px);

    padding:
        0
        clamp(4px, 3vw, 35px);
}


.people-index-user {
    border: 0;
    padding: 0;

    background:
        transparent;

    color:
        var(--users-opposite);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            12px,
            1.8vw,
            25px
        );

    font-weight: 600;

    line-height: 1;

    letter-spacing:
        -0.035em;

    opacity: 0.82;

    transform-origin:
        center;

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


/* tamaños desiguales = nube, no lista */

.people-index-user:nth-child(5n + 1) {
    font-size:
        clamp(
            18px,
            3vw,
            40px
        );
}


.people-index-user:nth-child(7n + 2) {
    font-size:
        clamp(
            10px,
            1.3vw,
            18px
        );

    font-weight: 400;
}


.people-index-user:nth-child(4n + 3) {
    font-size:
        clamp(
            15px,
            2.2vw,
            31px
        );
}


.people-index-user:nth-child(9n + 4) {
    font-style:
        italic;
}


.people-index-user:nth-child(6n) {
    transform:
        rotate(-2deg);
}


.people-index-user:nth-child(8n + 3) {
    transform:
        rotate(2deg);
}


.people-index-user:hover {
    opacity: 1;

    transform:
        rotate(0deg)
        scale(1.12);
}


/* =========================================================
   ARCHIVO BUSCADO
========================================================= */

.user-archive {
    position: relative;

    min-height: 100svh;

    padding:
        clamp(75px, 10vh, 120px)
        clamp(25px, 5vw, 85px)
        150px;

    background:
        var(--users-bg);

    color:
        var(--users-opposite);
}


.archive-heading {
    position: relative;

    z-index: 5;

    margin-bottom:
        clamp(
            80px,
            12vh,
            150px
        );

    text-align: center;
}


.archive-label {
    margin-bottom:
        7px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    letter-spacing: 0.14em;

    text-transform: uppercase;

    opacity: 0.55;
}


.archive-heading h1 {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            55px,
            11vw,
            150px
        );

    font-weight: 700;
    line-height: 0.78;

    letter-spacing:
        -0.07em;
}


.archive-count {
    margin-top:
        17px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    letter-spacing: 0.1em;

    text-transform: uppercase;

    opacity: 0.52;
}


/* =========================================================
   APORTACIONES

   Sin tarjetas.
   Cada aportación vive dentro de una AUREOLA MUCHO MAYOR
   que la usada en Cara.
========================================================= */

.user-gallery {
    position: relative;

    display: grid;

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

    gap:
        clamp(
            120px,
            16vw,
            245px
        )
        clamp(
            45px,
            7vw,
            110px
        );

    align-items: center;

    width:
        min(
            1380px,
            100%
        );

    margin:
        0
        auto;
}


.contribution-card {
    position: relative;

    min-height:
        clamp(
            260px,
            31vw,
            430px
        );

    display: flex;

    flex-direction: column;

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

    border: 0;
    padding:
        35px
        12px;

    background:
        transparent;

    color:
        var(--users-opposite);

    text-align: center;

    isolation: isolate;

    transform-origin:
        center;

    transition:
        transform 0.26s ease;
}


/*
   AUREOLA OPUESTA AL FONDO.
   Diámetro grande a propósito.
*/

.contribution-card::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    z-index: -1;

    width:
        clamp(
            330px,
            38vw,
            560px
        );

    height:
        clamp(
            330px,
            38vw,
            560px
        );

    transform:
        translate(
            -50%,
            -50%
        );

    border-radius:
        50%;

    background:
        radial-gradient(
            circle,
            var(--users-opposite) 0%,
            rgba(214, 216, 0, 0.82) 18%,
            rgba(214, 216, 0, 0.48) 39%,
            rgba(214, 216, 0, 0.18) 56%,
            rgba(214, 216, 0, 0) 76%
        );

    filter:
        blur(11px);

    opacity: 0.98;

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


.contribution-card:hover {
    z-index: 20;

    transform:
        scale(1.035);
}


.contribution-card:hover::before {
    transform:
        translate(
            -50%,
            -50%
        )
        scale(1.11);

    filter:
        blur(8px);

    opacity: 1;
}


/*
   Ritmo irregular sin mandar las piezas lejos.
*/

.contribution-card:nth-child(3n + 2) {
    transform:
        translateY(55px);
}


.contribution-card:nth-child(3n + 2):hover {
    transform:
        translateY(55px)
        scale(1.035);
}


.card-media {
    position: relative;

    z-index: 2;

    min-height:
        80px;

    display: grid;
    place-items: center;

    margin-bottom:
        13px;
}


.card-media img {
    display: block;

    max-width:
        min(
            210px,
            75%
        );

    max-height:
        190px;

    object-fit:
        contain;
}


.card-placeholder {
    width: 80px;
    height: 80px;

    display: grid;
    place-items: center;

    border:
        1px solid
        var(--users-bg);

    border-radius:
        50%;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    font-weight: 700;

    background:
        var(--users-opposite);
}


.card-type {
    position: relative;

    z-index: 2;

    margin-bottom:
        7px;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 7px;
    font-weight: 700;

    letter-spacing:
        0.12em;

    text-transform:
        uppercase;
}


.contribution-card h3 {
    position: relative;

    z-index: 2;

    max-width:
        270px;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            19px,
            2.5vw,
            34px
        );

    font-weight: 700;
    line-height: 0.9;

    letter-spacing:
        -0.045em;
}


.card-excerpt {
    position: relative;

    z-index: 2;

    max-width:
        28ch;

    margin-top:
        9px;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    line-height: 1.25;

    opacity: 0.75;
}


/* =========================================================
   VISOR
========================================================= */

.contribution-viewer {
    position: fixed;

    inset: 0;

    z-index: 24000;

    display: grid;
    place-items: center;

    padding: 22px;

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

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


.contribution-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.viewer-backdrop {
    position: absolute;
    inset: 0;

    background:
        rgba(41, 39, 255, 0.82);

    backdrop-filter:
        blur(18px);
}


.viewer-sheet {
    position: relative;

    z-index: 1;

    width:
        min(
            860px,
            94vw
        );

    max-height:
        calc(
            100dvh - 44px
        );

    overflow-y:
        auto;

    padding:
        clamp(52px, 7vw, 82px)
        clamp(28px, 6vw, 75px)
        80px;

    background:
        var(--users-opposite);

    color:
        var(--users-bg);
}


.viewer-close {
    position: absolute;

    top: 16px;
    right: 20px;

    border: 0;
    background: transparent;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 26px;
}


.viewer-user,
.viewer-type {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    font-weight: 700;

    letter-spacing:
        0.13em;

    text-transform:
        uppercase;

    opacity: 0.55;
}


.viewer-type {
    margin-top:
        7px;
}


.viewer-sheet h2 {
    max-width:
        700px;

    margin:
        22px
        0
        30px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            45px,
            8vw,
            94px
        );

    font-weight: 700;
    line-height: 0.82;

    letter-spacing:
        -0.06em;
}


.viewer-cover {
    display: block;

    max-width:
        min(
            590px,
            100%
        );

    max-height:
        590px;

    margin:
        30px
        auto
        38px;

    object-fit:
        contain;
}


.viewer-body {
    max-width:
        62ch;

    font-family:
        "Times New Roman",
        Times,
        serif;

    font-size: 19px;
    line-height: 1.35;

    white-space:
        pre-wrap;
}


.viewer-attachments {
    display: grid;

    gap: 22px;

    margin-top:
        38px;
}


.viewer-attachments img,
.viewer-attachments video {
    display: block;

    max-width: 100%;
    max-height: 650px;

    margin: 0 auto;

    object-fit:
        contain;
}


.viewer-file-link,
.viewer-external {
    display: inline-block;

    margin-top:
        18px;

    color:
        var(--users-bg);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 9px;
    font-weight: 700;

    letter-spacing:
        0.07em;
}


.viewer-file-link {
    margin-top: 0;
}


/* =========================================================
   VACÍO
========================================================= */

.empty-user-gallery {
    grid-column:
        1 / -1;

    padding:
        80px 0;

    color:
        var(--users-opposite);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            24px,
            4vw,
            48px
        );

    font-weight: 700;

    text-align:
        center;
}


/* =========================================================
   CURSOR PERSONALIZADO
========================================================= */

@media (pointer: fine) {

    html,
    body,
    body *,
    a,
    button,
    input {
        cursor:
            none !important;
    }


    .custom-cursor {
        position: fixed;

        top: 0;
        left: 0;

        z-index: 30000;

        width: 165px;
        height: 165px;

        pointer-events: none;

        transform:
            translate(
                -50%,
                -50%
            );

        transition:
            width 0.18s ease,
            height 0.18s ease,
            transform 0.18s ease;

        will-change:
            left,
            top,
            transform;
    }


    .custom-cursor img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit:
            contain;
    }


    .custom-cursor.is-hovering {
        width: 108px;
        height: 108px;

        transform:
            translate(
                -50%,
                -50%
            )
            rotate(10deg);
    }


    .custom-cursor.is-clicking {
        transform:
            translate(
                -50%,
                -50%
            )
            scale(0.78);
    }

}


@media (pointer: coarse) {

    .custom-cursor {
        display: none;
    }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .user-gallery {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        row-gap:
            145px;
    }


    .contribution-card:nth-child(3n + 2) {
        transform:
            none;
    }


    .contribution-card:nth-child(even) {
        transform:
            translateY(45px);
    }


    .contribution-card:nth-child(even):hover {
        transform:
            translateY(45px)
            scale(1.035);
    }

}


@media (max-width: 620px) {

    .users-landing {
        padding:
            21px
            18px
            25px;
    }


    .users-label {
        font-size: 7px;
    }


    .search-zone {
        width: 100%;

        transform:
            translateY(-2vh);
    }


    .search-submit {
        padding-left:
            9px;

        font-size: 7px;
    }


    .people-index-list {
        gap:
            8px
            17px;

        padding:
            0;
    }


    .user-archive {
        padding:
            75px
            17px
            115px;
    }


    .user-gallery {
        grid-template-columns:
            1fr;

        row-gap:
            135px;
    }


    .contribution-card,
    .contribution-card:nth-child(even),
    .contribution-card:nth-child(3n + 2) {
        transform:
            none;
    }


    .contribution-card:hover,
    .contribution-card:nth-child(even):hover,
    .contribution-card:nth-child(3n + 2):hover {
        transform:
            scale(1.025);
    }


    .contribution-card::before {
        width:
            min(
                470px,
                112vw
            );

        height:
            min(
                470px,
                112vw
            );
    }

}
/* TEST CURSOR DIFERENCIA */

@media (pointer: fine) {

    .custom-cursor {
        mix-blend-mode: difference !important;
        isolation: auto !important;
        z-index: 999999 !important;
    }

    .custom-cursor img {
        filter: brightness(0) invert(1) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

}