/* ==========================================================================
   RS Contabilidade — Design System
   Paleta: preto/grafite #0B0E14 · off-white #F7F5F1 · dourado #B08D57
   Tipografia: Cormorant Garamond (display) · Inter (corpo/UI)
   ========================================================================== */

:root {
  --ink: #0B0E14;
  --ink-soft: #121722;
  --paper: #F7F5F1;
  --white: #FFFFFF;
  --muted: #6B7280;
  --muted-on-dark: #9AA1AD;
  --gold: #B08D57;
  --gold-light: #C9A97A;
  --gold-deep: #8A6B3C;
  --hairline-dark: rgba(255, 255, 255, 0.14);
  --hairline-light: rgba(11, 14, 20, 0.12);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-h: 76px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 14, 20, 0.07);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Utilitários ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--ink);
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Tipografia ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.25rem);
  letter-spacing: 0.01em;
}

h1 em {
  font-style: italic;
  color: var(--gold-light);
}

h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin-bottom: 0.5rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.eyebrow-dark {
  color: var(--gold-deep);
}

.section-lead {
  max-width: 46rem;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ---------- Seções ---------- */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section-dark {
  background: var(--ink);
  color: var(--white);
}

.section-dark p {
  color: var(--muted-on-dark);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-light {
  background: var(--white);
}

.section-paper {
  background: var(--paper);
}

.section-light p,
.section-paper p {
  color: #3d4351;
}

.section-head {
  max-width: 52rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Âncoras não ficam escondidas sob o header fixo */
section[id],
footer[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: 0 8px 24px rgba(176, 141, 87, 0.35);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.ico {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.ico-lg {
  width: 2rem;
  height: 2rem;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header.scrolled {
  background: rgba(11, 14, 20, 0.92);
  border-bottom-color: var(--hairline-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand img {
  width: auto;
  height: 46px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  padding-block: 0.6rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.btn-nav {
  padding: 0.7rem 1.25rem;
  min-height: 44px;
  font-size: 0.88rem;
}

/* Hambúrguer */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--hairline-dark);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + clamp(3rem, 8vw, 5rem)) clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(
    circle,
    rgba(176, 141, 87, 0.16) 0%,
    rgba(176, 141, 87, 0) 65%
  );
  pointer-events: none;
}

.hero-mark {
  position: absolute;
  right: clamp(-6rem, -3vw, 0rem);
  bottom: -4rem;
  width: clamp(18rem, 42vw, 34rem);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 60rem;
}

.hero-sub {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  color: var(--muted-on-dark);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 3rem;
}

.hero-badges li {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--hairline-dark);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  white-space: nowrap;
}

/* ---------- Quem somos ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.about-text p + p {
  margin-top: 1.1rem;
}

.quote {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.4rem;
}

.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}

.quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline-light);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat dt {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  order: 2;
  line-height: 1.4;
}

.stat dd {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

/* ---------- Princípios (diagrama circular) ---------- */
.pillars {
  position: relative;
}

.pillars-ring,
.pillars-center {
  display: none;
}

.pillar-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  counter-reset: pillar;
}

.pillar {
  background: var(--white);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
}

.pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-deep);
}

.pillar h3 {
  font-size: 1.25rem;
}

.pillar p {
  font-size: 0.95rem;
}

/* ---------- Cards genéricos (serviços, BPO) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  background: var(--ink-soft);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(176, 141, 87, 0.55);
}

.card-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 0.9rem;
}

.card h3 {
  font-size: 1.3rem;
}

.card p {
  font-size: 0.95rem;
}

/* ---------- Diferenciais ---------- */
.diff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.diff-col {
  background: var(--paper);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.diff-col h3 {
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline-light);
}

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
  color: #3d4351;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.05rem;
  height: 0.55rem;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg) scale(0.85);
}

/* ---------- BPO ---------- */
.bpo-services {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline-dark);
}

.bpo-services h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-list li {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--hairline-dark);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
}

/* ---------- Depoimentos (estrutura pronta) ---------- */
.card-testimonial {
  background: var(--white);
  border-color: var(--hairline-light);
}

.card-testimonial blockquote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
}

.card-testimonial footer {
  margin-top: 1rem;
}

.card-testimonial footer strong {
  display: block;
  color: var(--ink);
}

.card-testimonial footer span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Contato ---------- */
.section-contact .section-head {
  text-align: center;
  margin-inline: auto;
}

.section-contact .section-lead {
  margin-inline: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 52rem;
  margin-inline: auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.contact-card .ico-lg {
  color: var(--gold-deep);
  margin-bottom: 0.6rem;
}

.contact-value {
  font-size: 1.02rem;
  color: #3d4351;
  word-break: break-word;
}

.contact-cta {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-deep);
}

.contact-cnpj {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-brand img {
  width: auto;
  height: 64px;
  margin-bottom: 1.1rem;
}

.footer-brand p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted-on-dark);
  max-width: 18rem;
}

.footer h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-nav li,
.footer-contact li {
  margin-bottom: 0.1rem;
  font-size: 0.93rem;
  color: var(--muted-on-dark);
}

.footer-nav a,
.footer-contact a {
  display: inline-block;
  padding-block: 0.6rem;
}

.footer-contact li:last-child {
  padding-block: 0.6rem;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid var(--hairline-dark);
  padding-block: 1.5rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--muted-on-dark);
}

/* ---------- Animações de entrada (apenas com JS ativo) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .card:hover,
  .contact-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* ---------- ≤ 920px: menu mobile ---------- */
@media (max-width: 920px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem clamp(1.25rem, 5vw, 3rem) 2rem;
    background: rgba(11, 14, 20, 0.98);
    border-bottom: 1px solid var(--hairline-dark);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
  }

  .nav.open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .nav-link {
    display: block;
    padding: 0.95rem 0.25rem;
    font-size: 1rem;
    border-bottom: none;
  }

  .btn-nav {
    margin-top: 1.25rem;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .brand img {
    height: 40px;
  }
}

/* ---------- ≥ 700px ---------- */
@media (min-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pillar-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- ≥ 900px ---------- */
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .diff-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- ≥ 1060px: diagrama circular dos princípios ---------- */
@media (min-width: 1060px) {
  .pillars {
    width: min(1020px, 100%);
    margin-inline: auto;
    padding-block: 1rem;
  }

  .pillars-ring {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border: 1px dashed rgba(176, 141, 87, 0.55);
    border-radius: 50%;
  }

  .pillars-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 210px;
    height: 210px;
    background: var(--white);
    border: 1px solid var(--hairline-light);
    border-radius: 50%;
    box-shadow: var(--shadow);
  }

  .pillars-center img {
    width: 120px;
  }

  .pillar-list {
    display: grid;
    grid-template-columns: 1fr 440px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3.5rem 0;
    min-height: 500px;
  }

  .pillar {
    max-width: 300px;
  }

  /* 01 — topo, coluna central deslocado à esquerda */
  .pillar:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }

  /* 02 — topo direita */
  .pillar:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
  }

  /* 03 — baixo esquerda */
  .pillar:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
  }

  /* 04 — baixo direita */
  .pillar:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
  }
}

/* ---------- ≤ 420px: ajustes finos ---------- */
@media (max-width: 420px) {
  .hero-ctas .btn {
    width: 100%;
  }

  .hero-badges li {
    white-space: normal;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Movimento reduzido: neutraliza as transições restantes.
   Precisa vir por último para vencer as regras dos breakpoints acima. */
@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav-toggle-bar,
  .header,
  .btn,
  .card,
  .contact-card,
  .nav-link {
    transition: none;
  }
}
