/* ========================================================
 * QIBYTE — DESIGN SYSTEM & CYBER-PRECISION ARCHITECTURE
 * Folha de Estilos Oficial (styles.css)
 * ======================================================== */

:root {
  --void: #000214;
  --cobalt: #0051FF;
  --slate: #1B2B3A;
  --offwhite: #F0F1F2;
}

body {
  background-color: var(--void);
  color: var(--offwhite);
  font-family: 'Sora', sans-serif;
  overflow-x: hidden;
  letter-spacing: -0.02em;
}

/* Grid Técnico Blueprint com Interseções em Cruz */
.blueprint-bg {
  background-color: #000214;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
}

.blueprint-lines {
  background-image:
    radial-gradient(circle at 80px 80px, #0051FF 1.5px, transparent 1.5px);
  background-size: 80px 80px;
}

/* Regra de Ouro da Marca: Cortes Secos 45º (Chamfered) */
.chamfer-btn {
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
}

.chamfer-card {
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    0 100%
  );
}

.chamfer-hud {
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
}

/* Assinatura dos Dois Bytes em #0051FF */
.bytes-tag::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #0051FF;
  box-shadow: 0 0 8px #0051FF, 6px -6px 0 0 #0051FF;
  margin-left: 10px;
  margin-bottom: 2px;
}

/* Efeito Neon de Precisão */
.neon-cobalt {
  color: #0051FF;
  text-shadow: 0 0 14px rgba(0, 81, 255, 0.75), 0 0 28px rgba(0, 81, 255, 0.4);
}

.neon-border {
  border-color: rgba(0, 81, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 81, 255, 0.2), inset 0 0 15px rgba(0, 81, 255, 0.1);
}

/* Linhas de Fluxo com Partículas de Luz */
@keyframes pulseBeam {
  0% {
    stroke-dashoffset: 200;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.flow-line {
  stroke-dasharray: 8 16;
  animation: pulseBeam 4s linear infinite;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #000214;
}

::-webkit-scrollbar-thumb {
  background: #1B2B3A;
  border: 1px solid rgba(0, 81, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: #0051FF;
}

/* Iluminação Suave e Grid Técnico Revelado pelo Mouse (CSS mask-image) */
.cyber-spotlight-glow,
.showcase-spotlight-glow {
  background: radial-gradient(550px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 81, 255, 0.11) 0%, rgba(0, 81, 255, 0.03) 45%, transparent 70%);
}

.cyber-grid-reveal,
.showcase-grid-reveal {
  background-image:
    linear-gradient(to right, rgba(0, 81, 255, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 81, 255, 0.18) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(350px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.3) 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(350px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.3) 40%, transparent 75%);
}

/* Pares de Quadrados de 4px (Bytes da Logo) nas Interseções Próximas ao Mouse */
.cyber-bytes-grid,
.showcase-bytes-grid {
  background-size: 80px 80px;
  background-position: -40px -40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect x='38' y='38' width='4' height='4' fill='%230051FF' fill-opacity='0.55'/%3E%3Crect x='44' y='34' width='4' height='4' fill='%230051FF' fill-opacity='0.55'/%3E%3C/svg%3E");
  mask-image: radial-gradient(280px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.35) 40%, transparent 70%);
  -webkit-mask-image: radial-gradient(280px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), black 0%, rgba(0, 0, 0, 0.35) 40%, transparent 70%);
  filter: drop-shadow(0 0 2.5px rgba(0, 81, 255, 0.35));
}

/* Moldura Octogonal Chanfrada em 45º (Geometria Exata do Ícone Q) */
.cyber-octo-frame,
.showcase-octo-frame {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  left: var(--mouse-x, -999px);
  top: var(--mouse-y, -999px);
  clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
  background: linear-gradient(135deg, rgba(0, 81, 255, 0.55) 0%, rgba(0, 81, 255, 0.15) 60%, rgba(0, 81, 255, 0.55) 100%);
  padding: 1.5px;
  box-shadow: 0 0 10px rgba(0, 81, 255, 0.2);
  transition: opacity 0.3s ease;
}

.cyber-octo-inner,
.showcase-octo-inner {
  width: 100%;
  height: 100%;
  clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
  background: rgba(0, 2, 20, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Cursor Efeito Máquina de Escrever (Terminal Cyber-Precision) */
.typewriter-cursor {
  display: inline-block;
  width: 0.12em;
  height: 0.85em;
  background-color: #0051FF;
  box-shadow: 0 0 12px #0051FF, 0 0 24px rgba(0, 81, 255, 0.75);
  vertical-align: -0.04em;
  margin-left: 0.08em;
  animation: typewriterBlink 0.75s step-end infinite;
}

@keyframes typewriterBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ========================================================
 * MENU HAMBÚRGUER & MOBILE OVERLAY CYBER-PRECISION
 * ======================================================== */
.ham-active #ham-bar-1 {
  transform: translateY(6px) rotate(45deg);
  width: 20px;
  background-color: #0051FF;
}

.ham-active #ham-bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.ham-active #ham-bar-3 {
  transform: translateY(-6px) rotate(-45deg);
  width: 20px;
  margin-right: 0 !important;
  align-self: center !important;
  background-color: #0051FF;
}

/* Prevenção de rolagem horizontal estrita */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Touch Targets Acessíveis para Dispositivos Móveis */
@media (max-width: 768px) {
  button,
  a {
    touch-action: manipulation;
  }
}

/* Foco acessível por teclado com o padrão QIBYTE #0051FF */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0051FF;
  outline-offset: 3px;
}

/* Em dispositivos touch puros, desativa a mira física para máxima ergonomia e economia de bateria */
@media (hover: none) and (pointer: coarse) {
  .cyber-octo-frame,
  .cyber-spotlight-glow,
  .cyber-grid-reveal,
  .cyber-bytes-grid {
    display: none !important;
  }
}

/* Botão Flutuante Voltar ao Topo (Scroll to Top) */
#back-to-top {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease;
}

#back-to-top:hover {
  border-color: #0051FF;
  box-shadow: 0 0 20px rgba(0, 81, 255, 0.45), inset 0 0 10px rgba(0, 81, 255, 0.2);
}


