/* ============================================
   AEQUILIBRA — Shared Base Styles
   Variables, reset, accessibility, footer, animations.
   Loaded before page-specific styles on every page.
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
    --base: #F4F4F4;
    --ink: #000000;
    --swiss-grey: #F0F0F0;
    --accent-blue: #0047FF;
    --accent-red: #FF3B30;
    --accent-yellow: #FFD600;
    --font: 'Inter', sans-serif;
}

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

html, body {
    height: 100%;
    background-color: var(--base);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
    max-width: 1920px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    body { border: none; }
}

/* --- ACCESSIBILITY --- */
:focus-visible {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 4px;
    z-index: 9999;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--base); color: var(--ink); border: 2px solid var(--ink);
    padding: 12px 16px; z-index: 2000; font-weight: 900; text-decoration: none;
    text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font);
}
.skip-link:focus { left: 16px; top: 16px; }

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

/* --- 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;
    }
}

/* --- SHARED ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
footer {
    padding: 3rem 5%;
    background: var(--base);
    border-top: 2px solid var(--ink);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.footer-brand {
    font-size: 1.3rem; font-weight: 900;
    letter-spacing: -0.02em; line-height: 1;
    margin-bottom: 0.2rem;
    color: var(--ink); text-decoration: none;
}

.footer-col {
    display: flex; flex-direction: column; gap: 3px;
}

.footer-col-title {
    font-size: 0.65rem; color: #4a4a4a;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 6px; font-weight: 600;
}

.footer-link-item {
    color: #333; text-decoration: none;
    transition: 0.3s; font-size: 0.9rem;
    font-weight: 400; line-height: 1.3;
}
.footer-link-item:hover { color: var(--accent-blue); }

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* --- LANDSCAPE SAFETY --- */
@media (max-height: 500px) and (orientation: landscape) {
    footer { padding: 2rem 5% !important; }
    .footer-grid { gap: 1.5rem !important; }
}
