/* Preto e vermelho da logo, com grão de papel de oficina por cima de tudo. */
:root {
  --preto: #000; /* igual ao fundo da logo, para ela não ter borda visível */
  --carvao: #161618;
  --vermelho: #dc2424;
  --osso: #f1efea;
  --suave: #b7b3ac;
  --linha: #2d2d31;
  --foco: #fff;
  --raio: 3px;
  --largura: 72rem;
}

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

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--preto); }

body {
  margin: 0;
  padding-bottom: 4.75rem;
  background: var(--preto);
  color: var(--osso);
  font: 400 1.0625rem/1.6 "Archivo", system-ui, sans-serif;
}

/* Grão: camada fixa, sem animação e sem interferir nos cliques */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: url("../media/grain.png"); opacity: .1;
}

img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, address, table { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }

.container { width: min(100% - 2.5rem, var(--largura)); margin-inline: auto; }

.pular {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--vermelho); color: #fff; font-weight: 700;
}
.pular:focus { top: .75rem; }

h1, h2, h3 { font-stretch: 125%; font-weight: 800; line-height: 1.08; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
h2 { font-size: clamp(1.85rem, 7vw, 3.25rem); }

.sec { padding-block: clamp(3.5rem, 9vw, 7rem); }

/* Divisor entre seções: riscos de pneu em vermelho que somem para um lado */
.divisor {
  height: 1.75rem; background-color: var(--preto);
  background-image: repeating-linear-gradient(-62deg, var(--vermelho) 0 .55rem, transparent .55rem 1.2rem);
  -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 20%, transparent 100%);
}
.divisor--espelho {
  -webkit-mask-image: linear-gradient(270deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 20%, transparent 100%);
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .7rem 1.35rem;
  border: 2px solid transparent; border-radius: var(--raio);
  font: 700 1rem/1.2 "Archivo", system-ui, sans-serif; font-stretch: 112%;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn--sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .9375rem; }
