/* KOVRA — bienvenida de primer acceso a Inicio.
   Reutiliza la tipografía, escala, colores, tarjetas y botón principal existentes. */

body.kovra-first-welcome-open {
    overflow: hidden !important;
}

.first-home-welcome[hidden] {
    display: none !important;
}

.first-home-welcome {
    position: fixed;
    z-index: 2400;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        max(12px, env(safe-area-inset-top))
        12px
        max(12px, env(safe-area-inset-bottom));
    background: rgba(5, 8, 7, .86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.first-home-welcome-card {
    position: relative;
    width: min(100%, 430px);
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 19px 17px 15px;
    border: 1px solid rgba(54, 230, 107, .30);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0, rgba(54, 230, 107, .07), transparent 30%),
        linear-gradient(145deg, var(--card-light), var(--card));
    box-shadow:
        0 0 30px rgba(54, 230, 107, .09),
        0 24px 64px rgba(0, 0, 0, .62);
    color: var(--text);
    text-align: center;
    scrollbar-width: none;
}

.first-home-welcome-card::-webkit-scrollbar {
    display: none;
}

.first-home-welcome-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
    color: var(--text-soft);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.first-home-welcome-close:active {
    transform: scale(.97);
}

.first-home-welcome-logo {
    width: min(48vw, 178px);
    margin: 3px auto 13px;
}

.first-home-welcome-logo .kovra-logo-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 58px;
    object-fit: contain;
    image-rendering: auto;
    filter: none;
    transform: none;
}

.first-home-welcome-title {
    margin: 0 34px 9px;
    color: var(--text);
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.first-home-welcome-lead {
    margin: 0 auto 10px;
    max-width: 360px;
    color: var(--text);
    font-size: clamp(12px, 3.2vw, 13.5px);
    font-weight: 700;
    line-height: 1.48;
}

.first-home-welcome-copy {
    margin: 0 auto 13px;
    max-width: 366px;
    color: var(--text-soft);
    font-size: clamp(10.5px, 2.8vw, 11.5px);
    font-weight: 500;
    line-height: 1.52;
}

.first-home-welcome-benefits {
    display: grid;
    gap: 7px;
    margin: 0 0 12px;
}

.first-home-welcome-benefit {
    min-height: 50px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
    text-align: left;
}

.first-home-welcome-benefit-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(54, 230, 107, .28);
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.first-home-welcome-benefit strong {
    color: var(--text);
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 700;
    line-height: 1.3;
}

.first-home-welcome-closing {
    margin: 0 auto 13px;
    max-width: 365px;
    color: var(--text-soft);
    font-size: clamp(10px, 2.7vw, 11px);
    font-weight: 500;
    line-height: 1.48;
    text-align: left;
}

.first-home-welcome-start {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(145deg, #49ef7d, #22bd54);
    color: #041007;
    box-shadow: 0 0 24px rgba(54, 230, 107, .15);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.first-home-welcome-start span {
    flex: 1 1 auto;
    text-align: center;
    padding-left: 22px;
}

.first-home-welcome-start strong {
    flex: 0 0 22px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.first-home-welcome-start:active {
    transform: scale(.99);
}

.first-home-welcome-note {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1.3;
}

@media (max-width: 360px) {
    .first-home-welcome-card {
        padding: 16px 13px 13px;
        border-radius: 18px;
    }

    .first-home-welcome-logo {
        width: min(48vw, 158px);
        margin-bottom: 10px;
    }

    .first-home-welcome-title {
        margin-bottom: 8px;
        font-size: 19px;
    }

    .first-home-welcome-benefit {
        min-height: 46px;
        padding: 7px 9px;
    }
}

@media (max-height: 720px) {
    .first-home-welcome-card {
        padding-top: 14px;
    }

    .first-home-welcome-logo {
        width: min(42vw, 150px);
        margin-bottom: 8px;
    }

    .first-home-welcome-title {
        margin-bottom: 7px;
    }

    .first-home-welcome-lead,
    .first-home-welcome-copy {
        margin-bottom: 8px;
    }

    .first-home-welcome-benefits {
        gap: 6px;
        margin-bottom: 9px;
    }

    .first-home-welcome-closing {
        margin-bottom: 10px;
    }

    .first-home-welcome-start {
        min-height: 50px;
    }
}
