/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* CSS Custom Properties */
:root {
    --primary-color: #2b6cb0;
    --primary-dark: #2c5282;
    --secondary-color: #4a5568;
    --accent-color: #3182ce;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --error-color: #e53e3e;
    --light-bg: #f7fafc;
    --border-color: #e2e8f0;
    --text-muted: #718096;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 0.5rem;
    --max-width: 1200px;
    --container-padding: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #1a202c;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

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

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--primary-dark);
    outline: 2px solid transparent;
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Layout utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.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;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Accessibility: minimum touch target */
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Header and Navigation */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-text {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hero-title {
    color: white;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    background-color: var(--light-bg);
    padding: 3rem 0;
    text-align: center;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.highlights {
    padding: 4rem 0;
    background-color: white;
}

.mission {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission-text p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    max-width: none;
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.highlight-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    margin-bottom: 1rem;
    color: #1a202c;
}

.card-description {
    color: var(--text-muted);
    max-width: none;
}

/* Metrics Section */
.metrics-section {
    padding: 4rem 0;
}

.metrics-summary {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
    grid-template-columns: 1fr;
}

.metric-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-trend.positive { color: var(--success-color); }
.metric-trend.negative { color: var(--error-color); }
.metric-trend.neutral { color: var(--text-muted); }

/* Tables */
.metrics-table-container {
    overflow-x: auto;
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.metrics-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.metrics-table th,
.metrics-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.metrics-table th {
    background-color: var(--light-bg);
    font-weight: 600;
    color: #1a202c;
}

.metrics-table tbody tr:hover {
    background-color: var(--light-bg);
}

.metric-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Transparency Page */
.transparency-content {
    padding: 4rem 0;
}

.transparency-intro {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.documents-section {
    margin-bottom: 3rem;
}

.documents-section h3 {
    margin-bottom: 1.5rem;
    color: #1a202c;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.document-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.document-info h4 {
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.document-meta {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.transparency-obligations {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.obligation-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.obligation-item h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.contact-info {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.contact-info ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.contact-info li {
    margin-bottom: 0.5rem;
}

/* Methodology section */
.methodology-section {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.methodology-section h3 {
    margin-bottom: 1rem;
    color: #1a202c;
}

/* Loading and Error states */
.loading-message,
.error-message {
    text-align: center;
    padding: 3rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.error-message {
    background-color: #fed7d7;
    color: var(--error-color);
}

/* Footer */
footer {
    background-color: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-description {
    color: #a0aec0;
    margin-bottom: 0;
}

.footer-links nav {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #a0aec0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    color: #a0aec0;
}

/* Media Queries */
@media (min-width: 640px) {
    :root {
        --container-padding: 2rem;
    }

    .logo-text {
        display: block;
    }

    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .transparency-obligations {
        grid-template-columns: repeat(2, 1fr);
    }

    .document-item {
        flex-direction: row;
        align-items: center;
    }

    .document-meta {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .metrics-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .metrics-table {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 6rem 0;
    }

    .page-header {
        padding: 4rem 0;
    }

    .highlights,
    .mission,
    .metrics-section,
    .transparency-content {
        padding: 6rem 0;
    }

    .metrics-summary {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Focus management and accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --primary-dark: #000060;
        --text-muted: #000000;
        --border-color: #000000;
    }

    .btn {
        border-width: 2px;
    }

    .highlight-card,
    .metric-card,
    .document-item,
    .obligation-item {
        border: 2px solid #000000;
    }
}

/* Print styles */
@media print {
    .hero {
        background: none;
        color: black;
    }

    .btn {
        display: none;
    }

    .nav-links a:after {
        content: " (" attr(href) ")";
    }

    .document-actions {
        display: none;
    }
}
