/* ============================================================
   ÁGORA CONSULT — site.css
   Shared layout, components, utilities (depende de tokens.css)
   ============================================================ */

@import url('./tokens.css');

/* ──────────────────────────────────────────────────────────
   RESET + BASE
   ────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--fg-body);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--body-line-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

img, svg { display: block; max-width: 100%; }

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

/* Custom subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--neutral-150); }
::-webkit-scrollbar-thumb {
  background: var(--navy-200);
  border: 2px solid var(--neutral-150);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--navy-300); }

/* ──────────────────────────────────────────────────────────
   LAYOUT PRIMITIVES
   ────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-block;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--fg-primary);
  text-wrap: balance;
}

.section-sub {
  font-size: var(--text-md);
  color: var(--fg-secondary);
  line-height: 1.6;
  max-width: 60ch;
  margin-top: 16px;
}

.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; margin-inline: auto; max-width: 720px; }
.section-header.center .section-sub { margin-inline: auto; }

/* Subtle dot pattern utility (per design guide) */
.bg-dotgrid {
  background-image: radial-gradient(rgba(14,30,63,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.bg-linegrid-dark {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ──────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  color: var(--btn-primary-fg);
}
.btn-primary:active { background: var(--btn-primary-bg-press); }

.btn-accent {
  background: var(--btn-accent-bg);
  color: var(--btn-accent-fg);
}
.btn-accent { color: var(--btn-accent-fg) !important; }
.btn-accent:hover { background: var(--btn-accent-bg-hover); color: var(--btn-accent-fg) !important; }
.btn-accent:active { background: var(--btn-accent-bg-press); color: var(--btn-accent-fg) !important; }
.nav .btn-accent::after { display: none !important; }

.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-fg);
  border-color: var(--btn-ghost-border);
}
.btn-ghost:hover { background: var(--btn-ghost-bg-hover); }

.btn-ghost-light {
  background: transparent;
  color: var(--neutral-50);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
}

.btn-lg { padding: 16px 28px; font-size: var(--text-base); }
.btn-block { width: 100%; }

/* ──────────────────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin-bottom: 6px;
}
.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg-primary);
  background: var(--neutral-50);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--neutral-500); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(196,154,42,0.18);
}
.input.error, .textarea.error, .select.error {
  border-color: var(--status-error);
  box-shadow: 0 0 0 3px rgba(155,35,53,0.12);
}
.help {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--fg-secondary);
}
.error-text {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--status-error);
  font-weight: 500;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--fg-body);
  line-height: 1.5;
}
.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--navy-700);
  border-radius: 3px;
  background: var(--neutral-50);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast);
}
.checkbox-row input[type="checkbox"]:checked {
  background: var(--navy-900);
  border-color: var(--navy-900);
}
.checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F6F1E7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}
.checkbox-row a { color: var(--navy-700); text-decoration: underline; }
.checkbox-row a:hover { color: var(--navy-900); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   CARDS
   ────────────────────────────────────────────────────────── */
.card {
  background: var(--neutral-50);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base),
              transform var(--transition-base),
              border-color var(--transition-base);
}
.card.link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-300);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────
   BADGES
   ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
}
.badge-gold {
  background: var(--gold-100);
  color: var(--gold-700);
  border: 1px solid var(--gold-300);
}
.badge-navy {
  background: var(--navy-100);
  color: var(--navy-800);
  border: 1px solid var(--navy-200);
}
.badge-success {
  background: #DCEBE2;
  color: #1F523B;
  border: 1px solid #A3D2B7;
}
.badge-warn {
  background: var(--gold-50);
  color: var(--gold-800);
  border: 1px solid var(--gold-200);
}

