/* Heartland Homestead — shared design system
   Canonical tokens + common components (header, nav, buttons, sections,
   cards, footer, newsletter). Linked before each page's inline <style> so
   any page-specific override still wins. Edit shared styles HERE, once. */

/* ============================ TOKENS ============================ */
:root {
    /* Brand */
    --primary-color: #2e7d32;   /* homestead green */
    --primary-dark:  #225c25;
    --secondary-color: #8b5a2b; /* saddle brown / earth */
    --earth-dark:    #6b4520;
    --accent-color:  #1976d2;   /* sky blue accent */

    /* Warm neutrals */
    --tan:    #c9a77c;          /* light accent for dark bands */
    --olive:  #5c6b43;
    --cream:  #f5f1e9;          /* page background */
    --cream-2:#ece3d2;          /* alternating band */
    --ink:    #2b2620;          /* deep footer / strong text */
    --muted:  #6e6256;          /* secondary text */
    --line:   #e4dac7;          /* hairline borders */

    --light-bg: var(--cream);   /* legacy alias */
    --dark-text: #33312c;
    --light-text: #ffffff;

    /* Scale */
    --maxw: 1180px;
    --radius: 12px;
    --shadow-sm: 0 4px 14px rgba(43,32,16,.08);
    --shadow:    0 12px 30px rgba(43,32,16,.12);

    --h-font: 'Montserrat', sans-serif;
    --b-font: 'Roboto', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--b-font);
    line-height: 1.65;
    color: var(--dark-text);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--h-font); line-height: 1.15; color: var(--dark-text); }
img { max-width: 100%; display: block; }

.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }

.visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--primary-color); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================ SHARED HELPERS ============================ */
/* Eyebrow / kicker — the small uppercase label above headings */
.kicker {
    display: inline-block;
    font-family: var(--h-font); font-weight: 700; text-transform: uppercase;
    letter-spacing: 2.5px; font-size: .8rem; color: var(--secondary-color); margin-bottom: 12px;
}
.kicker--light { color: var(--tan); }

