/* Starter Theme — Warm, elegant, earthy tones */

:root {
    --color-bg: #faf8f5;
    --color-text: #3d3530;
    --color-heading: #2a2320;
    --color-muted: #7a6e65;
    --color-accent: #b5845a;
    --color-accent-hover: #9a6f48;
    --color-border: #e8e2db;
    --color-surface: #ffffff;
    --color-header-bg: #2a2320;
    --color-header-text: #f5f0eb;
    --color-footer-bg: #2a2320;
    --color-footer-text: #c4b9ae;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: Georgia, "Times New Roman", serif;
    --max-width: 900px;
}

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ---- Header ---- */
.site-header {
    background: var(--color-header-bg);
    color: var(--color-header-text);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-header-text);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-nav > ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.site-nav a,
.site-nav .dropdown-label {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--color-header-text);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.15s;
    cursor: pointer;
}

.site-nav a:hover,
.site-nav .dropdown-label:hover {
    background: rgba(255,255,255,0.1);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.35rem 0;
    z-index: 100;
    list-style: none;
    flex-direction: column;
}

.has-dropdown.open > .dropdown {
    display: block;
}

.dropdown a {
    color: var(--color-text) !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.85rem !important;
    border-radius: 0 !important;
}

.dropdown a:hover {
    background: var(--color-bg) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

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

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero {
    background: var(--color-header-bg);
    color: var(--color-header-text);
    padding: 4rem 1.5rem;
    text-align: center;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-header-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-footer-text);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero breaks out of container on landing pages */
.landing-page .hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.hero-btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.hero-btn-primary:hover {
    background: var(--color-accent-hover);
}

.hero-btn-outline {
    background: transparent;
    color: var(--color-header-text);
    border: 2px solid var(--color-footer-text);
}

.hero-btn-outline:hover {
    border-color: var(--color-header-text);
    color: #fff;
}

/* Override .page-content styles inside hero */
.page-content .hero h1,
.page-content .hero-title { color: var(--color-header-text); }
.page-content .hero p,
.page-content .hero-subtitle { color: var(--color-footer-text); }
.page-content .hero a,
.page-content .hero-btn-primary { color: #fff; text-decoration: none; }
.page-content .hero-btn-outline { color: var(--color-header-text); text-decoration: none; }

/* ---- Main ---- */
.site-main {
    flex: 1;
}

.content-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ---- Page Content ---- */
.page-content h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.page-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.page-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-heading);
    margin: 1.5rem 0 0.5rem;
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-color: rgba(181,132,90,0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}

.page-content a:hover {
    text-decoration-color: var(--color-accent);
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.page-content ul,
.page-content ol {
    margin: 0 0 1rem 1.5rem;
}

.page-content li {
    margin-bottom: 0.35rem;
}

.page-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--color-surface);
    border-radius: 0 6px 6px 0;
    color: var(--color-muted);
    font-style: italic;
}

.page-content pre {
    background: var(--color-heading);
    color: #e8e2db;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.page-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85em;
}

.page-content p code {
    background: rgba(181,132,90,0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

/* Button */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-accent-hover);
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 2rem 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-nav {
    margin-bottom: 1rem;
}

.footer-nav a {
    color: var(--color-footer-text);
    text-decoration: none;
    margin: 0 0.75rem;
    font-size: 0.85rem;
    transition: color 0.15s;
}

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

.footer-copy {
    font-size: 0.8rem;
    color: var(--color-footer-text);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 0.5rem 0;
        z-index: 99;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav > ul {
        flex-direction: column;
    }

    .site-nav a,
    .site-nav .dropdown-label {
        padding: 0.6rem 1.5rem;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.05);
        border-radius: 0;
    }

    .dropdown a {
        color: var(--color-header-text) !important;
        padding: 0.5rem 2.5rem !important;
    }

    .site-header {
        position: relative;
    }

    .content-wrap {
        padding: 1.5rem 1rem;
    }

    .page-content h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }
}
