/*
 * Estilos compartilhados — Site institucional KTM Participações e Administração de Bens LTDA
 * Frente: Programação. Construído sobre as variáveis definidas em tokens.css
 * (NÃO duplicar valores de cor/tipografia aqui — sempre referenciar var(--...)).
 *
 * Índice:
 *   1. Reset / base
 *   2. Tipografia
 *   3. Layout (container, seções)
 *   4. Header / navegação
 *   5. Footer
 *   6. Botões
 *   7. Logos (com fallback gracioso)
 *   8. Hero
 *   9. Cards (Home — grid de empresas)
 *  10. Blocos de diferenciais / áreas de atuação
 *  11. Ybura — sub-cards de empreendimentos
 *  12. CTA de saída (site externo)
 *  13. Formulário de contato
 *  14. Utilitários e responsividade
 */

/* 1. Reset / base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--site-navy); color: #fff; }

/* Foco visível e consistente em qualquer elemento interativo. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--site-navy);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Revelação ao rolar — JS adiciona .is-visible via IntersectionObserver;   */
/* sem JS ou com reduced-motion, o conteúdo já nasce visível (ver main.js). */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* 2. Tipografia ------------------------------------------------------ */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  line-height: var(--lh-heading);
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: 0; }
p { margin: 0 0 var(--space-3); color: var(--site-text); max-width: var(--measure); text-wrap: pretty; }
.lead { font-size: var(--fs-lead); color: var(--site-text-muted); }
.text-muted { color: var(--site-text-muted); }
.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-emphasis);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 3. Layout ----------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
@media (min-width: 1024px) {
  .container { padding: 0 var(--space-5); }
}
.section {
  padding: var(--space-6) 0;
}
@media (min-width: 1024px) {
  .section { padding: var(--space-8) 0; }
}
.section--alt { background: var(--site-bg-alt); }
.section-heading { text-align: center; margin-bottom: var(--space-5); }
.two-col {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 1024px) {
  .two-col { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* 4. Header / navegação ------------------------------------------------ */
.site-header {
  background: var(--site-navy);
  color: var(--site-on-navy);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  gap: var(--space-3);
}
.brand-link { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--site-on-navy); }
.brand-link .logo-wrap { width: 136px; height: 64px; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  font-size: 1.125rem;
}
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: var(--space-2);
}
.nav-toggle-label span { width: 22px; height: 2px; background: var(--site-on-navy); display: block; }
.main-nav {
  display: none;
  width: 100%;
}
.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}
.main-nav a {
  text-decoration: none;
  font-weight: var(--fw-emphasis);
  display: block;
  padding: var(--space-2) 0;
}
.main-nav a:hover, .main-nav a:focus { color: var(--site-gold); }
.nav-dropdown { border: none; }
.nav-dropdown summary {
  cursor: pointer;
  font-weight: var(--fw-emphasis);
  padding: var(--space-2) 0;
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: " ▾"; }
.nav-dropdown[open] summary::after { content: " ▴"; }
.nav-dropdown ul { padding-left: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.nav-dropdown ul a { font-weight: var(--fw-body); font-size: var(--fs-small); }
.nav-toggle-checkbox:checked ~ .main-nav { display: block; }
@media (min-width: 1024px) {
  .nav-toggle-label { display: none; }
  .main-nav { display: block; width: auto; }
  .main-nav ul { flex-direction: row; align-items: center; gap: var(--space-5); padding: 0; }
  .main-nav a { padding: var(--space-1) 0; }
  .nav-dropdown { position: relative; }
  .nav-dropdown ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--site-navy);
    padding: var(--space-2) var(--space-3);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }
}
/* Entre 1024 e 1199 px, o menu de 6 itens mais as bandeiras só cabe em uma linha se for mais compacto */
@media (min-width: 1024px) and (max-width: 1199px) {
  .main-nav > ul { gap: var(--space-3); font-size: var(--fs-small); }
  .main-nav > ul > li { white-space: nowrap; }
}

/* 5. Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--site-navy);
  color: var(--site-on-navy);
  padding: var(--space-6) 0;
  margin-top: 0;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.footer-brand .logo-wrap { width: 128px; height: 60px; }
.footer-brand strong { font-family: var(--font-heading); }
.footer-companies { margin-bottom: var(--space-3); color: #C9CDD6; font-size: var(--fs-small); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-3); }
.footer-nav a { text-decoration: none; font-size: var(--fs-small); }
.footer-nav a:hover { color: var(--site-gold); }
.footer-copy { font-size: var(--fs-small); color: #9AA2B1; }

/* 6. Botões -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-emphasis);
  font-size: var(--fs-body);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-button);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.btn--primary { background: var(--site-gold); color: var(--site-navy); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--navy { background: var(--site-navy); color: var(--site-on-navy); }
.btn--navy:hover { filter: brightness(1.15); }
.btn--outline {
  background: transparent;
  color: var(--brand-2, var(--site-navy));
  border-color: var(--brand-2, var(--site-navy));
}
.btn--outline:hover { background: var(--brand-2, var(--site-navy)); color: #fff; transform: translateX(2px); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* 7. Logos (com fallback gracioso) --------------------------------------- */
.logo-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--brand-1, var(--site-navy));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  font-size: 0.75em;
  border-radius: var(--radius-card);
  text-align: center;
  padding: var(--space-1);
}
.logo-wrap--hero { width: min(360px, 86%); height: 130px; margin-bottom: var(--space-3); }
.logo-wrap--card { width: 96px; height: 96px; margin-bottom: var(--space-2); }
@media (min-width: 1024px) {
  .logo-wrap--hero { width: min(460px, 86%); height: 170px; }
}

