﻿/* =====================================================
   Login page: moving hero panel (no video needed)
   ===================================================== */
.hero-panel {
    position: relative;
    overflow: hidden;
}

/* The same photo as the panel, on its own layer so it can move */
.hero-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: inherit; /* reuses the panel's existing background image */
    background-size: cover;
    background-position: center;
    transform-origin: 60% 40%;
    animation: hero-ken-burns 22s ease-in-out infinite alternate;
}

/* Soft light that sweeps across */
.hero-light-sweep {
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: -60%;
    width: 45%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-15deg);
    animation: hero-light-sweep 9s ease-in-out infinite;
}

/* Floating glowing particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

    .hero-particles span {
        position: absolute;
        bottom: -20px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(52, 211, 153, 0.75);
        box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
        animation: hero-particle-rise 12s linear infinite;
    }

        .hero-particles span:nth-child(1) {
            left: 12%;
            animation-delay: 0s;
            animation-duration: 13s;
        }

        .hero-particles span:nth-child(2) {
            left: 28%;
            animation-delay: -3s;
            animation-duration: 10s;
            width: 5px;
            height: 5px;
        }

        .hero-particles span:nth-child(3) {
            left: 45%;
            animation-delay: -7s;
            animation-duration: 15s;
        }

        .hero-particles span:nth-child(4) {
            left: 62%;
            animation-delay: -2s;
            animation-duration: 11s;
            width: 6px;
            height: 6px;
        }

        .hero-particles span:nth-child(5) {
            left: 78%;
            animation-delay: -9s;
            animation-duration: 14s;
            width: 4px;
            height: 4px;
        }

        .hero-particles span:nth-child(6) {
            left: 90%;
            animation-delay: -5s;
            animation-duration: 12s;
        }

/* Keep the existing dark overlay and text above the moving layers */
.hero-overlay {
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

/* Text fades in when the page opens */
.hero-title {
    animation: hero-fade-up 0.8s ease-out both;
}

.hero-description {
    animation: hero-fade-up 0.8s ease-out 0.2s both;
}

/* ===== Animations ===== */
@keyframes hero-ken-burns {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.12) translate(-2%, -1.5%);
    }
}

@keyframes hero-light-sweep {
    0% {
        left: -60%;
    }

    60% {
        left: 130%;
    }

    100% {
        left: 130%;
    }
}

@keyframes hero-particle-rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) scale(0.6);
        opacity: 0;
    }
}

@keyframes hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Turn off motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    .hero-photo,
    .hero-light-sweep,
    .hero-particles span,
    .hero-title,
    .hero-description {
        animation: none;
    }

    .hero-particles {
        display: none;
    }
}
/* =====================================================
   Login logo: entrance, shine sweep, soft glow, hover tilt
   ===================================================== */
.logo-motion {
    position: relative;
    display: inline-block;
    line-height: 0;
    animation: logo-drop-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

    .logo-motion img {
        display: block;
        animation: logo-glow 4s ease-in-out 1s infinite;
        transition: transform 0.3s ease;
    }

    /* Light sweep, shown only where the logo is drawn */
    .logo-motion::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(110deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 65%);
        background-size: 250% 100%;
        background-position: 150% 0;
        mask-image: url("../images/logo.png");
        mask-size: 100% 100%;
        mask-repeat: no-repeat;
        animation: logo-shine 6s ease-in-out 1.2s infinite;
    }

    /* Hover: lift and tilt a little */
    .logo-motion:hover img {
        transform: translateY(-3px) rotate(-2deg) scale(1.03);
    }

/* ===== Animations ===== */
@keyframes logo-drop-in {
    0% {
        opacity: 0;
        transform: translateY(-18px) scale(0.92);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logo-shine {
    0% {
        background-position: 150% 0;
    }

    30% {
        background-position: -50% 0;
    }

    100% {
        background-position: -50% 0;
    }
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(31, 157, 85, 0));
    }

    50% {
        filter: drop-shadow(0 4px 10px rgba(31, 157, 85, 0.35));
    }
}

/* Turn off motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    .logo-motion,
    .logo-motion img,
    .logo-motion::after {
        animation: none;
    }

        .logo-motion::after {
            display: none;
        }
}
/* Hero: rotating tagline + floating feature cards */
.hero-rotating {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .hero-rotating.is-changing {
        opacity: 0;
        transform: translateY(10px);
    }



/* Heading and fields slide in one after another */
.auth-heading {
    animation: form-fade-up 0.6s ease-out 0.3s both;
}

.auth-subheading {
    animation: form-fade-up 0.6s ease-out 0.35s both;
}

.auth-field:nth-of-type(1) {
    animation: form-fade-up 0.6s ease-out 0.45s both;
}

.auth-field:nth-of-type(2) {
    animation: form-fade-up 0.6s ease-out 0.55s both;
}

.auth-options {
    animation: form-fade-up 0.6s ease-out 0.65s both;
}

.btn-auth-submit {
    animation: form-fade-up 0.6s ease-out 0.75s both;
}

.auth-secure-note {
    animation: form-fade-up 0.6s ease-out 0.85s both;
}

/* Green glow on the field being typed in */
.auth-input-group {
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .auth-input-group:focus-within {
        border-color: #1f9d55 !important;
        box-shadow: 0 0 0 4px rgba(31, 157, 85, 0.12);
    }

.auth-input-prefix {
    transition: color 0.2s;
}

.auth-input-group:focus-within .auth-input-prefix {
    color: #1f9d55;
}

/* Caps Lock warning */
.caps-lock-hint {
    margin-top: 6px;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 600;
}

    .caps-lock-hint[hidden] {
        display: none;
    }

/* Sign-in button: shine on hover, loading state */
.btn-auth-submit {
    position: relative;
    overflow: hidden;
}

    .btn-auth-submit::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: -75%;
        width: 50%;
        background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
        transform: skewX(-20deg);
        transition: left 0.6s ease;
    }

    .btn-auth-submit:hover::after {
        left: 125%;
    }

    .btn-auth-submit.is-loading,
    .btn-auth-submit:disabled {
        opacity: 0.85;
        cursor: wait;
    }

/* Secure sign-in note */
.auth-secure-note {
    margin-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

    .auth-secure-note i {
        color: #1f9d55;
    }

/* Shake on error */
#signInForm.is-shaking {
    animation: form-shake 0.45s ease-in-out;
}

/* ===== Animations ===== */
@keyframes chip-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes form-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes form-shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

/* Turn off motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    .auth-greeting,
    .auth-heading,
    .auth-subheading,
    .auth-field,
    .auth-options,
    .btn-auth-submit,
    .auth-secure-note,
    #signInForm.is-shaking {
        animation: none;
    }

    .hero-rotating {
        transition: none;
    }
}