/* ==========================================================================
   AARTIGO Atelier - Site Password Protection Gatekeeper (Light Theme)
   ========================================================================== */

:root {
    --gate-gold: #bea98a;
    --gate-gold-dark: #8f7856;
    --gate-gold-glow: rgba(190, 169, 138, 0.25);
    --gate-bg: #f5efe6;
    --gate-card-bg: rgba(255, 255, 255, 0.94);
    --gate-border: rgba(190, 169, 138, 0.35);
    --gate-border-focus: #262219;
    --gate-text-muted: #6b645b;
    --gate-text-dark: #262219;
}

/* Initial lock state for body */
body.site-locked {
    overflow: hidden !important;
    height: 100vh !important;
}

#site-gatekeeper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999999;
    background-color: var(--gate-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: "Geist", "Poppins", sans-serif;
    color: var(--gate-text-dark);
    box-sizing: border-box;
}

#site-gatekeeper.gate-unlocked {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.03);
}

/* Background Atmosphere (Light Warm Atelier) */
.gatekeeper-backdrop {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 30%, rgba(255, 253, 250, 0.88) 0%, rgba(245, 239, 230, 0.96) 65%, #eae2d3 100%),
                      url('../images/section/65.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: contrast(1.02);
    transform: scale(1.05);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.gatekeeper-ambient-light {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(190, 169, 138, 0.18) 0%, rgba(245, 239, 230, 0.5) 80%);
    pointer-events: none;
    z-index: 2;
}

.gatekeeper-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: radial-gradient(#262219 1px, transparent 0);
    background-size: 24px 24px;
    z-index: 3;
}

/* Card Container */
.gatekeeper-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    background: var(--gate-card-bg);
    border: 1px solid var(--gate-border);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 25px 60px rgba(38, 34, 25, 0.12),
                0 6px 20px rgba(0, 0, 0, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
    animation: gateCardFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gateCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Brand Logo */
.gatekeeper-brand {
    margin-bottom: 24px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.gatekeeper-logo {
    height: 38px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    margin-bottom: 4px;
}

/* Typography */
.gatekeeper-title {
    font-family: "Instrument Serif", serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--gate-text-dark);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.gatekeeper-subtitle {
    font-size: 14px;
    line-height: 1.65;
    color: var(--gate-text-muted);
    margin-bottom: 30px;
    font-weight: 400;
    padding: 0 8px;
}

/* Form Elements */
.gatekeeper-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.gatekeeper-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.gatekeeper-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gate-gold-dark);
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.gatekeeper-form input.gatekeeper-input,
.gatekeeper-form input[type="password"].gatekeeper-input,
.gatekeeper-form input[type="text"].gatekeeper-input,
.gatekeeper-input {
    width: 100% !important;
    height: 52px !important;
    background: #ffffff !important;
    border: 1px solid rgba(38, 34, 25, 0.16) !important;
    border-radius: 12px !important;
    padding-left: 54px !important;
    padding-right: 50px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 15px !important;
    line-height: 52px !important;
    font-family: inherit !important;
    color: var(--gate-text-dark) !important;
    letter-spacing: 0.04em !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.gatekeeper-form input.gatekeeper-input::placeholder,
.gatekeeper-form input[type="password"].gatekeeper-input::placeholder,
.gatekeeper-form input[type="text"].gatekeeper-input::placeholder,
.gatekeeper-input::placeholder {
    color: rgba(107, 100, 91, 0.5) !important;
    letter-spacing: normal !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    line-height: normal !important;
}

.gatekeeper-form input.gatekeeper-input:focus,
.gatekeeper-form input[type="password"].gatekeeper-input:focus,
.gatekeeper-form input[type="text"].gatekeeper-input:focus,
.gatekeeper-input:focus {
    background: #ffffff !important;
    border-color: var(--gate-border-focus) !important;
    box-shadow: 0 0 0 4px rgba(190, 169, 138, 0.22),
                0 4px 12px rgba(38, 34, 25, 0.06) !important;
}

.gatekeeper-toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--gate-text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease;
    border-radius: 6px;
}

.gatekeeper-toggle-pwd:hover {
    color: var(--gate-text-dark);
}

/* Button */
.gatekeeper-btn {
    width: 100%;
    height: 52px;
    background: var(--gate-text-dark);
    color: #f5efe6;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(38, 34, 25, 0.18);
}

.gatekeeper-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.gatekeeper-btn:hover {
    background: #110f0b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(38, 34, 25, 0.25),
                0 4px 10px rgba(0, 0, 0, 0.08);
}

.gatekeeper-btn:hover::before {
    left: 100%;
}

.gatekeeper-btn:active {
    transform: translateY(0);
}

.gatekeeper-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.gatekeeper-btn:hover i {
    transform: translateX(4px);
}

/* Feedback Message */
.gatekeeper-feedback {
    min-height: 22px;
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.gatekeeper-feedback.show-error {
    opacity: 1;
    transform: translateY(0);
    color: #dc2626;
    font-weight: 500;
}

.gatekeeper-feedback.show-success {
    opacity: 1;
    transform: translateY(0);
    color: #15803d;
    font-weight: 500;
}

/* Error Shake Animation */
.gatekeeper-card.shake {
    animation: gateShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.gatekeeper-input.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16) !important;
}

@keyframes gateShake {
    10%, 90% { transform: translate3d(-3px, 0, 0); }
    20%, 80% { transform: translate3d(5px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Success State */
.gatekeeper-btn.is-success {
    background: #15803d !important;
    color: #ffffff !important;
}

/* Footer note */
.gatekeeper-footer {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(38, 34, 25, 0.08);
    display: flex;
    justify-content: center;
}

.gatekeeper-copyright {
    font-size: 11px;
    color: rgba(107, 100, 91, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .gatekeeper-card {
        padding: 36px 22px;
        border-radius: 16px;
    }

    .gatekeeper-title {
        font-size: 30px;
    }

    .gatekeeper-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
        padding: 0;
    }

    .gatekeeper-input {
        height: 48px;
        font-size: 14px;
    }

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