/* ==========================================================================
   RuWealth — Design Tokens
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand greens (from RuWealth mark) */
  --forest-900: #0B2E22;
  --forest-800: #0E3B2B;
  --forest-700: #145238;
  --forest-600: #1B6B44;
  --forest-500: #29874F;
  --lime-400: #7BC142;

  /* Brand navy + gold (from Invest Rural SA mark) */
  --navy-900: #142A34;
  --navy-700: #1E3E4B;
  --gold-600: #A3822F;
  --gold-500: #BF9A3D;
  --gold-400: #D4B65C;

  /* Neutrals */
  --paper: #FAF8F2;
  --paper-alt: #F2EEE1;
  --surface: #FFFFFF;
  --ink: #16221B;
  --ink-muted: #55645B;
  --ink-faint: #8B978E;
  --border: #E2DECE;
  --border-dark: rgba(255, 255, 255, 0.12);

  /* Type */
  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(11, 46, 34, 0.06), 0 1px 3px rgba(11, 46, 34, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 46, 34, 0.10);
  --shadow-lg: 0 20px 48px rgba(11, 46, 34, 0.16);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;

  --container: 1240px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, video { max-width: 100%; display: block; }
/* <picture> is only a format-negotiation wrapper around its <img> (WebP with a
   PNG fallback). display:contents removes its box so the <img> still lays out
   as a direct child of the container — keeps `height:100%`/object-fit and
   absolute-positioned media rules resolving against the real parent. */
picture { display: contents; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-900);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { color: var(--ink-muted); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

@media (max-width: 640px) {
  .container { padding-inline: var(--space-2); }
}

/* Focus states — accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest-900);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Type utilities
   ========================================================================== */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}

/* Heading scale. Only the clamp *floor* is tuned for phones — the vw term and
   ceiling are unchanged, so these render identically from ~700px up and simply
   stop bottoming out at a desktop-sized value on a 360px screen. */
.h-display {
  font-size: clamp(1.875rem, 4.4vw, 4rem);
  font-weight: 600;
}
.h-1 { font-size: clamp(1.625rem, 3.4vw, 2.9rem); }
.h-2 { font-size: clamp(1.375rem, 2.4vw, 2rem); }
.h-3 { font-size: 1.25rem; font-weight: 600; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 62ch;
}

