/* ============================================================
   WCS-FARM — Base (reset, tipografia, layout)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Mobile: guided section snap (proximity = não prende o scroll em seções altas) */
@media (max-width: 767px) {
  html { scroll-snap-type: y proximity; }
  section {
    scroll-snap-align: start;
    /* 'always' nas seções curtas melhora o ritmo de scroll em mobile */
    scroll-snap-stop: normal;
  }
  /* Seções de tamanho viewport recebem snap mais dramático */
  .hero, .goals {
    scroll-snap-stop: always;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: 1.65;
  color: var(--c-body);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-900); }
h2 { font-size: var(--fs-700); line-height: 1.18; }
h3 { font-size: var(--fs-600); line-height: 1.2; }

/* Títulos de seção e hero em MAIÚSCULAS (subtítulos de componente seguem caixa normal) */
h1, h2, .hero__title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

p { text-wrap: pretty; }
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-water);
}
::selection { background: color-mix(in srgb, var(--color-primary) 22%, transparent); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3rem, 8vw, 8rem); }
/* Densidade mobile: subtítulos de seção menores */
@media (max-width: 600px) { :root { --fs-700: clamp(1.15rem, 0.95rem + 0.8vw, 1.45rem); } }
.section--tint { background: var(--c-surface-2); }
.section--green {
  background: linear-gradient(160deg, var(--c-green-800), var(--c-green-900));
  color: #dfe9e1;
}
.section--green h2, .section--green h3 { color: #fff; }

/* ---------- Eyebrow / section heading ---------- */
.eyebrow {
  display: inline-flex; align-items: flex-start; gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-primary);
  /* mais ar abaixo do rótulo: separa claramente o contexto do título */
  margin-bottom: clamp(1rem, 2vw, 1.45rem);
}
.eyebrow::before {
  content: ""; width: 30px; height: 2px; border-radius: 2px;
  margin-top: 0.5em; flex: none;        /* alinha o traço à 1ª linha quando o texto quebra */
  background: var(--color-accent);
}
.section--green .eyebrow { color: var(--c-gold); }
/* Rótulo de seção fica em 1 linha a partir de tablet (no mobile pode quebrar).
   Exceção: eyebrows dentro de colunas estreitas (grade 2-col) podem quebrar. */
@media (min-width: 640px) { .eyebrow { white-space: nowrap; } }
.approaches__grid .eyebrow, .goals .eyebrow { white-space: normal; }

/* Hierarquia editorial: rótulo pequeno → título protagonista → lede de apoio (pausa antes) */
.section-head { max-width: 68ch; margin-bottom: clamp(2.75rem, 5.5vw, 5rem); }
.section-head p {
  margin-top: clamp(1.1rem, 2.4vw, 1.7rem);
  font-size: var(--fs-500); line-height: 1.7; color: var(--c-muted); max-width: 60ch;
}
.section--green .section-head p { color: #b9cabf; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* Título de seção (h2) — medida editorial + caixa-alta refinada */
.section-head h2 { letter-spacing: 0.012em; line-height: 1.1; max-width: 22ch; }
.section-head--center h2 { max-width: 32ch; margin-inline: auto; }
.section-head--center p { margin-inline: auto; }

.lede { font-size: var(--fs-500); color: var(--c-muted); }

/* ---------- Grades utilitárias ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- Header (barra flutuante, destacada do topo) ---------- */
.site-header {
  --radius-float: 14px;
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header);
  padding-top: clamp(0.6rem, 1.6vw, 1.1rem);
  padding-inline: clamp(0.6rem, 2vw, 1.25rem);
  background: transparent; border: 0;
}
/* A barra propriamente dita é o .nav: fundo verde, cantos sutis, sombra — não colada no topo */
.site-header .nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5);
  max-width: var(--container); margin-inline: auto;
  height: clamp(58px, 5.4vw, 68px);
  padding-inline: clamp(1rem, 2.2vw, 1.75rem);
  background: color-mix(in srgb, var(--c-green-900) 88%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-float);
  box-shadow: 0 10px 30px rgba(20, 40, 28, 0.18);
  transition: height var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* Ao rolar: encolhe levemente e fica mais presente, mas permanece destacada */
