/* ══════════════════════════════════════════
   TavariLabs — base compartilhada entre sites estáticos
   (calculadora, upload-portal, futuras páginas em site/)

   Cada página define os tokens de tema no próprio <style>,
   antes deste arquivo ser útil: --primary, --primary-dark,
   --ink, --wash, --shadow-soft, --shadow-card, --brand-border.
   Os tokens neutros (cinza, radius, shadow-pop) já vêm prontos
   daqui e não precisam ser redefinidos.
══════════════════════════════════════════ */

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

:root {
  --muted: #666666;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --shadow-pop: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* html precisa do próprio background — sem isso, o "canvas" por trás do body
   fica transparente e o rubber-band scroll do iOS Safari mostra branco puro
   no topo/rodapé da página, mesmo com o body colorido. */
html {
  background: var(--wash, #ffffff);
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background-attachment: fixed;
  min-height: 100vh;
}
@media (max-width: 640px) {
  /* background-attachment:fixed é instável no iOS Safari (some/pisca durante o
     scroll) — no mobile o ganho visual do parallax não compensa o bug. */
  body { background-attachment: scroll; }
}

/* ─── Header ─────────────────────────────── */
.site-header {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brand-border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-soft);
}
.logo { display: flex; align-items: baseline; gap: 1px; text-decoration: none; flex-shrink: 0; }
.logo-text { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em; color: var(--ink); }
/* Wordmark "tavari" — altura casada com a altura-x do texto ao lado, baseline alinhada */
.wm { display: block; width: auto; fill: currentColor; }
.logo .wm { height: 0.855rem; fill: var(--ink); transition: opacity .18s; }

/* Ícone compacto que substitui a marca por extenso quando o header (sticky)
   já está sobreposto ao conteúdo — ver .site-header.scrolled abaixo. Contém o
   símbolo oficial da marca (ver #tavarilabs-icon-paths), não mais um "t" de texto. */
.logo-icon {
  display: flex; align-items: center; justify-content: center;
  width: 0; height: 26px; border-radius: 8px;
  background: var(--primary, var(--gray-900));
  flex-shrink: 0; opacity: 0; overflow: hidden;
  transition: opacity .18s, width .18s, margin .18s;
}
.logo-icon .icon-mark { width: 15px; height: auto; flex-shrink: 0; }
.site-header.scrolled { align-items: center; }
.site-header.scrolled .logo { align-items: center; }
.site-header.scrolled .logo-icon { width: 26px; opacity: 1; margin-right: 2px; }
.site-header.scrolled .wm,
.site-header.scrolled .logo-text { display: none; }

/* ─── Nav ────────────────────────────────── */
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 28px; flex: 1; }
.nav-item {
  padding: 6px 13px; border-radius: var(--radius-sm);
  font-size: 0.8125rem; font-weight: 500; color: var(--gray-600);
  background: none; border: none; font-family: inherit;
  cursor: pointer; transition: color 0.15s, background 0.15s;
  white-space: nowrap; text-decoration: none; display: inline-block;
}
.nav-item:hover { background: var(--gray-100); color: var(--ink); }
.nav-item.active { background: var(--gray-100); color: var(--ink); font-weight: 700; }
.nav-cta {
  margin-left: auto; flex-shrink: 0;
  background: var(--gray-900); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 0.8125rem; font-weight: 700;
  border: none; font-family: inherit; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: background 0.15s; white-space: nowrap;
}
.nav-cta:hover { background: var(--gray-800); }
@media (max-width: 640px) {
  .site-header { padding: 0 12px; gap: 0; }
  .logo-text { font-size: 1rem; }
  .logo .wm { height: 0.78rem; }
  .site-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-shrink: 1; margin-left: 12px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .nav-item { padding: 6px 10px; font-size: 0.75rem; }
  .nav-cta { display: none; }
  .nav-hide-mobile { display: none; }
}

/* ─── Card ───────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.card-body { padding: 18px; }

/* ─── Divider ────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-100); margin: 16px 0; }

/* ─── Footer ─────────────────────────────── */
.site-footer { background: var(--ink-900, #0a0f14); border-top: 1px solid rgba(255,255,255,.08); }
.ft-main { max-width: 940px; margin: 0 auto; padding: 48px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.ft-left { max-width: 340px; }
.ft-right { text-align: right; }
.ft-brand-logo { display: flex; align-items: baseline; gap: 1px; margin-bottom: 14px; text-decoration: none; }
.ft-brand-logo .wm { height: 0.78rem; fill: #fff; }
.ft-brand-name { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.ft-brand-desc { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.65; margin-bottom: 20px; }
.ft-contact-item { margin-bottom: 12px; }
.ft-contact-lbl { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gray-600); margin-bottom: 2px; }
.ft-contact-val { font-size: 0.875rem; color: #e5e7eb; font-weight: 500; text-decoration: none; display: block; transition: color 0.15s; }
.ft-contact-val:hover { color: #fff; }
.ft-copy { font-size: 0.75rem; color: var(--gray-600); display: block; text-align: center; max-width: 940px; margin: 0 auto; padding: 20px 24px 32px; border-top: 1px solid #1f2937; }
