*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'DM Sans',sans-serif;
    overflow: hidden;
}

/* ── SHARED BG ───────────────────────────────────────── */
.bg {
    position: absolute;
    inset: 0;
    background-image: url('../photo-1477959858617-67f85cf4f1df.jpg');
    background-size: cover;
    background-position: center top;
}

    .bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(160deg,rgba(10,30,65,0.76) 0%,rgba(10,80,60,0.62) 55%,rgba(60,120,10,0.48) 100%);
    }

/* ── SPLASH ──────────────────────────────────────────── */
#splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: linear-gradient(135deg,#0f3d72 0%,#0c7a5e 50%,#5db81f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease,visibility 0.8s ease;
}

    #splash.out {
        opacity: 0;
        visibility: hidden;
    }

.ring {
    position: absolute;
    border-radius: 72px;
    border: 1.5px solid rgba(255,255,255,0.13);
    animation: breathe 3.5s ease-in-out infinite;
}

    .ring:nth-child(1) {
        width: 280px;
        height: 148px;
        animation-delay: 0s;
    }

    .ring:nth-child(2) {
        width: 420px;
        height: 222px;
        animation-delay: 0.45s;
    }

    .ring:nth-child(3) {
        width: 560px;
        height: 296px;
        animation-delay: 0.9s;
    }

    .ring:nth-child(4) {
        width: 700px;
        height: 370px;
        animation-delay: 1.35s;
    }

@keyframes breathe {
    0%,100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.splash-box {
    background: #fff;
    border-radius: 22px;
    padding: 20px 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    animation: popIn 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.25s both;
    box-shadow: 0 24px 60px rgba(0,0,0,0.22);
}

@keyframes popIn {
    from {
        transform: scale(0.65);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.splash-label {
    z-index: 2;
    margin-top: 26px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 500;
    animation: riseIn 0.6s ease 0.8s both;
}

.splash-accent {
    z-index: 2;
    margin-top: 10px;
    width: 50px;
    height: 3px;
    border-radius: 2px;
    background: #a8e057;
    animation: riseIn 0.6s ease 1s both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── MODULE SELECTOR ─────────────────────────────────── */
#modules {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease,visibility 0.6s ease;
}

    #modules.show {
        opacity: 1;
        visibility: visible;
    }

.modules-header {
    text-align: center;
    margin-bottom: 30px;
    animation: riseIn 0.5s ease 0.1s both;
}

.modules-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

    .modules-logo img {
        height: 40px;
        width: auto;
        filter: drop-shadow(0 2px 12px rgba(255,255,255,0.3));
    }

.modules-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
}

.modules-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
    width: 100%;
    max-width: 860px;
}

/* each card */
.mod-card {
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s,box-shadow 0.22s;
    animation: cardIn 0.6s cubic-bezier(0.34,1.3,0.64,1) both;
}

    .mod-card:nth-child(1) {
        animation-delay: 0.15s;
    }

    .mod-card:nth-child(2) {
        animation-delay: 0.28s;
    }

    .mod-card:nth-child(3) {
        animation-delay: 0.41s;
    }

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mod-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.38);
}

.mod-card:active {
    transform: translateY(-2px);
}

/* image area */
.mod-img {
    position: relative;
    height: 160px;
    overflow: hidden;
}

    .mod-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.mod-card:hover .mod-img img {
    transform: scale(1.07);
}

.mod-img-overlay {
    position: absolute;
    inset: 0;
}

