/* ==========================================================================
   Orbis Gestão e Contabilidade — base (tokens, reset, header, footer, botões)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Cores base */
  --ink:          #0F2430;
  --ink-2:        #16323F;
  --ink-3:        #0A1A23;
  --brass:        #C9A24A;
  --brass-light:  #DDBB6B;
  --brass-deep:   #8A6A22;
  --paper:        #FFFFFF;
  --mist:         #EEF2F4;
  --mist-2:       #E2E8EB;

  /* Texto */
  --text:         #1B2730;
  --muted:        #4E5E69;
  --on-ink:       #E9EEF1;
  --on-ink-muted: #B6C4CD;

  /* Linhas */
  --line:         #D3DCE1;
  --line-ink:     rgba(255, 255, 255, 0.14);

  /* Formas */
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;

  /* Métricas */
  --wrap:         1180px;
  --header-h:     72px;
  --tap:          44px;

  /* Tipografia */
  --head: "Manrope", "Segoe UI", system-ui, Arial, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, Arial, sans-serif;

  /* Foco */
  --focus:        var(--ink);
}

/* ---------- Reset leve ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, iframe, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
address { font-style: normal; }

h1, h2, h3, h4 {
  font-family: var(--head);
  line-height: 1.15;
  margin: 0 0 0.55em;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.25rem); font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 68ch; }

/* Foco visível e consistente */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.site-header, .section--ink, .site-footer, .hero { --focus: var(--brass); }
main:focus { outline: none; }

/* Esconder visualmente mantendo semântica */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- Utilitários ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--mist { background: var(--mist); }
.section--ink  { background: var(--ink); color: var(--on-ink); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: var(--on-ink-muted); }

.intro {
  max-width: 720px;
  margin-bottom: clamp(2rem, 4.5vw, 3rem);
}
.intro p {
  font-size: 1.1rem;
  color: var(--muted);
}
.section--ink .intro p { color: var(--on-ink-muted); }

/* Pular para o conteúdo */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--brass);
  color: var(--ink);
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ---------- Botões e links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }

.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-light); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.section--ink .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.section--ink .btn-outline:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.btn-sm { min-height: var(--tap); padding: 0.5rem 1.15rem; font-size: 0.95rem; }

.text-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: var(--ink); }
.section--ink .text-link { color: #fff; }
.section--ink .text-link:hover { text-decoration-color: #fff; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(15, 36, 48, 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  color: var(--on-ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: rgba(255,255,255,0.1); }

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand { flex: none; }
.brand img {
  height: 38px;
  width: auto;
}

.menu {
  display: flex;
  gap: clamp(1rem, 1.8vw, 1.6rem);
  align-items: center;
  margin-left: auto;
}
.menu a {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
  color: var(--on-ink-muted);
  padding-block: 0.4rem;
  transition: color 0.2s;
}
.menu a:hover,
.menu a[aria-current] { color: #fff; }
.menu a[aria-current="page"],
.menu a[aria-current="location"] {
  box-shadow: inset 0 -2px 0 var(--brass);
}
.nav-cta { flex: none; }

.menu-toggle {
  display: none;
  background: none;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  min-height: var(--tap);
  padding: 0 1.1rem;
  font: 600 0.95rem var(--body);
  transition: border-color 0.2s;
}
.menu-toggle:hover { border-color: #fff; }

@media (max-width: 1040px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
  }
  .nav-cta { display: none; }
  .menu {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem clamp(1.1rem, 4vw, 2rem) 1rem;
    max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
  }
  .menu.is-open { display: flex; }
  .menu a {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .menu a:last-child { border-bottom: 0; }
  .menu a[aria-current="page"],
  .menu a[aria-current="location"] {
    box-shadow: inset 3px 0 0 var(--brass);
    padding-left: 0.9rem;
  }
}

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--ink-3);
  color: var(--on-ink-muted);
  font-size: 0.95rem;
  padding: 2.8rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 1.5rem 3rem;
  align-items: start;
}
.footer-grid img {
  height: 36px;
  width: auto;
  margin-bottom: 0.6rem;
}
.footer-grid strong {
  color: #fff;
  display: block;
}
.footer-grid a { color: var(--on-ink); }

.footer-nav {
  display: flex;
  flex-direction: column;
}
.footer-nav a {
  text-decoration: none;
  padding-block: 0.3rem;
}
.footer-nav a:hover { text-decoration: underline; }

.copy {
  margin: 1.8rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: none;
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1FA855;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  transition: transform 0.2s, opacity 0.2s;
}
@media (max-width: 600px) {
  .wa-float {
    width: 48px;
    height: 48px;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}
.wa-float:hover { transform: scale(1.06); }
.wa-float:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff, 0 8px 22px rgba(0,0,0,0.28);
}
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Voltar ao topo ---------- */
.to-top {
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.to-top:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.section--ink .to-top {
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}
.section--ink .to-top:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
}
.to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section-end {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 1.5rem;
  padding-bottom: 0;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--brass);
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* Hero da página interna (não é o carrossel) */
.page-hero {
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.page-hero .breadcrumb { color: var(--on-ink-muted); padding-top: 0; margin-bottom: 1.2rem; }
.page-hero .breadcrumb a { color: var(--on-ink-muted); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb [aria-current="page"] { color: #fff; }
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--on-ink-muted);
  max-width: 60ch;
  margin-bottom: 1.8rem;
}
