/* ==========================================================================
   CULTURA TRINACIONAL — Refino visual (30/10/2026)
   Carregado SOMENTE em: index.html, institucional-login.html e
   diretoria-login.html. Só sobrescreve estilos; não altera theme.css,
   institucional.css nem appearance.css. Usa os tokens existentes para
   funcionar também no tema claro.
   Para desfazer: remova o <link> deste arquivo das três páginas.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Foco visível (teclado) — links, botões e campos
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brand-cyan, #22d3ee);
  outline-offset: 3px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-cyan, #22d3ee);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.32);
}

/* --------------------------------------------------------------------------
   Área de toque do seletor de idioma e do menu (sem mudar o visual)
   -------------------------------------------------------------------------- */
.lang-switch button { position: relative; }
.lang-switch button::after {
  content: "";
  position: absolute;
  inset: -8px -2px;
}

/* --------------------------------------------------------------------------
   Home — capa
   -------------------------------------------------------------------------- */
/* Botão principal: brilho mais contido, mantendo o degradê azul → ciano */
.hero .btn-primary {
  box-shadow:
    0 6px 18px rgba(2, 86, 214, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hero .btn-primary:hover {
  filter: brightness(1.06);
  box-shadow:
    0 8px 22px rgba(2, 86, 214, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.hero .btn-outline { border-color: rgba(255, 255, 255, 0.4); }
.hero .btn-outline:hover { border-color: rgba(255, 255, 255, 0.7); }

/* Título: sombra mais leve e escala menos pesada em telas grandes */
.hero h1 { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); }
@media (min-width: 900px) {
  .hero h1 {
    font-size: clamp(48px, 4.8vw, 76px);
    line-height: 1.06;
    letter-spacing: -0.02em;
  }
}

/* Assinatura territorial: menor e mais discreta no canto */
@media (min-width: 640px) {
  .hero-tag {
    font-size: clamp(17px, 1.6vw, 23px);
    opacity: 0.92;
  }
}

/* --------------------------------------------------------------------------
   Telas de acesso (institucional e diretoria) — layout único
   -------------------------------------------------------------------------- */
.inst-hero {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.inst-hero h1 {
  text-shadow: none;
  letter-spacing: -0.01em;
}
.inst-hero p {
  max-width: 560px;
  color: var(--text-secondary);
}

/* Selo da área (trilíngue via atributo lang do <html>, definido pelo i18n.js) */
.ct-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border-glow, rgba(34, 211, 238, 0.45));
  border-radius: var(--radius-pill, 999px);
  background: rgba(34, 211, 238, 0.07);
  color: var(--brand-cyan, #22d3ee);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ct-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Link "Voltar ao site" no cabeçalho */
.ct-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ct-back:hover { color: var(--text-primary); }
.ct-back .ct-l,
.ct-eyebrow .ct-l { display: none; }
html:lang(pt-BR) .ct-back .ct-pt,
html:lang(es) .ct-back .ct-es,
html:lang(en) .ct-back .ct-en { display: inline; }
html:lang(pt-BR) .ct-eyebrow .ct-pt,
html:lang(es) .ct-eyebrow .ct-es,
html:lang(en) .ct-eyebrow .ct-en { display: inline; }

/* Cartão */
.inst-card { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); }

/* Abas Entrar / Criar conta: alvo de toque 44px e contraste do texto ativo */
.inst-tabs button { min-height: 44px; }
.inst-tabs button[aria-selected="true"],
.inst-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
}
.inst-card .btn-primary {
  min-height: 48px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.26);
}
.inst-card .btn-primary:hover { box-shadow: 0 8px 20px rgba(37, 99, 235, 0.34); }
.inst-card .btn-primary:disabled { box-shadow: none; }

/* Textos de apoio com contraste legível */
.inst-note,
.field .hint { color: var(--text-secondary); }

/* Links do cartão: sublinhado fino em vez do sublinhado forte inline */
.inst-note a {
  display: inline-block;
  padding: 12px 8px;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px;
  text-decoration-color: rgba(34, 211, 238, 0.45);
}
.inst-note a:hover { text-decoration-color: currentColor; }
.inst-card .inst-note { margin-top: 8px; }

/* --------------------------------------------------------------------------
   Celular / tablet estreito (até 899 px) — tratamento próprio, não é o
   desktop reduzido
   -------------------------------------------------------------------------- */
.ct-back-hero { display: none; }

@media (max-width: 639px) {
  /* O cabeçalho do celular já é compacto (logo + idioma + menu): o link
     "Voltar ao site" passa para dentro da faixa de título */
  .site-header .ct-back { display: none; }
  .ct-back-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    margin: -8px 0 4px;
    padding: 0 10px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
  }
  .ct-back-hero .ct-l { display: none; }
  html:lang(pt-BR) .ct-back-hero .ct-pt,
  html:lang(es) .ct-back-hero .ct-es,
  html:lang(en) .ct-back-hero .ct-en { display: inline; }

  .inst-hero { padding: 16px 0 22px; }
  .inst-card { margin: 20px auto; padding: 24px 20px; }
}

@media (max-width: 899px) {
  /* Botão do menu: área de toque de 44 px sem mudar o desenho */
  .menu-toggle { position: relative; }
  .menu-toggle::after { content: ""; position: absolute; inset: -4px; }
  /* Links do rodapé com área de toque confortável */
  .site-footer a { display: inline-block; padding: 12px 6px; }
}