.text-on-dark { color: #fff; }
.text-on-dark p, .text-on-dark .lede { color: rgba(255,255,255,0.78); }
.text-on-dark h1, .text-on-dark h2, .text-on-dark h3, .text-on-dark h4 { color: #fff; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
/* Buttons are nowrap by default to keep label + arrow together, but the longer
   CTAs ("Explore Our Focus Sectors") overflow a 320px screen. Let them wrap. */
@media (max-width: 400px) {
  .btn { white-space: normal; padding-inline: var(--space-3); }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn-gold:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }

.btn-outline-light {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

.btn-outline-dark {
  border-color: var(--forest-700);
  color: var(--forest-800);
}
.btn-outline-dark:hover { background: var(--forest-800); color: #fff; }

.btn-primary {
  background: var(--forest-700);
  color: #fff;
}
.btn-primary:hover { background: var(--forest-800); box-shadow: var(--shadow-md); }

.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.icon-arrow {
  width: 1em;
  height: 1em;
  transition: transform var(--dur) var(--ease);
}
.btn:hover .icon-arrow { transform: translateX(3px); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding-block: var(--space-2);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.site-header.is-solid {
  background: rgba(11, 46, 34, 0.97);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: var(--shadow-sm);
  padding-block: 0.65rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img { height: 120px; width: auto; transition: height var(--dur) var(--ease); }
.site-header.is-solid .brand img { height: 96px; }

.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.1rem;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { color: #fff; width: 26px; height: 26px; }

/* Created by main.js; inert above the drawer breakpoint so it can never affect
   the desktop layout. Declared before the media query so the block rule wins. */
.nav-scrim { display: none; }

/* Drawer breakpoint is 1100px, not the 900px used elsewhere in this file: with
   eight nav items plus the CTA the inline header needs ~1030px, so it crowds
   badly between 900 and 1100. KEEP IN SYNC with the matching width check in
   the mobile-nav block of js/main.js. */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav-main {
    position: fixed;
    /* Fixed drawer width rather than a percentage inset: a 30% inset left an
       over-wide panel on tablets and a cramped one on small phones. */
    inset: 0 0 0 auto;
    width: min(80vw, 340px);
    background: var(--forest-900);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 6.5rem var(--space-3) var(--space-4);
    gap: var(--space-4);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    box-shadow: var(--shadow-lg);
    /* The panel must scroll on its own on short/landscape screens, and must not
       chain its scroll back to the locked body behind it. */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav-main.is-open { transform: translateX(0); }
  .nav-links { flex-direction: column; align-items: stretch; gap: var(--space-1); }
  /* Block + padding gets each row to a ~44px touch target. */
  .nav-links a {
    font-size: 1.1rem;
    display: block;
    padding-block: 0.6rem;
  }
  /* Dim the page behind the open drawer so it reads as a layer, and give
     taps outside it something to land on. Sits below .site-header (z-index
     500), which is what the drawer itself stacks within. */
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(6, 16, 12, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
    z-index: 400;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  /* svh = the *small* viewport (URL bar visible), so the hero doesn't get
     taller than the usable area on mobile and shift as the bar hides/shows.
     The vh line stays as the fallback for browsers without svh. */
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--forest-900);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,20,15,0.72) 0%, rgba(8,20,15,0.58) 45%, rgba(6,16,12,0.94) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  /* Top padding must clear the fixed header's own height (logo height +
     its padding-block) so hero text never sits under the header. */
  padding-block: 11rem var(--space-6);
  width: 100%;
}
.hero-content .eyebrow { color: var(--gold-400); }
.hero-content .eyebrow::before { background: var(--gold-400); }

@keyframes hero-slide-in {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
.hero-content > * {
  opacity: 0;
  animation: hero-slide-in 900ms var(--ease) forwards;
}
.hero-content > .eyebrow { animation-delay: 300ms; }
.hero-content > .hero-title { animation-delay: 500ms; }
.hero-content > .lede { animation-delay: 700ms; }
.hero-content > .hero-actions { animation-delay: 900ms; }
.hero-content > .hero-stats { animation-delay: 1100ms; }
.hero-title {
  color: #fff;
  font-size: clamp(1.875rem, 5vw, 3.8rem);
  max-width: 16ch;
  margin-block: var(--space-2) var(--space-3);
}
.hero-content .lede { font-size: clamp(0.95rem, 1.3vw, 1.1rem); }
.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.hero-stats {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.16);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.stat .stat-num {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
}
.stat .stat-label {
  color: rgba(255,255,255,0.68);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
@media (max-width: 800px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-3); }
}

/* Smaller inner-page hero */
.page-hero {
  position: relative;
  background: var(--forest-900);
  /* Top padding must clear the fixed header's own height, same as .hero-content. */
  padding-block: 11rem var(--space-6);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(191,154,61,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(41,135,79,0.35), transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero .h-display { max-width: 22ch; font-size: clamp(1.625rem, 3.6vw, 3.2rem); }
.page-hero .lede { font-size: clamp(0.95rem, 1.3vw, 1.1rem); }
.breadcrumb {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}
.breadcrumb a:hover { color: #fff; }

/* ==========================================================================
   Sections generic
   ========================================================================== */
section { position: relative; }
.section {
  padding-block: var(--space-6);
}
.section-tight { padding-block: var(--space-5); }
/* 4.5rem of dead space top and bottom is a lot of thumb-scrolling on a phone. */
@media (max-width: 640px) {
  .section { padding-block: var(--space-5); }
  .section-tight { padding-block: var(--space-4); }
}
.section-alt { background: var(--paper-alt); }
.section-dark {
  background: var(--forest-900);
}
.section-navy { background: var(--navy-900); }

/* Full-bleed photo section with brand-toned overlay */
.section-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(9,24,18,0.88) 0%, rgba(11,46,34,0.82) 45%, rgba(9,24,18,0.93) 100%);
}

/* Frosted card for use over photo sections */
.card-glass {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  backdrop-filter: blur(6px);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.card-glass:hover { transform: translateY(-4px); background: rgba(255,255,255,0.11); }
.card-glass h3 { color: #fff; }
.card-glass p { color: rgba(255,255,255,0.78); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-5);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: var(--space-2); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Heading slide-in — same motion language as the hero */
.reveal-slide {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal-slide.is-visible { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-slide { opacity: 1; transform: none; }
}

/* ==========================================================================
   Grid / cards
   ========================================================================== */
.grid {
  display: grid;
  gap: var(--space-3);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }

.sector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.sector-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.sector-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--forest-800);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sector-icon svg { width: 26px; height: 26px; }
.sector-card { position: relative; overflow: hidden; }

/* Sector gradient treatments — shared between the homepage gallery and Sectors page */
.m-agri { background: linear-gradient(150deg, #1B6B44, #0B2E22); }
.m-hosp { background: linear-gradient(150deg, #1E3E4B, #142A34); }
.m-prop { background: linear-gradient(150deg, #29874F, #145238); }
.m-energy { background: linear-gradient(150deg, #BF9A3D, #8A6E24); }
.m-innov { background: linear-gradient(150deg, #142A34, #0B2E22); }

/* ==========================================================================
   Gallery carousel (Our Focus)
   ========================================================================== */
.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.gallery-nav { display: flex; gap: 0.6rem; flex-shrink: 0; }
.gallery-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--forest-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.gallery-arrow svg { width: 20px; height: 20px; }
.gallery-arrow:hover:not(:disabled) { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.gallery-arrow:disabled { opacity: 0.32; cursor: not-allowed; }

.gallery-track-wrap {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 0.25rem;
}
.gallery-track-wrap::-webkit-scrollbar { display: none; }
.gallery-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
}
.gallery-card {
  position: relative;
  display: block;
  flex: 0 0 300px;
  min-height: 27rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .gallery-card { flex-basis: 340px; } }
@media (min-width: 1024px) { .gallery-card { flex-basis: 380px; } }
.gallery-card-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms var(--ease);
}
.gallery-card:hover .gallery-card-media img { transform: scale(1.08); }
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,46,34,0) 0%, rgba(11,46,34,0.45) 55%, rgba(9,24,18,0.92) 100%);
}
.gallery-card-index {
  position: absolute;
  top: var(--space-2);
  left: var(--space-3);
  z-index: 2;
  font-family: var(--font-display);
  color: rgba(255,255,255,0.55);
  font-size: 1.1rem;
}
.gallery-card-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--space-3) var(--space-3) var(--space-4);
  color: #fff;
}
.gallery-card-overlay h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.6rem; }
.gallery-card-overlay p {
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gold-400);
}
.gallery-card-link svg { width: 17px; height: 17px; transition: transform var(--dur) var(--ease); }
.gallery-card:hover .gallery-card-link svg { transform: translateX(4px); }

.gallery-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: var(--space-4); }
.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gallery-dot.is-active { background: var(--forest-700); transform: scale(1.35); }

.service-col {
  border-top: 3px solid var(--forest-600);
  padding-top: var(--space-3);
}
.service-col ul { display: flex; flex-direction: column; gap: 0.8rem; margin-top: var(--space-3); }
.service-col li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--ink);
  font-size: 0.98rem;
}
.service-col li svg {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px;
  color: var(--gold-600);
}

/* Approach steps */
.approach-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  counter-reset: step;
}
@media (max-width: 900px) { .approach-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .approach-steps { grid-template-columns: 1fr; } }
.approach-step {
  border-left: 2px solid var(--border-dark);
  padding-left: var(--space-2);
  padding-block: 0.2rem var(--space-1);
}
.approach-step .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-400);
  display: block;
  margin-bottom: 0.4rem;
}
.approach-step h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.approach-step p { font-size: 0.9rem; }

/* Stat strip (light) */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-4);
}
@media (max-width: 700px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-strip .stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--forest-800);
  font-weight: 600;
}
.stat-strip .stat-label { color: var(--ink-muted); font-size: 0.88rem; margin-top: 0.2rem; }

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-6);
  align-items: center;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--space-4); }
}
/* Flips the visual order so the media sits left, for rhythm against an adjacent
   text-left .split. Source order is unchanged, and the flip is dropped once the
   grid stacks so the media never ends up below its own copy on mobile. */
