/* ==========================================================================
   BTS Contabilidade — Design System
   Paleta oficial: Navy #010080 · Azul #1768AC · Sky #D1F5FF
   Tipografia: Poppins (display) + Inter (corpo)
   Assinatura visual: dobra de origami (fold) nos cartões e na transição do hero
   ========================================================================== */

:root {
  --navy: #010080;
  --navy-ink: #060A2E;
  --blue: #1768AC;
  --sky: #D1F5FF;
  --white: #FFFFFF;
  --ink: #0B1024;
  --muted: #545C74;
  --muted-soft: #7A8299;
  --line: rgba(1, 0, 128, 0.12);
  --line-soft: rgba(1, 0, 128, 0.07);
  --sky-line: rgba(1, 0, 128, 0.18);

  --shadow-sm: 0 1px 2px rgba(6, 10, 46, 0.06), 0 1px 1px rgba(6, 10, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(1, 0, 128, 0.09), 0 2px 6px rgba(1, 0, 128, 0.06);
  --shadow-lg: 0 24px 60px rgba(1, 0, 128, 0.16);

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;

  --fold: 28px; /* signature fold-corner size */
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-ink); margin: 0 0 .5em; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 1em; }
button { font-family: inherit; }

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--blue);
  display: inline-block;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--sky { background: var(--sky); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
}
.section--navy .lede { color: rgba(255,255,255,.82); }

h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }

.max-w-content { max-width: 720px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-body);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue); color: var(--white); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: #135f96; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: #000068; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--sm { padding: 12px 18px; font-size: 13px; min-height: 44px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 34px; height: 34px; color: var(--navy); flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--navy-ink);
  letter-spacing: -.01em;
  line-height: 1;
}
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: lowercase;
  color: var(--blue);
  margin-top: 2px;
}

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--sky); color: var(--navy); }
.main-nav a.is-active { color: var(--navy); font-weight: 600; }

.header-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .main-nav { position: fixed; top: 78px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 10px 20px 24px; gap: 2px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .18s ease; }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-cta .btn span.btn-label-full { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(155deg, var(--navy) 0%, #000a6b 55%, var(--navy) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 76px 0 140px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background: var(--white);
  clip-path: polygon(0 100%, 0 40%, 6% 100%, 12% 30%, 18% 100%, 24% 35%, 30% 100%, 36% 30%, 42% 100%, 48% 38%, 54% 100%, 60% 32%, 66% 100%, 72% 36%, 78% 100%, 84% 30%, 90% 100%, 96% 34%, 100% 100%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero .lede { color: rgba(255,255,255,.85); font-size: 20px; margin-bottom: 32px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-credential {
  margin-top: 40px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.hero-credential svg { width: 16px; height: 16px; flex-shrink: 0; }

.hero-art { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-mark {
  width: min(340px, 80%);
  color: var(--sky);
  opacity: .9;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.35));
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-mark { width: 160px; margin: 0 auto 12px; }
}

/* ---------- fold card (signature element) ---------- */
.fold-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 30px 26px 26px;
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fold-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: var(--fold);
  height: var(--fold);
  background: linear-gradient(135deg, var(--sky) 50%, transparent 50.5%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.fold-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky-line);
}
.fold-card:hover::before { background: linear-gradient(135deg, var(--blue) 50%, transparent 50.5%); }
.fold-card h3 { margin-bottom: 10px; }
.fold-card p { color: var(--muted); margin-bottom: 0; font-size: 15px; }
.fold-card .fold-icon {
  width: 42px; height: 42px;
  color: var(--blue);
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 24px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* ---------- section headers ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

/* ---------- timeline (Reforma Tributária) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 12px;
}
.timeline-item {
  position: relative;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-sm);
  padding: 22px 18px;
}
.timeline-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--sky);
  margin-bottom: 8px;
  display: block;
}
.timeline-item p { color: rgba(255,255,255,.78); font-size: 14px; margin: 0; }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

/* ---------- ICP / audience strip ---------- */
.audience-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.audience-chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  border-radius: 20px;
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 220px; height: 220px;
  background: var(--blue);
  opacity: .35;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.cta-banner h2 { color: var(--white); margin-bottom: 6px; max-width: 480px; position: relative; }
.cta-banner p { color: rgba(255,255,255,.8); margin: 0; position: relative; }
.cta-banner .btn { position: relative; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-ink);
  color: rgba(255,255,255,.7);
  padding: 64px 0 28px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .brand-icon { color: var(--sky); }
.footer-brand .brand-word { color: var(--white); }
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--sky); }
.footer-legal {
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
}
.footer-legal strong { color: rgba(255,255,255,.75); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px 24px; }
}

/* ---------- socials ---------- */
.social-row { display: flex; gap: 10px; }
.social-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--white);
  transition: background .15s ease, transform .15s ease;
}
.social-btn:hover { background: var(--blue); transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; }
.star-sm { width: 22px; height: 22px; fill: currentColor; }

