/* ============================================================
   Torres Contabilidade — token system
   Paleta: papel + tinta de livro-razão + carimbo oficial
   ============================================================ */
:root {
  --paper:        #EAE7DC;
  --paper-raised: #F3F1E8;
  --ink:          #1C1B17;
  --ink-soft:     #4A4A42;
  --ledger:       #1F3D2B;
  --ledger-deep:  #16301F;
  --ledger-line:  #6B8F76;
  --ledger-tint:  #DCE4DC;
  --stamp:        #A63A2E;
  --stamp-deep:   #7E2A21;
  --brass:        #7A5D28;
  --brass-on-dark: #D4A855;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --wrap: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Textura sutil de papel — grão de fundo, no espírito do livro-razão */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.11  0 0 0 0 0.11  0 0 0 0 0.09  0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.nav, main, .footer { position: relative; z-index: 1; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

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

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ledger); color: var(--paper);
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Focus visibility */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ledger-deep);
  margin: 0;
  letter-spacing: -0.01em;
}

em { font-style: italic; color: var(--stamp-deep); }

p { margin: 0; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}
.btn-stamp {
  background: var(--stamp);
  color: var(--paper-raised);
  box-shadow: 0 2px 0 var(--stamp-deep);
}
.btn-stamp:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--stamp-deep); }
.btn-stamp:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--stamp-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ledger-deep);
  border-color: var(--ledger-deep);
}
.btn-ghost:hover { background: var(--ledger-deep); color: var(--paper-raised); }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

/* ============================================================
   Reveal on scroll — visível por padrão (funciona sem JS). O JS, se
   conseguir rodar, adiciona .reveal-armed pra habilitar a animação de
   entrada; só nesse caso o elemento começa oculto até ser revelado.
   ============================================================ */