/* ──────────────────────────────────────────────────────────
   HEADER / NAV
   ────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 18px 0;
  background: rgba(246,241,231,0);
  transition: background var(--transition-base),
              box-shadow var(--transition-base),
              padding var(--transition-base),
              border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(253,250,245,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-default);
  padding: 12px 0;
  box-shadow: var(--shadow-xs);
}
.site-header.dark-host {
  background: rgba(6,16,31,0.0);
}
.site-header.dark-host.scrolled {
  background: rgba(6,16,31,0.92);
  border-bottom-color: rgba(255,255,255,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.theme-corner {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  cursor: pointer;
  color: var(--navy-900);
  opacity: 0.92;
  box-shadow: var(--shadow-xs);
  transition: opacity var(--transition-fast),
              color var(--transition-fast),
              background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  z-index: 60;
}
.theme-corner:hover {
  opacity: 1;
  color: var(--gold-600);
  border-color: var(--gold-400);
  background: var(--neutral-50);
  transform: scale(1.06);
}
.theme-corner svg { width: 18px !important; height: 18px !important; }
[data-theme="dark"] .theme-corner {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: var(--gold-300);
}
[data-theme="dark"] .theme-corner:hover {
  background: rgba(255,255,255,0.10);
  border-color: var(--gold-300);
  color: var(--gold-200);
}

.nav-cta { margin-left: 22px; padding-left: 26px !important; padding-right: 26px !important; }
.btn-lg.nav-cta,
.nav-cta.btn-lg { padding-left: 32px !important; padding-right: 32px !important; }

.brand img {
  height: 84px;
  width: auto;
  display: block;
  transition: height var(--transition-base);
}
.site-header.scrolled .brand img { height: 64px; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  color: var(--navy-900);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.nav a:hover { color: var(--gold-600); }
.nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition-fast);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav a.active::after,
.nav a.active:hover::after { transform: scaleX(1); }
.nav-old-active-rule {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold-500);
}
.site-header.dark-host:not(.scrolled) .nav a,
.site-header.dark-host:not(.scrolled) .brand .brand-name {
  color: var(--neutral-50);
}
.site-header.dark-host:not(.scrolled) .nav a:hover { color: var(--gold-300); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
  color: var(--navy-900);
}
.site-header.dark-host:not(.scrolled) .menu-toggle { color: var(--neutral-50); }
@media (max-width: 880px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 86vw);
  background: var(--navy-900);
  color: var(--neutral-50);
  z-index: 200;
  padding: 96px 28px 28px;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  color: var(--neutral-50);
  text-decoration: none;
  font-size: var(--text-lg);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-drawer .btn { margin-top: 12px; }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,16,31,0.5);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  border: 0;
  color: var(--neutral-50);
  cursor: pointer;
}

/* ──────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-950);
  color: var(--navy-200);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 16px;
}
.site-footer .footer-brand img {
  height: 96px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.site-footer p, .site-footer a, .site-footer span {
  font-size: var(--text-sm);
  color: var(--navy-200);
  line-height: 1.6;
  text-decoration: none;
}
.site-footer a:hover { color: var(--gold-300); }
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: var(--text-xs);
  color: var(--navy-300);
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────
   LGPD COOKIE BANNER
   ────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--navy-900);
  color: var(--neutral-50);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-xl);
  z-index: 95;
  transform: translateY(150%);
  transition: transform var(--transition-slow);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p {
  font-size: var(--text-sm);
  color: var(--neutral-50);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}
.cookie-banner a { color: var(--gold-300); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    bottom: 12px; left: 12px; right: 12px;
  }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

/* ──────────────────────────────────────────────────────────
   FLOATING WHATSAPP
   ────────────────────────────────────────────────────────── */
.fab-wa {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(37,211,102,0.35);
  text-decoration: none;
  z-index: 80;
  transition: background var(--transition-fast),
              box-shadow var(--transition-fast);
}
.fab-wa:hover { background: #1FB857; }

/* ──────────────────────────────────────────────────────────
   TOAST
   ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--navy-900);
  color: var(--neutral-50);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: opacity var(--transition-base),
              transform var(--transition-base);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ──────────────────────────────────────────────────────────
   SHARED PROSE (legal pages, blog post)
   ────────────────────────────────────────────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--fg-body);
  line-height: 1.7;
}
.prose h1, .prose h2, .prose h3 {
  color: var(--navy-900);
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}
.prose h1 { font-family: var(--font-display); font-size: clamp(32px, 4.5vw, 48px); margin-top: 0; }
.prose h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); }
.prose h3 { font-family: var(--font-body); font-size: var(--text-xl); font-weight: 700; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--navy-900); font-weight: 700; }
.prose .updated {
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  font-style: italic;
  margin-bottom: 32px;
}

/* ──────────────────────────────────────────────────────────
   LUCIDE ICON SIZE HELPERS
   ────────────────────────────────────────────────────────── */
.icon-sm { width: 16px; height: 16px; }
.icon { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
