/* ==========================================================================
   Mgf 2020 Contabilidade - estilos
   Cores e espaçamentos definidos em variáveis no topo.
   ========================================================================== */

:root {
    --navy: #0b2545;
    --navy-soft: #12365f;
    --blue: #13497b;
    --accent: #1d6fb8;
    --accent-dark: #155c9b;
    --text: #1c2637;
    --muted: #55647a;
    --line: #dde4ee;
    --soft: #f4f7fb;
    --white: #ffffff;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(11, 37, 69, .06);
    --shadow: 0 12px 32px rgba(11, 37, 69, .12);
    --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Garante que o atributo hidden sempre prevaleça sobre display definido nas classes.
   Usado pelo js/main.js para esconder dados de contato não configurados. */
[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy); }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
small { font-size: .85rem; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 22px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: var(--white);
    padding: 12px 18px;
    z-index: 200;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- Botões ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: .96rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy); border-color: #b9c6d8; }
.btn--outline:hover { background: var(--soft); border-color: var(--navy); color: var(--navy); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light:hover { background: #e8eef7; border-color: #e8eef7; color: var(--navy); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); border-color: var(--white); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn[hidden] { display: none !important; }

/* ---------- Cabeçalho ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--navy);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .01em;
}
.brand:hover { text-decoration: none; color: var(--navy); }
.brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--navy);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: .04em;
    flex: 0 0 auto;
}
.brand__text small {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    font-size: 1.1rem;
    cursor: pointer;
}
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__link {
    font-size: .95rem;
    font-weight: 500;
    color: var(--muted);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--navy); border-bottom-color: var(--accent); text-decoration: none; }
.header__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 62%, var(--blue) 100%);
    color: var(--white);
    padding: 76px 0 84px;
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 52px;
    align-items: start;
}
.hero h1 { color: var(--white); }
.hero p { color: #d3e0f0; font-size: 1.08rem; max-width: 34em; }
.eyebrow {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9fc0e4;
    margin-bottom: 16px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__note { font-size: .85rem; color: #a9c1dc; margin-top: 20px; }

.hero__card {
    background: var(--white);
    color: var(--text);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}
.hero__card h2 { font-size: 1.05rem; margin-bottom: 4px; }
.hero__card > p { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.check-list li {
    display: flex;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: .93rem;
}
.check-list li:last-child { border-bottom: 0; }
.check-list i { color: var(--accent); margin-top: 4px; flex: 0 0 auto; }

/* ---------- Faixa de dados ---------- */
.trust { background: var(--soft); border-bottom: 1px solid var(--line); }
.trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
}
.trust__item { background: var(--soft); padding: 26px 22px; }
.trust__item strong { display: block; color: var(--navy); font-size: 1.02rem; margin-bottom: 2px; }
.trust__item span { font-size: .87rem; color: var(--muted); }

/* ---------- Seções ---------- */
.section { padding: 78px 0; }
.section--soft { background: var(--soft); }
.section__head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section__head .eyebrow { color: var(--accent); }
.section__head p { color: var(--muted); margin-bottom: 0; }
.section--left .section__head,
.section__head.section--left { text-align: left; margin-left: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
}
.card__icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: #e9f1fa;
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .93rem; margin-bottom: 0; }
.card ul { margin-top: 12px; }
.card ul li {
    position: relative;
    padding-left: 18px;
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 5px;
}
.card ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- Passos ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.steps__item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; }
.steps__item::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 14px;
}
.steps__item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps__item p { font-size: .9rem; color: var(--muted); margin-bottom: 0; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th,
.data-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 500; width: 44%; }
.data-table td { color: var(--text); font-weight: 600; }
.data-table tr:last-child th,
.data-table tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 20px;
    margin-bottom: 12px;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    padding: 16px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    flex: 0 0 auto;
    line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); font-size: .94rem; padding-bottom: 6px; margin-bottom: 12px; }

/* ---------- Contato ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__list li {
    display: flex;
    gap: 13px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
}
.contact__list li:last-child { border-bottom: 0; }
.contact__list i { color: var(--accent); width: 20px; margin-top: 4px; flex: 0 0 auto; }
.contact__list strong { display: block; color: var(--navy); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.contact__box {
    background: var(--navy);
    color: #d3e0f0;
    border-radius: var(--radius-lg);
    padding: 34px 30px;
}
.contact__box h3 { color: var(--white); font-size: 1.3rem; }
.contact__box p { font-size: .95rem; }
.contact__box .btn { margin-top: 6px; }
.contact__box .btn--primary { background: var(--white); color: var(--navy); border-color: var(--white); }
.contact__box .btn--primary:hover { background: #e8eef7; border-color: #e8eef7; color: var(--navy); }
.config-note {
    font-size: .82rem;
    color: #ffd9a8;
    background: rgba(255, 255, 255, .08);
    border: 1px dashed rgba(255, 255, 255, .35);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 14px;
}

/* ---------- Rodapé ---------- */
.site-footer {
    background: var(--navy);
    color: #c8d8ea;
    padding: 54px 0 24px;
    font-size: .92rem;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.site-footer .brand { color: var(--white); }
.site-footer .brand:hover { color: var(--white); }
.site-footer .brand__mark { background: var(--white); color: var(--navy); }
.site-footer .brand__text small { color: #9fb6cf; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { color: #c8d8ea; }
.site-footer a:hover { color: var(--white); }
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: .83rem;
    color: #9fb6cf;
}

/* ---------- Botão flutuante ---------- */
.wa-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 70;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1f8f4e;
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: 0 10px 24px rgba(15, 60, 35, .3);
    transition: transform .18s ease, background-color .18s ease;
}
.wa-float:hover { background: #177041; color: var(--white); transform: translateY(-2px); text-decoration: none; }
.wa-float[hidden] { display: none !important; }

/* ---------- Páginas legais ---------- */
.legal { padding: 64px 0 80px; }
.legal__inner { max-width: 800px; margin: 0 auto; }
.legal h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.legal h2 { font-size: 1.25rem; margin-top: 34px; }
.legal h3 { font-size: 1.02rem; margin-top: 22px; }
.legal p, .legal li { color: #2c3a4e; }
.legal ul { list-style: disc; padding-left: 22px; margin: 0 0 1em; }
.legal ul li { margin-bottom: .5em; }
.legal__meta { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.legal__back { display: inline-block; margin-bottom: 22px; font-size: .9rem; font-weight: 600; }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; gap: 34px; }
    .trust__grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .about, .contact { grid-template-columns: 1fr; gap: 30px; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }

    .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
        padding: 10px 22px 18px;
    }
    .nav.is-open { display: block; }
    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__link { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); border-left: 0; }
    .nav__link:hover { border-bottom-color: var(--line); color: var(--accent); }
    .header__actions .btn--outline { display: none; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .container { padding: 0 16px; }
    .site-header__bar { min-height: 64px; gap: 10px; }
    .brand { font-size: 1rem; gap: 9px; }
    .brand__mark { width: 36px; height: 36px; font-size: .82rem; border-radius: 9px; }
    .brand__text small { font-size: .62rem; letter-spacing: .1em; }
    .header__actions .btn { padding: 10px 14px; font-size: .85rem; }
    .hero { padding: 54px 0 60px; }
    .hero__actions .btn { width: 100%; }
    .hero__card { padding: 22px; }
    .section { padding: 56px 0; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .trust__grid { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; }
    .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
    .legal { padding: 40px 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
    .site-header, .wa-float, .site-footer__grid { display: none; }
    body { color: #000; font-size: 12pt; }
}
