/* Placa de identificação em alumínio, presa por quatro rebites, sobre esmalte verde-máquina. */

@font-face {
  font-family: "Michroma";
  src: url("/fonts/michroma-quattro.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  /* Recorte só com as letras de QUATTRO. */
  unicode-range: U+41, U+4F, U+51-52, U+54-55;
}

@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --esmalte: #3a5547;
  --aluminio-claro: #e4e6e0;
  --aluminio: #cfd3cb;
  --gravado: #1f2b25;
  --gravado-suave: #49564f;
  --vinco: rgb(31 43 37 / 0.2);
  --brilho: rgb(255 255 255 / 0.55);
  --ambar: #e9a21b;

  --texto: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --marca: "Michroma", "Eurostile", "Arial Black", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: var(--esmalte);
  color: var(--gravado);
  font-family: var(--texto);
  font-size: 1.125rem;
  line-height: 1.5;
}

.placa {
  position: relative;
  width: 100%;
  max-width: 38rem;
  padding: clamp(2.5rem, 7vw, 3.75rem) clamp(1.75rem, 7vw, 3.75rem);
  border-radius: 0.625rem;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.06) 0 1px, rgb(0 0 0 / 0.025) 1px 3px),
    linear-gradient(172deg, var(--aluminio-claro), var(--aluminio));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.7),
    inset 0 -1px 0 rgb(0 0 0 / 0.18),
    0 1px 0 rgb(0 0 0 / 0.3),
    0 1.5rem 3rem -1rem rgb(18 30 24 / 0.6);
  text-shadow: 0 1px 0 var(--brilho);
}

.placa > :last-child {
  margin-bottom: 0;
}

/* Os quatro rebites. */
.rebite {
  position: absolute;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3f4f1, #a9aea6 58%, #7c8279);
  box-shadow:
    0 1px 1px rgb(0 0 0 / 0.4),
    inset 0 -1px 1px rgb(0 0 0 / 0.2);
  animation: cravar 0.32s cubic-bezier(0.3, 1.6, 0.5, 1) backwards;
}

.rebite:nth-of-type(1) { top: 1rem; left: 1rem; animation-delay: 0.15s; }
.rebite:nth-of-type(2) { top: 1rem; right: 1rem; animation-delay: 0.35s; }
.rebite:nth-of-type(3) { bottom: 1rem; right: 1rem; animation-delay: 0.55s; }
.rebite:nth-of-type(4) { bottom: 1rem; left: 1rem; animation-delay: 0.75s; }

@keyframes cravar {
  from {
    opacity: 0;
    transform: scale(1.8);
  }
}

.marca {
  margin: 0;
  font-weight: 400;
}

.marca-nome {
  display: block;
  font-family: var(--marca);
  font-size: clamp(2rem, 9.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* Michroma desenha largo; o recuo óptico alinha o Q com o texto abaixo. */
  margin-left: -0.04em;
}

.marca-ramo {
  display: block;
  margin-top: 0.75rem;
  font-size: clamp(1.0625rem, 3.2vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: 0.015em;
}

.aviso {
  max-width: 30em;
  margin: 2rem 0 2.25rem;
  color: var(--gravado-suave);
  /* Na 404 o aviso é o h1; mantém o mesmo corpo do texto. */
  font-size: inherit;
  font-weight: 400;
}

.dados {
  margin: 0;
  border-bottom: 1px solid var(--vinco);
  box-shadow: 0 1px 0 var(--brilho);
}

.dados > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--vinco);
  box-shadow: inset 0 1px 0 var(--brilho);
}

.dados dt {
  color: var(--gravado-suave);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.dados dd {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-weight: 600;
}

/* Lâmpada âmbar: máquina em preparação, ainda não em operação. */
.lampada {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--ambar);
  box-shadow:
    0 0 0 3px rgb(233 162 27 / 0.22),
    inset 0 -1px 1px rgb(0 0 0 / 0.25);
}

.voltar {
  color: var(--gravado);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.voltar:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--gravado);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 26rem) {
  .dados > div {
    grid-template-columns: 5.25rem 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rebite {
    animation: none;
  }
}
