/* =============================================================================
   Tenet · css/tenet-historia.css · "Quem está por trás" (10/10/2026)
   O André pediu que a seção do fundador contasse a história, e não só o
   nome: empresário do varejo há mais de dez anos, que viu o varejo ir do
   panfleto à IA e decidiu construir a solução. A linha do tempo do varejo
   (.historia-linha) é a peça; a última parada, a IA, acende em aço pela
   classe .texto-aco de tenet.css (só tenet.css cita --aco, conferir-azul.py).
   Carrega na home e na /sobre (PT e EN), depois de tenet.css.
   Sem script: a entrada das paradas é view() em @supports; fora da faixa,
   e com movimento reduzido, a linha está inteira.
   ========================================================================== */

@layer tenet {
  .historia { display: grid; gap: clamp(28px, 4vw, 48px); max-inline-size: 64rem; }
  .historia-lede {
    margin: 0; max-inline-size: 34ch;
    font-size: clamp(1.375rem, 1.05rem + 1.3vw, 2.125rem); line-height: 1.22; letter-spacing: -.015em;
    font-weight: 480; color: var(--tinta); text-wrap: balance;
  }
  .historia-lede em { font-style: normal; color: var(--tinta-3); }
  .historia-texto { margin: 0; max-inline-size: 58ch; color: var(--tinta-2); font-size: 1.0625rem; line-height: 1.6; text-wrap: pretty; }

  /* a linha do tempo: um fio com sete paradas; no desktop, em fila */
  .historia-rotulo { margin: 0 0 14px; }
  .historia-linha {
    position: relative; margin: 0; padding: 0; list-style: none;
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 12px;
    counter-reset: parada;
  }
  .historia-linha::before {
    content: ""; position: absolute; left: 0; right: 0; top: 5px; block-size: 1px;
    background: linear-gradient(90deg, var(--linha-forte), var(--tinta-3));
  }
  .historia-linha li {
    position: relative; display: grid; gap: 10px; align-content: start; padding-top: 24px;
    counter-increment: parada;
    font-size: .9375rem; line-height: 1.3; font-weight: 520; color: var(--tinta-2); text-wrap: balance;
  }
  .historia-linha li::before {
    content: ""; position: absolute; left: 0; top: 0; inline-size: 11px; aspect-ratio: 1; border-radius: 50%;
    background: var(--fundo); box-shadow: inset 0 0 0 1.5px var(--tinta-3);
  }
  .historia-linha li::after {
    content: counter(parada, decimal-leading-zero);
    order: -1; font-family: var(--mono); font-stretch: var(--mono-l); font-size: .6875rem; letter-spacing: .08em; color: var(--tinta-4);
  }
  /* a última parada é agora: maior, em aço, com o ponto aceso */
  .historia-linha li.agora { font-size: 1.125rem; font-weight: 600; }
  .historia-linha li.agora::before { background: var(--luz); box-shadow: 0 0 0 4px var(--fundo), 0 0 0 5px var(--linha-forte); }

  .historia-fecho { display: grid; gap: 20px; justify-items: start; }
  .historia-assina { display: flex; align-items: center; gap: 16px; }
  .historia-assina .retrato { inline-size: 56px; margin: 0; flex: none; }
  .historia-assina .retrato::before { font-size: 1.75rem; }
  .historia-assina p { margin: 0; display: grid; gap: 2px; }
  .historia-assina b { color: var(--tinta); font-weight: 620; }
  .historia-assina span { font-family: var(--mono); font-stretch: var(--mono-l); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-3); }

  /* no celular, a fila vira coluna: o fio desce pela esquerda */
  @media (max-width: 820px) {
    .historia-linha { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-left: 28px; }
    .historia-linha::before { left: 5px; right: auto; top: 6px; bottom: 6px; inline-size: 1px; block-size: auto; background: linear-gradient(var(--linha-forte), var(--tinta-3)); }
    .historia-linha li { padding-top: 0; grid-template-columns: 2.2em minmax(0, 1fr); align-items: baseline; gap: 8px; }
    .historia-linha li::before { left: -28px; top: .3em; }
    .historia-linha li::after { order: 0; grid-row: 1; grid-column: 1; }
  }

  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .historia-linha li { animation: historia-parada linear; animation-timeline: view(); animation-range: entry 0% entry 100%; }
      .historia-linha li:nth-child(2) { animation-range: entry 0% cover 24%; }
      .historia-linha li:nth-child(3) { animation-range: entry 0% cover 28%; }
      .historia-linha li:nth-child(4) { animation-range: entry 0% cover 32%; }
      .historia-linha li:nth-child(5) { animation-range: entry 0% cover 36%; }
      .historia-linha li:nth-child(6) { animation-range: entry 0% cover 40%; }
      .historia-linha li:nth-child(7) { animation-range: entry 0% cover 46%; }
    }
  }
  @keyframes historia-parada { from { opacity: 0; translate: 0 12px; } }

  @media (forced-colors: active) {
    .historia-linha::before { background: CanvasText; }
    .historia-linha li::before { box-shadow: none; border: 1px solid CanvasText; }
  }
}
