/* ============================================================
   style.css — Global styles for rural.ie
   Palette: Deep Forest Green, Warm Stone, Slate Blue, Cream
   ============================================================ */

:root {
    --green:       #2C5F2E;
    --green-light: #4A8C4F;
    --stone:       #C8A96E;
    --slate:       #3D5A80;
    --cream:       #F7F4EE;
    --cream-dark:  #EDE9DF;
    --text:        #1E2A1F;
    --text-mid:    #4A5568;
    --text-light:  #718096;
    --white:       #FFFFFF;
    --border:      #DDD9CE;
    --shadow:      0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
    --radius:      10px;
    --radius-sm:   6px;
    --max-w:       1140px;
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    text-decoration: none;
    line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-primary:hover { background: var(--green-light); border-color: var(--green-light); color: var(--white); }
.btn-secondary { background: transparent; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--green); color: var(--white); }
.btn-stone { background: var(--stone); color: var(--white); border-color: var(--stone); }
.btn-stone:hover { background: #b8945a; border-color: #b8945a; color: var(--white); }
.btn-white { background: var(--white); color: var(--green); border-color: var(--white); }
.btn-white:hover { background: var(--cream); border-color: var(--cream); color: var(--green); }

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.site-header .container { display: flex; align-items: center; gap: 2rem; height: 68px; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.logo-text { font-size: 1.35rem; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.logo-dot { color: var(--stone); }
.main-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.main-nav a {
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { background: var(--cream); color: var(--green); }
.main-nav .nav-cta {
    background: var(--green);
    color: var(--white);
    font-weight: 600;
    padding: 8px 16px;
    margin-left: 0.5rem;
}
.main-nav .nav-cta:hover { background: var(--green-light); color: var(--white); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--green); margin-left: auto; padding: 4px; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, #1a3d1c 100%);
    color: var(--white);
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 32px 32px;
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; }
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--stone);
    margin-bottom: 1.25rem;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.hero h1 span { color: var(--stone); }
.hero > .container > .hero-inner > p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 560px;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    flex-wrap: wrap;
}
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--stone); letter-spacing: -0.02em; }
.hero-stat span { font-size: 0.82rem; opacity: 0.72; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Section shared ---- */
.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stone);
    background: rgba(200,169,110,0.15);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 0.75rem;
}
.section-header { text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.section-header p { color: var(--text-mid); font-size: 1.05rem; line-height: 1.65; }

/* ---- Pillars ---- */
.pillars { padding: 80px 0; background: var(--cream); }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.pillar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green-light); color: inherit; }
.pillar-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.pillar-icon.green { background: rgba(44,95,46,0.1); }
.pillar-icon.stone { background: rgba(200,169,110,0.15); }
.pillar-icon.slate { background: rgba(61,90,128,0.1); }
.pillar-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.6rem; }
.pillar-card p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 1rem; }
.pillar-link { font-size: 0.88rem; font-weight: 600; color: var(--green); }

/* ---- Why now ---- */
.why-now { padding: 80px 0; background: var(--white); }
.why-now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.why-now-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.why-now-content p { color: var(--text-mid); font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; }
.reason-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.reason-item { display: flex; gap: 1rem; align-items: flex-start; }
.reason-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}
.reason-item > div strong { display: block; color: var(--text); font-size: 0.97rem; margin-bottom: 0.2rem; }
.reason-item > div span { font-size: 0.88rem; color: var(--text-mid); }
.why-now-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.stat-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
}
.stat-card .stat-val { font-size: 2rem; font-weight: 800; color: var(--green); letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.4rem; }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-mid); line-height: 1.4; }

/* ---- Featured articles ---- */
.featured-articles { padding: 80px 0; background: var(--cream); }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.article-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green);
    background: rgba(44,95,46,0.08);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 0.75rem;
}
.article-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 0.7rem; }
.article-card p { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; flex: 1; margin-bottom: 1.25rem; }
.article-meta { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--text-light); padding-top: 0.85rem; border-top: 1px solid var(--cream-dark); margin-top: auto; }
.article-card-link {
    display: block;
    padding: 0.85rem 1.5rem;
    background: var(--cream);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green);
    border-top: 1px solid var(--border);
    text-align: right;
    transition: background 0.15s;
}
.article-card-link:hover { background: var(--cream-dark); color: var(--green); }

/* ---- Grants banner ---- */
.grants-banner {
    background: linear-gradient(135deg, var(--slate) 0%, #2a3d5c 100%);
    color: var(--white);
    padding: 70px 0;
}
.grants-banner-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grants-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.grants-banner h2 span { color: var(--stone); }
.grants-banner p { opacity: 0.88; font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.grant-items { display: flex; flex-direction: column; gap: 0.85rem; }
.grant-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.12);
    text-decoration: none;
    color: var(--white);
    transition: background 0.15s;
}
.grant-item:hover { background: rgba(255,255,255,0.14); color: var(--white); }
.grant-item-icon { font-size: 1.5rem; flex-shrink: 0; }
.grant-item strong { display: block; font-size: 0.97rem; margin-bottom: 0.15rem; }
.grant-item span { font-size: 0.82rem; opacity: 0.75; }

/* ---- Newsletter ---- */
.newsletter { padding: 80px 0; background: var(--white); }
.newsletter-inner {
    background: var(--cream);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border);
    max-width: 640px;
    margin: 0 auto;
}
.newsletter-inner h2 { font-size: 1.7rem; font-weight: 800; color: var(--text); margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.newsletter-inner p { color: var(--text-mid); font-size: 0.97rem; margin-bottom: 1.75rem; line-height: 1.65; }
.newsletter-form { display: flex; gap: 0.75rem; max-width: 440px; margin: 0 auto; }
.newsletter-form input[type="email"] {
    flex: 1;
    padding: 13px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.97rem;
    font-family: var(--font);
    background: var(--white);
    transition: border-color 0.2s;
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,95,46,0.1); }
.newsletter-note { font-size: 0.8rem; color: var(--text-light); margin-top: 0.75rem; }

/* ---- Footer ---- */
.site-footer { background: var(--text); color: rgba(255,255,255,0.75); padding: 60px 0 32px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2rem;
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { font-size: 0.88rem; margin-top: 1rem; line-height: 1.65; opacity: 0.7; max-width: 260px; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stone); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: color 0.15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; opacity: 0.55; gap: 1rem; flex-wrap: wrap; }
.footer-bottom nav { display: flex; gap: 1.5rem; }
.footer-bottom a { color: inherit; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .why-now-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .grants-banner-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
    .main-nav { display: none; }
    .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem; z-index: 99; gap: 0.25rem; box-shadow: var(--shadow-lg); }
    .nav-toggle { display: block; }
    .hero { padding: 60px 0; }
    .newsletter-form { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.85rem; }
    .hero-actions { flex-direction: column; }
}
