/* ==========================================================================
   TF Investimentos, consorcio de imoveis
   base.css: tokens, reset, tipografia e primitivos de interface
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Cor. Base verde-petroleo profundo com papel quente e latao como destaque.
     Evita de proposito a paleta azul/roxo generica de SaaS. */
  --tf-ink: #101E19;
  --tf-ink-soft: #2C3D36;
  --tf-ink-mute: #5C6B64;
  --tf-forest: #14372B;
  --tf-forest-deep: #0C241C;
  --tf-forest-tint: #E9EFEA;
  --tf-paper: #FBF8F3;
  --tf-paper-warm: #F3EDE3;
  --tf-white: #FFFFFF;
  --tf-brass: #A9762A;
  --tf-brass-bright: #C79641;
  --tf-brass-tint: #F6EEDF;
  --tf-line: #DED6C8;
  --tf-line-soft: #EBE5DA;
  --tf-danger: #9B2C2C;
  --tf-success: #1F6B45;

  /* Tipografia */
  --tf-font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --tf-font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tf-font-num: "Instrument Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Escala fluida */
  --tf-step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --tf-step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --tf-step-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --tf-step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --tf-step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  --tf-step-4: clamp(2rem, 1.6rem + 1.9vw, 3.2rem);
  --tf-step-5: clamp(2.35rem, 1.7rem + 2.9vw, 4.05rem);

  /* Espaco e forma */
  --tf-gutter: clamp(1.15rem, 0.8rem + 1.6vw, 2.5rem);
  --tf-section-y: clamp(3.5rem, 2.5rem + 4vw, 7rem);
  --tf-max: 1200px;
  --tf-max-narrow: 760px;
  --tf-radius-sm: 3px;
  --tf-radius: 5px;
  --tf-radius-lg: 6px;

  --tf-shadow-sm: 0 1px 2px rgba(16, 30, 25, 0.06), 0 2px 8px rgba(16, 30, 25, 0.04);
  --tf-shadow: 0 2px 4px rgba(16, 30, 25, 0.05), 0 12px 32px -8px rgba(16, 30, 25, 0.16);
  --tf-shadow-lg: 0 4px 8px rgba(16, 30, 25, 0.06), 0 28px 64px -16px rgba(16, 30, 25, 0.22);

  --tf-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset enxuto
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--tf-paper);
  color: var(--tf-ink);
  font-family: var(--tf-font-body);
  font-size: var(--tf-step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--tf-brass);
  outline-offset: 3px;
  border-radius: 2px;
}

@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;
  }
}

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */
.tf-display {
  font-family: var(--tf-font-display);
  font-weight: 620;
  font-optical-sizing: auto;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.tf-h1 { font-size: var(--tf-step-5); }
.tf-h2 { font-size: var(--tf-step-4); }
.tf-h3 { font-size: var(--tf-step-2); }

.tf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tf-brass);
}

.tf-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.tf-lead {
  font-size: var(--tf-step-1);
  line-height: 1.5;
  color: var(--tf-ink-soft);
  text-wrap: pretty;
}

.tf-muted { color: var(--tf-ink-mute); }
.tf-small { font-size: var(--tf-step--1); line-height: 1.55; }

.tf-mark {
  background: linear-gradient(transparent 62%, var(--tf-brass-tint) 62%);
  padding: 0 0.08em;
}

