/* ============================================================
   Privæl — Onboarding · style.css
   Mobile-first. Paleta em variáveis: ajuste os hex conforme o
   manual de marca, o restante do layout herda automaticamente.
   ============================================================ */

:root {
  /* Paleta oficial — MIV Privæl */
  --ink:       #17181A;   /* Tinta */
  --teal:      #2F6F69;   /* Verde-petróleo (acento) */
  --teal-soft: #5FA89F;   /* Verde claro (uso sobre fundo escuro) */
  --off:       #F4F2EE;   /* Off-white */
  --paper:     #FBFAF7;
  --slate:     #5A6B68;
  --line:      #DAD6CE;

  --bg:        var(--off);
  --bg-card:   var(--paper);
  --bg-input:  var(--paper);
  --border:    var(--line);
  --text:      var(--ink);
  --text-soft: var(--slate);
  --accent:    var(--teal);
  --accent-ink:var(--paper);
  --err:       #B23A2E;   /* vermelho do MIV (usos incorretos) */
  --radius:    14px;
  --nav-h:     84px;
}

@font-face { font-family:'Manrope'; font-weight:200; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-200-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+2013-2014,U+2018-201D; }
@font-face { font-family:'Manrope'; font-weight:200; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-ext-200-normal.woff2') format('woff2'); unicode-range:U+0100-024F; }
@font-face { font-family:'Manrope'; font-weight:300; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-300-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+2013-2014,U+2018-201D; }
@font-face { font-family:'Manrope'; font-weight:300; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-ext-300-normal.woff2') format('woff2'); unicode-range:U+0100-024F; }
@font-face { font-family:'Manrope'; font-weight:600; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-600-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+2013-2014,U+2018-201D; }
@font-face { font-family:'Manrope'; font-weight:600; font-style:normal; font-display:swap;
  src:url('../assets/fonts/manrope-latin-ext-600-normal.woff2') format('woff2'); unicode-range:U+0100-024F; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100dvh;
}

/* ---------- Barra superior + progresso ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: rgba(251,250,247,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 640px; margin: 0 auto;
  padding: 12px 20px 14px;
}
.progress {
  height: 4px; border-radius: 2px; background: var(--border); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width .35s ease;
}

/* ---------- Palco dos slides ---------- */
.stage {
  max-width: 640px; margin: 0 auto;
  padding: 96px 20px calc(var(--nav-h) + 24px);
  overflow-x: hidden;
}
body.is-intro .stage { padding-top: 40px; }

.slide {
  animation: slideIn .32s ease both;
}
.slide.leaving-back { animation: slideInBack .32s ease both; }
@keyframes slideIn   { from { opacity: 0; transform: translateX(36px); }  to { opacity: 1; transform: none; } }
@keyframes slideInBack{ from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.leaving-back { animation: none; }
}

/* ---------- Tipografia dos cards ---------- */
.slide h1 {
  font-size: 26px; line-height: 1.3; font-weight: 600;
  letter-spacing: -.01em; margin-bottom: 12px;
}
.slide h2.sub {
  font-size: 20px; font-weight: 600; margin: 28px 0 12px;
}
.slide p.hint {
  color: var(--text-soft); font-size: 16px; margin-bottom: 22px;
}
.slide p.hint:last-of-type { margin-bottom: 22px; }

/* ---------- Logo Privæl (símbolo + wordmark — conforme MIV) ---------- */
.logo-full {
  display: flex; align-items: center; gap: 18px;
  margin: 28px 0 32px;
}
.logo-circle {
  flex: 0 0 88px; width: 88px; height: 88px;
  border: 2px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-family: 'Manrope', sans-serif; font-weight: 400;
  font-size: 40px; line-height: 1;
}
.logo-word {
  font-size: 44px; font-weight: 200; letter-spacing: .01em;
  color: var(--ink);
}
.logo-word .ae { color: var(--teal); }
.topbar-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.topbar-logo .logo-circle {
  flex: 0 0 26px; width: 26px; height: 26px;
  border-width: 1.2px; font-size: 13px;
}
.topbar-logo .logo-word { font-size: 17px; font-weight: 300; }

/* ---------- Nota de seleção ---------- */
.sel-note {
  color: var(--text-soft); font-size: 14px; margin: -14px 0 16px;
  display: flex; align-items: center; gap: 6px;
}
.sel-note::before { content: "›"; color: var(--accent); font-weight: 700; }
.sel-note.standalone { margin-top: 0; }

/* ---------- Abertura ---------- */
.intro-text p { color: var(--text-soft); margin-bottom: 14px; font-size: 16.5px; }
.intro-text p strong { color: var(--text); font-weight: 600; }

/* ---------- Opções (botões grandes) ---------- */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 17px; font-family: inherit;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.opt:active { background: var(--off); }
.opt .mark {
  flex: 0 0 22px; height: 22px; width: 22px;
  border: 2px solid var(--text-soft); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: transparent;
  transition: all .15s;
}
.opt.multi .mark { border-radius: 6px; }
.opt.selected { border-color: var(--teal); background: #ECF2F0; }
.opt.selected .mark {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}

/* ---------- Campos ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 14px; color: var(--text-soft); margin-bottom: 7px;
}
input[type="text"], textarea, select {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 17px; font-family: inherit;
  padding: 15px 16px;
  outline: none;
  appearance: none;
}
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%239aa4b2' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 44px;
}
.code-input {
  text-transform: uppercase; letter-spacing: .25em;
  font-size: 22px; text-align: center; font-weight: 600;
}

/* Sub-campos condicionais (ex.: "qual app?", volumes de nuvem) */
.subfield {
  margin-top: 12px; padding: 14px 16px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.subfield label { color: var(--text); font-size: 15px; margin-bottom: 8px; }

/* ---------- Mensagens ---------- */
.msg-error {
  display: none;
  margin-top: 14px; padding: 13px 16px;
  background: rgba(178,58,46,.08);
  border: 1px solid var(--err);
  border-radius: var(--radius);
  color: var(--err); font-size: 15px;
}
.msg-error.show { display: block; }

/* ---------- Card de destaque / final ---------- */
.card-note {
  margin-top: 22px; padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 16px;
}
.final-icon { font-size: 42px; margin-bottom: 14px; }
.spinner {
  width: 34px; height: 34px; margin: 8px 0 18px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navegação inferior ---------- */
.navbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: rgba(251,250,247,.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  height: var(--nav-h);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
}
.navbar { display: flex; gap: 12px; max-width: 640px; margin: 0 auto; left: 0; right: 0; }
@media (min-width: 680px) {
  .navbar { left: 50%; transform: translateX(-50%); width: 640px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 16px 16px 0 0; }
}

.btn {
  flex: 1;
  border: none; border-radius: var(--radius);
  font-size: 17px; font-weight: 600; font-family: inherit;
  padding: 15px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s, background .15s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); flex: 2; }
.btn-primary:disabled { opacity: .4; cursor: default; }
.btn-ghost {
  background: transparent; color: var(--text-soft);
  border: 1.5px solid var(--border);
}
.btn-ghost:disabled { opacity: 0; pointer-events: none; }
.btn-block { width: 100%; margin-top: 20px; flex: none; }
.btn-download {
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--accent);
}

/* ---------- Desktop ---------- */
@media (min-width: 680px) {
  body { font-size: 17px; }
  .slide h1 { font-size: 30px; }
  .stage { padding-top: 110px; }
}
