/*
  VOICE   Confident, precise B2B exporter: calm, premium, no hype.
  IDEA    An export dossier from a packhouse: graded lines, tags, routes.
  PICTURE Real Afrigreen pouches over a large sprout line drawing; route map.
  COLOUR  Forest night greens, cream type, harvest gold for actions.
  TYPE    Fraunces display, Inter body, IBM Plex Mono for labels.
*/

/* Fonts are hosted with the site (SIL Open Font License, see assets/fonts) */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/fraunces-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('../fonts/fraunces-latin-opsz-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg-0: #0c2116;
  --bg-1: #123420;
  --bg-2: #1a4429;
  --line: rgba(243, 239, 225, 0.12);
  --line-strong: rgba(243, 239, 225, 0.22);
  --brand: #5c8a3f;
  --brand-light: #8fb46b;
  --gold: #e3b24c;
  --gold-soft: #f0cf83;
  --cream: #f3efe1;
  --muted: #aebfa1;
  --danger: #ff9b8a;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --radius: 6px;
  --header-h: 72px;
  --container: 1200px;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--cream);
  font: 16px/1.6 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; color: var(--cream); margin: 0; text-wrap: balance; }
p { margin: 0; }

.container { width: min(100% - 2 * max(5vw, 20px), var(--container)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: #12240f; padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  font: 600 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-gold { background: var(--gold); color: #12240f; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-gold:disabled { opacity: .65; cursor: wait; }
.btn-outline { border-color: var(--line-strong); color: var(--cream); background: transparent; }
.btn-outline:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn-ghost { color: var(--muted); padding-inline: 8px; }
.btn-ghost:hover { color: var(--cream); }
.btn-block { width: 100%; }

/* ---------- Labels ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  font: 400 12.5px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); flex: none; }
.tag {
  display: inline-block; padding: 6px 10px; border: 1px solid rgba(227, 178, 76, .45); border-radius: 3px;
  font: 400 11.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-soft);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(12, 33, 22, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 132px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .02em; padding: 8px 0; }
.site-nav a:not(.btn):hover { color: var(--cream); }
.nav-cta { min-height: 40px; padding: 8px 18px; font: 500 13px/1 var(--font-mono); letter-spacing: .04em; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 78% 40%, rgba(92, 138, 63, .22), transparent 70%);
}
.hero-leaf {
  position: absolute; right: -4%; top: -10%; width: min(62vw, 760px); height: auto; pointer-events: none;
  fill: none; stroke: var(--brand); stroke-width: 2; opacity: .38;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 78%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.04; letter-spacing: -.01em; margin-bottom: 24px; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--brand-light); }
.lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 520px; justify-self: end; width: 100%; }
.hero-photo { position: absolute; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo--back { width: 52%; aspect-ratio: 4 / 5; left: 4%; top: 2%; transform: rotate(-4deg); opacity: .9; }
.hero-photo--front { width: 58%; aspect-ratio: 4 / 5; right: 2%; bottom: 0; transform: rotate(2.5deg); }

.stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(48px, 6vw, 80px) 0 0; border-top: 1px solid var(--line); }
.stats > div { padding: 24px 24px 8px 0; }
.stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats dt { font: 500 clamp(30px, 3.4vw, 40px)/1 var(--font-display); color: var(--cream); margin-bottom: 8px; }
.stats dd { margin: 0; font: 400 13px/1.45 var(--font-mono); color: var(--muted); letter-spacing: .02em; }

/* ---------- Dividers & sections ---------- */
.leaf-divider { display: flex; align-items: center; gap: 18px; width: min(100% - 40px, var(--container)); margin: 0 auto; }
.leaf-divider::before, .leaf-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.leaf-divider svg { width: 28px; fill: none; stroke: var(--brand-light); stroke-width: 1.4; opacity: .7; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--stack { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.section-intro { color: var(--muted); font-size: 17px; max-width: 36em; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(26, 68, 41, .28); }
.product-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(28px, 3.4vw, 44px); border-color: var(--line); border-style: solid; border-width: 0; transition: background-color .25s; }
.product-card:nth-child(odd) { border-right-width: 1px; }
.product-card:nth-child(-n + 2) { border-bottom-width: 1px; }
.product-card:hover { background: rgba(26, 68, 41, .55); }
.product-num { position: absolute; top: 28px; right: 32px; font: 400 12px/1 var(--font-mono); color: var(--muted); opacity: .7; }
.product-icon { width: 44px; height: 44px; fill: none; stroke: var(--brand-light); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.product-card h3 { font-size: 24px; line-height: 1.2; }
.product-card p { color: var(--muted); font-size: 15.5px; max-width: 32em; }
.card-link { margin-top: auto; padding-top: 10px; color: var(--gold-soft); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.card-link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Frozen range ---------- */
.frozen { margin-top: clamp(56px, 7vw, 88px); }
.frozen-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.frozen-head h3 { font-size: clamp(22px, 2.2vw, 28px); }
.mono-note { font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.pouch-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pouch { display: flex; flex-direction: column; background: var(--bg-1); }
.pouch + .pouch { border-left: 1px solid var(--line); }
.pouch img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.pouch h4 { font: 500 12.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); text-align: center; padding: 16px 10px; border-top: 1px solid var(--line); }
.pouch details { border-top: 1px solid var(--line); margin-top: auto; }
.pouch summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px; font: 500 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft);
}
.pouch summary::-webkit-details-marker { display: none; }
.pouch summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.pouch details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.pouch details p { padding: 0 16px 8px; font-size: 14px; color: var(--muted); }
.pouch details p:last-child { padding-bottom: 18px; }
.pouch .howto { color: var(--cream); font-size: 13px; }
.frozen-cta { margin-top: 22px; color: var(--muted); font-size: 15px; }
.frozen-cta a { color: var(--gold-soft); font-weight: 600; text-decoration: none; white-space: nowrap; }
.frozen-cta a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 36px; }
.why-item { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.why-label { font: 400 12.5px/1.4 var(--font-mono); color: var(--gold-soft); letter-spacing: .04em; margin-bottom: 14px; }
.why-item h3 { font-size: 20px; line-height: 1.25; margin-bottom: 12px; }
.why-item p:last-child { color: var(--muted); font-size: 15px; }

/* ---------- Markets ---------- */
.markets-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.markets-copy h2 { margin-bottom: 18px; }
.route-list { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.route-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.route-list strong { font-weight: 600; font-size: 15.5px; }
.route-list span:last-child { font: 400 12.5px/1.3 var(--font-mono); color: var(--muted); text-align: right; }
.route-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-light); }
.route-dot--origin { background: var(--gold); }

.map { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-0); }
.map img { width: 100%; }
.map-pin { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--gold-soft); box-shadow: 0 0 0 4px rgba(240, 207, 131, .22); }
.map-pin::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--gold-soft); animation: pulse 2.4s ease-out infinite; }
.map-pin--origin { background: var(--gold); }
.map-label {
  position: absolute; transform: translate(14px, -50%); white-space: nowrap;
  font: 500 clamp(10px, 1.1vw, 12px)/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream);
  text-shadow: 0 1px 2px var(--bg-0), 0 0 8px var(--bg-0);
}
.map-label small { display: block; margin-top: 3px; text-transform: none; letter-spacing: .04em; color: var(--muted); font-size: .9em; }
.map-label--left { transform: translate(calc(-100% - 14px), calc(-100% - 6px)); }
@keyframes pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }

