/**
 * LoCode Landing Page - Custom Styles
 * Autor: XCODE - https://xcode.ia.br
 * Versão: 1.0.0
 * Data: 2024
 */

/* ===================================
   RESET E CONFIGURAÇÕES GLOBAIS
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais do logo LoCode */
    --color-purple: #8B5CF6;
    --color-blue: #3B82F6;
    --color-cyan: #06B6D4;
    --color-teal: #14B8A6;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #9333EA 0%, #3B82F6 50%, #06B6D4 100%);
    --gradient-hover: linear-gradient(135deg, #7C3AED 0%, #2563EB 50%, #0891B2 100%);
    
    /* Cores neutras */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transições */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* ===================================
   ANIMAÇÕES CUSTOMIZADAS
   =================================== */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* ===================================
   CLASSES DE ANIMAÇÃO
   =================================== */

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===================================
   HEADER / NAVIGATION
   =================================== */

header {
    transition: all var(--transition-normal);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

nav a {
    position: relative;
    transition: color var(--transition-fast);
}

/* Menu Links com indicador visual */
.nav-link {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transition: left var(--transition-normal);
}

.nav-link:hover::before {
    left: 0;
}

/* ===================================
   BOTÕES
   =================================== */

.btn-gradient {
    background: var(--gradient-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient span {
    position: relative;
    z-index: 1;
}

/* ===================================
   CARDS
   =================================== */

.feature-card {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* ===================================
   FORMULÁRIO
   =================================== */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-gray-600);
    opacity: 0.6;
}

/* Estilo para campos com erro */
input.error,
textarea.error {
    border-color: #EF4444;
}

input.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Estilo para campos válidos */
input.valid,
textarea.valid {
    border-color: #10B981;
}

/* ===================================
   SCROLLBAR CUSTOMIZADA
   =================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-purple) 0%, var(--color-cyan) 100%);
    border-radius: 6px;
    border: 2px solid var(--color-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7C3AED 0%, #0891B2 100%);
}

/* ===================================
   SELEÇÃO DE TEXTO
   =================================== */

::selection {
    background-color: var(--color-purple);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-purple);
    color: var(--color-white);
}

/* ===================================
   LOADING SPINNER
   =================================== */

.spinner {
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top: 3px solid var(--color-purple);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   UTILITÁRIOS
   =================================== */

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

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.border-gradient {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.border-gradient::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
}

/* ===================================
   WHATSAPP BUTTON
   =================================== */

/* Botão flutuante do WhatsApp */
a[href*="wa.me"] {
    animation: float 3s ease-in-out infinite;
}

a[href*="wa.me"]:hover {
    animation: none;
}

/* Badge de notificação */
a[href*="wa.me"] span {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsividade do botão WhatsApp */
@media (max-width: 640px) {
    a[href*="wa.me"] {
        bottom: 1rem;
        right: 1rem;
        padding: 0.875rem;
    }
    
    a[href*="wa.me"] svg {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

/* Tablets */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        font-size: 13px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* ===================================
   ACESSIBILIDADE
   =================================== */

/* Foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-purple);
    outline-offset: 2px;
}

/* Reduzir movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --color-gray-600: #000000;
        --color-gray-700: #000000;
    }
    
    a,
    button {
        text-decoration: underline;
    }
}

/* ===================================
   MODO ESCURO (OPCIONAL)
   =================================== */

@media (prefers-color-scheme: dark) {
    /* Descomente para ativar modo escuro automático
    body {
        background-color: var(--color-gray-900);
        color: var(--color-gray-100);
    }
    
    header {
        background-color: rgba(17, 24, 39, 0.95);
    }
    */
}

/* ===================================
   PERFORMANCE
   =================================== */

/* Otimização de renderização */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ===================================
   IMPRESSÃO
   =================================== */

@media print {
    header,
    footer,
    #mobile-menu-btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}
