/* =====================================================================
   QuestVerse: Páginas legais (Privacidade / Exclusão de conta)
   Tema visual fiel ao app: identidade "arcana", dark mode, tokens de cor
   por Universo (multiverso interativo). HTML/CSS puro, sem build.

   Tokens espelham o app real:
   - Paleta padrão "Arcano Dourado": mobile/src/providers/ThemeProvider.tsx
   - Tipografia (Space Grotesk + Manrope): mobile/src/theme/typography.ts
   ===================================================================== */

/* ---- Universo padrão: Arcano Dourado (dark) ------------------------- */
:root,
:root[data-universe="arcano"] {
  --bg: #1a1a2e;
  --surface: #16213e;
  --surface2: #1d2a4d;
  --surface3: #24345f;
  --primary: #e2b96f;          /* dourado */
  --accent: #c084fc;           /* roxo */
  --text: #f0f0f0;
  --secondary: #a0a0b0;
  --muted: #c7c9d6;
  --border: #2a2a4a;
  --success: #22c55e;
  --error: #ef4444;
  --on-primary: #1a1a2e;
  --primary-soft: rgba(226, 185, 111, 0.15);
  --accent-soft: rgba(192, 132, 252, 0.16);
  --glow-a: rgba(226, 185, 111, 0.20);   /* brilho radial superior (primary) */
  --glow-b: rgba(192, 132, 252, 0.18);   /* brilho radial inferior (accent) */
}

/* ---- Universo: Espacial (azul profundo / ciano), ilustrativo ------- */
:root[data-universe="espacial"] {
  --bg: #0b1026;
  --surface: #131a3a;
  --surface2: #1a2350;
  --surface3: #233066;
  --primary: #38bdf8;          /* ciano */
  --accent: #a78bfa;           /* violeta */
  --text: #eaf2ff;
  --secondary: #93a4c9;
  --muted: #c2cee8;
  --border: #25305c;
  --success: #34d399;
  --error: #fb7185;
  --on-primary: #06122a;
  --primary-soft: rgba(56, 189, 248, 0.15);
  --accent-soft: rgba(167, 139, 250, 0.16);
  --glow-a: rgba(56, 189, 248, 0.20);
  --glow-b: rgba(167, 139, 250, 0.18);
}

/* ---- Universo: Terror (carmim / verde tóxico), ilustrativo --------- */
:root[data-universe="terror"] {
  --bg: #140b0f;
  --surface: #1f1115;
  --surface2: #2a161b;
  --surface3: #371d23;
  --primary: #e11d48;          /* carmim */
  --accent: #84cc16;           /* verde tóxico */
  --text: #f4e9ea;
  --secondary: #b58e94;
  --muted: #d8c2c6;
  --border: #3a1f26;
  --success: #84cc16;
  --error: #f43f5e;
  --on-primary: #1a0309;
  --primary-soft: rgba(225, 29, 72, 0.15);
  --accent-soft: rgba(132, 204, 22, 0.16);
  --glow-a: rgba(225, 29, 72, 0.20);
  --glow-b: rgba(132, 204, 22, 0.16);
}

/* ---- Reset / base --------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Transição suave ao trocar de Universo. */
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ---- Auras radiais decorativas (como ScreenBackground do app) ------- */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(8px);
  transition: background 0.35s ease;
}
body::before {            /* aura primary, canto superior direito */
  top: -18vh;
  right: -22vw;
  width: 86vw;
  height: 70vh;
  background: radial-gradient(closest-side ellipse, var(--glow-a), transparent 72%);
}
body::after {             /* aura accent, canto inferior esquerdo */
  bottom: -20vh;
  left: -20vw;
  width: 84vw;
  height: 64vh;
  background: radial-gradient(closest-side ellipse, var(--glow-b), transparent 72%);
}

/* ---- Layout --------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* ---- Cabeçalho / marca ---------------------------------------------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand__sigil {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  font-size: 22px;
  box-shadow: 0 0 18px 1px var(--glow-a);
}
.brand__name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.3px;
  color: var(--primary);
}
.brand__sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary);
}

/* ---- Alternador de Universo (chips/pílulas) ------------------------- */
.universe-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.universe-switch__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--secondary);
  margin-right: 2px;
}
.chip {
  appearance: none;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  transition: all 0.2s ease;
}
.chip:hover { color: var(--text); border-color: var(--primary); }
.chip[aria-pressed="true"] {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 14px 1px var(--glow-a);
}

/* ---- Hero ----------------------------------------------------------- */
.hero { margin-bottom: 26px; }
.hero h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--text);
}
.hero h1 .accent { color: var(--primary); }
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

/* ---- Cartões / seções ----------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  margin: 0 0 12px;
  color: var(--text);
  scroll-margin-top: 20px;
}
.card h3 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin: 18px 0 6px;
  color: var(--primary);
}
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card a:not(.btn) { color: var(--primary); text-decoration: none; border-bottom: 1px solid transparent; }
.card a:not(.btn):hover { border-bottom-color: var(--primary); }

.card ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.card li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--muted);
}
.card li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-size: 12px;
}
.card li strong { color: var(--text); font-weight: 700; }

/* ---- Sumário (TOC) -------------------------------------------------- */
.toc { background: var(--surface2); }
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
}
.toc li { margin-bottom: 6px; color: var(--muted); padding-left: 4px; }
.toc li::before { content: none; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--primary); }

/* ---- Selo de aviso (callout) ---------------------------------------- */
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.callout--warn { background: var(--primary-soft); border-left-color: var(--primary); }
.callout--danger { background: rgba(239, 68, 68, 0.12); border-left-color: var(--error); }
.callout__icon { font-size: 20px; line-height: 1.4; }
.callout p { margin: 0; color: var(--text); }

/* ---- Badge de data / meta ------------------------------------------- */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
}

/* ---- Botão de ação -------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--on-primary);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 14px;
  padding: 13px 26px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-shadow: 0 0 14px 1px var(--glow-a);
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--primary); }

/* ---- Linha de ações: botões lado a lado que empilham com espaçamento -- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Passos numerados ----------------------------------------------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
  color: var(--muted);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
}

/* ---- Rodapé --------------------------------------------------------- */
.footer {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--secondary);
  font-size: 13px;
}
.footer a { color: var(--secondary); text-decoration: none; }
.footer a:hover { color: var(--primary); }
.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Responsivo ----------------------------------------------------- */
@media (max-width: 640px) {
  .page { padding: 22px 16px 64px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .toc ol { columns: 1; }
  .card { padding: 18px; }
}

/* ---- Cards de navegação (Home) -------------------------------------- */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.nav-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--glow-a);
}
.nav-card__icon { font-size: 32px; line-height: 1; }
.nav-card__title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--primary);
}
.nav-card__desc { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---- Acessibilidade: respeita preferência de menos movimento -------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
