/* styles.css — tokens do projeto; mobile-first; funciona com uma mão dentro do Instagram. */

:root {
  --bg: #0A0A0F;
  --bg-elev: #14141C;
  --gold: #C9A84C;
  --gold-soft: rgba(201, 168, 76, 0.14);
  --ink: #F4F2EC;
  --ink-dim: #A8A49A;
  --line: rgba(244, 242, 236, 0.10);
  --danger: #E06A5A;
  --radius: 16px;
  --tap: 44px; /* alvo de toque mínimo */
  --maxw: 560px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    calc(env(safe-area-inset-top) + 24px)
    calc(env(safe-area-inset-right) + 20px)
    calc(env(safe-area-inset-bottom) + 24px)
    calc(env(safe-area-inset-left) + 20px);
}

.screen {
  width: 100%;
  max-width: var(--maxw);
  margin: auto 0;
  animation: fade 0.32s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Tipografia ── */
h1, h2 { font-family: var(--font-serif); font-weight: 700; line-height: 1.12; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 7vw, 40px); }
h2 { font-size: clamp(22px, 5.5vw, 30px); }
.lead { color: var(--ink-dim); font-size: 16px; line-height: 1.55; margin: 0 0 24px; }
.eyebrow { color: var(--gold); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; margin: 0 0 14px; }
.accent { color: var(--gold); }
/* Wordmark da marca Migaki — discreto, no topo da tela de abertura. */
.brand { font-family: var(--font-serif); font-weight: 700; color: var(--ink);
  font-size: 20px; letter-spacing: 0.06em; margin: 0 0 20px; opacity: 0.92; }

/* ── Botões ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--tap); padding: 15px 22px;
  border: none; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: transform 0.1s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gold); color: #15120A; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; margin-top: 16px; }
.btn-row .btn { width: auto; flex: 1; }

/* ── Cartões de opção (quiz) ── */
.options { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 8px; }
.option {
  display: flex; align-items: center; min-height: var(--tap);
  padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--ink); font-size: 16px; text-align: left;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.option:active { transform: scale(0.99); }
.option[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); }

/* ── Inputs ── */
.field { margin: 0 0 16px; }
.field label { display: block; font-size: 14px; color: var(--ink-dim); margin: 0 0 7px; }
.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 13px 16px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: var(--font-sans); font-size: 16px; /* 16px evita zoom no iOS */
}
.input:focus { outline: none; border-color: var(--gold); }
textarea.input { resize: vertical; min-height: 80px; }

/* Honeypot — invisível a humanos */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Consentimentos ── */
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; background: var(--bg-elev); }
.consent input[type="checkbox"] { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--gold); flex: none; }
.consent span { font-size: 14px; line-height: 1.45; color: var(--ink-dim); }
.consent .req { color: var(--gold); }

/* ── Barra de progresso ── */
.progress { width: 100%; height: 4px; background: var(--line); border-radius: 99px; margin: 0 0 28px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.3s ease; }

/* ── Upload ── */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 32px 20px;
  text-align: center; background: var(--bg-elev); cursor: pointer; transition: border-color 0.15s ease;
}
.dropzone:active, .dropzone.over { border-color: var(--gold); }
.dropzone { display: flex; flex-direction: column; gap: 6px; align-items: center;
  width: 100%; font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
.upload-cta { display: block; font-family: var(--font-serif); font-size: clamp(20px, 5.5vw, 26px);
  font-weight: 700; color: var(--gold); letter-spacing: 0.01em; line-height: 1.15; }
.preview { width: 100%; border-radius: var(--radius); margin: 16px 0; display: block; }

/* ── Resultado / análise ── */
.analysis { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; font-size: 16px; line-height: 1.6; margin: 0 0 18px; }
.card-share { background: linear-gradient(160deg, var(--gold-soft), transparent);
  border: 1px solid var(--gold); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; }
.card-share p { font-family: var(--font-serif); font-size: 19px; line-height: 1.4; margin: 0 0 14px; }
.offer { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.price { font-family: var(--font-serif); font-size: 34px; color: var(--gold); margin: 6px 0; }

/* ── Helpers ── */
.muted { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }
.error-msg { color: var(--danger); font-size: 14px; margin: 8px 0 0; min-height: 18px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { *, .screen { animation: none !important; transition: none !important; } }
