/* ==========================================================================
   TF Investimentos, consorcio de maquinas agricolas (/agro)
   agro.css: so o que a /agro tem e a home nao. Carrega depois de base.css e
   layout.css e reaproveita os mesmos tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero com foto
   -------------------------------------------------------------------------- */
.tf-agro-hero__grid {
  display: grid;
  gap: clamp(1.8rem, 1.2rem + 2.6vw, 3.2rem);
  align-items: center;
  grid-template-areas:
    "copy"
    "foto"
    "extra";
}

.tf-agro-hero__grid > * { min-width: 0; }

.tf-agro-hero__copy { grid-area: copy; max-width: 40rem; }
.tf-agro-hero__foto { grid-area: foto; }

/* O menu da /agro tem cinco itens: nenhum quebra em duas linhas */
.tf-nav a { white-space: nowrap; }
.tf-agro-hero__extra { grid-area: extra; max-width: 40rem; }

@media (min-width: 980px) {
  .tf-agro-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas:
      "copy  foto"
      "extra foto";
    row-gap: 0;
    align-items: start;
  }

  /* A foto acompanha o topo do titulo, sem vazio acima dela */
  .tf-agro-hero__foto { margin-top: 2.6rem; }
}

.tf-hero .tf-agro-h1 {
  max-width: 19ch;
  margin-block: 1.1rem 1.2rem;
}

.tf-agro-h1__sub {
  display: block;
  margin-top: 0.55rem;
  font-size: var(--tf-step-2);
  font-weight: 560;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--tf-ink-soft);
}

.tf-agro-h1__sub em { font-style: italic; color: var(--tf-brass); }

.tf-agro-hero__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.7rem;
}

@media (max-width: 520px) {
  .tf-agro-hero__acoes { display: grid; }
}

.tf-agro-hero__extra .tf-hero__bullets { margin-top: 1.9rem; }

.tf-agro-foto {
  position: relative;
  margin: 0;
  border-radius: var(--tf-radius-lg);
  overflow: hidden;
  box-shadow: var(--tf-shadow-lg);
  background: var(--tf-forest-tint);
  aspect-ratio: 1200 / 896;
}

.tf-agro-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Imagem gerada por IA que imita foto leva a etiqueta, por regra da casa */
.tf-agro-foto figcaption {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.22rem 0.55rem;
  border-radius: var(--tf-radius-sm);
  background: rgba(12, 36, 28, 0.62);
  color: #E8EEE9;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   2. Icone de maquina num circulo claro (pagina e modal)
   -------------------------------------------------------------------------- */
.tf-ic-maq {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tf-forest-tint);
  color: var(--tf-forest);
}

.tf-ic-maq svg { width: 32px; height: 32px; }

/* --------------------------------------------------------------------------
   3. Grade de maquinas
   -------------------------------------------------------------------------- */
.tf-maquinas {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tf-maquinas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .tf-maquinas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tf-maquina {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.75rem;
  padding: 1.4rem 1.35rem 1.3rem;
  background: var(--tf-white);
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  transition: border-color 0.2s var(--tf-ease), box-shadow 0.2s var(--tf-ease);
}

.tf-maquina:hover {
  border-color: var(--tf-brass);
  box-shadow: var(--tf-shadow);
}

.tf-maquina h3 {
  font-family: var(--tf-font-display);
  font-weight: 600;
  font-size: 1.36rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.tf-maquina p { font-size: 0.94rem; color: var(--tf-ink-soft); }

.tf-maquina__btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--tf-brass);
}

