/* ====================================================================
   RB.CSS — Rede Bolha
   Folha de estilo compartilhada das páginas institucionais (app, política
   de privacidade, termos de uso). Usa os mesmos tokens de cor e tipografia
   já estabelecidos no restante do site (dourado sobre fundo escuro,
   Oswald + Cormorant Garamond + Inter), com suporte a tema claro.
   ==================================================================== */

:root {
  --bg: #0A0A0C;
  --bg2: #121013;
  --card: #17151A;
  --card2: #1F1B21;
  --gold: #C9A24B;
  --gold-l: #E7CE8A;
  --gold-d: #9A7A30;
  --txt: #F1ECE3;
  --body: #C6C0B5;
  --dim: #8B8479;
  --line: rgba(201, 162, 75, 0.18);
  --line2: rgba(201, 162, 75, 0.32);
  --ok: #4CA36B;
  --err: #C25B5B;

  --maxw: 1120px;
  --header-h: 74px;
  --radius: 10px;
  --radius-lg: 16px;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Oswald', sans-serif;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #FAF8F4;
  --bg2: #FFFFFF;
  --card: #FFFFFF;
  --card2: #F4EFE5;
  --gold: #8A6A22;
  --gold-l: #B8892E;
  --gold-d: #6B5019;
  --txt: #1E1A14;
  --body: #453F37;
  --dim: #726A5E;
  --line: rgba(138, 106, 34, 0.18);
  --line2: rgba(138, 106, 34, 0.32);

  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

svg { display: block; }

::selection { background: var(--gold-d); color: #0A0A0C; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---- Header ---- */
.topo {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topo-in {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.marca {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--txt);
  flex: 0 0 auto;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  position: relative;
  font-size: 0.9rem;
  color: var(--body);
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold-l);
  transition: width 0.25s ease;
}

.menu a:hover,
.menu a.ativo {
  color: var(--txt);
}

.menu a:hover::after,
.menu a.ativo::after {
  width: 100%;
}

.acoes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.busca {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 0;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

.busca.aberta {
  width: clamp(140px, 30vw, 220px);
  opacity: 1;
  margin-right: 0.35rem;
}

.busca input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  color: var(--txt);
  font-size: 0.85rem;
}

.busca input:focus { border-color: var(--gold); }

.icone {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.icone:hover { border-color: var(--line2); color: var(--gold-l); }
.icone svg { width: 19px; height: 19px; }

#btTema .lua { display: none; }
:root[data-theme="light"] #btTema .sol { display: none; }
:root[data-theme="light"] #btTema .lua { display: block; }

.sanduiche { display: none; }

/* ---- Mobile drawer ---- */
.gaveta {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--bg2);
  border-left: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
  overflow-y: auto;
  z-index: 95;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.gaveta.aberta { transform: translateX(0); }

.gaveta ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gaveta a {
  display: block;
  padding: 0.85rem 0.2rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  color: var(--body);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease;
}

.gaveta a:hover { color: var(--gold-l); }

body.menu-aberto { overflow: hidden; }

body.menu-aberto::after {
  content: '';
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

/* ---- Main / article ---- */
.pagina { padding: 3rem 1.5rem 5rem; }

.coluna { max-width: 760px; margin: 0 auto; }

.migalha {
  font-size: 0.82rem;
  color: var(--dim);
  margin: 0 0 2.2rem;
}

.migalha a { color: var(--gold-l); }
.migalha a:hover { text-decoration: underline; }

.corpo .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.corpo h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--txt);
  font-size: clamp(2.1rem, 5.6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 1.1rem;
}

.corpo .lead {
  font-size: 1.15rem;
  color: var(--body);
  margin: 0 0 2.2rem;
}

.corpo .assinatura {
  font-style: italic;
  color: var(--dim);
  font-size: 0.88rem;
  margin: -1rem 0 2rem;
}

.corpo h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--txt);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin: 2.6rem 0 1.2rem;
}

.corpo h2:first-child { margin-top: 0; }

.corpo p { margin: 0 0 1.2rem; }

.corpo ul,
.corpo ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}

.corpo li { margin-bottom: 0.5rem; }

.corpo strong { color: var(--txt); }

.corpo a {
  color: var(--gold-l);
  text-decoration: underline;
  text-decoration-color: var(--line2);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.corpo a:hover { text-decoration-color: var(--gold-l); }

/* ---- CTA / passo-a-passo (usado em instalar-app.html) ---- */
.cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  margin: 1.8rem 0;
}

.cta h2 {
  margin: 0 0 1.2rem;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.15rem;
  color: var(--gold-l);
}

.cta ol {
  list-style: none;
  counter-reset: passo;
  margin: 0;
  padding: 0;
}

.cta li {
  position: relative;
  padding-left: 2.7rem;
  margin-bottom: 1.1rem;
}

.cta li:last-child { margin-bottom: 0; }

.cta li::before {
  counter-increment: passo;
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-l), var(--gold-d));
  color: #0A0A0C;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Botão ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-l), var(--gold) 55%, var(--gold-d));
  color: #0A0A0C;
  box-shadow: 0 10px 26px -10px rgba(201, 162, 75, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(201, 162, 75, 0.65);
  filter: brightness(1.05);
}

/* ---- Rodapé ---- */
.rodape {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  margin-top: 5rem;
}

.env { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.rodape-grade {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}

.rodape-grade h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--txt);
  margin: 0 0 1.1rem;
}

.rodape-grade ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rodape-grade a { font-size: 0.9rem; color: var(--dim); transition: color 0.2s ease; }
.rodape-grade a:hover { color: var(--gold-l); }

.rodape .marca { display: inline-block; margin-bottom: 0.2rem; }

.redes { display: flex; gap: 0.7rem; margin-top: 1.3rem; }

.redes a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.redes a:hover { border-color: var(--gold); color: var(--gold-l); transform: translateY(-2px); }
.redes svg { width: 17px; height: 17px; }

.creditos {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--dim);
}

.creditos a { color: var(--dim); }
.creditos a:hover { color: var(--gold-l); }

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .menu { display: none; }
  .sanduiche { display: flex; }
  .rodape-grade { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .topo-in { padding: 0 1.1rem; gap: 1rem; }
  .pagina { padding: 2.2rem 1.1rem 3.5rem; }
  .cta { padding: 1.5rem 1.3rem; }
  .rodape-grade { grid-template-columns: 1fr; gap: 2rem; padding: 2.6rem 0 2rem; }
  .creditos { flex-direction: column; text-align: center; }
  .busca.aberta { width: clamp(120px, 46vw, 180px); }
}
