/* ==========================================================================
   PALETA PRETO COM ROXO (NEON PURPLE / DARK MODE)
   ========================================================================== */
:root {
  --bg-main: #06040a;
  --bg-surface: #0d0914;
  --bg-card: rgba(19, 13, 31, 0.75);
  --bg-card-hover: rgba(31, 21, 51, 0.9);
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.4);
  
  --accent: #c084fc;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #c084fc 50%, #e879f9 100%);
  
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  
  --border: rgba(168, 85, 247, 0.15);
  --border-hover: rgba(168, 85, 247, 0.5);
}

/* RESET & CONFIGURAÇÕES BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(192, 132, 252, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR */
.header {
  position: sticky;
  top: 0;
  background: rgba(6, 4, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 1.2rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO SECTION */
.hero {
  padding: 8rem 0 5rem;
  text-align: center;
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.15);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  background: linear-gradient(180deg, #ffffff 0%, #d8b4fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* BOTÕES */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 25px var(--primary-glow);
}

.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn.secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.btn.secondary:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

/* SEÇÕES */
.section {
  padding: 6rem 0;
}

.section.alt-bg {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 4rem;
  font-size: 1.05rem;
}

/* SERVIÇOS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.service-card i {
  font-size: 2.2rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* PROJETOS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.25rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}

.project-card.featured {
  border-color: rgba(168, 85, 247, 0.6);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, rgba(19, 13, 31, 0.8) 100%);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
}

.project-header {
  margin-bottom: 1.25rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.tag.saas { color: #c084fc; background: rgba(192, 132, 252, 0.12); border: 1px solid rgba(192, 132, 252, 0.25); }
.tag.erp { color: #f472b6; background: rgba(244, 114, 182, 0.12); border: 1px solid rgba(244, 114, 182, 0.25); }
.tag.commercial { color: #38bdf8; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.25); }
.tag.automation { color: #e879f9; background: rgba(232, 121, 249, 0.12); border: 1px solid rgba(232, 121, 249, 0.25); }
.tag.infra { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.25); }

.project-card h3 {
  font-size: 1.35rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tech-list li {
  font-size: 0.78rem;
  background-color: rgba(6, 4, 10, 0.8);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  color: #e2e8f0;
  border: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  transition: all 0.2s ease;
}

.project-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* STACK */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.stack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.25rem;
  border-radius: 16px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.stack-icon {
  width: 60px;
  height: 60px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1.5rem;
}

.stack-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.stack-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA & FOOTER */
.cta-section {
  padding: 6rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-section h2 {
  max-width: 750px;
  margin: 0 auto 1.25rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   AVATAR INTERATIVO BRITOSBOT (PC + MOBILE OTIMIZADO)
   ========================================================================== */
.avatar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 2, 6, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1150;
}

.avatar-backdrop.visible {
  display: block;
}

.avatar-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Balão Flutuante de Chamada */
.avatar-callout {
  background: rgba(19, 13, 31, 0.96);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: 14px 14px 4px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 18px rgba(168, 85, 247, 0.25);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: calloutBounce 2.8s ease-in-out infinite;
  backdrop-filter: blur(12px);
  max-width: 245px;
}

.avatar-callout.hidden {
  display: none;
}

.avatar-callout button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

/* Botão do Boneco com Pulso Neon */
.avatar-character-btn {
  position: relative;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.32) 0%, rgba(13, 9, 20, 0.94) 75%);
  border: 2px solid rgba(192, 132, 252, 0.65);
  border-radius: 50%;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(139, 92, 246, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.avatar-character-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(192, 132, 252, 0.45);
  animation: ringPulse 2.4s ease-out infinite;
  pointer-events: none;
}

.avatar-character-btn:active,
.avatar-character-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 38px rgba(192, 132, 252, 0.75);
}

.avatar-widget.is-typing .avatar-character-btn {
  border-color: #e879f9;
  box-shadow: 0 0 35px rgba(232, 121, 249, 0.75);
}

/* Painel Interativo */
.avatar-panel {
  width: 390px;
  max-width: calc(100vw - 2rem);
  background: rgba(13, 9, 20, 0.98);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(20px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: panelSlideUp 0.25s ease-out;
}

.avatar-panel.open {
  display: flex;
}

.avatar-panel-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(19, 13, 31, 0.95) 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-panel-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.avatar-panel-title strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.avatar-panel-title small {
  color: var(--accent);
  font-size: 0.75rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.avatar-panel-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Pills de Sistemas */
.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topic-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.topic-pill:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.topic-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 12px var(--primary-glow);
}

/* Abas de Aspectos */
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(6, 4, 10, 0.75);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.detail-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.3rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.detail-tab.active {
  background: rgba(168, 85, 247, 0.25);
  color: #ffffff;
}

/* Caixa de Texto */
.speech-box {
  background: rgba(19, 13, 31, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 1rem;
  min-height: 145px;
}

.speech-box h4 {
  font-size: 0.96rem;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.speech-box p {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.55;
}

.avatar-widget.is-typing .speech-box p::after {
  content: "▋";
  color: var(--accent);
  margin-left: 2px;
  animation: cursorBlink 0.7s infinite;
}

.avatar-panel-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: rgba(6, 4, 10, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.btn-site-mini {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.68rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: background 0.2s ease;
}

.btn-site-mini:hover {
  background: var(--primary-hover);
}

.btn-site-mini.hidden {
  display: none;
}

.btn-whatsapp-mini {
  background: #16a34a;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.68rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  transition: background 0.2s ease;
}

.btn-whatsapp-mini:hover {
  background: #15803d;
}

@keyframes ringPulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

@keyframes calloutBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes panelSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #06040a;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .avatar-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .avatar-widget.panel-open {
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    padding: 0 0.75rem 0.75rem;
  }

  .avatar-widget.panel-open .avatar-character-btn {
    width: 78px;
    height: 78px;
    margin-bottom: -24px;
    z-index: 1210;
    order: -1;
  }

  .avatar-widget.panel-open .avatar-panel {
    width: 100%;
    max-width: 100%;
    padding-top: 14px;
    border-radius: 22px;
  }

  .avatar-character-btn {
    width: 78px;
    height: 78px;
  }

  .britos-bot-svg {
    width: 68px;
    height: 74px;
  }

  .topic-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topic-pills::-webkit-scrollbar {
    display: none;
  }
}