/* ==========================================================================
   Edson Costalonga Filho — Consultoria agronômica
   Paleta inspirada na maturação do café conilon: folha, verde-cana e cereja.
   ========================================================================== */

:root {
  /* Cores */
  --folha: #1D3A2A;        /* verde-escuro da folha do cafeeiro */
  --tinta: #15241B;        /* texto principal */
  --cana: #D5DE6E;         /* fruto verde-cana: destaque e botões */
  --cana-escura: #C3CD55;
  --cereja: #A6262F;       /* fruto maduro: detalhes e erros */
  --nevoa: #EDF1E8;        /* fundo de seção */
  --papel: #FAFBF7;        /* fundo da página */
  --branco: #FFFFFF;
  --texto-suave: #4C5B51;
  --linha: rgba(21, 36, 27, 0.14);

  /* Tipografia */
  --fonte: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica */
  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-18: 1.125rem;
  --t-21: 1.3125rem;
  --t-24: 1.5rem;

  /* Layout */
  --largura: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --raio-g: clamp(22px, 3vw, 32px);
  --raio-m: 18px;
  --raio-p: 12px;
  --header-h: 84px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: var(--t-16);
  font-weight: 400;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(.modal[open]),
body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, dl, dd, figure { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--folha);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--largura) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--cana);
  color: var(--folha);
  font-weight: 500;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 5px 5px 5px 22px;
  border: 0;
  border-radius: 999px;
  font-size: var(--t-16);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.btn__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform .25s ease;
}

.btn__icon svg,
.video-card__arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:hover .btn__icon { transform: rotate(45deg); }

.btn--cana { background: var(--cana); color: var(--folha); }
.btn--cana .btn__icon { background: var(--branco); color: var(--folha); }
.btn--cana:hover { background: var(--cana-escura); }

.btn--light { background: var(--branco); color: var(--tinta); }
.btn--light .btn__icon { background: var(--folha); color: var(--branco); }

.btn--dark { background: var(--folha); color: var(--branco); }
.btn--dark .btn__icon { background: var(--cana); color: var(--folha); }
.btn--dark:hover { background: #16301F; }

.btn--sm {
  gap: 12px;
  min-height: 42px;
  padding: 4px 4px 4px 18px;
  font-size: 0.9375rem;
}
.btn--sm .btn__icon { width: 34px; height: 34px; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 10px;
  border-radius: 999px;
  font-size: var(--t-14);
  font-weight: 400;
  line-height: 1.3;
}

.tag__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cereja);
}

