/* public/styles.css */

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

:root {
  --azul: #0b4a8f;
  --azul-osc: #083b73;
  --verde: #16a34a;
  --rojo: #dc2626;
  --gris: #64748b;
  --fondo: #f5f7fb;
  --card: #ffffff;
  --borde: #e2e8f0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, #eef3fb 0%, #f5f7fb 100%);
  min-height: 100vh;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Logo + marca ---------- */
.logo {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  object-fit: contain;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--azul);
  text-align: center;
  margin-bottom: 24px;
  text-transform: uppercase;
}

/* ---------- Card principal ---------- */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 10px 30px rgba(11, 74, 143, 0.08);
  border: 1px solid var(--borde);
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--azul-osc);
  text-align: center;
  margin-bottom: 8px;
}

.subtitulo {
  font-size: 14px;
  color: var(--gris);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* ---------- Formulario ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 14px;
  font-size: 16px; /* evita zoom automático en iOS */
  border: 1.5px solid var(--borde);
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 16px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none;
  font-family: inherit;
}

input:focus {
  border-color: var(--azul);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 74, 143, .12);
}

/* ---------- Botón ---------- */
button.btn-principal {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--azul);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .05s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
}

button.btn-principal:hover:not(:disabled) { background: var(--azul-osc); }
button.btn-principal:active:not(:disabled) { transform: scale(0.98); }
button.btn-principal:disabled { opacity: .7; cursor: not-allowed; }

/* ---------- Spinner ---------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Alertas ---------- */
.alerta {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  display: none;
}

.alerta.error {
  display: block;
  background: #fef2f2;
  color: var(--rojo);
  border: 1px solid #fecaca;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--gris);
  text-align: center;
  max-width: 420px;
  line-height: 1.5;
}

/* ---------- Página de gracias ---------- */
.gracias-box {
  text-align: center;
  padding: 16px 8px;
}

.gracias-box .check {
  width: 72px;
  height: 72px;
  margin: 8px auto 20px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--verde);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
}

.gracias-box h1 {
  color: var(--verde);
  margin-bottom: 10px;
}

.gracias-box p {
  color: var(--gris);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 380px) {
  .logo { width: 96px; }
  h1 { font-size: 21px; }
  .card { padding: 22px 16px; border-radius: 16px; }
}