/* Trilha Redes — design "Sinal–Ruído" (hifi, recriado do protótipo Claude Design).
   Tokens: fundo #0a0a0f, superfícies #15151f/#1a1a26, bordas #26263a;
   texto #e8e8f0/#a9a9bd/#8a8a9e/#5a5a72/#2e2e44/#3a3a4e;
   acentos amarelo #f5e900 (hover #fff45c), ciano #00e5ff, vermelho #ff003c.
   Sem border-radius em lugar nenhum; cantos retos ou chanfrados via clip-path. */

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Overlay mais denso no centro: a imagem de fundo aparece com metade
     da opacidade na região central (12,5% → 6,25% de transparência do
     overlay) e mantém .875 nas bordas. */
  background: radial-gradient(ellipse 70% 70% at 50% 50%,
      rgba(10, 10, 15, .9375) 0%, rgba(10, 10, 15, .9375) 45%,
      rgba(10, 10, 15, .875) 100%),
    url('/static/img/bg.jpg') center top / cover no-repeat fixed, #0a0a0f;
  background-attachment: fixed;
  font-family: 'Rajdhani', system-ui, sans-serif;
  color: #e8e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mono { font-family: 'Share Tech Mono', monospace; }

/* ── Ticker de status ─────────────────────────────────────────── */
.ticker {
  background: #f5e900;
  color: #0a0a0f;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
}

/* Letreiro: a faixa carrega duas voltas idênticas do conteúdo e
   desliza para a direita; quando anda meia faixa (uma volta), o frame
   é idêntico ao inicial e o loop fecha sem emenda. */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-slide 28s linear infinite;
}

.ticker-grupo {
  display: flex;
  flex: none;
  gap: 32px;
  padding: 5px 16px;
}

