/* LATAP · coming soon. Estilo do site da LTP Industry (empresa-mãe), como o site novo da LATAP:
   fundo cinzento claro com grelha de desenho técnico, Source Sans 3 (licença OFL, em /fonts), vermelho LTP nos ícones. */

@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --fundo: #f1f3f5;
  --linha: #d6dadf;
  --titulo: #545659;
  --texto: #66686c;
  --vermelho: #ce0e2d;
  --letra: "Source Sans 3", "Source Sans Pro", system-ui, "Segoe UI", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: max(56px, env(safe-area-inset-top)) max(120px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(120px, env(safe-area-inset-left));
  overflow-x: hidden;
  background: var(--fundo);
  color: var(--titulo);
  font-family: var(--letra);
  -webkit-font-smoothing: antialiased;
}

/* Grelha de desenho técnico, como o fundo da LTP; esbatida ao centro para não competir com o texto. */
.grelha {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(214 218 223 / 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(214 218 223 / 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse closest-side, transparent 0%, rgb(0 0 0 / 0.15) 60%, #000 100%);
  mask-image: radial-gradient(ellipse closest-side, transparent 0%, rgb(0 0 0 / 0.15) 60%, #000 100%);
}

.topo, .mensagem, .rodape { position: relative; z-index: 1; }

.logotipo { display: block; width: 120px; height: auto; }

.mensagem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 760px;
  text-align: center;
}

.titulo {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--titulo);
  text-wrap: balance;
}

.descricao {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1.125rem, 1.03rem + 0.3vw, 1.3125rem);
  line-height: 1.55;
  color: var(--texto);
  text-wrap: pretty;
}

/* Contactos */
.rodape { width: min(100%, 1200px); }

.contactos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 64px;
  padding-top: 32px;
  border-top: 1px solid var(--linha);
  font-style: normal;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--titulo);
}

.contacto { display: flex; align-items: flex-start; gap: 12px; }
.contacto p { margin: 0; }
.contacto strong { font-weight: 600; }

.icone {
  flex: none;
  margin-top: 2px;
  fill: none;
  stroke: var(--vermelho);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contactos a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover: hover) {
  .contactos a:hover { color: var(--vermelho); text-decoration-color: currentColor; }
}

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

/* Botão da página 404 */
.voltar {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 2px;
  background: var(--vermelho);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 200ms ease;
}

@media (hover: hover) {
  .voltar:hover { background: #a80b25; }
}

.voltar:active { background: #a80b25; }

/* Telemóvel */
@media (max-width: 720px) {
  body { padding: max(40px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); gap: 40px; }
  .logotipo { width: 88px; }
  .mensagem { gap: 20px; }
  .quebra { display: none; }
  .rodape { width: 100%; }
  .contactos { flex-direction: column; gap: 18px; padding-top: 24px; font-size: 0.9375rem; }
  .grelha { background-size: 32px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
