/* Better Nuvio: base compartilhada por index.html e instalar.html.
 *
 * Tema: segue o sistema (escuro por padrão, claro em prefers-color-scheme: light).
 * Destaque único: o violeta do ícone. O botão principal é a pílula clara, como o
 * foco branco do app v4.
 * Formas: interativo = pílula; painéis = 20px; campos e blocos internos = 12px.
 * Camadas: cabeçalho fixo z-index 10; nada mais usa z-index.
 */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark light;
  --bg: #0c0b10;
  --bg-raised: #14131a;
  --bg-sunken: #09080c;
  --line: rgb(255 255 255 / .08);
  --line-strong: rgb(255 255 255 / .16);
  --text: #f2f1f5;
  --soft: #cdcbd6;
  --muted: #9d9aab;
  --accent: #a597ff;
  --accent-soft: rgb(165 151 255 / .14);
  --cta-bg: #f2f1f5;
  --cta-ink: #0c0b10;
  --shadow: 0 30px 80px -30px rgb(40 24 120 / .55);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --page: min(1200px, calc(100% - 40px));
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f8;
    --bg-raised: #ffffff;
    --bg-sunken: #ececf1;
    --line: rgb(22 20 32 / .09);
    --line-strong: rgb(22 20 32 / .18);
    --text: #16151c;
    --soft: #3c3a47;
    --muted: #5e5b6b;
    --accent: #5a45d6;
    --accent-soft: rgb(90 69 214 / .1);
    --cta-bg: #16151c;
    --cta-ink: #f5f5f8;
    --shadow: 0 30px 70px -34px rgb(60 40 160 / .35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
code { font: .86em/1.5 ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
strong { font-weight: 600; color: var(--text); }
a strong { color: inherit; }
.wrap { width: var(--page); margin-inline: auto; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Cabeçalho */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.top.scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .94rem; }
.top nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; transition: color .2s, background-color .2s;
}
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--accent-soft); }
.top nav .lang { margin-left: 6px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; white-space: nowrap;
  font: inherit; font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid var(--line-strong);
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s var(--ease);
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn-primary { color: var(--cta-ink); background: var(--cta-bg); border-color: transparent; }
.btn-primary:hover { border-color: transparent; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: scale(.97); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }

/* Títulos de seção */
.section { padding: clamp(72px, 10vw, 128px) 0 0; }
.section-title { margin: 0 0 clamp(28px, 4vw, 44px); font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; max-width: 20ch; }
.lead { margin: 0; color: var(--soft); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; max-width: 52ch; }

/* Rodapé */
footer.site-footer { margin-top: clamp(80px, 10vw, 128px); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 32px 0 44px; color: var(--muted); font-size: .9rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* Revelação ao rolar (só com movimento permitido; sem JS tudo aparece). */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

@media (max-width: 640px) {
  :root { --page: calc(100% - 32px); }
  .top nav { font-size: .9rem; gap: 0; }
  .top nav a { padding: 8px 9px; }
  .top nav .hide-sm { display: none; }
  .top nav .label-sm { display: none; }
}
@media (max-width: 380px) {
  .top nav .hide-xs { display: none; }
}
