/* =========================================================
   Arthur Chelles Advocacia — estilos base
   Tokens conforme specs/design.md §2. CSS puro (sem @apply),
   para migrar sem atrito ao build do Tailwind CLI.
   ========================================================= */

:root {
  /* Paleta oficial */
  --navy-900: #0A1F3D;
  --navy-800: #0F2647;
  --navy-700: #16305A;
  --gold-400: #D4AF37;
  --gold-500: #C9A94E;
  --gold-600: #A9863F;
  --cream-100: #F5F0E6;
  --cream-200: #F2E9D8;

  /* Texto */
  --text-primary: #F5F0E6;
  --text-secondary: #C3C7D1;
  --text-muted: #9AA3B4;
  --text-on-cream: #0A1F3D;

  /* Detalhes */
  --hairline: rgba(245, 240, 230, 0.10);
  --hairline-gold: rgba(201, 169, 78, 0.35);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  /* Raios */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  /* Layout */
  --header-h: 88px;
}

@media (min-width: 1024px) {
  :root { --header-h: 112px; }
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--navy-900);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;   /* Cormorant já é estreita; tracking negativo apertaria demais */
}

::selection {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* Âncoras não somem sob o header fixo */
[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* ---------- Acessibilidade ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

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

/* ---------- Tipografia fluida ---------- */

/* Cormorant Garamond tem x-height baixa — escala ~12% maior que a de uma grotesk */
.t-hero    { font-size: clamp(2.6rem, 7.2vw, 4.9rem);  line-height: 1.06; text-wrap: balance; }
.t-h2      { font-size: clamp(2.15rem, 4.3vw, 3.1rem); line-height: 1.14; }
.t-h3      { font-size: clamp(1.4rem, 2.5vw, 1.8rem);  line-height: 1.22; }
.t-lead    { font-size: clamp(1.05rem, 1.5vw, 1.2rem);  line-height: 1.65; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  flex: none;
}
.eyebrow--center::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  flex: none;
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.975rem;
  text-align: center;
  transition: background-color .22s ease, border-color .22s ease,
              transform .22s ease, box-shadow .22s ease;
  will-change: transform;
}

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn--ghost {
  border: 1px solid rgba(245, 240, 230, 0.22);
  color: var(--text-primary);
}

@media (hover: hover) {
  .btn--gold:hover {
    background: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(201, 169, 78, 0.24);
  }
  .btn--ghost:hover {
    background: rgba(245, 240, 230, 0.06);
    border-color: var(--hairline-gold);
    transform: translateY(-2px);
  }
}
.btn--gold:active { background: var(--gold-600); transform: translateY(0); }

/* ---------- Cards ---------- */

.card {
  background: var(--navy-700);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--hairline-gold);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 31, 61, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* alvo de toque mínimo (WCAG / site.md §11) */
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color .2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 9px;
  width: 0; height: 1px;
  background: var(--gold-500);
  transition: width .28s ease;
}
.nav-link:hover,
.nav-link[aria-current="page"] { color: var(--text-primary); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { width: 100%; }

/* ---------- Menu mobile ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.is-open { visibility: visible; pointer-events: auto; }

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 30, 0.72);
  opacity: 0;
  transition: opacity .28s ease;
}
.mobile-menu.is-open .mobile-menu__backdrop { opacity: 1; }

.mobile-menu__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(88vw, 340px);
  background: var(--navy-800);
  border-left: 1px solid var(--hairline);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }

.mobile-menu__link {
  display: block;
  padding: 16px 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  border-bottom: 1px solid var(--hairline);
  transition: color .2s ease;
}
.mobile-menu__link:hover { color: var(--gold-500); }

body.is-locked { overflow: hidden; }

/* ---------- WhatsApp flutuante ---------- */

.wa-float {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform .25s ease, background-color .25s ease;
}
@media (hover: hover) {
  .wa-float:hover { background: var(--gold-400); transform: scale(1.07); }
}

/* ---------- Utilidades de seção ---------- */

.section {
  padding-top: clamp(56px, 8vw, 120px);
  padding-bottom: clamp(56px, 8vw, 120px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (min-width: 1024px) {
  .container { padding-inline: 32px; }
}

.divider-gold {
  width: 56px;
  height: 2px;
  background: var(--gold-500);
  border: 0;
}

/* Overlay para texto sobre foto */
.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(10, 31, 61, 0) 35%,
              rgba(10, 31, 61, 0.75) 100%);
  pointer-events: none;
}

/* ---------- Accordion (FAQ) ---------- */

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  min-height: 48px;
  text-align: left;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color .2s ease;
}
@media (hover: hover) {
  .accordion-trigger:hover { color: var(--gold-500); }
}

.accordion-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-gold);
  color: var(--gold-500);
  transition: transform .3s ease, background-color .3s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  background: rgba(201, 169, 78, 0.12);
}

.accordion-panel {
  overflow: hidden;
  height: 0;
  transition: height .3s ease;
}
.accordion-panel > p {
  padding: 0 0 26px;
  padding-right: 58px;
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .accordion-panel > p { padding-right: 0; }
}

/* ---------- Animações de entrada ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.22, .61, .36, 1),
              transform .6s cubic-bezier(.22, .61, .36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .mobile-menu__panel { transition: none; }
}
