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

:root {
  --blue: #0275b9;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
  color: var(--blue);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
}

/* Il PNG è quadrato con molto spazio vuoto: lo ritagliamo verticalmente */
.logo {
  width: 220px;
  height: 90px;
  object-fit: cover;
  margin-bottom: 40px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.subtitle {
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 40px;
}

.newsletter {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 580px;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 24px;
  background: transparent;
  border: 1px solid var(--blue);
  border-radius: 10px;
  color: var(--blue);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter input::placeholder {
  color: rgba(2, 117, 185, 0.5);
}

.newsletter input:focus {
  box-shadow: 0 0 0 2px rgba(2, 117, 185, 0.2);
}

.newsletter input.invalid {
  border-color: #e5484d;
}

.newsletter button {
  height: 46px;
  padding: 0 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: center;
}

.newsletter button:hover {
  opacity: 0.85;
}

.newsletter button:disabled {
  opacity: 0.6;
  cursor: default;
}

.message {
  min-height: 1.5em;
  margin-top: 16px;
  font-size: 0.9rem;
}

.message.error {
  color: #e5484d;
}

.message.success {
  color: #46a758;
}

.social {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.social a {
  display: flex;
  color: var(--blue);
  transition: opacity 0.2s;
}

.social a:hover {
  opacity: 0.7;
}

.social svg {
  width: 26px;
  height: 26px;
}

.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.95rem;
  color: var(--blue);
}

.footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  h1 {
    font-size: 2rem;
  }

  .newsletter {
    flex-direction: column;
  }

  .newsletter input {
    flex: none;
    width: 100%;
  }

  .newsletter button {
    width: 100%;
    height: 48px;
  }
}
