/* ==========================================================================
   ZUPOLY PROJETOS LTDA — style.css
   Estilos base, variáveis de marca e componentes de UI.
   Complementa o TailwindCSS. Paleta: Azul metálico / Branco / Cinza escuro.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variáveis de marca
   -------------------------------------------------------------------------- */
:root {
    --brand-400: #4c9df0;
    --brand-500: #2b7fd4;   /* Azul metálico principal (logo) */
    --brand-600: #1e63b0;
    --brand-700: #184f8f;
    --brand-900: #0b2540;
    --ink-950: #060d18;     /* Cinza escuro / fundo principal */
    --steel-100: #e6edf5;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Poppins', 'Inter', sans-serif;
}

/* Compensa o header fixo ao navegar via âncora */
section[id] {
    scroll-margin-top: 120px;
}

/* ALTERAÇÃO: cor da barra superior (header) harmonizada com o azul escuro da nova logo.
   O seletor de ID sobrepõe as classes utilitárias bg-slate-950/70 e bg-slate-950/95
   alternadas pelo main.js ao rolar a página. */
#siteHeader {
    background-color: rgba(7, 21, 43, 0.88); /* azul escuro da logo (aprox. brand-900) */
}

/* Foco visível (acessibilidade) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand-400);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Barra de rolagem */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb { background: var(--brand-700); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-600); }

/* --------------------------------------------------------------------------
   3. Utilitários visuais
   -------------------------------------------------------------------------- */
.text-gradient {
    background: linear-gradient(90deg, #6bb2f5, #2b7fd4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Grid decorativo de fundo (estética "engenharia/CAD") */
.bg-grid {
    background-image:
        linear-gradient(rgba(43, 127, 212, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 127, 212, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Borda com brilho metálico sutil */
.metal-border {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)) padding-box;
}

/* --------------------------------------------------------------------------
   4. Hero — overlay e parallax
   -------------------------------------------------------------------------- */
.hero {
    background-color: var(--ink-950);
    /* ALTERAÇÃO: caminho ajustado para a imagem real em /public (a partir de assets/css/) */
    background-image:
        linear-gradient(to right, rgba(6, 13, 24, 0.92), rgba(11, 37, 64, 0.55)),
        url('../../principal.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Efeito parallax base */
}

/* Overlay azul metálico adicional */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(43, 127, 212, 0.18), transparent 60%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. Botões
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background-color: var(--brand-500);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(43, 127, 212, 0.5);
}
.btn-primary:hover { background-color: var(--brand-600); }

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); }

.btn-whatsapp {
    background-color: #22c55e;
    color: #fff;
}
.btn-whatsapp:hover { background-color: #16a34a; }

/* --------------------------------------------------------------------------
   6. Cards de serviço
   -------------------------------------------------------------------------- */
.service-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(43, 127, 212, 0.4);
    box-shadow: 0 24px 48px -24px rgba(43, 127, 212, 0.5);
}
.service-icon {
    transition: transform 0.35s ease, background-color 0.35s ease, color 0.35s ease;
}
.service-card:hover .service-icon {
    transform: scale(1.08) rotate(-4deg);
    background-color: var(--brand-500);
    color: #fff;
}

/* --------------------------------------------------------------------------
   7. Timeline (Processo)
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-500), transparent);
}
.timeline-dot {
    box-shadow: 0 0 0 6px rgba(43, 127, 212, 0.15);
}

/* Layout horizontal da timeline em telas grandes (ver responsive.css) */

/* --------------------------------------------------------------------------
   8. Portfólio / Galeria
   -------------------------------------------------------------------------- */
.filter-btn {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn.active {
    background-color: var(--brand-500);
    color: #fff;
    border-color: var(--brand-500);
}

.gallery-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item.hide {
    display: none;
}
.gallery-item figure {
    overflow: hidden;
}
.gallery-item img,
.gallery-item .placeholder {
    transition: transform 0.5s ease;
}
.gallery-item:hover img,
.gallery-item:hover .placeholder {
    transform: scale(1.08);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(4, 8, 15, 0.92);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}
.lightbox img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: 0.75rem;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    transition: transform 0.3s ease;
}
.lightbox.open img {
    transform: scale(1);
}

/* --------------------------------------------------------------------------
   9. FAQ (Acordeão)
   -------------------------------------------------------------------------- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}
.faq-icon {
    transition: transform 0.3s ease;
}

/* --------------------------------------------------------------------------
   10. Botão "voltar ao topo" e WhatsApp flutuante
   -------------------------------------------------------------------------- */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wa-float {
    box-shadow: 0 12px 30px -8px rgba(34, 197, 94, 0.6);
    animation: wa-pulse 2.4s infinite;
}

/* --------------------------------------------------------------------------
   11. Lazy loading de imagens
   -------------------------------------------------------------------------- */
img.lazy {
    filter: blur(8px);
    transition: filter 0.5s ease;
}
img.lazy.loaded {
    filter: blur(0);
}
