/* ═══════════════════════════════════════════════════════════════════════════
   VERTIX MOTO GRUPO - ESTILOS PRINCIPAIS
   
   Organizacao:
   1. CSS Variables (Design Tokens)
   2. Reset e Base
   3. Tipografia
   4. Layout Utilities
   5. Componentes
   6. Animacoes
   7. Responsivo
═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS VARIABLES - Design Tokens
   
   Sistema de variaveis para facilitar manutencao e troca de temas.
   Usamos CSS Custom Properties para permitir troca dinamica de tema.
═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Cores Principais */
    --color-gold: #C9A227;
    --color-gold-light: #E5C158;
    --color-gold-dark: #9A7B1C;
    --color-copper: #B87333;
    --color-copper-light: #D4914E;
    
    /* Tema Claro */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 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);
    
    /* Transicoes */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Espacamento */
    --section-padding: 6rem;
    --container-max: 1280px;
}

/* Tema Escuro - Override de variaveis */
.dark {
    --bg-primary: #0D0D0D;
    --bg-secondary: #050505;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --border-color: #1E293B;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET E BASE
   
   Normalizacao basica para garantir consistencia entre navegadores.
═══════════════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove scroll horizonstal indesejado */
body {
    overflow-x: hidden;
}

/* Focus visible para acessibilidade */
:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Remove outline padrao para mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Selecao de texto customizada */
::selection {
    background: var(--color-gold);
    color: #0D0D0D;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. TIPOGRAFIA
   
   Ajustes finos de tipografia para melhor legibilidade.
═══════════════════════════════════════════════════════════════════════════ */

/* Headings com melhor spacing */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* Paragraphs com melhor legibilidade */
p {
    text-wrap: pretty;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
   
   Classes utilitarias complementares ao Tailwind.
═══════════════════════════════════════════════════════════════════════════ */

/* Esconde scrollbar mas mantem funcionalidade */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Background pattern para hero */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(201, 162, 39, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(184, 115, 51, 0.03) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. COMPONENTES
   
   Estilos especificos para componentes complexos.
═══════════════════════════════════════════════════════════════════════════ */

/* Header - Estado scrollado */
#header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.dark #header.scrolled {
    background: rgba(5, 5, 5, 0.9);
}

/* Nav links - underline animado */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-copper));
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

/* Cards de membros */
.member-card {
    transition: transform var(--transition-base);
}

.member-card:hover {
    transform: translateY(-8px);
}

/* Timeline Items */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. ANIMACOES
   
   Keyframes e classes de animacao reutilizaveis.
   Preferimos CSS puro para animacoes por performance.
═══════════════════════════════════════════════════════════════════════════ */

/* Animacao de entrada do Hero */
@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: heroEntrance 1s ease forwards;
    animation-delay: 0.3s;
}

/* Particulas flutuantes */
@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-gold);
    border-radius: 50%;
    animation: floatParticle linear infinite;
    pointer-events: none;
}

/* Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay para elementos em grupo */
.reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.reveal-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* Pulse para indicador de scroll */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. RESPONSIVO
   
   Ajustes especificos para diferentes tamanhos de tela.
   Mobile-first: base é mobile, adaptamos para telas maiores.
═══════════════════════════════════════════════════════════════════════════ */

/* Tablets e acima */
@media (min-width: 768px) {
    .timeline-item.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    /* Ajustes especificos para desktop se necessario */
}

/* Preferencia por movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hero-content {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. PRINT STYLES
   
   Otimizacao para impressao.
═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .no-print,
    #header,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Estilo para campo de telefone */
input[type="tel"] {
    letter-spacing: 0.05em;
}

/* Estilos para o campo com erro */
input.error, textarea.error, select.error {
    border-color: #EF4444 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    50% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}