/* ======================================================
   Comafi — eBanking Empresas login
   ====================================================== */


/* ---------- font ---------- */
@font-face {
    font-family: "Archivo";
    src: url("../fuente/Archivo-VariableFont_wdth,wght.6a56e5d75309cc77.ttf") format("truetype-variations"),
         url("../fuente/Archivo-VariableFont_wdth,wght.6a56e5d75309cc77.ttf") format("truetype");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}


/* ---------- tokens ---------- */
:root {
    --teal:       #009E7F;
    --teal-ink:   #0A7A64;
    --teal-dark:  #0F3A33;
    --brand:      #005458;
    --panel:      #1A332E;
    --panel-shade:#0E201C;
    --ink:        #1E1E1E;
    --muted:      #6B7280;
    --line:       #E3E6EA;
    --field:      #F7F8FA;
    --warn-bg:    #D9F1EA;
    --warn-ink:   #0E1F1B;

    --ease:       cubic-bezier(.22, .61, .36, 1);
    --dur-fast:   .18s;
    --dur:        .28s;
    --dur-slow:   .45s;
}


/* ---------- base ---------- */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--ink);
    font-family: "Archivo", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}


/* ---------- layout ---------- */
.wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.left {
    position: relative;
    min-height: 100vh;
    padding: 28px 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        url("../img/banner-login-full.png") center / cover no-repeat,
        var(--teal-dark);
}

.right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 48px 180px;
    background: #fff;
}


