/* ============================================================
   Selfdrive — funil de 8 rotas · mobile-first (390px)
   Paleta sóbria: fundo neutro escuro, UMA cor de acento (âmbar),
   usada apenas em CTAs. Tipografia: Inter, corpo >= 16px.
   ============================================================ */
:root {
  --bg: #0B0B0C;
  --panel: #121214;
  --line: #232326;
  --text: #F4F4F5;
  --muted: #A1A1AA;
  --accent: #F7B30A;
  --accent-ink: #131000;
  --radius: 14px;
  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.section { padding: 44px 0; }
.h2 { font-size: clamp(24px, 5.5vw, 34px); letter-spacing: -.02em; font-weight: 800; line-height: 1.15; }
.caption { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* ===== Cabeçalho fixo ===== */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11,11,12,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 19px; }
.brand span { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; }
.lang { font-size: 13px; font-weight: 700; color: var(--muted); padding: 10px 10px; min-height: 44px; display: inline-flex; align-items: center; }
.lang:hover { color: var(--text); }
.tel-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); font-size: 18px; }

/* ===== Botões (o acento vive AQUI) ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px;
  padding: 0 22px; min-height: 48px; border-radius: 12px; border: none; cursor: pointer; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }

/* ===== Hero (landing) — curto, produto quase visível ===== */
.hero { padding: 34px 0 26px; }
.hero h1 { font-size: clamp(27px, 6.8vw, 44px); letter-spacing: -.03em; font-weight: 800; line-height: 1.08; }
.hero .sub { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 52ch; }
.hero .cta-row { margin-top: 18px; }
.hero .support { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ===== Cards das viaturas ===== */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:hover { border-color: #3f3f46; }
.card .ph { aspect-ratio: 16/9; background: #18181B; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px; }
.card .model { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--muted); font-weight: 600; }
.card .price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.card .btn { margin-top: 14px; }

/* ===== Blocos de texto ===== */
.prose p { color: var(--muted); font-size: 16px; margin-top: 12px; max-width: 60ch; }
.prose p:first-child { margin-top: 0; }
.anchor-line { font-size: clamp(19px, 4.5vw, 24px); font-weight: 800; letter-spacing: -.01em; margin-top: 18px; }

.pillars { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pillar h3 { font-size: 16px; margin-bottom: 6px; }
.pillar p { color: var(--muted); font-size: 15px; }

/* ===== Confiança ===== */
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
.trust-item { border-left: 2px solid var(--line); padding: 2px 0 2px 14px; }
.trust-item h3 { font-size: 16px; margin-bottom: 4px; }
.trust-item p { color: var(--muted); font-size: 15px; }

/* ===== Passos ===== */
.steps { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; counter-reset: passo; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.step h3 { font-size: 16px; margin: 5px 0 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* ===== Bloco do vendedor (peso visual) ===== */
.seller { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; gap: 18px; align-items: center; }
.seller .ph { flex: 0 0 96px; width: 96px; height: 120px; border-radius: 12px; overflow: hidden; }
.seller .ph img { width: 100%; height: 100%; object-fit: cover; }
.seller .name { font-size: 19px; font-weight: 800; }
.seller .role { color: var(--muted); font-size: 13px; margin-top: 2px; }
.seller .line { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 44ch; }
.seller .tel { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ===== CTA final / formulário placeholder ===== */
.final { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center; }
.final .price-big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; }
.final p { color: var(--muted); font-size: 16px; margin: 10px auto 18px; max-width: 46ch; }
.form-placeholder { margin-top: 16px; border: 1px dashed #3f3f46; border-radius: 12px; padding: 18px; color: var(--muted); font-size: 14px; }

/* ===== Galeria (produto) ===== */
.gallery { position: relative; aspect-ratio: 4/5; background: #101012; overflow: hidden; border-radius: 0; }
.gallery-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.4,0,.2,1); }
.gallery-slide { min-width: 100%; height: 100%; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gal-count { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0,0,0,.6); backdrop-filter: blur(5px);
  color: #fff; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.gal-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(0,0,0,.5); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.gal-btn.prev { left: 10px; } .gal-btn.next { right: 10px; }
.gal-dots { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 6px; }
.gal-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); border: none; padding: 0; cursor: pointer; }
.gal-dot.active { background: #fff; width: 16px; border-radius: 3px; }

/* Lightbox (zoom ao toque) */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.95); z-index: 200; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lb-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: #fff; font-size: 34px; cursor: pointer; width: 44px; height: 44px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ===== Produto: identificação ===== */
.pid { padding: 22px 0 8px; }
.pid h1 { font-size: clamp(25px, 6vw, 38px); letter-spacing: -.02em; font-weight: 800; line-height: 1.1; }
.pid .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.pid .price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.pid .support { color: var(--muted); font-size: 14px; margin-top: 6px; }
.pid .cta-row { margin-top: 16px; }

/* ===== Argumentos ===== */
.args { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
.arg { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.arg h3 { font-size: 16px; margin-bottom: 6px; }
.arg p { color: var(--muted); font-size: 15px; }

/* ===== Ficha técnica ===== */
.specs { margin-top: 20px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-row .k { color: var(--muted); flex-shrink: 0; }
.spec-row .v { font-weight: 600; text-align: right; }
.h3 { font-size: 17px; font-weight: 800; margin-top: 28px; }
.equip { margin-top: 14px; display: grid; gap: 8px; }
.equip li { list-style: none; color: var(--muted); font-size: 15px; padding-left: 18px; position: relative; }
.equip li::before { content: "·"; position: absolute; left: 4px; color: var(--text); font-weight: 800; }

/* ===== Garantia (bloco âncora de confiança) ===== */
.warranty { background: var(--panel); border: 1px solid #3a3a3e; border-radius: var(--radius); padding: 22px 18px; }
.warranty .maker { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.warranty .spec-row { border-color: #2c2c30; }
.warranty .close { margin-top: 16px; font-size: 15px; font-weight: 600; line-height: 1.5; border-left: 3px solid var(--accent); padding-left: 12px; }
.cond-list { margin-top: 14px; display: grid; gap: 7px; }
.cond-list li { list-style: none; font-size: 15px; color: var(--muted); padding-left: 22px; position: relative; }
.cond-list li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--text); }

/* ===== Barra fixa inferior ===== */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(15,15,16,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
  transform: translateY(110%); transition: transform .25s ease; }
.stickybar.show { transform: none; }
.stickybar .price { font-size: 18px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.stickybar .btn { flex: 1; min-height: 46px; font-size: 15px; }
body.has-sticky { padding-bottom: 76px; }

/* ===== Rodapé ===== */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
.footer .cols { display: grid; gap: 6px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }
.footer .legal { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 14px; }
.footer .lang { padding: 8px 0; }

/* ===== >= 720px ===== */
@media (min-width: 720px) {
  .section { padding: 60px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .pillars, .steps { grid-template-columns: repeat(3, 1fr); }
  .step { display: block; }
  .step .n { margin-bottom: 10px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .args { grid-template-columns: repeat(3, 1fr); }
  .specs.cols2 { column-count: 2; column-gap: 40px; }
  .specs.cols2 .spec-row { break-inside: avoid; }
  .gallery { border-radius: var(--radius); }
  .product-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 34px; align-items: start; padding-top: 26px; }
  .footer .cols { grid-template-columns: 1fr auto; }
}

/* ===== Banner de consentimento (Recusar = mesmo peso de Aceitar) ===== */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  background: #17171A; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transform: translateY(120%); transition: transform .3s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.consent.show { transform: none; }
.consent p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.consent p a { text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 10px; margin-top: 12px; }
.consent-btn { flex: 1; min-height: 46px; border-radius: 10px; font-weight: 700; font-size: 15px;
  cursor: pointer; background: transparent; color: var(--text); border: 1px solid #3f3f46; }
.consent-btn.accept { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (min-width: 720px) { .consent { left: auto; right: 24px; bottom: 24px; max-width: 420px; } }

/* ===== Modal do formulário ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: none; z-index: 100;
  align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-inner { background: #17171A; border: 1px solid var(--line); border-radius: 16px 16px 0 0;
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 18px 14px 14px; position: relative; }
.modal-inner h3 { font-size: 18px; padding-right: 40px; }
.modal-inner .note { color: var(--muted); font-size: 13px; margin-top: 4px; }
.modal-close { position: absolute; top: 8px; right: 8px; background: none; border: none;
  color: var(--muted); font-size: 26px; cursor: pointer; width: 44px; height: 44px; }
.modal iframe { margin-top: 10px; border: 0; width: 100%; min-height: 420px; }
@media (min-width: 720px) { .modal { align-items: center; } .modal-inner { border-radius: 16px; } }

/* ===== Botão WhatsApp no cabeçalho ===== */
.wa-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.wa-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }

/* ===== Páginas legais ===== */
.legal-page h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -.02em; }
.legal-page .updated { color: var(--muted); font-size: 14px; margin-top: 6px; }
.legal-page h2 { font-size: 19px; margin-top: 30px; }
.legal-page h2.cookies-sep { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 24px; }
.legal-page p { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 68ch; line-height: 1.6; }
.legal-page a { text-decoration: underline; text-underline-offset: 2px; }

/* ===== Rodapé alargado ===== */
.footer .block { margin-top: 14px; }
.footer .ral { font-size: 13px; max-width: 74ch; line-height: 1.5; margin-top: 14px; }

/* ============================================================
   Elementos visuais — ícones de traço, discretos.
   Regra: o acento âmbar continua reservado aos CTAs; os ícones
   usam o cinzento do texto secundário para não competir.
   ============================================================ */
.ico { display: block; flex-shrink: 0; }

/* quadrado suave com ícone — pilares */
.ico-sq {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: #1A1A1D; border: 1px solid var(--line);
  color: var(--muted); margin-bottom: 14px;
}
.pillar:hover .ico-sq { color: var(--accent); border-color: rgba(247,179,10,.3); }

/* ícone em linha — blocos de confiança */
.trust-item { display: flex; gap: 12px; align-items: flex-start; border-left: 0; padding: 0; }
.trust-item .ico-line { color: var(--muted); margin-top: 2px; }
.trust-item h3 { font-size: 16px; margin-bottom: 4px; }

/* ícone discreto nos passos */
.step { position: relative; }
.step-ico { position: absolute; top: 0; right: 0; color: #3f3f46; }

/* tira de especificações — página de produto */
.spec-strip {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin-top: 18px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.ks {
  background: var(--panel); padding: 14px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  color: var(--muted);
}
.ks .v { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.01em; margin-top: 4px; }
.ks .l { font-size: 12px; color: var(--muted); }

/* filete de acento acima dos títulos de secção */
.h2 { position: relative; }
.section .h2::before {
  content: ""; display: block; width: 28px; height: 3px; border-radius: 2px;
  background: var(--accent); opacity: .85; margin-bottom: 14px;
}
.final .h2::before, .legal-page h1 + .updated { display: none; }
.final .h2::before { content: none; }

/* garantia: ícone junto ao nome do fabricante */
.warranty .maker { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.warranty .maker .ico { color: var(--accent); }

/* ===== Rodapé enxuto ===== */
.footer { padding: 26px 0 34px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; }
.footer .brand { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.footer .brand span { color: var(--accent); }
.footer .lang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 0; min-height: 44px; }
.footer .lang i { color: #3f3f46; font-style: normal; }
.footer .lang a { color: var(--muted); padding: 10px 2px; }
.footer .lang a.on { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.foot-links a { font-size: 13px; color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot-rights { margin-top: 10px; font-size: 12px; color: #52525b; }

@media (min-width: 720px) {
  .spec-strip { grid-template-columns: repeat(4, 1fr); }
  .trust-grid { gap: 20px 28px; }
}

/* Correções de usabilidade (auditoria 390px) */
/* A barra fixa transbordava com textos mais longos (ex.: "Book a viewing"):
   o preço não pode empurrar o botão para fora do ecrã. */
.stickybar { gap: 10px; }
.stickybar .price { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.stickybar .btn { flex: 1 1 auto; min-width: 0; padding: 0 14px; white-space: nowrap; }
/* Áreas de toque: o seletor de idioma do rodapé tinha 40px. */
.footer .lang a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }

/* ===== Painel de sucesso ===== */
[data-success-panel] { text-align: center; padding: 16px 6px 8px; }
.ok-mark {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(247,179,10,.12); border: 1px solid rgba(247,179,10,.35); color: var(--accent);
}
[data-success-panel] h3 { font-size: 20px; }
[data-success-panel] .note { max-width: 40ch; margin: 8px auto 0; }

/* Banner de consentimento — mais presente, sem deixar de ser justo.
   «Recusar» mantém exatamente o mesmo tamanho e peso de «Aceitar»:
   é exigência legal e, além disso, um padrão escuro aqui destruiria
   a confiança de quem está a ponderar gastar €30.000. */
.consent { padding: 18px; border-color: rgba(247,179,10,.28); }
.consent p { font-size: 15px; color: var(--text); }
.consent .consent-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.consent-actions { margin-top: 14px; }
.consent-btn { min-height: 48px; font-size: 15.5px; }

/* Rótulo "recomendado" — o botão «Recusar» mantém a MESMA largura e altura.
   Para reverter: apagar consent_accept_hint no landing.json. */
.consent-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.15; }
.consent-btn .hint { font-size: 11px; font-weight: 600; font-style: normal; opacity: .72; letter-spacing: .01em; }

/* ===== Preço com referência de mercado =====
   A referência é etiquetada de propósito: comparar com o mercado é legal;
   riscar um "preço anterior" que nunca praticámos não é. */
.price-wrap { margin-top: 12px; }
.price-ref { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.price-ref .lbl { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.price-ref s { color: var(--muted); font-size: 15px; text-decoration-thickness: 1.5px; }
.price-wrap .price { margin-top: 2px; }
.save-tag {
  display: inline-block; margin-top: 8px; padding: 5px 11px; border-radius: 999px;
  background: rgba(247,179,10,.12); border: 1px solid rgba(247,179,10,.3);
  color: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: .01em;
}
.pid .price-wrap { margin-top: 14px; }
.pid .price-ref s { font-size: 17px; }

/* CTA do cabeçalho — um só objetivo em todo o site: abrir o formulário. */
.btn.cta-top { min-height: 44px; padding: 0 15px; font-size: 14px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 400px) { .btn.cta-top { padding: 0 12px; font-size: 13px; } }
