/* ==========================================================================
   RAJA Sistemas: base compartilhada (tokens, container, header, rodapé, botões)
   Mobile first. Breakpoints: sm 640px, md 960px, lg 1280px.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-wght.7660bd9909fb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FFFFFF;
  --ink: #16150C;
  --ink-2: #3E3B2A;
  --ink-3: #6B6752;
  --ink-muted: #8F8B74;
  --olive: #6E6433;
  --accent: #C9B458;
  /* Dourado escurecido só para texto sobre fundo claro: o --accent tem 2,07:1
     sobre branco e não passa no AA (3:1) nem em texto grande. Este tem 3,24:1. */
  --accent-strong: #A38E35;
  --link: #5B522B;
  --surface-soft: #EFEDE3;
  --surface-alt: #FAF8EE;
  --border: #E6E2CF;
  --tint-butter: #F7F2DC;
  --tint-sage: #EAF0DF;
  --tint-lilac: #F1ECF5;
  --tint-mist: #EAF0F3;    /* card de serviço 4, mesma luminosidade dos outros tints */
  --glow-1: #EDE6C3; --glow-2: #E3EAD2; --glow-3: #F6EFD6; --glow-4: #EEE7F3;
  --radius-btn: 14px; --radius-card: 28px; --radius-panel: 40px;

  /* Sistema de alinhamento: todo conteúdo usa .container com estes valores */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 80px);

  --font: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --header-h: 64px;
}

@media (min-width: 960px) {
  :root { --header-h: 76px; }
}

/* Reset enxuto */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.menu-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Âncoras compensam exatamente a altura do header fixo */
[id] { scroll-margin-top: var(--header-h); }
main:focus { outline: none; }

/* Foco visível em tudo que é interativo */
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 44px; border-radius: 10px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 60px; padding: 0 28px; font-size: 17px; }

.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #BBA54B; }
.btn-soft { background: var(--surface-soft); color: var(--ink); }
.btn-soft:hover { background: #E4E1D3; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2E2C1C; }
.btn-glass { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .72);
  /* Linha inferior como sombra para não somar 1px à altura do header */
  transition: background-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 0 var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-scrolled {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; min-height: 44px; flex: 0 0 auto; border-radius: 8px; }
.logo { width: auto; height: 28px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.main-nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-contato { display: none; }

/* Mobile: WhatsApp compacto só com o ícone (o nome vem do aria-label) */
.header-whatsapp { width: 44px; padding: 0; }
.header-whatsapp-text { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, background-color .2s ease;
}
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before,
.menu-toggle-bars::after { content: ''; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded='true'] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded='true'] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Sem JS: sem hambúrguer, a nav aparece em linha abaixo do header */
.no-js .menu-toggle { display: none; }
.no-js .header-inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); }
.no-js .main-nav { order: 3; width: 100%; }
.no-js .main-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
.no-js .main-nav a { font-size: 16px; min-height: 44px; }

/* Com JS: painel de largura total logo abaixo do header */
.js .main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  max-height: calc(100svh - var(--header-h));
  overflow-y: auto;
  padding-block: 8px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 40px -24px rgba(60, 52, 20, .25);
}
.js .main-nav ul { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.js .site-header.menu-open .main-nav { display: block; }
.js .site-header.menu-open { background: #fff; box-shadow: 0 1px 0 var(--border); }

@media (min-width: 640px) {
  .header-whatsapp { width: auto; padding: 0 16px; }
  .header-whatsapp-text { display: inline; }
}

@media (min-width: 960px) {
  .header-inner { gap: 40px; }
  .logo { height: 36px; }
  .menu-toggle { display: none; }
  .header-contato { display: inline-flex; }
  .main-nav-contato { display: none; }

  .js .main-nav,
  .no-js .main-nav {
    position: static;
    display: block;
    order: 0;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .js .main-nav ul,
  .no-js .main-nav ul { display: flex; gap: 28px; width: auto; margin: 0; }
  .main-nav a,
  .no-js .main-nav a { font-size: 15px; min-height: 44px; }
  .no-js .header-inner { flex-wrap: nowrap; height: var(--header-h); }
}

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  /* Espaço extra no mobile para o botão flutuante não cobrir o texto */
  padding-bottom: calc(24px + 72px + env(safe-area-inset-bottom));
}
/* Mobile: tudo empilhado e centralizado. Desktop: logo à esquerda, frase
   no centro da página e copyright à direita. */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-tagline { color: var(--ink-3); font-size: 15px; text-wrap: balance; }
.footer-copy { color: var(--ink-3); font-size: 14px; }

@media (min-width: 960px) {
  .site-footer { padding-bottom: 40px; }
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
  }
  .footer-logo { justify-self: start; }
  .footer-copy { justify-self: end; }
}

/* --------------------------------------------------------------------------
   Botão flutuante de WhatsApp (só abaixo de 960px)
   -------------------------------------------------------------------------- */
.whatsapp-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 28px -8px rgba(22, 21, 12, .45);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.whatsapp-fab .icon { width: 26px; height: 26px; }
/* Some quando o CTA final está na tela (raja.js); sem JS fica sempre visível */
.whatsapp-fab.is-hidden { opacity: 0; transform: translateY(12px); visibility: hidden; }
@media (min-width: 960px) {
  .whatsapp-fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
