﻿/* =============================================================
   modals.css — Estilos para Modal Primer Acceso e Invitación
   Expedición 2026 / Fundación Leer
   Depende de: Bootstrap 5 (modal, fade, show)
   ============================================================= */

/* --------------- FUENTES --------------- */

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro-ExtraLight.woff") format("woff");
    font-display: swap;
    font-weight: 200;
}

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro-Light.woff") format("woff");
    font-display: swap;
    font-weight: 300;
}

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro.woff") format("woff");
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro-Medium.woff") format("woff");
    font-display: swap;
    font-weight: 500;
}

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro-Bold.woff") format("woff");
    font-display: swap;
    font-weight: 700;
}

@font-face {
    font-family: "Bliss pro";
    src: url("../fonts/BlissPro-ExtraBold.woff") format("woff");
    font-display: swap;
    font-weight: 800;
}

@font-face {
    font-family: "Luckiest Guy";
    src: url("../fonts/LuckiestGuy-Regular.ttf") format("truetype");
    font-display: swap;
}

/* --------------- VARIABLES --------------- */

:root {
    --fl-white: #fff;
    --fl-lightBlue: #008fbe;
    --fl-awards-luckiestGuy: 'Luckiest Guy', 'sans-serif';
    --fl-blissPro: 'Bliss pro', 'sans-serif';
}

/* --------------- RESET MÍNIMO --------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--fl-blissPro), sans-serif;
}

/* --------------- BOTONES AWARDS --------------- */

a.btn-awards,
button.btn-awards {
    font-family: var(--fl-awards-luckiestGuy);
    font-size: 1.25rem;
    letter-spacing: .05em;
    line-height: 1;
    color: var(--fl-white);
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 3rem;
    border: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    padding: 1.25rem 2rem;
    margin-bottom: .25rem;
    text-align: center;
    text-decoration: none;
}

    a.btn-awards::before,
    button.btn-awards.green::before,
    button.btn-awards.yellow::before,
    button.btn-awards.blue::before {
        content: url("../img/embajadores/btn-before.svg");
        position: absolute;
        z-index: 10;
        top: .25em;
        left: .5rem;
        border-radius: 2rem;
        overflow: hidden;
        opacity: .5;
    }

    a.btn-awards:hover,
    button.btn-awards:hover {
        filter: saturate(1.1);
    }

    a.btn-awards:active,
    button.btn-awards:active {
        transform: scale(0.98);
        transition: transform .1s linear;
    }

    a.btn-awards.blue,
    button.btn-awards.blue {
        background: #008FBE;
        box-shadow: 0 2px 0 3px #0084b1;
        color: var(--fl-white);
    }

    a.btn-awards.yellow,
    button.btn-awards.yellow {
        background: #EBAC22;
        box-shadow: 0 2px 0 3px #f9bc39;
        color: var(--fl-white);
    }

    a.btn-awards.green,
    button.btn-awards.green {
        background: #1DC61B;
        box-shadow: 0 2px 0 3px #7de87c;
        color: var(--fl-white);
    }

/* ===============================================================
   MODALES
   =============================================================== */

/* Backdrop azul con blur */
.modal-content h3 {
    font-family: var(--fl-awards-luckiestGuy);
}

.modal-backdrop {
    background-color: rgba(0, 143, 190, 0.8);
    backdrop-filter: blur(8px);
}

    .modal-backdrop.show {
        opacity: 1;
    }

/* Backdrop con rayos starburst — clase .modal--rays en el elemento .modal */
.modal--rays {
    overflow: hidden;
}

    .modal--rays::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 150vmax;
        height: 150vmax;
        transform: translate(-50%, -50%);
        background: repeating-conic-gradient( rgba(255, 255, 255, 0.13) 0deg 20deg, transparent 20deg 40deg ), radial-gradient(circle at 50% 50%, #00c3ff 0%, #1ab8f5 50%, #0095be 100%);
        pointer-events: none;
        z-index: 0;
        animation: rays-rotate 45s linear infinite;
    }

@keyframes rays-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.modal--rays .modal-dialog {
    position: relative;
    z-index: 1;
}

.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.4s ease;
    opacity: 0;
    transform: scale(0.9);
}

.modal.show .modal-dialog {
    opacity: 1;
    transform: scale(1);
}

/* Botón de cierre */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    pointer-events: auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #e8334a;
    box-shadow: 0 4px 0 #b8192e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    padding: .4rem;
    transition: transform .1s ease, box-shadow .1s ease;
}

    .modal-close:hover {
        background: #f04560;
    }

    .modal-close:active {
        transform: translateY(3px);
        box-shadow: 0 1px 0 #b8192e;
    }

/* Contenedor del diálogo */
.modal-expedition__dialog {
    max-width: 768px;
    width: 100%;
}

/* Animación pop para el modal de invitación */
@keyframes modal-pop {
    0% {
        transform: translateY(-60px) scale(0.95);
        opacity: 0;
    }

    60% {
        transform: translateY(12px) scale(1);
        opacity: 1;
    }

    80% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

.modal.show .modal-expedition__dialog:has(.modal-expedition__content--join) {
    animation: modal-pop .45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Contenido del modal */
.modal-expedition__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 4rem 3rem;
    border: none;
    border-radius: 0;
    position: relative;
    text-align: center;
    background-color: transparent;
    background-image: url("../img/embajadores/card-background.svg"), url("../img/embajadores/card-background.svg");
    background-position: top center, bottom center;
    background-size: 100% auto, 100% auto;
    background-repeat: no-repeat, no-repeat;
}

.modal-expedition__content {
    background-color: transparent;
}

/* Textos del modal */
.modal .modal-expedition__title {
    font-family: var(--fl-awards-luckiestGuy);
    font-size: 48px;
    color: #000;
    margin: 0;
}

.modal .modal-expedition__subtitle {
    font-size: 24px;
    font-weight: 300;
    color: #828282;
    line-height: 1.5;
    margin: 0;
}

/* Imagen visual (escudo en invitación) */
.modal-notif__visual {
    display: flex;
    justify-content: center;
    width: 100%;
}

    .modal-notif__visual img {
        max-width: 200px;
    }

/* Botones de acción */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: 100%;
    align-items: center;
    margin-top: .5rem;
}

