/* Foglio di stile della pagina di login (/login.php).
   File statico servito direttamente da public_html, non passa dalla
   pipeline di Astro: se la palette in src/styles/global.css cambia,
   aggiornare anche qui a mano. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #faf7f2;
  color: #1c1917;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 24rem;
  width: 100%;
}

h1 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1.5rem;
  color: #5f5850;
}

p[role='alert'] {
  color: #8f3921;
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f5850;
}

input[type='password'] {
  font: inherit;
  padding: 0.6em 0.75em;
  border: 1px solid #cbc3b6;
  border-radius: 4px;
  background: #fff;
  color: #1c1917;
}

/* Focus visibile e coerente su tutti gli elementi interattivi */
:focus-visible {
  outline: 2px solid #b3492b;
  outline-offset: 2px;
  border-radius: 2px;
}

input[type='password']:focus-visible {
  outline-offset: 1px;
}

button {
  font: inherit;
  font-weight: 600;
  margin-top: 0.75rem;
  padding: 0.6em 1.1em;
  border: 1px solid #1c1917;
  border-radius: 4px;
  background: #1c1917;
  color: #faf7f2;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

button:hover {
  background: #faf7f2;
  color: #1c1917;
}

a {
  color: #b3492b;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #8f3921;
}

.login-nav {
  margin: 2rem 0 0;
  font-size: 0.9375rem;
  color: #5f5850;
}

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