/* =========================================================================
   ATRIUM CONTABILIDADE — Design tokens
   Paleta: tinta (navy), papel (creme), latão (accent quente), verde-razão
   Tipografia: Fraunces (display) + Inter (texto)
   ========================================================================= */
:root {
  --ink-900: #10222c;
  --ink-800: #16303d;
  --ink-700: #1f4351;
  --paper: #f7f4ee;
  --paper-raised: #fffdf9;
  --line: #d9d2c1;
  --line-strong: #b9ae95;
  --text: #1c2a30;
  --text-muted: #55636a;
  --brass: #b9843f;
  --brass-dark: #93672c;
  --ledger: #2e5c4f;
  --ledger-light: #e7ede9;
  --danger: #a3402f;
  --radius-s: 4px;
  --radius-m: 8px;
  --shadow-card: 0 1px 0 rgba(16, 34, 44, 0.06);
  --max-w: 1180px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  /* Site institucional: mantemos o tema claro por legibilidade e credibilidade,
     mas garantimos contraste suficiente caso o navegador force cores escuras. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 500; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text); max-width: 62ch; }
.text-muted { color: var(--text-muted); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; background: var(--ink-900); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-s); z-index: 1000; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 14px 26px; border-radius: var(--radius-s); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brass); color: #fff; }
.btn-primary:hover { background: var(--brass-dark); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(247,244,238,0.4); }
.btn-ghost:hover { background: rgba(247,244,238,0.1); }
.btn-outline { background: transparent; color: var(--ink-900); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--ledger-light); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--ink-900); color: var(--paper);
  border-bottom: 1px solid rgba(247,244,238,0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.brand-text span { font-size: 0.7rem; letter-spacing: 0.03em; color: #c9c2ac; }

.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; color: var(--paper); font-size: 0.95rem; opacity: .88; }
.main-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; flex-direction: column; text-align: right; text-decoration: none; color: var(--paper); font-size: 0.85rem; }
.header-phone strong { font-size: 0.95rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(247,244,238,0.3); border-radius: var(--radius-s);
  color: var(--paper); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--ink-900); transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav .container { display: block; padding: 24px; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid rgba(247,244,238,0.08); }
  .header-phone { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Ledger rule (divisor visual assinatura da marca) ---------- */
.ledger-rule {
  height: 34px;
  background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent 42px);
  background-position: center;
  background-repeat: repeat-x;
  background-size: 100% 1px;
  background-position-y: 50%;
  position: relative;
}
.ledger-rule::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line);
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; background: var(--paper); }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-eyebrow { font-size: 0.85rem; color: var(--ledger); font-weight: 600; margin-bottom: 14px; }
.hero h1 { color: var(--ink-900); }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 22px 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--text-muted); }
.trust-item svg { width: 20px; height: 20px; color: var(--ledger); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-frame {
  border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--paper-raised);
  padding: 10px; position: relative;
}
.hero-frame img { border-radius: 3px; width: 100%; height: auto; }
.hero-frame::before, .hero-frame::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-color: var(--brass); border-style: solid;
}
.hero-frame::before { top: -8px; left: -8px; border-width: 2px 0 0 2px; }
.hero-frame::after { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; }
.hero-badge {
  position: absolute; bottom: -18px; left: -18px; background: var(--ink-900); color: var(--paper);
  padding: 12px 16px; border-radius: var(--radius-s); font-size: 0.82rem; box-shadow: 0 8px 24px rgba(16,34,44,.25);
  max-width: 210px;
}
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 1rem; color: #f0dcb8; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-badge { position: static; margin-top: 18px; max-width: none; }
}

/* ---------- Section shell ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-raised); }
.section-dark { background: var(--ink-900); color: var(--paper); }
.section-dark h2, .section-dark h3 { color: var(--paper); }
.section-dark p { color: #cfd6d3; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-eyebrow { font-size: 0.82rem; font-weight: 600; color: var(--ledger); margin-bottom: 10px; }
.section-dark .section-eyebrow { color: #d9c08a; }

/* ---------- Benefícios ---------- */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.benefit-card { background: var(--paper-raised); padding: 32px 28px; border-top: 3px solid var(--ledger); }
.benefit-card svg { width: 30px; height: 30px; color: var(--brass); margin-bottom: 16px; }
.benefit-card h3 { margin-bottom: 8px; }
.benefit-card p { font-size: 0.96rem; color: var(--text-muted); margin-bottom: 0; }

@media (max-width: 900px) { .benefits-grid { grid-template-columns: 1fr; } }

