/* ═══════════════════════════════════════════════════════════════════════
   shared/legal.css — Layout das páginas legais (/privacidade, /termos)
   ─────────────────────────────────────────────────────────────────────
   Mesmo header e footer da landing. Quadriculado animado da seção
   "powers" como fundo da página inteira.
   Carregar APÓS /shared/tokens.css.
   ═══════════════════════════════════════════════════════════════════════ */

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

html { background-color: var(--ivory); }

body {
  font-family: var(--sans), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  /* Fade-in suave no carregamento — anima sozinho via CSS, sem depender
     de JS. Substitui o ciclo anterior que casava com o typewriter. */
  animation: legalBodyFadeIn 600ms ease-out both;
}
@keyframes legalBodyFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; opacity: 1; }
}

/* ───────────────────────────────────────────────────────────────────────
   GRID CANVAS — quadriculado idêntico ao da .powers, mas como fundo
   da página inteira (fixed em viewport, drenado uma vez por load/resize)
   ─────────────────────────────────────────────────────────────────────── */
#legal-grid-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0,
    rgba(0,0,0,1) 80px,
    rgba(0,0,0,1) calc(100% - 80px),
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0,
    rgba(0,0,0,1) 80px,
    rgba(0,0,0,1) calc(100% - 80px),
    transparent 100%);
}

/* ───────────────────────────────────────────────────────────────────────
   MIST CANVAS — faixa de blobs orgânicos steel + wine na base da página
   (réplica do #faq-mist-canvas da landing). Pintado uma única vez por
   load/resize. Footer (z:5) renderiza por cima.
   ─────────────────────────────────────────────────────────────────────── */
#legal-mist-canvas {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 200px;
  pointer-events: none;
  z-index: 1;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0,
    rgba(0,0,0,1) 40px,
    rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0,
    rgba(0,0,0,1) 40px,
    rgba(0,0,0,1) 100%);
}

/* ───────────────────────────────────────────────────────────────────────
   HEADER ILHA FLUTUANTE — idêntico ao da landing
   ─────────────────────────────────────────────────────────────────────── */
header, nav {
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: none; box-shadow: none;
  pointer-events: none; width: 100%; padding: 0;
}

#nav-sticky-helper {
  position: sticky; top: 0; height: 0; z-index: 100; pointer-events: none;
}
#nav-sticky-helper nav {
  position: fixed;
  top: 17px; left: 12px; right: 12px;
  width: calc(100% - 24px); max-width: none;
}

.header-island {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: auto;
  padding: 13px 22px;
  line-height: normal;
  background: rgba(253,250,247,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 20px;
  box-shadow:
    0 2px 0px rgba(255,255,255,0.70),
    0 8px 28px rgba(24,16,14,0.11),
    0 1px 0 rgba(255,255,255,0.90) inset,
    0 -1px 0 rgba(0,0,0,0.06) inset;
  position: relative; overflow: clip;
}
.nav-links-desktop { overflow: visible; }
.header-island::before {
  content: ''; position: absolute;
  top: 0; left: 5%; right: 5%; height: 46%;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.38) 0%,
    rgba(255,255,255,0.10) 60%,
    transparent 100%);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  pointer-events: none; z-index: 2;
}
.header-island::after {
  content: ''; position: absolute; inset: 0;
  background: var(--wine-pale); opacity: 0.10;
  pointer-events: none; z-index: 0;
}
.header-island > * { position: relative; z-index: 3; pointer-events: auto; }

.nav-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px; color: var(--ink);
  text-decoration: none; letter-spacing: -0.02em;
  line-height: normal;
}
.nav-logo span { color: var(--wine); }

.nav-links-desktop {
  display: flex; gap: 36px; list-style: none; align-items: center;
  pointer-events: auto;
}
.nav-links-desktop a {
  font-size: 14px; font-weight: 400;
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s, transform 0.15s;
  display: inline-block; will-change: transform;
  text-shadow: 0 2px 6px rgba(24,16,14,0.10);
}
.nav-links-desktop a:hover { color: var(--ink); transform: scale(1.05); }

.nav-cta {
  background: var(--wine) !important;
  color: var(--white) !important;
  padding: 9px 19px;
  border-radius: 100px;
  font-weight: 500 !important;
  font-size: 14px !important;
  display: inline-block !important;
  transition: background 0.2s, transform 0.15s !important;
  box-shadow: 0 4px 18px rgba(168,85,104,0.45), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.nav-cta:hover { background: var(--wine-dark) !important; transform: scale(1.05) !important; }

/* ── Mobile menu overlay ── */
.nav-links {
  display: none; list-style: none; align-items: center;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; opacity: 0; z-index: 200;
}
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s, transform 0.15s;
}
.nav-links a:hover { color: var(--ink); transform: scale(1.05); }

