/* Concordance Auth Page — branded OTP authentication */

:root {
  --navy: #0B1D33;
  --teal: #1A9E96;
  --teal-light: #2DD4C8;
  --coral: #FF6B4A;
  --cream: #FAF9F7;
  --stone: #E8E4DE;
  --warm-grey: #F5F3F0;
  --charcoal: #2C2C2C;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background-color: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Card */
.auth-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 2.5rem 2rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

/* Logo */
.auth-logo {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 0.5rem;
}

.auth-wordmark {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--navy);
  margin-bottom: 2rem;
}

/* States */
.auth-state[hidden] { display: none; }

.auth-state h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.auth-state h1::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--teal);
  margin: 0.5rem auto 0;
}

.auth-hint {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-hint strong {
  color: var(--navy);
}

/* Email input */
#email-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--stone);
  border-radius: 4px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 1rem;
}

#email-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(26, 158, 150, 0.15);
}

#email-input::placeholder {
  color: #bbb;
}

/* Buttons */
button[type="submit"] {
  width: 100%;
  padding: 0.7rem;
  background-color: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 4px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

button[type="submit"]:hover {
  background-color: var(--teal);
}

button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-link-btn {
  display: inline-block;
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--teal);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

/* OTP digits */
.otp-digits {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
}

.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--stone);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
}

.otp-digit:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(26, 158, 150, 0.15);
}

.otp-sep {
  width: 8px;
  height: 2px;
  background: var(--stone);
  border-radius: 1px;
}

/* Error message */
.auth-error {
  color: var(--coral);
  font-size: 0.8rem;
  margin-top: 0.8rem;
}

.auth-error[hidden] { display: none; }

/* Spinner */
.auth-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--stone);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1.5rem auto 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.auth-footer {
  margin-top: 2rem;
  font-size: 0.7rem;
  color: #bbb;
  letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem 1.5rem;
  }

  .otp-digit {
    width: 38px;
    height: 46px;
    font-size: 1.2rem;
  }
}
