/* Northern Wairoa Vegetable Growers Association — site styles
   Colours come from the NWVGA logo: leaf green + kūmara purple. */

:root {
  --green: #067f17;
  --green-dark: #04601a;
  --green-tint: #e8f3e6;
  --purple: #4b004e;
  --purple-tint: #f3eaf1;
  --soil: #2b2219;
  --cream: #faf7f0;
  --paper: #ffffff;
  --ink: #26221d;
  --muted: #6a6158;
  --line: #e4ddd0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 34, 25, .06), 0 6px 20px rgba(43, 34, 25, .07);
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 18px/1.65 var(--sans);
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--serif); color: var(--purple); line-height: 1.15; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--purple); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand img { width: 230px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--green-tint); color: var(--green-dark); }
.nav a[aria-current="page"] { background: var(--purple); color: #fff; }
.nav .fb { display: inline-flex; padding: 8px; margin-left: 4px; }
.nav .fb svg { width: 20px; height: 20px; fill: #1877f2; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; }

@media (max-width: 1040px) {
  .brand img { width: 190px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero { padding: 0; position: relative; color: #fff; background: var(--soil) url("img/hero.jpg") center 60% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 20, 12, .82) 0%, rgba(30, 20, 12, .55) 55%, rgba(30, 20, 12, .15) 100%); }
.hero .wrap { position: relative; padding-top: clamp(64px, 11vw, 140px); padding-bottom: clamp(64px, 11vw, 140px); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { font-size: 1.2rem; max-width: 38ch; color: #f4efe6; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: #cfe8c9; margin-bottom: 14px; }
.page-hero { background: var(--purple); color: #fff; padding: 0; }
.page-hero .wrap { padding-top: 56px; padding-bottom: 52px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: #eadcec; margin: .6em 0 0; font-size: 1.15rem; max-width: 60ch; }
.page-hero .eyebrow { color: #d9c2dc; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; font-family: var(--sans); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green-tint); }

/* ---------- Sections ---------- */
section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--paper); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--cream); box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-tint); color: var(--green); margin-bottom: 16px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- News ---------- */
.post-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(43, 34, 25, .08), 0 14px 32px rgba(43, 34, 25, .12); color: inherit; }
.post-card .thumb { aspect-ratio: 16 / 9; background: var(--green-tint); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb.contain img { object-fit: contain; padding: 18px; background: #fff; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card h3 { font-size: 1.2rem; margin: 0; }
.post-card p { color: var(--muted); font-size: 16px; margin: 0; }
.meta { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--purple-tint); color: var(--purple); }

/* ---------- Article ---------- */
.article { padding-top: 48px; }
.article .meta { margin-bottom: 8px; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.article .banner { border-radius: var(--radius); margin: 28px 0 32px; border: 1px solid var(--line); background: #fff; }
.article h2 { font-size: 1.45rem; margin-top: 1.6em; }
.article ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.article li { margin-bottom: .35em; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 1.6em; }
.facts dt { font-weight: 700; color: var(--purple); }
.facts dd { margin: 0; }
.downloads { display: grid; gap: 10px; margin: 1em 0 1.6em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.gallery img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.back { display: inline-block; margin-top: 32px; font-weight: 600; }

/* ---------- Document list (Research + downloads) ---------- */
.doc { display: flex; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: inherit; }
.doc:hover { border-color: var(--green); color: inherit; }
.doc .ficon { flex: none; width: 44px; height: 52px; border-radius: 6px; background: var(--purple-tint); color: var(--purple); font: 700 12px var(--sans); display: grid; place-items: center; }
.doc .dtext { flex: 1; min-width: 0; }
.doc strong { display: block; line-height: 1.35; color: var(--ink); }
.doc small { color: var(--muted); font-size: 15px; }
.doc .dl { flex: none; color: var(--green); font-weight: 700; font-size: 15px; }
@media (max-width: 560px) { .doc .dl { display: none; } }

/* ---------- People ---------- */
.person { text-align: left; }
.person .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font: 600 20px var(--serif); margin-bottom: 14px; }
.person .role { color: var(--green); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.person h3 { margin: 2px 0 0; }
.committee { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.committee li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.committee li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }

/* ---------- Links / partners ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; align-items: center; }
.partners a { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; height: 120px; }
.partners a:hover { border-color: var(--green); }
.partners img { max-height: 92px; width: auto; object-fit: contain; }
.link-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 0; overflow: hidden; }
.link-card:hover { border-color: var(--green); color: inherit; }
.link-card .logo { background: #fff; height: 150px; display: grid; place-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.link-card .logo img { max-height: 110px; width: auto; object-fit: contain; }
.link-card .body { padding: 20px 22px 22px; }
.link-card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.link-card p { color: var(--muted); font-size: 16px; margin: 0 0 8px; }
.link-card .url { color: var(--green); font-weight: 600; font-size: 15px; }

/* ---------- CTA band ---------- */
.cta { background: var(--green); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 .3em; }
.cta p { margin: 0; color: #e3f2df; font-size: 1.1rem; max-width: 56ch; }
.cta .btn { background: #fff; color: var(--green-dark); }
.cta .btn:hover { background: var(--cream); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form label { font-weight: 700; display: block; margin-bottom: 6px; }
.form input, .form textarea { width: 100%; font: 17px var(--sans); padding: 12px 14px; border: 1px solid #cfc6b6; border-radius: 10px; background: #fff; color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 3px solid var(--green-tint); border-color: var(--green); }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list strong { display: block; color: var(--purple); }

/* ---------- Footer ---------- */
.site-footer { background: var(--soil); color: #d9d0c3; padding: 56px 0 28px; font-size: 16px; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--serif); color: #fff; font-size: 1.1rem; margin: 0 0 12px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.footer-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.footer-logo img { width: 190px; }
.fine { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: #a99d8d; }

/* Logos that are made for dark backgrounds (e.g. BSI) */
.partners a.dark, .link-card .logo.dark { background: #00424a; border-color: #00424a; }
.year { font-size: 1.15rem; color: var(--green-dark); margin: 28px 0 10px; }