.split-reverse > *:first-child { order: 2; }
.founder-role {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
}
@media (max-width: 900px) {
  .split-reverse > *:first-child { order: 0; }
}
.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/5;
  background: var(--forest-800);
}
.split-media video, .split-media img { width: 100%; height: 100%; object-fit: cover; }
/* Opt-in brand tint over a .split-media photo — same forest-gradient idiom as
   .hero-media / .sector-medallion. Weighted to the top and bottom edges so the
   subject in the middle of the frame stays readable. pointer-events:none keeps
   it from swallowing clicks on any video controls underneath. */
.split-media.has-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(11, 46, 34, 0.72) 0%,
    rgba(11, 46, 34, 0.38) 38%,
    rgba(11, 46, 34, 0.44) 62%,
    rgba(8, 20, 15, 0.88) 100%
  );
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--space-3); }
.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--forest-800);
  background: var(--surface);
}

/* Quote / vision block */
.quote-block {
  border-left: 3px solid var(--gold-500);
  padding-left: var(--space-3);
}
.quote-block p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

/* ==========================================================================
   Invest Rural SA spotlight
   ========================================================================== */
/* Featured-event card: a photo panel + copy panel side by side, with the hard
   event facts (date / venue / partner) split off into a full-width rail along
   the bottom. Keeping the facts out of the copy column is what stops the body
   from growing tall enough to stretch the photo into a cropped slab. */