.btn--vermelho { background: var(--vermelho); color: #fff; }
.btn--preto { background: var(--preto); color: #fff; }
.btn--contorno { border-color: #fff; background: transparent; color: #fff; }
.btn:active { transform: translateY(1px); }
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 rgb(255 255 255 / .4); }
  .btn--contorno:hover { background: #fff; color: var(--preto); }
}

/* Topo */
.topo { position: sticky; top: 0; z-index: 50; background: var(--preto); border-bottom: 1px solid var(--linha); }
.topo__linha { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.marca { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 700; font-stretch: 112%; font-size: .9375rem; line-height: 1.15; color: #fff; }
.marca img { width: 3.5rem; height: 3.5rem; }
.menu, .topo .btn { display: none; }

/* Hero */
.hero { position: relative; background: var(--preto); }
.hero__foto { display: block; }
.hero__foto img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 62% 50%; }
.hero__painel {
  position: relative; margin: -2.25rem 1rem 0; padding: 4rem 1.25rem 1.5rem;
  background: var(--preto); border: 1px solid var(--linha); border-top: 0;
}
.hero__logo {
  position: absolute; top: 0; left: 1.25rem; z-index: 1; width: 5.5rem; height: 5.5rem;
  transform: translateY(-50%); border: 1px solid var(--linha); border-radius: var(--raio);
}
.hero__painel::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: 0; height: .6rem;
  background: var(--vermelho); transform-origin: left;
}
.hero h1 { font-size: clamp(1.7rem, 7.4vw, 3.4rem); }
.hero__painel > p:not(.hero__fim) { margin-top: 1rem; max-width: 34rem; color: var(--osso); }
.acoes { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero__fim { margin-top: 1.25rem; font-size: .9375rem; color: var(--suave); }

/* Serviços */
.servicos__grade { display: grid; gap: 2rem; }
.servicos__intro p { margin: 1rem 0 1.5rem; max-width: 26rem; color: var(--suave); }
.servicos__lista { border-bottom: 1px solid var(--linha); }
.servico { display: grid; gap: .3rem 2rem; padding: 1.25rem 0; border-top: 1px solid var(--linha); }
.servico h3 { font-size: clamp(1.2rem, 4.6vw, 1.75rem); }
.servico p { max-width: 32rem; color: var(--suave); }

/* Vídeo: bloco vermelho para quebrar o ritmo da página */
.video { background: var(--vermelho); color: #fff; }
.video__grade { display: grid; gap: 2rem; }
.video__texto p { margin: 1rem 0 1.5rem; max-width: 30rem; color: #fff; }
.video__player {
  width: min(100%, 19rem); aspect-ratio: 9 / 16; object-fit: cover; background: #000;
  box-shadow: .6rem .6rem 0 var(--preto);
}

/* A oficina e galeria */
.oficina { background: var(--carvao); }
.oficina__texto p { margin-top: 1rem; max-width: 38rem; color: var(--suave); }
.galeria { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 2.5rem; }
.g { position: relative; }
.g--a, .g--d { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.g--b, .g--c { aspect-ratio: 4 / 5; }
.moldura { position: relative; height: 100%; overflow: hidden; background: var(--preto); }
.moldura picture { display: block; height: 100%; }
.moldura img { width: 100%; height: 100%; object-fit: cover; }
.g figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.25rem .9rem .7rem;
  background: linear-gradient(transparent, rgb(0 0 0 / .78)); color: #fff; font-size: .875rem; line-height: 1.35;
}

/* Responsável */
.responsavel { background: var(--preto); }
.responsavel__corpo { padding-block: clamp(3rem, 8vw, 5.5rem); }
.responsavel__corpo > * { border-left: .5rem solid var(--vermelho); padding-left: 1.25rem; }
.responsavel h2 { font-size: clamp(1.9rem, 8.2vw, 4.5rem); }
.responsavel p { padding-top: 1rem; max-width: 34rem; color: var(--suave); }
.responsavel .acoes { border-left: 0; padding-left: 0; margin-top: 1.5rem; }

/* Visite */
.visite { background: var(--carvao); }
.visite__grade { display: grid; gap: 2.5rem; }
.visite address { margin-top: 1.25rem; font-size: 1.1875rem; line-height: 1.5; }
.visite h3 { margin-top: 2rem; font-size: 1.125rem; }
.horario { width: 100%; max-width: 26rem; margin-top: .75rem; border-collapse: collapse; }
.horario th, .horario td { padding: .6rem .5rem; border-top: 1px solid var(--linha); text-align: left; font-weight: 400; }
.horario td { text-align: right; font-variant-numeric: tabular-nums; }
.horario tr:last-child th, .horario tr:last-child td { border-bottom: 1px solid var(--linha); }
.horario .fechado { color: var(--suave); }
.horario [aria-current] { background: var(--vermelho); color: #fff; }
.horario [aria-current] th, .horario [aria-current] td { font-weight: 700; }
.mapa { display: none; place-items: center; aspect-ratio: 4 / 3; background: var(--preto); border: 1px solid var(--linha); }
.js .mapa { display: grid; }
.mapa iframe { width: 100%; height: 100%; border: 0; }
.mapa__link { display: inline-block; margin-top: .75rem; font-weight: 600; text-underline-offset: .2em; }

/* Rodapé */
.rodape { background: var(--preto); border-top: 1px solid var(--linha); }
.rodape__topo { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 7vw, 4.5rem); }
.rodape__marca img { width: 6rem; height: 6rem; margin-bottom: 1.25rem; }
.rodape__nome { font-weight: 800; font-stretch: 125%; font-size: 1.25rem; color: #fff; }
.rodape__marca p + p { margin-top: .25rem; color: var(--suave); }
.rodape address { margin-top: 1rem; color: var(--suave); line-height: 1.55; }
.rodape h2 { margin-bottom: .75rem; font-size: 1rem; letter-spacing: 0; }
.rodape__sub { margin-top: 1.5rem; }
.rodape__col li { color: var(--suave); padding-block: .2rem; }
.rodape__col a { display: inline-block; padding-block: .25rem; color: var(--osso); text-underline-offset: .2em; text-decoration: none; }
.rodape__col a:hover, .rodape__col a:focus-visible { text-decoration: underline; }
.rodape__col p { color: var(--suave); }
.rodape__base { border-top: 1px solid var(--linha); font-size: .875rem; color: var(--suave); }
.rodape__base-linha { display: grid; gap: .5rem; padding-block: 1.25rem; }
.rodape__base a { display: inline-block; padding-block: .25rem; color: var(--osso); text-underline-offset: .2em; }

/* Páginas de texto (privacidade) */
.pagina { min-height: 50svh; padding-block: clamp(3.5rem, 9vw, 6rem); }
.pagina h1 { font-size: clamp(1.9rem, 7vw, 3.25rem); }
.pagina p { margin-top: 1rem; color: var(--suave); }
.pagina .btn { margin-top: 1.75rem; }

/* Barra de contato fixa no celular */
.barra {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: .6rem;
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
  background: var(--preto); border-top: 1px solid var(--linha);
}

/* Telas maiores */
@media (min-width: 60rem) {
  body { padding-bottom: 0; }
  .barra { display: none; }
  .topo .btn { display: inline-flex; }
  .menu { display: flex; gap: 2rem; margin-left: auto; margin-right: 2rem; }
  .menu a { text-decoration: none; font-weight: 600; padding-block: .5rem; background: linear-gradient(var(--vermelho), var(--vermelho)) 0 100% / 0 3px no-repeat; transition: background-size .25s ease; }
  .menu a:hover, .menu a:focus-visible { background-size: 100% 3px; }

  .hero { display: grid; align-items: end; min-height: min(82svh, 52rem); }
  .hero__foto { position: absolute; inset: 0; }
  .hero__foto img { height: 100%; aspect-ratio: auto; object-position: 60% 45%; }
  .hero__painel {
    width: min(34rem, 100% - 2.5rem); margin: 0 0 0 max(1.25rem, calc((100vw - var(--largura)) / 2));
    padding: 5rem 2.25rem 2rem; border: 0;
  }
  .hero__logo { left: 2.25rem; width: 7rem; height: 7rem; }
  .hero__painel::before { left: 0; right: 0; }

  .servicos__grade { grid-template-columns: 4fr 8fr; gap: 4rem; align-items: start; }
  .servicos__intro { position: sticky; top: 6rem; }
  .servico { grid-template-columns: 1fr 1fr; align-items: baseline; padding: 1.6rem 0; }
  .servico p { grid-column: 2; grid-row: 1; }
  .servico h3 { grid-column: 1; grid-row: 1; }

  .video__grade { grid-template-columns: 1fr auto; gap: 5rem; align-items: center; }
  .video__player { width: 20rem; justify-self: end; }

  .galeria { grid-template-columns: repeat(12, 1fr); grid-auto-rows: 26rem; gap: 1rem; margin-top: 3.5rem; }
  .g--a, .g--b, .g--c, .g--d { aspect-ratio: auto; }
  .g--a { grid-column: 1 / 8; }
  .g--b { grid-column: 8 / 13; }
  .g--c { grid-column: 1 / 6; }
  .g--d { grid-column: 6 / 13; }
  .g figcaption { font-size: .9375rem; padding: 3rem 1.25rem .9rem; }

  .visite__grade { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
  .rodape__topo { grid-template-columns: 1.3fr 1fr 1.2fr 1.3fr; gap: 3rem; }
  .rodape__base-linha { grid-template-columns: 1fr auto auto; gap: 2rem; align-items: center; }
}

/* Movimento: só decorativo, nunca esconde conteúdo sem JavaScript */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero__painel::before { animation: pintar .9s .2s cubic-bezier(.7, 0, .2, 1) backwards; }
  @keyframes pintar { from { transform: scaleX(0); } }

  .js [data-rev] .moldura::after {
    content: ""; position: absolute; inset: 0; background: var(--vermelho);
    transform-origin: top; transition: transform .9s cubic-bezier(.7, 0, .2, 1);
  }
  .js [data-rev] img { transform: scale(1.08); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
  .js [data-rev].em .moldura::after { transform: scaleY(0); }
  .js [data-rev].em img { transform: none; }
}

/* Faixa de serviços rolando, no estilo da placa da fachada */
.faixa-servicos { overflow: hidden; background: var(--vermelho); color: #fff; }
.faixa-servicos__trilho { display: flex; width: max-content; }
.faixa-servicos__grupo { display: flex; flex: none; }
.faixa-servicos__grupo span {
  display: flex; align-items: center; gap: 1.25rem; padding: .7rem 0 .7rem 1.25rem;
  font-weight: 800; font-stretch: 125%; font-size: clamp(1.1rem, 3.4vw, 1.75rem); white-space: nowrap;
}
.faixa-servicos__grupo span::after { content: ""; width: .45rem; height: 1.4em; background: var(--preto); transform: skewX(-20deg); }

/* Fotos ampliáveis */
.g__abrir { display: none; position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: none; cursor: zoom-in; }
.js .g__abrir { display: block; }
.ampliar {
  width: min(100% - 1.5rem, 60rem); max-height: calc(100svh - 1.5rem); padding: .75rem; overflow: auto;
  border: 1px solid var(--linha); background: var(--preto); color: #fff;
}
.ampliar[open] { display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: .75rem; align-items: center; }
.ampliar .btn { min-height: 2.75rem; padding-inline: 1rem; }
.ampliar::backdrop { background: rgb(0 0 0 / .9); }
.ampliar img { grid-column: 1 / -1; width: 100%; height: auto; max-height: 68svh; object-fit: contain; }
.ampliar p { grid-column: 1 / -1; text-align: center; color: var(--suave); font-size: .9375rem; }
.ampliar__ant { justify-self: start; }
.ampliar__prox { justify-self: end; }
html:has(dialog[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  /* Faixa de serviços */
  .faixa-servicos__trilho { animation: rolar 45s linear infinite; }
  @keyframes rolar { to { transform: translateX(-50%); } }
  @media (hover: hover) { .faixa-servicos:hover .faixa-servicos__trilho { animation-play-state: paused; } }

  /* Entrada do hero: o texto já está na tela, só ganha um leve deslize */
  .hero__foto { overflow: hidden; }
  .hero__foto img { animation: zoom 1.8s cubic-bezier(.2, .7, .2, 1) backwards; }
  @keyframes zoom { from { transform: scale(1.08); } }
  .hero h1, .hero__painel > p:not(.hero__fim), .hero .acoes, .hero__fim { animation: entra .6s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero__painel > p:not(.hero__fim) { animation-delay: .08s; }
  .hero .acoes { animation-delay: .16s; }
  .hero__fim { animation-delay: .24s; }
  @keyframes entra { from { opacity: 0; transform: translateY(14px); } }
  .hero__logo { animation: selo .6s .1s cubic-bezier(.2, .7, .2, 1) backwards; }
  @keyframes selo { from { opacity: 0; transform: translateY(-50%) scale(.85); } }

  /* Divisores se desenham e as linhas dos serviços crescem ao rolar */
  .js .divisor { transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.7, 0, .2, 1); }
  .js .divisor--espelho { transform-origin: right; }
  .js .divisor.em { transform: none; }
  .servico { position: relative; }
  .js .servico::before {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--vermelho);
    transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.7, 0, .2, 1);
  }
  .js .servico.em::before { transform: none; }

  .ampliar[open] { animation: abrir .25s ease-out; }
  @keyframes abrir { from { opacity: 0; transform: scale(.97); } }
}

/* Sem movimento: a faixa vira uma linha de texto parada, sem a cópia */
@media (prefers-reduced-motion: reduce) {
  .faixa-servicos__trilho { width: auto; }
  .faixa-servicos__grupo { flex-wrap: wrap; justify-content: center; }
  .faixa-servicos__grupo--copia { display: none; }
}

/* Grão tremendo como filme antigo, só em tela grande com mouse */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (min-width: 60rem) {
  body::after { inset: -50%; animation: grao .9s steps(1) infinite; will-change: transform; }
  @keyframes grao {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-4%, 3%); }
    40%  { transform: translate(3%, -5%); }
    60%  { transform: translate(-6%, -2%); }
    80%  { transform: translate(5%, 4%); }
  }
}