.tag--glass {
  color: var(--branco);
  background: rgba(213, 222, 110, 0.22);
  border: 1px solid rgba(213, 222, 110, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.tag--glass .tag__dot { background: var(--cana); }

.tag--soft {
  color: var(--folha);
  background: var(--nevoa);
  border: 1px solid var(--linha);
}

/* ==========================================================================
   Cabeçalho
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--branco);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.header.is-solid {
  color: var(--tinta);
  background: rgba(250, 251, 247, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--linha);
}
.header.is-solid .nav__cta { background: var(--cana); color: var(--folha); }
.header.is-solid .nav__cta .btn__icon { background: var(--branco); color: var(--folha); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* O grão tem contorno: a versão escura some em fundo escuro e vice-versa,
   por isso as duas convivem e o CSS mostra a certa para cada fundo. */
.brand__mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* As duas ocupam a mesma caixa, então a troca não desloca o nome ao lado. */
.brand__logo--claro,
.brand__logo--escuro {
  position: absolute;
  inset: 0;
  transition: opacity .3s ease;
}

/* Sobre a foto do hero o cabeçalho é transparente: contorno creme. */
.brand__logo--claro { opacity: 0; }
.brand__logo--escuro { opacity: 1; }

/* Cabeçalho claro (rolagem ou menu aberto no celular): contorno escuro. */
.header.is-solid .brand__logo--claro,
.header.menu-is-open .brand__logo--claro { opacity: 1; }
.header.is-solid .brand__logo--escuro,
.header.menu-is-open .brand__logo--escuro { opacity: 0; }

.brand__text { display: grid; line-height: 1.15; }
.brand__name { font-size: var(--t-16); font-weight: 500; letter-spacing: -0.01em; }
.brand__role { font-size: 0.8125rem; font-weight: 300; opacity: .8; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.nav__list {
  display: flex;
  gap: clamp(18px, 2.6vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  font-size: 0.9375rem;
  padding-block: 6px;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  font-size: var(--t-14);
  cursor: pointer;
}

.menu-toggle__lines,
.menu-toggle__lines::before {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s ease;
}
.menu-toggle__lines { position: relative; transform: translateY(-3px); }
.menu-toggle__lines::before {
  content: "";
  position: absolute;
  top: 6px;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__lines { transform: translateY(0) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { top: 0; transform: rotate(-90deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(100vh, 980px);
  min-height: min(100svh, 980px);
  overflow: hidden;
  color: var(--branco);
  background: var(--folha);
  isolation: isolate;
}

/* A imagem é ampliada a partir da esquerda para levar as pessoas à direita
   e deixar a folhagem livre para o título. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1.22);
  transform-origin: 0% 38%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 26, 18, .45) 0%, rgba(12, 26, 18, 0) 22%),
    linear-gradient(90deg, rgba(12, 26, 18, .72) 0%, rgba(12, 26, 18, .38) 45%, rgba(12, 26, 18, 0) 72%),
    linear-gradient(0deg, rgba(12, 26, 18, .6) 0%, rgba(12, 26, 18, 0) 48%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 48px;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hero__copy { min-width: 0; }

.hero__title {
  display: grid;
  margin-top: 22px;
  font-size: clamp(2.5rem, 5.2vw, 4.875rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 46ch;
  margin-top: 24px;
  font-size: clamp(var(--t-16), 1.4vw, var(--t-18));
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, .88);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Cartão de vídeo */
.video-card {
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 24px;
  background: var(--branco);
  color: var(--tinta);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 24px 60px -24px rgba(8, 20, 12, .55);
}

.video-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 12px 10px;
}

.video-card__text { display: grid; gap: 3px; }

.video-card__source {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--texto-suave);
}

.video-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.video-card__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--linha);
  transition: transform .25s ease, background-color .25s ease;
}

.video-card__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 17px;
  aspect-ratio: 16 / 9;
}

.video-card__time {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(12, 26, 18, .72);
  color: var(--branco);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--folha);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .25);
  transition: transform .25s ease;
}
.video-card__play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }

.video-card:hover .video-card__thumb img { transform: scale(1.04); }
.video-card:hover .video-card__play { transform: translate(-50%, -50%) scale(1.08); }
.video-card:hover .video-card__arrow { transform: rotate(45deg); background: var(--cana); border-color: var(--cana); }

/* Sequência de entrada (uma única vez, ao carregar) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: surgir .9s cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: calc(var(--d, 0) * 110ms + 150ms);
  }
  .hero__title .reveal { display: block; }
}

@keyframes surgir {
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Abordagem
   ========================================================================== */
.statement { padding-block: clamp(72px, 11vw, 150px); }

.statement__inner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.statement__inner .tag { margin-top: 10px; justify-self: start; }

.statement__text {
  max-width: 30em;
  font-size: clamp(1.625rem, 3.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--folha);
}

/* ==========================================================================
   Serviços
   ========================================================================== */
.services {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(32px, 6vw, 80px);
  border-radius: var(--raio-g);
  background: var(--folha);
  color: var(--branco);
}

.services__intro {
  align-self: start;
  position: sticky;
  top: 120px;
}

.services__title {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.services__text {
  max-width: 34ch;
  margin-top: 20px;
  margin-bottom: 32px;
  font-weight: 300;
  font-size: var(--t-18);
  line-height: 1.55;
  color: rgba(255, 255, 255, .75);
}

.services__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 32px;
  padding-block: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.service__name {
  font-size: var(--t-21);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service__desc {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, .72);
}

/* ==========================================================================
   Sobre
   ========================================================================== */
.about { padding-block: clamp(80px, 11vw, 150px); }

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.about__photo {
  overflow: hidden;
  border-radius: var(--raio-g);
  aspect-ratio: 4 / 5;
  background: var(--nevoa);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}

.about__title {
  margin-top: 20px;
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--folha);
}