#nav-close { display: none; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 0; z-index: 200;
}
.nav-hamburger span {
  display: block; width: 14px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-links-desktop { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(253,250,247,0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: none;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 0; z-index: 150;
    opacity: 0; pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex !important;
    box-shadow:
      0 2px 0px rgba(255,255,255,0.70),
      0 10px 36px rgba(24,16,14,0.13),
      0 1px 0 rgba(255,255,255,0.90) inset,
      0 -1px 0 rgba(0,0,0,0.05) inset;
    overflow: hidden;
  }
  .nav-links::before {
    content: ''; position: absolute;
    top: 0; left: 5%; right: 5%; height: 80px;
    background: linear-gradient(180deg,
      rgba(255,255,255,0.30) 0%,
      rgba(255,255,255,0.08) 60%,
      transparent 100%);
    border-radius: 0 0 60% 60% / 0 0 100% 100%;
    pointer-events: none; z-index: 2;
  }
  .nav-links.open {
    opacity: 1; pointer-events: all; transform: translateY(0);
  }
  #nav-close {
    display: flex; position: absolute;
    top: 19px; right: 23px;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    z-index: 10; padding: 0; opacity: 0;
    transition: opacity 0.2s ease;
  }
  .nav-links.open #nav-close { opacity: 1; }
  #nav-close span {
    position: absolute; width: 18px; height: 2px;
    background: var(--ink); border-radius: 2px;
    transition: background 0.2s;
  }
  #nav-close span:nth-child(1) { transform: rotate(45deg); }
  #nav-close span:nth-child(2) { transform: rotate(-45deg); }
  #nav-close:hover span { background: var(--wine); }
  .nav-links li {
    list-style: none; width: 100%;
    border-bottom: 1px solid rgba(24,16,14,0.06);
    position: relative; z-index: 3;
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block; padding: 18px 32px;
    font-size: 15px; font-weight: 500;
    color: var(--ink); text-decoration: none;
    transition: background 0.18s, color 0.18s;
    text-align: left;
  }
  .nav-links a:hover { background: var(--wine-pale); color: var(--ink-soft); }
  .nav-links .nav-cta {
    font-size: 15px !important; font-weight: 500 !important;
    padding: 18px 32px !important;
    border-radius: 0 !important;
    background: none !important;
    color: var(--wine) !important;
    box-shadow: none !important;
    text-align: left !important;
    display: block !important;
  }
  .nav-links .nav-cta:hover { background: var(--wine-pale) !important; }
}

@media (max-width: 580px) {
  #nav-sticky-helper nav {
    top: 10px; left: 12px; right: 12px;
    width: calc(100% - 24px);
  }
  .header-island { padding: 10px 15px; border-radius: 17px; }
}

/* ───────────────────────────────────────────────────────────────────────
   CONTEÚDO (texto legal sobre a grade)
   ─────────────────────────────────────────────────────────────────────── */
.legal-main {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: 130px 24px 96px;
}

.eyebrow {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--wine); margin-bottom: 14px;
}
.legal-main h1 {
  font-family: var(--serif), Georgia, serif;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.1; letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
  margin-top: -8px;
  margin-bottom: 36px;
  text-align: left;
  filter: drop-shadow(0 2px 10px rgba(168,85,104,0.10)) drop-shadow(0 1px 3px rgba(24,16,14,0.06));
  position: relative;
}
.legal-main h1 em {
  color: var(--wine); font-style: italic;
}

.updated {
  font-size: 13px; color: var(--ink-muted);
  margin-bottom: 44px;
}

.legal-main h2 {
  font-family: var(--serif), Georgia, serif;
  font-size: 28px; line-height: 1.18;
  font-weight: 700; letter-spacing: -0.012em;
  color: var(--ink);
  margin-top: 52px; margin-bottom: 14px;
}
.legal-main h2 .num {
  color: var(--wine); font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: block; margin-bottom: 8px;
}

