/*
 * Identidade ServoBom nas páginas estáticas do site (/comecar, /assinar,
 * /privacidade, /excluir-conta). Mesmos tokens do app (lib/core/theme) e
 * de docs/servobom/README.md: fundo quase preto, verde #2FE57A com tinta
 * escura por cima, Sora nos títulos, Manrope no resto, superfícies chapadas
 * com borda de 1px e a escala de raios 8/14/16/20/24/28/999.
 */

@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0c0b;
  --surface: #131715;
  --raised: #1b201d;
  --border: #262d29;
  --border-strong: #333b36;
  --green-300: #6cf2a4;
  --green: #2fe57a;
  --green-500: #1dc463;
  --green-ink: #0f2a1b;
  --ink: #06130b;
  --text: #f3f6f4;
  --text-2: #a6b0aa;
  --text-3: #838d87;
  --disabled: #5c655f;
  --warn: #ffc24d;
  --error: #ff6b6b;
  --display: "Sora", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-chip: 8px;
  --r-control: 14px;
  --r-card: 16px;
  --r-block: 20px;
  --r-panel: 24px;
  --r-hero: 28px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scrollbar-color: var(--border-strong) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--green);
}

::selection {
  background: var(--green);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid var(--bg);
  border-radius: 999px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--green-300);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.sb-num {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- topo ---------- */

.sb-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sb-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}
.sb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.035em;
}
.sb-brand:hover {
  color: var(--text);
}
.sb-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
}
.sb-top-link {
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.sb-top-link:hover {
  color: var(--text);
}

/* Celular estreito: o nome do app continua ao lado do emblema, e quem
   cede espaço é o resto do topo. */
@media (max-width: 430px) {
  .sb-top-inner {
    gap: 10px;
    padding: 0 14px;
  }
  .sb-brand {
    gap: 8px;
    font-size: 1rem;
  }
  .sb-brand img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .sb-top-link {
    white-space: nowrap;
  }
}

/* ---------- botões ---------- */

.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--r-control);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: 700 1rem/1.25 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    color 0.18s var(--ease-out);
}
.sb-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.sb-btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.sb-btn-primary:hover {
  background: var(--green-300);
  border-color: var(--green-300);
  color: var(--ink);
}
.sb-btn-primary:active {
  background: var(--green-500);
  border-color: var(--green-500);
}
.sb-btn[disabled],
.sb-btn[aria-disabled="true"] {
  background: var(--raised);
  border-color: var(--border);
  color: var(--disabled);
  cursor: not-allowed;
}

/* ---------- rodapé ---------- */

.sb-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px 48px;
  color: var(--text-3);
  font-size: 0.875rem;
}
.sb-footer-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.sb-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.sb-footer a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
}
.sb-footer a:hover {
  color: var(--text);
}

/* ---------- páginas de leitura (privacidade, exclusão de conta) ---------- */

.sb-doc {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 56px 20px 80px;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.sb-doc h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sb-doc .sb-doc-meta {
  margin: 14px 0 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.9375rem;
}
.sb-doc .sb-doc-meta strong {
  color: var(--text-2);
}
.sb-doc h2 {
  margin: 48px 0 12px;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.sb-doc p,
.sb-doc li {
  color: var(--text-2);
  max-width: 68ch;
}
.sb-doc p + p {
  margin-top: 14px;
}
.sb-doc strong {
  color: var(--text);
  font-weight: 700;
}
.sb-doc ul,
.sb-doc ol {
  margin: 12px 0 0;
  padding-left: 1.3em;
}
.sb-doc li {
  margin: 8px 0;
  padding-left: 4px;
}
.sb-doc li::marker {
  color: var(--text-3);
}
.sb-doc .mail {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
}
.sb-doc .sb-callout {
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
}
.sb-doc .sb-callout p {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