.about__text {
  max-width: 52ch;
  margin-top: 24px;
  font-size: var(--t-18);
  font-weight: 300;
  line-height: 1.65;
  color: var(--texto-suave);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-block: 40px 40px;
}

.facts__item {
  padding-top: 16px;
  border-top: 1px solid var(--linha);
}

.facts dt {
  font-size: var(--t-21);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--folha);
}

.facts dd {
  margin-top: 4px;
  font-size: var(--t-14);
  color: var(--texto-suave);
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contact {
  padding-block: clamp(80px, 11vw, 140px);
  background: var(--nevoa);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact__title {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--folha);
  text-wrap: balance;
}

.contact__text {
  max-width: 36ch;
  margin-top: 20px;
  font-size: var(--t-18);
  font-weight: 300;
  line-height: 1.6;
  color: var(--texto-suave);
}

.form {
  padding: clamp(22px, 4vw, 44px);
  border-radius: var(--raio-g);
  background: var(--branco);
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }

.field__label {
  font-size: var(--t-14);
  font-weight: 500;
  color: var(--folha);
}

.field__opt { font-weight: 300; color: var(--texto-suave); }

.field__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--linha);
  border-radius: var(--raio-p);
  background: var(--papel);
  font-size: var(--t-16);
  line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder { color: #8A958D; }

.field__input:hover { border-color: rgba(21, 36, 27, .3); }

.field__input:focus {
  outline: none;
  border-color: var(--folha);
  background: var(--branco);
  box-shadow: 0 0 0 4px rgba(213, 222, 110, .55);
}

.field__input--area { min-height: 132px; resize: vertical; }

.field__select { position: relative; }
.field__select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--folha);
  border-bottom: 1.5px solid var(--folha);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field__select .field__input { padding-right: 44px; cursor: pointer; }

.field__input[aria-invalid="true"] { border-color: var(--cereja); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(166, 38, 47, .15); }

.field__error {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--cereja);
}
.field__error:empty { display: none; }

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.form__submit[disabled] { opacity: .65; cursor: progress; }

.form__note {
  max-width: 32ch;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--texto-suave);
}

.form__status {
  margin-top: 20px;
  font-size: var(--t-14);
  line-height: 1.5;
}
.form__status:empty { display: none; }
.form__status.is-success,
.form__status.is-error {
  padding: 14px 16px;
  border-radius: var(--raio-p);
}
.form__status.is-success { background: rgba(213, 222, 110, .35); color: var(--folha); }
.form__status.is-error { background: rgba(166, 38, 47, .08); color: var(--cereja); }

/* ==========================================================================
   Rodapé
   ========================================================================== */
.footer {
  padding-block: 40px;
  background: var(--folha);
  color: var(--branco);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.footer__nav { display: flex; gap: 28px; font-size: 0.9375rem; }
.footer__nav a { color: rgba(255, 255, 255, .8); }
.footer__nav a:hover { color: var(--cana); }

.footer__copy { font-size: var(--t-14); font-weight: 300; color: rgba(255, 255, 255, .65); }

.footer :focus-visible,
.services :focus-visible,
.hero :focus-visible,
.header:not(.is-solid) :focus-visible { outline-color: var(--cana); }

/* ==========================================================================
   Modal do vídeo
   ========================================================================== */
.modal {
  width: min(960px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--raio-g);
  background: var(--folha);
  color: var(--branco);
  overflow: visible;
}

.modal::backdrop {
  background: rgba(8, 18, 12, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal__box { padding: clamp(10px, 1.6vw, 16px); }

.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 12px 8px;
}

.modal__title { flex: 1; min-width: 0; font-size: var(--t-16); font-weight: 400; line-height: 1.35; }

.modal__link { flex: none; }

.modal__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--cana);
  color: var(--folha);
  cursor: pointer;
}
.modal__close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.modal__frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--raio-g) - 10px);
  aspect-ratio: 16 / 9;
  background: #0E1C14;
}

