/* Globo Moto Peças — site de demonstração
   Linguagem: catálogo de peças (traço técnico, eixo tracejado) + painel de senha de 7 segmentos. */

:root {
  --branco: #FFFFFF;
  --aluminio: #E3E6E9;
  --aluminio-escuro: #C9CED4;
  --grafite: #1C2233;
  --grafite-2: #4A5263;
  --vermelho: #CE2229;
  --vermelho-escuro: #A9191F;
  --preto: #000000;
  --led: #FF4537;
  --traco: #8A919B;

  --f-titulo: "Sofia Sans Condensed", "Arial Narrow", sans-serif;
  --f-texto: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --col: 1180px;
  --gutter: 20px;
  --topo-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topo-h) + 12px); }
body {
  margin: 0;
  background: var(--branco);
  color: var(--grafite);
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-titulo);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: 40px; }
h2 { font-size: 30px; }
h3 { font-size: 23px; }
p { margin: 0 0 1em; max-width: 66ch; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--grafite-2); margin-top: 8px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--grafite); color: var(--branco); padding: 10px 14px; border-radius: 4px;
}
.pular:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--vermelho); outline-offset: 3px; border-radius: 2px; }

/* ---------- Barra demo ---------- */
.demo {
  background: var(--grafite);
  color: #DDE1E7;
  font-size: 13px;
  line-height: 1.35;
  padding: 7px var(--gutter);
  text-align: center;
}

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 20px;
  font-family: var(--f-texto); font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, transform .1s;
}
.botao:active { transform: translateY(1px); }
.botao--vermelho { background: var(--vermelho); color: var(--branco); }
.botao--vermelho:hover { background: var(--vermelho-escuro); }
.botao--linha { background: var(--branco); color: var(--grafite); border-color: var(--grafite); }
.botao--linha:hover { background: var(--aluminio); }
.botao--p { min-height: 40px; padding: 7px 13px; font-size: 15px; }
.botao--largo { width: 100%; }

.link-seta {
  display: inline-block; font-weight: 700; color: var(--grafite);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
  text-decoration-color: var(--vermelho);
  padding: 6px 0;
}
.link-seta:hover { color: var(--vermelho-escuro); }

