/* ============================================
   BASE.CSS — SISTEMA DE DESIGN LETUSH
   ============================================
   Compartilhado entre: Home, Serviços,
   Metodologia e Protocolo.
   Nenhuma página deve redefinir variáveis
   ou tokens de movimento aqui definidos.
   ============================================ */


/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {

    /* --- Paleta institucional --- */
    --black:        #080A0D;   /* fundos principais              */
    --graphite:     #171C23;   /* seções alternadas / cartões    */
    --off-white:    #F2F2EF;   /* textos e áreas claras          */
    --gold:         #D4AF37;   /* detalhes, linhas, chamadas     */
    --steel:        #AAB5C3;   /* elementos secundários          */

    /* --- Derivados (uso controlado) --- */
    --gold-light:   #F4C430;
    --gold-dark:    #AA8C2C;
    --gold-line:    rgba(212, 175, 55, 0.28);
    --gold-soft:    rgba(212, 175, 55, 0.06);
    --hairline:     rgba(242, 242, 239, 0.08);
    --text-muted:   #AAB5C3;   /* alias semântico para --steel   */

    /* --- Tipografia --- */
    --font-heading: 'Playfair Display', serif;
    --font-body:    'Montserrat', sans-serif;

    /* --- Estrutura --- */
    --container:    1200px;
    --gutter:       24px;
    --gutter-lg:    120px;
    --radius:       4px;
    --radius-lg:    6px;

    /* --- Ritmo vertical --- */
    --section-y:    50px;    /* CORRIGIDO: era 120px */
    --section-y-sm: 50px;    /* CORRIGIDO: era 72px */

    /* --- Movimento (parâmetros oficiais) --- */
    --reveal-y:        18px;
    --reveal-duration: 600ms;
    --reveal-ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
    --stagger:         100ms;
    --hover-duration:  220ms;
    --line-duration:   1000ms;
    --lift:            4px;
    --transition:      all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}


/* ============================================
   2. RESET UNIVERSAL
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--off-white);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }


/* ============================================
   3. ESTRUTURA PRINCIPAL
   ============================================ */
main {
    flex: 1;
    width: 100%;
    padding-top: 110px; /* compensa header fixo */
}


/* ============================================
   4. TIPOGRAFIA BASE
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--off-white);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-gold  { color: var(--gold) !important; }
.text-steel { color: var(--steel) !important; }


/* --- Hierarquia institucional --- */
.eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 20px;
}

.h-display {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.h-section {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    line-height: 1.22;
    font-weight: 700;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 68ch;
    line-height: 1.7;
}

.statement {
    font-size: 1.15rem;
    color: var(--off-white);
    font-weight: 600;
    line-height: 1.5;
}


/* ============================================
   5. CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

@media (min-width: 992px) {
    .container { padding: 0 var(--gutter-lg); }
}


/* ============================================
   6. SEÇÕES
   ============================================ */
.section {
    padding: var(--section-y) 0;
    position: relative;
}

.section--alt {
    background: var(--graphite);
}

.section__header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 64px;
}

.section__header .eyebrow { margin-bottom: 16px; }
.section__header .h-section { margin-bottom: 20px; }
.section__header .lead { margin: 0 auto; }


/* ============================================
   7. BOTÕES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius);
    transition:
        background-color var(--hover-duration) ease,
        color var(--hover-duration) ease,
        border-color var(--hover-duration) ease,
        transform var(--hover-duration) ease,
        box-shadow var(--hover-duration) ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.8rem;
    font-family: var(--font-body);
    line-height: 1;
}

.btn--gold {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}

.btn--gold:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}

.btn--outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn--outline:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

.btn--large {
    padding: 16px 34px;
    font-size: 0.85rem;
}


/* ============================================
   8. CARD BASE (institucional)
   ============================================ */
.card {
    background: var(--graphite);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 32px;
    transition:
        border-color var(--hover-duration) ease,
        transform var(--hover-duration) ease,
        background-color var(--hover-duration) ease,
        box-shadow var(--hover-duration) ease;
}

.card:hover {
    border-color: var(--gold-line);
    transform: translateY(calc(var(--lift) * -1));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.section--alt .card {
    background: var(--black);
}


/* ============================================
   9. HEADER FIXO
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background: rgba(8, 10, 13, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    border-bottom: 1px solid var(--gold-line);
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.header.is-scrolled {
    background: rgba(8, 10, 13, 0.96);
    padding: 6px 0;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

@media (min-width: 992px) {
    .header__inner { padding: 0 var(--gutter-lg); }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--off-white);
    z-index: 1001;
}

.logo__img {
    height: 70px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: height 0.3s ease;
}

.logo__hebrew {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold);
    font-weight: 700;
}

.logo__text {
    font-size: 0.95rem;
    color: var(--off-white);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Nav */
.nav { z-index: 1000; }

.nav__list {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav__link {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color var(--hover-duration) ease;
    position: relative;
    padding: 6px 0;
    font-weight: 500;
}

.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--gold);
    transition: width var(--hover-duration) ease;
}

.nav__link:hover,
.nav__link--active { color: var(--gold); }