/* icon badge */
.mod-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* body */
.mod-body {
    padding: 32px 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.mod-name {
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
}

.mod-desc {
    font-size: 11.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    opacity: 0.75;
}

/* acceder button */
.mod-btn {
    margin-top: auto;
    padding-top: 14px;
    width: 100%;
    display: flex;
    justify-content: center;
}

    .mod-btn button {
        padding: 9px 28px;
        border-radius: 50px;
        border: none;
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: 0.5px;
        cursor: pointer;
        transition: filter 0.18s,transform 0.15s;
        text-transform: uppercase;
    }

        .mod-btn button:hover {
            filter: brightness(1.12);
            transform: scale(1.04);
        }

        .mod-btn button:active {
            transform: scale(0.98);
        }

/* ── CARD 1 — Workflow / Operación Individual (BLUE) ── */
.mod-card.blue .mod-img-overlay {
    background: linear-gradient(180deg,rgba(15,61,114,0.25) 0%,rgba(15,61,114,0.7) 100%);
}

.mod-card.blue .mod-badge {
    background: #1660b0;
}

.mod-card.blue .mod-body {
    background: #0f3d72;
    color: #fff;
}

.mod-card.blue .mod-name {
    color: #e8f4ff;
}

.mod-card.blue .mod-desc {
    color: #93c5fd;
}

.mod-card.blue .mod-btn button {
    background: #1660b0;
    color: #fff;
    box-shadow: 0 4px 16px rgba(22,96,176,0.4);
}

/* ── CARD 2 — Institucional Privado (TEAL/DARK) ──────── */
.mod-card.teal .mod-img-overlay {
    background: linear-gradient(180deg,rgba(10,100,80,0.25) 0%,rgba(10,100,80,0.72) 100%);
}

.mod-card.teal .mod-badge {
    background: #0c7a5e;
}

.mod-card.teal .mod-body {
    background: #0a4a3a;
    color: #fff;
}

.mod-card.teal .mod-name {
    color: #ccfbef;
}

.mod-card.teal .mod-desc {
    color: #6ee7b7;
}

.mod-card.teal .mod-btn button {
    background: #0c7a5e;
    color: #fff;
    box-shadow: 0 4px 16px rgba(12,122,94,0.4);
}

/* ── CARD 3 — Fidelización (GREEN) ──────────────────── */
.mod-card.green .mod-img-overlay {
    background: linear-gradient(180deg,rgba(45,120,10,0.25) 0%,rgba(45,120,10,0.72) 100%);
}

.mod-card.green .mod-badge {
    background: #4a9e0a;
}

.mod-card.green .mod-body {
    background: #2d5a0a;
    color: #fff;
}

.mod-card.green .mod-name {
    color: #ecfccb;
}

.mod-card.green .mod-desc {
    color: #a3e635;
}

.mod-card.green .mod-btn button {
    background: #5db81f;
    color: #fff;
    box-shadow: 0 4px 16px rgba(93,184,31,0.4);
}

/* ── LOGIN CARD ───────────────────────────────────────── */
#scene {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease,visibility 0.6s ease;
}

    #scene.show {
        opacity: 1;
        visibility: visible;
    }

.card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 28px;
    width: 100%;
    max-width: 400px;
    padding: 40px 32px 32px;
    overflow: hidden;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.55s cubic-bezier(0.34,1.3,0.64,1);
}

#scene.show .card {
    transform: translateY(0) scale(1);
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg,#0f3d72 0%,#1ab5d8 45%,#6dcc22 100%);
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.sep {
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg,#0f3d72,#6dcc22);
    margin-bottom: 22px;
}

.tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #1B6CB5;
    text-align: center;
    margin-bottom: 4px;
}

.mod-tag-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0px;
    padding: 3px 14px;
    border-radius: 50px;
    display: inline-block;
}

.mod-tag-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.title {
    font-size: 21px;
    font-weight: 700;
    color: #0f1c35;
    text-align: center;
    margin-bottom: 22px;
}

.avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.avatar {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg,#1660b0,#1ab5d8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(22,96,176,0.28);
}

.help-text {
    font-size: 13px;
    color: #7a8499;
    text-align: center;
    line-height: 1.65;
    margin-bottom: 26px;
}

    .help-text strong {
        color: #1660b0;
        font-weight: 600;
    }

/* option buttons */
.opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #e6e9ef;
    border-radius: 16px;
    background: #f7f9fc;
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.22s,background 0.22s,transform 0.15s,box-shadow 0.22s;
}

    .opt::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg,#e6f9cc 0%,#ccf090 100%);
        opacity: 0;
        transition: opacity 0.28s ease;
        border-radius: inherit;
        z-index: 0;
    }

    .opt:hover::before {
        opacity: 1;
    }

    .opt:hover {
        border-color: #5db81f;
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(93,184,31,0.22);
    }

        .opt:hover .opt-icon {
            background: #3a9c00 !important;
            box-shadow: 0 4px 14px rgba(58,156,0,0.35);
        }

        .opt:hover .opt-main {
            color: #1e5200;
        }

        .opt:hover .opt-sub {
            color: #3a7a10;
        }

        .opt:hover .opt-arrow {
            color: #5db81f;
            transform: translateX(3px);
        }

    .opt:active {
        transform: translateY(0);
        box-shadow: none;
    }

    .opt .ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(93,184,31,0.38);
        transform: scale(0);
        animation: rippleAnim 0.6s linear;
        pointer-events: none;
        z-index: 1;
    }

