/* Trizz Soluções em Energia — folha de estilos única
   Tokens de marca: roxo #59009E, laranja #FF8B00 (extraídos da logo oficial) */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
}

:root {
  --roxo: #59009e;
  --roxo-profundo: #1c0533;
  --roxo-medio: #3a0a68;
  --laranja: #ff8b00;
  --fundo: #f6f4fa;
  --branco: #ffffff;
  --tinta: #1a1324;
  --tinta-suave: #4d4459;
  --linha: #dcd5e8;
  --linha-escura: rgba(255, 255, 255, 0.16);

  --largura: 1180px;
  --texto: 68ch;
  --raio: 6px;

  --f-base: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* escala tipográfica (razão ~1,25) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.375rem;
  --t-xl: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --t-xxl: clamp(2.4rem, 1.4rem + 4.2vw, 4.6rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-base);
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--tinta);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--roxo); text-underline-offset: 3px; }
a:hover { color: var(--roxo-medio); }

:focus-visible {
  outline: 3px solid var(--laranja);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(100% - 2.5rem, var(--largura)); margin-inline: auto; }

.pular {
  position: absolute; left: -999px; top: 0;
  background: var(--laranja); color: var(--tinta); padding: .6rem 1rem; z-index: 100;
}
.pular:focus { left: 1rem; top: 1rem; }

