/* Font fallback system */
:root {
    --heading-font: 'Lexend Deca', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --nav-font: 'Advent Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Accessibility Enhancements */

/* Focus styles for better keyboard navigation - except for main content */
*:focus {
    outline: 3px solid #FF861C !important;
    outline-offset: 2px !important;
}

/* Improved focus states for links and buttons */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 3px solid #FF861C !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(255, 134, 28, 0.4) !important;
}

/* Remove focus outline for main element */
main:focus {
    outline: none !important;
}

/* Ensure sufficient contrast ratios for text */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

/* Increase base font size for better readability */
html {
    font-size: 18px;
}

/* Add text shadow to white text on colored backgrounds for better readability */
.text-white {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced link visibility in navigation */
nav a {
    text-decoration: none;
}

nav a:hover, nav a:focus {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Ensure form elements have proper spacing */
input, textarea, select, button {
    margin-bottom: 1rem;
}

/* Ensure form labels are clearly visible */
label {
    font-weight: bold;
}

/* Ensure buttons have sufficient padding for touch targets */
button, 
a.button,
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 20px;
}

/* Ensure proper spacing between list items */
li {
    margin-bottom: 0.5rem;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    a {
        color: #0000EE !important;
        text-decoration: underline !important;
    }
    
    button, 
    a.button,
    input[type="submit"] {
        background-color: black !important;
        color: white !important;
        border: 2px solid black !important;
    }
}

/* Reduce motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Improve text readability */
p, li {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure focus indicators for non-mouse users */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

.js-focus-visible .focus-visible {
    outline: 3px solid #FF861C !important;
    outline-offset: 2px !important;
}

/* Image accessibility */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure good contrast for form placeholders */
::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Header styling with custom fonts */
header h1 {
    font-family: var(--heading-font);
    letter-spacing: 0.02em;
    font-weight: 700;
    text-transform: uppercase;
}

header nav {
    font-family: var(--nav-font);
    font-weight: 600;
}

header nav a {
    font-family: var(--nav-font);
    letter-spacing: 0.03em;
}

/* Mobile menu styling */
@media (max-width: 767px) {
    /* Center hamburger icon */
    #mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0; /* Remove any default padding */
    }
    
    /* Center the SVG icon within the button */
    #mobile-menu-button svg {
        margin: 0 auto; /* Center the icon horizontally */
    }
    
    /* Position the button correctly in the header */
    header .container {
        position: relative;
    }
    
    header #mobile-menu-button {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #navigation-menu.active {
        display: block;
        width: 100%;
        position: fixed; /* Changed from absolute to fixed */
        top: 0; /* Start from the top of the viewport */
        left: 0;
        background-color: #334B7C;
        padding: 2rem 1rem 1rem; /* Added padding at the top */
        z-index: 100; /* Increased z-index */
        height: 100vh; /* Full height */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        overflow-y: auto; /* In case the menu gets too long */
    }
    
    /* Close button for the mobile menu */
    #navigation-menu.active::before {
        content: '×'; /* Unicode for × symbol */
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 30px;
        color: white;
        cursor: pointer;
        line-height: 1;
    }
    
    #navigation-menu ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem; /* Increased spacing */
        margin-top: 1rem;
    }
    
    #navigation-menu ul li a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.5rem; /* Larger text for mobile */
    }
}

/* Section headings */
main h2 {
    font-family: var(--heading-font);
    letter-spacing: 0.02em;
}

/* Update specific elements to use our custom fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
}

nav, button, a.button, input[type="submit"] {
    font-family: var(--nav-font);
} 