/* ===================================================================
   TOTVS CALENDAR — Documentos Legais
   Folha de estilo compartilhada (Aviso de Privacidade + Termos)
   =================================================================== */

:root {
  /* Paleta TOTVS */
  --totvs-ink:        #141322;   /* texto principal / quase-preto arroxeado */
  --totvs-ink-soft:   #3a3850;
  --totvs-muted:      #6b6880;
  --totvs-line:       #e6e4ee;
  --totvs-line-soft:  #f1f0f6;
  --totvs-bg:         #ffffff;
  --totvs-bg-alt:     #faf9fd;
  --totvs-primary:    #6320ee;   /* roxo TOTVS */
  --totvs-primary-d:  #4d12c4;
  --totvs-accent:     #00e3a5;   /* verde de destaque */
  --totvs-focus:      #8a55ff;

  --maxw: 820px;

  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,19,34,.04), 0 12px 32px rgba(20,19,34,.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--totvs-ink);
  background: var(--totvs-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--totvs-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ----------------------------------------------------------------- */
/* Skip link (acessibilidade)                                        */
/* ----------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--totvs-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------------- */
/* Cabeçalho                                                          */
/* ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--totvs-line);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--totvs-ink);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--totvs-primary), var(--totvs-primary-d));
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__name { font-size: 1.02rem; line-height: 1.1; }
.brand__name small {
  display: block;
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--totvs-muted);
}
.header-nav {
  display: flex;
  gap: 6px;
}
.header-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--totvs-ink-soft);
  padding: 7px 13px;
  border-radius: 999px;
}
.header-nav a:hover { background: var(--totvs-line-soft); text-decoration: none; }
.header-nav a[aria-current="page"] {
  background: var(--totvs-ink);
  color: #fff;
}

/* ----------------------------------------------------------------- */
/* Hero do documento                                                 */
/* ----------------------------------------------------------------- */
.doc-hero {
  border-bottom: 1px solid var(--totvs-line);
  background:
    radial-gradient(120% 120% at 100% -20%, rgba(99,32,238,.07), transparent 55%),
    var(--totvs-bg);
}
.doc-hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--totvs-primary);
  margin-bottom: 14px;
}
.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  color: var(--totvs-ink);
}
.doc-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--totvs-muted);
  font-size: .9rem;
  margin-top: 18px;
}
.doc-hero__meta strong { color: var(--totvs-ink-soft); font-weight: 600; }

/* ----------------------------------------------------------------- */
/* Layout do conteúdo                                                */
/* ----------------------------------------------------------------- */
.doc-layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 960px) {
  .doc-layout {
    max-width: 1120px;
    grid-template-columns: 250px 1fr;
    gap: 56px;
    align-items: start;
  }
}

/* Índice lateral */
.toc {
  position: sticky;
  top: 92px;
  font-size: .88rem;
}
.toc__title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--totvs-muted);
  margin: 0 0 12px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  border-left: 1px solid var(--totvs-line);
}
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  color: var(--totvs-ink-soft);
  border-left: 2px solid transparent;
  line-height: 1.35;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero) "  ";
  color: var(--totvs-muted);
  font-variant-numeric: tabular-nums;
  font-size: .82em;
}
.toc a:hover { color: var(--totvs-primary); text-decoration: none; }
.toc a.is-active {
  color: var(--totvs-primary);
  border-left-color: var(--totvs-primary);
  font-weight: 600;
}
@media (max-width: 959px) {
  .toc { display: none; }
}

/* Corpo do texto */
.doc-body { min-width: 0; }
.doc-body section { scroll-margin-top: 92px; }
.doc-body section + section { margin-top: 40px; }

.doc-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--totvs-line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.doc-body h2 .num {
  font-size: .9rem;
  font-weight: 700;
  color: var(--totvs-primary);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.doc-body h3 {
  font-size: 1.05rem;
  margin: 26px 0 8px;
  color: var(--totvs-ink);
}
.doc-body p { margin: 0 0 14px; color: var(--totvs-ink-soft); }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 22px; color: var(--totvs-ink-soft); }
.doc-body li { margin-bottom: 7px; }
.doc-body li::marker { color: var(--totvs-primary); }
.doc-body strong { color: var(--totvs-ink); font-weight: 600; }

/* Caixa de destaque (Limited Use, contatos, etc.) */
.callout {
  border: 1px solid var(--totvs-line);
  background: var(--totvs-bg-alt);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 18px 0;
}
.callout--accent {
  border-color: rgba(99,32,238,.25);
  background: linear-gradient(180deg, rgba(99,32,238,.05), rgba(99,32,238,.02));
}
.callout__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--totvs-primary);
  margin-bottom: 10px;
}
.callout p:last-child { margin-bottom: 0; }

/* Tabela de dados */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: .92rem;
}
.data-table caption {
  text-align: left;
  color: var(--totvs-muted);
  font-size: .82rem;
  margin-bottom: 8px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--totvs-line);
  vertical-align: top;
}
.data-table th {
  background: var(--totvs-bg-alt);
  font-weight: 600;
  color: var(--totvs-ink);
}
.data-table td { color: var(--totvs-ink-soft); }

/* Placeholder visível para você editar depois */
.fill {
  background: #fff4d6;
  border-bottom: 1px dashed #d9a400;
  padding: 0 3px;
  font-style: normal;
}

