/* ULTRALOC: Critical CSS - Mobile-First, Performance-Optimized, WCAG AAA */

:root {
    --primary-color: #003366;
    --bg-color: #ffffff;
    --text-color: #111111;
    --focus-color: #ffbf47;
    --border-color: #e0e0e0;
    --spacing-base: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-base);
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4, h5, h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--spacing-base);
}

a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 150ms ease-in-out;
}

a:visited {
    color: #663366;
}

a:hover {
    color: #0066cc;
}

a:active {
    color: #004499;
}

a:focus,
button:focus,
input:focus,
[role="button"]:focus {
    outline: 4px solid var(--text-color);
    outline-offset: 2px;
    background-color: var(--focus-color);
}

button,
input[type="button"],
input[type="submit"],
[role="button"] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms ease-in-out;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
[role="button"]:hover {
    background-color: #0066cc;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 16px;
    z-index: 100;
    text-decoration: underline;
    font-weight: bold;
    min-height: 44px;
    display: flex;
    align-items: center;
}

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

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-base);
    padding: var(--spacing-base) var(--spacing-lg);
    border-bottom: 2px solid var(--text-color);
}

.logo {
    font-weight: 900;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    text-decoration: none;
    color: var(--text-color);
}

.logo:focus {
    outline: 4px solid var(--text-color);
    outline-offset: 2px;
}

.btn-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

nav[role="navigation"] {
    flex-basis: 100%;
    order: 3;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

article {
    margin-bottom: var(--spacing-xl);
}

.entry-header {
    margin-bottom: var(--spacing-lg);
}

.entry-content {
    line-height: 1.8;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

footer {
    border-top: 2px solid var(--text-color);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin-top: var(--spacing-xl);
    text-align: center;
    font-size: 0.95rem;
}

/* Mobile-First Media Queries */
@media (min-width: 640px) {
    header {
        flex-wrap: nowrap;
    }

    nav[role="navigation"] {
        flex-basis: auto;
        order: 2;
    }

    main {
        padding: var(--spacing-xl) var(--spacing-xl);
    }
}

@media (min-width: 768px) {
    body {
        font-size: 1.05rem;
    }

    header {
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    main {
        max-width: 900px;
        padding: var(--spacing-xl) var(--spacing-xl);
    }
}

@media (min-width: 1024px) {
    main {
        max-width: 1000px;
    }

    header {
        padding: var(--spacing-lg) 2rem;
    }
}

/* Print Styles */
@media print {
    .skip-link,
    .btn-call {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}
