/* MGA Digital Solutions — Premium custom styles */

:root {
  --mga-bg: #07070d;
  --mga-surface: #0f0f18;
  --mga-surface-2: #161622;
  --mga-border: rgba(255, 255, 255, 0.08);
  --mga-accent: #3b82f6;
  --mga-accent-2: #8b5cf6;
  --mga-glow: rgba(59, 130, 246, 0.35);
  --mga-brand-blue: #00aeef;
}

/* Logo SVG — fundo transparente, nítida em qualquer ecrã */
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.logo-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  /* Original tem texto cinza — sombra suave para legibilidade no tema escuro */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.site-logo--icon {
  width: 2.25rem;
  height: 2.25rem;
}

.site-logo--nav {
  height: 2.5rem;
  max-width: 12rem;
}

@media (min-width: 640px) {
  .site-logo--nav {
    height: 2.65rem;
    max-width: 13rem;
  }
}

@media (min-width: 1024px) {
  .site-logo--nav {
    height: 2.85rem;
    max-width: 14rem;
  }
}

.site-logo--about {
  max-width: 18rem;
  height: auto;
}

@media (min-width: 640px) {
  .site-logo--about {
    max-width: 18rem;
  }
}

.site-logo--footer {
  height: 2.75rem;
  max-width: 13rem;
  opacity: 0.95;
}

@media (min-width: 640px) {
  .site-logo--footer {
    height: 3rem;
    max-width: 14.5rem;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--mga-bg);
  color: #e4e4e7;
}

::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero gradient mesh */
.hero-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(6, 182, 212, 0.08), transparent);
}

/* Glass nav */
.nav-glass {
  background: rgba(7, 7, 13, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--mga-border);
}

/* Card hover glow */
.service-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px var(--mga-glow);
  border-color: rgba(59, 130, 246, 0.35);
}

.service-card img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover img {
  transform: scale(1.04);
}

/* Process step line */
.process-line {
  background: linear-gradient(90deg, var(--mga-accent), var(--mga-accent-2));
  height: 2px;
  opacity: 0.4;
}

/* CTA section */
.cta-bg {
  background:
    linear-gradient(135deg, rgba(7, 7, 13, 0.92), rgba(15, 15, 24, 0.88)),
    url('../assets/bg-abstract.png') center / cover no-repeat;
}

/* WhatsApp FAB pulse */
.whatsapp-fab {
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35);
  animation: fab-pulse 2.5s ease-in-out infinite;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 8px 40px rgba(37, 211, 102, 0.55); }
}

/* Form focus */
.form-input:focus {
  outline: none;
  border-color: var(--mga-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Lazy load blur-up */
img[data-src] {
  filter: blur(8px);
  transition: filter 0.4s ease;
}

img.loaded {
  filter: blur(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  .whatsapp-fab { animation: none; }
}
