/* ==========================================================
   Vazio. — base (tokens, reset, tipografia, componentes comuns)
   Para mudar a identidade visual, edite só as variáveis abaixo.
   ========================================================== */

:root {
  --bg: #0e0f12;
  --surface: #16171c;
  --surface-2: #1d1e24;
  --ink: #ecebe6;
  --muted: #9b9ba4;
  --line: #2a2b33;
  --accent: #8d9cff;
  --accent-ink: #0e0f12;
  --accent-soft: #1f2340;
  --mode-aquecer: #e8a35c;
  --mode-foco: #8d9cff;
  --mode-pausa: #6cc39d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);

  /* Tokens de tipografia e layout preservados no modo escuro */
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Reset enxuto */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Tipografia */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
}
.display em { font-style: italic; color: var(--accent); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 54ch; }
.mono { font-family: var(--font-mono); }

/* Layout */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Logo */
.logo {
  font-family: var(--font-display);
  font-size: 28px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* Campo de texto */
.input {
  height: 48px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); min-width: 0;
}
.input::placeholder { color: var(--muted); }

/* Cartão */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Botão de tema */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  display: inline-grid; place-items: center;
}
.theme-toggle svg { width: 18px; height: 18px; }

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

/* Link "Entrar / Minha conta" no topo */
.account-link {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  height: 40px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px;
}
.account-link:not(:has(.avatar)) { padding-left: 14px; }
.account-link:hover, .account-link.is-current { border-color: var(--ink); }
.avatar {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px;
}
@media (max-width: 640px) {
  .account-link .acc-txt { display: none; }
  .account-link { padding: 0; width: 40px; justify-content: center; }
  .account-link:not(:has(.avatar))::before { content: ""; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat; }
}

/* ---------- Janela de cadastro rápido (js/cadastro.js) ---------- */
.sheet {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px 22px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}
.sheet::backdrop { background: rgba(10, 10, 16, .45); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.sheet-x:hover { background: var(--surface-2); color: var(--ink); }
.sheet .eyebrow { margin-bottom: 8px; color: var(--accent); }
.sheet-title { font-size: clamp(30px, 6vw, 38px); margin: 0 0 8px; padding-right: 24px; }
.sheet-text { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.sheet-form { display: grid; gap: 12px; }
.sheet-field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.sheet-field small { font-size: 12px; opacity: .8; margin-left: 4px; }
.sheet-field .input { color: var(--ink); }
.input-rect { border-radius: 10px; width: 100%; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 76px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 12px; font-family: var(--font-mono); cursor: pointer; padding: 8px; }
.btn-block { width: 100%; }
.sheet-msg { margin: 0; font-size: 14px; }
.sheet-msg.err { color: #c0392b; }
.sheet-msg.ok { color: var(--mode-pausa); }
:root[data-theme="dark"] .sheet-msg.err { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet-msg.err { color: #ff8a7a; } }
.sheet-legal { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.sheet-legal a { color: inherit; }
.sheet-alt { font-size: 14px; color: var(--muted); margin: 14px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 14px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.sheet-semconta { display: block; width: 100%; margin-top: 16px; padding: 12px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.sheet-semconta:hover { color: var(--ink); }
.sheet-google { margin-bottom: 4px; }
.sheet-ou { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.sheet-ou::before, .sheet-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
html.sheet-aberta { overflow: hidden; }
@media (max-width: 560px) {
  .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
}

/* ---------- Bloqueio suave (Evolução sem conta) ---------- */
.gate { position: relative; }
.gate.is-locked > :not(.gate-card) { filter: blur(6px); pointer-events: none; user-select: none; opacity: .6; }
.gate-card {
  position: absolute; z-index: 5; left: 50%; top: 120px; transform: translateX(-50%);
  width: min(440px, calc(100% - 32px)); text-align: center; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.gate-card h2 { font-size: clamp(28px, 5vw, 36px); margin: 0 0 8px; }
.gate-card p { color: var(--muted); margin: 0 0 18px; }
.gate-card .btn { width: 100%; }

/* Vazio. — identidade de produto */
.logo {font-family:var(--font-body);font-weight:600;font-size:27px;letter-spacing:-.055em;}
.btn {border-radius:10px;font-weight:600;}
.eyebrow {font-family:var(--font-body);font-weight:600;letter-spacing:.13em;font-size:11px;}
.display {font-family:var(--font-body);font-weight:600;letter-spacing:-.055em;line-height:1.08;}
.display em {font-style:normal;color:var(--accent);}
