/* Landing page de subscrição — SPEC §5. Mobile-first. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/poppins-latin-300-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2');
}

:root {
  --lr-title: #2F4F55;
  --lr-text-muted: #767676;
  --lr-input-bg: #F3F3F3;
  --lr-black: #000;
  --lr-white: #FFF;
  --lr-error: #B3261E;
  --lr-focus: #2F4F55;
}

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

/* A altura do body depende apenas do conteúdo, para o auto-resize do iframe
   não entrar em ciclo (SPEC §7.1): sem height:100% nem min-height:100vh. */
html,
body {
  margin: 0;
  padding: 0;
  background: var(--lr-white);
}

body {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-weight: 400;
  color: var(--lr-black);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.lr {
  max-width: 1170px;
  margin: 0 auto;
  padding: 24px 16px;
}

.lr__title,
.lr__success {
  margin: 0 0 24px;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.35;
  text-align: center;
  color: var(--lr-title);
}

.lr__success {
  margin: 0;
  padding: 24px 0;
}

.lr__success:focus {
  outline: none;
}

.lr__field {
  margin-bottom: 16px;
}

.lr__input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--lr-input-bg);
  font: inherit;
  font-size: 16px; /* ≥16px evita o zoom automático no iOS */
  color: var(--lr-black);
  -webkit-appearance: none;
  appearance: none;
}

.lr__input::placeholder {
  color: var(--lr-text-muted);
  opacity: 1;
}

.lr__input[aria-invalid='true'] {
  box-shadow: inset 0 0 0 1px var(--lr-error);
}

.lr__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lr-text-muted);
  cursor: pointer;
}

.lr__checkbox {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--lr-black);
  cursor: pointer;
}

.lr__consent a {
  color: var(--lr-black);
  text-decoration: underline;
}

.lr__button {
  display: block;
  width: 100%;
  height: 56px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--lr-black);
  color: var(--lr-white);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.lr__button:hover {
  opacity: 0.85;
}

.lr__button:disabled {
  opacity: 0.5;
  cursor: default;
}

.lr__error {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--lr-error);
}

.lr__error:empty {
  display: none;
}

.lr__error--form {
  margin-top: 12px;
  text-align: center;
}

/* Foco visível em todos os elementos interativos (SPEC §5.1). */
.lr__input:focus-visible,
.lr__checkbox:focus-visible,
.lr__button:focus-visible,
.lr a:focus-visible {
  outline: 2px solid var(--lr-focus);
  outline-offset: 2px;
}

/* Fallback sem JS: páginas de resultado. */
.result__error {
  margin: 0;
  padding: 24px 0 8px;
  font-size: 16px;
  text-align: center;
  color: var(--lr-error);
}

.result__back {
  margin: 0;
  text-align: center;
}

.result__back a {
  color: var(--lr-black);
}

/* Honeypot: fora do ecrã, sem display:none (SPEC §7.1). */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .lr {
    padding: 32px 16px;
  }

  .lr__title,
  .lr__success {
    font-size: 30px;
    margin-bottom: 32px;
  }

  .lr__success {
    margin-bottom: 0;
  }

  .lr__input,
  .lr__button {
    height: 64px;
  }

  .lr__consent {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lr__button {
    transition: none;
  }
}