.nav__link:hover::after,
.nav__link--active::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--off-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}


/* ============================================
   10. FOOTER
   ============================================ */
.footer {
    padding: 50px 0 28px; /* CORRIGIDO: era 60px no topo */
    background: var(--black);
    border-top: 1px solid var(--gold-line);
    position: relative;
    z-index: 10;
    width: 100%;
    margin-top: auto;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.footer__brand {
    position: relative;
    z-index: 2;
}

.footer__brand .logo--footer {
    margin-bottom: 14px;
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
}

.footer__tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 340px;
}

.footer__social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    color: var(--off-white);
    transition:
        border-color var(--hover-duration) ease,
        color var(--hover-duration) ease,
        transform var(--hover-duration) ease;
    text-decoration: none;
}

.social-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
}

.footer__title {
    font-size: 0.8rem;
    margin-bottom: 18px;
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer__list { list-style: none; }
.footer__list li { margin-bottom: 10px; }

.footer__list a,
.footer__list .contact-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--hover-duration) ease, transform var(--hover-duration) ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer__list a:hover,
.footer__list .contact-link:hover {
    color: var(--gold);
    transform: translateX(3px);
}

.footer__bottom {
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer__copyright {
    color: rgba(242, 242, 239, 0.35);
    font-size: 0.8rem;
    line-height: 1.5;
}

.icon { width: 18px; height: 18px; fill: currentColor; }
.icon--small { width: 16px; height: 16px; }


/* ============================================
   11. SISTEMA DE REVEAL (ANIMAÇÕES DE ENTRADA)
   ============================================
   Regras:
   - Apenas transform e opacity (GPU)
   - Duração 500–700ms
   - Stagger entre irmãos: 100ms
   - Respeita prefers-reduced-motion
   - Fallback sem JS (.no-js)
   ============================================ */

.fade-in,
.reveal {
    opacity: 0;
    transform: translateY(var(--reveal-y));
    transition:
        opacity var(--reveal-duration) var(--reveal-ease),
        transform var(--reveal-duration) var(--reveal-ease);
    will-change: opacity, transform;
}

.fade-in.visible,
.fade-in.is-visible,
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger automático: o JS injeta --i em cada filho */
.stagger > * {
    transition-delay: calc(var(--i, 0) * var(--stagger));
}

/* Delays manuais (Hero e casos pontuais) */
.d-1 { transition-delay: 100ms; }
.d-2 { transition-delay: 220ms; }
.d-3 { transition-delay: 340ms; }
.d-4 { transition-delay: 460ms; }
.d-5 { transition-delay: 580ms; }


/* --- Linha dourada que se desenha --- */
.goldline {
    display: block;
    height: 1px;
    width: 100%;
    max-width: 320px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--line-duration) var(--reveal-ease);
    margin: 24px 0;
}

.goldline.is-visible { transform: scaleX(1); }


/* --- Label institucional --- */
.section-label {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    color: var(--gold);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
    font-weight: 600;
    background: var(--gold-soft);
}


/* ============================================
   12. BARRA DE PROGRESSO (TOPO)
   ============================================ */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--gold);
    z-index: 1100;
    transition: width 80ms linear;
    pointer-events: none;
}


/* ============================================
   13. ACESSIBILIDADE
   ============================================ */

/* Respeita preferência do sistema */
@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;
    }
    .fade-in, .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .goldline { transform: scaleX(1) !important; }
}

/* Fallback quando JS está desabilitado */
.no-js .fade-in,
.no-js .reveal {
    opacity: 1;
    transform: none;
}
.no-js .goldline { transform: scaleX(1); }


/* ============================================
   14. RESPONSIVO BASE
   ============================================ */
@media (max-width: 992px) {
    :root {
        --section-y: 50px; /* CORRIGIDO: era 96px */
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-y: 50px; /* CORRIGIDO: era 72px */
        --gutter: 20px;
    }

    main { padding-top: 90px; }

    .header { padding: 8px 0; }
    .logo__img { height: 55px; max-width: 160px; }

    /* Nav mobile */
    .nav {
        position: fixed;
        top: 76px;
        left: 0;
        width: 100%;
        background: var(--graphite);
        padding: 24px var(--gutter);
        transform: translateY(-150%);
        transition: transform 0.35s var(--reveal-ease);
        z-index: 999;
        border-bottom: 1px solid var(--gold-line);
    }

    .nav.active { transform: translateY(0); }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .hamburger { display: flex; }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Footer mobile */
    .footer { padding: 50px 0 24px; } /* CORRIGIDO: era 60px */
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    .footer__brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer__brand .logo--footer {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .footer__tagline {
        max-width: 100%;
        margin: 0 auto 20px;
        text-align: center;
    }
    .footer__social { justify-content: center; }
    .footer__links .footer__list,
    .footer__contact .footer__list {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer__bottom { text-align: center; }
}

@media (max-width: 480px) {
    :root {
        --gutter: 16px;
    }

    .logo__img { height: 48px; max-width: 140px; }
    main { padding-top: 80px; }

    .btn {
        width: 100%;
        justify-content: center;
    }
}