/* Nutri-Aid Trust — design tokens + styles. Edit tokens first; everything keys off them. */
:root {
  --forest-900: #0c2417;
  --forest-800: #12351f;
  --forest-700: #1b4a2c;
  --leaf: #5aa81e;          /* brand green (logo) */
  --leaf-soft: #cfe6b4;
  --crimson: #c00000;       /* brand red (logo) */
  --crimson-dark: #9a0b17;
  --cream: #f9f3e8;
  --sand: #efe6d4;
  --ink: #15201a;
  --ink-soft: #46544b;
  --white: #fff;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(12, 36, 23, .45);
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.015em; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--s5)); margin-inline: auto; }
.eyebrow { font: 700 .78rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--crimson); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.on-dark .eyebrow { color: var(--leaf-soft); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 58ch; }
.on-dark .lede { color: rgba(255,255,255,.8); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; min-height: 48px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--crimson); color: var(--white); }
.btn-primary:hover { background: var(--crimson-dark); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--forest-900); }
.btn-dark { background: var(--forest-900); color: var(--white); }
.btn-dark:hover { background: var(--forest-700); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.nav { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: 6px max(20px, calc((100% - var(--wrap)) / 2)); width: 100%; }
/* Glass lives on a pseudo-element so the mobile menu overlay (position: fixed) isn't trapped by backdrop-filter */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0; background: rgba(249,243,232,.72); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-bottom: 1px solid rgba(255,255,255,.55); box-shadow: 0 10px 30px -14px rgba(0,0,0,.5); transition: background .3s; }
.scrolled .nav::before { background: rgba(249,243,232,.86); }
@supports not (backdrop-filter: blur(1px)) { .nav::before { background: rgba(249,243,232,.96); } }
.brand img { height: 88px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--s6); list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: .95rem; position: relative; padding: 6px 0; color: var(--ink); }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--leaf); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:not(.btn):hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links .btn { color: var(--white); padding: 10px 22px; min-height: 44px; }
.menu-btn { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(12,36,23,.08); cursor: pointer; position: relative; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { position: absolute; left: 13px; width: 22px; height: 2px; background: var(--forest-900); content: ""; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn span { top: 23px; } .menu-btn span::before { left: 0; top: -7px; } .menu-btn span::after { left: 0; top: 7px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: calc(100svh + 72px); display: grid; align-items: end; color: var(--white); background: var(--forest-900); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: -8% 0; z-index: -3; background: url("../img/field.jpg") center/cover; will-change: transform; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(12,36,23,.55) 0%, rgba(12,36,23,.35) 35%, rgba(12,36,23,.92) 100%), linear-gradient(90deg, rgba(12,36,23,.7), transparent 70%); }
.hero-rows { position: absolute; inset: 0; z-index: -1; background: url("../img/rows.svg") center bottom/cover; pointer-events: none; }
.hero-inner { padding: 150px 0 calc(var(--s8) + 72px); display: grid; gap: var(--s6); }
.hero h1 { font-size: clamp(2.7rem, min(7.2vw, 11.5vh), 6rem); max-width: 14ch; font-weight: 400; }
.hero h1 em { font-style: italic; color: var(--leaf-soft); }
.hero .lede { color: rgba(255,255,255,.88); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-badge { position: absolute; right: 4vw; bottom: 150px; width: 128px; height: 128px; animation: spin 28s linear infinite; opacity: .9; }
.hero-badge text { font: 700 11.5px var(--font-body); letter-spacing: .24em; fill: var(--leaf-soft); text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; width: 1px; height: 52px; background: linear-gradient(var(--white), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Load-in */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Stats (glass band over hero) */
.stats { position: relative; margin-top: -72px; z-index: 5; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--forest-800); color: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: var(--s6) var(--s5); border-left: 1px solid rgba(255,255,255,.12); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 500 clamp(2rem, 3.4vw, 3rem)/1 var(--font-display); color: var(--white); font-variant-numeric: tabular-nums; }
.stat b i { font-style: normal; color: var(--leaf); }
.stat > span { display: block; margin-top: var(--s2); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 700; }

/* Sections */
section { position: relative; }
.section { padding: var(--s9) 0; }
.section-head { display: grid; gap: var(--s4); margin-bottom: var(--s7); max-width: 760px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }

/* Story */
.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s8); align-items: center; }
.story h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin: var(--s4) 0 var(--s5); }
.story p + p { margin-top: var(--s4); }
.story .btn { margin-top: var(--s6); }
.collage { position: relative; aspect-ratio: 4/5; max-width: 520px; justify-self: center; width: 100%; }
.collage .a { position: absolute; inset: 0 14% 12% 0; border-radius: var(--radius) var(--radius) 200px var(--radius); background: url("../img/training.jpg") center/cover; box-shadow: var(--shadow); }
.collage .b { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--crimson); color: var(--white); display: grid; place-items: center; text-align: center; padding: var(--s4); font: 500 1rem/1.2 var(--font-display); box-shadow: var(--shadow); }
.collage .b strong { display: block; font-size: 2.6rem; font-weight: 500; }
.collage .leaf { position: absolute; left: -22px; bottom: 8%; width: 84px; color: var(--leaf); }

/* Expertise */
.expertise { background: var(--forest-900); color: var(--white); overflow: hidden; }
.contours { position: absolute; inset: 0; background: url("../img/contours.svg") center/cover; pointer-events: none; }
.pillars { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s4); position: relative; }
.pillar { grid-column: span 2; padding: var(--s6); border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); transition: transform .35s var(--ease), background .35s, border-color .35s; }
.pillar:nth-child(4), .pillar:nth-child(5) { grid-column: span 3; }
.pillar:hover { transform: translateY(-6px); background: rgba(255,255,255,.09); border-color: var(--leaf); }
.pillar .no { font: 400 .85rem var(--font-display); color: var(--leaf); letter-spacing: .1em; }
.pillar svg { width: 44px; height: 44px; color: var(--leaf-soft); margin: var(--s4) 0; }
.pillar h3 { font-size: 1.5rem; margin-bottom: var(--s3); }
.pillar p { color: rgba(255,255,255,.75); font-size: .98rem; }

