/* ============================================================
   style.css — Estilos globais e design system
   Mariano Marcenaria
   ============================================================ */

/* ── Variáveis ───────────────────────────────────────────── */
:root {
    --charcoal:      #1F2B24;
    --musgo:         #2E4A35;
    --oliva:         #3D5C3E;
    --ouro:          #C4A35A;
    --ouro-claro:    #D4BC7E;
    --creme:         #EDE9DC;
    --creme-claro:   #F5F3EC;
    --branco:        #FFFFFF;
    --cinza-soft:    #F0EEE8;
    --texto:         #1F2B24;
    --texto-suave:   #5A6A5E;
    --border:        rgba(31,43,36,0.12);

    --font-heading:  'Playfair Display', Georgia, serif;
    --font-body:     'Inter', system-ui, sans-serif;

    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --shadow-sm:  0 1px 4px rgba(31,43,36,0.08);
    --shadow:     0 4px 20px rgba(31,43,36,0.10);
    --shadow-lg:  0 12px 48px rgba(31,43,36,0.16);

    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;

    --header-h:   72px;
    --container:  1200px;
    --container-sm: 760px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--texto);
    background-color: var(--creme-claro);
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
}

/* ── Container ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Tipografia ──────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--charcoal);
}

.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ouro);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--texto-suave);
    max-width: 560px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .section-sub {
    margin: 0 auto;
}

/* ── Botões ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), transform var(--transition-fast),
                box-shadow var(--transition);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--charcoal);
    color: var(--creme-claro);
    border-color: var(--charcoal);
}
.btn-primary:hover {
    background: var(--musgo);
    border-color: var(--musgo);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}
.btn-outline:hover {
    background: var(--charcoal);
    color: var(--creme-claro);
}

.btn-outline-dark {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}
.btn-outline-dark:hover {
    background: var(--charcoal);
    color: var(--creme-claro);
}

.btn-outline-light {
    background: transparent;
    color: var(--creme-claro);
    border-color: rgba(245,243,236,0.6);
}
.btn-outline-light:hover {
    background: rgba(245,243,236,0.15);
    border-color: var(--creme-claro);
}

.btn-whatsapp {
    background: var(--ouro);
    color: var(--charcoal);
    border-color: var(--ouro);
    font-weight: 700;
}
.btn-whatsapp:hover {
    background: var(--ouro-claro);
    border-color: var(--ouro-claro);
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 0.9375rem;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
    /* Garante que o header cobre o menu deslizando */
    isolation: isolate;
}

.site-header.scrolled {
    background: var(--charcoal);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    padding: 6px 0;
    overflow: hidden;
    border-radius: 6px;
}

.header-logo img {
    height: 70px;
    max-height: calc(var(--header-h) - 8px);
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(245,243,236,0.85);
    letter-spacing: 0.03em;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ouro);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--creme-claro);
}

.nav-item:hover::after, .nav-item.active::after {
    transform: scaleX(1);
}

/* Menu mobile toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--creme-claro);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* ── WhatsApp Flutuante ───────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: waPulse 2.5s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,0.55);
    animation: none;
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.65), 0 0 0 8px rgba(37,211,102,0.12); }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--charcoal);
    color: rgba(245,243,236,0.8);
    padding: 60px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(245,243,236,0.1);
}

.footer-logo {
    height: 40px;
    margin-bottom: 16px;
    border-radius: 6px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(245,243,236,0.65);
    max-width: 280px;
    margin-top: 12px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ouro);
    margin-bottom: 1.25rem;
}

.footer-links ul li + li { margin-top: 10px; }

.footer-links a,
.footer-contact a {
    font-size: 0.9rem;
    color: rgba(245,243,236,0.7);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--ouro-claro);
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: rgba(245,243,236,0.7);
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: rgba(245,243,236,0.7) !important;
    transition: color var(--transition-fast) !important;
}
.footer-social:hover { color: var(--ouro-claro) !important; }

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(245,243,236,0.4);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    background: var(--creme);
    color: var(--musgo);
    letter-spacing: 0.03em;
}

/* ── Utilities ───────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsividade Global ───────────────────────────────── */
@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    /* Ajuste do logo em telas menores: limitar altura para caber no header */
    .header-logo img {
        height: auto;
        max-height: calc(var(--header-h) - 12px);
        width: auto;
    }
    .menu-toggle { display: flex; }

    .header-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--charcoal);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 4px;
        /* Esconde completamente: invisível + fora do fluxo de clique */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        z-index: 99;
    }

    .header-nav.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-item {
        padding: 12px 0;
        border-bottom: 1px solid rgba(245,243,236,0.08);
    }

    .nav-item::after { display: none; }

    .btn-whatsapp {
        margin-top: 8px;
        text-align: center;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 52px; height: 52px; }
}
