/* Guimarchaves, Oficina Agostinho Félix: pré-visualização.
   Materiais da oficina: metal das chaves em bruto, chapa branca das matrículas, preto dos comandos,
   madeira do balcão. O vermelho do logótipo fica só nos botões. */

@font-face { font-family: "Anton"; src: url(fonts/anton.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url(fonts/sofia-sans.woff2) format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --metal: #d6d9db;
  --metal-2: #c5c9cc;
  --chapa: #f7f7f3;
  --preto: #141414;
  --cinza: #45484b;
  --fio: #a9aeb2;
  --vermelho: #d31d1d;
  --vermelho-esc: #a90f0a;
  --azul: #0b3ea8;
  --madeira: #7a4a2c;
  --latao: #c9a646;
  --foco: #0b3ea8;
  --titulo: "Anton", Impact, "Arial Narrow", sans-serif;
  --texto: "Sofia Sans", "Segoe UI", Arial, sans-serif;
  --lado: clamp(16px, 4.4vw, 64px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--metal); color: var(--preto); font: 400 17.5px/1.5 var(--texto); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ol, ul, dl, dd, blockquote, figure, fieldset, pre { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: rgba(11, 62, 168, .18); }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
.nw { white-space: nowrap; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 400; letter-spacing: .005em; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.02; }
h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.05; }

.salta { position: absolute; left: 8px; top: -60px; background: var(--chapa); color: var(--preto); padding: 10px 14px; z-index: 30; }
.salta:focus { top: 8px; }

/* ---------- topo ---------- */
.topo { --foco: #8fb0ff; position: sticky; top: 0; z-index: 20; background: var(--preto); color: #f7f7f3; display: flex; align-items: center; gap: 26px; padding: 9px var(--lado); }
.marca { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.marca img { height: 46px; width: auto; }
.marca-nome { font: 400 1.55rem/1 var(--titulo); letter-spacing: .02em; }
.menu { display: flex; gap: 24px; font-size: .98rem; font-weight: 500; }
.menu a { text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--vermelho); }
.ligar { text-decoration: none; background: var(--vermelho); color: #fff; font-weight: 700; padding: 11px 20px; border-radius: 8px; white-space: nowrap; }
.ligar:hover { background: var(--vermelho-esc); }

/* ---------- botões ---------- */
.bt { display: inline-block; text-decoration: none; border: 0; background: var(--vermelho); color: #fff; font-weight: 700; padding: 14px 24px; border-radius: 8px; transition: background-color .15s ease, transform .15s ease; }
.bt:hover { background: var(--vermelho-esc); transform: translateY(-2px); }
.bt:active { transform: translateY(0); }
.bt2 { display: inline-block; text-decoration: none; border: 2px solid var(--preto); background: var(--preto); color: #f7f7f3; font-weight: 700; padding: 11px 20px; border-radius: 8px; min-height: 48px; transition: background-color .15s ease, color .15s ease; }
.bt2:hover { background: transparent; color: var(--preto); }
.bt2:disabled { cursor: default; }
.lk { display: inline-block; background: none; border: 0; font-weight: 700; padding: 12px 0; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 2px; }
.lk:hover { text-decoration-color: var(--vermelho); }
.acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; margin-top: 22px; }

/* ---------- abertura ---------- */
.abre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 24px clamp(24px, 4vw, 64px); align-items: center; padding: clamp(28px, 4vw, 60px) var(--lado) clamp(36px, 5vw, 72px); overflow: clip; }
h1 { font-size: clamp(3rem, 6.6vw, 6rem); line-height: 1.18; text-transform: uppercase; max-width: 13.5ch; }
.lead { margin-top: 22px; max-width: 44ch; font-size: 1.16rem; }
.hoje { margin-top: 18px; font-weight: 600; max-width: 46ch; }
.placas { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; margin-top: 26px; border-top: 2px solid var(--preto); }
.placas li { padding: 12px 22px 0 0; margin-right: 22px; border-right: 1px solid var(--fio); font-size: .9rem; line-height: 1.3; max-width: 19ch; }
.placas li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.placas b { display: block; font: 400 1.9rem/1.1 var(--titulo); letter-spacing: .02em; }
.roda { position: relative; margin-right: -13vw; }
.roda img { width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; border: 10px solid var(--chapa); box-shadow: 0 0 0 2px var(--preto), 0 18px 40px rgba(20, 20, 20, .28); transform: rotate(var(--r, 0deg)); will-change: transform; background: var(--madeira); }
.roda figcaption { margin-top: 12px; font-size: .86rem; color: var(--cinza); }

/* ---------- serviços ---------- */
.atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.atalhos a { text-decoration: none; border: 2px solid var(--preto); border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: .97rem; min-height: 48px; display: inline-flex; align-items: center; transition: background-color .15s ease, color .15s ease; }
.atalhos a:hover { background: var(--preto); color: #f7f7f3; }
.servico { scroll-margin-top: 80px; }
.servicos { padding: clamp(36px, 5vw, 72px) var(--lado) clamp(20px, 3vw, 40px); background: var(--chapa); }
.servico { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px clamp(24px, 5vw, 80px); align-items: start; border-top: 2px solid var(--preto); padding: clamp(28px, 4vw, 56px) 0; margin-top: clamp(22px, 3vw, 36px); }
.servico + .servico { margin-top: 0; }
.servico.inv .servico-texto { order: 2; }
.servico-texto p { margin-top: 14px; max-width: 46ch; }
.servico-texto .nota { font-size: .95rem; color: var(--cinza); }
.lista { margin-top: 16px; display: grid; gap: 0; max-width: 46ch; }
.lista li { border-top: 1px solid var(--fio); padding: 9px 0 9px 26px; position: relative; font-weight: 600; }
.lista li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 12px; height: 4px; background: var(--vermelho); }
.servico-foto, .bancada, .oficina-chapa { width: 100%; max-width: 560px; }
.servico-foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 80%; border-radius: 10px; border: 2px solid var(--preto); }
.servico-foto figcaption { margin-top: 10px; font-size: .88rem; color: var(--cinza); }
.ano { font: 400 clamp(6rem, 15vw, 13rem)/.8 var(--titulo); color: #63686c; letter-spacing: .01em; }

/* bancada de cópia de chaves */
.bancada { background: var(--metal); border: 2px solid var(--preto); border-radius: 12px; padding: clamp(14px, 2vw, 22px); }
html:not(.js) .bancada { display: none; }
#corte { display: block; width: 100%; height: auto; }
.bancada-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 8px; }
#corte-bt { min-width: 12.5em; font-variant-numeric: tabular-nums; text-align: center; }
#corte-tempo { font-weight: 700; flex: 1 1 100%; min-height: 1.5em; }
#corte g.copia { transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .4s ease; }

/* matrícula */
.oficina-chapa { display: grid; gap: 22px; justify-items: start; }
.oficina-chapa .acoes { margin-top: 0; }
.chapa { --alt: clamp(64px, 9.4vw, 112px); display: flex; align-items: stretch; height: var(--alt); width: calc(var(--alt) * 4.73); max-width: 100%; padding: 0 calc(var(--alt) * .07) 0 0; background: linear-gradient(90deg, var(--azul) 0 calc(var(--alt) * .42), #fdfdfb calc(var(--alt) * .42)); border: calc(var(--alt) * .035) solid var(--preto); border-radius: calc(var(--alt) * .11); box-shadow: 0 5px 0 rgba(20, 20, 20, .28); overflow: hidden; }
.chapa-eu { flex: 0 0 calc(var(--alt) * .42); background: var(--azul); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; }
.chapa-eu svg { width: 72%; height: auto; }
.chapa-eu b { font: 400 calc(var(--alt) * .26)/1 var(--titulo); }
.chapa-txt { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; font: 400 calc(var(--alt) * .74)/1 var(--titulo); letter-spacing: .05em; white-space: pre; word-spacing: .12em; color: #111; padding-top: calc(var(--alt) * .02); text-shadow: 0 1px 0 #fff, 0 -1px 0 rgba(0, 0, 0, .3); }
.chapa.quadrada { height: calc(var(--alt) * 1.9); width: calc(var(--alt) * 2.95); }
.chapa.quadrada .chapa-txt { white-space: pre-line; text-align: center; line-height: 1.04; font-size: calc(var(--alt) * .72); }
.chapa-campos { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: end; max-width: 100%; }
.chapa-campos > label { flex: 1 1 100%; font-weight: 700; font-size: .95rem; margin-bottom: -4px; }
.chapa-campos > input { flex: 1 1 200px; max-width: 260px; }
.chapa-campos input[type="text"] { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
html:not(.js) .chapa-campos { display: none; }
input[type="text"], input[type="tel"], textarea { width: 100%; background: #fff; border: 2px solid var(--preto); border-radius: 8px; padding: 11px 13px; font-size: 1.05rem; min-height: 48px; }
textarea { resize: vertical; min-height: 110px; }
::placeholder { color: #6a6e72; opacity: 1; letter-spacing: 0; font-weight: 400; text-transform: none; }
.feitio { display: flex; align-items: center; gap: 6px; }
.feitio legend { float: left; font-weight: 700; font-size: .95rem; margin-right: 10px; padding: 0; }
.feitio label, .assuntos label { position: relative; display: inline-flex; }
.feitio input, .assuntos input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.feitio span, .assuntos span { display: inline-block; border: 2px solid var(--preto); border-radius: 8px; padding: 10px 14px; font-weight: 700; font-size: .95rem; min-height: 50px; line-height: 1.6; background: transparent; transition: background-color .15s ease, color .15s ease; }
.feitio input:checked + span, .assuntos input:checked + span { background: var(--preto); color: #f7f7f3; }
.feitio input:focus-visible + span, .assuntos input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 3px; }

/* ---------- em cima do balcão ---------- */
.balcao { --foco: #8fb0ff; background: var(--preto); color: #f7f7f3; padding: clamp(40px, 6vw, 84px) var(--lado); }
.balcao-topo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; margin-bottom: clamp(20px, 3vw, 36px); }
.balcao-topo p { color: #c9cccf; max-width: 46ch; }
.fotos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; }
.fotos li { position: relative; }
.fotos li.alto { grid-row: span 2; }
.fotos button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--madeira); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.fotos img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fotos li.alto img { aspect-ratio: auto; }
.fotos button:hover img { transform: scale(1.04); }
.fotos p { position: absolute; left: 8px; bottom: 8px; right: 8px; width: fit-content; max-width: calc(100% - 16px); background: rgba(20, 20, 20, .88); color: #f7f7f3; font-size: .82rem; line-height: 1.3; padding: 5px 9px; border-radius: 5px; pointer-events: none; }

/* ---------- quem ---------- */
.quem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 30px clamp(24px, 5vw, 80px); align-items: start; padding: clamp(40px, 6vw, 84px) var(--lado); }
.quem-texto p { margin-top: 16px; max-width: 50ch; }
.quem-texto h3 { margin-top: 30px; font-size: 1.6rem; }
.diplomas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.diplomas figure { background: var(--chapa); border: 2px solid var(--preto); border-radius: 6px; padding: 10px 10px 12px; box-shadow: 0 10px 24px rgba(20, 20, 20, .18); }
.diplomas figure:nth-child(2) { margin-top: 36px; }
.diplomas img { width: 100%; }
.diplomas figcaption { margin-top: 9px; font-size: .86rem; color: var(--cinza); }

/* ---------- avaliações ---------- */
.avaliacoes { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.5fr); gap: 32px clamp(24px, 5vw, 80px); align-items: start; padding: clamp(40px, 6vw, 84px) var(--lado); background: var(--chapa); }
.nota-g { position: sticky; top: 100px; }
.nota-num { margin-top: 14px; }
.nota-num b { display: block; font: 400 clamp(5.4rem, 11vw, 9.4rem)/.9 var(--titulo); }
.nota-num span { display: block; margin-top: 22px; font-weight: 700; }
.barras { margin-top: 20px; max-width: 380px; }
.barras li { display: grid; grid-template-columns: 82px minmax(0, 1fr) 30px; align-items: center; gap: 12px; font-size: .92rem; padding: 4px 0; }
.barras i { display: block; height: 10px; width: max(3px, calc(var(--p) / 49 * 100%)); background: var(--preto); }
.barras i.zero { width: 0; }
.barras b { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fonte { margin-top: 16px; font-size: .9rem; color: var(--cinza); }
.vozes { columns: 2; column-gap: clamp(20px, 3vw, 40px); }
.voz { break-inside: avoid; border-top: 2px solid var(--preto); padding: 16px 0 26px; }
.voz p { font-size: 1.05rem; overflow-wrap: break-word; }
.voz footer { margin-top: 10px; font-size: .9rem; font-weight: 700; color: var(--cinza); }

/* ---------- pedido ---------- */
.pedido { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.5fr); gap: 30px clamp(24px, 5vw, 80px); align-items: start; padding: clamp(40px, 6vw, 84px) var(--lado); }
.pedido-texto { position: sticky; top: 100px; }
.pedido-texto p { margin-top: 16px; max-width: 42ch; }
html:not(.js) .ficha { display: none; }
.ficha { background: var(--chapa); border: 2px solid var(--preto); border-radius: 12px; padding: clamp(16px, 2.6vw, 30px); }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips label, .chips span { display: block; width: 100%; }
.assuntos legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin-top: 20px; }
.campo.largo { grid-column: 1 / -1; }
#campo-carro[hidden] + #campo-matricula { grid-column: 1 / -1; max-width: 260px; }
.campo label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 5px; }
.saida { margin-top: 22px; border-top: 2px solid var(--preto); padding-top: 16px; }
.saida-rotulo { font-weight: 700; font-size: .95rem; }
#saida { margin-top: 8px; background: #fff; border: 2px solid var(--fio); border-radius: 8px; padding: 14px 16px; font: 400 .98rem/1.5 var(--texto); white-space: pre-wrap; overflow-wrap: break-word; min-height: 9em; }
#copiado { font-weight: 700; font-size: .92rem; }

/* ---------- perguntas ---------- */
.perguntas { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.5fr); gap: 24px clamp(24px, 5vw, 80px); align-items: start; padding: clamp(40px, 6vw, 84px) var(--lado); background: var(--chapa); }
.perguntas h2 { position: sticky; top: 100px; }
.qa { border-top: 2px solid var(--preto); }
.qa:last-child { border-bottom: 2px solid var(--preto); }
.q { display: block; position: relative; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.12rem; line-height: 1.3; padding: 17px 46px 17px 0; }
.q::-webkit-details-marker { display: none; }
.q::before, .q::after { content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 3px; margin-top: -1.5px; background: var(--preto); transition: transform .25s ease; }
.q::after { transform: rotate(90deg); }
.qa[open] .q::after { transform: rotate(0deg); }
.q:hover { text-decoration: underline; text-decoration-color: var(--vermelho); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.r { padding: 0 46px 20px 0; color: var(--cinza); max-width: 66ch; }

/* ---------- onde ---------- */
.onde { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 5vw, 80px); align-items: start; padding: clamp(40px, 6vw, 84px) var(--lado); }
.onde h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); }
.morada { margin-top: 14px; }
.emails { display: flex; flex-wrap: wrap; gap: 0 26px; margin-top: 4px; }
.emails .lk { font-weight: 600; overflow-wrap: anywhere; }
.mapa { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.mapa-nota { flex: 1 1 100%; font-size: .86rem; color: var(--cinza); }
html:not(.js) #mapa-bt, html:not(.js) .mapa-nota { display: none; }
.mapa.aberto { display: block; border: 2px solid var(--preto); border-radius: 10px; overflow: hidden; background: var(--chapa); }
.mapa iframe { display: block; width: 100%; height: 380px; border: 0; }
.mapa.aberto .lk { margin: 2px 14px; }
.horas { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 1rem; }
.horas thead, .horas tbody { background: var(--chapa); }
.horas caption { text-align: left; font: 400 1.9rem/1.1 var(--titulo); padding-bottom: 12px; }
.horas th, .horas td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--fio); font-variant-numeric: tabular-nums; white-space: nowrap; }
.horas thead th { font-size: .86rem; color: var(--cinza); border-top: 0; }
.horas tbody th { font-weight: 700; }
.horas tr.hoje-l th, .horas tr.hoje-l td { background: var(--preto); color: #f7f7f3; }

/* ---------- fim ---------- */
.fim { --foco: #8fb0ff; background: var(--preto); color: #d6d9db; padding: 26px var(--lado) 34px; font-size: .92rem; }
.fim p { max-width: 90ch; }
.fim p + p { margin-top: 8px; }
.fim-aviso { color: #f7f7f3; font-weight: 700; }

/* ---------- fotografia ampliada ---------- */
.luz { --foco: #8fb0ff; position: fixed; border: 0; padding: 14px 14px 0; background: #1b1b1b; color: #f7f7f3; width: fit-content; max-width: 100vw; max-height: 100dvh; border-radius: 10px; overscroll-behavior: contain; }
.luz::backdrop { background: rgba(10, 10, 10, .92); }
.luz img { width: auto; max-width: min(calc(100vw - 28px), 860px); height: auto; max-height: calc(100dvh - 170px); border-radius: 6px; }
.luz-leg { padding: 12px 4px 0; }
.luz-nav { display: flex; align-items: center; gap: 10px; padding: 12px 4px 14px; }
.luz-nav span { margin-right: auto; font-size: .9rem; color: #c9cccf; white-space: nowrap; }
.luz-nav button { background: none; border: 2px solid #8d9195; color: #f7f7f3; border-radius: 8px; padding: 9px 15px; font-weight: 700; min-height: 46px; }
.luz-nav button:hover { border-color: #f7f7f3; }

/* ---------- ecrãs médios e pequenos ---------- */
@media (max-width: 1080px) {
  .menu { display: none; }
  .fotos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 76px; }
  .abre { grid-template-columns: minmax(0, 1fr); }
  h1 { max-width: none; }
  .roda { margin: 6px 6% 0; }
  .servico, .quem, .avaliacoes, .pedido, .perguntas, .onde { grid-template-columns: minmax(0, 1fr); }
  .servico.inv .servico-texto { order: 0; }
  .nota-g, .perguntas h2, .pedido-texto { position: static; }
  .ano { display: none; }
  .roda figcaption { text-align: center; }
  .vozes { columns: 1; }
  .fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .diplomas figure:nth-child(2) { margin-top: 0; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .topo { gap: 10px; padding: 8px var(--lado); }
  .marca img { height: 38px; }
  .marca-nome { font-size: 1.25rem; }
  .marca { gap: 10px; }
  .ligar { padding: 10px 16px; }
  .ligar-num { display: none; }
  .placas { grid-template-columns: minmax(0, 1fr); border-top: 0; margin-top: 18px; }
  .placas li { display: flex; align-items: baseline; gap: 12px; max-width: none; border-right: 0; border-top: 1px solid var(--fio); margin: 0; padding: 8px 0; }
  .placas li:first-child { border-top: 2px solid var(--preto); }
  .placas b { flex: 0 0 4.4ch; font-size: 1.5rem; white-space: nowrap; }
  .bancada-linha { gap: 6px 14px; }
  #corte-bt { min-width: 10.5em; }
  .chips { grid-template-columns: minmax(0, 1fr); }
  .fotos p { display: none; }
  .campos { grid-template-columns: minmax(0, 1fr); }
  .chapa { --alt: 17.6vw; }
  .horas th, .horas td { padding: 9px 10px; }
  .diplomas { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
