/* ============================================
   SHARED STYLES FOR ALL PAGES
   ============================================ */

:root {
    --ink: #1a1a1a;
    --text: #333333;
    --text-light: #666666;
    --border: #e5e5e5;
    --bg: #ffffff;
    --bg-alt: #f8f8f8;
    --accent: #c44536;
    --accent-hover: #a33a2d;
    --link: #1a56db;
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

a {
    color: var(--ink);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.header-tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    max-width: 100%;
    text-align: right;
    line-height: 1.4;
    margin: 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--ink);
    width: 2.5rem;
    height: 2.5rem;
    z-index: 1001;
    line-height: 1;
    flex-shrink: 0;
}

.menu-toggle:hover {
    color: var(--accent);
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 0;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    justify-content: center;
}

/* On mobile, hide menu by default - JavaScript will show it */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
    }
    
    nav ul.active {
        display: flex;
        flex-direction: column;
    }
}

nav a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

/* ============================================
   RESPONSIVE: MOBILE (≤768px)
   ============================================ */

@media (max-width: 768px) {
    header {
        position: relative;
        z-index: 1000;
    }

    .header-top {
        padding: 1rem 1.5rem;
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
        align-items: center;
    }

    .logo {
        justify-self: center;
        grid-column: 1 / -1;
        grid-row: 1;
        margin-bottom: 0;
    }

    .header-right {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        width: 100%;
    }

    .header-tagline {
        text-align: center;
        font-size: 0.85rem;
        max-width: 100%;
    }

    .menu-toggle {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    nav {
        border-top: 1px solid var(--border);
        position: relative;
        overflow: visible;
        min-height: 3rem;
        padding-bottom: 0.75rem;
    }

    nav ul {
        position: relative;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0;
        margin: 0;
    }

    nav ul.active {
        position: relative;
    }

    nav ul li {
        border-bottom: 1px solid var(--border);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        padding: 1rem 1.5rem;
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE: SMALL MOBILE (≤600px)
   ============================================ */

@media (max-width: 600px) {
    .header-top {
        padding: 1rem;
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.5rem;
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }

    .header-right {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        width: 100%;
    }

    .header-tagline {
        text-align: center;
        font-size: 0.85rem;
    }

    .menu-toggle {
        grid-column: 2;
        grid-row: 1;
    }
}