@keyframes rippleAnim {
    to {
        transform: scale(5);
        opacity: 0;
    }
}

.opt-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.22s,box-shadow 0.22s;
    z-index: 1;
    position: relative;
}

    .opt-icon.navy {
        background: #0f1c35;
    }

    .opt-icon.blue {
        background: #1660b0;
    }

.opt-main {
    font-size: 14px;
    font-weight: 600;
    color: #0f1c35;
    display: block;
    margin-bottom: 2px;
    transition: color 0.22s;
    position: relative;
    z-index: 1;
}

.opt-sub {
    font-size: 11.5px;
    color: #9ea8bc;
    display: block;
    transition: color 0.22s;
    position: relative;
    z-index: 1;
}

.opt-arrow {
    color: #c4cbd9;
    font-size: 20px;
    margin-left: auto;
    transition: color 0.22s,transform 0.22s;
    position: relative;
    z-index: 1;
}

.foot-link {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #b0b8c8;
    margin-top: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

    .foot-link:hover {
        color: #5db81f;
    }

/* back to modules */
.back-modules {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ea8bc;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color 0.2s;
}

    .back-modules:hover {
        color: #1660b0;
    }

/* ── REDIRECT OVERLAY ────────────────────────────────── */
#redir {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: linear-gradient(135deg,#0f3d72 0%,#0c7a5e 50%,#5db81f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease,visibility 0.45s ease;
}

    #redir.show {
        opacity: 1;
        visibility: visible;
    }

.redir-logo {
    background: #fff;
    border-radius: 22px;
    padding: 18px 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
    animation: logoPulse 1.6s ease-in-out infinite;
}

@keyframes logoPulse {
    0%,100% {
        transform: scale(1);
        box-shadow: 0 20px 50px rgba(0,0,0,0.28);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 28px 65px rgba(0,0,0,0.38);
    }
}

.redir-msg {
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.22);
    border-top-color: #a8e057;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.dots span {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    margin: 0 5px;
    animation: bounce 1.2s ease-in-out infinite;
}

    .dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes bounce {
    0%,80%,100% {
        transform: scale(1);
        background: rgba(255,255,255,0.45);
    }

    40% {
        transform: scale(1.5);
        background: #a8e057;
    }
}

.prog-track {
    width: 230px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg,#a8e057,#6dcc22);
    transition: width 3s linear;
}

    .prog-fill.go {
        width: 100%;
    }

.redir-counter {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media(max-width:700px) {
    .modules-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        gap: 12px;
    }

    .mod-img {
        height: 120px;
    }
}

@media(max-width:480px) {
    #scene {
        padding: 16px 12px;
    }

    .card {
        padding: 28px 20px 28px;
        border-radius: 22px;
    }

    .title {
        font-size: 19px;
    }
}

/* Estilo para la 4ta tarjeta (Indigo) */
.mod-card.indigo .mod-img-overlay {
    background: linear-gradient(180deg,rgba(49,46,129,0.25) 0%,rgba(49,46,129,0.72) 100%);
}

.mod-card.indigo .mod-badge {
    background: #4338ca;
}

.mod-card.indigo .mod-body {
    background: #312e81;
    color: #fff;
}

.mod-card.indigo .mod-name {
    color: #e0e7ff;
}

.mod-card.indigo .mod-desc {
    color: #a5b4fc;
}

.mod-card.indigo .mod-btn button {
    background: #4338ca;
    color: #fff;
    box-shadow: 0 4px 16px rgba(67,56,202,0.4);
}

/* Ajuste opcional para que quepan 4 en desktop */
@media(min-width:1000px) {
    .modules-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1100px;
    }
}

.wordmark {
    font-size: 23px;
    font-weight: 700;
    color: #0f1c35;
    letter-spacing: -0.2px;
}