.legal-main h3 {
  font-family: var(--sans);
  font-size: 15px; font-weight: 700;
  color: var(--ink); margin-top: 24px; margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.legal-main p {
  font-size: 15px; line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.legal-main p strong { color: var(--ink); font-weight: 600; }
.legal-main a {
  color: var(--wine); text-decoration: none;
  transition: color .15s;
}
.legal-main a:hover {
  color: var(--wine-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}

.legal-main ul {
  margin: 6px 0 20px;
  padding-left: 22px;
  list-style: none;
}
.legal-main ul li {
  font-size: 15px; line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 10px;
  position: relative;
  padding-left: 4px;
}
.legal-main ul li::before {
  content: '';
  position: absolute;
  left: -16px; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wine);
  opacity: 1;
}

/* Callout — glassmorphism sutil sobre a grade */
.callout {
  background: rgba(253,250,247,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.55);
  border-left: 3px solid var(--wine);
  padding: 18px 22px;
  border-radius: 0 16px 16px 0;
  margin: 18px 0 26px;
  font-size: 14px; line-height: 1.65;
  color: var(--ink-soft);
  box-shadow:
    0 2px 0px rgba(255,255,255,0.70),
    0 6px 18px rgba(24,16,14,0.06),
    0 1px 0 rgba(255,255,255,0.90) inset;
}
.callout strong { color: var(--ink); }

/* Tabela */
.legal-main table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 24px;
  background: rgba(253,250,247,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 2px 0px rgba(255,255,255,0.70),
    0 6px 18px rgba(24,16,14,0.06);
}
.legal-main th, .legal-main td {
  text-align: left; padding: 11px 16px;
  border-bottom: 1px solid rgba(24,16,14,0.06);
  vertical-align: top;
  color: var(--ink-soft);
}
.legal-main th {
  background: rgba(237,229,216,0.40);
  font-weight: 500; color: var(--ink);
  font-size: 12px; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.legal-main tr:last-child td { border-bottom: none; }

@media (max-width: 580px) {
  .legal-main { padding: 100px 20px 72px; }
  .legal-main h1 { margin-top: -6px; margin-bottom: 28px; }
  .legal-main h2 { font-size: 22px; margin-top: 42px; }
  .legal-main p, .legal-main ul li { font-size: 15px; }
  .legal-main table { font-size: 14px; }
  .legal-main th, .legal-main td { padding: 9px 11px; }
}

/* ───────────────────────────────────────────────────────────────────────
   FOOTER — idêntico ao da landing (orelha + WhatsApp pill + copyright)
   ─────────────────────────────────────────────────────────────────────── */
#site-footer {
  position: relative;
  z-index: 5;
  width: 100%;
  font-family: var(--sans);
  isolation: isolate;
  margin-top: auto;
  padding-top: 35px;
  height: 150px;
  flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: transparent; border: none; box-shadow: none;
  overflow: visible;
}

#footer-shape {
  position: absolute;
  top: -32px; left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
#footer-blur-layer {
  position: absolute;
  top: -32px; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}
#site-footer > *:not(#footer-blur-layer):not(#footer-shape) {
  position: relative; z-index: 2;
}

/* Barra inferior */
.footer-bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 32px;
  border-top: 1px solid #F7F2EA;
  height: 44px;
}
.footer-copy {
  font-family: var(--sans); font-size: 12px; font-weight: 300;
  letter-spacing: 0.05em; color: var(--ivory); white-space: nowrap;
}
.footer-copy strong { color: var(--ivory); font-weight: 500; }
.footer-copy-highlight {
  font-weight: 500; color: var(--ivory); letter-spacing: 0.03em;
}
.footer-legal-links {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.04em; white-space: nowrap;
}
.footer-legal-links a {
  color: var(--ivory); text-decoration: none; opacity: 0.88;
  transition: opacity 0.18s;
}
.footer-legal-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal-links .sep { color: var(--ivory); opacity: 0.45; }

/* WhatsApp pill acima da linha */
.footer-wa-wrap {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  flex: 1; margin-bottom: 15px;
}
.footer-wa-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #5c4a3a);
  background: rgba(253,250,247,0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.60);
  padding: 6px 14px; border-radius: 100px;
  box-shadow: 0 2px 8px rgba(24,16,14,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-wa-pill:hover { transform: scale(1.06); }
.footer-wa-pill svg { flex-shrink: 0; }

@media (max-width: 580px) {
  .footer-bar { padding: 0 16px; gap: 10px; }
  .footer-copy { letter-spacing: 0.03em; }
  .footer-legal-links { gap: 10px; }
  .footer-copy-extra { display: none; }
}

