/* ═══════════════════════════════════════════════════════════════
   SITE IV — folha compartilhada · criação do CTO (Ivo) · 11/07/2026
   Identidade: Space Grotesk + IBM Plex Sans/Mono · claro institucional
   navy #01284F · laranja vivo #FF4D00 (decorativo) / #C2410C (texto)
   Página IV GAMES usa o modo palco (body.palco) — escuro broadcast.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --paper: #F4F6F8;
  --panel: #FFFFFF;
  --ink: #0D1520;
  --body: #3D4A5C;
  --navy: #01284F;
  --vivo: #FF4D00;
  --vivo-txt: #C2410C;
  --ok: #0E7A3D;
  --hair: #DEE3EA;
  --games: #7A5CF6; /* acento do palco IV GAMES (identidade GameON) — decorativo/não-texto */
  --games-acao: #6D4EF0; /* mesmo roxo, escurecido p/ carregar texto branco em AA (o --games dá 4,48:1, reprova por 0,02) */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255, 77, 0, 0.2); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--vivo-txt); outline-offset: 2px; border-radius: 6px; }

.mono { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.025em; }
.fim { color: var(--vivo); }

/* ───────── Topbar ───────── */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 60px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.topbar .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}
.selo {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  background: var(--navy);
  border-radius: 9px;
  color: #FFF;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.marca { display: flex; align-items: center; gap: 10px; }
.marca b { font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 700; white-space: nowrap; }
.nav { display: flex; gap: 26px; margin: 0 auto; font-size: 14px; font-weight: 500; color: var(--body); }
.nav a { padding: 6px 2px; position: relative; white-space: nowrap; transition: color 0.15s ease; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--navy); font-weight: 600; }
.nav a.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--vivo);
}
.nav a.games-link { color: var(--games); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.clock { font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.led {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ok);
}
.led i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: beat 2s ease-out infinite; }
@keyframes beat {
  0% { box-shadow: 0 0 0 0 rgba(14, 122, 61, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(14, 122, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 122, 61, 0); }
}
.cta-top {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFF;
  background: var(--navy);
  padding: 9px 18px;
  border-radius: 9px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cta-top:hover { background: var(--vivo-txt); transform: translateY(-1px); }
.menu-btn { display: none; padding: 8px; margin-left: auto; }
.menu-btn svg { width: 22px; height: 22px; }

/* menu mobile */
.mnav {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  z-index: 55;
  background: #FFF;
  border-bottom: 1px solid var(--hair);
  padding: 10px 20px 18px;
  box-shadow: 0 18px 40px rgba(1, 40, 79, 0.12);
}
.mnav.on { display: block; }
.mnav a {
  display: block;
  padding: 13px 8px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--hair);
}
.mnav a:last-child { border-bottom: none; }
.mnav a.on { color: var(--navy); font-weight: 650; }
.mnav a.games-link { color: var(--games); font-weight: 650; }

main { padding-top: 60px; }

/* ───────── Blocos comuns ───────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vivo-txt);
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--vivo); }

.section { padding: 88px 0; }
.section.tight { padding: 64px 0; }

.h-page { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.02; margin-top: 16px; max-width: 20ch; }
.h-sec { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.08; margin-top: 14px; max-width: 26ch; }
.lead { margin-top: 18px; max-width: 60ch; font-size: 1.0625rem; line-height: 1.7; color: var(--body); }
.lead b { color: var(--ink); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  padding: 14px 26px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
/* hovers sem translateY: o ímã do JS conduz o movimento */
.btn-navy { background: var(--navy); color: #FFF; }
.btn-navy:hover { background: var(--vivo-txt); }
.btn-line { border: 1.5px solid var(--hair); background: var(--panel); color: var(--navy); }
.btn-line:hover { border-color: var(--navy); }
.btn-games { background: var(--games-acao); color: #FFF; }
.btn-games:hover { background: #5B37D8; }
.cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* Janela placa IV (chrome proprietário) */
.janela {
  background: #0A1522;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(1, 40, 79, 0.22);
}
.jbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #101826;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.jselo {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  color: #FFF;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.reg { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #7E93AC; flex-shrink: 0; }
.jtit { flex: 1; min-width: 0; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #C9D6E8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jled { display: inline-flex; align-items: center; gap: 6px; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.14em; flex-shrink: 0; }
.jled i { width: 6px; height: 6px; border-radius: 50%; }
.jled.demo { color: #FFA575; }
.jled.demo i { background: var(--vivo); animation: beatv 1.6s ease-out infinite; }
@keyframes beatv {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255, 77, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
}
.jled.sint { color: #8FA3BC; }
.jled.sint i { background: #8FA3BC; }
.legenda { margin-top: 10px; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--body); letter-spacing: 0.03em; }

/* status */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status.prod { color: var(--ok); }
.status.prod i { background: var(--ok); }
.status.build { color: var(--vivo-txt); }
.status.build i { background: var(--vivo); }

/* ───────── HOME: bento vivo ───────── */
.hero-home { padding: 84px 0 20px; }
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 48px;
}
/* áreas explícitas ≥1024: TV ocupa 2 linhas, coluna direita empilha KPI+relógio,
   última linha fecha cheia (achado VERA: zero vazio morto) */
@media (min-width: 1024px) {
  .bento {
    grid-template-areas:
      "tv tv tv tv tv tv tv tv kpi kpi kpi kpi"
      "tv tv tv tv tv tv tv tv clock clock clock clock"
      "podio podio podio podio games games games games fact fact fact fact";
  }
  .cell-tv { grid-area: tv; }
  .cell-kpi { grid-area: kpi; }
  .cell-clock { grid-area: clock; }
  .cell-podio { grid-area: podio; }
  .cell-games { grid-area: games; }
  .cell-fact { grid-area: fact; }
}
.cell { border-radius: 16px; min-width: 0; }
.cell-tv { grid-column: span 8; }
.cell-kpi {
  grid-column: span 4;
  background: var(--panel);
  border: 1px solid var(--hair);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cell-kpi:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(1, 40, 79, 0.09); }
.cell-kpi .rot { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--body); }
.cell-kpi .num { font-family: "Space Grotesk", sans-serif; font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 700; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.cell-kpi small { font-size: 13px; color: var(--body); line-height: 1.55; }
.cell-clock {
  grid-column: span 4;
  background: var(--ink);
  color: #E8EDF4;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.cell-clock .rot { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.13em; color: #9AA8BA; }
.cell-clock .big { font-family: "IBM Plex Mono", monospace; font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: #FFF; }
.cell-podio { grid-column: span 4; }
.cell-games {
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 85% 0%, rgba(122, 92, 246, 0.55), transparent 65%),
    radial-gradient(360px 200px at 0% 100%, rgba(255, 77, 0, 0.28), transparent 60%),
    #0B0E1E;
  color: #FFF;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cell-games:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(122, 92, 246, 0.35); }
.cell-games .rot { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.16em; color: #C9BFFF; }
.cell-games b { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.cell-games span.ir { font-size: 13.5px; color: #D9D2FF; display: inline-flex; align-items: center; gap: 8px; }
.cell-fact {
  grid-column: span 4;
  background: var(--panel);
  border: 1px solid var(--hair);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cell-fact .rot { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--vivo-txt); }
.cell-fact p { font-size: 13.5px; line-height: 1.6; color: var(--body); }
.cell-fact b { color: var(--ink); }

/* cards de sistema (home resumo + página sistemas) */
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.sys-card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.sys-card:hover { transform: translateY(-4px); border-color: rgba(1, 40, 79, 0.3); box-shadow: 0 18px 40px rgba(1, 40, 79, 0.1); }
.sys-card .num { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--body); }
.sys-card h3 { font-size: 17px; font-weight: 700; }
.sys-card p { font-size: 13.5px; line-height: 1.6; color: var(--body); }
.sys-card .rodape { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sys-card .ver { font-size: 13px; font-weight: 600; color: var(--vivo-txt); }

/* fichas completas (página sistemas) */
.mod {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 30px 28px;
  margin-top: 18px;
  scroll-margin-top: 84px;
}
.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mod-head .num { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.11em; color: var(--body); }
.mod-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; margin-top: 6px; }
.mod-head .sub { font-size: 13.5px; color: var(--body); margin-top: 4px; }
.ficha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; }
.campo .rot { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--vivo-txt); }
.campo p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; }
.campo p.tech { color: var(--body); font-size: 13.5px; }
.mod-nota { margin-top: 20px; font-size: 13px; color: var(--body); line-height: 1.6; border-top: 1px dashed var(--hair); padding-top: 16px; }
.mod-telas { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; margin-top: 24px; }
/* nowrap interno nunca estoura a coluna (P1 VERA: hscroll a 360px) */
.mod-telas > * { min-width: 0; }
@media (max-width: 1120px) { .mod-telas { grid-template-columns: 1fr; } }

/* faixa IV GAMES (home) */
.band-games {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(122, 92, 246, 0.5), transparent 62%),
    radial-gradient(560px 300px at 95% 100%, rgba(255, 77, 0, 0.3), transparent 60%),
    #0B0E1E;
  color: #FFF;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.band-games .eyebrow { color: #C9BFFF; }
.band-games .eyebrow::before { background: var(--games); }
.band-games h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; }
.band-games p { margin-top: 12px; max-width: 48ch; font-size: 15px; line-height: 1.65; color: #C6CCE0; }

/* pipeline / etapas (sobre) */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.etapa { position: relative; background: var(--panel); border: 1px solid var(--hair); border-radius: 12px; padding: 22px 20px 24px; }
.etapa .en { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.12em; color: var(--vivo-txt); }
.etapa b { display: block; margin-top: 12px; font-size: 15px; font-weight: 600; }
.etapa p { margin-top: 7px; font-size: 13px; line-height: 1.6; color: var(--body); }
.etapa::after {
  content: "→";
  position: absolute;
  right: -13px; top: 50%;
  transform: translateY(-50%);
  color: var(--body);
  font-family: "IBM Plex Mono", monospace;
  z-index: 1;
}
.etapa:last-child::after { display: none; }
.exemplar { margin-top: 52px; display: grid; grid-template-columns: 2fr 3fr; gap: 32px; align-items: center; }

/* contato: chamado */
.chamado { margin-top: 36px; max-width: 640px; background: var(--panel); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.chamado-bar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--hair); background: #FBFCFD; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.1em; color: var(--body); }
.chamado-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--vivo); }
.chamado-corpo { padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.campo-form label { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--body); margin-bottom: 7px; }
.campo-form input, .campo-form textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 9px;
  padding: 11px 14px;
  resize: vertical;
}
.campo-form input:focus, .campo-form textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); background: #FFF; }

/* ───────── PALCO (IV GAMES, body.palco) ───────── */
body.palco { background: #07080F; color: #E9ECF5; }
body.palco .topbar { background: rgba(7, 8, 15, 0.82); border-bottom-color: rgba(255, 255, 255, 0.08); }
body.palco .marca b, body.palco .clock { color: #F2F5FB; }
body.palco .nav { color: #A8B2C7; }
body.palco .nav a:hover { color: #FFF; }
body.palco .nav a.on { color: #FFF; }
body.palco .nav a.on::after { background: var(--games); }
body.palco .mnav { background: #0B0E1E; border-bottom-color: rgba(255,255,255,0.08); }
body.palco .mnav a { border-bottom-color: rgba(255,255,255,0.08); color: #C6CCE0; }
body.palco .mnav a.on { color: #FFF; }
body.palco .legenda { color: #8B96AC; }
body.palco .lead { color: #B7BFD2; }
body.palco .lead b { color: #FFF; }
body.palco .eyebrow { color: #C9BFFF; }
body.palco .eyebrow::before { background: var(--games); }
body.palco .janela { box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6); }
body.palco :focus-visible { outline-color: var(--games); }

.games-hero {
  position: relative;
  min-height: 78svh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
  background: #07080F;
}
.games-hero .media { position: absolute; inset: 0; z-index: -2; }
.games-hero .media img, .games-hero .media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}
.games-hero .media video { opacity: 0; transition: opacity 1.4s ease; }
.games-hero.live .media video { opacity: 1; }
.games-hero .veu {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 8, 15, 0.62) 0%, rgba(7, 8, 15, 0.12) 40%, rgba(7, 8, 15, 0.94) 100%),
    radial-gradient(900px 480px at 80% 20%, rgba(122, 92, 246, 0.28), transparent 65%);
}
.games-hero .wrap { padding-top: 140px; padding-bottom: 64px; width: 100%; }
.games-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #FFF;
}
.games-title .gx {
  background: linear-gradient(92deg, #9F87FF 5%, #7A5CF6 50%, #FF4D00 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.games-sub { margin-top: 18px; max-width: 54ch; font-size: 1.125rem; line-height: 1.65; color: #C6CCE0; }

/* variante do hero de vídeo para a HOME (véu navy institucional) */
.home-hero .veu {
  background:
    linear-gradient(180deg, rgba(4, 10, 18, 0.66) 0%, rgba(4, 10, 18, 0.18) 40%, rgba(4, 10, 18, 0.92) 100%),
    radial-gradient(900px 480px at 80% 20%, rgba(1, 40, 79, 0.5), transparent 65%);
}
.home-hero .eyebrow { color: #9CC4F8; }
.home-hero .eyebrow::before { background: var(--vivo); }
.home-hero .games-sub b { color: #FFF; }
.btn-white { background: #FFF; color: var(--navy); }
.btn-white:hover { background: #E8EEF6; transform: translateY(-1px); }
.btn-ghost-claro { border: 1.5px solid rgba(255, 255, 255, 0.35); background: transparent; color: #FFF; }
.btn-ghost-claro:hover { border-color: #FFF; transform: translateY(-1px); }

.games-card {
  background: #0C1020;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 34px 30px;
  margin-top: 22px;
}
.games-card .ficha .campo p { color: #E9ECF5; }
.games-card .ficha .campo p.tech { color: #A8B2C7; }
.games-card .campo .rot { color: #C9BFFF; }
.games-card .mod-nota { color: #8B96AC; border-top-color: rgba(255, 255, 255, 0.1); }

.proximo {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 40px 32px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: #C6CCE0;
}
.proximo b { font-family: "Space Grotesk", sans-serif; font-size: 20px; color: #FFF; display: block; }
.proximo p { margin-top: 8px; font-size: 14px; line-height: 1.6; max-width: 52ch; }

/* ───────── Footer ───────── */
footer { background: var(--panel); border-top: 1px solid var(--hair); margin-top: 88px; }
body.palco footer { background: #0B0E1E; border-top-color: rgba(255, 255, 255, 0.08); color: #A8B2C7; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding: 52px 0 40px;
}
.foot-grid .marca b { font-size: 16px; }
.foot-tag { margin-top: 12px; font-size: 13.5px; color: var(--body); line-height: 1.65; max-width: 30ch; }
body.palco .foot-tag { color: #8B96AC; }
.foot-col b { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--body); margin-bottom: 14px; font-weight: 500; }
body.palco .foot-col b { color: #8B96AC; }
.foot-col a { display: block; font-size: 13.5px; padding: 5px 0; color: var(--body); }
body.palco .foot-col a { color: #A8B2C7; }
.foot-col a:hover { color: var(--navy); }
body.palco .foot-col a:hover { color: #FFF; }
.colofao {
  border-top: 1px solid var(--hair);
  padding: 18px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--body);
}
body.palco .colofao { border-top-color: rgba(255, 255, 255, 0.08); color: #8B96AC; }

/* ───────── Paleta de comando ───────── */
.pal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(13, 21, 32, 0.42);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 20px 20px;
}
.pal-overlay.on { display: flex; }
.pal {
  width: min(560px, 100%);
  background: #FFF;
  border: 1px solid var(--hair);
  border-radius: 14px;
  box-shadow: 0 40px 90px rgba(1, 40, 79, 0.3);
  overflow: hidden;
  animation: palin 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink);
}
@keyframes palin {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pal input { width: 100%; font: inherit; font-size: 15px; padding: 16px 18px; border: none; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); }
.pal input:focus { outline: none; border-bottom-color: var(--navy); box-shadow: 0 1px 0 var(--navy); }
.pal-list { max-height: 320px; overflow-y: auto; padding: 8px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 9px; font-size: 14px; }
.pal-item .tipo { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.1em; color: var(--body); }
.pal-item.sel, .pal-item:hover { background: rgba(1, 40, 79, 0.07); }
.pal-item .pi { width: 16px; height: 16px; color: var(--navy); flex-shrink: 0; }
.pal-vazio { padding: 22px; font-size: 13.5px; color: var(--body); text-align: center; }

/* ───────── Animações / responsivo ───────── */
.sr { opacity: 0; transform: translateY(16px); transition: opacity 0.65s ease, transform 0.65s ease; }
.sr.in { opacity: 1; transform: translateY(0); }
html:not(.js) .sr { opacity: 1; transform: none; }

/* cascata: filhos de grades .sr entram escalonados (só com JS — falha-seguro) */
html.js .bento.sr > *, html.js .sys-grid.sr > *, html.js .pipeline.sr > *, html.js .ficha.sr > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .bento.sr.in > *, html.js .sys-grid.sr.in > *, html.js .pipeline.sr.in > *, html.js .ficha.sr.in > * {
  opacity: 1;
  transform: translateY(0);
}
html.js .sr.in > *:nth-child(2) { transition-delay: 0.08s; }
html.js .sr.in > *:nth-child(3) { transition-delay: 0.16s; }
html.js .sr.in > *:nth-child(4) { transition-delay: 0.24s; }
html.js .sr.in > *:nth-child(5) { transition-delay: 0.32s; }
html.js .sr.in > *:nth-child(6) { transition-delay: 0.40s; }

/* respiração lenta do vídeo de hero (Ken Burns) */
.games-hero .media img, .games-hero .media video {
  animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.05); }
  to   { transform: scale(1.13) translateY(-1.5%); }
}

/* brilho varrendo o gradiente do título IV GAMES */
.games-title .gx {
  background-size: 220% 100%;
  animation: shimmer 9s ease-in-out infinite alternate;
}
@keyframes shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* letreiro de sistemas (home) */
.ticker {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  padding: 15px 0;
  white-space: nowrap;
  background: var(--panel);
}
.ticker-track {
  display: inline-block;
  animation: slide 32s linear infinite;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--body);
}
.ticker-track em { font-style: normal; color: var(--vivo-txt); padding: 0 16px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* janelas respiram no hover (o tilt 3D vem do JS em ponteiro fino) */
.janela { transition: transform 0.25s ease-out, box-shadow 0.3s ease; }
.janela:hover { box-shadow: 0 34px 72px rgba(1, 40, 79, 0.28); }
body.palco .janela:hover { box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7); }

/* setas dos botões e cards avançam no hover */
.btn svg { transition: transform 0.25s ease; }
.btn:hover svg { transform: translateX(4px); }
.sys-card .ver { display: inline-block; transition: transform 0.25s ease; }
.sys-card:hover .ver { transform: translateX(4px); }
.cell-games .ir { transition: transform 0.25s ease; }
.cell-games:hover .ir { transform: translateX(5px); }

/* topbar encolhe ao rolar */
.topbar { transition: height 0.25s ease, box-shadow 0.25s ease; }
.topbar.mini { height: 50px; box-shadow: 0 10px 34px rgba(1, 40, 79, 0.1); }
body.palco .topbar.mini { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); }

/* etapas do pipeline ganham vida no hover */
.etapa { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.etapa:hover { transform: translateY(-3px); border-color: rgba(1, 40, 79, 0.3); box-shadow: 0 14px 34px rgba(1, 40, 79, 0.08); }

/* fichas de sistema acendem no hover */
.mod { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.mod:hover { border-color: rgba(1, 40, 79, 0.28); box-shadow: 0 14px 38px rgba(1, 40, 79, 0.07); }

/* gradientes que derivam devagar (faixa IV Games e célula do bento) */
.band-games, .cell-games {
  background-size: 170% 170%;
  animation: bgdrift 16s ease-in-out infinite alternate;
}
@keyframes bgdrift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* luz viva vagando pelo hero de vídeo */
.games-hero .veu::after {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(560px 320px at 30% 30%, rgba(122, 92, 246, 0.16), transparent 62%);
  animation: luz 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.home-hero .veu::after {
  background: radial-gradient(560px 320px at 30% 30%, rgba(110, 165, 255, 0.12), transparent 62%);
}
@keyframes luz {
  from { transform: translate(0%, 0%); }
  to   { transform: translate(28%, 16%); }
}

/* LED do chamado pulsa */
.chamado-bar i { animation: beatv 1.8s ease-out infinite; }

/* barra de progresso de leitura */
.progresso {
  position: fixed;
  top: 0; left: 0;
  z-index: 80;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--vivo), var(--games));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* títulos entram palavra por palavra (JS embrulha; sem JS = texto puro) */
.wm { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wm .w {
  display: inline-block;
  transform: translateY(115%);
  animation: wordup 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wordup { to { transform: translateY(0); } }

/* linha de código que digita sozinha (home) */
.typeline {
  margin-top: 26px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #7FA3CF;
  min-height: 18px;
}
.typeline::after {
  content: "▍";
  color: var(--vivo);
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* holofote que segue o mouse no palco */
#spot {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(560px 560px at var(--mx, 50%) var(--my, 30%), rgba(122, 92, 246, 0.10), transparent 62%);
}

/* letreiro do palco (variante escura) */
body.palco .ticker { background: #0B0E1E; border-color: rgba(255, 255, 255, 0.08); }
body.palco .ticker-track { color: #A8B2C7; }
body.palco .ticker-track em { color: var(--games); }

/* confete do GameON (peças criadas pelo JS, uma vez) */
.confete-zona { position: relative; overflow: hidden; }
.confete {
  position: absolute;
  top: -12px;
  width: 7px; height: 11px;
  border-radius: 2px;
  animation: cair linear forwards;
  pointer-events: none;
}
@keyframes cair {
  to { transform: translateY(120vh) rotate(720deg); opacity: 0.1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sr, html.js .sr > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .led i, .jled.demo i { animation: none; }
  .pal { animation: none; }
  .games-hero .media video { display: none; }
  .games-hero .media img, .games-title .gx, .ticker-track { animation: none; }
  .janela, .janela:hover { transform: none !important; }
  .band-games, .cell-games, .games-hero .veu::after, .chamado-bar i { animation: none; }
  .btn:hover svg, .sys-card:hover .ver, .cell-games:hover .ir, .etapa:hover { transform: none; }
  .wm .w { transform: none; animation: none; }
  .typeline::after { animation: none; }
  #spot { display: none; }
  .progresso { display: none; }
  .confete { display: none; }
  .byte-btn .halo, .bw-pisca, .bw-caret { animation: none; }
  .byte-panel.on { animation: none; }
}

/* ───────── Byte — concierge do site ───────── */
.byte-btn {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 65;
  width: 62px; height: 62px;
  border-radius: 18px;
  background: #0C1420;
  border: 1px solid rgba(95, 212, 255, 0.35);
  box-shadow: 0 14px 40px rgba(1, 40, 79, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.byte-btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 20px 50px rgba(95, 212, 255, 0.3); }
.byte-btn svg { width: 44px; height: 44px; overflow: visible; }
.byte-btn .halo {
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  border: 1.5px solid rgba(95, 212, 255, 0.5);
  animation: bhalo 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes bhalo { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.35); opacity: 0; } }

.byte-panel {
  position: fixed;
  right: 22px; bottom: 96px;
  z-index: 66;
  width: min(350px, calc(100vw - 32px));
  background: #FFF;
  border: 1px solid var(--hair);
  border-radius: 16px;
  box-shadow: 0 40px 90px rgba(1, 40, 79, 0.28);
  overflow: hidden;
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  display: none;
}
.byte-panel.on { display: flex; flex-direction: column; animation: bspring 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes bspring { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.byte-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--navy); }
.byte-head svg { width: 38px; height: 38px; overflow: visible; }
.byte-head b { color: #FFF; font-size: 14px; font-weight: 600; }
.byte-head small { display: block; font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: 0.1em; color: #7FE0A8; margin-top: 2px; }
.byte-x { margin-left: auto; color: #9CB4D4; font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.byte-x:hover { color: #FFF; background: rgba(255, 255, 255, 0.1); }
.byte-corpo { padding: 16px; overflow-y: auto; min-height: 0; }
.byte-balao { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px 14px 14px 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; }
.byte-acoes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.byte-acao {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 550;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.byte-acao:hover { border-color: var(--navy); background: #FBFCFD; transform: translateX(3px); }
.byte-acao .seta { margin-left: auto; color: var(--vivo-txt); }
.byte-foot { padding: 0 16px 14px; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.1em; color: #8296AC; }

/* conversa com a IA */
.byte-msgs { display: flex; flex-direction: column; gap: 8px; }
.byte-msg { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px 14px 14px 14px; padding: 10px 13px; font-size: 13.5px; line-height: 1.55; max-width: 92%; align-self: flex-start; overflow-wrap: break-word; white-space: pre-wrap; }
.byte-msg.eu { background: var(--navy); border-color: var(--navy); color: #FFF; border-radius: 14px 4px 14px 14px; align-self: flex-end; }
.byte-msg a { text-decoration: underline; font-weight: 600; }
.byte-digitando { display: inline-flex; gap: 5px; padding: 12px 14px; }
.byte-digitando i { width: 6px; height: 6px; border-radius: 50%; background: #8296AC; animation: bytedig 1.1s ease-in-out infinite; }
.byte-digitando i:nth-child(2) { animation-delay: 0.15s; }
.byte-digitando i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bytedig { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
.byte-form { display: flex; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--hair); flex-shrink: 0; }
.byte-form input { flex: 1; min-width: 0; font: inherit; font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 10px; background: #FFF; color: var(--ink); }
.byte-form input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.byte-envia { flex-shrink: 0; width: 40px; border-radius: 10px; border: 1px solid var(--navy); background: var(--navy); color: #FFF; font-size: 17px; line-height: 1; transition: opacity 0.15s ease; }
.byte-envia:disabled { opacity: 0.45; }
.byte-foot { flex-shrink: 0; }

body.palco .byte-panel { background: #0C1020; border-color: rgba(255, 255, 255, 0.1); }
body.palco .byte-balao { background: #101826; border-color: rgba(255, 255, 255, 0.1); color: #E9ECF5; }
body.palco .byte-msg { background: #101826; border-color: rgba(255, 255, 255, 0.1); color: #E9ECF5; }
body.palco .byte-msg.eu { background: var(--games); border-color: var(--games); color: #FFF; }
body.palco .byte-form { border-top-color: rgba(255, 255, 255, 0.1); }
body.palco .byte-form input { background: #101826; border-color: rgba(255, 255, 255, 0.12); color: #E9ECF5; }
body.palco .byte-form input:focus { border-color: var(--games); box-shadow: 0 0 0 1px var(--games); }
body.palco .byte-envia { background: var(--games); border-color: var(--games); }
body.palco .byte-acao { border-color: rgba(255, 255, 255, 0.12); color: #E9ECF5; }
body.palco .byte-acao:hover { border-color: var(--games); background: rgba(122, 92, 246, 0.08); }
body.palco .byte-foot { color: #8B96AC; }
@media (prefers-reduced-motion: reduce) {
  .byte-digitando i { animation: none; opacity: 0.7; }
  /* override real do bspring: este bloco vem DEPOIS da regra .byte-panel.on,
     então vence por ordem de fonte (o do bloco global era derrotado). */
  .byte-panel.on { animation: none; }
}
.bw-pisca { transform-origin: center; animation: bwpisca 4.6s infinite; }
.bw-pisca.d2 { animation-delay: 0.12s; }
@keyframes bwpisca { 0%, 91%, 100% { transform: scaleY(1); } 94%, 96% { transform: scaleY(0.06); } }
.bw-caret { animation: bwcaret 1.1s steps(1) infinite; }
@keyframes bwcaret { 50% { opacity: 0.15; } }
@media (max-width: 640px) {
  .byte-btn { right: 14px; bottom: 14px; }
  .byte-panel { right: 14px; bottom: 88px; }
}

/* menu mobile jamais órfão em desktop (achado OTTO) */
@media (min-width: 1024px) {
  .mnav { display: none !important; }
}

/* hero de vídeo no mobile: conteúdo assenta na faixa escura + véu central mais
   duro — sub sempre ≥4,5:1 sobre o pior ponto do poster (achado VERA) */
@media (max-width: 480px) {
  .games-hero { min-height: 88svh; }
  .games-hero .veu {
    background:
      linear-gradient(180deg, rgba(7, 8, 15, 0.7) 0%, rgba(7, 8, 15, 0.45) 42%, rgba(7, 8, 15, 0.96) 100%),
      radial-gradient(600px 320px at 80% 20%, rgba(122, 92, 246, 0.2), transparent 65%);
  }
  /* a HOME mantém o véu NAVY institucional (nunca o roxo do games) */
  .home-hero .veu {
    background:
      linear-gradient(180deg, rgba(4, 10, 18, 0.72) 0%, rgba(4, 10, 18, 0.48) 42%, rgba(4, 10, 18, 0.96) 100%),
      radial-gradient(600px 320px at 80% 20%, rgba(1, 40, 79, 0.4), transparent 65%);
  }
  /* rodapé nunca fica sob o FAB do Byte */
  body { padding-bottom: 84px; }
}

@media (max-width: 1023px) {
  .nav, .top-right .led span, .clock { display: none; }
  .menu-btn { display: block; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-tv { grid-column: span 2; }
  .cell-kpi, .cell-clock, .cell-podio, .cell-games { grid-column: span 1; }
  .cell-fact { grid-column: span 2; } /* última fila fecha cheia no 2-col (VERA) */
  .sys-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha { grid-template-columns: 1fr; gap: 16px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .etapa::after { display: none; }
  .exemplar { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .section { padding: 64px 0; }
  .bento { grid-template-columns: 1fr; }
  .cell-tv, .cell-kpi, .cell-clock, .cell-podio, .cell-games, .cell-fact { grid-column: span 1; }
  .sys-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .band-games { padding: 40px 24px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
