/*
   Brainy Savings editorial layer — loads after main.css.
   Design source: Stitch screen 3d53186780c74090982a99d76d57cedc
   ("Editorial with Full Footer", picked 2026-08-18).
*/

/* --- Self-hosted display font (variable, latin subset) --------------------- */
@font-face {
    font-family: "Merriweather";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/merriweather-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --font-display: "Merriweather", Georgia, "Times New Roman", serif;
    --bs-label-tracking: 0.12em;
}

/* --- Header: white masthead over a deep-green rule -------------------------- */

.site-header {
    background: var(--color-background);
    border-bottom: 2px solid var(--color-heading);
}

.site-header .site-title a {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--color-heading);
    letter-spacing: -0.01em;
}

.site-header .primary-menu > li > a {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: var(--bs-label-tracking);
    color: var(--color-heading);
}

.site-header .primary-menu > li > a:hover {
    color: var(--color-primary);
}

.header-subscribe {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 1.1rem;
    transition: background-color 0.2s ease;
}

.header-subscribe:hover {
    background: var(--color-heading);
    color: #fff;
}

@media (max-width: 1024px) {
    .header-subscribe {
        display: none;
    }
}

/* --- Shared editorial atoms ------------------------------------------------- */

.bs-kicker {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    background: rgba(134, 239, 172, 0.2); /* mint @ 20% — fallback */
    background: color-mix(in srgb, var(--color-accent) 20%, transparent);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 2px;
}

.bs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--bs-label-tracking);
    color: var(--color-text-light);
}

.bs-section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--bs-label-tracking);
    color: var(--color-heading);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.6rem;
    margin: 0 0 1.4rem;
}

.bs-section-title a,
.bs-section-title {
    color: var(--color-heading);
}

.bs-see-all {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    white-space: nowrap;
}

.bs-see-all:hover {
    text-decoration: underline;
}

.bs-home a,
.bs-home a:visited {
    text-decoration: none;
}

.bs-home article a:hover h1,
.bs-home article a:hover h2,
.bs-home article a:hover h3,
.bs-home article a:hover h4 {
    color: var(--color-primary);
}

.bs-home img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image wrappers are anchors — force block so aspect-ratio creates a box */
.bs-lead-image,
.bs-secondary-image,
.bs-cat-lead-image,
.bs-story-thumb {
    display: block;
}

/* --- Top editorial grid: lead + secondary (8 cols) / Top Stories (4 cols) --- */

.bs-home {
    padding: 2.5rem 0 1rem;
}

.bs-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.bs-lead-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 1.4rem;
    background: var(--color-background-light);
}

.bs-lead .bs-kicker {
    margin-bottom: 0.8rem;
}

.bs-lead-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.4rem);
    line-height: 1.15;
    color: var(--color-heading);
    margin: 0 0 1rem;
}

.bs-lead-excerpt {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-text-medium);
    max-width: 46em;
    margin: 0 0 1.3rem;
}

.bs-lead .bs-meta {
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

/* Secondary pair under the lead */

.bs-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    border-top: 2px solid var(--color-heading);
    padding-top: 2rem;
    margin-top: 2.4rem;
}

.bs-secondary-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--color-background-light);
}

.bs-secondary .bs-kicker {
    margin-bottom: 0.6rem;
}

.bs-secondary-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--color-heading);
    margin: 0 0 0.6rem;
}

.bs-secondary-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-medium);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Top Stories sidebar */

.bs-top-stories {
    border-left: 1px solid var(--color-heading);
    padding-left: 2rem;
}

.bs-story {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.3rem;
    margin-bottom: 1.3rem;
    border-bottom: 1px solid var(--color-border-light);
}

.bs-story:last-child {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.bs-story-thumb {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-background-light);
}

.bs-story-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.bs-story-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--color-heading);
    margin: 0 0 0.3rem;
}

.bs-story-date {
    font-size: 0.72rem;
    color: var(--color-text-light);
}

/* --- Category columns over a heavy rule -------------------------------------- */

.bs-categories {
    border-top: 4px solid var(--color-heading);
    padding-top: 3rem;
    margin-bottom: 4rem;
}

.bs-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem 3rem;
}

.bs-cat-lead-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--color-background-light);
}

.bs-cat-item-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--color-heading);
    margin: 0 0 0.5rem;
}

.bs-cat-item-excerpt {
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--color-text-medium);
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-cat-item + .bs-cat-item {
    border-top: 1px solid var(--color-border);
    padding-top: 1.3rem;
    margin-top: 1.3rem;
}

/* --- Newsletter band + footer -------------------------------------------------- */

.bs-newsletter-band {
    background: var(--color-heading);
    padding: 4.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bs-newsletter-band::before,
.bs-newsletter-band::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.22;
    pointer-events: none;
}

.bs-newsletter-band::before {
    width: 24rem;
    height: 24rem;
    top: -8rem;
    left: -8rem;
    background: var(--color-primary);
}

.bs-newsletter-band::after {
    width: 16rem;
    height: 16rem;
    bottom: -6rem;
    right: -4rem;
    background: var(--color-accent);
}

.bs-band-inner {
    position: relative;
    z-index: 1;
    max-width: 44rem;
    margin: 0 auto;
}

.bs-band-icon {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.bs-band-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
    color: #fff;
    margin: 0 0 1rem;
}

.bs-band-copy {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 auto 2rem;
    max-width: 38rem;
}

.bs-band-button {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.bs-band-button:hover {
    background: var(--color-accent);
    color: var(--color-heading);
}

.bs-band-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 1.1rem 0 0;
}

.bs-band-note a {
    color: inherit;
    text-decoration: underline;
}

/* The band sits directly on the footer — kill main.css's 64px white gap */
.bs-newsletter-band + .site-footer {
    margin-top: 0;
}

/* Footer already runs on --color-footer-* variables; align hover with the design */

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

.site-footer .footer-site-title {
    font-family: var(--font-display);
    font-weight: 700;
}

/* --- Responsive ---------------------------------------------------------------- */

@media (max-width: 1024px) {
    .bs-top-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .bs-top-stories {
        border-left: 0;
        padding-left: 0;
        border-top: 2px solid var(--color-heading);
        padding-top: 2rem;
    }
}

@media (max-width: 640px) {
    .bs-secondary {
        grid-template-columns: minmax(0, 1fr);
    }

    .bs-lead-excerpt {
        font-size: 1.02rem;
    }

    .bs-story-thumb {
        width: 80px;
        height: 80px;
    }
}
