/* Tecno Moto Retífica — folha de bancada da retífica
   Alumínio claro, preto do painel xadrez, vermelho só da engrenagem, azul de bancada nas cotas. */
:root {
  --aluminio: #F3F2EC; /* papel de desenho */
  --aluminio-escuro: #D9D8CF;
  --branco: #FFFFFF;
  --preto: #000000;
  --vermelho: #E1251B;
  --azul: #245796;
  --grafite: #4B4E52;
  --verde-wa: #0E7C3A;

  --f-titulo: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-cota: "Big Shoulders Text", "Arial Narrow", sans-serif;
  --f-texto: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--aluminio);
  background-image:
    linear-gradient(rgba(36,87,150,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,87,150,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--preto);
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 2px; }

/* ---------- logo (SVG releitura) ---------- */
.logo { display: block; overflow: visible; }
.lg-gear { fill: var(--vermelho); }
.lg-tecno {
  font-family: var(--f-titulo);
  font-weight: 900;
  fill: var(--preto);
  stroke: var(--branco);
  stroke-width: 6px;
  stroke-linejoin: round;
  paint-order: stroke;
}
.lg-serif { font-family: Georgia, "Times New Roman", serif; font-style: italic; fill: var(--branco); }
.lg-moto {
  font-family: var(--f-titulo);
  font-weight: 900;
  fill: var(--branco);
  stroke: var(--preto);
  stroke-width: 1.4px;
  paint-order: fill;
}

