/* =================================================================
   JayMessage — páginas legais (terms, privacidade, exclusão de dados)
   ================================================================= */

.legal-page {
  background: #ffffff;
  color: var(--ink);
  min-height: 100vh;
}

/* Simpler header for legal pages */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.legal-nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-nav-logo { display: inline-flex; height: 28px; }
.legal-nav-logo img { height: 100%; width: auto; }
.legal-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.legal-nav-back:hover { color: var(--jay); background: var(--jay-pale); }

/* Hero */
.legal-hero {
  padding: 80px 0 40px;
  background: linear-gradient(180deg, var(--jay-paler) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.legal-hero-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(48,89,172,.1) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.legal-hero .container { position: relative; }
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jay);
  padding: 6px 14px;
  background: var(--jay-pale);
  border-radius: 999px;
  margin-bottom: 22px;
}
.legal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.legal-lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-soft);
  max-width: 700px;
  line-height: 1.55;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-mute);
}
.legal-meta strong { color: var(--ink); font-weight: 600; }

/* Body layout: sidebar TOC + content */
.legal-body {
  padding: 60px 0 100px;
}
.legal-body-inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* Table of contents */
.legal-toc {
  position: sticky;
  top: 88px;
  padding: 18px 0;
  border-left: 1px solid var(--line);
}
.legal-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-left: 18px;
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-toc li { padding: 0; }
.legal-toc a {
  display: block;
  padding: 7px 18px;
  font-size: 13.5px;
  color: var(--ink-mute);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .2s, border-color .2s, background .2s;
}
.legal-toc a:hover { color: var(--jay); }
.legal-toc a.is-active {
  color: var(--jay);
  border-left-color: var(--jay);
  background: var(--jay-pale);
  font-weight: 600;
}

/* Content */
.legal-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 760px;
}
.legal-content h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h2 .legal-section-num {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--jay);
  background: var(--jay-pale);
  padding: 3px 10px;
  border-radius: 6px;
  margin-right: 10px;
  vertical-align: 4px;
  letter-spacing: 0.04em;
}
.legal-content h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
  color: var(--ink);
}
.legal-content p { margin-bottom: 16px; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content a {
  color: var(--jay);
  text-decoration: underline;
  text-decoration-color: rgba(48,89,172,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.legal-content a:hover { text-decoration-color: var(--jay); }
.legal-content ul, .legal-content ol {
  padding-left: 0;
  margin: 0 0 18px;
  list-style: none;
}
.legal-content ul li, .legal-content ol li {
  position: relative;
  padding: 6px 0 6px 28px;
}
.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 6px; top: 16px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--jay);
}
.legal-content ol { counter-reset: legal-ol; }
.legal-content ol li {
  counter-increment: legal-ol;
  padding-left: 36px;
}
.legal-content ol li::before {
  content: counter(legal-ol);
  position: absolute;
  left: 0; top: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--jay);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
}

/* Callout boxes */
.legal-callout {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 12px;
  margin: 24px 0;
  background: var(--jay-pale);
  border-left: 4px solid var(--jay);
}
.legal-callout-info { background: rgba(48, 89, 172, .07); border-left-color: var(--jay); }
.legal-callout-warn { background: rgba(255, 169, 0, .08); border-left-color: #d4a017; }
.legal-callout-success { background: rgba(6, 160, 53, .07); border-left-color: #06a035; }
.legal-callout-ic {
  flex-shrink: 0;
  width: 24px; height: 24px;
  color: var(--jay);
}
.legal-callout-warn .legal-callout-ic { color: #d4a017; }
.legal-callout-success .legal-callout-ic { color: #06a035; }
.legal-callout-body { flex: 1; }
.legal-callout-body strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--ink);
}
.legal-callout-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}

/* Tables */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.legal-table th {
  background: var(--jay-paler);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.legal-table td:first-child { font-weight: 500; color: var(--ink); }

/* Definition list */
.legal-defs {
  background: var(--jay-paler);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.legal-defs dt {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--jay-darker);
  margin-top: 14px;
}
.legal-defs dt:first-child { margin-top: 0; }
.legal-defs dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Contact block */
.legal-contact {
  margin-top: 40px;
  padding: 32px;
  background: linear-gradient(135deg, var(--jay) 0%, var(--jay-deep) 100%);
  color: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}
.legal-contact::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,71,.25), transparent 70%);
  pointer-events: none;
}
.legal-contact h3 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 22px;
  position: relative;
}
.legal-contact p {
  color: rgba(255, 255, 255, .82);
  margin-bottom: 10px;
  position: relative;
}
.legal-contact strong {
  color: #fff;
  font-weight: 600;
}
.legal-contact a {
  color: #ffe9a0;
  font-weight: 500;
  text-decoration-color: rgba(255, 233, 160, .55);
}
.legal-contact a:hover { text-decoration-color: #ffe9a0; }
.legal-contact ul li,
.legal-contact ol li { color: rgba(255, 255, 255, .82); }
.legal-contact ul li::before { background: #ffc847; }

/* Responsive */
@media (max-width: 900px) {
  .legal-body-inner { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; border-left: none; border-top: 1px solid var(--line); padding: 24px 0 0; order: 2; }
  .legal-toc a { padding-left: 0; border-left: none; }
  .legal-toc a.is-active { background: transparent; padding-left: 12px; border-left: 2px solid var(--jay); }
  .legal-hero { padding: 100px 0 40px; }
}