.reveal.reveal-armed {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease;
  transition-delay: var(--delay, 0ms);
}
.reveal.reveal-armed.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(234, 231, 220, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(28, 27, 23, 0.12);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.wordmark { text-decoration: none; line-height: 1; display: block; }
.wordmark-line {
  display: block; font-family: var(--font-display);
  color: var(--ledger-deep); font-size: 1.35rem; font-weight: 600;
}
.wordmark-sub {
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); font-family: var(--font-mono); font-weight: 500;
  margin-top: 2px;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  position: relative; padding-bottom: 3px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--stamp); transform: scaleX(0); transition: transform 200ms ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 76px 0 96px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--stamp-deep); margin-bottom: 18px;
  display: inline-block;
}
.eyebrow::before { content: '— '; }
.eyebrow-center { display: block; text-align: center; }

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  font-weight: 600;
}
.hero-lede {
  margin-top: 26px; max-width: 480px; font-size: 1.08rem; color: var(--ink-soft);
}
.hero-actions { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

.hero-trust {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.hero-trust li { position: relative; padding-left: 18px; }
.hero-trust li::before {
  content: '✓'; position: absolute; left: 0; color: var(--ledger); font-weight: 600;
}
.cta-final-trust { justify-content: center; margin-top: 26px; }

.hero-visual { position: relative; }

.ledger-card {
  background: var(--paper-raised);
  border: 1px solid rgba(31, 61, 43, 0.22);
  border-left: 5px solid var(--ledger);
  border-radius: var(--radius);
  padding: 26px 24px 18px;
  box-shadow: 0 18px 40px -20px rgba(28,27,23,0.35);
  transform: rotate(-1.2deg);
}
.ledger-head, .ledger-row {
  display: grid; grid-template-columns: 74px 1fr 84px; gap: 10px; align-items: center;
}
.ledger-head {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 1.5px solid var(--ledger-line);
}
.ledger-row {
  padding: 13px 0; border-bottom: 1px dashed rgba(107, 143, 118, 0.5);
  font-size: 0.92rem;
}
.ledger-row:last-of-type { border-bottom: none; }
.tag {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; text-align: center; letter-spacing: 0.03em;
}
.tag-ok { background: var(--ledger-tint); color: var(--ledger-deep); }
.tag-wait { background: #F1E2C9; color: #7A5A17; }
.ledger-foot {
  margin-top: 12px; font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--ink-soft); opacity: 0.75;
}

.stamp {
  position: absolute; right: -6px; bottom: -34px; width: 152px; height: 152px;
  transform: rotate(-9deg);
  filter: drop-shadow(0 6px 14px rgba(166, 58, 46, 0.25));
}
.stamp-svg { width: 100%; height: 100%; }
.stamp-ring { fill: none; stroke: var(--stamp); stroke-width: 3.5; opacity: 0.9; }
.stamp-ring-thin { fill: none; stroke: var(--stamp); stroke-width: 1.4; opacity: 0.55; }
.stamp-text {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px;
  fill: var(--stamp); font-weight: 600;
}
.stamp-center-name {
  font-family: var(--font-display); font-size: 16px; font-weight: 600; fill: var(--stamp);
}
.stamp-center-crc {
  font-family: var(--font-mono); font-size: 9.5px; fill: var(--stamp); letter-spacing: 0.5px;
}

/* ============================================================
   Diferenciais
   ============================================================ */
.diferenciais { padding: 20px 0 88px; }
.diff-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(31, 61, 43, 0.18);
  border: 1px solid rgba(31, 61, 43, 0.18);
}
.diff-item { background: var(--paper); padding: 30px 26px; }
.diff-mark { font-family: var(--font-mono); color: var(--brass); font-size: 1.1rem; }
.diff-item h3 { font-size: 1.08rem; margin: 14px 0 10px; font-weight: 600; }
.diff-item p { color: var(--ink-soft); font-size: 0.92rem; }

/* ============================================================
   Sobre
   ============================================================ */
.sobre { padding: 16px 0 92px; }
.sobre-grid {
  display: grid; grid-template-columns: 200px 1fr; gap: 52px; align-items: center;
}
.sobre-photo {
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--ledger-deep);
  border: 3px solid var(--brass);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 16px 34px -18px rgba(28,27,23,0.4);
}
.sobre-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sobre-initials {
  font-family: var(--font-display); font-size: 3.4rem; font-weight: 600;
  color: var(--brass-on-dark);
}
.sobre-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 18px; }
.sobre-bio { color: var(--ink-soft); max-width: 560px; font-size: 1rem; }
.sobre-facts {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
}
.sobre-facts li {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ledger-deep);
  position: relative; padding-left: 20px;
}
.sobre-facts li::before {
  content: '—'; position: absolute; left: 0; color: var(--brass);
}

/* ============================================================
   Serviços (folders)
   ============================================================ */
