/* ===== Scroll-triggered fade-in ===== */
/* Animations only activate when JS adds 'js' class to <html> */
.js .fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.js .fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.js .fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > .fade-up:nth-child(1),
.stagger-children > .fade-left:nth-child(1),
.stagger-children > .fade-right:nth-child(1) { transition-delay: 0.1s; }

.stagger-children > .fade-up:nth-child(2),
.stagger-children > .fade-left:nth-child(2),
.stagger-children > .fade-right:nth-child(2) { transition-delay: 0.2s; }

.stagger-children > .fade-up:nth-child(3),
.stagger-children > .fade-left:nth-child(3),
.stagger-children > .fade-right:nth-child(3) { transition-delay: 0.3s; }

.stagger-children > .fade-up:nth-child(4) { transition-delay: 0.4s; }

/* ===== Hover lift on glass-cards ===== */
.glass-card--hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card--hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.06);
}

/* ===== Floating animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* ===== Pulse glow ===== */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.05); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.12); }
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ===== Loading spinner ===== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 30, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Toast notifications ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--btn-radius, 10px);
    color: #fff;
    font-size: 14px;
    font-family: var(--font-primary, 'Poppins', sans-serif);
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(12px);
}

.toast--success { background: rgba(76, 175, 80, 0.9); }
.toast--error { background: rgba(244, 67, 54, 0.9); }
.toast--info { background: rgba(33, 150, 243, 0.9); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    max-width: 500px;
    width: 100%;
    padding: 36px;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal__title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 24px;
}

.modal__content {
    margin-bottom: 24px;
    font-size: 15px;
    color: var(--text-secondary, rgba(255,255,255,0.63));
    line-height: 1.6;
}

.modal__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal__form .form-group {
    margin-bottom: 16px;
}

/* ===== Button loading state ===== */
.btn--loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.btn--loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ===== Pulse for live indicators ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== Status dot ===== */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot--active { background: #4caf50; }
.status-dot--inactive { background: #f44336; }
.status-dot--pending { background: #ff9800; }

/* ===== Hero shield animation ===== */
@keyframes shieldPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255,255,255,0.1)); }
    50% { transform: scale(1.03); filter: drop-shadow(0 0 40px rgba(255,255,255,0.2)); }
}

.hero-shield {
    animation: shieldPulse 4s ease-in-out infinite;
}

/* ===== Gradient text ===== */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Counter animation ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 0.5s ease-out forwards;
}

/* ===== Form styles (shared) ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary, rgba(255,255,255,0.63));
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    border-radius: var(--btn-radius, 10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 16px;
    font-size: 16px;
    font-family: var(--font-primary, 'Poppins', sans-serif);
    color: var(--text-primary, #ffffff);
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted, rgba(255,255,255,0.35));
}

.form-textarea {
    height: 120px;
    padding: 14px 16px;
    resize: vertical;
}

select.form-input {
    appearance: none;
    cursor: pointer;
}
