/* FertAfrica public site — 2026 refresh */
:root {
    --green: #0b5d2a;
    --green-dark: #063d1b;
    --orange: #e8590c;
    --orange-dark: #c44a08;
    --sun: #f6c445;
    --ink: #1b2420;
    --muted: #5b6862;
    --line: #e3e8e4;
    --bg: #ffffff;
    --tint: #f5f8f3;
    --surface: #ffffff;
    --header-bg: rgba(255, 255, 255, .92);
    --field-bg: #ffffff;
    --field-line: #cfd8d2;
    --link: #0b5d2a;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 8px 24px rgba(16, 40, 24, .06);
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.65 var(--font-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0 0 1em; }

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: .6em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent; font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .8); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--green-dark); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(0, 0, 0, .04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6em; text-decoration: none; }
.brand-mark { height: 40px; width: auto; }
.brand-word { font: 700 1.5rem var(--font-head); letter-spacing: -.01em; }
.brand-word .g { color: var(--green); }
.brand-word .o { color: var(--orange); }
.site-nav { display: flex; align-items: center; gap: 1.8em; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--link); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(6, 61, 27, .92) 0%, rgba(6, 61, 27, .75) 45%, rgba(6, 61, 27, .25) 100%); }
.hero-content { position: relative; padding: clamp(80px, 14vw, 160px) 0; max-width: 720px; margin-left: max(20px, (100% - 1140px) / 2); }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--sun); }
.hero .lead { font-size: 1.15rem; color: rgba(255, 255, 255, .9); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

/* Sections */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-tint { background: var(--tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3em; }

.cards { display: grid; gap: 24px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.step { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(11, 93, 42, .1); color: var(--green); font-weight: 700; margin-bottom: 1em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split-text p, .prose { color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

/* Portals */
.portal { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.portal:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(16, 40, 24, .12); }
.portal:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.portal img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.portal-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 22px; }
.portal-body strong { font-size: 1.05rem; }
.portal-body strong::after { content: " \2192"; color: var(--orange); }
.portal-body span { color: var(--muted); font-size: .9rem; }

/* Contact */
.contact-list { display: grid; grid-template-columns: max-content 1fr; gap: .5em 1.5em; margin: 2em 0 0; }
.contact-list dt { font-weight: 600; }
.contact-list dd { margin: 0; color: var(--muted); }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .92rem; }
.form .opt { color: var(--muted); font-weight: 400; }
.form input, .form textarea { font: inherit; padding: .75em .9em; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field-bg); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(11, 93, 42, .15); }
.form .btn { justify-self: start; }
.notice { padding: .8em 1em; border-radius: 10px; margin: 0; font-weight: 500; }
.notice.ok { background: #e6f4ea; color: var(--green-dark); }
.notice.err { background: #fdecea; color: #a12a1a; }

/* Footer */
.site-footer { background: var(--green-dark); color: rgba(255, 255, 255, .75); padding: 56px 0 28px; }
.site-footer .brand-word .g { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-inner p { margin: .3em 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.5em; align-items: center; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.copy { padding-top: 20px; font-size: .85rem; }

/* Responsive */
@media (max-width: 960px) {
    .cards.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .site-nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; display: none; }
    .site-nav.open { display: flex; }
    .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .site-nav .btn { margin-top: 14px; }
    .cards.three, .split { grid-template-columns: 1fr; }
    .hero-media::after { background: rgba(6, 61, 27, .82); }
}
@media (max-width: 520px) {
    .cards.four { grid-template-columns: 1fr; }
    .brand-mark { height: 32px; }
    .hero-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Link to the Amakobe family site */
.family-link { margin-top: .8em !important; font-size: .9rem; }
.family-link a { color: var(--sun) !important; font-weight: 600; }

/* ---------- Dark mode (default) ----------
   <html data-theme="dark"> is set before the page paints (see the inline script in <head>).
   Visitors can switch with the header toggle; their choice is remembered. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e7eee9;
    --muted: #a7b6ad;
    --line: #2b3832;
    --bg: #0e1512;
    --tint: #121c17;
    --surface: #17221c;
    --header-bg: rgba(14, 21, 18, .92);
    --field-bg: #0f1814;
    --field-line: #3a4a42;
    --link: #6fd39a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}
:root[data-theme="dark"] .brand-word .g { color: #6fd39a; }
:root[data-theme="dark"] .step { background: rgba(111, 211, 154, .14); color: #6fd39a; }
:root[data-theme="dark"] .notice.ok { background: #143323; color: #bdeccd; }
:root[data-theme="dark"] .notice.err { background: #3a1914; color: #ffc9bf; }
:root[data-theme="dark"] .site-footer { background: #08100c; }
:root[data-theme="dark"] .form input:focus, :root[data-theme="dark"] .form textarea:focus { border-color: #6fd39a; box-shadow: 0 0 0 3px rgba(111, 211, 154, .2); }
:root[data-theme="dark"] .split-media img, :root[data-theme="dark"] .portal img { filter: brightness(.9); }
:root[data-theme="dark"] .nav-toggle span { background: var(--ink); }

.theme-toggle { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: .45em .9em; font: 500 .85rem var(--font-body); cursor: pointer; }
.theme-toggle:hover { border-color: var(--link); color: var(--link); }
.theme-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
