/* ============================================
   INFINITY TECH E SOFTWARE — Custom Styles
   Complementa o Tailwind CSS via CDN
   ============================================ */

/* ---------- Importação de Fontes ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Variáveis de Cores ---------- */
/* ALTERE as cores principais aqui */
:root {
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-bg-card: #16161f;
  --color-accent-blue: #3b82f6;
  --color-accent-purple: #8b5cf6;
  --color-accent-cyan: #06b6d4;
  --color-neon-glow: rgba(139, 92, 246, 0.4);
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --gradient-accent: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-blue), var(--color-accent-cyan));
}

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ---------- Scrollbar Personalizada ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--color-accent-purple), var(--color-accent-blue));
  border-radius: 10px;
}

/* ---------- Seleção de Texto ---------- */
::selection {
  background: var(--color-accent-purple);
  color: #fff;
}

/* ---------- Animações Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px var(--color-neon-glow), 0 0 40px rgba(139, 92, 246, 0.15);
  }
  50% {
    box-shadow: 0 0 30px var(--color-neon-glow), 0 0 60px rgba(139, 92, 246, 0.25);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

/* ---------- Classes de Animação (usadas pelo IntersectionObserver) ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.from-left {
  transform: translateX(-40px);
}
.animate-on-scroll.from-left.visible {
  transform: translateX(0);
}

.animate-on-scroll.from-right {
  transform: translateX(40px);
}
.animate-on-scroll.from-right.visible {
  transform: translateX(0);
}

.animate-on-scroll.scale-in {
  transform: scale(0.9);
}
.animate-on-scroll.scale-in.visible {
  transform: scale(1);
}

/* Delays para animações em sequência */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ---------- Navbar ---------- */
.navbar {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(139, 92, 246, 0.15);
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}

.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.hero-gradient-orb.orb-1 {
  width: 400px; height: 400px;
  background: var(--color-accent-purple);
  top: 10%; left: 10%;
}

.hero-gradient-orb.orb-2 {
  width: 350px; height: 350px;
  background: var(--color-accent-blue);
  bottom: 10%; right: 10%;
  animation-delay: -4s;
}

.hero-gradient-orb.orb-3 {
  width: 250px; height: 250px;
  background: var(--color-accent-cyan);
  top: 50%; left: 50%;
  animation-delay: -2s;
}

.hero-title {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-accent);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

/* ---------- Botões ---------- */
.btn-primary {
  position: relative;
  background: var(--gradient-accent);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-neon-glow);
}

.btn-secondary {
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--color-accent-purple);
  transform: translateY(-2px);
}

/* ---------- Cards de Serviços ---------- */
.service-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(139, 92, 246, 0.08);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gradient-accent);
  background-size: 200%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--color-neon-glow);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  color: var(--color-accent-purple);
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
  transform: scale(1.1);
}

/* ---------- Cards de Portfólio ---------- */
.portfolio-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(139, 92, 246, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.1);
}

.portfolio-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent 40%, rgba(10, 10, 15, 0.9) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.15);
  color: var(--color-accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ---------- Seção Sobre ---------- */
.about-counter {
  position: relative;
  text-align: center;
  padding: 1.5rem;
}

.about-counter .counter-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.about-counter .counter-label {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* ---------- Formulário de Contato ---------- */
.form-input {
  background: rgba(22, 22, 31, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  color: var(--color-text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
}

.form-input::placeholder {
  color: var(--color-text-secondary);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(22, 22, 31, 1);
}

.form-input:hover {
  border-color: rgba(139, 92, 246, 0.25);
}

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
  animation: pulseGlow 3s ease infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* ---------- Seção dividers ---------- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
}

/* ---------- Efeito de Partículas / Dots decorativos ---------- */
.dot-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image: radial-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* ---------- Section Tag ---------- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.15);
  margin-bottom: 1.25rem;
}

.section-tag .tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  animation: pulseGlow 2s ease infinite;
}

/* ---------- Footer ---------- */
.footer-gradient {
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.footer-link {
  color: var(--color-text-secondary);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--color-accent-purple);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid rgba(139, 92, 246, 0.1);
  padding: 5rem 2rem 2rem;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--color-accent-purple);
}

/* ---------- Hamburger ---------- */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Responsividade ---------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem !important;
  }
  .hero-gradient-orb {
    width: 200px !important;
    height: 200px !important;
  }
  .about-counter .counter-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem !important;
  }
}
