@font-face {
  font-family: "Montserrat";
  src: url("/assets/fontes/montserrat-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Cores da marca Placonascente (logótipo oficial) */
  --azul: #023E8A;
  --azul-escuro: #242157;
  --azul-claro: #346CB5;
  --texto: #393D4D;
  --texto-suave: #5A6070;
  --fundo: #FAFBF9;
  --branco: #FFFFFF;

  --largura: 72rem;
  --margem: clamp(1rem, 4vw, 2.5rem);
  --raio: 0.5rem;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fundo);
  color: var(--texto);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Cabeçalho */
.topo {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--margem) 0;
}

.topo__logo {
  width: clamp(13rem, 40vw, 18rem);
}

/* Conteúdo principal */
.principal {
  flex: 1;
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) var(--margem) clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}

.obra {
  margin: 0 auto;
  max-width: 60rem;
}

.obra__animacao {
  width: 100%;
}

.mensagem {
  max-width: 40rem;
  margin: clamp(0.5rem, 2vw, 1rem) auto 0;
}


.mensagem h1 {
  margin: 0;
  color: var(--azul-escuro);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.mensagem__texto {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--texto-suave);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Em ecrãs estreitos, botões empilhados com a mesma largura */
@media (max-width: 29.99rem) {
  .acoes {
    flex-direction: column;
    align-items: stretch;
    max-width: 20rem;
    margin-inline: auto;
  }

  .obra {
    margin-inline: calc(-1 * var(--margem));
  }
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--azul);
  border-radius: var(--raio);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.botao svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex: none;
}

.botao--principal {
  background: var(--azul);
  color: var(--branco);
}

.botao--principal:hover {
  background: var(--azul-escuro);
  border-color: var(--azul-escuro);
}

.botao--secundario {
  background: var(--branco);
  color: var(--azul);
}

.botao--secundario:hover {
  background: rgb(2 62 138 / 0.08);
}


/* Rodapé */
.rodape {
  background: var(--azul);
  color: var(--branco);
  font-size: 0.9375rem;
}

.rodape__grelha {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--largura);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--margem);
}

@media (min-width: 40rem) {
  .rodape__grelha {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .rodape__grelha {
    grid-template-columns: 1.1fr 1.3fr 1.1fr auto;
    gap: 3rem;
  }
}

.rodape__marca img {
  width: 14rem;
}

.rodape__titulo {
  margin: 0 0 0.75rem;
  color: var(--branco);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rodape address {
  font-style: normal;
}

.rodape__lista,
.redes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rodape__lista li + li {
  margin-top: 0.5rem;
}

.rodape a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

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


.rodape :focus-visible {
  outline-color: var(--branco);
}

.redes {
  display: flex;
  gap: 0.75rem;
}

.redes a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 50%;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.redes a:hover {
  background: var(--branco);
  color: var(--azul);
}

.redes svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Largura igual à do conteúdo da grelha, para a linha alinhar com as colunas */
.rodape__base {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: calc(min(100%, var(--largura)) - 2 * var(--margem));
  margin: 0 auto;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.25);
  font-size: 0.8125rem;
}

.rodape__base-texto {
  display: grid;
  gap: 0.5rem;
}

.rodape__base-texto p {
  margin: 0;
}

.rodape__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

@media (min-width: 64rem) {
  .rodape__base {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }

  /* Uma ligação por linha, alinhada à direita com as linhas de texto */
  .rodape__legal {
    display: grid;
    justify-items: end;
    text-align: right;
  }
}



/* Página de erro */
.erro {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
}

.erro__codigo {
  margin: 0;
  color: var(--azul);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
}

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