/* Brilho branco em volta da logo (sem caixa) sempre que o fundo ao redor for escuro:
   várias logos têm traços navy/preto que sumiriam no navy do cabeçalho, do rodapé e
   do hero de cada marca. O drop-shadow acompanha o contorno da logo, como uma luz. */
.site-header .logo-wrap img,
.site-footer .logo-wrap img,
.hero--brand .logo-wrap--hero img  {
  filter: drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 0 7px rgba(255,255,255,.6)) drop-shadow(0 0 16px rgba(255,255,255,.3));
}

/* 8. Hero ------------------------------------------------------------------ */
.hero {
  background: var(--site-navy);
  color: var(--site-on-navy);
  text-align: center;
  padding: var(--space-7) 0;
}
.hero p { color: #D7DBE3; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero h1 { color: var(--site-on-navy); }
.hero--brand {
  background: var(--brand-1, var(--site-navy));
  color: #fff;
}
.hero--brand h1 { color: #fff; font-size: var(--fs-display); }
.hero--brand p { color: rgba(255,255,255,0.85); font-size: var(--fs-lead); }
.hero--brand .logo-fallback { background: var(--brand-2, var(--site-gold)); color: #1A1A1A; }
.page-title-band {
  background: var(--site-bg-alt);
  padding: var(--space-6) 0;
  text-align: center;
}
.page-title-band p { max-width: 640px; margin: 0 auto; color: var(--site-text-muted); }

/* 10. Áreas de atuação — lista editorial, não cards clonados ------------------ */
/* Fatos paralelos e curtos cabem melhor numa lista alinhada do que em caixas    */
/* repetidas com ícone decorativo; o rótulo entra como cor no título (a cor      */
/* cumpre um papel — identidade da marca — em vez de decorar uma bolinha vazia). */
.feature-list { display: flex; flex-direction: column; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--site-border);
}
.feature-row:first-child { border-top: none; padding-top: 0; }
.feature-row h3 { color: var(--brand-1, var(--site-navy)); margin: 0; }
.feature-row p { margin: 0; color: var(--site-text-muted); max-width: 52ch; }
.feature-row--accent { border-top-color: var(--brand-2, var(--site-border)); }
@media (min-width: 768px) {
  .feature-row { grid-template-columns: minmax(200px, 300px) 1fr; gap: var(--space-5); align-items: baseline; }
}
.feature-group-title { margin-top: var(--space-6); margin-bottom: var(--space-2); }
.feature-group-title:first-child { margin-top: 0; }

/* 11. Ybura — sub-cards de empreendimentos ------------------------------------ */
.subcard-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .subcard-grid { grid-template-columns: 1fr 1fr; } }
.subcard {
  background: color-mix(in srgb, var(--brand-1) 7%, var(--site-bg));
  border: 1px solid var(--site-border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.subcard h3 { color: var(--brand-2); }
.subcard--bc { --brand-1: var(--ybura-bc-gold); --brand-2: var(--ybura-bc-green); }
.subcard--eco { --brand-1: var(--ybura-eco-blue); --brand-2: var(--ybura-eco-green); }
.subcard--agro { --brand-1: var(--ybura-agro-navy); --brand-2: var(--ybura-agro-green); }

/* 12. CTA de saída ------------------------------------------------------------ */
.exit-cta {
  border-radius: var(--radius-card);
  padding: var(--space-6);
  text-align: center;
  background: color-mix(in srgb, var(--brand-1, var(--site-navy)) 8%, var(--site-bg));
}
.exit-cta p { margin-bottom: var(--space-3); font-size: var(--fs-lead); max-width: none; }

/* 13. Formulário de contato ----------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.2fr 1fr; } }
.form-field { margin-bottom: var(--space-4); }
.form-field label {
  display: block;
  font-weight: var(--fw-emphasis);
  margin-bottom: var(--space-1);
  font-size: var(--fs-small);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--site-border);
  border-radius: var(--radius-button);
  background: var(--site-bg);
  color: var(--site-text);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--site-gold);
  outline-offset: 1px;
}
.contact-info h3 { margin-top: var(--space-5); }
.contact-info h3:first-child { margin-top: 0; }
.contact-info ul { display: flex; flex-direction: column; gap: var(--space-1); }
.contact-info a { text-decoration: none; font-weight: var(--fw-emphasis); }
.contact-info a:hover { color: var(--site-navy); text-decoration: underline; }
.map-placeholder {
  margin-top: var(--space-5);
  height: 200px;
  border-radius: var(--radius-card);
  background: var(--site-bg-alt);
  border: 1px dashed var(--site-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-text-muted);
  font-size: var(--fs-small);
  text-align: center;
  padding: var(--space-3);
}

/* 14. Utilitários / responsividade ------------------------------------------------ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* 15. Área restrita (login + painel) ---------------------------------------------- */
[hidden] { display: none !important; }
.auth-panel { max-width: 560px; }
.auth-panel #google-button { margin: var(--space-4) 0 var(--space-3); min-height: 44px; }
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--site-border);
  margin-bottom: var(--space-5);
}
.dash-head h1 { margin-bottom: var(--space-1); }
.dash-head p { margin: 0; overflow-wrap: anywhere; }
.dash-empty {
  border: 1px dashed var(--site-border);
  border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.dash-empty p { margin: 0 auto; color: var(--site-text-muted); }

/* 16. Home — hero e organograma do grupo ---------------------------------------------- */
.home-hero {
  background-color: #0B1730;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #0E1B36 0%, #0B1730 100%);
  color: #fff;
  padding: var(--space-8) 0 var(--space-7);
  border-bottom: 3px solid var(--site-gold);
}
@media (min-width: 900px) {
  .home-hero { padding: var(--space-9) 0 var(--space-8); }
}
.home-hero h1 {
  color: #fff;
  font-size: var(--fs-display);
  max-width: 16ch;
  margin-bottom: var(--space-4);
}
.home-hero .lead { color: #C9CFDB; max-width: 52ch; margin-bottom: var(--space-5); }

.structure-intro { color: var(--site-text-muted); max-width: 56ch; margin-bottom: var(--space-6); }
.structure-root { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); position: relative; padding-bottom: var(--space-6); text-align: center; }
.structure-root img { height: 96px; width: auto; }
.structure-root p { margin: 0; color: var(--site-text-muted); font-size: var(--fs-small); }
.structure-nodes { display: grid; grid-template-columns: 1fr; gap: var(--space-5); position: relative; }
.node { position: relative; }
.node-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.node-logo { display: flex; align-items: center; height: 88px; width: 100%; }
.node-logo img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.node-sector { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: var(--fw-heading); line-height: 1.2; color: var(--site-navy); }
.node-desc { color: var(--site-text-muted); font-size: var(--fs-small); flex-grow: 1; }
.node-cta { font-weight: var(--fw-emphasis); font-size: var(--fs-small); color: var(--site-navy); border-bottom: 1px solid var(--site-gold); padding-bottom: 1px; }
.node-link:hover .node-cta, .node-link:focus-visible .node-cta { border-bottom-color: var(--site-navy); }

/* celular: linha vertical dourada ligando as empresas à holding */
.structure-nodes { border-left: 1px solid var(--site-gold); margin-left: var(--space-2); padding-left: var(--space-4); }
.node::before { content: ""; position: absolute; left: calc(-1 * var(--space-4)); top: 44px; width: var(--space-3); height: 1px; background: var(--site-gold); }
.structure-root { align-items: flex-start; text-align: left; padding-bottom: var(--space-4); }

@media (min-width: 1024px) {
  .structure-root { align-items: center; text-align: center; padding-bottom: var(--space-6); }
  .structure-root::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: var(--space-6); background: var(--site-gold); }
  .structure-nodes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); border-left: none; margin-left: 0; padding: var(--space-6) 0 0; }
  .node::before { top: calc(-1 * var(--space-6)); left: calc(var(--space-4) / -2); right: calc(var(--space-4) / -2); width: auto; height: 1px; }
  .node:first-child::before { left: 50%; }
  .node:last-child::before { right: 50%; }
  .node::after { content: ""; position: absolute; top: calc(-1 * var(--space-6)); left: 50%; width: 1px; height: var(--space-6); background: var(--site-gold); }
  .node-link { align-items: center; text-align: center; }
  .node-logo { justify-content: center; }
}

