/* Verification page. Tokens come from theme.css — nothing here invents a colour. */

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

body {
  margin: 0;
  padding: 2.5rem 1.25rem 3rem;
  background: var(--bg-subtle);
  color: var(--fg);
  font: 400 var(--text-base) / var(--leading-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
}

/* ---------------------------------------------------------------- intro */

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1rem;
  color: var(--ink);
  font: 600 var(--text-h1) / 1.2 var(--font-head);
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1.25rem;
  font-size: var(--text-lg);
  line-height: 1.55;
}

.notice {
  margin: 0;
  padding: 0.875rem 1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------------- card */

.card {
  margin: 2rem 0 1.5rem;
  padding: 1.75rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 1.5rem;
  color: var(--ink);
  font: 600 var(--text-h2) / 1.25 var(--font-head);
}

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--ink);
  font-weight: 700;
  font-size: var(--text-sm);
}

input[type='email'],
input[type='tel'] {
  width: 100%;
  height: var(--control-height);
  padding: 0 0.875rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

input[type='email']:focus-visible,
input[type='tel']:focus-visible,
input[type='checkbox']:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

input[aria-invalid='true'] {
  border-color: var(--error);
}

.hint {
  margin: 0.375rem 0 0;
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

/* The normalized form, shown back on blur: it confirms the number was read
   correctly and cuts down on false negatives at match time. */
.hint.resolved {
  color: var(--success);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hint.unresolved {
  color: var(--error);
}

/* ------------------------------------------------------------- consent */

.consent {
  margin: 1.5rem 0;
}

.checkbox {
  display: flex;
  gap: var(--control-gap);
  align-items: flex-start;
  font-weight: 400;
  font-size: var(--text-sm);
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.0625rem 0 0;
  accent-color: var(--dark);
}

a {
  color: var(--accent-text);
  text-underline-offset: 2px;
}

/* ----------------------------------------------------------- turnstile */

.turnstile {
  min-height: 68px;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------- button */

button {
  position: relative;
  width: 100%;
  min-height: var(--control-height);
  padding: 0 1.25rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 0;
  border-radius: var(--radius);
  font: 700 var(--text-base) / 1 var(--font-body);
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--btn-bg-hover);
}

/* Disabled while the request is in flight, otherwise people press three times. */
button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  margin-left: 0.625rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -0.1875rem;
  animation: spin 0.7s linear infinite;
}

button.loading .spinner {
  display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}

.error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  background: #fdf2f1;
  color: var(--error);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

/* ----------------------------------------------------------------- done */

.done {
  text-align: center;
}

.tick {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  background: var(--accent-soft);
  color: var(--success);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 3rem;
}

.done h2 {
  margin-bottom: 0.75rem;
}

.muted {
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------- footer */

footer {
  color: var(--fg-muted);
  font-size: var(--text-sm);
  text-align: center;
}

footer p {
  margin: 0 0 0.5rem;
}

@media (max-width: 30rem) {
  body {
    padding: 1.5rem 1rem 2rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .card {
    padding: 1.25rem;
  }
}