.rural-spotlight {
  background: var(--navy-900);
  background-image: radial-gradient(900px 420px at 88% -10%, rgba(212,182,92,0.18), transparent 62%);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.rural-spotlight-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}
@media (max-width: 900px) { .rural-spotlight-grid { grid-template-columns: 1fr; } }

.rural-spotlight-media {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}
/* Once stacked the panel no longer has a copy column to match, so it needs an
   intrinsic ratio of its own instead of a stretch height. */
@media (max-width: 900px) {
  .rural-spotlight-media { min-height: 0; aspect-ratio: 16 / 10; }
}
.rural-spotlight-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rural-spotlight-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(15,33,41,0.62) 0%, rgba(22,50,61,0.40) 55%, rgba(20,42,52,0.80) 100%);
}

/* Date chip rides above the media's gradient veil. */
.rural-spotlight-date {
  position: absolute;
  z-index: 2;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  padding: 0.55rem 0.75rem 0.6rem;
  border-radius: var(--radius-md);
  background: rgba(20,42,52,0.72);
  border: 1px solid rgba(212,182,92,0.55);
  backdrop-filter: blur(6px);
  line-height: 1.1;
}
.rural-spotlight-date .d {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}
.rural-spotlight-date .m {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.rural-spotlight-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 640px) { .rural-spotlight-body { padding: var(--space-4) var(--space-3); } }
.rural-spotlight .eyebrow { color: var(--gold-400); }
.rural-spotlight .eyebrow::before { background: var(--gold-400); }
.rural-spotlight h2 { color: #fff; }
.rural-spotlight p { color: rgba(255,255,255,0.78); }
/* Two classes so this beats `.rural-spotlight p` on specificity without !important. */
.rural-spotlight .rural-spotlight-tagline {
  margin-top: 0.6rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-style: italic;
  color: var(--gold-400);
}
/* The body is a column flexbox, so the button needs align-self or it stretches. */
.rural-spotlight-body .btn { align-self: flex-start; margin-top: var(--space-4); }

.rural-pillars-group { margin-top: var(--space-4); }
.rural-pillars-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.rural-pillars { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.rural-pillar {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.04);
}

.rural-spotlight-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}
.rural-spotlight-rail li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: var(--space-3);
  border-left: 1px solid rgba(255,255,255,0.1);
}
.rural-spotlight-rail li:first-child { border-left: 0; }
@media (max-width: 900px) {
  .rural-spotlight-rail { grid-template-columns: 1fr; }
  .rural-spotlight-rail li { border-left: 0; border-top: 1px solid rgba(255,255,255,0.1); }
  .rural-spotlight-rail li:first-child { border-top: 0; }
}
.rural-spotlight-rail svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--gold-400);
}
.rural-spotlight-rail .k {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.rural-spotlight-rail .v {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--forest-800);
  background-image: radial-gradient(900px 400px at 90% 0%, rgba(191,154,61,0.18), transparent 60%);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; max-width: 26ch; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest-900);
  margin-bottom: 0.4rem;
}
.field .req { color: var(--gold-600); }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  min-height: 48px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--forest-600);
  box-shadow: 0 0 0 3px rgba(27,107,68,0.15);
  outline: none;
}
.field-hint { font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.3rem; }
.form-status {
  margin-top: var(--space-2);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-success { display: block; background: #EAF5EC; color: var(--forest-800); border: 1px solid #BFE3C8; }
.form-status.is-error { display: block; background: #FDEDEC; color: #7A2B23; border: 1px solid #F3C6C0; }

.contact-info-card {
  background: var(--forest-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.contact-info-card h3 { color: #fff; }
.contact-info-list { margin-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.contact-info-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.contact-info-item svg { width: 20px; height: 20px; color: var(--gold-400); flex-shrink: 0; margin-top: 2px; }
.contact-info-item a:hover { color: var(--gold-400); }
.contact-info-item p { color: rgba(255,255,255,0.78); }

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-3);
  border: 1px solid var(--border-dark);
  aspect-ratio: 16/9;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--forest-900);
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-6) var(--space-3);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
/* ==========================================================================
   Photo grid + lightbox — used by gallery.html and networks.html
   ========================================================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
/* First item runs full width as the lead image; the rest fall into pairs. */
.photo-grid > .photo-item--lead { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .photo-grid { grid-template-columns: 1fr; gap: var(--space-2); }
}

.photo-item { margin: 0; }
.photo-item-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--forest-800);
  aspect-ratio: 5 / 3;
}
.photo-item--portrait .photo-item-link { aspect-ratio: 4 / 5; }
.photo-item-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.photo-item-link:hover img { transform: scale(1.04); }
.photo-item-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,46,34,0) 55%, rgba(8,20,15,0.55) 100%);
  pointer-events: none;
}
.photo-item figcaption {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* Lightbox. The markup is built by main.js; without JS the .photo-item-link
   anchors simply resolve to the full-size image, so the grid still works. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  background: rgba(6, 16, 12, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(94vw, 1200px);
  max-height: 78vh;
  max-height: 78svh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  text-align: center;
  max-width: 62ch;
}
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 20, 15, 0.6);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lightbox-btn:hover { background: rgba(41, 135, 79, 0.8); border-color: var(--gold-500); }
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-close { top: var(--space-3); right: var(--space-3); }
.lightbox-prev { left: var(--space-2); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-2); top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .lightbox-prev { left: var(--space-1); }
  .lightbox-next { right: var(--space-1); }
}

