/* ------------------------------------------------------------------
   Identidade visual AdvoFind (2026) para as páginas do site.

   Mesmos valores do tema do app (lib/theme/app_theme.dart): vermelho
   #A22414, fundo #F5F5F5, cards brancos com borda de 2px #E5E5E5,
   fonte Manrope e visual chapado (sem sombra, gradiente ou vidro).
   O modo escuro segue o app: fundo #121212, cards #1C1C1C, vermelho
   #E5574A. Ativado pela classe `dark` no <html>, aplicada antes da
   primeira pintura por cada página (escolha salva em localStorage
   "theme" ou, sem escolha, a preferência do sistema).

   Escala de raio: pílulas 999px · botões/campos 8px · cards 16px.
   ------------------------------------------------------------------ */
:root {
  color-scheme: light;

  /* Marca */
  --brand: #a22414;          /* CTA; branco sobre ele = 8,3:1 */
  --brand-active: #7e1b0f;   /* :active / hover */
  --brand-ink: #a22414;      /* texto vermelho sobre fundo claro */
  --brand-wash: #ffe6e6;     /* tags e superfícies tingidas */
  --brand-wash-2: #fff0ed;
  --on-brand: #ffffff;

  /* Superfícies */
  --canvas: #f5f5f5;         /* fundo da página */
  --surface: #ffffff;        /* cards, cabeçalho */
  --surface-soft: #ffffff;   /* seções alternadas */
  --surface-strong: #f2f2f2; /* preenchimentos (campos de busca, trilhos) */

  /* Texto */
  --ink: #000000;
  --body: #2b2b2b;
  --muted: #686868;

  /* Bordas */
  --hairline: #e5e5e5;
  --hairline-soft: #ededed;
  --border-w: 2px;

  /* Semânticas */
  --success: #2e7d32;
  --success-wash: #dcf1dd;
  --error: #b3261e;
  --error-wash: #f9dedc;
  --rating: #ffb300;

  --r-pill: 999px;
  --r-btn: 8px;
  --r-card: 16px;
  --r-device: 34px;

  --font: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html.dark {
  color-scheme: dark;

  --brand: #e5574a;
  --brand-active: #cf4538;
  --brand-ink: #e5574a;      /* 4,9:1 sobre #121212 */
  --brand-wash: #3a1d19;
  --brand-wash-2: #3a1e1a;
  --on-brand: #ffffff;

  --canvas: #121212;
  --surface: #1c1c1c;
  --surface-soft: #1c1c1c;
  --surface-strong: #2a2a2a;

  --ink: #f2f2f2;
  --body: #d9d9d9;
  --muted: #a8a8a8;

  --hairline: #2e2e2e;
  --hairline-soft: #262626;

  --success: #7bd787;
  --success-wash: #16431c;
  --error: #f2b8b5;
  --error-wash: #8c1d18;
  --rating: #ffc233;
}

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

html { background: var(--canvas); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand-wash); color: var(--ink); }

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

/* ------------------------------------------------------------------
   Páginas internas (suporte, privacidade, avaliação, instalar, excluir
   conta): cabeçalho branco com logo e tema, conteúdo em cards sobre o
   fundo cinza — o mesmo arranjo das telas do app.
   ------------------------------------------------------------------ */
.af-page { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.55; }

.af-top {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: var(--border-w) solid var(--hairline);
}
.af-top-in {
  max-width: 880px; margin: 0 auto; height: 64px;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 16px;
}
.af-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; }
.af-brand img { width: 32px; height: 32px; border-radius: var(--r-btn); background: #fff; display: block; }
.af-brand span { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }

/* Interruptor de tema: marcado = escuro (igual à página inicial). */
.af-theme { display: flex; align-items: center; gap: 8px; }
.af-theme svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s var(--ease); }
.af-theme .af-sun { opacity: 1; }
.af-theme .af-moon { opacity: .4; }
html.dark .af-theme .af-sun { opacity: .4; }
html.dark .af-theme .af-moon { opacity: 1; }
.af-switch { position: relative; display: inline-flex; cursor: pointer; }
.af-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.af-switch .track {
  width: 42px; height: 24px; border-radius: var(--r-pill); position: relative; display: inline-block;
  background: var(--surface-strong); border: var(--border-w) solid var(--hairline);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.af-switch .thumb {
  position: absolute; top: 1px; left: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform .22s var(--ease), background .2s var(--ease);
}
.af-switch input:checked + .track { background: var(--brand); border-color: var(--brand); }
.af-switch input:checked + .track .thumb { transform: translateX(18px); background: var(--on-brand); }
.af-switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.af-main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) 16px 48px; }
.af-main h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.6px; font-weight: 800; color: var(--ink); }
.af-main h2 { margin: 28px 0 10px; font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.af-main h3 { margin: 20px 0 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
.af-main p, .af-main li { color: var(--body); }
.af-main a { color: var(--brand-ink); }
.af-lead { margin: 0 0 24px; font-size: 17px; color: var(--muted); }
.af-muted { color: var(--muted); }

.af-card {
  background: var(--surface);
  border: var(--border-w) solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(20px, 3.5vw, 32px);
}
.af-card + .af-card { margin-top: 16px; }

.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-btn); border: var(--border-w) solid transparent;
  background: var(--brand); color: var(--on-brand);
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.af-main a.af-btn { color: var(--on-brand); }
.af-btn:hover { background: var(--brand-active); }
.af-btn:disabled { opacity: .5; cursor: not-allowed; }
.af-btn-outline { background: var(--surface); color: var(--ink); border-color: var(--hairline); }
.af-main a.af-btn-outline { color: var(--ink); }
.af-btn-outline:hover { background: var(--surface); border-color: var(--ink); }

.af-field { display: block; margin-bottom: 16px; }
.af-field > span, .af-label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 500; color: var(--ink); }
.af-input,
.af-field input, .af-field textarea, .af-field select {
  width: 100%; box-sizing: border-box;
  min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface);
  border: var(--border-w) solid var(--hairline);
  border-radius: var(--r-btn);
  transition: border-color .18s var(--ease);
}
.af-input::placeholder,
.af-field input::placeholder, .af-field textarea::placeholder { color: var(--muted); }
.af-input:focus,
.af-field input:focus, .af-field textarea:focus, .af-field select:focus { outline: none; border-color: var(--brand); }

.af-back {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  color: var(--brand-ink); font-weight: 600; text-decoration: none;
}
.af-main a.af-back { color: var(--brand-ink); }
.af-back:hover { text-decoration: underline; }

.af-foot { border-top: var(--border-w) solid var(--hairline); background: var(--surface); }
.af-foot-in {
  max-width: 880px; margin: 0 auto; padding: 20px 16px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted);
}
.af-foot a { color: var(--muted); }
.af-foot a:hover { color: var(--ink); }
