/* RDMX Proteção Veicular — folha de estilo do site público.
   Base: DESIGN.md "Ferrari" (awesome-design-md), adaptado à identidade RDMX:
   asfalto escuro + branco, vermelho RDMX só em ações principais e no
   recorte inclinado herdado da placa do "R" do logotipo. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --asfalto: #17181a;
  --acostamento: #24262a;
  --faixa: #3a3d42;
  --papel: #f3f4f2;
  --grafite: #26282c;
  --tinta: #ffffff;
  --nevoa: #a9acb1;
  --nevoa-escura: #5d6168;
  --vermelho: #e30636;
  --vermelho-press: #b8042b;
  --foco: #ffd23f;

  --fonte: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --larga: 125%;
  --conteudo: 1240px;
  --margem: clamp(16px, 4vw, 48px);
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;
  --inclinacao: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--asfalto);
  color: var(--nevoa);
  font-family: var(--fonte);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }

.pular { position: absolute; left: -9999px; top: 0; background: var(--tinta); color: var(--asfalto); padding: var(--s2) var(--s3); z-index: 100; }
.pular:focus { left: var(--s3); top: var(--s3); }

.envelope { max-width: var(--conteudo); margin: 0 auto; padding: 0 var(--margem); }

/* Tipografia */
h1, h2, h3 { color: var(--tinta); font-weight: 600; margin: 0; }
.display {
  font-stretch: var(--larga);
  font-weight: 700;
  font-size: clamp(38px, 7.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.titulo {
  font-stretch: var(--larga);
  font-weight: 650;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.012em;
}
.subtitulo { font-size: clamp(18px, 1.6vw, 21px); font-weight: 600; line-height: 1.3; }
.lead { font-size: clamp(18px, 1.5vw, 20px); color: #d3d5d8; max-width: 38em; }
p { margin: 0 0 var(--s3); max-width: 42em; }
.pequeno { font-size: 14px; }

/* Botões: borda esquerda inclinada, como a placa do "R" no logotipo */
.botoes { display: flex; flex-wrap: wrap; gap: var(--s3); }
.botao {
  --corte: var(--inclinacao);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 var(--s5) 0 calc(var(--s5) + 4px);
  font-family: var(--fonte); font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 0;
  clip-path: polygon(var(--corte) 0, 100% 0, 100% 100%, 0 100%);
}
.botao-primario { background: var(--vermelho); color: #fff; }
.botao-primario:hover { background: var(--vermelho-press); }
.botao-claro { background: var(--tinta); color: var(--asfalto); }
.botao-claro:hover { background: #dfe0e2; }
.botao-contorno {
  --corte: 9%;
  color: var(--tinta);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='9.4,0.8 99.2,0.8 99.2,99.2 0.9,99.2' fill='none' stroke='white' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.botao-contorno:hover { background-color: rgba(255,255,255,0.1); }
.link-seta { color: var(--tinta); font-weight: 600; text-underline-offset: 4px; }

/* Topo */
.topo {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  background: linear-gradient(rgba(23,24,26,0.85), rgba(23,24,26,0));
}
.topo-solido { position: sticky; top: 0; background: var(--asfalto); border-bottom: 1px solid var(--acostamento); }
.topo .envelope { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: var(--s4); }
.marca img { width: 148px; height: auto; }
.menu { display: flex; align-items: center; gap: var(--s5); }
.menu a { color: var(--tinta); text-decoration: none; font-size: 15px; font-weight: 550; }
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--vermelho); }
.menu .botao { min-height: 42px; padding: 0 var(--s4) 0 calc(var(--s4) + 4px); font-size: 14px; }
.menu-botao { display: none; background: none; border: 0; color: var(--tinta); padding: var(--s2); cursor: pointer; }
.menu-botao svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .menu-botao { display: inline-flex; }
  .menu {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--asfalto); border-top: 1px solid var(--acostamento); padding: var(--s3) var(--margem) var(--s4);
  }
  .menu.aberto { display: flex; }
  .menu a { padding: var(--s3) 0; border-bottom: 1px solid var(--acostamento); font-size: 17px; }
  .menu .botao { margin-top: var(--s4); min-height: 52px; border-bottom: 0; }
}

/* Abertura */
.abertura {
  position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end;
  background: #0e0f10;
  overflow: hidden;
}
.abertura picture, .abertura picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.abertura picture img { object-fit: cover; object-position: 50% 20%; }
.abertura::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,15,16,0.96) 8%, rgba(14,15,16,0.55) 45%, rgba(14,15,16,0) 75%);
}
.abertura .envelope { position: relative; z-index: 2; width: 100%; padding-top: 180px; padding-bottom: var(--s8); }
.abertura h1 { max-width: 11.5em; }
.abertura .lead { margin: var(--s4) 0 var(--s5); }
.abertura-24h {
  position: absolute; right: var(--margem); bottom: var(--s8); z-index: 2;
  color: var(--tinta); text-align: right; text-decoration: none;
}
.abertura-24h strong { display: block; font-stretch: var(--larga); font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.abertura-24h span { font-size: 14px; color: var(--nevoa); }
@media (max-width: 980px) { .abertura-24h { position: static; text-align: left; margin-top: var(--s6); display: inline-block; } }

/* Faixas de seção */
.faixa { padding: var(--s8) 0; }
.faixa-clara { background: var(--papel); color: var(--grafite); }
.faixa-clara h2, .faixa-clara h3 { color: #121315; }
.faixa-clara .lead { color: #3d4046; }
.faixa-media { background: var(--acostamento); }
.cabeca { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: end; margin-bottom: var(--s7); }
.cabeca p { margin: 0; }
@media (max-width: 860px) { .cabeca { grid-template-columns: 1fr; gap: var(--s4); margin-bottom: var(--s6); } .faixa { padding: var(--s7) 0; } }

/* Linhas de proteção */
.linhas { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--faixa); }
.linha { position: relative; background: var(--asfalto); min-height: 520px; display: flex; align-items: flex-end; overflow: hidden; }
.linha img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.62; }
.linha-texto { position: relative; padding: var(--s6) var(--s5); width: 100%; background: linear-gradient(to top, rgba(23,24,26,0.95) 40%, rgba(23,24,26,0)); }
.linha h3 { font-stretch: var(--larga); font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; letter-spacing: -0.01em; }
.linha p { color: #d3d5d8; margin: var(--s2) 0 var(--s4); }
@media (max-width: 860px) { .linhas { grid-template-columns: 1fr; } .linha { min-height: 400px; } .linha-texto { padding: var(--s5) var(--margem); } }

.coberturas { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); list-style: none; padding: 0; margin: var(--s6) 0 var(--s3); }
.coberturas li { color: var(--tinta); font-weight: 600; font-size: 18px; display: flex; align-items: center; gap: var(--s2); }
.coberturas li::before { content: ""; width: 10px; height: 14px; background: var(--vermelho); clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 45% 50%); }
.aviso { font-size: 14px; color: var(--nevoa); max-width: 52em; }
.faixa-clara .aviso { color: #5b5f66; }

/* Sobre */
.sobre-grade { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); }
.ficha { border-top: 2px solid #121315; }
.ficha div { display: grid; grid-template-columns: 9em 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid #d5d7da; font-size: 15px; }
.ficha dt { color: #5b5f66; }
.ficha dd { margin: 0; color: #121315; font-weight: 550; }
.ficha .fonte { display: block; font-size: 13px; color: #6b6f76; font-weight: 400; }
@media (max-width: 860px) { .sobre-grade { grid-template-columns: 1fr; gap: var(--s6); } .ficha div { grid-template-columns: 1fr; gap: var(--s1); } }

.transparencia { margin-top: var(--s7); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); padding-top: var(--s6); border-top: 1px solid #d5d7da; }
.transparencia h3 { font-size: 22px; font-weight: 650; }
@media (max-width: 860px) { .transparencia { grid-template-columns: 1fr; gap: var(--s3); } }

/* Parcerias */
.parceiros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); list-style: none; padding: 0; margin: 0; }
.parceiro { background: #fff; border: 1px solid #dcdee1; display: flex; flex-direction: column; }
.parceiro-logo { height: 200px; display: grid; place-items: center; padding: var(--s5); border-bottom: 1px solid #e6e7e9; }
.parceiro-logo img { max-height: 132px; width: auto; max-width: 100%; object-fit: contain; }
.parceiro-corpo { padding: var(--s4) var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.parceiro h3 { font-size: 21px; font-weight: 650; }
.parceiro .categoria { font-size: 14px; color: #5b5f66; margin: 0; }
.parceiro p { font-size: 15px; color: #33363b; margin: 0; }
.parceiro .estado { margin-top: auto; padding-top: var(--s3); font-size: 13px; color: #5b5f66; }
.parceiro a { color: #121315; font-weight: 600; font-size: 15px; text-underline-offset: 4px; }
@media (max-width: 980px) { .parceiros { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .parceiros { grid-template-columns: 1fr; } }

/* Contato */
.contatos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--faixa); margin-top: var(--s6); }
.contato { background: var(--acostamento); padding: var(--s5) var(--s4); text-decoration: none; display: block; }
.contato span { display: block; font-size: 14px; color: var(--nevoa); margin-bottom: var(--s2); }
.contato strong { color: var(--tinta); font-size: 19px; font-weight: 650; word-break: break-word; }
a.contato:hover { background: var(--faixa); }
@media (max-width: 980px) { .contatos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contatos { grid-template-columns: 1fr; } }

.cta-final { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: center; }
@media (max-width: 860px) { .cta-final { grid-template-columns: 1fr; } }

/* Páginas internas */
.pagina-topo { padding: var(--s8) 0 var(--s6); border-bottom: 1px solid var(--acostamento); }
.pagina-topo .lead { margin-top: var(--s4); }
.texto-legal { padding: var(--s7) 0 var(--s8); }
.texto-legal h2 { font-size: 24px; font-weight: 650; margin: var(--s6) 0 var(--s3); }
.texto-legal h3 { font-size: 18px; font-weight: 650; margin: var(--s5) 0 var(--s2); }
.texto-legal p, .texto-legal li { color: #c9cbcf; max-width: 46em; }
.texto-legal ul { padding-left: 1.2em; margin: 0 0 var(--s3); }
.texto-legal table { border-collapse: collapse; width: 100%; max-width: 60em; margin: var(--s3) 0 var(--s4); font-size: 15px; }
.texto-legal th, .texto-legal td { text-align: left; border-bottom: 1px solid var(--faixa); padding: var(--s2) var(--s3) var(--s2) 0; vertical-align: top; color: #c9cbcf; }
.texto-legal th { color: var(--tinta); font-weight: 600; }
.tabela-rolagem { overflow-x: auto; }
.versao { font-size: 14px; color: var(--nevoa-escura); }

/* Rodapé */
.rodape { background: #101112; padding: var(--s7) 0 var(--s5); font-size: 14px; }
.rodape-grade { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: var(--s5); }
.rodape h2 { font-size: 15px; font-weight: 650; margin-bottom: var(--s3); }
.rodape ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.rodape a { color: var(--nevoa); text-decoration: none; overflow-wrap: anywhere; }
.rodape a:hover { color: var(--tinta); text-decoration: underline; }
.rodape p { margin-bottom: var(--s2); }
.rodape-base { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--acostamento); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); color: var(--nevoa-escura); }
.rodape-base a { color: var(--nevoa-escura); }
@media (max-width: 860px) { .rodape-grade { grid-template-columns: 1fr 1fr; } .rodape-grade > :first-child { grid-column: 1 / -1; } }

/* Botão flutuante de WhatsApp */
.whats {
  position: fixed; right: var(--s4); bottom: var(--s4); z-index: 30;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: #1f8f4e; color: #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.whats svg { width: 28px; height: 28px; }

@media (max-width: 700px) {
  .abertura::after { background: linear-gradient(to top, rgba(14,15,16,0.97) 30%, rgba(14,15,16,0.7) 62%, rgba(14,15,16,0.1) 92%); }
  .abertura picture img { object-position: 50% 0; }
  .abertura .envelope { padding-top: 260px; padding-bottom: var(--s7); }
}

/* Cotação */
.cotacao-grade { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .cotacao-grade { grid-template-columns: 1fr; gap: var(--s6); } }
.cotacao fieldset { border: 0; padding: 0; margin: 0 0 var(--s6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s4); }
.cotacao legend { font-size: 20px; font-weight: 650; color: #121315; padding: 0; margin-bottom: var(--s4); font-stretch: 112%; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-size: 15px; font-weight: 600; color: #121315; }
.obrig { color: var(--vermelho); }
.opcional { color: #6b6f76; font-weight: 400; font-size: 14px; }
.campo input, .campo select {
  height: 50px; padding: 0 var(--s3); font: inherit; font-size: 16px; color: #121315;
  background: #fff; border: 1px solid #b9bcc1; border-radius: 4px; width: 100%;
}
.campo select:disabled { background: #eceeef; color: #6b6f76; }
.campo input:focus, .campo select:focus { border-color: #121315; outline: 2px solid #121315; outline-offset: 0; }
.campo [aria-invalid="true"] { border-color: #b8042b; }
.campo-erro { color: #b8042b; font-size: 14px; margin: 0; }
.campo-check { flex-direction: row; align-items: center; gap: var(--s2); grid-column: 1 / -1; }
.campo-check input { width: 20px; height: 20px; accent-color: #121315; }
.campo-check label { font-weight: 500; }
.aviso-erro { color: #b8042b; font-weight: 600; }
.cotacao-pronto { background: #fff; border: 1px solid #dcdee1; padding: var(--s6) var(--s5); }
.cotacao-pronto:focus { outline: none; }
.cotacao-pronto .lead { color: #33363b; margin: var(--s3) 0; }
.cotacao-lado { border-top: 2px solid #121315; padding-top: var(--s4); }
.cotacao-lado h2 { font-size: 20px; font-weight: 650; margin-bottom: var(--s3); }
.cotacao-lado p { color: #33363b; }
.cotacao-lado a { color: #121315; font-weight: 600; }
@media (max-width: 640px) { .cotacao fieldset { grid-template-columns: 1fr; } }

.abertura-local { color: var(--tinta); font-size: 16px; margin: calc(-1 * var(--s3)) 0 var(--s5); display: inline-flex; align-items: center; gap: var(--s2); }
.abertura-local::before { content: ""; width: 10px; height: 14px; background: var(--vermelho); clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 45% 50%); }
.abertura-local strong { font-weight: 650; }

.contatos-rodape { gap: var(--s3) !important; }
.contatos-rodape li { display: flex; flex-direction: column; gap: 2px; }
.contatos-rodape span { font-size: 13px; color: var(--nevoa-escura); }
.contatos-rodape span.consultor { color: var(--tinta); font-size: 14px; font-weight: 600; }
.contatos-rodape a[href^="tel:"], .contatos-rodape a[href*="whatsapp"] { white-space: nowrap; }

.contato-email { font-size: 16px !important; overflow-wrap: anywhere; }
.contato-sub { display: block; font-style: normal; font-size: 14px; color: var(--nevoa); margin-top: var(--s1); }

/* Menu do WhatsApp flutuante */
.whats-menu { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 30; }
.whats-menu .whats { position: static; list-style: none; cursor: pointer; }
.whats-menu .whats::-webkit-details-marker { display: none; }
.whats-menu[open] .whats { background: #187a42; }
.whats-painel {
  position: absolute; right: 0; bottom: 68px; width: 260px;
  background: #fff; color: #121315; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); overflow: hidden;
}
.whats-painel p { margin: 0; padding: var(--s3) var(--s3) var(--s2); font-size: 14px; color: #5b5f66; }
.whats-painel a { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3); text-decoration: none; border-top: 1px solid #e6e7e9; color: #121315; }
.whats-painel a:hover, .whats-painel a:focus-visible { background: #eef8f2; }
.whats-painel strong { font-weight: 650; font-size: 15px; }
.whats-painel span { font-size: 14px; color: #1f8f4e; white-space: nowrap; font-weight: 600; }