/* Relationship pillars — networks.html */
.network-pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  height: 100%;
}
.network-pillar h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.network-pillar p { font-size: 0.94rem; line-height: 1.6; }
.network-pillar .pillar-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.6rem;
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-brand img { height: 46px; width: auto; margin-bottom: var(--space-2); }
.footer-brand p { color: rgba(255,255,255,0.62); max-width: 34ch; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a:hover { color: #fff; }
.footer-col .contact-info-item p, .footer-col .contact-info-item a { font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-size: 0.82rem;
}
.footer-bottom a:hover { color: #fff; }
.social-links { display: flex; gap: 0.7rem; }
.social-links a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.social-links a:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }
.social-links svg { width: 17px; height: 17px; }

/* ==========================================================================
   Scroll-expand hero (ScrollExpandMedia pattern) — shared across pages
   ========================================================================== */
.scroll-expand {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--forest-900);
}
.scroll-expand-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: opacity;
}
.scroll-expand-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,20,15,0.5) 0%, rgba(8,20,15,0.78) 100%);
}
.scroll-expand-stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-expand-media {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  width: 300px;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 95vw;
  max-height: 82vh;
  max-height: 82svh;
  box-shadow: 0 30px 80px rgba(6,16,12,0.45);
  will-change: width, height;
}
.scroll-expand-media img, .scroll-expand-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scroll-expand-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,20,15,0.55);
}
.scroll-expand-media-copy {
  position: absolute;
  inset-inline: 0;
  bottom: var(--space-3);
  z-index: 2;
  text-align: center;
  padding-inline: var(--space-3);
}
.scroll-expand-date {
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.scroll-expand-hint { color: rgba(255,255,255,0.78); font-size: 0.92rem; }

.scroll-expand-title {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.scroll-expand-title .word { display: inline-block; will-change: transform; }

.scroll-expand-intro {
  position: relative;
  z-index: 1;
  padding-block: var(--space-6);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.scroll-expand-intro .eyebrow { color: var(--gold-400); }
.scroll-expand-intro .eyebrow::before { background: var(--gold-400); }
.scroll-expand.is-expanded .scroll-expand-intro { opacity: 1; transform: translateY(0); }

/* Center logo badge — optional creative overlay on the expanding media */
.scroll-expand-badge {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  will-change: opacity, transform;
}
.scroll-expand-badge-inner {
  width: min(34vw, 190px);
  height: min(34vw, 190px);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212,182,92,0.45);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 60px rgba(212,182,92,0.25), 0 20px 50px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14%;
}
.scroll-expand-badge-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4));
}

@media (prefers-reduced-motion: reduce), (max-width: 560px) {
  .scroll-expand-media { position: static; transform: none; width: min(92vw, 640px) !important; height: min(60svh, 420px) !important; margin-inline: auto; }
  .scroll-expand-stage { flex-direction: column; gap: var(--space-4); padding-block: var(--space-6); min-height: auto; }
  .scroll-expand-title { position: static; }
  .scroll-expand-title .word { transform: none !important; }
  .scroll-expand-intro { opacity: 1; transform: none; padding-top: 0; }
  .scroll-expand-badge { opacity: 1; transform: none; position: absolute; }
}

/* ==========================================================================
   Misc
   ========================================================================== */