/* ---------- Contact & form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-copy h2 { margin-bottom: 20px; }
.contact-list { margin: 36px 0 0; }
.contact-list > div { padding: 18px 0; border-top: 1px solid var(--line); }
.contact-list dt { font: 400 11.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-list dd { margin: 0; font-size: 16px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold-soft); }

.quote-card { background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: clamp(24px, 3.5vw, 40px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); }
.quote-card h3 { font-size: 24px; margin-bottom: 8px; }
.form-note { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.req { color: var(--gold); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; margin-bottom: 24px; }
.field--full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; font: 500 11.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius);
  background: rgba(12, 33, 22, .7); border: 1px solid var(--line-strong); color: var(--cream);
  font: 16px/1.4 var(--font-body); transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23aebfa1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
.field select option { background: var(--bg-1); color: var(--cream); }
.field input::placeholder, .field textarea::placeholder { color: rgba(174, 191, 161, .55); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(243, 239, 225, .35); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-soft); background-color: rgba(12, 33, 22, .95); }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.field-error { min-height: 0; font-size: 13px; color: var(--danger); margin-top: 6px; }
.field-error:empty { display: none; }
.field.flash select { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px rgba(227, 178, 76, .5); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin-top: 14px; font-size: 14.5px; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status a { color: var(--gold-soft); }

.form-success { text-align: center; padding: 28px 8px; }
.form-success:focus { outline: none; }
.form-success svg { width: 56px; height: 56px; margin: 0 auto 18px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { margin-bottom: 12px; }
.form-success p { color: var(--muted); margin: 0 auto 24px; max-width: 30em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-inner img { width: 104px; opacity: .85; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--cream); }
.footer-meta { width: 100%; font: 400 12px/1.6 var(--font-mono); color: var(--muted); opacity: .8; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 22px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 18px; height: 1.5px; background: var(--cream); position: relative; transition: transform .2s, background-color .2s; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-open .nav-toggle-bar { background: transparent; }
  .nav-open .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px max(5vw, 20px) 24px; background: var(--bg-0); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 18px; min-height: 48px; }

  .hero-grid, .markets-grid, .contact-grid, .section-head { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { justify-self: center; max-width: 440px; }
  .hero-leaf { width: 120vw; right: -40%; top: 10%; opacity: .25; }
  .section-head { align-items: start; }

  .pouch-row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border: 0; border-radius: 0; gap: 12px;
    padding-bottom: 8px; -webkit-overflow-scrolling: touch;
  }
  .pouch { flex: 0 0 min(62%, 260px); scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .pouch + .pouch { border-left: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .product-card { border-right-width: 0 !important; border-bottom-width: 1px !important; }
  .product-card:last-child { border-bottom-width: 0 !important; }
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div, .stats > div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 16px; }
  .stats dt { margin: 0; min-width: 2.6em; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .route-list li { grid-template-columns: auto minmax(0, 1fr); }
  .route-list span:last-child { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