/* ---------- barra demo + topo ---------- */
.demo-bar {
  background: var(--preto);
  color: var(--branco);
  font-size: .8125rem;
  padding: 6px var(--gutter);
  text-align: center;
}
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 8px var(--gutter);
  background: var(--aluminio);
  border-bottom: 1.5px solid var(--azul);
}
.topo-logo { display: block; width: 132px; }
.topo-wa {
  font-family: var(--f-cota); font-weight: 700; font-size: 1.05rem;
  text-decoration: none;
  padding: 8px 14px;
  border: 2px solid var(--preto);
  background: var(--branco);
  min-height: 44px; display: inline-flex; align-items: center;
}
.topo-wa:hover { background: var(--preto); color: var(--branco); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  font-family: var(--f-cota); font-weight: 700; font-size: 1.2rem; letter-spacing: .01em;
  text-decoration: none;
  border: 2px solid var(--preto);
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(2px); }
.btn-wa { background: var(--verde-wa); color: var(--branco); border-color: var(--verde-wa); }
.btn-wa:hover { background: #0A6430; border-color: #0A6430; }
.btn-linha { background: var(--branco); color: var(--preto); }
.btn-linha:hover { background: var(--preto); color: var(--branco); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter) 40px;
  display: grid; gap: 0;
}
/* celular: a foto com as cotas entra logo depois do título */
.hero-texto { display: contents; }
.hero-endereco { order: 1; }
.hero h1 { order: 2; }
.hero-nota { order: 3; }
.status { order: 4; justify-self: start; }
.hero-foto { order: 5; margin-bottom: 22px !important; }
.hero-lead { order: 6; }
.hero-acoes { order: 7; }
.hero-endereco {
  font-family: var(--f-cota); font-weight: 600; font-size: 1rem;
  color: var(--grafite);
  margin-bottom: 10px;
}
.hero h1 {
  font-family: var(--f-titulo);
  font-weight: 900;
  font-size: clamp(3.2rem, 16vw, 6.6rem);
  line-height: .88;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-lead { font-size: 1.125rem; max-width: 34em; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
  background: var(--branco);
  border: 2px solid var(--preto);
  padding: 8px 14px;
  margin: 4px 0 18px;
}
.status-luz { width: 12px; height: 12px; border-radius: 50%; background: var(--vermelho); flex: none; }
.status.aberto .status-luz { background: var(--verde-wa); box-shadow: 0 0 0 4px rgba(14,124,58,.18); }
.hero-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-acoes .btn { flex: 1 1 200px; }
.hero-nota { font-size: .98rem; color: var(--grafite); max-width: 30em; }
.hero-nota strong { font-family: var(--f-titulo); font-size: 1.6rem; color: var(--preto); vertical-align: -2px; }

/* foto com linhas de cota */
.cotada { position: relative; margin: 0; }
.cotada img { width: 100%; border: 2px solid var(--preto); }
.cotada-quadro { position: relative; }
.cotas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cotas path { fill: none; stroke: var(--azul); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.cotas circle { fill: var(--branco); stroke: var(--azul); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.chamada {
  position: absolute;
  transform: translateY(-50%);
  font-family: var(--f-cota); font-weight: 700; font-size: .95rem; line-height: 1;
  color: var(--azul);
  background: var(--branco);
  border: 1.5px solid var(--azul);
  padding: 5px 7px 6px;
  white-space: nowrap;
}
.cotada figcaption, .bancada figcaption, .onde-foto figcaption {
  font-size: .875rem; color: var(--grafite);
  padding-top: 8px;
}

/* ---------- seções: base ---------- */
.retifica, .multimarcas, .avaliacoes, .orcamento, .onde {
  max-width: var(--max); margin: 0 auto;
  padding: 56px var(--gutter);
}
h2 {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: clamp(2.3rem, 9vw, 4rem);
  line-height: .95;
  margin-bottom: 14px;
}
h3 { font-family: var(--f-cota); font-weight: 700; font-size: 1.35rem; line-height: 1.15; margin-bottom: 4px; }
.secao-lead { font-size: 1.1rem; max-width: 36em; }

/* ---------- retífica + momento de scroll ---------- */
.retifica {
  border-top: 1.5px solid var(--azul);
  display: flex; flex-direction: column;
}
/* celular: título e explicação antes do desenho */
.retifica-texto { display: contents; }
.retifica h2 { order: 1; }
.retifica .secao-lead { order: 2; margin-bottom: 22px; }
.retifica-desenho { order: 3; }
.servicos-retifica, .bancada, .oficinas { order: 4; }
.retifica-desenho {
  position: relative;
  background: var(--branco);
  border: 1.5px solid var(--azul);
  padding: 52px 18px 14px;
  /* papel milimetrado de bancada, bem leve */
  background-image:
    linear-gradient(rgba(36,87,150,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,87,150,.08) 1px, transparent 1px);
  background-size: 20px 20px;
}
.cilindro { width: 100%; max-width: 300px; height: auto; margin: 0 auto; display: block; overflow: visible; }
.pistao { transform: translateY(var(--py, -10px)); }
.cota-txt { font-family: var(--f-cota); font-weight: 700; font-size: 15px; fill: var(--azul); }
.ponteiro {
  position: absolute; top: 12px; left: 14px;
  background: var(--branco); padding: 2px 6px;
  font-family: var(--f-cota); font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; gap: 10px;
}
.ponteiro::before {
  content: ""; width: 26px; height: 3px; background: var(--vermelho);
}
.servicos-retifica { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; }
.servicos-retifica li {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start;
  padding: 16px 0;
  border-top: 1.5px solid var(--preto);
}
.servicos-retifica li.sem-foto { grid-template-columns: 1fr; }
.servicos-retifica img { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--preto); }
.servicos-retifica p { margin: 0; color: var(--grafite); }
.bancada { margin: 18px 0 0; }
.bancada img { border: 2px solid var(--preto); }
.oficinas {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--branco);
  border-left: 6px solid var(--azul);
}
.oficinas a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--azul); }

/* o painel xadrez das fotos da oficina, uma vez, abrindo a retífica */
.retifica { border-top: 0 !important; padding-top: 0; }
.retifica::before {
  content: ""; display: block; order: 0; grid-column: 1 / -1;
  height: 16px; margin: 0 calc(var(--gutter) * -1) 44px;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}

/* ---------- multimarcas ---------- */
.multimarcas { border-top: 1.5px solid var(--azul); }
.galeria {
  list-style: none; margin: 26px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 10px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%;
  gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.galeria li { scroll-snap-align: start; }
.galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--preto); }
.galeria p { margin: 10px 0 0; font-size: .98rem; color: var(--grafite); }
.galeria strong { display: block; font-family: var(--f-cota); font-size: 1.25rem; color: var(--preto); }

