/* ═══════════════════════════════════════════════════
   GUMA — Shared Styles
   Linked first from every page. Page-specific styles
   stay in each file's own <style> block.
   ═══════════════════════════════════════════════════ */

:root {
    --ink:         #0A0A0A;
    --ink-2:       #555555;
    --ink-3:       #595959;
    --paper:       #FFFFFF;
    --paper-2:     #F6F6F6;
    --sage:        #1B6B54;
    --sage-light:  #EAF3EF;
    --border:      rgba(0,0,0,0.08);
    --r:           22px;
    --gap:         14px;
    --blur:        saturate(180%) blur(20px);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Figtree', -apple-system, sans-serif;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* ── Visually hidden (screen reader only) ─────────── */
.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;
}

/* ── Skip Link ─────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    background: var(--sage);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.1s;
}
.skip-link:focus { top: 16px; }

/* ── Focus Visible ─────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Nav ───────────────────────────────────────────── */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    height: 56px;
    padding: 0 48px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo {
    font-size: 16px; font-weight: 800;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--ink); text-decoration: none;
}

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

.nav-link {
    padding: 6px 16px;
    font-size: 14px; font-weight: 500; color: var(--ink-2);
    text-decoration: none; transition: color 0.1s;
    letter-spacing: -0.1px;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-cta {
    padding: 8px 18px;
    background: var(--ink); color: var(--paper);
    border: none; border-radius: 100px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: opacity 0.12s;
    letter-spacing: -0.1px;
}
.nav-cta:hover { opacity: 0.8; }

.nav-ghost {
    padding: 8px 16px;
    background: transparent; color: var(--ink-2);
    border: none; border-radius: 100px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: color 0.1s, background 0.1s;
}
.nav-ghost:hover { color: var(--ink); background: var(--paper-2); }

.nav-back {
    font-size: 13px; font-weight: 500; color: var(--ink-2);
    text-decoration: none; display: flex; align-items: center; gap: 6px;
    transition: color 0.1s;
}
.nav-back:hover { color: var(--ink); }

/* ── Bottom Tab Bar (mobile only) ──────────────────── */
.tab-bar { display: none; }

/* ── Footer ────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 56px 48px 32px;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-grid {
    display: grid; grid-template-columns: 2fr 3fr;
    gap: 48px; margin-bottom: 48px;
}

.footer-cols-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
}

.footer-brand .f-logo {
    font-size: 15px; font-weight: 800; letter-spacing: 2px;
    text-transform: uppercase; color: var(--ink); margin-bottom: 12px;
}

.footer-brand > p {
    font-size: 13px; color: var(--ink-3);
    line-height: 1.65; margin-bottom: 16px;
}

.footer-materia-link {
    font-size: 12px; font-weight: 600; color: var(--sage);
    text-decoration: none; letter-spacing: -0.1px;
    opacity: 0.8; transition: opacity 0.12s;
}
.footer-materia-link:hover { opacity: 1; }

.footer-col h5 {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 16px;
}

.footer-col a {
    display: block; font-size: 13.5px;
    color: var(--ink-2); text-decoration: none;
    margin-bottom: 10px; transition: color 0.1s;
}
.footer-col a:hover { color: var(--ink); }

.footer-base {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--ink-3);
}

/* ── Mobile ≤680px ─────────────────────────────────── */
@media (max-width: 680px) {

    nav {
        height: 40px;
        padding: 0 20px;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

    .tab-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 200;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,0.95);
        backdrop-filter: var(--blur);
        -webkit-backdrop-filter: var(--blur);
        border-top: 1px solid var(--border);
        align-items: stretch;
    }

    .tab-bar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        color: var(--ink-3);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.3px;
        min-height: 44px;
        transition: color 0.15s;
    }

    .tab-bar a[aria-current="page"],
    .tab-bar a[aria-current="true"] { color: var(--sage); }

    .tab-bar svg {
        width: 20px; height: 20px;
        flex-shrink: 0;
    }

    footer {
        padding: 40px 20px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px; margin-bottom: 32px;
    }

    .footer-cols-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-base { flex-direction: column; gap: 8px; }
}

@media (max-width: 390px) {
    .footer-cols-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