/* 17. Primeira dobra: texto à esquerda + composição da KTM conectada às cinco empresas ----- */
.hero-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: var(--space-7); }
}
.hero-map { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; margin-inline: auto; }
.hero-map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hm-line { fill: none; stroke: var(--site-gold); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hm-ktm, .hm-node {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0E1B36;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: var(--radius-card);
  padding: 2.2%;
}
.hm-ktm { width: 30%; z-index: 2; border-color: var(--site-gold); padding: 2.6%; }
.hm-ktm img { width: 100%; height: auto; }
.hm-node { width: 26%; height: 14.5%; z-index: 1; text-decoration: none; transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.hm-node img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 6px rgba(255,255,255,.5)) drop-shadow(0 0 12px rgba(255,255,255,.22)); }
.hm-node:hover, .hm-node:focus-visible { border-color: var(--site-gold); box-shadow: 0 0 0 1px var(--site-gold), 0 8px 22px rgba(0,0,0,.35); transform: translate(-50%, calc(-50% - 3px)); }
.hm-node:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* KTM com letras claras sobre azul: sem brilho, a própria logo já contrasta */
.site-header .brand-link img, .site-footer .footer-brand img { filter: none; }

/* Entrada suave: só quando a pessoa não pediu movimento reduzido. Sem isso (ou sem JS/CSS de animação)
   o estado final já é o padrão, então o conteúdo aparece completo e estático. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: hm-rise .7s var(--ease-out) backwards; }
  .hero-copy > .lead { animation-delay: .12s; }
  .hero-copy > .btn-row { animation-delay: .24s; }
  .hm-ktm { animation: hm-pop .8s var(--ease-out) .3s backwards; }
  .hm-line { animation: hm-draw 1s var(--ease-out) backwards; }
  .hm-line:nth-of-type(1) { animation-delay: .9s; }
  .hm-line:nth-of-type(2) { animation-delay: 1.05s; }
  .hm-line:nth-of-type(3) { animation-delay: 1.2s; }
  .hm-line:nth-of-type(4) { animation-delay: 1.35s; }
  .hm-line:nth-of-type(5) { animation-delay: 1.5s; }
  .hm-node { animation: hm-pop .7s var(--ease-out) backwards; }
  .hm-node:nth-of-type(1) { animation-delay: 1.2s; }
  .hm-node:nth-of-type(2) { animation-delay: 1.35s; }
  .hm-node:nth-of-type(3) { animation-delay: 1.5s; }
  .hm-node:nth-of-type(4) { animation-delay: 1.65s; }
  .hm-node:nth-of-type(5) { animation-delay: 1.8s; }
}
@keyframes hm-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes hm-draw { from { stroke-dashoffset: 1; } }
@keyframes hm-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } }

/* Respostas discretas em botões e blocos */
.btn { transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14,27,54,.18); }
.btn:active { transform: none; box-shadow: none; }
.node-logo img { max-width: 190px; max-height: 76px; transition: transform var(--dur-2) var(--ease-out); }
.node-link:hover .node-logo img, .node-link:focus-visible .node-logo img { transform: scale(1.04); }
.structure-root img { height: auto; width: min(260px, 70%); }