/* ----------------------------------------------------------------- */
/* Rodapé                                                             */
/* ----------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--totvs-line);
  background: var(--totvs-bg-alt);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  gap: 24px;
}
@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}
.site-footer p { margin: 0 0 8px; color: var(--totvs-muted); font-size: .88rem; }
.site-footer .legal-name { color: var(--totvs-ink); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: .9rem; font-weight: 500; color: var(--totvs-ink-soft); }
.footer-bottom {
  border-top: 1px solid var(--totvs-line);
  margin-top: 8px;
  padding-top: 18px;
  font-size: .82rem;
  color: var(--totvs-muted);
}

/* Botão voltar ao topo */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--totvs-line);
  background: #fff;
  color: var(--totvs-ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { border-color: var(--totvs-primary); color: var(--totvs-primary); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .to-top { transition: none; }
}

/* ===================================================================
   HOME / LANDING PAGE
   =================================================================== */
.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--totvs-line);
  background:
    radial-gradient(110% 120% at 85% -10%, rgba(99,32,238,.10), transparent 50%),
    radial-gradient(90% 90% at 0% 110%, rgba(0,227,165,.08), transparent 55%),
    var(--totvs-bg);
}
.home-hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 60px;
}
.home-hero .eyebrow { margin-bottom: 18px; }
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 18px;
  max-width: 16ch;
}
.home-hero h1 .grad {
  background: linear-gradient(120deg, var(--totvs-primary), #b07bff 60%, var(--totvs-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero__lead {
  font-size: 1.18rem;
  color: var(--totvs-ink-soft);
  max-width: 56ch;
  margin: 0 0 30px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--totvs-primary), var(--totvs-primary-d));
  color: #fff;
  box-shadow: 0 8px 22px rgba(99,32,238,.28);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(99,32,238,.36); }
.btn--ghost {
  background: #fff;
  color: var(--totvs-ink);
  border-color: var(--totvs-line);
}
.btn--ghost:hover { border-color: var(--totvs-primary); color: var(--totvs-primary); }
.btn svg { width: 18px; height: 18px; flex: none; }
.cta-note { font-size: .86rem; color: var(--totvs-muted); }

/* Faixa de sincronização (visual de fluxo Google <-> Fluig) */
.sync-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding: 22px;
  border: 1px solid var(--totvs-line);
  border-radius: var(--radius);
  background: var(--totvs-bg-alt);
}
.sync-node {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  color: var(--totvs-ink);
}
.sync-node__icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--totvs-line);
  color: var(--totvs-primary);
  flex: none;
}
.sync-node__icon svg { width: 22px; height: 22px; }
.sync-arrows { color: var(--totvs-primary); display: grid; place-items: center; }
.sync-arrows svg { width: 38px; height: 24px; }
.sync-arrows span {
  display: block; text-align: center; font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--totvs-muted);
  margin-top: 2px; font-weight: 600;
}

/* Seções genéricas da home */
.home-section { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; }
.home-section--alt { background: var(--totvs-bg-alt); border-block: 1px solid var(--totvs-line); max-width: none; }
.home-section--alt > .home-section__wrap { max-width: var(--maxw); margin: 0 auto; }
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 8px 0 10px;
}
.section-head p { color: var(--totvs-ink-soft); font-size: 1.05rem; max-width: 56ch; margin: 0; }

/* Grid de recursos */
.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature {
  border: 1px solid var(--totvs-line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.feature:hover { border-color: rgba(99,32,238,.3); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(99,32,238,.12), rgba(0,227,165,.12));
  color: var(--totvs-primary);
  margin-bottom: 14px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 7px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--totvs-ink-soft); font-size: .96rem; }

/* Passo a passo */
.steps { display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: step; position: relative; padding-top: 8px; }
.step__num {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 800;
  color: var(--totvs-primary);
  opacity: .9; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--totvs-ink-soft); font-size: .96rem; }

/* Permissões / transparência */
.perm-card {
  border: 1px solid rgba(99,32,238,.22);
  background: linear-gradient(180deg, rgba(99,32,238,.05), rgba(99,32,238,.015));
  border-radius: var(--radius);
  padding: 26px;
}
.perm-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.perm-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--totvs-ink-soft); }
.perm-list svg { width: 20px; height: 20px; color: var(--totvs-primary); flex: none; margin-top: 2px; }

/* FAQ (accordion) */
.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--totvs-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.faq details[open] { border-color: rgba(99,32,238,.3); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--totvs-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex: none; transition: transform .2s ease; color: var(--totvs-primary);
}
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq__a { padding: 0 20px 18px; color: var(--totvs-ink-soft); }
.faq .faq__a p { margin: 0; }

/* CTA final */
.cta-band {
  max-width: var(--maxw);
  margin: 0 auto 72px;
  border-radius: 20px;
  padding: 44px 32px;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(135deg, var(--totvs-primary), var(--totvs-primary-d));
  color: #fff;
}
.cta-band h2 { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 10px; letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0 0 22px; }
.cta-band .btn--primary {
  background: #fff; color: var(--totvs-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
@media (max-width: 520px) { .cta-band { margin-inline: 16px; } }

/* Subtítulo do H1 (nome do app em destaque no topo) */
.home-hero h1 .h1-sub {
  display: block;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--totvs-ink-soft);
  margin-top: 10px;
  max-width: 18ch;
}
