/* ==========================================================================
   Landing-Page-7482935016YBF.css
   PolisForge Control Center - Landing, Login, and MFA Styles
   Clean staff portal design
   Depends on: Variables-3918405726RCW.css, Base-Reset-6205183947JLT.css,
               Animations-5091827364PFV.css
   ========================================================================== */

/* -----------------------------------------------------------------------
   PARTICLE CANVAS
   Fixed fullscreen, sits behind all content
   ----------------------------------------------------------------------- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-canvas);
    pointer-events: auto;
}

/* -----------------------------------------------------------------------
   GUEST SCREENING SECTION
   Full viewport, centered column layout
   ----------------------------------------------------------------------- */
.guest-screening {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    z-index: var(--z-content);
    opacity: 1;
    transition: opacity var(--duration-dramatic) var(--ease-smooth);
    padding: var(--space-lg);
}

.guest-screening.hidden {
    opacity: 0;
    pointer-events: none;
}

/* -----------------------------------------------------------------------
   SCREENING CONTENT
   Centered column with constrained width
   ----------------------------------------------------------------------- */
.screening-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    max-width: 620px;
    width: 100%;
}

/* -----------------------------------------------------------------------
   SCREENING TYPOGRAPHY
   ----------------------------------------------------------------------- */
.screening-eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    margin-bottom: var(--space-xs);
}

.screening-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-xs);
}

.screening-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    max-width: 520px;
}

.screening-notice {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wide);
    margin-top: var(--space-xs);
}

/* -----------------------------------------------------------------------
   SCREENING ACTIONS
   ----------------------------------------------------------------------- */
.screening-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* -----------------------------------------------------------------------
   ACCESS BUTTON
   Solid green, organic radius, 3-layer shadow, hover lift + shine
   ----------------------------------------------------------------------- */
.access-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 1.2vw, 18px) clamp(40px, 5vw, 64px);
    background: var(--accent-primary);
    color: var(--text-inverse);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    border: none;
    border-radius: var(--radius-button);
    cursor: pointer;
    overflow: hidden;
    min-height: 48px;
    transition: transform var(--duration-fast) var(--ease-snappy),
                box-shadow var(--duration-normal) var(--ease-smooth);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(26, 77, 46, 0.12);
    -webkit-tap-highlight-color: transparent;
}

.access-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(247, 245, 242, 0.18),
        transparent
    );
    transition: left var(--duration-slow) var(--ease-smooth);
}

.access-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 12px 28px rgba(0, 0, 0, 0.18),
        0 0 36px rgba(26, 77, 46, 0.25);
}

.access-button:hover::before {
    left: 100%;
}

.access-button:active {
    transform: translateY(0) scale(0.97);
}

.access-button:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* -----------------------------------------------------------------------
   SUPPORT LINK
   ----------------------------------------------------------------------- */
.support-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    text-decoration: none;
    letter-spacing: var(--tracking-wide);
    transition: color var(--duration-fast) var(--ease-smooth);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
}

.support-link:hover {
    color: var(--accent-secondary);
}

/* -----------------------------------------------------------------------
   BOOT ELEMENT ANIMATION
   Elements start hidden, JS adds .booted class
   ----------------------------------------------------------------------- */
.boot-element {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--duration-normal) var(--ease-smooth),
                transform var(--duration-normal) var(--ease-reveal);
}

.boot-element.booted {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------------
   TRANSITION FLASH
   Brief overlay between screening and login
   ----------------------------------------------------------------------- */
.transition-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    background: rgba(26, 46, 34, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-fast) linear;
}

.transition-flash span {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
}

.transition-flash.visible {
    opacity: 1;
}

/* -----------------------------------------------------------------------
   LOGIN SECTION
   Fixed overlay, hidden by default, .active shows
   ----------------------------------------------------------------------- */
.login-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 92%;
    max-width: 480px;
    z-index: var(--z-content);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--duration-slow) var(--ease-smooth),
                transform var(--duration-slow) var(--ease-reveal),
                visibility var(--duration-slow);
}

.login-section.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* -----------------------------------------------------------------------
   LOGIN PANEL
   Centered card with organic radius and layered shadow
   ----------------------------------------------------------------------- */
.login-panel {
    background: var(--bg-elevated);
    border: 1px solid rgba(26, 77, 46, 0.14);
    border-radius: var(--radius-card);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 8px 20px rgba(0, 0, 0, 0.05),
        0 20px 48px rgba(0, 0, 0, 0.04),
        0 0 12px rgba(26, 77, 46, 0.05);
    overflow: hidden;
}

/* -----------------------------------------------------------------------
   TERMINAL HEADER
   Top bar with brand text and back button
   ----------------------------------------------------------------------- */
.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--bg-tertiary);
    background: var(--bg-surface);
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-overline {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

.terminal-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.login-back-button {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    background: none;
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-input);
    padding: 6px 16px;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-smooth),
                border-color var(--duration-fast) var(--ease-smooth);
    min-height: 36px;
}

.login-back-button:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.login-back-button:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* -----------------------------------------------------------------------
   LOGIN BODY
   Form area with padding
   ----------------------------------------------------------------------- */
.login-body {
    padding: var(--space-md);
}