.servicos { padding: 40px 0 96px; }
.section-title {
  text-align: center; font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600; margin: 0 auto 20px; max-width: 620px;
}
.section-lede {
  text-align: center; color: var(--ink-soft); max-width: 560px;
  margin: 0 auto; font-size: 1rem;
}
.folders {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 52px;
}
.folder {
  background: var(--paper-raised);
  border: 1px solid rgba(31, 61, 43, 0.2);
  border-radius: var(--radius);
  padding: 0 0 30px;
  position: relative;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.folder:hover { box-shadow: 0 16px 32px -18px rgba(28,27,23,0.3); transform: translateY(-3px); }
.folder-tab {
  display: inline-block;
  background: var(--ledger);
  color: var(--paper-raised);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 0 0 6px 0;
  margin-bottom: 24px;
}
.folder-list { list-style: none; margin: 0; padding: 0 30px; }
.folder-list li {
  padding: 13px 0 13px 22px;
  border-bottom: 1px dashed rgba(107, 143, 118, 0.45);
  position: relative; font-size: 0.96rem; color: var(--ink);
}
.folder-list li::before {
  content: '✓'; position: absolute; left: 0; color: var(--brass); font-weight: 600;
}
.folder-list li:last-child { border-bottom: none; }
.folder-cta {
  display: inline-block; margin: 24px 30px 0; color: var(--stamp-deep);
  font-weight: 600; text-decoration: none; font-size: 0.94rem;
}
.folder-cta:hover { text-decoration: underline; }

/* ============================================================
   Calendário
   ============================================================ */
.calendario { padding: 88px 0; background: var(--ledger-deep); color: var(--paper); }
.calendario .eyebrow { color: var(--brass-on-dark); }
.calendario .section-title { color: var(--paper); }
.calendario .section-lede { color: rgba(234,231,220,0.75); }
.cal-strip-wrap { overflow-x: auto; margin-top: 52px; padding-bottom: 6px; }
.cal-strip {
  display: flex; gap: 1px; background: rgba(234,231,220,0.16);
  width: max-content; min-width: 100%;
  border-top: 1px solid rgba(234,231,220,0.16);
  border-bottom: 1px solid rgba(234,231,220,0.16);
}
.cal-item {
  background: var(--ledger-deep); padding: 26px 24px; width: 230px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.cal-day {
  color: var(--brass-on-dark); font-size: 0.82rem; letter-spacing: 0.03em;
}
.cal-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.cal-desc { color: rgba(234,231,220,0.68); font-size: 0.86rem; line-height: 1.5; }

/* ============================================================
   Processo
   ============================================================ */
.processo { padding: 96px 0; }
.steps {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.step { border-top: 2px solid var(--ledger); padding-top: 18px; }
.step-n { display: block; color: var(--brass); font-size: 0.85rem; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.9rem; }

/* ============================================================
   FAQ
   ============================================================ */
.duvidas { padding: 20px 0 100px; }
.faq { margin-top: 48px; }
.faq-item {
  border-bottom: 1px solid rgba(31, 61, 43, 0.22);
  padding: 20px 0;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.02rem; color: var(--ledger-deep);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-family: var(--font-mono); font-size: 1.3rem; color: var(--stamp);
  flex-shrink: 0; transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 14px; color: var(--ink-soft); font-size: 0.95rem; max-width: 640px; }

/* ============================================================
   CTA final
   ============================================================ */
.cta-final { padding: 100px 0 110px; text-align: center; }
.cta-final-inner { display: flex; flex-direction: column; align-items: center; }
.cta-final-stamp {
  width: 54px; height: 54px; border-radius: 50%; border: 2.5px solid var(--stamp);
  color: var(--stamp); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 26px; transform: rotate(-8deg);
}
.cta-final h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 560px; }
.cta-final p { color: var(--ink-soft); margin: 18px 0 34px; max-width: 460px; font-size: 1.02rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--ledger-deep); color: var(--paper); padding: 56px 0 0; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: start;
  padding-bottom: 40px; border-bottom: 1px solid rgba(234,231,220,0.16);
}
.footer .wordmark-line { color: var(--paper); }
.footer .wordmark-sub { color: rgba(234,231,220,0.6); }
.footer-crc { margin-top: 10px; color: var(--brass-on-dark); font-size: 0.78rem; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact a { color: var(--paper); text-decoration: none; font-size: 0.95rem; }
.footer-contact a:hover { text-decoration: underline; }
.footer-note { color: rgba(234,231,220,0.65); font-size: 0.88rem; align-self: center; }
.footer-bottom { padding: 20px 0; }
.footer-bottom p { color: rgba(234,231,220,0.55); font-size: 0.8rem; text-align: center; }

/* ============================================================
   Botão flutuante WhatsApp
   ============================================================ */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ledger);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(28,27,23,0.5);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}
.whatsapp-float.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.whatsapp-float svg { width: 28px; height: 28px; fill: var(--paper-raised); }
.whatsapp-float:hover { background: var(--ledger-deep); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero { padding-top: 48px; }
  .diff-grid { grid-template-columns: 1fr 1fr; }
  .sobre-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .sobre-facts { justify-content: center; }
  .folders { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }

  .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: 57px; left: 0; right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid rgba(28,27,23,0.12);
    max-height: 0; overflow: hidden;
    transition: max-height 260ms ease;
  }
  .nav-links.is-open { max-height: 320px; }
  .nav-links a {
    padding: 16px 28px; border-top: 1px solid rgba(28,27,23,0.08);
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .diff-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .stamp { width: 110px; height: 110px; right: 4px; bottom: -22px; }
  .ledger-foot { padding-right: 96px; }
  .cal-item { width: 200px; }
  .nav-actions .btn-sm { padding: 9px 12px; font-size: 0.78rem; }
}
