/* =========================================================
   TDB ODONTOLOGIA — Identidade Visual
   Paleta: cinza quente (verso do cartão) + bege/creme (logo)
   Tipografia: Cormorant Garamond (display) + Inter (texto)
   ========================================================= */

:root {
    /* Cores principais — fiéis ao cartão de visita */
    --cinza: #5e5954;
    --cinza-escuro: #3d3936;
    --cinza-claro: #7d7771;
    --bege: #ede2cc;
    --bege-claro: #f6efe1;
    --bege-escuro: #d7c6a5;
    --bege-medio: #c9b690;

    /* Funcionais */
    --branco: #ffffff;
    --preto: #1a1816;
    --texto: #2d2925;
    --texto-suave: #6b6660;
    --linha: #e8e0cf;
    --linha-escura: rgba(255,255,255,0.12);

    /* WhatsApp */
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;

    /* Espaçamento */
    --container: 1240px;
    --container-narrow: 980px;
    --section-y: clamp(64px, 9vw, 130px);
    --radius: 4px;
    --radius-lg: 18px;

    /* Tipografia */
    --display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transições */
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.4s var(--easing);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--texto);
    background: var(--branco);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.15;
    color: var(--cinza-escuro);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.25rem; font-family: var(--body); font-weight: 600; }

p { color: var(--texto-suave); font-size: 1.02rem; line-height: 1.7; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 28px;
}

/* =====================================================
   HEADER / NAV
   ===================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 224, 207, 0.6);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 30px rgba(94, 89, 84, 0.08);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-link img {
    height: 54px;
    width: auto;
    transition: transform var(--transition);
}
.logo-link:hover img { transform: scale(1.04); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 38px;
}
.main-nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--cinza-escuro);
    position: relative;
    padding: 6px 0;
    letter-spacing: 0.02em;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--cinza-escuro);
    transition: width var(--transition);
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--cinza); }

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--whatsapp);
    color: white;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}
.header-cta:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}
.header-cta svg { width: 16px; height: 16px; }

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 200;
}
.menu-toggle span {
    width: 24px;
    height: 1.8px;
    background: var(--cinza-escuro);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   BOTÕES
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    cursor: pointer;
    border: 1.5px solid transparent;
    line-height: 1;
    text-align: center;
}

.btn-primary {
    background: var(--cinza-escuro);
    color: white;
}
.btn-primary:hover {
    background: var(--cinza);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(61, 57, 54, 0.25);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-outline {
    background: transparent;
    color: var(--cinza-escuro);
    border-color: var(--cinza-escuro);
}
.btn-outline:hover {
    background: var(--cinza-escuro);
    color: white;
}

.btn-light {
    background: var(--bege-claro);
    color: var(--cinza-escuro);
    border-color: var(--bege);
}
.btn-light:hover { background: var(--bege); }

/* =====================================================
   WHATSAPP FLOAT
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--whatsapp);
    color: white;
    padding: 14px 22px 14px 16px;
    border-radius: 50px;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4);
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    animation: pulse 2.4s ease-in-out infinite;
}
.whatsapp-float:hover {
    background: var(--whatsapp-dark);
    transform: scale(1.05);
    animation: none;
}
.whatsapp-float svg { width: 26px; height: 26px; flex-shrink: 0; }
.whatsapp-float .float-text { white-space: nowrap; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* =====================================================
   SECTIONS
   ===================================================== */
section { padding: var(--section-y) 0; }

.section-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--bege-escuro);
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 18px;
    max-width: 800px;
}
.section-title em {
    font-style: italic;
    color: var(--bege-escuro);
    font-weight: 400;
}

.section-lead {
    font-size: 1.08rem;
    color: var(--texto-suave);
    max-width: 640px;
    margin-bottom: 50px;
    line-height: 1.7;
}

.section-header.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
.section-header.center .section-title,
.section-header.center .section-lead {
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--cinza-escuro);
    color: rgba(255,255,255,0.75);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 56px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 90px;
    margin-bottom: 22px;
    filter: brightness(0) invert(1) opacity(0.95);
}

.footer-tag {
    font-size: 0.94rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
    max-width: 320px;
    margin-bottom: 24px;
}

.footer-col h5 {
    font-family: var(--body);
    color: var(--bege-claro);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 0.93rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-col a:hover { color: var(--bege-claro); }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.7);
    font-size: 0.93rem;
}
.footer-contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--bege-escuro);
}

.footer-bottom {
    border-top: 1px solid var(--linha-escura);
    padding-top: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover { color: var(--bege-claro); }

.footer-socials {
    display: flex;
    gap: 12px;
}
.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.footer-socials a:hover {
    background: var(--bege-escuro);
    border-color: var(--bege-escuro);
    color: var(--cinza-escuro);
}
.footer-socials svg { width: 16px; height: 16px; }

/* =====================================================
   ANIMAÇÕES UTILITÁRIAS (Intersection Observer)
   ===================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--easing), transform 0.9s var(--easing);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.2s; }
.fade-in.delay-3 { transition-delay: 0.3s; }
.fade-in.delay-4 { transition-delay: 0.4s; }

/* =====================================================
   RESPONSIVO
   ===================================================== */
@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(85%, 360px);
        height: 100vh;
        background: var(--branco);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 32px;
        gap: 24px;
        box-shadow: -10px 0 40px rgba(0,0,0,0.1);
        transition: right 0.4s var(--easing);
        z-index: 150;
    }
    .main-nav.open { right: 0; }
    .main-nav a { font-size: 1.1rem; }

    .header-cta { display: none; }
    .menu-toggle { display: flex; }

    body.menu-open { overflow: hidden; }
    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 99;
        animation: fadeIn 0.3s;
    }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column-reverse;
        text-align: center;
    }

    .whatsapp-float .float-text { display: none; }
    .whatsapp-float {
        padding: 14px;
        bottom: 20px;
        right: 20px;
    }

    .btn { padding: 14px 24px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .logo-link img { height: 44px; }
    .container, .container-narrow { padding: 0 20px; }
}