/* ---------- breadcrumb / page hero (inner pages) ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 76px;
  position: relative;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 36px;
  background: var(--white);
  clip-path: polygon(0 100%, 0 45%, 8% 100%, 16% 40%, 24% 100%, 32% 45%, 40% 100%, 48% 40%, 56% 100%, 64% 45%, 72% 100%, 80% 40%, 88% 100%, 96% 45%, 100% 100%);
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero .lede { color: rgba(255,255,255,.82); }

/* ---------- cards: services / posts ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.service-detail:last-child { border-bottom: none; }
.service-detail .fold-icon { width: 44px; height: 44px; color: var(--blue); }
.service-detail h3 { margin-bottom: 8px; }
.service-detail p { color: var(--muted); margin-bottom: 12px; }
.service-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: var(--sky);
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 8px;
  margin-bottom: 10px;
}

/* ---------- blog ---------- */
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: 13px; color: var(--muted-soft); margin-bottom: 10px; }
.post-card h3 { margin-bottom: 10px; font-size: 19px; }
.post-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.post-readmore { font-weight: 600; color: var(--blue); font-size: 14px; margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
.post-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  position: relative;
}
.post-cover .brand-icon { position: absolute; bottom: 16px; right: 16px; width: 30px; height: 30px; color: rgba(255,255,255,.5); }

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--ink);
}
.article-body h2 { margin-top: 1.6em; font-size: 26px; }
.article-body h3 { margin-top: 1.4em; }
.article-body p { color: var(--ink); margin-bottom: 1.1em; }
.article-body ul, .article-body ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.article-body li { margin-bottom: .5em; color: var(--ink); }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body blockquote {
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 20px;
  color: var(--muted);
  font-style: italic;
  margin: 1.6em 0;
}
.article-hero-meta { max-width: 720px; margin: 0 auto; }
.article-tags { display:flex; gap:8px; margin-bottom: 18px; flex-wrap: wrap;}

.author-box {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 24px;
  background: var(--sky);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.author-box .brand-icon { width: 30px; height: 30px; color: var(--navy); flex-shrink: 0; margin-top: 4px; }
.author-box strong { color: var(--navy-ink); }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-item .fold-icon { width: 24px; height: 24px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.contact-item h4 { margin-bottom: 4px; font-family: var(--font-body); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-soft); }
.contact-item p, .contact-item a { font-size: 17px; color: var(--ink); font-weight: 500; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy-ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--white);
  transition: border-color .15s ease;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--blue);
}
.map-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 8px;
}
.map-frame iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ---------- FAQ accordion ---------- */
.faq-list {
  max-width: 780px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
  margin-bottom: 12px;
  background: var(--white);
  transition: border-color .15s ease;
}
.faq-item[open] { border-color: var(--sky-line); }
.faq-item summary {
  padding: 18px 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--navy-ink);
  cursor: pointer;
  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-display);
  font-size: 22px;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- misc utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack-gap { display: flex; flex-direction: column; gap: 6px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