/* ---------- avaliações ---------- */
.avaliacoes {
  border-top: 1.5px solid var(--azul);
  display: grid; gap: 34px;
}
.barras { border-collapse: collapse; width: 100%; max-width: 520px; margin-top: 10px; }
.barras th { text-align: left; font-weight: 500; font-size: .95rem; white-space: nowrap; padding: 6px 12px 6px 0; width: 1%; }
.barras td { padding: 6px 0; }
.barras .num { font-family: var(--f-cota); font-weight: 700; font-size: 1.2rem; text-align: right; width: 2.4em; padding-left: 10px; }
.barra {
  display: block; height: 14px;
  background: var(--branco);
  border: 1.5px solid var(--preto);
  position: relative;
}
.barra::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: calc(var(--v) / 71 * 100%);
  background: var(--preto);
}
.aval-temas dl { margin: 12px 0 0; display: grid; gap: 0; }
.aval-temas dl > div { padding: 14px 0; border-top: 1.5px solid var(--preto); }
.aval-temas dt { font-family: var(--f-cota); font-weight: 700; font-size: 1.3rem; }
.aval-temas dd { margin: 2px 0 0; color: var(--grafite); }
.fonte { font-size: .85rem; color: var(--grafite); margin-top: 8px; }

/* ---------- orçamento ---------- */
.orcamento {
  border-top: 1.5px solid var(--azul);
  display: grid; gap: 22px;
}
.orc-tel a { font-weight: 600; }
.form {
  background: var(--branco);
  border: 2px solid var(--preto);
  padding: 20px 16px;
  display: grid; gap: 16px;
}
.campo label { display: block; font-weight: 600; margin-bottom: 6px; }
.opcional { font-weight: 400; color: var(--grafite); }
.campo input, .campo select, .campo textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: 12px;
  border: 1px solid var(--preto);
  border-radius: 0;
  background: var(--branco);
  color: var(--preto);
  min-height: 48px;
}
.campo [aria-invalid="true"] { border-color: var(--vermelho); border-width: 2px; }
.erro { color: #B3140C; font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.form .btn { width: 100%; }
.form-aviso { margin: 0; font-size: .95rem; color: var(--grafite); min-height: 1.4em; }

/* ---------- onde fica ---------- */
.onde { border-top: 1.5px solid var(--azul); }
.onde-grade { display: grid; gap: 22px; margin-top: 8px; }
.onde-foto { margin: 0; }
.onde-foto img { border: 2px solid var(--preto); width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.onde-end { font-size: 1.15rem; font-weight: 500; }
.onde-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.onde-acoes .btn { flex: 1 1 140px; }
.horario { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.horario caption { text-align: left; font-family: var(--f-cota); font-weight: 700; font-size: 1.35rem; margin-bottom: 6px; }
.horario th, .horario td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--aluminio-escuro); font-size: 1rem; }
.horario th { font-weight: 500; }
.horario tr.hoje { background: var(--branco); }
.horario tr.hoje th, .horario tr.hoje td { font-weight: 700; border-top: 2px solid var(--preto); }
.horario tr.hoje th::after { content: " (hoje)"; font-weight: 500; color: var(--grafite); }
.onde-extra { font-size: .95rem; color: var(--grafite); }
.mapa { width: 100%; height: 300px; border: 2px solid var(--preto); background: var(--aluminio-escuro); }

/* ---------- carimbo (rodapé) ---------- */
.carimbo {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}
.carimbo-grade {
  border: 1.5px solid var(--azul);
  background: var(--branco);
  display: grid; grid-template-columns: 1fr 1fr;
}
.carimbo-grade > div { padding: 10px 12px; border-right: 1px solid var(--preto); border-bottom: 1px solid var(--preto); font-size: .95rem; }
.carimbo-grade > div:nth-child(2n) { border-right: 0; }
.c-logo { grid-column: 1 / -1; border-right: 0 !important; padding: 14px 12px !important; }
.c-logo .logo { width: 180px; }
.c-cel:nth-last-child(1) { grid-column: 1 / -1; border-bottom: 0; }
.c-rot { display: block; font-family: var(--f-cota); font-weight: 600; font-size: .9rem; color: var(--azul); margin-bottom: 2px; }
.c-cel a { font-weight: 600; }

/* ---------- WhatsApp fixo (celular) ---------- */
.wa-fixo {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 14px; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  min-height: 54px;
  background: var(--verde-wa); color: var(--branco);
  font-family: var(--f-cota); font-weight: 700; font-size: 1.25rem;
  text-decoration: none;
  border: 2px solid var(--preto);
  transform: translateY(140%);
  transition: transform .25s ease;
}
.wa-fixo.visivel { transform: none; }
@media (prefers-reduced-motion: reduce) { .wa-fixo { transition: none; } }

/* ---------- abertura ---------- */
.intro { display: none; }
.intro-on .intro {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 100;
  background: var(--aluminio);
  background-image:
    linear-gradient(rgba(36,87,150,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,87,150,.07) 1px, transparent 1px);
  background-size: 24px 24px;
  cursor: pointer;
}
.intro-on body { overflow: hidden; }
.intro-on .topo-logo { visibility: hidden; }
.intro-logo { width: min(78vw, 520px); transform-origin: 0 0; }
.intro-cut { fill: none; stroke: var(--azul); stroke-width: 1.6; stroke-linejoin: round; }
.intro-tool { fill: var(--vermelho); stroke: var(--branco); stroke-width: 1.2; }
.intro-skip {
  position: absolute; bottom: 28px; left: 0; right: 0; text-align: center;
  font-family: var(--f-cota); font-weight: 600; font-size: .95rem; color: var(--grafite);
}
/* estado inicial dos elementos do logo durante a abertura */
.intro-on .intro .lg-gear { fill: transparent; }
.intro-on .intro .lg-tecno { opacity: 0; }
.intro-on .intro .lg-plate { clip-path: inset(0 100% 0 0); }
.intro .lg-gear-wrap { transform-origin: 60px 60px; transform-box: view-box; }
.intro .lg-tecno { transform-box: fill-box; }

/* chamadas do hero desenham depois da abertura */
.cotas path { stroke-dasharray: var(--len, 600); stroke-dashoffset: 0; }
.intro-on .hero-foto:not(.cotas-ok) .cotas path { stroke-dashoffset: var(--len, 600); }
.intro-on .hero-foto:not(.cotas-ok) .chamada, .intro-on .hero-foto:not(.cotas-ok) .cotas circle { opacity: 0; }
.hero-foto .cotas path { transition: stroke-dashoffset .6s cubic-bezier(.6,0,.2,1); }
.hero-foto .chamada, .hero-foto .cotas circle { transition: opacity .3s ease .45s; }
@media (prefers-reduced-motion: reduce) {
  .hero-foto .cotas path, .hero-foto .chamada, .hero-foto .cotas circle { transition: none; }
}

/* ---------- tablet / desktop ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .topo-logo { width: 150px; }
  .galeria { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto; overflow: visible; margin: 26px 0 0; padding: 0; }
  .servicos-retifica li { grid-template-columns: 140px 1fr; }
  .servicos-retifica img { width: 140px; height: 105px; }
  .carimbo-grade { grid-template-columns: repeat(3, 1fr); }
  .carimbo-grade > div:nth-child(2n) { border-right: 1px solid var(--preto); }
  .carimbo-grade > div:nth-child(3n+1) { border-right: 0; }
  .c-cel:nth-last-child(1) { grid-column: auto; border-bottom: 0; }
}

@media (min-width: 960px) {
  :root { --gutter: 40px; }
  .topo { padding-top: 10px; padding-bottom: 10px; }
  .topo-logo { width: 168px; }
  .hero { grid-template-columns: 5fr 7fr; align-items: center; gap: 48px; padding-top: 44px; padding-bottom: 64px; }
  .hero-texto { display: block; }
  .hero-foto { margin-bottom: 0 !important; }
  .hero h1 { font-size: clamp(4rem, 5.7vw, 5.9rem); }
  .chamada { font-size: 1.05rem; }

  .retifica { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .retifica-texto { display: block; }
  .retifica .secao-lead { margin-bottom: 1em; }
  .retifica-desenho { position: sticky; top: 104px; }
  .retifica::before { grid-row: 1; }
  .retifica-texto { grid-column: 2; grid-row: 2; }
  .retifica-desenho { grid-column: 1; grid-row: 2; }

  .galeria { grid-template-columns: repeat(4, 1fr); }
  .avaliacoes { grid-template-columns: 1fr 1fr; gap: 64px; }
  .orcamento { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .onde-grade { grid-template-columns: 4fr 4fr 5fr; align-items: start; }
  .mapa { height: 100%; min-height: 420px; }

  .carimbo-grade { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .c-logo { grid-column: 1; grid-row: 1 / 3; border-right: 1px solid var(--preto) !important; display: flex; align-items: center; border-bottom: 0 !important; }
  .carimbo-grade > div { border-right: 1px solid var(--preto); }
  .carimbo-grade > div:nth-child(4), .carimbo-grade > div:nth-child(7) { border-right: 0; }
  .carimbo-grade > div:nth-child(n+5) { border-bottom: 0; }
  .c-cel:nth-last-child(1) { grid-column: auto; }
  .carimbo { padding-bottom: 48px; }
  .wa-fixo { display: none; }
}