/* Section head: kicker -> h2 -> lead */
.section-head { max-width: 64ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--secondary-color); margin-bottom: 14px; }
.section--green .section-head h2, .section--earth .section-head h2 { color: #fff; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.center { text-align: center; }

/* ============================ SECTIONS / BANDS ============================ */
.section { padding: clamp(54px, 8vw, 92px) 0; }
.section--cream2 { background: var(--cream-2); }
.section--green  { background: var(--primary-color); color: #fff; }
.section--earth  { background: linear-gradient(135deg, var(--secondary-color) 0%, var(--earth-dark) 100%); color: #fff; }
.section--green .lead, .section--earth .lead { color: rgba(255,255,255,.92); }

/* ============================ HEADER ============================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(245,241,233,.9); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 56px; height: 56px; border-radius: 50%; }
.brand-name { font-family: var(--h-font); line-height: 1.05; }
.brand-name b { display: block; font-weight: 700; font-size: 1.3rem; color: var(--primary-color); }
.brand-name span { display: block; font-size: .64rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--secondary-color); font-weight: 600; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    font-family: var(--h-font); font-weight: 600; font-size: .95rem; color: var(--secondary-color);
    text-decoration: none; padding: 9px 13px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav a:hover, .nav a:focus-visible { color: var(--primary-color); background: var(--cream-2); }
.nav a.nav-cta { color: #fff; background: var(--primary-color); padding: 10px 20px; }
.nav a.nav-cta:hover { background: var(--primary-dark); color: #fff; }

.nav-toggle {
    display: none; background: var(--primary-color); border: 0; color: #fff;
    width: 46px; height: 42px; border-radius: 8px; cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ''; display: block; width: 22px; height: 2px; background: #fff; position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }

/* ============================ BUTTONS ============================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: 13px 28px; border-radius: 30px; border: 2px solid transparent; cursor: pointer;
    font-family: var(--h-font); font-weight: 600; font-size: 1rem; line-height: 1;
    color: var(--light-text); background-color: var(--primary-color); text-decoration: none;
    transition: background-color .2s, transform .12s, box-shadow .2s, color .2s;
}
.btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); }
.btn--lg { padding: 16px 36px; font-size: 1.08rem; }
.btn--earth { background-color: var(--secondary-color); }
.btn--earth:hover { background-color: var(--earth-dark); }
.btn--ghost { background: transparent; color: var(--secondary-color); border-color: currentColor; }
.btn--ghost:hover { background: var(--secondary-color); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost-light:hover { background: #fff; color: var(--primary-color); }

/* Round social buttons (used on home + share rows) */
.btn-circle, .btn-patreon, .btn-instagram, .btn-facebook {
    border-radius: 50%; width: 60px; height: 60px; padding: 0; border: none; margin: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem;
    color: var(--light-text); text-decoration: none; transition: background-color .3s, box-shadow .3s, transform .2s;
}
.btn-circle:hover, .btn-patreon:hover, .btn-facebook:hover, .btn-instagram:hover { transform: translateY(-3px); }
.btn-circle { background-color: var(--accent-color); }
.btn-circle:hover { background-color: #125ea7; }
.btn-patreon { background-color: #ff424d; }
.btn-patreon:hover { background-color: #c81d25; }
.btn-instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.btn-instagram:hover { box-shadow: 0 0 0 4px #fd5949, 0 0 0 8px #fff; }
.btn-facebook { background-color: #1877f3; }
.btn-facebook:hover { background-color: #145db2; box-shadow: 0 0 0 4px #1877f3, 0 0 0 8px #fff; }

/* ============================ CARDS / GRID ============================ */
.grid { display: grid; gap: 26px; }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* ============================ STATS BAND ============================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }
.stat b { display: block; font-family: var(--h-font); font-weight: 700; font-size: 2.6rem; line-height: 1; color: #fff; }
.stat span { display: block; margin-top: 8px; font-size: .82rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.82); }
.section--green .stat b { color: #fff; }
.section--green .stat span { color: rgba(255,255,255,.85); }

/* ============================ SPLIT (image + text) ============================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img, .split .split-media { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.checklist { list-style: none; margin: 22px 0 0; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.checklist li::before {
    content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ============================ CHIPS ============================ */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: .9rem; color: var(--dark-text); }

/* ============================ QUOTE BAND ============================ */
.quote-band { text-align: center; }
.quote-band blockquote { font-family: var(--h-font); font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.3; max-width: 22ch; margin: 0 auto; }
.quote-band cite { display: block; margin-top: 18px; font-style: normal; letter-spacing: 2px; text-transform: uppercase; font-size: .9rem; color: var(--tan); }

/* ============================ CTA BAND ============================ */
.cta-band {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff; text-align: center; border-radius: 18px; box-shadow: var(--shadow);
    padding: clamp(40px, 6vw, 64px);
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 56ch; margin: 0 auto 28px; font-size: 1.12rem; }

/* ============================ NEWSLETTER ============================ */
.newsletter-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.newsletter-form input[type="email"] { padding: 12px 15px; border-radius: 8px; border: none; font-family: var(--b-font); font-size: .95rem; color: var(--dark-text); width: 100%; }
.newsletter-form button { padding: 12px 18px; background-color: var(--primary-color); color: #fff; border: none; border-radius: 30px; font-family: var(--h-font); font-weight: 600; cursor: pointer; transition: background-color .3s; }
.newsletter-form button:hover { background-color: var(--primary-dark); }
.newsletter-note { font-size: .78rem; opacity: .8; margin-top: 4px; line-height: 1.4; }
.newsletter-status { margin-top: 10px; font-size: .88rem; font-weight: 600; line-height: 1.45; }
.newsletter-status.ok   { color: #9be7a6; }
.newsletter-status.note { color: #f3d79b; }
.newsletter-status.err  { color: #ffb4ad; }
.newsletter-status a { color: inherit; text-decoration: underline; }

/* ============================ FOOTER ============================ */
footer.site-footer { background: var(--ink); color: #d3cabb; padding: 64px 0 26px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-col h3 { font-family: var(--h-font); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 16px; }
.footer-col p { color: #c6bcab; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col a { color: #d3cabb; text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 50px; height: 50px; border-radius: 50%; }
.footer-brand b { font-family: var(--h-font); color: #fff; font-size: 1.2rem; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-link {
    width: 40px; height: 40px; background: rgba(255,255,255,.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
    font-size: .85rem; text-decoration: none; transition: background .2s, transform .2s;
}
.social-link:hover { background: var(--primary-color); transform: translateY(-3px); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .85rem; color: #9b9384; }
.footer-bottom a { color: #9b9384; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ============================ STATES ============================ */
.loading { text-align: center; padding: 20px; color: #666; }
.error { text-align: center; padding: 20px; color: #d32f2f; background: #ffebee; border-radius: 8px; margin: 10px 0; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: inline-flex; }
    .nav {
        position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
        background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 18px 18px;
        gap: 2px; transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
    }
    .nav.open { transform: translateY(0); }
    .nav a { padding: 14px 12px; }
    .nav a.nav-cta { text-align: center; margin-top: 8px; }
}
@media (max-width: 560px) {
    .grid--auto { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .brand-name b { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