.tf-maquina__btn:hover { color: #96661F; text-decoration: underline; }

/* --------------------------------------------------------------------------
   4. Modal agro: pontos de etapa, opcoes em cartao e resumo da escolha
   -------------------------------------------------------------------------- */
.tf-steps--pontos {
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.tf-steps--pontos span {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transition: width 0.25s var(--tf-ease), background-color 0.25s var(--tf-ease);
}

.tf-steps--pontos span.is-atual { width: 26px; }

.tf-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.tf-fieldset > legend {
  padding: 0;
  margin-bottom: 0.85rem;
}

.tf-fieldset + .tf-fieldset { margin-top: 1.35rem; }

.tf-step__title strong {
  display: block;
  font-family: var(--tf-font-display);
  font-weight: 620;
  font-size: 1.38rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.15rem;
}

/* Cartoes grandes em lista: icone, nome e seta. O radio fica escondido mas
   acessivel; o cartao inteiro e o label. */
.tf-opcoes { display: grid; gap: 0.55rem; }

.tf-opcoes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tf-opcoes label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 64px;
  padding: 0.55rem 0.9rem 0.55rem 0.6rem;
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  background: var(--tf-white);
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  transition: border-color 0.15s var(--tf-ease), background-color 0.15s var(--tf-ease), box-shadow 0.15s var(--tf-ease);
  -webkit-tap-highlight-color: transparent;
}

.tf-opcoes label .tf-ic-maq { width: 46px; height: 46px; }
.tf-opcoes label .tf-ic-maq svg { width: 28px; height: 28px; }

.tf-opcoes label:hover { border-color: var(--tf-brass); }

.tf-opcoes__txt { flex: 1; min-width: 0; }

.tf-opcoes__seta { flex: none; color: var(--tf-ink-mute); transition: transform 0.15s var(--tf-ease); }

.tf-opcoes label:hover .tf-opcoes__seta { transform: translateX(2px); color: var(--tf-brass); }

.tf-opcoes input:checked + label {
  border-color: var(--tf-brass);
  background: var(--tf-brass-tint);
  box-shadow: 0 0 0 1px var(--tf-brass);
}

.tf-opcoes input:checked + label .tf-ic-maq { background: var(--tf-white); }

.tf-opcoes input:focus-visible + label {
  outline: 2px solid var(--tf-brass);
  outline-offset: 2px;
}

/* Variante compacta, para faixa de credito e prazo no passo 3 */
.tf-opcoes--chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }

.tf-opcoes--chips label {
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.25;
  justify-content: center;
  text-align: center;
}

.tf-opcoes--chips input:checked + label { font-weight: 600; }

/* Ultima opcao impar ocupa a linha inteira */
.tf-opcoes--chips label:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }

/* Resumo da maquina escolhida no passo 2 */
.tf-escolhido {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  background: var(--tf-paper);
}

.tf-escolhido .tf-ic-maq { width: 42px; height: 42px; background: var(--tf-white); }
.tf-escolhido .tf-ic-maq svg { width: 26px; height: 26px; }

.tf-escolhido__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.tf-escolhido__txt small { font-size: 0.74rem; color: var(--tf-ink-mute); }
.tf-escolhido__txt strong { font-weight: 600; }

.tf-escolhido__alterar {
  flex: none;
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tf-brass);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tf-escolhido__alterar:hover { color: #96661F; }

/* Aceite da politica de privacidade */
.tf-aceite {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--tf-ink-soft);
  cursor: pointer;
}

.tf-aceite input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--tf-ink-mute);
  border-radius: var(--tf-radius-sm);
  background: var(--tf-white) center / 14px no-repeat;
  cursor: pointer;
  transition: background-color 0.15s var(--tf-ease), border-color 0.15s var(--tf-ease);
}

.tf-aceite input:checked {
  background-color: var(--tf-forest);
  border-color: var(--tf-forest);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.tf-aceite input[aria-invalid="true"] {
  border-color: var(--tf-danger);
  box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.12);
}

.tf-aceite a { text-decoration: underline; color: var(--tf-forest); }

.tf-resumo-final {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--tf-radius-sm);
  background: var(--tf-paper-warm);
  font-size: 0.9rem;
}

.tf-resumo-final span { color: var(--tf-ink-mute); }
.tf-resumo-final strong { color: var(--tf-ink); font-weight: 600; }

/* No desktop as seis maquinas cabem sem rolar numa tela de 800px de altura */
@media (min-width: 561px) {
  .tf-modal--agro .tf-opcoes:not(.tf-opcoes--chips) { gap: 0.45rem; }
  .tf-modal--agro .tf-opcoes:not(.tf-opcoes--chips) label { min-height: 56px; padding-block: 0.4rem; }
  .tf-modal--agro .tf-opcoes label .tf-ic-maq { width: 42px; height: 42px; }
}

/* No celular os cartoes ganham altura de toque generosa */
@media (max-width: 560px) {
  .tf-opcoes label { min-height: 66px; }
  .tf-step__title strong { font-size: 1.3rem; }
}