/* ---------- Cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--aluminio);
}
.topo__in {
  max-width: var(--col); margin: 0 auto; height: var(--topo-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topo__logo { display: block; line-height: 0; }
.logo { width: 142px; height: auto; overflow: visible; }
.topo__acoes { display: flex; gap: 8px; }
.intro-on .topo__logo .logo { opacity: 0; animation: logo-volta 0s linear 3.2s forwards; }
@keyframes logo-volta { to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--col); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: grid; gap: 28px;
}
.hero h1 { max-width: 13ch; }
.hero__lead { font-size: 19px; margin-top: 14px; color: var(--grafite); }
.hero__ctas { display: grid; gap: 10px; margin-top: 18px; }
.hero__foto img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 62%; border-radius: 4px; }

/* Painel de senha (dígitos de 7 segmentos) */
.painel {
  display: flex; align-items: center; gap: 14px;
  background: var(--preto); color: #F2F2F2;
  border-radius: 6px; padding: 12px 14px;
  margin-top: 22px;
  box-shadow: inset 0 0 0 2px #23262B;
}
.painel__hora { flex: 0 0 auto; }
.seg { display: block; width: 112px; height: auto; }
.seg .on { fill: var(--led); filter: drop-shadow(0 0 2.5px rgba(255,69,55,.75)); }
.seg .off { fill: #2B0F0D; }
.painel__status { margin: 0; display: flex; flex-direction: column; line-height: 1.25; }
.painel__linha1 { font-weight: 700; font-size: 17px; }
.painel__linha2 { font-size: 14px; color: #B9BEC6; }
.painel__linha1 .ponto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: #6B7280; }
.painel.aberto .ponto { background: #3DDC84; box-shadow: 0 0 6px #3DDC84; }
.painel.fechado .ponto { background: var(--led); }

/* ---------- Blocos ---------- */
.bloco { padding: 56px 0; }
.bloco__in { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.bloco h2 { max-width: 18ch; margin-bottom: 22px; }

/* Oficina */
.oficina { background: var(--preto); color: #E9ECEF; }
.oficina h2 { color: var(--branco); }
.oficina figcaption { color: #AEB4BD; }
.fatos { margin: 0; display: grid; gap: 0; }
.fatos > div { padding: 16px 0; border-top: 1px solid #3A404C; }
.fatos > div:last-child { border-bottom: 1px solid #3A404C; }
.fatos dt { font-family: var(--f-titulo); font-weight: 800; font-size: 21px; line-height: 1.15; color: var(--branco); }
.fatos dd { margin: 4px 0 0; max-width: 52ch; }
.oficina__foto { margin-top: 28px; }
.oficina__foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

/* Catálogo / diagrama explodido */
.catalogo {
  background-color: var(--branco);
  border-top: 1px solid var(--aluminio);
  border-bottom: 1px solid var(--aluminio);
}
.catalogo__cab p { max-width: 54ch; }
.roda { width: 100%; height: auto; overflow: visible; }
.roda__eixo-linha { stroke: var(--traco); stroke-width: 1.4; stroke-dasharray: 16 5 3 5; }
.parte { will-change: transform; }
.balao line { stroke: var(--grafite); stroke-width: 1.4; }
.balao circle { fill: var(--branco); stroke: var(--grafite); stroke-width: 2; }
.balao text { font-family: var(--f-titulo); font-weight: 800; font-size: 22px; text-anchor: middle; fill: var(--grafite); }
.explode { margin-top: 18px; }
.explode__fixo { padding: 54px 0 8px; }

.pecas { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 2px; }
.pecas li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--aluminio-escuro); background: rgba(255,255,255,.85); }
.pecas__n {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--grafite);
  display: grid; place-items: center;
  font-family: var(--f-titulo); font-weight: 800; font-size: 17px; background: var(--branco);
}
.pecas strong { display: block; font-size: 18px; line-height: 1.25; }
.js .pecas li .pecas__n { transition: background-color .2s, color .2s; }
.pecas li.aceso .pecas__n { background: var(--grafite); color: var(--branco); }
.pecas li > div > span { display: block; color: var(--grafite-2); font-size: 16px; }

.resto { margin-top: 40px; padding: 22px 20px; background: var(--branco); border: 2px solid var(--grafite); border-radius: 4px; }
.resto h3 { margin-bottom: 12px; }
.resto__lista { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.resto__lista li::marker { color: var(--vermelho); }
.resto__nota { margin: 16px 0 0; color: var(--grafite-2); }

/* Capacetes */
.capacetes__in { display: grid; gap: 26px; }
.capacetes__foto img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 30% 55%; border-radius: 4px; }

/* História */
.historia { background: var(--aluminio); }
.historia__quadro { position: relative; }
.historia__quadro > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
/* "Detalhe A": a faixa ampliada, como no catálogo */
.detalhe {
  position: absolute; left: -6px; bottom: 4%; width: 38%; max-width: 250px;
  border: 3px solid var(--grafite); border-radius: 50%; overflow: hidden; aspect-ratio: 1;
  background: var(--branco); box-shadow: 0 0 0 4px var(--branco);
}
.detalhe img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.detalhe__rotulo {
  position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%);
  background: var(--grafite); color: var(--branco); font-family: var(--f-titulo); font-weight: 800;
  font-size: 13px; padding: 2px 8px; border-radius: 3px; white-space: nowrap;
}
.historia__quadro::after {
  /* círculo pequeno marcando a faixa na foto */
  content: ""; position: absolute; left: 14%; top: 26%; width: 13%; aspect-ratio: 1;
  border: 2px solid var(--grafite); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}
.marca-a {
  position: absolute; left: calc(27% + 2px); top: 24%;
  background: var(--grafite); color: var(--branco); font-family: var(--f-titulo); font-weight: 800;
  font-size: 13px; line-height: 1; padding: 3px 6px; border-radius: 3px;
}
.historia__texto { margin-top: 22px; }

/* Google */
.google__resumo { font-size: 19px; }
.temas { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 0; max-width: 60ch; }
.temas li {
  font-family: var(--f-titulo); font-weight: 700; font-size: 22px; line-height: 1.2;
  padding: 14px 0 14px 30px; border-top: 1px solid var(--aluminio-escuro); position: relative;
}
.temas li::before {
  content: ""; position: absolute; left: 2px; top: 22px; width: 14px; height: 14px;
  border-radius: 50%; border: 3px solid var(--vermelho);
}

/* Formulário */
.pergunte { background: var(--aluminio); }
.pergunte__in { display: grid; gap: 24px; }
.form { background: var(--branco); padding: 22px 18px; border-radius: 6px; border: 2px solid var(--grafite); display: grid; gap: 18px; }
.campo { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.campo label, .opcoes legend { font-weight: 700; }
.obrig { font-weight: 400; color: var(--grafite-2); }
input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--grafite);
  padding: 12px 12px; border: 2px solid var(--grafite-2); border-radius: 4px; background: var(--branco);
}
input[type="text"]:focus, textarea:focus { border-color: var(--grafite); outline: 3px solid var(--vermelho); outline-offset: 1px; }
textarea { resize: vertical; min-height: 90px; }
[aria-invalid="true"] { border-color: var(--vermelho) !important; }
.erro { color: var(--vermelho-escuro); font-weight: 600; font-size: 15px; margin: 0; }
.opcoes { gap: 4px; }
.opcoes legend { margin-bottom: 6px; padding: 0; }
.opcoes label, .socorro { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 40px; cursor: pointer; }
.opcoes input, .socorro input { width: 20px; height: 20px; accent-color: var(--vermelho); flex: 0 0 auto; }
.socorro { font-weight: 700; padding: 10px 12px; border: 2px dashed var(--vermelho); border-radius: 4px; }
.form__nota { font-size: 14px; color: var(--grafite-2); margin: -6px 0 0; }

/* Onde fica */
.onde__in { display: grid; gap: 26px; }
address { font-style: normal; font-size: 19px; line-height: 1.45; }
.onde__ref { color: var(--grafite-2); margin-top: 8px; }
.horario { border-collapse: collapse; width: 100%; max-width: 380px; margin: 8px 0 22px; }
.horario th, .horario td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--aluminio-escuro); font-weight: 400; }
.horario td { text-align: right; }
.horario tr.hoje th, .horario tr.hoje td { font-weight: 700; }
.horario tr.hoje th::after { content: " (hoje)"; font-weight: 400; color: var(--grafite-2); }
.onde__ctas { display: grid; gap: 10px; }
.onde__mapa iframe { width: 100%; height: 320px; border: 2px solid var(--grafite); border-radius: 4px; display: block; }

/* Rodapé */
.rodape { background: var(--preto); color: #CDD2D9; padding: 40px 0 110px; font-size: 15px; }
.rodape__in { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.rodape__frase { font-family: var(--f-titulo); font-weight: 800; font-size: 26px; color: var(--branco); margin-bottom: 10px; }
.rodape__redes { display: flex; gap: 18px; }
.rodape__redes a { color: var(--branco); display: inline-block; padding: 12px 0; }
.rodape__demo { color: #8E95A0; font-size: 13px; margin: 18px 0 0; }

/* Botão fixo (celular) */
.fixo {
  position: fixed; left: 50%; bottom: 14px; z-index: 60;
  transform: translate(-50%, 0);
  background: var(--vermelho); color: var(--branco); text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 2px solid var(--branco);
  box-shadow: 0 6px 18px rgba(28,34,51,.28);
  transition: opacity .2s, transform .2s;
}
.fixo.escondido { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }

/* ---------- Abertura ---------- */
.abertura { display: none; }
.intro-on .abertura {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 200;
  cursor: pointer;
  /* trava de segurança: se o JS falhar, some sozinha */
  animation: abertura-seguranca 0s linear 3.2s forwards;
}
@keyframes abertura-seguranca { to { visibility: hidden; opacity: 0; pointer-events: none; } }
.abertura__fundo {
  position: absolute; inset: 0;
  background-color: var(--branco);
}
.abertura__palco { position: relative; width: min(86vw, 620px); transform-origin: 50% 50%; }
.intro-on body { overflow: hidden; }
.abertura__eixo { stroke: #9AA1AA; stroke-width: 1.6; stroke-dasharray: 16 5 3 5; }
.abertura__palco svg { width: 100%; height: auto; overflow: visible; display: block; }
.abertura__pular { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--grafite-2); margin: 0 auto; }

/* Texto que só faz sentido com movimento */
@media (prefers-reduced-motion: reduce) {
  .so-movimento { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
html:not(.js) .so-movimento, html:not(.js) .painel__hora { display: none; }

/* ---------- Telas maiores ---------- */
@media (min-width: 600px) {
  .hero__ctas, .onde__ctas { display: flex; flex-wrap: wrap; }
  .logo { width: 150px; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --topo-h: 76px; }
  h1 { font-size: 58px; }
  h2 { font-size: 40px; }
  h3 { font-size: 26px; }
  .logo { width: 172px; }
  .botao--p { min-height: 44px; padding: 9px 16px; }

  .hero { grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 64px; }
  .hero__foto img { aspect-ratio: 3 / 3.4; }
  .painel { max-width: 460px; }
  .seg { width: 130px; }

  .bloco { padding: 88px 0; }
  .oficina .bloco__in { display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 56px; }
  .oficina h2 { grid-column: 1 / -1; }
  .oficina__foto { margin-top: 0; align-self: start; }

  .catalogo__in { display: grid; grid-template-columns: 1.25fr .75fr; column-gap: 48px; }
  .catalogo__cab { grid-column: 1 / -1; }
  .explode { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr .75fr; column-gap: 48px; min-height: 120vh; }
  .explode__fixo { position: sticky; top: calc(var(--topo-h) + 40px); align-self: start; padding-top: 70px; }
  .pecas { margin-top: 12vh; align-self: start; gap: 7vh; }
  .pecas li { border: 0; padding: 12px; border-left: 3px solid var(--grafite); }
  .resto { grid-column: 1 / -1; display: grid; grid-template-columns: .5fr 1fr; gap: 28px; }
  .resto h3 { margin: 0; }
  .resto__nota { grid-column: 2; margin-top: 0; }

  .capacetes__in { grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
  .capacetes__foto img { aspect-ratio: 4 / 4.4; }

  .historia .bloco__in { display: grid; grid-template-columns: 1.5fr 1fr; column-gap: 48px; }
  .historia h2 { grid-column: 1 / -1; }
  .historia__texto { margin-top: 0; align-self: end; }

  .pergunte__in { grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
  .form { padding: 30px; }

  .onde__in { grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
  .onde__mapa iframe { height: 460px; }

  .rodape { padding-bottom: 48px; }
  .fixo { display: none; }
}
