/* ====================================
   ANIMATIONS
   ==================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Gold scan-line effect for hero */
@keyframes scanLine {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Marquee scroll for partner logos */
@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

/* Scroll-triggered animation classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.scroll-animate.visible .stagger-child:nth-child(1) { transition-delay: 0.1s; }
.scroll-animate.visible .stagger-child:nth-child(2) { transition-delay: 0.2s; }
.scroll-animate.visible .stagger-child:nth-child(3) { transition-delay: 0.3s; }
.scroll-animate.visible .stagger-child:nth-child(4) { transition-delay: 0.4s; }
.scroll-animate.visible .stagger-child:nth-child(5) { transition-delay: 0.5s; }
.scroll-animate.visible .stagger-child:nth-child(6) { transition-delay: 0.6s; }
.scroll-animate.visible .stagger-child:nth-child(7) { transition-delay: 0.7s; }
.scroll-animate.visible .stagger-child:nth-child(8) { transition-delay: 0.8s; }

.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-animate.visible .stagger-child {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================
   UTILITY CLASSES
   ==================================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--accent-color);
}

/* ====================================
   NOTIFICATION SYSTEM
   ==================================== */
.notification {
    position: fixed;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    max-width: 400px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    border-left: 4px solid var(--primary-color);
    z-index: var(--z-tooltip);
    transform: translateX(100%);
    opacity: 0;
    transition: all var(--transition-normal);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--error-color);
}

.notification-warning {
    border-left-color: var(--accent-color);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    gap: var(--spacing-md);
}

.notification-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

/* ====================================
   FORM VALIDATION STYLES
   ==================================== */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    animation: fadeInUp 0.5s ease forwards;
}

.form-success-state i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: var(--spacing-lg);
}

.form-success-state p {
    font-size: 1.125rem;
    color: var(--text-primary);
    line-height: 1.6;
    max-width: 360px;
}

/* ====================================
   SKIP LINK FOR ACCESSIBILITY
   ==================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* ====================================
   LOADING STATES
   ==================================== */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {

    .header,
    .back-to-top,
    .loading-screen {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

/* ====================================
   HIGH CONTRAST MODE
   ==================================== */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.4);
    }

    .nav-link::after {
        height: 3px;
    }

    .form-group input,
    .form-group textarea {
        border-width: 2px;
    }
}

/* ====================================
   REDUCED MOTION
   ==================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .loading-spinner {
        animation: none;
        border: 3px solid var(--accent-color);
    }

    .scroll-animate {
        opacity: 1;
        transform: none;
    }

    .stagger-child {
        opacity: 1;
        transform: none;
    }
}

/* ====================================
   FOCUS-VISIBLE (KEYBOARD A11Y)
   ==================================== */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-link:focus-visible,
.cta-button:focus-visible,
.submit-btn:focus-visible,
.back-to-top:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.cta-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(252, 179, 16, 0.3);
}