/* ---------- Como funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.step { position: relative; padding-top: 8px; }
.step-number { font-family: var(--font-display); font-size: 2.1rem; color: var(--line-strong); margin-bottom: 10px; display: block; }
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Seção visual (dados reais de registro) ---------- */
.visual-section .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.visual-image { border: 1px solid rgba(247,244,238,0.15); border-radius: var(--radius-m); overflow: hidden; }
.register-facts { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.register-facts li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(247,244,238,0.12); }
.register-facts .fact-label { min-width: 190px; color: #b6c4bf; font-size: 0.86rem; }
.register-facts .fact-value { font-weight: 600; color: var(--paper); }
@media (max-width: 900px) { .visual-section .container { grid-template-columns: 1fr; } .register-facts .fact-label { min-width: 140px; } }

/* ---------- Diferenciais ---------- */
.differentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.differential { display: flex; gap: 18px; align-items: flex-start; }
.differential-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--radius-s); background: var(--ledger-light);
  display: flex; align-items: center; justify-content: center;
}
.differential-icon svg { width: 24px; height: 24px; color: var(--ledger); }
.differential h3 { margin-bottom: 4px; font-size: 1.05rem; }
.differential p { font-size: 0.94rem; color: var(--text-muted); margin-bottom: 0; }
@media (max-width: 760px) { .differentials { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 22px 4px; font-weight: 600; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { flex-shrink: 0; width: 22px; height: 22px; color: var(--brass); transition: transform .2s ease; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 4px 24px; color: var(--text-muted); max-width: 68ch; }

/* ---------- CTA final ---------- */
.cta-final { background: var(--ledger); color: #fff; text-align: center; padding: 76px 0; }
.cta-final h2 { color: #fff; }
.cta-final p { color: #d8e6e1; margin: 0 auto 30px; }
.cta-final .btn-primary { background: var(--brass); }
.cta-final .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-final .btn-outline:hover { background: rgba(255,255,255,0.1); }
.cta-final-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Formulário ---------- */
.form-section .container { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: flex-start; }
.form-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 34px; box-shadow: var(--shadow-card);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.9rem; font-weight: 600; color: var(--ink-900); }
.form-row .required { color: var(--danger); }
.form-row input, .form-row textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: #fff; color: var(--text);
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--ledger); }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.form-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; color: var(--text-muted); }
.form-consent input { margin-top: 4px; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 16px 18px; border-radius: var(--radius-s); margin-bottom: 22px; font-size: 0.94rem; }
.alert-success { background: #e6f0ea; border: 1px solid #9fc2ac; color: #1f4a30; }
.alert-error { background: #fbe9e6; border: 1px solid #e3a99b; color: #7a2b1b; }

.contact-info h2 { margin-bottom: 12px; }
.contact-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--ledger); flex-shrink: 0; margin-top: 2px; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

@media (max-width: 900px) { .form-section .container { grid-template-columns: 1fr; } }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink-900); color: #c9c2ac; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand img { height: 36px; margin-bottom: 14px; }
.footer-brand p { color: #b6b0a0; font-size: 0.9rem; }
.footer-col h4 { color: var(--paper); font-size: 0.92rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #c9c2ac; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { text-decoration: underline; }
.footer-legal {
  border-top: 1px solid rgba(247,244,238,0.12); padding-top: 22px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: #8f9891;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto;
  background: var(--ink-900); color: var(--paper); border-radius: var(--radius-m); padding: 22px 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3); z-index: 900; display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { color: #dcd6c6; font-size: 0.9rem; margin-bottom: 16px; }
.cookie-banner a { color: #f0dcb8; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 16px; font-size: 0.88rem; }

.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(16,34,44,.55); z-index: 950; display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-backdrop.is-visible { display: flex; }
.cookie-modal {
  background: #fff; border-radius: var(--radius-m); max-width: 520px; width: 100%; padding: 30px; max-height: 86vh; overflow-y: auto;
}
.cookie-modal h2 { font-size: 1.3rem; }
.cookie-cat { border-top: 1px solid var(--line); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.cookie-cat h3 { font-size: 0.98rem; margin-bottom: 4px; }
.cookie-cat p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cfcabb; border-radius: 24px; cursor: pointer; transition: background .2s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.switch input:checked + .slider { background: var(--ledger); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.cookie-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Páginas legais ---------- */
.legal-page { padding: 56px 0 90px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.3rem; margin-top: 40px; }
.legal-page ul { color: var(--text); }
.legal-page table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.legal-page th, .legal-page td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: 0.92rem; }
.legal-page th { background: var(--ledger-light); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
