/* ============================================================
   GUIAR — Documentos Legais
   Stylesheet compartilhada entre termos.html e privacidade.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Verdana', 'Geneva', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Design tokens (marca Guiar) ---------- */
:root {
  --brand:        #0096EA;
  --brand-dark:   #1091E0;
  --brand-deep:   #0079BD;
  --brand-soft:   #E7F5FE;
  --brand-tint:   #F2FAFE;

  --ink:          #11111E;
  --text:         #1F2333;
  --text-muted:   #5B6378;
  --text-soft:    #8089A0;

  --bg:           #FFFFFF;
  --bg-alt:       #F7F9FC;
  --border:       #E6EAF0;
  --border-strong:#CCD3DE;

  --shadow-sm: 0 1px 2px rgba(17,17,30,.04), 0 1px 1px rgba(17,17,30,.02);
  --shadow-md: 0 4px 10px rgba(17,17,30,.06), 0 2px 4px rgba(17,17,30,.04);
  --shadow-lg: 0 20px 40px -12px rgba(17,17,30,.12), 0 8px 16px -4px rgba(17,17,30,.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
  --font-italic:  'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  --font-body:    'Verdana', 'Geneva', sans-serif;

  --content-max: 760px;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-link { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand-link svg { height: 30px; width: auto; display: block; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-alt);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.header-nav a {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all .2s ease;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--ink); }
.header-nav a.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--brand-tint) 0%, #fff 100%);
  padding: 80px 24px 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(16,145,224,.05) 0, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(16,145,224,.05) 0, transparent 40%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 14px;
  color: var(--brand);
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--brand-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  letter-spacing: .02em;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(0,150,234,.18);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 16px;
}
.hero h1 span.accent { color: var(--brand); }

.hero p.lede {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 12px;
  color: var(--brand-deep);
  letter-spacing: .02em;
}
.hero-meta .pill svg { width: 12px; height: 12px; }

/* ---------- Documento ---------- */
.doc-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.toc-title {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brand);
  margin: 0 0 16px;
  padding-left: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc li { line-height: 1.4; }
.toc a {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 12px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: all .15s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active {
  color: var(--brand);
  font-weight: bold;
  border-left-color: var(--brand);
  background: var(--brand-tint);
}

.doc-content { max-width: var(--content-max); min-width: 0; }

.doc-content h1.doc-title {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 12px;
}
.doc-subtitle {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.doc-content h2 {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
  margin: 56px 0 16px;
  padding-top: 16px;
  scroll-margin-top: 96px;
}
.doc-content h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
  margin-bottom: 16px;
}
.doc-content h3 {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 18px;
  color: var(--ink);
  margin: 32px 0 12px;
  scroll-margin-top: 96px;
}

.doc-content p {
  margin: 0 0 16px;
  color: var(--text);
  text-align: justify;
  hyphens: auto;
}
.doc-content strong { color: var(--ink); font-weight: bold; }
.doc-content em     { font-family: var(--font-italic); font-style: italic; }

.doc-content ul, .doc-content ol { padding-left: 22px; margin: 0 0 18px; }
.doc-content li { margin-bottom: 8px; color: var(--text); }
.doc-content ul li::marker { color: var(--brand); }

.doc-content a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,150,234,.4);
  transition: all .15s ease;
}
.doc-content a:hover { color: var(--brand); text-decoration-color: var(--brand); }

/* Tabelas */
.doc-content .table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: #fff;
}
.doc-content thead th {
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: bold;
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: .02em;
}
.doc-content tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.doc-content tbody tr:nth-child(even) td { background: var(--bg-alt); }
.doc-content td strong { color: var(--brand-deep); }

/* Callout */
.doc-content .callout {
  border-left: 4px solid var(--brand);
  background: var(--brand-tint);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-size: 14.5px;
}
.doc-content .callout strong { color: var(--brand-deep); }

/* Bloco final */
.doc-footer-meta {
  margin-top: 64px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  font-size: 14px;
}
.doc-footer-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: 6px;
  font-weight: bold;
}

/* Cross-link entre os dois documentos */
.cross-doc-link {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none !important;
  transition: all .2s ease;
}
.cross-doc-link:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cross-doc-link .cd-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
}
.cross-doc-link .cd-icon svg { width: 22px; height: 22px; }
.cross-doc-link .cd-text { flex: 1; min-width: 0; }
.cross-doc-link .cd-label {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.cross-doc-link .cd-title {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 17px;
  color: var(--ink);
  margin: 0;
  text-decoration: none;
}
.cross-doc-link .cd-arrow {
  flex: 0 0 auto;
  color: var(--brand);
  transition: transform .2s ease;
}
.cross-doc-link:hover .cd-arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #B7BCCD;
  padding: 56px 24px 32px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer-brand svg { height: 36px; width: auto; }
.footer-brand p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #8E94AB;
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 13px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #B7BCCD;
  text-decoration: none;
  font-size: 14px;
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #6B7189;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 20px 64px;
  }
  .toc {
    position: static;
    max-height: none;
    padding: 16px;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
  }
  .toc-title { padding-left: 0; margin-bottom: 12px; }
  .toc ol { border-left: 0; }
  .toc a { padding: 6px 0; border-left: 0; }
  .toc a.is-active { background: transparent; border-left: 0; padding-left: 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 56px 20px 48px; }
  .doc-content h2 { margin-top: 40px; font-size: 22px; }
  .doc-footer-meta { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .header-inner { padding: 12px 16px; gap: 12px; }
  .brand-link svg { height: 24px; }
  .header-nav a { padding: 7px 12px; font-size: 12px; }
  .doc-content { font-size: 15px; }
  .doc-content table { font-size: 13.5px; }
  .doc-content thead th, .doc-content tbody td { padding: 10px 12px; }
  .cross-doc-link { padding: 16px; gap: 12px; }
  .cross-doc-link .cd-icon { flex-basis: 38px; width: 38px; height: 38px; }
}

@media print {
  .site-header, .toc, .site-footer, .header-nav, .cross-doc-link { display: none !important; }
  .doc-layout { grid-template-columns: 1fr; padding: 0; }
  body { font-size: 11pt; }
  .hero { background: none; padding: 0 0 24px; border-bottom: 2px solid var(--ink); }
}
