/* ClimAI - Estilos Principais */
/* Inspirado em mont-fort.com e igloo.inc */

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

/* Garantir que elementos ocultos não apareçam */
[hidden] {
    display: none !important;
}

/* Barra de progresso do scroll */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

:root {
    /* Tema Escuro (Padrão) - Paleta refinada */
    --bg-primary: linear-gradient(135deg, #0a0f1c 0%, #1a2332 25%, #2a3441 50%, #1a2332 75%, #0a0f1c 100%);
    --bg-section: linear-gradient(135deg, #1a2332 0%, #2a3441 50%, #0a0f1c 100%);
    --bg-card: #1a2332;
    --bg-header: rgba(26, 35, 50, 0.95);
    --bg-footer: linear-gradient(135deg, #0a0f1c 0%, #000000 50%, #000000 100%);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #64748b;
    --text-white: #f8fafc;
    --accent-primary: #06b6d4;
    --accent-secondary: #0891b2;
    --accent-tertiary: #0e7490;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(26, 35, 50, 0.8);
    --glass-border: rgba(6, 182, 212, 0.2);
}

[data-theme="light"] {
    /* Tema Claro - Paleta refinada */
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%, #f8fafc 100%);
    --bg-section: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-footer: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-white: #ffffff;
    --accent-primary: #06b6d4;
    --accent-secondary: #0891b2;
    --accent-tertiary: #0e7490;
    --border-color: #e2e8f0;
    --shadow: rgba(15, 23, 42, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(6, 182, 212, 0.2);
}

/* Configurações globais */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Tipografia melhorada */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* Efeitos de vidro (glassmorphism) */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--shadow);
}

/* Header moderno */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cloud-icon {
    width: 42px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(6, 182, 212, 0.3));
    transition: all 0.3s ease;
}

.logo:hover .cloud-icon {
    filter: drop-shadow(0 6px 12px rgba(6, 182, 212, 0.5));
}

/* Navegação */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Avatar na navbar */
.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    margin: 0;
    padding: 0;
}
.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-avatar i {
    font-size: 1.2rem;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.nav-avatar-slot { 
    margin-left: auto; 
    margin-right: 0;
    padding-right: 0;
}

/* Botões modernos */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* Toggle de tema melhorado */
.theme-toggle {
    background: var(--glass-bg);
    border: none;
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px var(--shadow);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Seção Hero interativa */
.hero {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    color: var(--text-white);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

.hero-visual {
    animation: slideInRight 1s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

@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);
    }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title-text {
    background: linear-gradient(135deg, var(--text-white) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--accent-primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.7;
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-cloud {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(6, 182, 212, 0.4));
    transition: all 0.4s ease;
    animation: float 6s ease-in-out infinite;
}

.hero-cloud:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 25px 50px rgba(6, 182, 212, 0.6));
}

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

/* Cards modernos */
.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: var(--accent-primary);
}

/* Seções */
.section {
    padding: 100px 0;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out;
}

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

.section-header h2 {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grids responsivos */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Footer */
.footer {
    background: var(--bg-footer);
    color: var(--text-white);
    padding: 4rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Responsividade */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-description { font-size: 1.05rem; }
    .hero-cloud { width: 220px; }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Mobile navigation */
    .nav-toggle {
        background: var(--glass-bg);
        border: 1px solid var(--border-color);
        width: 44px;
        height: 44px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-left: 0.5rem;
        position: relative;
        z-index: 1001;
    }

    .nav-toggle:hover {
        background: var(--accent-primary);
        border-color: var(--accent-primary);
    }

    .nav-toggle-bar {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        position: relative;
    }

    .nav-toggle-bar + .nav-toggle-bar { margin-top: 3px; }

    /* Off-canvas menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(80vw, 320px);
        background: var(--bg-header);
        backdrop-filter: blur(20px);
        box-shadow: -10px 0 30px var(--shadow);
        padding: 100px 1.25rem 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        transition: right 0.3s ease;
        z-index: 1001;
    }

    .nav-menu.is-open { right: 0; }

    .nav-menu li { width: 100%; }
    .nav-menu a.nav-link,
    .nav-menu .btn,
    .nav-menu button.theme-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1000;
        display: none;
    }
    
    .nav-overlay:not([hidden]) {
        display: block;
    }
}

@media (max-width: 480px) {
    .section { padding: 72px 0; }
    .card { padding: 1.5rem; }
    .btn { padding: 10px 16px; }
    .nav-toggle { width: 42px; height: 42px; }
}

/* Animações de entrada */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efeitos de hover melhorados */
.interactive:hover {
    transform: translateY(-4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}


/* Performance Optimizations */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Preload critical resources */
.preload-font {
    font-display: swap;
}

/* Optimize animations for performance */
@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;
    }
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Critical above-the-fold content */
.above-fold {
    contain: layout style paint;
}

/* Optimize scrolling performance */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Reduce layout shifts */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Optimize hover effects for touch devices */
@media (hover: none) {
    .interactive:hover {
        transform: none;
        box-shadow: inherit;
    }
}

/* Optimize for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .high-dpi-optimized {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

