/* Night mode liquid glass (linguagem do Elevum Design Studio) sobre preto, nas cores Porto (azul e branco). Mobile primeiro.
   Tema AP anterior, se quiser voltar: --accent #fdb913, --accent-hi #ffcc4d, --btn #fdb913, --btn-hi #ffcc4d, --btn-text #1a1200. */
:root {
  color-scheme: dark;
  --bg: #000a1f; /* azul-marinho Porto (#001232), escurecido */
  --panel-1: rgba(255, 255, 255, 0.055);
  --panel-2: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shine: rgba(255, 255, 255, 0.07);
  --shadow: rgba(0, 0, 0, 0.6);
  --sub: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a9adb5;
  --faint: #737882;
  --input: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.16);
  --accent: #00a1fc; /* azul claro Porto: ícones, destaques */
  --accent-hi: #4dbdff;
  --accent-soft: rgba(0, 161, 252, 0.1);
  --accent-ring: rgba(0, 161, 252, 0.45);
  --btn: #0046c0; /* azul Porto: botão principal */
  --btn-hi: #0a56dc;
  --btn-text: #fff;
  --bad: #ff9c8a;
  --radius: 20px;
  --radius-md: 12px;
  --head: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.6 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Gradiente azul-marinho Porto, fixo na tela (pseudo-elemento: background-attachment: fixed não funciona no iPhone). */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(0, 70, 192, 0.28), transparent 65%),
    radial-gradient(700px 500px at 100% 100%, rgba(0, 161, 252, 0.05), transparent 70%),
    linear-gradient(180deg, #001440 0%, var(--bg) 45%, #00040d 100%);
}

h1, h2, h3 { font-family: var(--head); font-stretch: 87.5%; font-weight: 600; letter-spacing: -0.005em; margin: 0; line-height: 1.15; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.i { width: 20px; height: 20px; flex: none; display: block; }

/* Regra de alinhamento: ícone, divisor e texto na mesma linha têm a mesma altura (line-height = altura do ícone). */
.ico-box { flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(0, 161, 252, 0.22); }
.vsep { flex: none; width: 1px; background: var(--glass-border); align-self: stretch; }

/* Carros ao fundo: traço fino, baixa opacidade. Arcfox à esquerda, Omoda | Jaecoo à direita. */
.bg-cars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-cars img {
  position: absolute; top: 50%; width: min(42vw, 540px); transform: translateY(-50%); opacity: 0.16;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}
.bg-cars .l { left: -1vw; }
.bg-cars .r { right: -1vw; }
@media (max-width: 899px) {
  .bg-cars img { width: 90vw; opacity: 0.07; top: auto; transform: none; }
  .bg-cars .l { left: -32vw; top: 3vh; }
  .bg-cars .r { right: -32vw; bottom: 2vh; }
}

.wrap { position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* Cabeçalho: AP | Porto Bank centralizado */
.top { display: flex; justify-content: center; padding: 22px 0 6px; }
.lockup { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.lockup .ap { height: 30px; width: auto; }
.lockup .sep { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.22); }
.lockup .porto { height: 22px; width: auto; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 16px; color: var(--muted); text-decoration: none; margin-top: 14px; }
.back .i { width: 16px; height: 16px; transform: scaleX(-1); }

/* Vidro */
.glass {
  background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 24px 60px var(--shadow);
}

.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.hero { padding: 26px 0 4px; text-align: center; }
.hero h1 { font-size: clamp(29px, 8vw, 44px); margin: 12px 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); margin: 0 auto; font-size: 16.5px; max-width: 34em; }

/* Parceiros */
.partners { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.partners small { color: var(--faint); font-size: 12px; width: 100%; letter-spacing: 0.04em; }
.partner {
  display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 8px 16px;
  border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, background 0.2s;
}
.partner:hover { border-color: var(--accent-ring); background: rgba(255, 255, 255, 0.06); }
.partner img { max-height: 40px; max-width: 140px; width: auto; display: block; }

/* Selos de confiança: duas linhas de dois; nenhum selo quebra por dentro */
.seals { display: grid; gap: 8px; margin: 26px 0 18px; padding: 0; list-style: none; }
.seal-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.seal {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: clamp(11.5px, 3.3vw, 13px); line-height: 15px; font-weight: 600;
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.035);
}
.seal .i { width: 15px; height: 15px; color: var(--accent); }

/* Vantagens: [ícone] | título + subtítulo; ícone e divisor ocupam a altura dos dois */
.perks { display: grid; gap: 10px; }
.perk { display: flex; align-items: center; gap: 10px; padding: 14px; }
.perk .ico-box, .how-link .ico-box { width: 46px; min-height: 46px; align-self: stretch; } /* acompanha a altura de título + subtítulo */
.perk .ico-box .i { width: 22px; height: 22px; }
.perk .txt { min-width: 0; }
.perk h3 { font-size: clamp(13px, 4vw, 17px); line-height: 1.25; white-space: nowrap; letter-spacing: 0.01em; }
.perk p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Formulário */
.form-card { margin: 22px 0 10px; padding: 24px 18px 20px; scroll-margin-top: 16px; }
.form-card h2 { font-size: 26px; }
.form-card .lead { color: var(--muted); font-size: 14.5px; margin: 6px 0 20px; }
.field { margin-bottom: 15px; }
.field label, .legend { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 14px; line-height: 26px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 16px; /* 16px evita zoom automático no iPhone */
  color: var(--text); background: var(--input); border: 1px solid var(--input-border);
  border-radius: var(--radius-md); padding: 13px 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid='true'] { border-color: var(--bad); }
.err { display: block; color: var(--bad); font-size: 12.5px; margin-top: 5px; }
.err:empty { display: none; }

fieldset { border: 0; padding: 0; margin: 4px 0 16px; min-width: 0; }
.legend { padding: 0; }
.legend small { color: var(--faint); font-weight: 500; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 42px 10px 14px;
  border-radius: var(--radius-md); border: 1px solid var(--input-border); background: var(--input);
  font-weight: 600; line-height: 18px; cursor: pointer; transition: border-color 0.15s, background 0.15s; user-select: none;
}
.choice label .i { width: 18px; height: 18px; color: var(--muted); }
.choice input:checked + label { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hi); }
.choice input:checked + label .i { color: var(--accent); }
.choice input:focus-visible + label { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.info {
  width: 26px; height: 26px; border-radius: 50%; flex: none; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.05); color: var(--muted);
  font: italic 700 13px/1 Georgia, serif;
}
.choice .info { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); }
.info[aria-expanded='true'] { color: #fff; background: var(--btn); border-color: var(--accent); }
.tip {
  margin: 10px 0 0; padding: 11px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); color: var(--text);
}
.field .tip { margin: 0 0 8px; }
.hint { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 20px; color: var(--muted); margin: 4px 0 16px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--btn); cursor: pointer; }
.consent a { color: var(--text); }
.consent + .err { margin: -8px 0 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px;
  font: inherit; font-size: 16.5px; line-height: 18px; font-weight: 700; color: var(--btn-text); text-decoration: none;
  background: var(--btn); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 70, 192, 0.35); transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--btn-hi); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn .i { width: 18px; height: 18px; }
