/* === HALVAR Design Tokens =============================================== */
:root {
    /* Type scale (Major Third-ish). Tune base_size to shift everything. */
    --font-base-size: 1rem; /* equals 18px (set on body below) */
    --font-scale--1: 0.875rem; /* small text */
    --font-scale-0: var(--font-base-size);
    --font-scale-1: 1.25rem; /* h6-ish / small subhead */
    --font-scale-2: 1.35rem; /* section headings */
    --font-scale-3: 1.62rem; /* h1/h2 on smaller viewports */
    --font-scale-4: 2rem; /* large display (optional) */

    /* Line-heights */
    --lh-tight: 1.15;
    --lh-heading: 1.2;
    --lh-body: 1.55;
    --lh-body-tight: 1.4;

    /* Spacing scale (vertical rhythm). Adjust base to taste. */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;

    /* Container width */
    --container-max: 48rem; /* ~768px */

    /* Brand */
    --brand-red: #b10000;

    /* Rules / hairlines */
    --rule-color: #e5e5e5;
    --rule: 1px solid var(--rule-color);
}

body {
    font-family:
        "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman",
        "Droid Serif", Times, "Source Serif Pro", serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #111;
    line-height: 1.65;
    font-size: 18px;
}

/* Remove default link styling - will be handled in typography.css */
a {
    color: inherit;
    text-decoration: none;
}

header,
footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem;
}

/* Navigation styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.navbar-brand {
    /* Site title/logo */
    font-weight: 600;
    font-size: 1.2rem;
    color: #111;
    text-decoration: none;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #111;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Desktop navigation menu */
.navbar-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

/* Hide desktop menu on smaller screens */
@media (max-width: 900px) {
    .navbar-menu {
        display: none;
    }
}

.navbar-menu li {
    margin: 0;
}

/* Mobile responsive styles */
@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 5rem 2rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        gap: 0;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-menu li {
        margin: 0.5rem 0;
        border-bottom: 1px solid #eee;
        padding: 0.75rem 0;
    }

    .navbar-menu li:last-child {
        border-bottom: none;
    }

    .navbar-menu a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
        color: #333;
    }

    /* Hamburger animation */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Overlay for mobile menu */
    .navbar-menu.active::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Footer styling */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
}