/* -----------------------------------------------------------------------
   LOGIN FORM
   Form groups, labels, inputs, submit button
   ----------------------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-sm);
}

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: var(--tracking-wide);
}

.form-input {
    width: 100%;
    padding: clamp(10px, 1vw, 14px) clamp(12px, 1.2vw, 16px);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-input);
    transition: border-color var(--duration-fast) var(--ease-smooth),
                box-shadow var(--duration-fast) var(--ease-smooth);
    min-height: 48px;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

.form-input.field-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(196, 32, 40, 0.1);
}

/* Submit button */
.login-submit {
    width: 100%;
    padding: clamp(12px, 1vw, 16px);
    margin-top: var(--space-sm);
    background: var(--accent-primary);
    color: var(--text-inverse);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    border: none;
    border-radius: var(--radius-button);
    cursor: pointer;
    min-height: 48px;
    transition: background var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-snappy);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-submit:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-submit:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* -----------------------------------------------------------------------
   ERROR DISPLAY
   Alert bar with shake animation
   ----------------------------------------------------------------------- */
.login-error {
    display: none;
    padding: clamp(10px, 1vw, 14px) var(--space-sm);
    margin-bottom: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--danger);
    background: var(--danger-light);
    border: 1px solid rgba(196, 32, 40, 0.2);
    border-radius: var(--radius-input);
    line-height: var(--leading-snug);
}

.login-error.visible {
    display: block;
}

.login-error.shake {
    animation: shake-subtle 0.4s var(--ease-snappy);
}

/* -----------------------------------------------------------------------
   MFA SECTION
   Hidden by default, .active shows
   ----------------------------------------------------------------------- */
.mfa-section {
    display: none;
}

.mfa-section.active {
    display: block;
}

.mfa-panel {
    padding-top: var(--space-sm);
}

.mfa-label {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.mfa-copy {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: var(--leading-normal);
}

.mfa-input {
    text-align: center;
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-widest);
}

.mfa-submit {
    width: 100%;
    padding: clamp(12px, 1vw, 16px);
    margin-top: var(--space-sm);
    background: var(--accent-primary);
    color: var(--text-inverse);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    border: none;
    border-radius: var(--radius-button);
    cursor: pointer;
    min-height: 48px;
    transition: background var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-snappy);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.mfa-submit:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.mfa-submit:active {
    transform: translateY(0);
}

.mfa-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mfa-submit:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* -----------------------------------------------------------------------
   MFA RESEND BUTTON
   Subtle text button below verify
   ----------------------------------------------------------------------- */
.mfa-resend {
    display: block;
    width: 100%;
    margin-top: var(--space-xs);
    padding: 12px;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    min-height: 48px;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.mfa-resend:hover {
    color: var(--accent-primary);
}

.mfa-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mfa-resend:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* -----------------------------------------------------------------------
   LOGIN FOOTER
   Separator, copyright, support link
   ----------------------------------------------------------------------- */
.login-footer {
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    border-top: 1px solid var(--bg-tertiary);
}

.footer-separator {
    display: none;
}

.login-footer p {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wide);
    margin-bottom: 4px;
}

.footer-support a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.footer-support a:hover {
    color: var(--accent-secondary);
}

/* -----------------------------------------------------------------------
   RESPONSIVE - Tablet (768px)
   ----------------------------------------------------------------------- */
@media (max-width: 768px) {
    .guest-screening {
        padding: var(--space-md);
    }

    .screening-title {
        font-size: var(--text-2xl);
    }

    .login-section {
        width: 96%;
    }

    .terminal-header {
        padding: var(--space-xs) var(--space-sm);
    }

    .login-body {
        padding: var(--space-sm);
    }

    .login-footer {
        padding: var(--space-xs) var(--space-sm);
    }
}

/* -----------------------------------------------------------------------
   RESPONSIVE - Mobile (480px)
   ----------------------------------------------------------------------- */
@media (max-width: 480px) {
    .screening-content {
        gap: var(--space-xs);
    }

    .screening-title {
        font-size: var(--text-xl);
    }

    .screening-subtitle {
        font-size: var(--text-sm);
    }

    .access-button {
        width: 100%;
        padding: 14px 24px;
    }

    .login-section {
        width: 100%;
        max-width: none;
        top: 0;
        left: 0;
        transform: none;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-section.active {
        transform: none;
    }

    .login-panel {
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }

    .terminal-title {
        font-size: var(--text-base);
    }
}

/* -----------------------------------------------------------------------
   REDUCED MOTION
   Disable all animations and transitions
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .guest-screening,
    .boot-element,
    .transition-flash,
    .login-section,
    .access-button,
    .access-button::before,
    .form-input,
    .login-submit,
    .mfa-submit,
    .mfa-resend,
    .login-back-button,
    .support-link,
    .footer-support a {
        transition: none !important;
        animation: none !important;
    }

    .boot-element {
        opacity: 1;
        transform: translateY(0);
    }

    .login-error.shake {
        animation: none !important;
    }
}

/* -----------------------------------------------------------------------
   TOUCH DEVICE
   Hide custom cursor, ensure touch targets
   ----------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    .access-button,
    .login-submit,
    .mfa-submit,
    .mfa-resend,
    .login-back-button,
    .support-link,
    .footer-support a {
        min-height: 48px;
        min-width: 48px;
    }
}