.site-header.is-scrolled .nav {
  height: clamp(52px, 4.8vw, 60px);
  background: color-mix(in srgb, var(--c-green-900) 96%, transparent);
  box-shadow: 0 14px 36px rgba(20, 40, 28, 0.26);
}
/* Páginas internas (gallery/research) já começam com a barra presente */
.site-header--solid .nav { background: color-mix(in srgb, var(--c-green-900) 96%, transparent); }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: clamp(26px, 3.2vw, 38px); width: auto; }
.nav-links { display: none; align-items: center; gap: clamp(0.9rem, 1.8vw, 1.9rem); }
.nav-links a {
  position: relative; font-weight: 500; font-size: 0.95rem; color: rgba(255, 255, 255, var(--opacity-ui, 0.82));
  padding-block: 0.4rem; transition: color var(--dur-fast) var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--c-lime); transform: scaleX(0); transform-origin: center;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--c-lime); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.site-header .nav-cta { display: none; }

/* Botão MENU (hambúrguer rotulado, como a referência) — visível abaixo de 1024px */
.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.7rem; border: 0; background: transparent;
  color: #fff; min-height: 44px; border-radius: var(--radius-float);
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 22px; }
.nav-toggle__bars span { display: block; width: 22px; height: 2px; background: #fff; transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease); }
.nav-toggle__label { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer (tela inteira, identidade da marca) */
.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: linear-gradient(165deg, var(--c-green-800), var(--c-green-900));
  padding: 0 clamp(1.4rem, 7vw, 2.5rem) calc(var(--space-7) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: var(--space-1);
  transform: translateX(100%); transition: transform var(--dur) var(--ease-out);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu__head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); margin-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-menu__head .brand img { height: 32px; width: auto; }
.mobile-menu__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: transparent; color: #fff;
  transition: color var(--dur-fast) var(--ease);
}
.mobile-menu__close:hover { color: var(--c-lime); }
.mobile-menu__close svg { width: 26px; height: 26px; }
.mobile-menu > a {
  font-family: var(--font-display); font-size: clamp(1.4rem, 6vw, 1.7rem); font-weight: 500; color: #fff;
  min-height: 52px; display: flex; align-items: center;
  padding-block: var(--space-2); border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease);
}
.mobile-menu > a:hover, .mobile-menu > a:active { color: var(--c-lime); padding-left: 6px; }
/* Último link (Contact) vira CTA lime em destaque */
.mobile-menu > a:last-child {
  margin-top: var(--space-5); border-bottom: 0; justify-content: center;
  background: var(--c-lime); color: #3a2c06; font-size: 1.1rem; font-weight: 700;
  min-height: 56px; padding: 0 var(--space-5);
}
.mobile-menu > a:last-child:hover { padding-left: var(--space-5); color: #3a2c06; filter: brightness(1.05); }
body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .site-header .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--c-green-900) 0%, #0f2a18 100%);
  color: #b9cabf;
  padding-block: clamp(5.5rem, 10vw, 9rem) clamp(2.25rem, 4vw, 3.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* Tick lime ancorando a borda superior (mesmo motivo do eyebrow) */
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 64px; height: 3px; background: var(--c-lime);
}
.footer-grid { display: grid; row-gap: clamp(2.5rem, 5vw, 3.5rem); column-gap: clamp(3rem, 6vw, 6rem); grid-template-columns: 1fr; }
.site-footer h4 {
  position: relative; color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding-bottom: 0.6rem; margin-bottom: var(--space-4);
}
.site-footer h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 24px; height: 2px; background: var(--c-lime);
}
.site-footer a { color: #d4e5da; transition: color var(--dur-fast) var(--ease); }
.site-footer a:hover { color: #e8c96a; }
.footer-brand .brand img { height: 52px; width: auto; opacity: 0.92; transition: opacity var(--dur) var(--ease); }
.footer-brand .brand:hover img { opacity: 1; }
.footer-brand p { margin-top: var(--space-5); max-width: 36ch; font-size: 1rem; line-height: 1.65; color: #aebfb3; }
.footer-links { display: flex; flex-direction: column; gap: 0.85rem; }
.footer-links a { font-size: 0.98rem; width: fit-content; }
.footer-bottom {
  margin-top: clamp(3.5rem, 6vw, 5.5rem); padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; font-size: 0.8rem; color: #8ea597;
}
.footer-bottom span:last-child { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; color: #7d9488; }
.footer-grid { align-items: start; }
/* R9: no mobile o .footer-right empilha partners + explore — garante respiro
   entre eles (o gap em 2 colunas só existia a partir de 860px) */
.footer-right { display: grid; gap: clamp(2.25rem, 7vw, 3rem); }

/* Acessibilidade: skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-overlay);
  background: var(--color-primary); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* Rodapé — logos de parceiros (branco) + funders */
/* Token de opacidade padronizado (nav usa 0.86, footer usava 0.78 — unificado) */
:root { --opacity-ui: 0.82; }
.footer-partners h4 { color:#fff; }
.footer-logos { display:flex; align-items:center; gap:clamp(1.75rem, 4vw, 2.75rem); flex-wrap:wrap; margin-bottom:var(--space-5); }
.footer-logos img { height:42px; width:auto; max-width:150px; object-fit:contain; filter:brightness(0) invert(1); opacity:var(--opacity-ui); transition:opacity var(--dur) var(--ease); }
.footer-logos a:hover img { opacity:1; }
.footer-funders { font-size:0.82rem; line-height:1.75; color:#9fb6a8; }

/* ===== Header / Nav improvements v19 ===== */
/* Hero play/pause button: upgrade to 48px (WCAG 2.5.5) */
.hero__media-toggle {
  width: 48px;
  height: 48px;
}

/* ===== Hero improvements v19 ===== */
/* Extra breakpoint for very small phones (<380px) */
@media (max-width: 379px) {
  .hero__title { font-size: clamp(1.45rem, 10vw, 1.75rem); letter-spacing: 0.005em; }
  .hero__rotator { font-size: clamp(0.95rem, 4.8vw, 1.2rem); }
}

/* ---------- Footer: seção de encerramento / missão ---------- */
.footer-mission {
  text-align: center;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: clamp(2.75rem, 6vw, 4rem);
}
.footer-mission__text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.95rem + 1.5vw, 1.85rem);
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255,255,255,0.78);
  max-width: 64ch;
  margin-inline: auto;
  letter-spacing: 0.01em;
}
.footer-mission__text strong { color: var(--c-lime); font-weight: 600; }

/* Desktop: marca | parceiros | navegação (3 colunas visuais, preenchendo bem) */
@media (min-width: 900px) { /* R10: footer unificado no md(900) com as demais seções 2-col */
  .footer-grid { grid-template-columns: 1fr 1.45fr; }
  .footer-right { display: grid; grid-template-columns: 1.5fr 0.85fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
}

/* ===== Sistema de Design Global — z-index tokens ===== */
/* --z-header, --z-overlay, --z-modal definidos em tokens.css */

/* ============================================================
   Rodada 7 — Releitura de layout: ritmo & coesão
   ============================================================ */
/* Container mais contido agora vem do token --container (1320) em tokens.css */
/* Ritmo vertical consistente entre todas as seções */
.section { padding-block: var(--section-y); }
/* Respiro padronizado abaixo do cabeçalho de seção */
.section-head { margin-bottom: var(--head-gap); }

/* ===== Rodada 8 — quebra de título ===== */
h1, h2, .section-head h2, .hero__title { text-wrap: balance; }
.nowrap { white-space: nowrap; }
