/* Velasco Contabilidade — site público. CSS próprio, sem build (ADR-001).
   Tokens: docs/02-design/tokens-propostos.json + regras de contraste do CONTRATO-VISUAL §3. */

@font-face { font-family: "Raleway"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/raleway-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/raleway-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-700-normal.woff2") format("woff2"); }

:root {
    --gold: #bfa169;          /* decorativo apenas (2,47:1 sobre branco) */
    --gold-text: #806329;     /* texto/links/botões (5,62:1) */
    --gold-dark: #6b5222;
    --text: #444;
    --text-strong: #2b2b2b;
    --on-gold: #222;          /* texto sobre dourado (6,45:1) */
    --bg: #fff;
    --surface: #f6f4ef;
    --band: #ebebeb;
    --border: #e5e2da;
    --radius: 14px;
    --container: 1200px;
    --header-h: 88px;
    --header-h-compact: 68px;
    --font: "Raleway", Arial, sans-serif;
    --shadow: 0 8px 28px rgba(0, 0, 0, .10);
    --focus: 0 0 0 3px #fff, 0 0 0 5px var(--gold-text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; overflow-wrap: anywhere; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--gold-text); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }
[id] { scroll-margin-top: calc(var(--header-h-compact) + 16px); }
main:focus { outline: none; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 8px; border: 2px solid transparent; font: 700 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; letter-spacing: .02em; transition: background-color .18s, color .18s, border-color .18s; }
.btn--primary { background: var(--gold-text); color: #fff; }
.btn--primary:hover { background: var(--gold-dark); color: #fff; }
.btn--outline-light { border-color: #fff; color: #fff; background: rgba(0, 0, 0, .15); }
.btn--outline-light:hover { background: #fff; color: var(--text-strong); }
.btn--ghost { border-color: var(--gold-text); color: var(--gold-text); background: transparent; }
.btn--ghost:hover { background: var(--surface); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Header fixo / suspenso */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; border-top: 6px solid var(--gold); transition: padding .18s; }
.site-header__bar { max-width: calc(var(--container) + 48px); margin: 0 auto; display: flex; align-items: center; gap: 24px; height: var(--header-h); padding: 0 24px; background: rgba(255, 255, 255, .96); transition: height .18s, box-shadow .18s, border-radius .18s, margin .18s; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--gold); transition: opacity .18s; }
.site-header.is-scrolled .site-header__bar { height: var(--header-h-compact); box-shadow: var(--shadow); }
.site-header.is-scrolled::after { opacity: 0; }
@media (min-width: 1248px) {
    .site-header.is-scrolled { padding-top: 10px; border-top-color: transparent; }
    .site-header.is-scrolled .site-header__bar { border-radius: 12px; }
}
.site-header { background: transparent; }
.site-header:not(.is-scrolled) { background: #fff; }
body { padding-top: calc(var(--header-h) + 10px); }
body.page-home { padding-top: calc(var(--header-h) + 10px); }
.brand { flex: 0 0 auto; display: block; }
.brand__logo { width: 250px; height: auto; aspect-ratio: 600 / 170; object-fit: cover; object-position: center; transition: width .18s; } /* respiro branco do JPG oficial tratado por CSS (arquivo intacto) */
.site-header.is-scrolled .brand__logo { width: 200px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.site-nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav__link { display: block; padding: 10px 14px; color: var(--text-strong); font-weight: 600; font-size: .98rem; text-decoration: none; letter-spacing: .02em; border-bottom: 3px solid transparent; }
.site-nav__link:hover { color: var(--gold-text); }
.site-nav__link.is-active, .site-nav__link[aria-current="page"] { color: var(--gold-text); border-bottom-color: var(--gold); }
.site-nav__cta-item { margin-left: 8px; }
.site-nav__cta { padding: 10px 18px; }
.social-links { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-links__item { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--gold-text); color: #fff; }
.social-links__item:hover { background: var(--gold-dark); color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
    :root { --header-h: 72px; --header-h-compact: 64px; }
    .brand__logo, .site-header.is-scrolled .brand__logo { width: 190px; }
    .nav-toggle { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; min-height: 44px; min-width: 44px; padding: 8px 12px; border: 2px solid var(--gold-text); border-radius: 8px; background: #fff; color: var(--text-strong); font: 700 .9rem var(--font); cursor: pointer; }
    .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .18s; }
    .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
    .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 24px 24px; background: #fff; box-shadow: var(--shadow); max-height: calc(100vh - var(--header-h)); overflow-y: auto; display: none; }
    .js .site-nav.is-open { display: flex; }
    .site-nav__list { flex-direction: column; align-items: stretch; }
    .site-nav__link { padding: 14px 8px; border-bottom: 1px solid var(--border); }
    .site-nav__cta-item { margin: 12px 0 0; }
    .site-nav__cta { width: 100%; }
    .site-header__bar { position: relative; }
    html:not(.js) .site-header__bar { flex-wrap: wrap; height: auto; padding: 12px 24px; }
    html:not(.js) .nav-toggle { display: none; }
    html:not(.js) body { padding-top: 0; }
    html:not(.js) .site-header { position: static; }
}
@media (max-width: 420px) {
    .brand__logo, .site-header.is-scrolled .brand__logo { width: 170px; }
    .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .container { padding: 0 18px; }
}
body.nav-open { overflow: hidden; }

/* Hero */
.hero { position: relative; isolation: isolate; min-height: clamp(380px, 56vw, 560px); display: grid; align-items: center; color: #fff; text-align: center; overflow: hidden; background: #1c2a3a; }
.page-home .hero { margin-top: -10px; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 26, 42, .72), rgba(14, 26, 42, .62)); }
.hero__content { padding-top: 56px; padding-bottom: 56px; }
.hero__title { color: #fff; font-size: clamp(1.55rem, 4vw, 2.5rem); letter-spacing: .01em; margin-bottom: .5em; text-wrap: balance; }
.hero__subtitle { font-size: 1.1rem; margin-bottom: 1.6em; }

/* Seções */
.section { padding: clamp(48px, 7vw, 88px) 0; background: var(--bg); }
.section--tight { padding: clamp(32px, 5vw, 56px) 0; }
.section--band { background: var(--band); }
.section--chevron { position: relative; clip-path: polygon(0 0, 40% 0, 50% 28px, 60% 0, 100% 0, 100% 100%, 60% 100%, 50% calc(100% - 28px), 40% 100%, 0 100%); padding-top: calc(clamp(48px, 7vw, 88px) + 20px); padding-bottom: calc(clamp(48px, 7vw, 88px) + 20px); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.35rem); text-transform: none; margin-bottom: 1em; }
.section-title::after { content: ""; display: block; width: 120px; height: 4px; margin-top: 14px; background: var(--gold); border-radius: 2px; }
.section-title--center { text-align: center; }
.section-title--center::after { margin-left: auto; margin-right: auto; }
.section-title--right { text-align: center; }
.section-title--right::after { margin-left: auto; margin-right: auto; }
.section-more { margin-top: 24px; text-align: right; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { margin: 0; }
.rounded { border-radius: var(--radius); width: 100%; object-fit: cover; }
@media (max-width: 960px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .split--reverse .split__media { order: 0; }
}
.prose { font-size: 1rem; overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose a { overflow-wrap: anywhere; }
.prose img { border-radius: 8px; margin: 1.2em 0; }
.prose--article { font-size: 1.0625rem; line-height: 1.7; max-width: 72ch; }
.prose--article h2, .prose--article h3 { margin-top: 1.6em; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; padding: 0; margin: 24px 0 0; }
.gallery__item { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery__item:hover img { transform: scale(1.04); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Áreas (serviços/departamentos) */
.section--areas { padding-bottom: 0; }
.area-row { padding: clamp(32px, 5vw, 64px) 0; background: #f7f7f7; }
.area-row--alt { background: var(--band); }
.area-title { font-size: clamp(1.15rem, 2vw, 1.4rem); text-align: center; }
.area-title a { color: var(--text-strong); text-decoration: none; }
.area-title a:hover { color: var(--gold-text); text-decoration: underline; }
.area-title::after { content: ""; display: block; width: 150px; height: 3px; margin: 12px auto 0; background: var(--gold); border-radius: 2px; }

/* Cards / carrossel / grade */
.card { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 503 / 378; background: var(--surface); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface), var(--border)); }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.card__date { font-size: .85rem; color: var(--gold-text); font-weight: 600; }
.card__title { font-size: 1.05rem; line-height: 1.4; margin: 0; }
.card__title a { color: var(--text-strong); text-decoration: none; }
.card__title a:hover { color: var(--gold-text); text-decoration: underline; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__title a:focus-visible { box-shadow: none; }
.card:focus-within { box-shadow: var(--focus); }

.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; list-style: none; margin: 0; padding: 4px 4px 16px; scrollbar-width: thin; }
.carousel__slide { scroll-snap-align: start; }
.carousel__controls { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.carousel__btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold-text); background: #fff; color: var(--gold-text); cursor: pointer; }
.carousel__btn:hover { background: var(--gold-text); color: #fff; }
.carousel__btn[disabled] { opacity: .4; cursor: default; background: #fff; color: var(--gold-text); }
@media (max-width: 960px) { .carousel__track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .carousel__track { grid-auto-columns: 85%; } }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

/* Cabeçalho de página interna */
.page-head { background: var(--surface); padding: 28px 0 32px; }
.page-head--post { padding-bottom: 8px; background: transparent; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.page-title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 14px; background: var(--gold); border-radius: 2px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 0; margin: 0 0 16px; font-size: .92rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #888; }
.breadcrumb [aria-current] { color: var(--text); overflow-wrap: anywhere; }

/* Blog: busca, filtros, paginação, vazio */
.blog-tools { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.search-form { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.search-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1.5px solid #9a9a9a; border-radius: 8px; font: 1rem var(--font); }
.search-form input:focus-visible { border-color: var(--gold-text); }
.category-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.category-filter a { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text-strong); font-weight: 600; }
.category-filter a[aria-current] { background: var(--gold-text); border-color: var(--gold-text); color: #fff; }
.search-summary { font-weight: 600; }
.empty-state { text-align: center; padding: 48px 16px; background: var(--surface); border-radius: var(--radius); }
.pagination { margin-top: 40px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pagination__link { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text-strong); font-weight: 700; }
a.pagination__link:hover { border-color: var(--gold-text); color: var(--gold-text); }
.pagination__link.is-current { background: var(--gold-text); border-color: var(--gold-text); color: #fff; }
.pagination__link.is-disabled { color: #666; }

/* Artigo */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-bottom: 72px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.article__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); text-wrap: pretty; }
.article__meta { color: #666; font-size: .95rem; }
.article__header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article__footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 20px; }
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.share__label { font-weight: 700; }
.share__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--gold-text); border-radius: 8px; background: #fff; color: var(--gold-text); cursor: pointer; }
.share__btn:hover { background: var(--gold-text); color: #fff; }
.share__status { font-size: .9rem; color: var(--gold-text); font-weight: 600; }
.article-aside { display: flex; flex-direction: column; gap: 32px; position: sticky; top: calc(var(--header-h-compact) + 24px); }
@media (max-width: 960px) { .article-aside { position: static; } }
.contact-card { background: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-card--inline { margin-top: 24px; }
.contact-card__title { font-size: 1.15rem; font-weight: 700; color: var(--text-strong); margin: 0; }
.related__title { font-size: 1.25rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.related__link { display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--text-strong); font-weight: 700; line-height: 1.35; }
.related__link:hover span { color: var(--gold-text); text-decoration: underline; }
.related__img { width: 100px; height: 75px; object-fit: cover; border-radius: 8px; }

/* Vídeo (fachada; carrega youtube-nocookie no clique) */
.video-embed { position: relative; margin: 1.6em 0; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed__play { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: #fff; text-decoration: none; background: linear-gradient(135deg, #1b1b1b, #3a3a3a); }
.video-embed__play::after { content: "Reproduzir vídeo do YouTube"; font-weight: 700; }
.video-embed__icon { width: 72px; height: 50px; border-radius: 14px; background: #c4302b; position: relative; }
.video-embed__icon::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-embed__play:hover .video-embed__icon { background: #e62117; }

.table-scroll { overflow-x: auto; margin: 1.4em 0; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 480px; }
.table-scroll th, .table-scroll td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.table-scroll th { background: var(--surface); }

/* Página de área */
.siblings__title { font-size: 1.3rem; }
.siblings__list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.siblings__list a { display: inline-block; padding: 10px 16px; background: #fff; border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--text-strong); }
.siblings__list a:hover { color: var(--gold-text); }

/* Rodapé */
.site-footer { background: var(--gold); color: var(--on-gold); clip-path: polygon(0 0, 40% 0, 50% 28px, 60% 0, 100% 0, 100% 100%, 0 100%); padding-top: 56px; }
.site-footer a { color: var(--on-gold); }
.site-footer a:hover { color: #000; }
.site-footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; padding-bottom: 40px; }
.site-footer__col { padding: 8px 32px; }
.site-footer__col + .site-footer__col { border-left: 2px solid rgba(34, 34, 34, .55); }
.site-footer__col--brand { text-align: center; }
.site-footer__logo { width: 260px; max-width: 100%; margin: 0 auto 20px; }
.site-footer__legal p { margin-bottom: .6em; }
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { flex: 0 0 auto; margin-top: 3px; }
.contact-list__phones { flex-wrap: wrap; gap: 18px 28px !important; }
.contact-list__phone { display: inline-flex; gap: 10px; align-items: center; }
.contact-list__phone .icon { margin-top: 0; }
.site-footer__map { width: 100%; height: 260px; border: 0; border-radius: 6px; background: #eee; }
.site-footer__maplink { display: inline-block; margin-top: 10px; font-weight: 700; }
.site-footer__bottom { background: #fff; color: var(--text); font-size: .9rem; }
.site-footer__bottom a { color: var(--gold-text); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; min-height: 20px; }
@media (max-width: 960px) {
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__col { padding: 20px 0; }
    .site-footer__col + .site-footer__col { border-left: 0; border-top: 2px solid rgba(34, 34, 34, .35); }
    .site-footer { padding-bottom: 72px; }
}

/* WhatsApp flutuante */
.whatsapp-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #008749; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.whatsapp-float:hover { background: #006b3a; color: #fff; }

/* Erro */
.error-page { text-align: center; }
.error-page__code { font-size: 4rem; font-weight: 700; color: var(--gold-text); margin: 0; }
.error-page .page-title::after { margin-left: auto; margin-right: auto; }
.error-page .search-form { margin: 24px auto; }
.error-page__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