/* 18. Em campo (fotos reais) ---------------------------------------------------------------- */
.field-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 768px) { .field-grid { grid-template-columns: repeat(2, 1fr); } }
.field-item { margin: 0; }
.field-item.field-item--wide > img { aspect-ratio: 3.52 / 1; }
@media (min-width: 768px) { .field-item--wide { grid-column: 1 / -1; } }
.field-item .field-frame, .field-item > img { display: block; }
.field-item > img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-card); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.field-item:hover > img { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(14,27,54,.18); }
.field-item figcaption { margin-top: var(--space-2); color: var(--site-text-muted); font-size: var(--fs-small); }
.field-item figcaption strong { display: block; color: var(--site-navy); font-size: var(--fs-body); font-family: var(--font-heading); }

/* Loknet (azul médio) precisa de mais brilho para não se perder no azul do hero */
.hm-node[href*="loknet"] img { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 5px rgba(255,255,255,.95)) drop-shadow(0 0 12px rgba(255,255,255,.55)); }
.field-note { display: inline; margin-left: var(--space-1); font-size: 0.6875rem; color: var(--site-text-muted); opacity: .8; }

/* 19. Páginas internas: faixa de título escura e faixa de foto real ---------------------------- */
.page-title-band {
  background: linear-gradient(180deg, #0E1B36 0%, #0B1730 100%);
  border-bottom: 3px solid var(--site-gold);
  padding: var(--space-7) 0;
  text-align: left;
}
.page-title-band h1 { color: #fff; font-size: var(--fs-display); margin: 0 0 var(--space-2); }
.page-title-band p { color: #C9CFDB; margin: 0; max-width: 56ch; font-size: var(--fs-lead); }
.page-photo { margin: 0; background: #0B1730; }
.page-photo img { display: block; width: 100%; height: clamp(220px, 34vw, 420px); object-fit: cover; }
.page-photo figcaption { padding-block: var(--space-2); color: #B8C0D0; font-size: var(--fs-small); }

/* alvo de toque confortável e cursor de clique */
.btn { min-height: 44px; }
.btn, summary, .nav-toggle-label { cursor: pointer; }
@media (max-width: 1023px) {
  .main-nav a, .nav-dropdown summary { padding-block: var(--space-3); }
}
.section .container > h2:not(:first-child) { margin-top: var(--space-7); }

/* 20. Transições: páginas, rolagem e organograma -----------------------------------------------
   Tudo fica dentro de .motion (posta pelo main.js só quando não há pedido de movimento reduzido)
   ou de @media (prefers-reduced-motion: no-preference). Sem isso, o estado final é o padrão. */

/* Cabeçalho ganha sombra e linha dourada ao rolar (sem mudar a altura, para não pular o layout) */
.site-header { transition: box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--site-navy) 90%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 rgba(201, 162, 39, .55), 0 10px 28px rgba(5, 12, 28, .28);
}

/* Organograma e grupos: cada item entra na sua vez */
.motion .stagger:not(.structure-nodes):not(.is-visible) > *,
.motion .structure-nodes:not(.is-visible) .node-link { opacity: 0; }
.motion .stagger.is-visible:not(.structure-nodes) > *,
.motion .structure-nodes.is-visible .node-link { animation: rv-rise .75s var(--ease-out) calc(var(--i, 0) * 90ms + .1s) backwards; }
.motion .structure-nodes.is-visible .node-link { animation-delay: calc(var(--i, 0) * 90ms + .55s); }
.motion .stagger.reveal { opacity: 1; transform: none; }

/* Linhas douradas do organograma desenhadas: tronco, ramo e descida */
.motion .structure-root:not(.is-visible)::after { transform: scaleY(0); }
.motion .structure-root.is-visible::after { transform-origin: top; animation: rv-grow-y .45s var(--ease-out) backwards; }
.motion .structure-nodes:not(.is-visible) .node::before { transform: scaleX(0); }
.motion .structure-nodes:not(.is-visible) .node::after { transform: scaleY(0); }
.motion .structure-nodes.is-visible .node::before { transform-origin: left; animation: rv-grow-x .5s var(--ease-out) calc(var(--i, 0) * 90ms + .1s) backwards; }
.motion .structure-nodes.is-visible .node::after { transform-origin: top; animation: rv-grow-y .4s var(--ease-out) calc(var(--i, 0) * 90ms + .35s) backwards; }
@media (min-width: 1024px) {
  .motion .structure-nodes.is-visible .node::before { transform-origin: center; }
}

/* Títulos de seção sobem de dentro de uma máscara */
.motion .section:not(.sec-in) h2 { clip-path: inset(-20% -5% 100% -5%); }
.motion .section.sec-in h2 { animation: rv-mask .8s var(--ease-out) backwards; }

/* Fotos: abrem como uma janela e se acomodam */
.motion .field-grid:not(.is-visible) .field-item > img { clip-path: inset(8% 8% 8% 8% round var(--radius-card)); }
.motion .field-grid.is-visible .field-item > img { animation: rv-window 1.1s var(--ease-out) calc(var(--i, 0) * 120ms + .1s) backwards; }
.page-photo { overflow: hidden; }
.motion .page-photo:not(.is-visible) img { clip-path: inset(0 50% 0 50%); }
.motion .page-photo.is-visible img { animation: rv-curtain 1.1s var(--ease-out) .15s backwards; }

.motion .exit-cta:not(.is-visible) { opacity: 0; }
.motion .exit-cta.is-visible { animation: rv-rise .7s var(--ease-out) backwards; }

@keyframes rv-rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes rv-grow-x { from { transform: scaleX(0); } }
@keyframes rv-grow-y { from { transform: scaleY(0); } }
@keyframes rv-mask { from { clip-path: inset(-20% -5% 100% -5%); transform: translateY(.35em); } to { clip-path: inset(-20% -5% -20% -5%); transform: none; } }
@keyframes rv-window { from { clip-path: inset(8% 8% 8% 8% round var(--radius-card)); opacity: .4; } to { clip-path: inset(0 0 0 0 round var(--radius-card)); opacity: 1; } }
@keyframes rv-curtain { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }

/* Primeira dobra: luz percorrendo as linhas douradas e linha acesa ao passar o mouse na empresa */
.hm-pulse { fill: none; stroke: #F6E3A1; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .07 1.2; stroke-dashoffset: .07; opacity: 0; }
.hm-line { transition: stroke var(--dur-1) var(--ease-out), stroke-width var(--dur-1) var(--ease-out); }
.hero-map:has(.hm-node:nth-of-type(1):is(:hover, :focus-visible)) .hm-line:nth-of-type(1),
.hero-map:has(.hm-node:nth-of-type(2):is(:hover, :focus-visible)) .hm-line:nth-of-type(2),
.hero-map:has(.hm-node:nth-of-type(3):is(:hover, :focus-visible)) .hm-line:nth-of-type(3),
.hero-map:has(.hm-node:nth-of-type(4):is(:hover, :focus-visible)) .hm-line:nth-of-type(4),
.hero-map:has(.hm-node:nth-of-type(5):is(:hover, :focus-visible)) .hm-line:nth-of-type(5) { stroke: #F6E3A1; stroke-width: 2.5; }

@media (prefers-reduced-motion: no-preference) {
  .hm-pulse { animation: hm-flow 5.5s cubic-bezier(.45, 0, .25, 1) infinite; }
  .hm-pulse:nth-of-type(1) { animation-delay: 2.6s; }
  .hm-pulse:nth-of-type(2) { animation-delay: 3.7s; }
  .hm-pulse:nth-of-type(3) { animation-delay: 4.8s; }
  .hm-pulse:nth-of-type(4) { animation-delay: 5.9s; }
  .hm-pulse:nth-of-type(5) { animation-delay: 7s; }

  /* Passagem entre páginas: o cabeçalho fica parado e o conteúdo troca deslizando */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: vt-out .25s cubic-bezier(.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: vt-in .5s cubic-bezier(0.16, 1, 0.3, 1) .05s both; }
}
@keyframes hm-flow {
  0% { stroke-dashoffset: .07; opacity: 0; }
  8% { opacity: 1; }
  45% { stroke-dashoffset: -.95; opacity: 1; }
  52%, 100% { stroke-dashoffset: -.95; opacity: 0; }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* 21. Idiomas: bandeiras no cabeçalho (criadas por assets/js/i18n.js) ------------------------- */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.lang-switch button {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 36px; padding: 0;
  background: none; border: 0; border-radius: 4px; cursor: pointer;
  opacity: .55; transition: opacity var(--dur-1) var(--ease-out);
}
.lang-switch button svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.lang-switch button:hover, .lang-switch button[aria-pressed="true"] { opacity: 1; }
.lang-switch button[aria-pressed="true"] svg { box-shadow: 0 0 0 2px var(--site-gold); }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 1023px) {
  .site-header .container { flex-wrap: wrap; }
  .lang-switch { order: 1; }
  .nav-toggle-label { order: 2; }
  .main-nav { order: 3; }
}
@media (min-width: 1024px) {
  .main-nav { margin-left: auto; }
  .lang-switch { margin-left: var(--space-4); }
}
@media (max-width: 479px) {
  .site-header .container { gap: var(--space-2); }
  .brand-link .logo-wrap { width: 108px; height: 51px; }
  .lang-switch button { min-width: 28px; }
  .lang-switch button svg { width: 22px; height: 15px; }
}

/* Chinês e árabe: as fontes do site não têm esses caracteres; usa as do sistema */
html:lang(zh) {
  --font-heading: "Fraunces", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
html:lang(ar) {
  --font-heading: "Fraunces", "Geeza Pro", "Segoe UI", Tahoma, "Noto Naskh Arabic", serif;
  --font-body: "Public Sans", "Geeza Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
}
html:lang(ar) body * { letter-spacing: 0 !important; } /* espaçamento entre letras quebra a ligação do árabe */

/* Árabe: leitura da direita para a esquerda, layout espelhado */
[dir="rtl"] .nav-dropdown ul { padding-left: 0; padding-right: var(--space-3); }
[dir="rtl"] .btn--outline:hover { transform: translateX(-2px); }
[dir="rtl"] .structure-nodes { border-left: none; margin-left: 0; padding-left: 0; border-right: 1px solid var(--site-gold); margin-right: var(--space-2); padding-right: var(--space-4); }
[dir="rtl"] .node::before { left: auto; right: calc(-1 * var(--space-4)); }
[dir="rtl"] .structure-root, [dir="rtl"] .page-title-band { text-align: right; }
[dir="rtl"] .field-note { margin-left: 0; margin-right: var(--space-1); }
[dir="rtl"] .motion .structure-nodes.is-visible .node::before { transform-origin: right; }
[dir="rtl"] .lang-switch { margin-left: 0; margin-right: auto; }
@media (min-width: 1024px) {
  [dir="rtl"] .nav-dropdown ul { left: auto; right: 0; }
  [dir="rtl"] .main-nav { margin-left: 0; margin-right: auto; }
  [dir="rtl"] .lang-switch { margin-right: var(--space-4); }
  [dir="rtl"] .structure-root { text-align: center; }
  [dir="rtl"] .structure-nodes { border-right: none; margin-right: 0; padding: var(--space-6) 0 0; }
  [dir="rtl"] .node::before { left: calc(var(--space-4) / -2); right: calc(var(--space-4) / -2); }
  [dir="rtl"] .node:first-child::before { left: calc(var(--space-4) / -2); right: 50%; }
  [dir="rtl"] .node:last-child::before { right: calc(var(--space-4) / -2); left: 50%; }
  [dir="rtl"] .motion .structure-nodes.is-visible .node::before { transform-origin: center; }
}

/* 22. Primeira dobra em 3D (home) -----------------------------------------------------------
   O grupo3d.js põe .has-3d na primeira dobra quando o aparelho aguenta a cena. Sem essa classe
   (sem JS, sem WebGL, movimento reduzido, aparelho fraco) vale o mapa estático da seção 17. */
.g3d { display: none; position: relative; width: 100%; max-width: 600px; aspect-ratio: 1 / 1; margin-inline: auto; }
.home-hero.has-3d .g3d { display: block; }
.home-hero.has-3d .hero-grid { position: relative; }
/* O mapa estático sai da vista, mas os links continuam para teclado e leitor de tela */
.home-hero.has-3d .hero-map { position: absolute; width: 1px; height: 1px; max-width: none; margin: -1px; overflow: hidden; clip-path: inset(50%); }

.g3d-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: pan-y; /* rolar a página na vertical continua funcionando por cima da cena */
  cursor: grab;
  opacity: 0; transition: opacity .9s var(--ease-out);
}
.g3d.is-ready .g3d-canvas { opacity: 1; }
/* Tela larga: a cena pode passar um pouco da caixa do palco (fica maior sem mexer no layout) */
@media (min-width: 960px) {
  .home-hero.has-3d { overflow: hidden; }
  .g3d-canvas { inset: -12%; width: 124%; height: 124%; }
}
.g3d.is-dragging .g3d-canvas { cursor: grabbing; }

/* Contorno da logo que está com o foco do teclado (posicionado pelo grupo3d.js) */
.g3d-focus { position: absolute; left: 0; top: 0; border: 2px solid #fff; border-radius: var(--radius-card); box-shadow: 0 0 0 2px var(--site-gold); pointer-events: none; }

.g3d-btn {
  position: absolute; inset-inline-end: 0; top: 0; /* canto livre: as logos passam por baixo e pelos lados */
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%;
  background: rgba(11, 23, 48, .5); color: rgba(255, 255, 255, .75); cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.g3d-btn:hover { border-color: var(--site-gold); color: #F6E3A1; }
.g3d-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.g3d-btn[aria-pressed="true"] { background: var(--site-gold); border-color: var(--site-gold); color: var(--site-navy); }
.g3d-btn span { display: inline-flex; }
.g3d-btn .g3d-ico-play, .g3d-btn[aria-pressed="true"] .g3d-ico-pause { display: none; }
.g3d-btn[aria-pressed="true"] .g3d-ico-play { display: inline-flex; }

/* 23. Painel do grupo (área restrita): empresas, mercado e carteira simulada ------------------
   Tela escura, com fundo de constelação (canvas criado pelo painel.js) e cartões de vidro que
   inclinam com o mouse: o painel.js grava --rx/--ry (inclinação) e --gx/--gy (posição do brilho).
   Sem mouse, ou com "reduzir movimento", os cartões ficam parados e nada se perde. */
#signed-in {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 60% 40% at 78% 0%, rgba(201, 162, 39, .16) 0%, rgba(201, 162, 39, 0) 70%),
    radial-gradient(ellipse 70% 50% at 10% 30%, rgba(47, 92, 190, .28) 0%, rgba(47, 92, 190, 0) 70%),
    linear-gradient(180deg, #0E1B36 0%, #070F22 100%);
  color: #E6EAF2;
  border-bottom: 3px solid var(--site-gold);
}
#signed-in > .container { position: relative; z-index: 1; }
.dash-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#signed-in h1, #signed-in h2 { color: #fff; }
#signed-in .text-muted { color: #AEB7C8; }
#signed-in .dash-head { border-bottom-color: rgba(255, 255, 255, .14); }
#signed-in .btn--outline { color: #fff; border-color: rgba(255, 255, 255, .45); }
#signed-in .btn--outline:hover { background: var(--site-gold); border-color: var(--site-gold); color: var(--site-navy); }
#signed-in :focus-visible { outline-color: #fff; }

.dash-block { margin-top: var(--space-7); }
.dash-head + .dash-block { margin-top: 0; }
.dash-block > h2 { margin-bottom: var(--space-2); }
.dash-block > h2::after { content: ""; display: block; width: 44px; height: 2px; margin-top: var(--space-2); background: var(--site-gold); }
.dash-block > .text-muted { margin-bottom: var(--space-4); max-width: 68ch; }

/* Cartão de vidro com profundidade (empresas e números da carteira) */
.launch-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-4); }
@media (min-width: 1100px) { .launch-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); } }
.launch-grid > li, .sim-stats > div { perspective: 900px; }
.launch-card, .sim-stat {
  position: relative; height: 100%;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .03) 60%);
  box-shadow: 0 18px 40px rgba(2, 6, 18, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.launch-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-5) var(--space-4) var(--space-4); color: inherit; text-decoration: none; }
/* Brilho que segue o mouse */
.launch-card::before, .sim-stat::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .26) 0%, rgba(246, 227, 161, .1) 28%, rgba(255, 255, 255, 0) 58%);
  opacity: 0; transition: opacity .3s var(--ease-out);
}
.launch-card.is-tilting, .sim-stat.is-tilting { transition: transform .08s linear, border-color .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.launch-card:hover, .launch-card:focus-visible, .sim-stat:hover {
  border-color: rgba(201, 162, 39, .85);
  box-shadow: 0 30px 60px rgba(2, 6, 18, .6), 0 0 0 1px rgba(201, 162, 39, .35), 0 0 42px rgba(201, 162, 39, .22), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.launch-card:hover::before, .launch-card:focus-visible::before, .sim-stat:hover::before { opacity: 1; }
/* Camadas: cada parte do cartão fica a uma distância diferente da tela */
.launch-logo { display: flex; align-items: center; height: 76px; width: 100%; transform: translateZ(54px); }
.launch-logo img { max-height: 100%; max-width: 170px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 6px rgba(255,255,255,.5)) drop-shadow(0 0 12px rgba(255,255,255,.22)); }
.launch-card[href*="loknet"] .launch-logo img { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 5px rgba(255,255,255,.95)) drop-shadow(0 0 12px rgba(255,255,255,.55)); }
.launch-sector { font-family: var(--font-heading); font-weight: var(--fw-heading); line-height: 1.25; color: #fff; transform: translateZ(34px); }
.launch-status { font-size: 0.8125rem; white-space: nowrap; padding: 2px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .07); color: #C9D1E0; transform: translateZ(22px); }
.launch-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 6px; border-radius: 50%; background: var(--site-gold); vertical-align: middle; }
.launch-cta { margin-top: auto; padding-top: var(--space-3); font-size: var(--fs-small); font-weight: var(--fw-emphasis); color: #F6E3A1; transform: translateZ(40px); }
.launch-cta::after { content: " \2192"; }
[dir="rtl"] .launch-cta::after { content: " \2190"; }

/* Widgets do TradingView: a altura vem do contêiner */
.market-tape { min-height: 76px; margin-bottom: var(--space-3); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: rgba(255, 255, 255, .04); }
.market-chart { height: 520px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: 0 24px 60px rgba(2, 6, 18, .5); }
@media (max-width: 599px) { .market-chart { height: 420px; } }

.sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4); }
.sim-stat { padding: var(--space-4); }
.sim-stat dt { font-size: var(--fs-small); color: #AEB7C8; transform: translateZ(20px); }
.sim-stat dd { margin: var(--space-1) 0 0; font-family: var(--font-heading); font-size: 1.75rem; font-weight: var(--fw-heading); color: #fff; font-variant-numeric: tabular-nums; transform: translateZ(40px); }
.sim-table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: rgba(255, 255, 255, .04); }
.sim-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.sim-table th, .sim-table td { padding: 12px 14px; text-align: start; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sim-table tbody tr:last-child td { border-bottom: 0; }
.sim-table tbody tr { transition: background-color var(--dur-1) var(--ease-out); }
.sim-table tbody tr:hover { background: rgba(201, 162, 39, .1); }
.sim-table th { font-weight: var(--fw-emphasis); color: #AEB7C8; }
.sim-stat dd.sim-pos, .sim-table td.sim-pos { color: #6FE09A; }
.sim-stat dd.sim-neg, .sim-table td.sim-neg { color: #FF8F85; }
.sim-note { margin: var(--space-3) 0 0; font-size: var(--fs-small); color: #AEB7C8; }

/* Entrada: os cartões sobem girando, um depois do outro */
@media (prefers-reduced-motion: no-preference) {
  #signed-in .dash-block { animation: dash-rise .8s var(--ease-out) backwards; }
  #signed-in .dash-block:nth-of-type(2) { animation-delay: .12s; }
  #signed-in .dash-block:nth-of-type(3) { animation-delay: .24s; }
  #signed-in .dash-block:nth-of-type(4) { animation-delay: .36s; }
  .launch-grid > li { animation: dash-flip .9s var(--ease-out) backwards; }
  .launch-grid > li:nth-child(2) { animation-delay: .08s; }
  .launch-grid > li:nth-child(3) { animation-delay: .16s; }
  .launch-grid > li:nth-child(4) { animation-delay: .24s; }
  .launch-grid > li:nth-child(5) { animation-delay: .32s; }
}
@keyframes dash-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes dash-flip { from { opacity: 0; transform: perspective(900px) rotateX(-28deg) translateY(30px); } }

/* 24. Mercado na home: faixa escura com cotações e gráfico do TradingView ----------------------
   Os widgets são postos pelo assets/js/mercado.js em .market-tape e .market-chart (caixas da
   seção 23). Os botões .market-tab trocam o ativo do gráfico. */
.market-band {
  background:
    radial-gradient(ellipse 60% 40% at 78% 0%, rgba(201, 162, 39, .16) 0%, rgba(201, 162, 39, 0) 70%),
    radial-gradient(ellipse 70% 50% at 10% 30%, rgba(47, 92, 190, .28) 0%, rgba(47, 92, 190, 0) 70%),
    linear-gradient(180deg, #0E1B36 0%, #070F22 100%);
  color: #E6EAF2;
  border-top: 3px solid var(--site-gold);
  scroll-margin-top: 72px; /* o link "Mercado" do menu para aqui sem o cabeçalho fixo cobrir o título */
}
.market-band h2 { color: #fff; margin-bottom: var(--space-2); }
.market-band h2::after { content: ""; display: block; width: 44px; height: 2px; margin-top: var(--space-2); background: var(--site-gold); }
.market-band :focus-visible { outline-color: #fff; }
.market-intro { max-width: 68ch; margin-bottom: var(--space-4); color: #AEB7C8; }
.market-band .market-chart { box-shadow: 0 24px 60px rgba(2, 6, 18, .5), 0 0 0 1px rgba(201, 162, 39, .18), 0 0 60px rgba(201, 162, 39, .08); overflow: hidden; }
.market-band .market-tape { overflow: hidden; }

.market-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 var(--space-3); }
.market-tab {
  min-height: 44px; padding: 0 var(--space-4);
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-emphasis);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #E6EAF2; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.market-tab:hover { border-color: var(--site-gold); color: #fff; transform: translateY(-1px); }
.market-tab[aria-pressed="true"] { background: var(--site-gold); border-color: var(--site-gold); color: var(--site-navy); }
.market-tab:disabled { opacity: .45; cursor: default; transform: none; }

/* Entrada: cotações, botões e gráfico sobem um depois do outro */
.motion .market-band:not(.sec-in) .market-intro,
.motion .market-band:not(.sec-in) .market-tape,
.motion .market-band:not(.sec-in) .market-tabs,
.motion .market-band:not(.sec-in) .market-chart { opacity: 0; }
.motion .market-band.sec-in .market-intro { animation: rv-rise .75s var(--ease-out) .1s backwards; }
.motion .market-band.sec-in .market-tape { animation: rv-rise .75s var(--ease-out) .2s backwards; }
.motion .market-band.sec-in .market-tabs { animation: rv-rise .75s var(--ease-out) .3s backwards; }
.motion .market-band.sec-in .market-chart { animation: rv-rise .9s var(--ease-out) .4s backwards; }