/* Value chain diagram */
.chain { background: var(--sand); }
.chain-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--s8); align-items: center; }
.chain h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: var(--s4) 0; }
.chain svg { width: 100%; height: auto; }
.flow { stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.node-label { font: 700 13px var(--font-body); fill: var(--forest-900); }
.node-sub { font: 500 11px var(--font-body); fill: var(--ink-soft); }

/* Marquee */
.marquee { background: var(--crimson); color: var(--white); overflow: hidden; padding: var(--s4) 0; }
.marquee-track { display: flex; gap: var(--s7); width: max-content; animation: marquee 40s linear infinite; font: 400 1.5rem var(--font-display); font-style: italic; white-space: nowrap; }
.marquee-track span::after { content: "✦"; margin-left: var(--s7); font-style: normal; color: var(--leaf-soft); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* CTA */
.cta { background: var(--forest-800); color: var(--white); text-align: center; overflow: hidden; }
.cta .wrap { display: grid; gap: var(--s5); justify-items: center; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); max-width: 18ch; }
.cta h2 em { color: var(--leaf-soft); }

/* Footer */
.site-footer { background: var(--forest-900); color: rgba(255,255,255,.75); padding: var(--s8) 0 var(--s5); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s7); padding-bottom: var(--s7); border-bottom: 1px solid rgba(255,255,255,.14); }
.foot-grid img { height: 96px; width: auto; background: var(--cream); border-radius: 10px; padding: 8px 12px; margin-bottom: var(--s4); }
.foot-grid h4 { margin: 0 0 var(--s4); color: var(--white); font: 700 .78rem var(--font-body); letter-spacing: .18em; text-transform: uppercase; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.foot-grid a { text-decoration: none; } .foot-grid a:hover { color: var(--leaf-soft); text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); padding-top: var(--s5); font-size: .85rem; }

/* Inner pages */
.page-hero { background: var(--forest-900); color: var(--white); padding: 170px 0 var(--s8); position: relative; overflow: hidden; isolation: isolate; }
.page-hero .contours { z-index: -1; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin: var(--s4) 0; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s6); }
.chip { padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--forest-900); font-weight: 700; font-size: .85rem; background: none; cursor: pointer; min-height: 40px; font-family: inherit; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--forest-900); color: var(--white); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 rgba(12,36,23,.08), var(--shadow); transition: transform .35s var(--ease); }
.card:hover { transform: translateY(-6px); }
.slot { aspect-ratio: 4/3; display: grid; place-items: center; text-align: center; padding: var(--s4); background: repeating-linear-gradient(135deg, var(--sand) 0 14px, var(--cream) 14px 28px); color: var(--ink-soft); font: 700 .78rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.slot.portrait { aspect-ratio: 3/4; }
.slot.square { aspect-ratio: 1; }
.card-body { padding: var(--s5); display: grid; gap: var(--s2); }
.card-body h3 { font-size: 1.35rem; }
.tag { justify-self: start; font: 700 .7rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--leaf-soft); color: var(--forest-900); }
.card-body p { font-size: .95rem; color: var(--ink-soft); }
.masonry { columns: 3; column-gap: var(--s4); }
.masonry > * { break-inside: avoid; margin-bottom: var(--s4); border-radius: var(--radius); overflow: hidden; }
.note { margin-top: var(--s7); padding: var(--s5); border: 1.5px dashed var(--ink-soft); border-radius: var(--radius); color: var(--ink-soft); font-size: .92rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.12); }
  .story, .chain-wrap { grid-template-columns: 1fr; gap: var(--s7); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar, .pillar:nth-child(4), .pillar:nth-child(5) { grid-column: auto; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-badge { display: none; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { padding: 4px 16px; }
  .brand img { height: 66px; }
  .nav-links { position: fixed; inset: 0; background: var(--cream); flex-direction: column; justify-content: center; gap: var(--s5); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: .35s var(--ease); }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { font: 400 2rem var(--font-display); }
  .nav-links .btn { font: 700 1rem var(--font-body); color: var(--white); }
  .menu-btn { z-index: 60; position: relative; }
  .brand { position: relative; z-index: 60; }
}
@media (max-width: 600px) {
  .section { padding: var(--s8) 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
  .stat:nth-child(4) { border-left: 1px solid rgba(255,255,255,.12); }
  .stat:last-child { grid-column: span 2; }
  .pillars, .grid-3 { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .foot-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .hero-inner { padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rise, .reveal { opacity: 1; transform: none; }
}

/* Leadership */
.person .avatar { aspect-ratio: 4/5; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 30% 20%, var(--forest-700), var(--forest-900)); }
.person .avatar::before { content: ""; position: absolute; inset: 0; background: url("../img/contours.svg") center/cover; opacity: .9; }
.person .avatar span { position: relative; font: 400 clamp(4rem, 9vw, 6.5rem)/1 var(--font-display); font-style: italic; color: var(--leaf-soft); }
.person .card-body { gap: var(--s3); }
.person h3 { font-size: 1.5rem; }
.person .tag { background: var(--forest-900); color: var(--white); letter-spacing: .08em; text-transform: none; font-size: .78rem; }
.note code { font-size: .88em; background: var(--sand); padding: 1px 6px; border-radius: 4px; }
