/*
 * Tipografia — Hanzo Design System (fonte única de verdade do sistema Kairos)
 *
 * Famílias: Inter Display (todo o texto) · Instrument Serif itálico (somente eyebrows/kickers).
 * Nenhuma outra família é carregada (hanzo-fonts.css). Mono do sistema só para código/IDs.
 *
 * Papel            Classe            Tamanho (≤809 · 810–1439 · ≥1440)  Peso  Entrelinha  Tracking
 * ───────────────  ────────────────  ─────────────────────────────────  ────  ──────────  ────────
 * Display          .t-display        44 · 80 · 108                      400   1.15        -0.06em
 * Numeral          .t-numeral        44 · 56 · 72                       300   1.25        -0.06em
 * Título de página .t-page-title/h1  32 → 48                            400   1.15        -0.06em
 * Heading 2        .t-h2             28 · 32 · 48                       400   1.4         -0.04em
 * Lead             .t-lead           28 → 44                            400   1.25        -0.04em
 * Seção (H3)       .t-h3 / h2        18 · 20 · 24                       500   1.4         -0.02em
 * Título de card   .t-title / h3,h4  18 · 20                            500   1.5         -0.02em
 * Eyebrow          .t-eyebrow        24 (app: .t-eyebrow--sm 20)        400i  1.2         0
 *                  kicker de card/painel (.u-eyebrow, *-kicker internos)  16 serif itálico
 * KPI              .t-kpi            32 → 44                            300   1.15        -0.06em
 * Body             .t-body / p       16                                 400   1.7         0
 * UI               .t-ui             14 (tabelas, botões, campos)       400   1.5         0
 * Label            .t-label          14                                 500   1.5         0
 * Meta             .t-meta           12 (legendas, badges, cabeçalhos)  400   1.5         0
 *
 * Segundo tom (DS "50% black span"): <span class="t-tone">…</span> dentro de títulos.
 * Efeitos (type_fx.js, respeitam prefers-reduced-motion):
 *   data-type-fx="letters"  letra a letra: blur + subida + tracking assentando (Display do DS)
 *   data-type-fx="words"    palavra a palavra 0.2 → 1 (Lead do DS; ligado ao scroll fora da dobra)
 *   data-type-fx="count"    numeral conta até o valor (Numeral/KPI)
 *   .t-eyebrow              fios laterais desenham-se ao entrar na tela
 */

/* ═══════════ Papéis ═══════════ */
.t-display,
.t-numeral,
.t-page-title,
.t-h2,
.t-lead,
.t-h3,
.t-title,
.t-kpi {
  font-family: var(--font-sans);
  font-style: normal;
  text-transform: none;
  font-feature-settings: "ss01" on;
  color: var(--text-heading-strong, var(--text-primary));
  margin-top: 0;
}

/* Display em degraus, como o preset do DS (não fluido): 44/1.25 · 80 · 108 */
.t-display {
  font-size: var(--text-display-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-numeral);
  letter-spacing: var(--tracking-display);
  font-feature-settings: "ss01" on, "dlig" on;
}

@media (min-width: 810px) {
  .t-display {
    font-size: var(--text-display-lg);
    line-height: var(--lh-display);
  }
}

@media (min-width: 1440px) {
  .t-display {
    font-size: var(--text-8xl);
  }
}

.t-numeral {
  font-size: var(--fs-numeral);
  font-weight: var(--fw-light);
  line-height: var(--lh-numeral);
  letter-spacing: var(--tracking-display);
  font-variant-numeric: tabular-nums;
}

.t-page-title {
  font-size: var(--fs-page-title);
  font-weight: var(--fw-regular);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
}

.t-h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-h2);
  letter-spacing: var(--tracking-h2);
}

.t-lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-numeral);
  letter-spacing: var(--tracking-h2);
}

.t-h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  line-height: var(--lh-h2);
  letter-spacing: var(--tracking-title);
}

.t-title {
  font-size: var(--fs-title);
  font-weight: var(--fw-medium);
  line-height: var(--lh-title);
  letter-spacing: var(--tracking-title);
}

.t-kpi {
  font-size: var(--fs-kpi);
  font-weight: var(--fw-light);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  font-variant-numeric: tabular-nums;
}

.t-body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
}

.t-ui {
  font-family: var(--font-sans);
  font-size: var(--fs-ui);
  font-weight: var(--fw-regular);
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-body);
}

.t-label {
  font-family: var(--font-sans);
  font-size: var(--fs-ui);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-body);
  text-transform: none;
}

.t-meta {
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  font-weight: var(--fw-regular);
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-body);
  text-transform: none;
}

.t-muted {
  color: var(--text-secondary);
}

/* Segundo tom do DS: metade final do título em 50% */
.t-tone {
  color: var(--text-tone-2);
}

/* Eyebrow: Instrument Serif itálico entre fios que esmaecem */
.t-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-eyebrow);
  font-style: italic;
  font-weight: var(--fw-regular);
  line-height: 1.2;
  letter-spacing: var(--tracking-body);
  text-transform: none;
  color: var(--text-tone-2);
}

.t-eyebrow--sm {
  font-size: var(--fs-eyebrow-sm);
}

.t-eyebrow::before,
.t-eyebrow::after {
  content: "";
  flex: 0 0 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.7;
  transform-origin: right center;
}

.t-eyebrow::after {
  background: linear-gradient(90deg, currentColor, transparent);
  transform-origin: left center;
}

.t-eyebrow--plain::before,
.t-eyebrow--plain::after {
  content: none;
}

/* ═══════════ Efeitos tipográficos (type_fx.js) ═══════════ */

/* Letras: cada caractere entra com blur + subida (k-char, motion.css); o título assenta o tracking */
.tfx-word {
  display: inline-block;
  white-space: nowrap;
}

.tfx-char {
  will-change: transform, opacity, filter;
}

[data-type-fx="letters"].tfx-ready {
  transition: letter-spacing var(--dur-appear) var(--ease-type);
}

[data-type-fx="letters"].tfx-settling {
  letter-spacing: 0.01em;
}

/* Palavras: 0.2 → 1 (opacidade controlada por JS; transição suaviza o passo) */
.tfx-w {
  opacity: 0.2;
  transition: opacity var(--dur-panel) var(--ease-type);
}

.tfx-w.is-on {
  opacity: 1;
}

/* Eyebrow: fios desenham-se */
.t-eyebrow.tfx-eyebrow::before,
.t-eyebrow.tfx-eyebrow::after {
  transform: scaleX(0);
  transition: transform var(--dur-appear) var(--ease-type) calc(2 * var(--stagger-step));
}

.t-eyebrow.tfx-eyebrow.is-in::before,
.t-eyebrow.tfx-eyebrow.is-in::after {
  transform: scaleX(1);
}

/* Numeral: algarismos tabulares durante a contagem (sem "dança" de largura) */
[data-type-fx="count"] {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .tfx-char {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
  }

  .tfx-w {
    opacity: 1;
    transition: none;
  }

  .t-eyebrow.tfx-eyebrow::before,
  .t-eyebrow.tfx-eyebrow::after {
    transform: none;
    transition: none;
  }
}
