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

:root {
  --fapam-red: #e8001d;
  --fapam-red-dark: #a80016;
}

body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

/* Fundo geométrico */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('assets/bg-pattern.svg') center / cover no-repeat;
}

/* Card central */
.card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 24px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  animation: rise 600ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  height: 52px;
  width: auto;
  margin-bottom: 20px;
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: #003b5c;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.97rem;
  color: #4b5563;
  text-align: center;
  line-height: 1.55;
  margin-bottom: 24px;
}

.link-tel {
  color: var(--fapam-red);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.link-tel:hover {
  text-decoration: underline;
}

form {
  width: 100%;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #003b5c;
  margin-bottom: 5px;
}

.field input,
.field select {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.97rem;
  font-family: 'Outfit', sans-serif;
  color: #111827;
  background: #fff;
  transition: border-color 150ms, box-shadow 150ms;
}

.field input:focus,
.field select:focus {
  border-color: #003b5c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 59, 92, 0.2);
}

button[type='submit'] {
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--fapam-red), var(--fapam-red-dark));
  transition: transform 150ms, box-shadow 150ms;
}

button[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 0, 29, 0.4);
}

button[type='submit']:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.field textarea {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.97rem;
  font-family: 'Outfit', sans-serif;
  color: #111827;
  background: #fff;
  resize: vertical;
  transition: border-color 150ms, box-shadow 150ms;
}

.field textarea:focus {
  border-color: #003b5c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 59, 92, 0.2);
}

.opcional {
  font-weight: 400;
  font-size: 0.8rem;
  color: #6b7280;
}

.req {
  color: #e8001d;
  font-size: 0.85rem;
}

.form-feedback {
  min-height: 20px;
  margin-top: 10px;
  font-size: 0.93rem;
  text-align: center;
}

/* Popup de sucesso */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 200ms ease;
}

.popup-overlay.active {
  display: flex;
}

.popup {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: rise 250ms ease;
}

.popup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #003b5c;
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.popup h2 {
  font-family: 'Fraunces', serif;
  color: #003b5c;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.popup p {
  color: #4b5563;
  font-size: 0.97rem;
  line-height: 1.5;
  margin-bottom: 22px;
}

.popup-btn {
  background: linear-gradient(135deg, #e8001d, #a80016);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 32px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms;
}

.popup-btn:hover {
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hp {
  display: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .card {
    padding: 28px 20px 24px;
  }
}
