/*
Theme Name: Chantier Ember
Template: generatepress
Version: 1.0
*/

/* =============================================
   BODY — Libre Baskerville body
   ============================================= */
body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: #2C1810;
    background: #FFFFFF;
}

/* =============================================
   TYPOGRAPHY — Space Grotesk headings
   ============================================= */
h1, h2, h3, h4, h5, h6,
.site-title, .page-title, .entry-title {
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    color: #2C1810;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

/* =============================================
   LINKS
   ============================================= */
a {
    color: #C17747;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #8B5432; }

/* =============================================
   NAVIGATION (nav-above-header, dark bar)
   ============================================= */
#site-navigation,
.main-navigation {
    background: #2C1810;
}
.main-navigation a {
    color: #FDF8F4;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0.75rem 1rem;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    color: #F39C12;
    background: transparent;
}
.main-navigation ul ul {
    background: #2C1810;
    border-top: 2px solid #C17747;
}
.main-navigation ul ul a { color: #FDF8F4; }

/* Mobile nav */
.menu-toggle {
    background: #2C1810;
    color: #FDF8F4;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}
.menu-toggle:hover {
    background: #3D2515;
    color: #F39C12;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: #FDF8F4;
    border-bottom: 1px solid #F5E0CC;
    padding: 1rem 0;
}
.site-logo img {
    max-height: 60px;
    width: auto;
}

/* =============================================
   SEP-CONTAINERS — card-style content boxes
   ============================================= */
.site-content .inside-article,
.site-content article.post,
.site-content article.page {
    background: #FFFFFF;
    border: 1px solid #F5E0CC;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* =============================================
   CATEGORY GRID (homepage hero)
   ============================================= */
.cat-grid-section {
    background: #FDF8F4;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid #F5E0CC;
}
.cat-grid-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .cat-grid-inner {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .cat-grid-inner {
        grid-template-columns: 1fr;
    }
}
.cat-card {
    background: #FFFFFF;
    border: 1px solid #F5E0CC;
    border-radius: 8px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    color: #2C1810;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(193, 119, 71, 0.18);
    border-color: #C17747;
    color: #2C1810;
}
.cat-card__icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}
.cat-card__name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2C1810;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.cat-card__desc {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    color: #5D5D5D;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}
.cat-card__count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #C17747;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =============================================
   RECENT POSTS (homepage)
   ============================================= */
.recent-posts-section {
    padding: 3rem 0 4rem;
}
.recent-posts-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #2C1810;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #C17747;
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 550px) {
    .post-grid { grid-template-columns: 1fr; }
}
.post-card {
    background: #FFFFFF;
    border: 1px solid #F5E0CC;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(193, 119, 71, 0.15);
}
.post-card__img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-card:hover .post-card__img { transform: scale(1.04); }
.post-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-card__cat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C17747;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.post-card__cat:hover { color: #8B5432; }
.post-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}
.post-card__title a {
    color: #2C1810;
    text-decoration: none;
}
.post-card__title a:hover { color: #C17747; }
.post-card__excerpt {
    font-size: 0.875rem;
    color: #5D5D5D;
    line-height: 1.6;
    margin: 0 0 0.75rem;
    flex: 1;
}
.post-card__date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    color: #5D5D5D;
    margin-top: auto;
}

/* =============================================
   ARTICLE META
   ============================================= */
.entry-header .entry-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.entry-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: #5D5D5D;
}
.entry-meta a { color: #C17747; }
.entry-meta a:hover { color: #8B5432; }

/* =============================================
   BUTTON / CTA
   ============================================= */
.wp-element-button,
.wp-block-button__link,
.button, button, input[type="submit"] {
    background: #C17747;
    color: #FFFFFF !important;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 0.65rem 1.5rem;
    transition: background 0.2s;
    cursor: pointer;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.button:hover, button:hover, input[type="submit"]:hover {
    background: #8B5432;
    color: #FFFFFF !important;
}

/* Search */
body .search-form .search-submit {
    background: #C17747;
    color: #FFFFFF;
}
body .search-form .search-submit:hover {
    background: #8B5432;
}

/* =============================================
   FOOTER — single-line-dark
   ============================================= */
.site-footer,
#footer-widgets,
.footer-bar {
    background: #2C1810 !important;
    color: #F5E0CC !important;
    border-top: 2px solid #C17747;
}
.footer-bar {
    padding: 1rem 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
}
.footer-bar a {
    color: #F39C12;
    text-decoration: none;
}
.footer-bar a:hover { color: #FDF8F4; }
.footer-bar .copyright {
    color: #F5E0CC;
}

/* Footer nav in single line */
nav.footer-bar-navigation {
    display: inline;
}
nav.footer-bar-navigation ul {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =============================================
   ARCHIVE / CATEGORY HEADERS
   ============================================= */
.archive-description {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    color: #5D5D5D;
    border-left: 3px solid #C17747;
    padding-left: 1rem;
    margin-bottom: 2rem;
}
.page-header .page-title {
    font-size: 1.8rem;
}

/* =============================================
   SCREEN READER TEXT
   ============================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =============================================
   MISC FIXES
   ============================================= */
img { max-width: 100%; height: auto; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Focus styles for accessibility */
a:focus, button:focus, input:focus {
    outline: 2px solid #C17747;
    outline-offset: 2px;
}

/* =============================================
   MOBILE HEADER LAYOUT FIX
   Absolutely position hamburger at right edge of mobile header
   ============================================= */
@media (max-width: 1024px) {
    nav#mobile-header {
        position: relative;
    }
    nav#mobile-header .site-logo.mobile-header-logo img {
        max-height: 50px;
        width: auto;
    }
    nav#mobile-header button.menu-toggle {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
}