/* ---------- Títulos ---------- */
h1, h2, h3 {
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
h1 { font-size: var(--t-xxl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); font-stretch: 112%; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: var(--texto); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: inherit; font-weight: 700; font-size: var(--t-sm);
  padding: .9rem 1.4rem; border-radius: var(--raio);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--laranja { background: var(--laranja); color: var(--tinta); }
.btn--laranja:hover { background: #ffa033; color: var(--tinta); }
.btn--contorno { border-color: currentColor; color: inherit; }
.btn--contorno:hover { background: rgba(255,255,255,.08); color: inherit; }
.btn--roxo { background: var(--roxo); color: #fff; }
.btn--roxo:hover { background: var(--roxo-medio); color: #fff; }

/* ---------- Cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(28, 5, 51, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha-escura);
  color: #fff;
}
.topo .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.topo__marca img { height: 40px; width: auto; }
.topo nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.topo nav a { color: #e9e0f5; text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.topo nav a:hover, .topo nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--laranja); text-decoration-thickness: 2px; }
.topo .btn { padding: .6rem 1rem; }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
.menu-btn svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .topo nav {
    position: absolute; inset: 72px 0 auto 0;
    background: var(--roxo-profundo); border-bottom: 1px solid var(--linha-escura);
    display: none;
  }
  .topo nav.aberto { display: block; }
  .topo nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .topo nav a { display: block; padding: .8rem 0; font-size: var(--t-md); border-bottom: 1px solid var(--linha-escura); }
  .topo__cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--roxo-profundo);
  color: #fff;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 { color: #fff; }
.hero__lead { font-size: var(--t-lg); line-height: 1.45; color: #ddd0ee; margin-top: 1.5rem; max-width: 34ch; }
.hero__acoes { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero__rodape { margin-top: 2.6rem; font-size: var(--t-sm); color: #b7a6cf; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.hero__rodape span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__rodape svg { width: 16px; height: 16px; color: var(--laranja); }

/* Diagrama unifilar */
.unifilar { width: 100%; height: auto; }
.unifilar .fio { fill: none; stroke: #c9b6e6; stroke-width: 2; stroke-linecap: round; }
.unifilar .barra { stroke: var(--laranja); stroke-width: 5; stroke-linecap: round; fill: none; }
.unifilar .simb { fill: none; stroke: #fff; stroke-width: 2; }
.unifilar .disj { fill: var(--roxo-profundo); stroke: #fff; stroke-width: 2; }
.unifilar text { font-family: var(--f-base); fill: #fff; }
.unifilar .rot { font-size: 15px; font-weight: 700; font-stretch: 112%; }
.unifilar .sub { font-size: 11.5px; fill: #b7a6cf; }
.unifilar .tec { font-size: 11px; fill: #b7a6cf; }
.unifilar .carga { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.28); stroke-width: 1; }

/* Animação única: o diagrama "energiza" ao carregar */
@media (prefers-reduced-motion: no-preference) {
  .unifilar .desenha { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); animation: tracar 1.1s cubic-bezier(.6,0,.2,1) forwards; animation-delay: var(--d, 0s); }
  .unifilar .aparece { opacity: 0; animation: surgir .5s ease-out forwards; animation-delay: var(--d, 0s); }
}
@keyframes tracar { to { stroke-dashoffset: 0; } }
@keyframes surgir { to { opacity: 1; } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__diagrama { order: 2; }
}

/* ---------- Seções ---------- */
.secao { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.secao--branca { background: var(--branco); }
.secao--escura { background: var(--roxo-profundo); color: #fff; }
.secao__cabeca { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.secao__cabeca p { color: var(--tinta-suave); margin: 0; }
.secao--escura .secao__cabeca p { color: #cdbde3; }
@media (max-width: 800px) { .secao__cabeca { grid-template-columns: 1fr; } }

/* ---------- Serviços (lista técnica) ---------- */
.servicos { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--tinta); }
.servico {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, .9fr);
  gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--linha); align-items: start;
}
.servico__icone { width: 44px; height: 44px; color: var(--roxo); }
.servico h3 { margin-bottom: .4rem; }
.servico__resumo { color: var(--tinta-suave); font-size: var(--t-sm); margin: 0; }
.servico ul { margin: 0; padding-left: 1.1rem; font-size: var(--t-sm); color: var(--tinta); }
.servico li { margin-bottom: .3rem; }
.servico li::marker { color: var(--laranja); }
.servico__normas { font-size: var(--t-xs); color: var(--tinta-suave); line-height: 1.5; }
.servico__normas strong { display: block; color: var(--tinta); font-weight: 600; margin-bottom: .25rem; }
@media (max-width: 960px) { .servico { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- Setores ---------- */
.setores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 3rem; }
@media (max-width: 900px) { .setores { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .setores { grid-template-columns: 1fr; } }
.setor { padding: 1.4rem 0 1.8rem; border-top: 1px solid var(--linha-escura); }
.setor svg { width: 34px; height: 34px; color: var(--laranja); margin-bottom: 1.1rem; }
.setor h3 { font-size: var(--t-md); font-stretch: 112%; margin-bottom: .5rem; color: #fff; }
.setor p { font-size: var(--t-sm); color: #cdbde3; margin: 0; }

/* ---------- Processo (sequência real) ---------- */
.processo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: etapa; position: relative; }
.processo::before { content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px; background: var(--linha); }
.etapa { counter-increment: etapa; position: relative; padding-right: 1.25rem; }
.etapa::before {
  content: counter(etapa); display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--roxo); color: #fff; font-weight: 800; font-stretch: 125%;
  position: relative; margin-bottom: 1.1rem;
}
.etapa h3 { font-size: var(--t-md); margin-bottom: .4rem; }
.etapa p { font-size: var(--t-sm); color: var(--tinta-suave); margin: 0; }
@media (max-width: 900px) {
  .processo { grid-template-columns: 1fr; gap: 1.6rem; }
  .processo::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; }
  .etapa { display: grid; grid-template-columns: 44px 1fr; column-gap: 1.1rem; }
  .etapa::before { grid-row: span 2; margin: 0; }
}

/* ---------- Sobre ---------- */
.sobre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sobre__texto h2 { margin-bottom: 1.4rem; }
.sobre__texto p { color: var(--tinta-suave); }
.compromissos { list-style: none; margin: 0; padding: 0; }
.compromissos li { padding: 1.2rem 0 1.2rem 2.2rem; border-bottom: 1px solid var(--linha); position: relative; }
.compromissos li:first-child { border-top: 1px solid var(--linha); }
.compromissos li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: 14px; height: 3px; background: var(--laranja); }
.compromissos strong { display: block; font-stretch: 112%; margin-bottom: .2rem; }
.compromissos span { font-size: var(--t-sm); color: var(--tinta-suave); }
@media (max-width: 860px) { .sobre { grid-template-columns: 1fr; } }

/* ---------- Contato ---------- */
.contato { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); }
.contato h2 { color: #fff; margin-bottom: 1.2rem; }
.contato__lista { list-style: none; margin: 2rem 0 0; padding: 0; }
.contato__lista li { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; padding: 1rem 0; border-top: 1px solid var(--linha-escura); }
.contato__lista svg { width: 24px; height: 24px; color: var(--laranja); margin-top: 2px; }
.contato__lista small { display: block; color: #b7a6cf; font-size: var(--t-xs); }
.contato__lista a { color: #fff; font-weight: 600; text-decoration: none; }
.contato__lista a:hover { text-decoration: underline; text-decoration-color: var(--laranja); }
.mapa { border: 0; width: 100%; height: 100%; min-height: 360px; border-radius: 8px; filter: grayscale(.25); }
@media (max-width: 860px) { .contato { grid-template-columns: 1fr; } }

/* ---------- Rodapé ---------- */
.rodape { background: #12021f; color: #a998c2; font-size: var(--t-sm); padding: 2.5rem 0; }
.rodape .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.rodape img { height: 34px; width: auto; }
.rodape a { color: #d9cdea; }

/* ---------- WhatsApp flutuante ---------- */
.zap {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 6px 18px rgba(18, 2, 31, .35);
}
.zap svg { width: 30px; height: 30px; }
.zap:hover { color: #fff; background: #1ebe5a; }

/* ---------- Página de cursos ---------- */
.hero--curto { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero--curto .wrap { grid-template-columns: 1fr; }
.hero--curto .hero__lead { max-width: 52ch; }
.curso { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.curso h2 { margin-bottom: 1rem; }
.curso__lead { font-size: var(--t-lg); line-height: 1.45; color: var(--tinta-suave); }
.modulos { list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: mod; border-top: 2px solid var(--tinta); }
.modulos li { counter-increment: mod; display: grid; grid-template-columns: 3.2rem 1fr; padding: 1.1rem 0; border-bottom: 1px solid var(--linha); }
.modulos li::before { content: counter(mod, decimal-leading-zero); font-weight: 800; font-stretch: 125%; color: var(--roxo); }
.modulos strong { display: block; font-stretch: 112%; }
.modulos span { font-size: var(--t-sm); color: var(--tinta-suave); }
.ficha { position: sticky; top: 96px; background: var(--branco); border: 1px solid var(--linha); border-top: 4px solid var(--laranja); border-radius: 8px; padding: 1.8rem; }
.ficha h3 { font-size: var(--t-md); margin-bottom: 1rem; }
.ficha dl { margin: 0 0 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; font-size: var(--t-sm); }
.ficha dt { color: var(--tinta-suave); }
.ficha dd { margin: 0; font-weight: 600; }
.ficha .btn { width: 100%; justify-content: center; }
.ficha small { display: block; margin-top: .9rem; color: var(--tinta-suave); font-size: var(--t-xs); }
.publico { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 1rem; }
.publico h3 { font-size: var(--t-md); margin-bottom: .5rem; }
.publico p { font-size: var(--t-sm); color: var(--tinta-suave); margin: 0; }
@media (max-width: 900px) { .curso { grid-template-columns: 1fr; } .ficha { position: static; } }

/* ---------- Cursos compactos (página de cursos) ---------- */
.curso--compacto { padding-top: 2.5rem; margin-top: 2.5rem; border-top: 1px solid var(--linha); }
.secao__cabeca + .curso--compacto { border-top: 0; margin-top: 0; padding-top: 0; }
.curso__titulo { font-size: var(--t-xl); font-stretch: 125%; font-weight: 800; line-height: 1.08; margin: .4rem 0 1rem; }
.hero--curto .hero__acoes { margin-top: 1.8rem; }
.hero--curto .btn--contorno { color: #fff; }

/* ---------- Classes de tensão ---------- */
.tensoes { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tensoes li { font-size: var(--t-xs); font-weight: 700; color: var(--roxo); border: 1.5px solid var(--linha); border-radius: 999px; padding: .2rem .6rem; font-variant-numeric: tabular-nums; }
.servico ul.tensoes { padding-left: 0; margin-top: 1rem; }
.servico ul.tensoes li { margin: 0; }
.servico ul.tensoes li::marker { content: none; }

/* ---------- Cursos (home) ---------- */
.curso-destaque { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: end;
  background: var(--roxo); color: #fff; border-radius: 10px; padding: clamp(2rem, 4.5vw, 3.25rem); position: relative; overflow: hidden; }
.curso-destaque::after { content: ""; position: absolute; right: -40px; top: -50px; width: 260px; height: 220px;
  background: url("../img/avatar-trizz-branco.png") no-repeat center / contain; opacity: .07; pointer-events: none; }
.curso-destaque h3 { color: #fff; font-size: var(--t-xl); font-stretch: 125%; font-weight: 800; line-height: 1.06; }
.curso-destaque p { color: #e6dcf3; margin-bottom: 1.4rem; }
.curso-destaque > div { position: relative; z-index: 1; }
.cursos-lista { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.cursos-lista li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto auto; gap: 1rem 2rem; align-items: baseline;
  padding: 1.3rem 0; border-bottom: 1px solid var(--linha); }
.cursos-lista li:first-child { border-top: 1px solid var(--linha); }
.cursos-lista h3 { font-size: var(--t-md); }
.cursos-lista p { margin: 0; font-size: var(--t-sm); color: var(--tinta-suave); }
.cursos-lista .status { font-size: var(--t-xs); font-weight: 700; color: var(--roxo); white-space: nowrap; }
.cursos-lista a { font-weight: 700; font-size: var(--t-sm); white-space: nowrap; }
@media (max-width: 860px) {
  .curso-destaque { grid-template-columns: 1fr; }
  .cursos-lista li { grid-template-columns: 1fr auto; }
  .cursos-lista p { grid-column: 1 / -1; grid-row: 2; }
}
/* Diagrama no celular: só barramento e circuitos */
@media (max-width: 600px) { .unifilar .entrada { display: none; } }

/* ---------- Selos de status ---------- */
.selo { display: inline-block; background: var(--laranja); color: var(--tinta); font-size: var(--t-xs); font-weight: 700; padding: .25rem .6rem; border-radius: 3px; margin-bottom: 1rem; }
.selo--suave { background: transparent; color: var(--roxo); border: 1.5px solid var(--roxo); }