.modal__frame iframe,
.modal__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end start;
  padding: clamp(18px, 3vw, 32px);
  background:
    linear-gradient(0deg, rgba(12, 26, 18, .85) 0%, rgba(12, 26, 18, .15) 60%),
    url("../assets/img/video-poster.jpg") center / cover;
}
.modal__empty p { max-width: 36ch; font-size: var(--t-18); font-weight: 300; line-height: 1.45; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: abrir-modal .35s cubic-bezier(.2, .7, .2, 1); }
  .modal[open]::backdrop { animation: abrir-fundo .35s ease; }
}

@keyframes abrir-modal {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes abrir-fundo {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) 290px; gap: 32px; }
  .service { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }

  .menu-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 16px var(--gutter) 28px;
    background: var(--papel);
    color: var(--tinta);
    box-shadow: 0 1px 0 var(--linha), 0 24px 40px -20px rgba(8, 20, 12, .3);
  }
  .nav.is-open { display: flex; }

  .nav__list { flex-direction: column; gap: 0; }
  .nav__link {
    display: block;
    padding-block: 16px;
    border-bottom: 1px solid var(--linha);
    font-size: var(--t-21);
  }
  .nav__link::after { display: none; }

  .nav__cta { justify-content: space-between; }
  .nav .nav__cta { background: var(--cana); color: var(--folha); }
  .nav .nav__cta .btn__icon { background: var(--branco); color: var(--folha); }

  .header.menu-is-open {
    color: var(--tinta);
    background: var(--papel);
    box-shadow: 0 1px 0 var(--linha);
  }
  .header.menu-is-open :focus-visible { outline-color: var(--folha); }

  /* No celular a foto ocupa a parte de cima e se funde ao verde,
     para o título não cobrir o rosto do agrônomo. */
  .hero { --hero-img-h: clamp(560px, 90vw, 760px); }

  .hero__bg {
    height: var(--hero-img-h);
    bottom: auto;
    transform: none;
    object-position: 55% 35%;
  }

  .hero::before {
    background:
      linear-gradient(180deg,
        rgba(12, 26, 18, .5) 0,
        rgba(12, 26, 18, 0) 120px,
        rgba(29, 58, 42, 0) calc(var(--hero-img-h) - 320px),
        rgba(29, 58, 42, .85) calc(var(--hero-img-h) - 120px),
        var(--folha) var(--hero-img-h));
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: calc(var(--hero-img-h) - 250px);
  }

  .video-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    max-width: 440px;
  }
  .video-card__head { order: 2; padding: 0 6px 0 0; }
  .video-card__thumb { order: 1; border-radius: 16px; }
  .video-card__play { width: 42px; height: 42px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .25); }
  .video-card__play svg { width: 18px; height: 18px; }
  .video-card__time { display: none; }

  .statement__inner { grid-template-columns: 1fr; gap: 20px; }
  .statement__inner .tag { margin-top: 0; }

  .services { grid-template-columns: 1fr; }
  .services__intro { position: static; }
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .about__inner { grid-template-columns: 1fr; }
  .about__photo { aspect-ratio: 4 / 4.2; max-width: 560px; }

  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand__role { display: none; }
  .brand__mark { width: 27px; height: 27px; }

  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: space-between; }

  .service { grid-template-columns: 1fr; gap: 8px; padding-block: 22px; }

  .services__intro .btn { width: 100%; justify-content: space-between; }

  .facts { grid-template-columns: 1fr; gap: 0; margin-block: 32px; }
  .facts__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
  }
  .facts__item:last-child { border-bottom: 1px solid var(--linha); }
  .facts dt { font-size: var(--t-18); }
  .facts dd { margin-top: 0; text-align: right; }

  .about .btn { width: 100%; justify-content: space-between; }

  .form__grid { grid-template-columns: 1fr; gap: 18px; }
  .form__submit { width: 100%; justify-content: space-between; }

  .footer__inner { flex-direction: column; align-items: flex-start; }

  .modal__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .modal__title { grid-column: 1; grid-row: 1; align-self: center; }
  .modal__close { grid-column: 2; grid-row: 1; }
  .modal__link { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
}

/* Telas estreitas: botão de menu só com ícone, para caber o nome completo */
@media (max-width: 400px) {
  .menu-toggle {
    justify-content: center;
    width: 44px;
    padding: 0;
  }
  .menu-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .video-card { grid-template-columns: 104px minmax(0, 1fr); }
  .video-card__title { font-size: var(--t-14); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