.modal-actions--row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

    .modal-actions--row .btn-awards {
        flex: 1;
    }

/* --------------- MODAL 01 — PRIMER ACCESO --------------- */

.bg-modal-square {
    background-image: url("../img/embajadores/bg-modal-square.svg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

@media (width >= 576px) {
    .modal-expedition__dialog {
        max-width: 600px;
    }
}

.modal-expedition__content--welcome {
    overflow: hidden;
    min-height: 70dvh;
    position: relative;
    display: flex;
    flex-direction: column;
    background-image: url("../img/embajadores/bg-modal-square.svg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

    .modal-expedition__content--welcome .modal-close {
        top: 2.5rem;
        z-index: 10;
    }

        .modal-expedition__content--welcome .modal-close svg {
            display: block;
            width: 1.1rem;
            height: 1.1rem;
        }

    .modal-expedition__content--welcome .modal-expedition-welcome__body {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 4rem 2rem;
        width: 100%;
        flex: 1;
    }

    .modal-expedition__content--welcome .modal-expedition-welcome__kicker {
        font-size: 24px;
        font-weight: 700;
        font-family: 'Bliss Pro', sans-serif;
        color: #353535;
        margin: 0;
        line-height: 1.15;
    }

    .modal-expedition__content--welcome .modal-expedition-welcome__title {
        font-family: var(--fl-awards-luckiestGuy);
        font-size: 56px;
        color: #353535;
        margin: 0 0 .75rem;
        text-transform: uppercase;
        line-height: 1.1;
    }

    .modal-expedition__content--welcome .modal-expedition__subtitle {
        margin-bottom: 4rem;
    }

    .modal-expedition__content--welcome .modal-expedition-welcome__bottom {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 0;
    }

/* --------------- MODAL 02 — INVITACIÓN --------------- */

.modal-expedition__content--join {
    padding-block: 2rem 3rem;
}

    .modal-expedition__content--join .modal-expedition__subtitle:last-of-type {
        margin-bottom: 3rem;
    }

/* --------------- MODAL DEMO (triggers) --------------- */

.modal-demo {
    padding: 3rem 0 6rem;
}

.modal-demo__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.modal-demo__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem 1.25rem;
    background: rgba(255, 255, 255, .65);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    text-align: center;
}

.modal-demo__name {
    font-family: var(--fl-awards-luckiestGuy);
    font-size: 20px;
    color: #353535;
    margin: 0;
    line-height: 1.2;
}

/* ===============================================================
   RESPONSIVE
   =============================================================== */

@media (max-width: 767px) {
    .modal-expedition__dialog {
        margin-inline: auto;
        width: calc(100% - 2rem);
    }

    .modal-expedition__content--join .modal-actions--row {
        flex-direction: column;
    }

        .modal-expedition__content--join .modal-actions--row .btn-awards {
            width: 100%;
        }

    .modal-expedition__content--welcome .modal-expedition-welcome__kicker {
        font-size: 18px;
    }

    .modal-expedition__content--welcome .modal-expedition-welcome__title {
        font-size: 46px;
    }

    .modal .modal-expedition__subtitle {
        font-size: 18px;
    }

    .modal-expedition__content--welcome .modal-expedition__subtitle {
        font-size: 18px;
    }

    .modal-expedition__content--welcome .modal-expedition-welcome__body {
        padding-inline: 0;
    }

    .modal-expedition__content--join .modal-expedition__subtitle:last-of-type {
        margin-bottom: .5rem;
    }
}

@media (width < 992px) {
    .modal-dialog {
        max-width: calc(100% - 1rem);
    }

    .modal-expedition__content {
        background-image: none;
        background-color: #fff;
        border-radius: 1.5rem;
    }
}

@media (width < 768px) {
    .modal-book__top {
        flex-direction: column;
        align-items: center;
    }

    .modal-book__body {
        text-align: center;
    }
}

@media (width < 576px) {
    .modal-expedition__content {
        padding: .75rem 1rem;
    }

    .modal-notif__visual img {
        max-width: 175px;
    }

    .modal .modal-expedition__title {
        font-size: 2.25rem;
    }

    .modal-expedition__content--gem-earned .gema-card__icon {
        width: 160px;
        height: 160px;
    }

    .modal-expedition__content--gem-earned [data-gem-count] {
        font-size: 52px;
    }

    .modal-expedition__content--gem-earned .modal-expedition__title {
        font-size: 1.5rem;
    }

    .modal-actions--row .btn-awards {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
}

@media (width < 420px) {
    .modal-expedition__content--gem-earned .modal-expedition__title {
        font-size: 1.25rem;
    }

    .modal-expedition__content--gem-earned [data-gem-count] {
        font-size: 44px;
    }

    .modal-expedition__content--gem-earned .gema-card__icon {
        width: 140px;
        height: 140px;
    }
}

@media (max-height: 700px) {

    .modal-certificado__img {
        width: 320px;
    }
}