@keyframes ticker-slide {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ── Header ───────────────────────────────────────────────────── */
header { border-bottom: 1px solid #26263a; }

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.marca { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }

.logo {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #e8e8f0;
  letter-spacing: .02em;
  text-shadow: 2px 0 #00e5ff, -2px 0 #ff003c;
  display: inline-block;
  animation: logo-glitch 3.2s infinite steps(1);
}

/* Glitch periódico: estável a maior parte do tempo, com um espasmo
   curto de deslocamento e inversão dos canais ciano/vermelho. */
@keyframes logo-glitch {
  0%, 88%, 100% { text-shadow: 2px 0 #00e5ff, -2px 0 #ff003c; transform: none; }
  89% { text-shadow: -3px 0 #00e5ff, 3px 0 #ff003c; transform: translateX(2px); }
  91% { text-shadow: 3px 1px #ff003c, -3px -1px #00e5ff; transform: translateX(-2px) skewX(-4deg); }
  93% { text-shadow: -2px -1px #00e5ff, 2px 1px #ff003c; transform: translateX(1px); }
  95% { text-shadow: 4px 0 #ff003c, -4px 0 #00e5ff; transform: skewX(3deg); }
  97% { text-shadow: 2px 0 #00e5ff, -2px 0 #ff003c; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
}

.sublogo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #8a8a9e;
  letter-spacing: .1em;
}

nav.principal {
  display: flex;
  gap: 28px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
}

nav.principal a {
  color: #8a8a9e;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

nav.principal a:hover { color: #e8e8f0; }

nav.principal a.ativo {
  color: #f5e900;
  border-bottom-color: #f5e900;
}

/* ── Container principal ──────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 48px 56px;
  display: flex;
  flex-direction: column;
}

/* ── View ÚLTIMO (hero) ───────────────────────────────────────── */
.meta-linha {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.meta-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #5a5a72;
  letter-spacing: .14em;
}

.meta-traco { width: 60px; height: 1px; background: #26263a; }

.tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  padding: 4px 10px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

.meta-data {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #8a8a9e;
  letter-spacing: .1em;
}

.hero-titulo {
  margin: 0 0 26px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.02;
  color: #e8e8f0;
  text-transform: uppercase;
  max-width: 980px;
  text-shadow: 3px 0 rgba(0, 229, 255, .55), -3px 0 rgba(255, 0, 60, .45);
}

.hero-lead {
  margin: 0 0 36px;
  font-size: 20px;
  line-height: 1.55;
  color: #a9a9bd;
  max-width: 640px;
}

/* Título e imagem do hero são links para o post (mesmo visual em
   qualquer estado — inclusive :visited, que o browser pintaria de
   roxo por padrão). */
.hero-titulo a,
.hero-titulo a:link,
.hero-titulo a:visited,
.hero-titulo a:active {
  color: #e8e8f0;
  text-decoration: none;
}

.hero-titulo a:hover { color: #fff45c; }

a.hero-img,
a.hero-img:link,
a.hero-img:visited {
  text-decoration: none;
  color: inherit;
}

.hero-img {
  position: relative;
  height: 380px;
  background: repeating-linear-gradient(45deg, #15151f 0 12px, #1a1a26 12px 24px);
  border: 1px solid #26263a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  overflow: hidden;
}

.hero-img::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 26px; height: 26px;
  border-top: 2px solid #f5e900;
  border-left: 2px solid #f5e900;
}

.hero-img::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 26px; height: 26px;
  border-bottom: 2px solid #f5e900;
  border-right: 2px solid #f5e900;
}

.hero-img > span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #5a5a72;
}

.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Com imagem real, o contêiner abandona a altura fixa e segue a
   proporção da arte: o banner aparece inteiro em qualquer resolução
   (inclusive mobile, que sobrescreve a altura do placeholder abaixo).
   As cópias de glitch (absolute) herdam a mesma caixa, sem crop. */
.hero-img:has(img) { height: auto; }
.hero-img:has(img) > img:first-of-type { height: auto; display: block; }

/* Glitch cyberpunk das imagens em destaque (hero da home, foto do
   Sobre): duas cópias da arte (canais vermelho e ciano, no espírito do
   split do logo) ficam invisíveis a maior parte do tempo e "espasmam"
   em fatias deslocadas, na mesma cadência de 3.2s do logo-glitch. */
.glitch-copy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glitch-copy.glitch-r {
  filter: grayscale(1) brightness(1.1) sepia(1) saturate(8) hue-rotate(-50deg);
  animation: hero-glitch-r 3.2s infinite steps(1);
}

.glitch-copy.glitch-c {
  filter: grayscale(1) brightness(1.1) sepia(1) saturate(8) hue-rotate(150deg);
  animation: hero-glitch-c 3.2s infinite steps(1);
}

@keyframes hero-glitch-r {
  0%, 88%, 100% { opacity: 0; }
  89% { opacity: .7; transform: translateX(6px); clip-path: polygon(0 8%, 100% 8%, 100% 22%, 0 22%); }
  91% { opacity: .7; transform: translateX(-8px); clip-path: polygon(0 55%, 100% 55%, 100% 63%, 0 63%); }
  93% { opacity: .6; transform: translateX(4px); clip-path: polygon(0 30%, 100% 30%, 100% 41%, 0 41%); }
  95% { opacity: .7; transform: translateX(-5px) skewX(-2deg); clip-path: polygon(0 74%, 100% 74%, 100% 86%, 0 86%); }
  97% { opacity: 0; }
}

@keyframes hero-glitch-c {
  0%, 88%, 100% { opacity: 0; }
  89% { opacity: .7; transform: translateX(-6px); clip-path: polygon(0 12%, 100% 12%, 100% 26%, 0 26%); }
  91% { opacity: .7; transform: translateX(7px); clip-path: polygon(0 48%, 100% 48%, 100% 58%, 0 58%); }
  93% { opacity: .6; transform: translateX(-4px) skewX(2deg); clip-path: polygon(0 34%, 100% 34%, 100% 44%, 0 44%); }
  95% { opacity: .7; transform: translateX(5px); clip-path: polygon(0 70%, 100% 70%, 100% 82%, 0 82%); }
  97% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .glitch-copy { animation: none; opacity: 0; }
}

/* ── Foto do autor na página Sobre ────────────────────────────── */
.sobre-foto {
  position: relative;
  float: right;
  width: 260px;
  margin: 6px 0 24px 32px;
  border: 1px solid #26263a;
  overflow: hidden;
}

.sobre-foto img { display: block; width: 100%; height: auto; filter: grayscale(1); }

.sobre-foto::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 22px; height: 22px;
  border-top: 2px solid #f5e900;
  border-left: 2px solid #f5e900;
  z-index: 1;
}

.sobre-foto::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 22px; height: 22px;
  border-bottom: 2px solid #f5e900;
  border-right: 2px solid #f5e900;
  z-index: 1;
}

.post-corpo::after { content: ''; display: block; clear: both; }

.hero-acoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f5e900;
  color: #0a0a0f;
  text-decoration: none;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  padding: 14px 28px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.cta:hover { background: #fff45c; }

.link-sec {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #8a8a9e;
  text-decoration: none;
  letter-spacing: .12em;
  cursor: pointer;
}

.link-sec:hover { color: #00e5ff; }

/* ── View ARQUIVO ─────────────────────────────────────────────── */
.arq-cab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.arq-cab .rotulo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #5a5a72;
  letter-spacing: .14em;
}

.arq-cab .pagina {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #8a8a9e;
  letter-spacing: .14em;
}

.arq-item {
  text-decoration: none;
  display: grid;
  grid-template-columns: 96px 1fr 120px;
  gap: 24px;
  align-items: center;
  padding: 22px 12px;
  border-top: 1px solid #26263a;
}

.arq-item:hover { background: rgba(16, 16, 24, .75); }

.arq-num {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #2e2e44;
}

.arq-meio { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.arq-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  padding: 3px 10px;
}

.arq-titulo {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  color: #e8e8f0;
  text-transform: uppercase;
}

.arq-resumo { font-size: 15px; line-height: 1.4; color: #8a8a9e; }

.arq-data {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #5a5a72;
  letter-spacing: .08em;
  text-align: right;
  line-height: 1.7;
}

.paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #26263a;
  padding-top: 20px;
}

.pg-nav {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: #00e5ff;
  text-decoration: none;
  cursor: pointer;
}

.pg-nav.desab { color: #3a3a4e; pointer-events: none; cursor: default; }

.pg-nums { display: flex; gap: 8px; }

.pg-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 12px;
  border: 1px solid #26263a;
  background: transparent;
  color: #8a8a9e;
  text-decoration: none;
  cursor: pointer;
}

.pg-btn.ativa {
  border-color: #f5e900;
  background: #f5e900;
  color: #0a0a0f;
}

/* ── Página do post (derivada dos tokens do design) ───────────── */
.post-topo { margin-bottom: 40px; }

.post-titulo {
  margin: 0 0 22px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.05;
  color: #e8e8f0;
  text-transform: uppercase;
  max-width: 980px;
  text-shadow: 3px 0 rgba(0, 229, 255, .55), -3px 0 rgba(255, 0, 60, .45);
}

.post-lead {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  color: #a9a9bd;
  max-width: 640px;
}

.post-corpo {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
  color: #a9a9bd;
}

.post-corpo h2, .post-corpo h3, .post-corpo h4 {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  color: #e8e8f0;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 44px 0 16px;
}

.post-corpo h2 { font-size: 28px; }

.post-corpo h2::before { content: '// '; color: #f5e900; }

.post-corpo h3 { font-size: 22px; }

.post-corpo a { color: #00e5ff; text-decoration: none; border-bottom: 1px solid rgba(0, 229, 255, .35); }

.post-corpo a:hover { border-bottom-color: #00e5ff; }

.post-corpo strong { color: #e8e8f0; }

.post-corpo code {
  font-family: 'Share Tech Mono', monospace;
  font-size: .85em;
  background: #15151f;
  border: 1px solid #26263a;
  padding: 1px 6px;
  color: #00e5ff;
}

.post-corpo pre {
  background: #15151f !important;
  border: 1px solid #26263a;
  border-left: 2px solid #00e5ff;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}

.post-corpo pre code { background: none; border: none; padding: 0; color: inherit; }

.post-corpo blockquote {
  margin: 24px 0;
  padding: 14px 22px;
  border-left: 2px solid #f5e900;
  background: rgba(21, 21, 31, .7);
  color: #8a8a9e;
}

.post-corpo blockquote p { margin: 0; }

.post-corpo table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 15px;
}

.post-corpo th {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f5e900;
  text-align: left;
}

.post-corpo th, .post-corpo td {
  border: 1px solid #26263a;
  padding: 10px 14px;
}

.post-corpo img { max-width: 100%; border: 1px solid #26263a; }

.post-corpo hr { border: none; border-top: 1px solid #26263a; margin: 40px 0; }

.post-rodape {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #26263a;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── Newsletter CTA ───────────────────────────────────────────── */
.nl { background: #f5e900; clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%); }

.nl-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 48px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.nl-titulo {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #0a0a0f;
  text-transform: uppercase;
}

.nl-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #3a3a10;
  letter-spacing: .1em;
  margin-top: 4px;
}

.nl-form { display: flex; }

.nl-input {
  background: #0a0a0f;
  color: #e8e8f0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  padding: 14px 20px;
  width: 280px;
  border: 2px solid #0a0a0f;
  outline: none;
  caret-color: #f5e900;
}

.nl-input::placeholder { color: #5a5a72; }

.nl-btn {
  background: #0a0a0f;
  color: #f5e900;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .1em;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.nl-btn:hover { color: #fff45c; }

/* ── Footer ───────────────────────────────────────────────────── */
footer { border-top: 1px solid #26263a; }

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 48px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #5a5a72;
  letter-spacing: .1em;
}

.footer-inner a { color: #5a5a72; text-decoration: none; }

.footer-inner a:hover { color: #00e5ff; }

/* ── Overlay de scanlines ─────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
}

@keyframes blinkc { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }

/* ── Responsivo (o design é desktop-first; degradação funcional) ─ */
@media (max-width: 900px) {
  .header-inner, main, .nl-inner, .footer-inner { padding-left: 24px; padding-right: 24px; }
  main { padding-top: 40px; }
  /* Escala com a janela para palavras longas ("OBSERVABILIDADE")
     nunca escaparem da tela; break-word é a rede de segurança. */
  .hero-titulo { font-size: clamp(26px, 9vw, 40px); overflow-wrap: break-word; }
  .post-titulo { font-size: clamp(24px, 8vw, 32px); overflow-wrap: break-word; }
  /* Sublogo desce para baixo do logo em vez de estourar a linha. */
  .marca { flex-wrap: wrap; row-gap: 0; }
  .hero-img { height: 220px; }
  .sobre-foto { float: none; width: 100%; max-width: 340px; margin: 0 auto 24px; }
  .arq-item { grid-template-columns: 56px 1fr; }
  .arq-num { font-size: 22px; }
  .arq-data { display: none; }
  .nl-input { width: 100%; min-width: 0; }
  .nl-form { width: 100%; }
}
