/* ==========================================================================
   Moringa Tree Farm — Main Stylesheet
   Professional Green Theme
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --brand:        #4CAF50;
    --brand-dark:   #2e7d32;
    --brand-light:  #81C784;
    --brand-pale:   #E8F5E9;
    --brand-muted:  #C8E6C9;

    --ink:          #1f2937;
    --ink-muted:    #4b5563;
    --ink-light:    #6b7280;
    --white:        #ffffff;
    --off-white:    #f9fafb;
    --border:       #e5e7eb;

    --font-body:    'Roboto', sans-serif;
    --font-heading: 'Playfair Display', serif;

    --nav-height:   72px;
    --content-max:  900px;
    --radius:       8px;
    --radius-lg:    16px;
    --shadow:       0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg:    0 8px 30px rgba(0, 0, 0, 0.12);
    --transition:   0.3s ease;
}

/* ---------- Reset & Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    padding-top: var(--nav-height);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; }

p {
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--brand-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
    background: var(--ink);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    z-index: 2000;
    font-weight: 600;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

:focus-visible {
    outline: 3px solid #1e88e5;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Navbar ---------- */
.navbar {
    background-color: var(--brand);
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: var(--white) !important;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    margin-right: 10px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--white) !important;
    text-decoration: underline;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.4);
}

/* ---------- Tagline Bar ---------- */
.tagline-bar {
    background-color: var(--brand-dark);
    color: var(--white);
    text-align: center;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.tagline-bar span {
    transition: opacity 0.5s ease;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    width: 100%;
    /* Height follows width so the seedling (top) and hands (bottom) stay in frame */
    aspect-ratio: 12 / 5;
    min-height: 240px;
    margin: 0; /* Bootstrap gives <figure> a bottom margin */
    background: url('../images/hero-moringa.webp') no-repeat center center;
    background-size: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.35)
    );
    pointer-events: none;
}

/* ---------- Hero Text (below image) ---------- */
.hero-content {
    text-align: center;
    padding: 28px 20px 40px;
    max-width: var(--content-max);
    margin: 0 auto;
}

.hero-content h1 {
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Sections ---------- */
.section {
    padding: 72px 20px;
}

.section-alt {
    background-color: var(--brand-pale);
}

.section-alt-2 {
    background-color: var(--brand-muted);
}

.content-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0.5rem auto 0;
}

/* ---------- Checklist Items ---------- */
.checklist {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-weight: 500;
    transition: transform var(--transition);
}

.checklist li:hover {
    transform: translateX(4px);
}

.checklist .check-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    color: var(--brand);
    margin-top: 2px;
}

.checklist .citation {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink-light);
    margin-top: 4px;
}

.checklist .citation a {
    color: var(--brand);
    text-decoration: underline;
}

/* ---------- Stats Grid ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.stat-card {
    background: var(--white);
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.2;
}

.stat-card p {
    font-size: 0.95rem;
    margin: 8px 0 0;
}

/* ---------- Chart Section ---------- */
.chart-wrapper {
    max-width: 600px;
    margin: 32px auto 0;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ---------- Shop Placeholder ---------- */
.placeholder-section {
    text-align: center;
}

.placeholder-section .badge-coming {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ---------- FAQ ---------- */
.accordion-button:not(.collapsed) {
    background-color: var(--brand-pale);
    color: var(--brand-dark);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    border-color: var(--brand);
}

.accordion-body {
    color: var(--ink-muted);
    line-height: 1.8;
}

/* ---------- Contact Form ---------- */
.contact-form {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--ink);
}

.contact-form .form-control {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color var(--transition);
}

.contact-form .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.15);
}

.form-status {
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    min-height: 1.5em;
}

.form-status.success { color: var(--brand); }
.form-status.error   { color: #dc3545; }

/* ---------- Buttons ---------- */
.btn-brand {
    background-color: var(--brand);
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius);
    transition: background-color var(--transition), transform var(--transition);
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--brand-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline-brand {
    border: 2px solid var(--brand);
    color: var(--brand);
    background: transparent;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background-color: var(--brand);
    color: var(--white);
}

/* ---------- Footer ---------- */
.footer {
    background-color: #2d2d2d;
    color: rgba(255, 255, 255, 0.8);
    padding: 48px 20px 24px;
}

.footer p {
    color: inherit;
}

.footer h5 {
    font-family: var(--font-heading);
    color: var(--white);
    margin-bottom: 16px;
}

.footer a {
    color: var(--brand-light);
    text-decoration: none;
    transition: color var(--transition);
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    margin-right: 8px;
    transition: background var(--transition);
}

.footer-social a:hover {
    background: var(--brand);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 32px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.7rem; }
}

@media (max-width: 576px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .section { padding: 48px 16px; }
    .contact-form { padding: 24px 20px; }
    .stat-card .stat-number { font-size: 2rem; }
    .footer .row > div { margin-bottom: 24px; }
}

/* Utility classes (replacing inline styles blocked by CSP) */
.source-note { font-size: 0.8rem; color: var(--ink-light); }
.hp-field { position: absolute; left: -9999px; }
.contact-text { font-size: 0.95rem; }
.shop-img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form-note { font-size: 0.85rem; color: var(--ink-light); margin: 12px 0 0; text-align: center; }
.form-note a { color: var(--brand-dark); }

/* ---------- Legal Pages ---------- */
.legal-page { max-width: var(--content-max); margin: 0 auto; padding: 48px 20px 72px; }
.legal-page h1 { font-size: 2.2rem; margin-bottom: 0.25rem; }
.legal-page h2 { font-size: 1.4rem; margin: 2rem 0 0.5rem; }
.legal-page .updated { color: var(--ink-light); font-size: 0.9rem; margin-bottom: 2rem; }
.legal-page a { color: var(--brand-dark); }
.accordion-body .citation { display: block; font-size: 0.8rem; color: var(--ink-light); margin-top: 8px; }
.accordion-body .citation a { color: var(--brand-dark); }