.btn.ghost { color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; line-height: 14px; color: var(--faint); margin: 12px 0 0; }
.secure .i { width: 14px; height: 14px; }
.form-msg { margin-top: 12px; font-size: 14px; color: var(--bad); text-align: center; }
.form-msg:empty { display: none; }

/* Pop-up de confirmação */
.modal {
  width: calc(100% - 32px); max-width: 400px; padding: 30px 22px 22px; text-align: center; color: var(--text);
  background: #011233; border: 1px solid var(--glass-border); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in 0.25s ease-out; }
.modal .check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--btn); box-shadow: 0 0 0 8px var(--accent-soft); }
.modal .check .i { width: 32px; height: 32px; }
.modal h2 { font-size: 26px; margin-bottom: 8px; }
.modal p { color: var(--muted); margin: 0 0 22px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Link para o "Como funciona": mesmo padrão das vantagens */
.how-link {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0; padding: 14px; text-decoration: none; text-align: left;
  font: inherit; color: inherit; cursor: pointer; transition: border-color 0.2s;
}
.how-link:hover { border-color: var(--accent-ring); }
.how-link .ico-box .i { width: 22px; height: 22px; }
.how-link .txt { min-width: 0; }
.how-link b { display: block; font-family: var(--head); font-stretch: 87.5%; font-weight: 600; font-size: clamp(13px, 4vw, 17px); line-height: 1.25; white-space: nowrap; }
.how-link .txt span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
/* Miniatura com anel azul, como um story */
.story-ring {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 200deg, var(--accent), var(--btn), #7fd0ff, var(--accent));
}
.story-ring img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid var(--bg); }
.story-ring .i { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }

