﻿
/* ==========================================
   PEOPLEFIRST LOGIN
   Unique cinematic entrance animation
========================================== */

.pf-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 35px 20px;
    overflow: hidden;
    background: radial-gradient(ellipse at 12% 15%, rgba(82, 122, 255, .12), transparent 38%), radial-gradient(ellipse at 90% 85%, rgba(77, 104, 191, .10), transparent 35%), #f3f6fc;
    perspective: 1200px;
}

/* The card unfolds into view */
.pf-login-card {
    width: min(100%, 1050px);
    min-height: 620px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(22, 42, 82, .13);
    transform-origin: center;
    animation: loginUnfold .95s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes loginUnfold {
    from {
        opacity: 0;
        transform: translateY(32px) rotateX(5deg) scale(.97);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
        filter: blur(0);
    }
}

/* Left panel: moving light and content reveal */
.pf-login-welcome {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #17294d 0%, #243f79 58%, #315bd0 100%);
}

    .pf-login-welcome::before {
        content: "";
        position: absolute;
        z-index: -1;
        width: 330px;
        height: 330px;
        top: -100px;
        right: -130px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 50%;
        box-shadow: 0 0 0 30px rgba(255, 255, 255, .035), 0 0 0 65px rgba(255, 255, 255, .025);
        animation: loginOrbit 12s ease-in-out infinite alternate;
    }

    .pf-login-welcome::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        left: -120%;
        width: 70%;
        height: 100%;
        transform: skewX(-18deg);
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .055), transparent );
        animation: loginLightSweep 1.5s .5s ease-out both;
        pointer-events: none;
    }

@keyframes loginOrbit {
    from {
        transform: translate(0, 0) scale(.95);
    }

    to {
        transform: translate(-18px, 24px) scale(1.08);
    }
}

@keyframes loginLightSweep {
    to {
        left: 150%;
    }
}

.pf-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #fff;
    text-decoration: none;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.7px;
    animation: loginTextReveal .7s .35s ease both;
}

    .pf-login-brand:hover {
        color: #fff;
    }

.pf-login-brand-mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    border-radius: 14px;
    color: #2449a9;
    background: #fff;
    font-size: 25px;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.pf-login-welcome-content {
    animation: loginTextReveal .8s .5s cubic-bezier(.2, .8, .2, 1) both;
}

.pf-login-eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    color: #bdceff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.pf-login-welcome-content h1 {
    max-width: 390px;
    margin-bottom: 20px;
    font-size: clamp(36px, 3.5vw, 49px);
    font-weight: 850;
    letter-spacing: -1.8px;
    line-height: 1.12;
}

.pf-login-welcome-content > p {
    max-width: 370px;
    color: #d2dcf3;
    font-size: 15px;
    line-height: 1.9;
}

.pf-login-decoration {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 38px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(8px);
    transition: background .3s ease, transform .3s ease;
}

    .pf-login-decoration:hover {
        transform: translateX(5px);
        background: rgba(255, 255, 255, .12);
    }

.pf-login-decoration-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    font-size: 22px;
    font-weight: 800;
}

.pf-login-decoration strong {
    font-size: 14px;
}

.pf-login-decoration p {
    margin: 4px 0 0;
    color: #d2dcf3;
    font-size: 12px;
}

.pf-login-welcome-footer {
    margin: 30px 0 0;
    color: #bdcbed;
    font-size: 12px;
    animation: loginTextReveal .7s .8s ease both;
}

/* Right panel: staggered form reveal */
.pf-login-form-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 55px clamp(30px, 5vw, 65px);
}

.pf-login-form-header {
    margin-bottom: 35px;
    animation: loginTextReveal .7s .45s ease both;
}

.pf-login-mobile-brand {
    display: none;
    margin-bottom: 25px;
    color: #2449a9;
    font-size: 20px;
    font-weight: 800;
}

.pf-login-form-header h2 {
    margin-bottom: 10px;
    color: #172544;
    font-size: 34px;
    font-weight: 850;
    letter-spacing: -1px;
}

.pf-login-form-header p {
    margin: 0;
    color: #75819a;
    font-size: 14px;
    line-height: 1.7;
}

.pf-login-field {
    margin-bottom: 23px;
    animation: loginFieldReveal .65s ease both;
}

    .pf-login-field:nth-of-type(1) {
        animation-delay: .55s;
    }

    .pf-login-field:nth-of-type(2) {
        animation-delay: .68s;
    }

@keyframes loginFieldReveal {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pf-login-field label {
    display: block;
    margin-bottom: 9px;
    color: #263653;
    font-size: 13px;
    font-weight: 750;
}

.pf-login-input {
    min-height: 53px;
    padding: 13px 15px;
    border: 1px solid #dce4f1;
    border-radius: 12px;
    background: #f9fbff;
    color: #172544;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

    .pf-login-input:focus {
        border-color: #537bfa;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(76, 120, 255, .12);
    }

.pf-login-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 26px;
    color: #5e6b83;
    font-size: 13px;
    animation: loginTextReveal .6s .8s ease both;
}

    .pf-login-remember label {
        cursor: pointer;
    }

    .pf-login-remember .form-check-input {
        cursor: pointer;
    }

.pf-login-submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(105deg, #3867ed, #527fff);
    box-shadow: 0 9px 22px rgba(56, 103, 237, .2);
    font-size: 15px;
    font-weight: 800;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    animation: loginTextReveal .65s .88s ease both;
}

    .pf-login-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 28px rgba(56, 103, 237, .3);
        filter: brightness(1.04);
    }

    .pf-login-submit:active {
        transform: scale(.985);
    }

.pf-login-validation {
    margin-bottom: 18px;
    font-size: 13px;
}

.pf-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 27px;
    color: #8792a7;
    font-size: 11px;
    line-height: 1.6;
    animation: loginTextReveal .7s 1s ease both;
}

@keyframes loginTextReveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive layout */
@media (max-width: 850px) {
    .pf-login-card {
        grid-template-columns: 1fr;
        max-width: 540px;
        min-height: auto;
    }

    .pf-login-welcome {
        min-height: 320px;
        padding: 30px;
    }

    .pf-login-welcome-content h1 {
        font-size: 36px;
    }

    .pf-login-decoration,
    .pf-login-welcome-footer {
        display: none;
    }

    .pf-login-form-section {
        padding: 38px 30px;
    }

    .pf-login-mobile-brand {
        display: block;
    }
}

@media (max-width: 480px) {
    .pf-login-page {
        padding: 12px;
    }

    .pf-login-card {
        border-radius: 20px;
    }

    .pf-login-welcome {
        min-height: 275px;
        padding: 24px;
    }

    .pf-login-brand {
        font-size: 21px;
    }

    .pf-login-welcome-content h1 {
        font-size: 32px;
    }

    .pf-login-welcome-content > p {
        font-size: 13px;
    }

    .pf-login-form-section {
        padding: 30px 23px;
    }

    .pf-login-form-header h2 {
        font-size: 29px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pf-login-page *,
    .pf-login-page *::before,
    .pf-login-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
