/* ============================================================
   site-shared.css — mikelatimer.ai
   Shared design system for the Airtable-style B&W template.
   Used by: index.html, about.html (more pages migrating later).
   See: claude/airtable-template.md
   ============================================================ */

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

/* --- DESIGN TOKENS --- */
:root {
    --bg: #ffffff;
    --surface: #f7f7f5;
    --surface-2: #fafaf9;
    --text: #0a0a0a;
    --text-muted: #525252;
    --text-faint: #a3a3a3;
    --border: #e5e5e5;
    --border-strong: #0a0a0a;

    --tab-warm: #fef6f1;
    --tab-green: #f0f7e8;
    --tab-blue: #eef3fa;
    --tab-lavender: #f5f0fb;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 100px;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
    --shadow-pop: 0 4px 16px rgba(0,0,0,0.06);

    --max-width: 1200px;
}

/* --- BASE TYPOGRAPHY --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* --- BUTTON UTILITIES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.btn-primary:hover {
    background: #262626;
    border-color: #262626;
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--text);
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.625rem 1rem;
}

/* --- SITE BANNER (top dismissible announcement) --- */
.site-banner {
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.625rem 3rem 0.625rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text);
}

.site-banner a {
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--text);
    padding-bottom: 1px;
    margin-left: 0.25rem;
}

.site-banner a:hover {
    color: var(--text-muted);
    border-bottom-color: var(--text-muted);
}

.site-banner-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.site-banner-close:hover { color: var(--text); }

/* --- SITE NAV (sticky white) --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.site-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-toggle {
    display: none;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.15s ease;
}

.nav-link:hover { color: var(--text-muted); }

/* dropdowns via <details> */
.nav-drop {
    position: relative;
}

.nav-drop summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 0;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s ease;
}

.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::marker { content: ''; }

.nav-drop summary::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 0.15rem;
    opacity: 0.6;
    transition: transform 0.15s ease;
}

.nav-drop[open] summary::after {
    transform: rotate(-135deg) translateY(0);
}

.nav-drop summary:hover { color: var(--text-muted); }

.nav-drop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: var(--shadow-pop);
    margin-top: 0.625rem;
    z-index: 110;
}

.nav-drop-menu a {
    display: block;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.12s ease;
}

.nav-drop-menu a:hover {
    background: var(--surface);
}

.nav-drop-menu a .nav-drop-meta {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* hamburger (mobile only) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    cursor: pointer;
    padding: 0.5rem;
    background: transparent;
    border: 0;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- SITE FOOTER --- */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.footer-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.footer-social {
    display: flex;
    gap: 0.875rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-social a:hover {
    color: var(--text);
    background: var(--surface);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0 0 2.5rem 0;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.005em;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-bottom a:hover { color: var(--text); }

/* --- STACK PILL COMPONENT --- */
.stack-pill {
    display: inline-block;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.stack-pill:hover {
    background: var(--surface);
    border-color: var(--text);
    color: var(--text);
}

.stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* small variant for credentials/chips */
.stack-pill-sm {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- MOBILE OVERRIDES --- */
@media (max-width: 768px) {
    .site-nav-inner {
        flex-wrap: wrap;
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
    }

    .nav-hamburger { display: flex; }

    .nav-left,
    .nav-right {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.75rem 0 0.5rem;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }

    .nav-toggle:checked ~ .nav-left,
    .nav-toggle:checked ~ .nav-right {
        display: flex;
    }

    .nav-drop summary {
        padding: 0.625rem 0.25rem;
        font-size: 0.95rem;
    }

    .nav-drop-menu {
        position: static;
        box-shadow: none;
        border: 0;
        padding: 0.25rem 0.5rem 0.5rem 1rem;
        margin-top: 0;
        min-width: 0;
    }

    .nav-link {
        padding: 0.625rem 0.25rem;
        font-size: 0.95rem;
    }

    .nav-right .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

    .footer-bottom {
        justify-content: flex-start;
    }
}

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