.tf-num {
  font-family: var(--tf-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.tf-wrap {
  width: 100%;
  max-width: var(--tf-max);
  margin-inline: auto;
  padding-inline: var(--tf-gutter);
}

.tf-wrap--narrow { max-width: var(--tf-max-narrow); }

.tf-section { padding-block: var(--tf-section-y); }

.tf-section--tight { padding-block: calc(var(--tf-section-y) * 0.62); }

.tf-section--dark {
  background: var(--tf-forest-deep);
  color: #E8EEE9;
}

.tf-section--dark .tf-lead { color: #B7C6BD; }
.tf-section--dark .tf-muted { color: #93A69B; }

.tf-section--paper { background: var(--tf-paper-warm); }

.tf-rule {
  height: 1px;
  background: var(--tf-line);
  border: 0;
  margin: 0;
}

/* Cabecalho de secao: assimetrico de proposito, nunca centralizado em tudo */
.tf-sec-head {
  display: grid;
  gap: 1.1rem;
  max-width: 46ch;
  margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.4rem);
}

/* --------------------------------------------------------------------------
   5. Botoes
   -------------------------------------------------------------------------- */
.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--tf-radius);
  font-weight: 600;
  font-size: var(--tf-step-0);
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.18s var(--tf-ease), background-color 0.18s var(--tf-ease),
    box-shadow 0.18s var(--tf-ease), border-color 0.18s var(--tf-ease), color 0.18s var(--tf-ease);
  text-align: center;
}

.tf-btn:active { transform: translateY(1px); }

.tf-btn--primary {
  background: var(--tf-brass);
  color: #FFF8EC;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, var(--tf-shadow-sm);
}

.tf-btn--primary:hover { background: #96661F; }

.tf-btn--forest {
  background: var(--tf-forest);
  color: #F0F5F1;
}

.tf-btn--forest:hover { background: var(--tf-forest-deep); }

.tf-btn--ghost {
  background: transparent;
  color: var(--tf-forest);
  border: 1px solid var(--tf-line);
}

.tf-btn--ghost:hover {
  border-color: var(--tf-forest);
  background: rgba(20, 55, 43, 0.04);
}

.tf-btn--wa {
  background: #128C4A;
  color: #fff;
}

.tf-btn--wa:hover { background: #0E7540; }

.tf-btn--block { width: 100%; }

.tf-btn--lg { padding: 1.1rem 2rem; font-size: var(--tf-step-1); }

.tf-btn svg { flex: none; }

/* --------------------------------------------------------------------------
   6. Formulario
   -------------------------------------------------------------------------- */
.tf-field { display: grid; gap: 0.4rem; }

.tf-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--tf-ink-soft);
}

.tf-input,
.tf-select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  background: var(--tf-white);
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius-sm);
  font-size: 1rem;
  transition: border-color 0.15s var(--tf-ease), box-shadow 0.15s var(--tf-ease);
  appearance: none;
}

.tf-select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235C6B64' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

.tf-input:focus,
.tf-select:focus {
  outline: none;
  border-color: var(--tf-brass);
  box-shadow: 0 0 0 3px rgba(169, 118, 42, 0.16);
}

.tf-input[aria-invalid="true"],
.tf-select[aria-invalid="true"] {
  border-color: var(--tf-danger);
  box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.12);
}

.tf-error {
  font-size: 0.78rem;
  color: var(--tf-danger);
  min-height: 0;
}

.tf-error:empty { display: none; }

.tf-hint { font-size: 0.78rem; color: var(--tf-ink-mute); }

/* Escolha em cartoes, usada no passo 1 (faixa de credito) */
.tf-choice { display: grid; gap: 0.5rem; }

.tf-choice input { position: absolute; opacity: 0; pointer-events: none; }

.tf-choice label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius-sm);
  background: var(--tf-white);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s var(--tf-ease), background-color 0.15s var(--tf-ease);
}

.tf-choice label:hover { border-color: var(--tf-brass); }

.tf-choice input:checked + label {
  border-color: var(--tf-brass);
  background: var(--tf-brass-tint);
  box-shadow: 0 0 0 1px var(--tf-brass);
}

.tf-choice input:focus-visible + label {
  outline: 2px solid var(--tf-brass);
  outline-offset: 2px;
}

.tf-choice label .tf-choice__hint {
  font-size: 0.78rem;
  color: var(--tf-ink-mute);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Utilitarios
   -------------------------------------------------------------------------- */
.tf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tf-skip {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 999;
  background: var(--tf-forest);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--tf-radius-sm);
  transition: top 0.2s var(--tf-ease);
}

.tf-skip:focus { top: 0.75rem; }

[hidden] { display: none !important; }

/* Revelacao suave no scroll. Discreta de proposito: 12px, nunca zoom nem bounce */
.tf-js .tf-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--tf-ease), transform 0.6s var(--tf-ease);
  will-change: opacity, transform;
}

.tf-js .tf-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .tf-js .tf-reveal { opacity: 1; transform: none; }
}