/* Player de story: tela cheia no celular, quadro 9:16 no computador */
.story {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #000; color: #fff; overflow: hidden;
}
.story::backdrop { background: rgba(0, 6, 20, 0.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.story-frame { position: relative; width: 100%; height: 100%; background: var(--story-bg, #000); user-select: none; -webkit-user-select: none; }
.story video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--story-fit, cover); }
.story-bars { position: absolute; z-index: 3; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; }
.story-top {
  position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px;
  padding: calc(max(10px, env(safe-area-inset-top)) + 14px) 10px 28px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}
.story-top .lockup { gap: 9px; margin-right: auto; }
.story-top .lockup .ap { height: 20px; }
.story-top .lockup .sep { height: 16px; }
.story-top .lockup .porto { height: 14px; }
.story-btn { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: #fff; cursor: pointer; }
.story-btn .i { width: 22px; height: 22px; }
/* Toque à esquerda volta, à direita avança; segurar pausa */
.story-tap { position: absolute; z-index: 2; top: 0; bottom: 0; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.story-tap.prev { left: 0; width: 30%; }
.story-tap.next { right: 0; width: 70%; }
.story-cta { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 40px 16px calc(max(16px, env(safe-area-inset-bottom)) + 4px); background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent); }
@media (min-width: 600px) and (min-height: 560px) {
  .story { height: min(92vh, 860px); width: calc(min(92vh, 860px) * 9 / 16); margin: auto; border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); }
}

footer { position: relative; z-index: 1; padding: 22px 0 36px; color: var(--faint); font-size: 12px; line-height: 1.55; text-align: center; }
footer .lockup { margin-bottom: 14px; opacity: 0.85; }
footer p { margin: 0 0 6px; }
footer a { color: var(--muted); }

/* Revelar ao rolar: só um fade discreto */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.on { opacity: 1; transform: none; }

/* Página "Como funciona" */
.page-title { padding: 18px 0 6px; text-align: center; }
.page-title h1 { font-size: clamp(29px, 8vw, 42px); margin: 12px 0; }
.page-title p { color: var(--muted); margin: 0; }
.mode { padding: 22px 16px; margin: 18px 0; }
.mode-head { display: flex; align-items: center; gap: 12px; }
.mode-head .ico-box { width: 36px; height: 36px; }
.mode-head .vsep { align-self: auto; height: 36px; }
.mode-head h2 { font-size: clamp(21px, 6vw, 25px); line-height: 36px; }
.tag { display: inline-block; margin: 14px 0 14px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1px solid var(--glass-border); }
.mode > p { margin: 0 0 14px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; counter-reset: s; }
.steps li { position: relative; padding: 10px 12px 10px 43px; border-radius: 12px; background: var(--sub); border: 1px solid var(--line); font-size: 14.5px; line-height: 21px; }
.steps li::before { content: counter(s); counter-increment: s; position: absolute; left: 12px; top: 10px; width: 21px; height: 21px; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-ring); }
.example { padding: 14px; border-radius: 14px; background: var(--sub); border: 1px solid var(--line); font-size: 14.5px; }
.ex-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.ex-label span { color: var(--faint); font-weight: 600; }
.example p { margin: 0 0 6px; color: var(--text); }
.example p:last-child { margin: 0; }

/* Lances: título, cenário, infográfico em 3 passos e resultado, com respiro */
.bids { display: grid; gap: 16px; margin: 8px 0 18px; }
.bid { padding: 18px 14px; border-radius: 16px; background: var(--sub); border: 1px solid var(--line); }
.bid h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 20px; white-space: nowrap; margin-bottom: 14px; }
.bid h3 .i { color: var(--accent); }
.bid h3 .vsep { align-self: auto; height: 20px; }
.bid h3 small { font-family: 'Albert Sans', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--faint); letter-spacing: 0.02em; }
.bid p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.bid p + p { margin-top: 10px; }
.bid p strong { color: var(--text); font-weight: 600; }
.flow { display: grid; grid-template-columns: 1fr 14px 1fr 14px 1fr; align-items: stretch; gap: 4px; margin: 16px 0; }
.flow .arr { width: 14px; height: 14px; align-self: center; color: var(--faint); }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; text-align: center; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.step .i { width: 20px; height: 20px; color: var(--muted); margin-bottom: 2px; }
.step b { font-size: 14px; line-height: 1.2; white-space: nowrap; }
.step span { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.step.hl { border-color: var(--accent-ring); background: var(--accent-soft); }
.step.hl .i, .step.hl b { color: var(--accent-hi); }
/* Telas muito estreitas (≤359px, ex.: iPhone SE 1ª geração): compacta para nada quebrar linha. */
@media (max-width: 359px) {
  .flow { grid-template-columns: 1fr; }
  .flow .arr { transform: rotate(90deg); justify-self: center; }
  .seal-row { gap: 6px; }
  .seal { font-size: 11px; padding: 7px 8px; gap: 5px; }
  .mode { padding: 20px 12px; }
  .bid { padding: 16px 12px; }
  .bid h3 { font-size: 14.5px; line-height: 18px; gap: 7px; }
  .bid h3 .i, .bid h3 .vsep { width: 18px; height: 18px; }
  .bid h3 .vsep { width: 1px; }
  .bid h3 small { font-size: 10.5px; }
}
.bid { min-width: 0; }
.note { padding: 14px; border-radius: 14px; border: 1px solid var(--accent-ring); background: var(--accent-soft); font-size: 14px; }
.note p { margin: 0; color: var(--text); }
.cta-stack { display: grid; gap: 10px; margin: 22px 0 6px; }

/* Política de privacidade */
.legal { padding: 22px 18px; margin: 18px 0; font-size: 15px; }
.legal h2 { font-size: 19px; margin: 22px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 20px; }

@media (min-width: 600px) {
  .form-card { padding: 28px 28px 24px; }
  .mode, .legal { padding: 28px; }
  .bid { padding: 20px 18px; }
  .perk, .how-link { padding: 16px 18px; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
