/* ============================================================
   VISTORIA.AI — Páginas legais (legal.css)
   Requer common.css carregado antes
   ============================================================ */

/* ---- Variáveis específicas das páginas legais ---- */
:root {
  --fs-eyebrow: clamp(0.72rem, 1.4vw, 0.8rem);
  --fs-hero:    clamp(2rem, 6.5vw, 3.4rem);
  --fs-h2:      clamp(1.3rem, 3.6vw, 1.9rem);
  --fs-h3:      clamp(1.02rem, 2.2vw, 1.18rem);
  --fs-body:    clamp(1rem, 1.5vw, 1.1rem);
  --fs-small:   clamp(0.84rem, 1.3vw, 0.92rem);
  --maxw:       760px;
}

body {
  font-size: var(--fs-body);
  line-height: 1.72;
  font-weight: 400;
}

/* ============ HERO ============ */
.hero {
  background:
    radial-gradient(130% 120% at 88% 8%, var(--daintree-3) 0%, var(--daintree) 52%, #00181f 100%);
  color: var(--silver);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -160px; bottom: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,138,4,0.32) 0%, rgba(245,138,4,0) 62%);
  filter: blur(14px);
  pointer-events: none;
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 5.5rem) var(--pad-x) clamp(2.5rem, 7vw, 4rem);
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin: 0;
  font-size: var(--fs-hero);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.hero__meta {
  margin: 1.7rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-small);
  color: rgba(241, 241, 241, 0.62);
  letter-spacing: 0.04em;
}
.hero__meta b { color: var(--silver); font-weight: 600; }

/* ============ LAYOUT ============ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) var(--pad-x) clamp(3.5rem, 9vw, 6rem);
}

.intro p { margin: 0 0 1.15rem; color: var(--ink-soft); }
.intro p:first-child { font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.55; color: var(--ink); font-weight: 500; }
.intro strong { color: var(--ink); font-weight: 700; }

/* ============ SUMÁRIO ============ */
.toc {
  margin: clamp(2.2rem, 5vw, 3rem) 0 0;
  padding: 1.5rem 1.6rem 1.7rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.toc__title { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-eyebrow); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 1rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1.8rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 0.7rem; align-items: baseline; text-decoration: none; color: var(--ink-soft); padding: 0.5rem 0; border-bottom: 1px solid var(--rule-soft); transition: color 0.18s; }
.toc li:last-child a, .toc li:nth-last-child(2):nth-child(odd) a { border-bottom: 0; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: 'IBM Plex Mono', monospace; font-size: 0.8em; color: var(--romesco); font-weight: 600; flex-shrink: 0; }
.toc a:hover { color: var(--daintree); }

/* ============ SEÇÕES ============ */
.section { margin-top: clamp(2.8rem, 7vw, 4.2rem); }
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 2px solid var(--daintree); }
.section__num { font-family: 'IBM Plex Mono', monospace; font-size: clamp(1rem, 2.2vw, 1.25rem); font-weight: 600; color: var(--romesco); line-height: 1; flex-shrink: 0; }
.section__head h2 { margin: 0; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--daintree); text-wrap: balance; }
.section p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--ink); font-weight: 700; }
.subhead { font-size: var(--fs-h3); font-weight: 700; color: var(--daintree); margin: 1.8rem 0 0.7rem; letter-spacing: -0.01em; }

/* ---- Listas ---- */
.terms { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.15rem; }
.terms > li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.terms > li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; background: var(--romesco); border-radius: 2px; transform: rotate(45deg) translateY(-2px); }
.terms .lbl { color: var(--ink); font-weight: 700; }
.bullets { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.bullets li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--green-1); }

/* ---- Callout ---- */
.callout { margin: 1.6rem 0 0; background: var(--daintree); color: var(--silver); border-radius: 16px; padding: 1.5rem 1.7rem; }
.callout .callout__eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-eyebrow); letter-spacing: 0.18em; text-transform: uppercase; color: var(--romesco); margin: 0 0 0.7rem; }
.callout p { color: rgba(241,241,241,0.82); margin: 0; }
.callout strong { color: var(--silver); }
.callout a { color: var(--romesco-soft); font-weight: 600; text-decoration: none; }
.callout a:hover { text-decoration: underline; }

/* ---- Links inline ---- */
.section a:not(.callout a) { color: var(--vistoria-blue); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(43,58,143,0.25); }
.section a:hover { border-bottom-color: var(--vistoria-blue); }

/* ---- Voltar ao topo ---- */
.totop { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 2.4rem; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); text-decoration: none; transition: color 0.2s; }
.totop:hover { color: var(--romesco); }
.totop::before { content: "↑"; font-size: 1.1em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
  .toc ol { grid-template-columns: 1fr; }
  .toc li:nth-last-child(2):nth-child(odd) a { border-bottom: 1px solid var(--rule-soft); }
  .section__head { gap: 0.7rem; }
}

/* ============ DARK MODE (específico para páginas legais) ============ */
html[data-theme="dark"] .section__head { border-bottom-color: var(--daintree-3); }
html[data-theme="dark"] .section__head h2,
html[data-theme="dark"] .subhead { color: var(--silver); }
html[data-theme="dark"] .toc a:hover { color: var(--romesco-soft); }
html[data-theme="dark"] .section a:not(.callout a) { color: var(--romesco-soft); border-bottom-color: rgba(255,174,71,0.25); }
html[data-theme="dark"] .section a:hover { border-bottom-color: var(--romesco-soft); }