/* ---------- left: pill (contact icons) ---------- */
.pill {
    width: fit-content;
    padding: 25px 40px;
    display: inline-flex;
    align-items: center;
    gap: 25px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.pill {
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.pill a {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-ink);
    transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.pill a:hover {
    transform: scale(1.12);
    color: var(--brand);
}


/* ---------- left: copy ---------- */
.copy {
    max-width: 1100px;
}

.copy h1,
.copy p {
    max-width: 520px;
}

.copy h1 {
    margin: 0 0 6px;
    font-size: 70px;
    line-height: 1.05;
    font-weight: 700;
}

.copy h1 .accent {
    display: block;
    color: var(--teal);
    font-weight: 700;
}

.copy p {
    margin: 16px 0 0;
    font-size: 25px;
    color: #EAF2EF;
}

.copy p strong {
    color: #fff;
    font-weight: 700;
}


/* ---------- left: security box ---------- */
.secbox {
    width: 100%;
    max-width: 1100px;
    margin-top: 28px;
    padding: 25px 32px;
    display: flex;
    align-items: center;
    gap: 22px;
    border: 1px solid #fff;
    border-radius: 18px;
}

.secbox .lock {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 12px;
}

.secbox .lock svg {
    width: 28px;
    height: 28px;
}

.secbox p {
    margin: 0;
    color: #fff;
    font-size: 20px;
    line-height: 1.45;
}

.secbox {
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.secbox:hover {
    background: rgba(255, 255, 255, .04);
    transform: translateY(-2px);
}

.secbox p a {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    transition: opacity var(--dur) var(--ease);
}

.secbox p a:hover {
    opacity: .75;
}


/* ---------- right: logo ---------- */
.logo {
    align-self: flex-start;
    margin: 4px auto 32px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ---------- right: card ---------- */
.card {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card h2 {
    margin: 0;
    text-align: center;
    font-size: 25px;
    font-weight: 400;
    color: var(--ink);
}

.card h2 b {
    font-weight: 700;
}

.card .hi {
    margin: 0 0 4px;
    font-size: 25px;
    font-weight: 400;
}


/* ---------- form ---------- */
form {
    width: 100%;
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    position: relative;
    overflow: hidden;
    transition:
        max-height var(--dur-slow) var(--ease),
        opacity    var(--dur-slow) var(--ease),
        transform  var(--dur-slow) var(--ease),
        margin     var(--dur-slow) var(--ease);
}

.field.removing {
    max-height: 0 !important;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    margin: 0;
    pointer-events: none;
}

.field-label {
    display: block;
    margin: 0 2px 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

/* Honeypot — kept off-screen, invisible to real users, visible to scrapers */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-error {
    margin: 0 2px;
    padding: 0 14px;
    background: #FDECEC;
    color: #B4232A;
    border: 1px solid #F3BFC2;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    border-width: 0;
    transition:
        opacity      var(--dur)      var(--ease),
        transform    var(--dur)      var(--ease),
        max-height   var(--dur-slow) var(--ease),
        padding      var(--dur-slow) var(--ease),
        margin       var(--dur-slow) var(--ease),
        border-width var(--dur-slow) var(--ease);
}

.form-error.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 160px;
    padding: 10px 14px;
    margin: 2px 2px 10px;
    border-width: 1px;
}

.field input {
    width: 100%;
    height: 45px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 5px;
    font-family: inherit;
    font-size: 20px;
    color: var(--ink);
    outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.field input:hover {
    border-color: var(--brand);
}

.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 84, 88, .15);
}

.field input::placeholder {
    color: #7B8591;
}


/* ---------- form: password toggle ---------- */
.field.pwd input {
    padding-right: 48px;
}

.field.pwd .toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.field.pwd .toggle:hover {
    color: var(--brand);
    background: rgba(0, 84, 88, .08);
    transform: translateY(-50%) scale(1.08);
}

.field.pwd .toggle:active {
    transform: translateY(-50%) scale(.94);
}

.field.pwd .toggle svg {
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.field.pwd       .toggle .eye-off { display: none; }
.field.pwd.show  .toggle .eye     { display: none; }
.field.pwd.show  .toggle .eye-off { display: block; }


/* ---------- form: hint ---------- */
.hint {
    margin: -6px 2px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.hint:hover {
    color: var(--teal-ink);
    text-decoration: underline;
}


/* ---------- cloudflare turnstile (success mock) ---------- */
.turnstile {
    width: 300px;
    height: 65px;
    margin: 10px auto 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FAFAFA;
    border: 1px solid #E6E8EB;
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
}

.turnstile .ts-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4A4A4A;
}

.turnstile .ts-check {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0E9F6E;
    color: #fff;
    border-radius: 50%;
}

.turnstile .ts-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.turnstile .ts-brand {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 11px;
    color: #404040;
    letter-spacing: .5px;
}

.turnstile .ts-brand svg {
    width: 22px;
    height: 14px;
}

.turnstile .ts-links {
    font-size: 9px;
    color: #808080;
}

.turnstile .ts-links a {
    color: #808080;
}


/* ---------- buttons ---------- */
.btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background   var(--dur) var(--ease),
        color        var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        transform    var(--dur) var(--ease),
        box-shadow   var(--dur) var(--ease);
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 84, 88, .18);
}

.btn:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 84, 88, .18);
}

.btn-primary {
    margin-top: 10px;
    background: #D7DBDE;
    color: #8A9199;
}

.btn-primary.on {
    background: var(--brand);
    color: #fff;
}

.btn-primary.on:hover {
    background: var(--brand);
}

.btn-ghost {
    background: #fff;
    color: var(--brand);
    border: 1.5px solid var(--brand);
}

.btn-ghost:hover {
    background: var(--teal);
    color: #fff;
}


/* ---------- card: secondary links ---------- */
.links {
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.links a {
    font-size: 18px;
    font-weight: 500;
    color: var(--brand);
    transition: color var(--dur) var(--ease), letter-spacing var(--dur) var(--ease);
}

.links a:hover {
    color: var(--teal-ink);
    text-decoration: underline;
    letter-spacing: .2px;
}


/* ---------- footer warning band ---------- */
.footer {
    position: fixed;
    left: 50%;
    right: 0;
    bottom: 0;
    padding: 18px 64px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 20px;
    line-height: 1.4;
}

.footer img,
.footer svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer strong {
    font-weight: 700;
}


/* ---------- loader overlay ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity    var(--dur-slow) var(--ease),
        visibility 0s linear       var(--dur-slow);
}

.loader.show {
    opacity: 1;
    visibility: visible;
    transition:
        opacity    var(--dur-slow) var(--ease),
        visibility 0s linear 0s;
}

.loader-stage {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(.92);
    transition: transform var(--dur-slow) var(--ease);
}

.loader.show .loader-stage {
    transform: scale(1);
}

.loader-ring {
    position: absolute;
    inset: 0;
    border: 4px solid rgba(0, 84, 88, .12);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: loader-spin 1.1s linear infinite;
}

.loader-logo {
    width: 110px;
    height: auto;
    animation: loader-pulse 1.6s ease-in-out infinite;
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(.92);  opacity: .65; }
}


/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .wrap {
        grid-template-columns: 1fr;
    }

    .left {
        display: none;
    }

    .right {
        padding: 32px 24px 180px;
    }

    .logo {
        margin: 0 auto 24px 0;
    }

    .logo img {
        height: 48px;
    }

    .card {
        max-width: 100%;
    }

    .card h2,
    .card .hi {
        font-size: 20px;
    }

    .field input {
        font-size: 16px;
        height: 48px;
    }

    .btn {
        height: 48px;
        font-size: 15px;
    }

    .links a {
        font-size: 16px;
    }

    .footer {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        padding: 14px 20px 16px;
        font-size: 15px;
        line-height: 1.35;
        gap: 12px;
    }
}
