/* Import brand fonts (DM Sans + Orbitron) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=Orbitron:wght@500;600;700;900&display=swap');

/* Base styles */
* {
    box-sizing: border-box;
}

html {
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0A3360;
}

::-webkit-scrollbar-thumb {
    background: #1a4a7a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Focus visible styles for accessibility */
*:focus-visible {
    outline: 2px solid #00D2E6;
    outline-offset: 2px;
}

/* Skip link styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #00D2E6;
    color: #0A3360;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Reveal on scroll animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* High contrast mode support */
.high-contrast {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent: #00ffff;
    --border: #ffffff;
}

.high-contrast body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.high-contrast .bg-primary,
.high-contrast .bg-secondary,
.high-contrast .bg-secondary\/30,
.high-contrast .bg-secondary\/50,
.high-contrast .bg-primary\/50 {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border) !important;
}

.high-contrast .border-surface,
.high-contrast .border-surface\/50 {
    border-color: var(--border) !important;
}

.high-contrast .text-gray-400,
.high-contrast .text-gray-500,
.high-contrast .text-gray-300,
.high-contrast .text-gray-600 {
    color: var(--text-secondary) !important;
}

.high-contrast .text-accent,
.high-contrast .text-cyan-400,
.high-contrast .text-blue-400,
.high-contrast .text-purple-400 {
    color: var(--accent) !important;
}

.high-contrast .bg-accent,
.high-contrast .bg-accent\/10,
.high-contrast .bg-accent\/20 {
    background-color: var(--accent) !important;
    color: #000 !important;
}

.high-contrast input,
.high-contrast select,
.high-contrast textarea {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.high-contrast button:not(.text-gray-400):not(.text-gray-500) {
    border: 2px solid var(--border) !important;
}

/* Text size classes */
.text-size-small {
    font-size: 14px;
}

.text-size-medium {
    font-size: 16px;
}

.text-size-large {
    font-size: 20px;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Reduced motion support */
@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;
    }
    
    .animate-fade-in,
    .animate-fade-in-up,
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    header, footer, .fixed {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Selection color */
::selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: white;
}

/* Ensure proper color contrast */
.bg-accent {
    color: #0A3360;
}

/* Focus styles for form elements */
input:focus,
select:focus,
textarea:focus,
button:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

/* Error state styles */
input[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Success message animation */
#form-success {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

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