:root {
  --brand: #D2232A; /* matches the JOSE logo red so the mark blends into the page */
  --brand-dark: #B11D24;
  --ink: #1a1a1a;
  --error: #b00020;
  --success: #0a7d34;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(1rem, 4vw, 2rem);
  padding: 2rem 1.25rem;
  background: var(--brand);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

/* Logo sits on the red page background, above the card. The mark's own red
   field blends into the background, leaving the wordmark on red. */
.logo {
  width: 75%;        /* ~3/4 the card's width (logo and card share the same max-width cap) */
  max-width: 315px;  /* 0.75 x the 420px card max-width */
  height: auto;
  display: block;
}

form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }

.field__label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
}
input[type="email"]:focus-visible {
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
/* Locked state after a successful signup (until page reload). */
input[type="email"]:disabled { background: #f3f3f3; color: #777; cursor: default; }
.consent input:disabled { cursor: default; }
.consent input:disabled + span { color: #777; }

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.95rem;
  cursor: pointer;
}
.consent input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

button {
  min-height: 48px;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--brand-dark); }
button:disabled { background: #c9c9c9; cursor: not-allowed; }
/* While submitting: keep the button brand-colored and show a spinner. */
button.loading { background: var(--brand); cursor: progress; }

.spinner {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
button:not(.loading) .spinner { display: none; }
button.loading .btn-label { display: none; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.6s; } }

.status { margin: 0; font-size: 0.95rem; min-height: 1.2em; }
.status--error { color: var(--error); }
.status--success { color: var(--success); font-weight: 600; }

/* Bilingual cross-fade: only text fades between English and Spanish - the logo,
   input boxes, and the user's typed value stay put. */
[data-i18n], #status { transition: opacity 1.2s ease; }
.i18n-fading [data-i18n], .i18n-fading #status { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  [data-i18n], #status { transition: none; }
}

/* Honeypot + a11y helpers */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
