/* NutriLens — site institucional
   Paleta e tipografia espelham src/constants/theme.ts do app, para quem chega
   da loja reconhecer o produto. Ao mexer em cores aqui, confira lá. */

:root {
  --bg:          #0C0F0A;
  --surface:     #141A10;
  --card:        #1F2B1A;
  --accent:      #84CC16;
  --accent-dark: #4D7C0F;
  --accent-soft: #1A2E0A;
  --text:        #F0F4EC;
  --text-sub:    #A8B49A;
  --text-muted:  #5C6B50;
  --border:      #2A3525;
  --inverse:     #0C0F0A;

  --plan-free:    #5C6B50;
  --plan-basic:   #60A5FA;
  --plan-premium: #F59E0B;
  --plan-annual:  #A78BFA;

  --largura: 1080px;
  --gutter: 20px;
  --radio: 16px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Bitter, Georgia, 'Times New Roman', serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #A3E635; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.envolucro { width: 100%; max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Topo ─────────────────────────────────────────────────────────────────── */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 15, 10, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topo .envolucro { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.marca img { width: 32px; height: 32px; display: block; }
.menu { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.menu a { color: var(--text-sub); text-decoration: none; font-size: .95rem; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent); }
.idiomas { display: flex; gap: 6px; align-items: center; font-size: .82rem; }
.idiomas a { color: var(--text-muted); text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.idiomas a[aria-current="true"] { color: var(--inverse); background: var(--accent); font-weight: 700; }

/* ── Blocos ───────────────────────────────────────────────────────────────── */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.olho { color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 12px; }
.chamada { font-size: 1.12rem; color: var(--text-sub); max-width: 62ch; }

.heroi { padding: 64px 0 72px; text-align: center; background: radial-gradient(60% 55% at 50% 0%, #16230C 0%, var(--bg) 70%); }
.heroi img.icone { width: 112px; height: 112px; margin-bottom: 22px; }
.heroi p { margin-left: auto; margin-right: auto; }

/* ── Botões ───────────────────────────────────────────────────────────────── */
.lojas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 10px; }
.botao {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 12px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit;
}
.botao-principal { background: var(--accent); color: var(--inverse); }
.botao-principal:hover { background: #A3E635; color: var(--inverse); }
.botao-vazado { background: transparent; color: var(--text); border-color: var(--border); }
.botao-vazado:hover { border-color: var(--accent); color: var(--accent); }
.nota-lojas { font-size: .85rem; color: var(--text-muted); margin-top: 6px; }

/* ── Grades ───────────────────────────────────────────────────────────────── */
.grade { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 32px; }
.cartao { background: var(--card); border: 1px solid var(--border); border-radius: var(--radio); padding: 24px; }
.cartao h3 { margin-bottom: .35em; }
.cartao p:last-child { margin-bottom: 0; }
.cartao .emoji { font-size: 1.9rem; display: block; margin-bottom: 10px; line-height: 1; }

.passos { counter-reset: passo; }
.passos .cartao { position: relative; }
.passos .cartao::before {
  counter-increment: passo; content: counter(passo);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-dark);
  font-weight: 700; font-size: .95rem; margin-bottom: 12px;
}

/* ── Planos ───────────────────────────────────────────────────────────────── */
.planos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 32px; align-items: start; }
.plano { background: var(--card); border: 1px solid var(--border); border-radius: var(--radio); padding: 24px; }
.plano.destaque { border-color: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent-dark); }
/* Selos em classe, e não em style="" no HTML: é o que permite à CSP exigir
   style-src 'self' sem 'unsafe-inline'. Ver nginx.conf. */
.plano .selo { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.selo-free    { background: #232B1E; color: var(--plan-free); }
.selo-basic   { background: #13233A; color: var(--plan-basic); }
.selo-premium { background: #32240B; color: var(--plan-premium); }
.selo-annual  { background: #170D35; color: var(--plan-annual); }
.plano h3 { margin-bottom: .2em; }
.plano ul { list-style: none; padding: 0; margin: 16px 0 0; }
.plano li { padding: 7px 0 7px 26px; position: relative; font-size: .95rem; color: var(--text-sub); border-top: 1px solid var(--border); }
.plano li:first-child { border-top: none; }
.plano li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plano li.nao { color: var(--text-muted); }
.plano li.nao::before { content: '—'; color: var(--text-muted); }

/* ── Compartilhar ─────────────────────────────────────────────────────────── */
.compartilhar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.campo-link {
  display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 8px 8px 16px;
}
.campo-link code { color: var(--text-sub); font-size: .9rem; word-break: break-all; }
.campo-link button { margin-left: auto; }

/* ── Rodapé ───────────────────────────────────────────────────────────────── */
.rodape { border-top: 1px solid var(--border); padding: 48px 0 40px; color: var(--text-muted); font-size: .9rem; }
.rodape-grade { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 28px; }
.rodape a { color: var(--text-sub); text-decoration: none; }
.rodape a:hover { color: var(--accent); }
.rodape ul { list-style: none; padding: 0; margin: 0; }
.rodape li { margin-bottom: 8px; }
.rodape h3 { font-family: inherit; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.rodape-sobre { margin-top: 12px; max-width: 34ch; }

/* ── Aviso médico ─────────────────────────────────────────────────────────── */
.aviso {
  background: var(--accent-soft); border: 1px solid var(--accent-dark);
  border-radius: var(--radio); padding: 20px 24px; margin-top: 32px;
}
.aviso p { margin: 0; color: var(--text-sub); font-size: .95rem; }
.aviso strong { color: var(--text); }

/* ── Página /baixar ───────────────────────────────────────────────────────── */
/* Centralizada e curta: na maioria das visitas ela só pisca antes de a loja
   abrir. O que importa é o conteúdo estar visível se o redirecionamento falhar. */
.redirecionando {
  min-height: 100vh; display: flex; align-items: center; text-align: center;
  padding: 48px 0; background: radial-gradient(60% 55% at 50% 0%, #16230C 0%, var(--bg) 70%);
}
.redirecionando img { margin: 0 auto 20px; display: block; }
.redirecionando .chamada { margin-left: auto; margin-right: auto; }
.redirecionando .lojas { margin-top: 28px; }

/* ── Páginas legais ───────────────────────────────────────────────────────── */
.legal { padding: 56px 0 72px; }
.legal .envolucro { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: .25em; }
.legal h2 { font-size: 1.3rem; margin: 2.2em 0 .6em; scroll-margin-top: 80px; }
.legal h3 { font-size: 1.05rem; margin: 1.6em 0 .4em; }
.legal li { margin-bottom: .5em; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal .data { color: var(--text-muted); font-size: .9rem; margin-bottom: 2em; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal th { background: var(--surface); color: var(--text); font-weight: 700; }
.legal td { color: var(--text-sub); }
.sumario { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radio); padding: 20px 24px; margin-bottom: 2.5em; }
.sumario h2 { margin: 0 0 .6em; font-size: 1rem; font-family: inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.sumario ol { margin: 0; color: var(--text-sub); }
.sumario a { text-decoration: none; }
.sumario a:hover { text-decoration: underline; }

/* ── Responsivo ───────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .topo .envolucro { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .menu { gap: 14px; width: 100%; margin-left: 0; }
  .lojas .botao { width: 100%; justify-content: center; }
  .campo-link button { margin-left: 0; width: 100%; justify-content: center; }
}

/* O site é escuro por natureza da marca; respeitamos quem força tema claro
   apenas no contraste do texto, sem inverter a identidade. */
@media (prefers-contrast: more) {
  :root { --text-sub: #C8D4BA; --text-muted: #8A9880; --border: #44533C; }
}
